working scans
This commit is contained in:
parent
e1fb073943
commit
967686c788
1
.gitignore
vendored
Normal file
1
.gitignore
vendored
Normal file
@ -0,0 +1 @@
|
||||
.onionscandb
|
BIN
.shallot.sh.swp
Normal file
BIN
.shallot.sh.swp
Normal file
Binary file not shown.
BIN
onionscandb/crawls/URL/0
Normal file
BIN
onionscandb/crawls/URL/0
Normal file
Binary file not shown.
BIN
onionscandb/crawls/dat_0
Normal file
BIN
onionscandb/crawls/dat_0
Normal file
Binary file not shown.
BIN
onionscandb/crawls/id_0
Normal file
BIN
onionscandb/crawls/id_0
Normal file
Binary file not shown.
7
onionscandb/data-config.json
Normal file
7
onionscandb/data-config.json
Normal file
@ -0,0 +1,7 @@
|
||||
{
|
||||
"DocMaxRoom": 2097152,
|
||||
"ColFileGrowth": 33554432,
|
||||
"PerBucket": 16,
|
||||
"HTFileGrowth": 33554432,
|
||||
"HashBits": 16
|
||||
}
|
1
onionscandb/number_of_partitions
Normal file
1
onionscandb/number_of_partitions
Normal file
@ -0,0 +1 @@
|
||||
1
|
BIN
onionscandb/relationships/From/0
Normal file
BIN
onionscandb/relationships/From/0
Normal file
Binary file not shown.
BIN
onionscandb/relationships/Identifier/0
Normal file
BIN
onionscandb/relationships/Identifier/0
Normal file
Binary file not shown.
BIN
onionscandb/relationships/Onion/0
Normal file
BIN
onionscandb/relationships/Onion/0
Normal file
Binary file not shown.
BIN
onionscandb/relationships/Type/0
Normal file
BIN
onionscandb/relationships/Type/0
Normal file
Binary file not shown.
BIN
onionscandb/relationships/dat_0
Normal file
BIN
onionscandb/relationships/dat_0
Normal file
Binary file not shown.
BIN
onionscandb/relationships/id_0
Normal file
BIN
onionscandb/relationships/id_0
Normal file
Binary file not shown.
45
shallot.sh
Normal file → Executable file
45
shallot.sh
Normal file → Executable file
@ -1,6 +1,11 @@
|
||||
#!/bin/bash
|
||||
|
||||
set -xe
|
||||
set -e
|
||||
|
||||
# Setting env
|
||||
SCAN_DATE=`date "+%F-%H-%M"`
|
||||
SHALLOT_DIR="/tmp/shallot-$SCAN_DATE"
|
||||
mkdir -p $SHALLOT_DIR
|
||||
|
||||
echo "Shallot scritp v0.0.1"
|
||||
|
||||
@ -18,12 +23,40 @@ ONIONSITE=$1
|
||||
|
||||
echo "Checking if Tor Browser proxy is running..."
|
||||
|
||||
NETSTAT_OUTPUT=`netstat -lnp 2> /dev/null`
|
||||
IF_TOR_RUNNING=`echo $NETSTAT_OUTPUT | grep -zqv "tor" && echo 0 || echo 1`
|
||||
if [ "$IF_TOR_RUNNING" ] ; then
|
||||
echo "Tor is running, exiting..."
|
||||
exit 0;
|
||||
NETSTAT_OUTPUT=`netstat -tlnp 2> /dev/null`
|
||||
IF_TOR_RUNNING=`echo $NETSTAT_OUTPUT | grep -Ezqv "/tor" && echo 0 || echo 1`
|
||||
if [[ "$IF_TOR_RUNNING" = 1 ]] ; then
|
||||
echo "Tor is running!"
|
||||
else
|
||||
echo "Tor is not running"
|
||||
exit 1;
|
||||
fi
|
||||
|
||||
echo "Checking Onion Service, address: $1"
|
||||
echo ""
|
||||
|
||||
# OnionScan
|
||||
|
||||
echo "Runnning OnionScan aginst address, this will take a while..."
|
||||
ONIONSCAN_REPORT=$(onionscan --jsonReport --torProxyAddress "127.0.0.1:9150" $1 2>$SHALLOT_DIR/onionscan_error.log | jq)
|
||||
echo $ONIONSCAN_REPORT > $SHALLOT_DIR/onionscan_result.txt
|
||||
if [ $? ] ; then
|
||||
echo "OnionScan done! Saved in $SHALLOT_DIR/onionscan_result.txt"
|
||||
else
|
||||
echo "Error occured, exiting, check $SHALLOT_DIR/onionscan_error.log for details."
|
||||
exit 1
|
||||
fi
|
||||
|
||||
# HTTP Headers
|
||||
|
||||
echo "Scanning HTTP headers, wait..."
|
||||
|
||||
HTTP_HEADERS=$(proxychains -q -f /etc/proxychains4.conf /usr/bin/curl -I -s $1 | tail -n +3 | sed 's/\r//g' | head -n -1 | jq -R 'split(":")|{(.[0]) : .[1]}' 2>$SHALLOT_DIR/http_headers_error.log)
|
||||
echo $HTTP_HEADERS > $SHALLOT_DIR/http_headers.txt
|
||||
|
||||
if [ $? ] ; then
|
||||
echo "HTTP headers done! Saved in $SHALLOT_DIR/http+headers.txt"
|
||||
else
|
||||
echo "Error occured, check $SHALLOT_DIR/http_headers_error.log"
|
||||
exit 1
|
||||
fi
|
||||
|
Reference in New Issue
Block a user