diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..d186546 --- /dev/null +++ b/.gitignore @@ -0,0 +1 @@ +.onionscandb diff --git a/.shallot.sh.swp b/.shallot.sh.swp new file mode 100644 index 0000000..9613457 Binary files /dev/null and b/.shallot.sh.swp differ diff --git a/onionscandb/crawls/URL/0 b/onionscandb/crawls/URL/0 new file mode 100644 index 0000000..2ac95af Binary files /dev/null and b/onionscandb/crawls/URL/0 differ diff --git a/onionscandb/crawls/dat_0 b/onionscandb/crawls/dat_0 new file mode 100644 index 0000000..d7933bb Binary files /dev/null and b/onionscandb/crawls/dat_0 differ diff --git a/onionscandb/crawls/id_0 b/onionscandb/crawls/id_0 new file mode 100644 index 0000000..6b010a1 Binary files /dev/null and b/onionscandb/crawls/id_0 differ diff --git a/onionscandb/data-config.json b/onionscandb/data-config.json new file mode 100644 index 0000000..06b2f44 --- /dev/null +++ b/onionscandb/data-config.json @@ -0,0 +1,7 @@ +{ + "DocMaxRoom": 2097152, + "ColFileGrowth": 33554432, + "PerBucket": 16, + "HTFileGrowth": 33554432, + "HashBits": 16 +} \ No newline at end of file diff --git a/onionscandb/number_of_partitions b/onionscandb/number_of_partitions new file mode 100644 index 0000000..56a6051 --- /dev/null +++ b/onionscandb/number_of_partitions @@ -0,0 +1 @@ +1 \ No newline at end of file diff --git a/onionscandb/relationships/From/0 b/onionscandb/relationships/From/0 new file mode 100644 index 0000000..db0b0a3 Binary files /dev/null and b/onionscandb/relationships/From/0 differ diff --git a/onionscandb/relationships/Identifier/0 b/onionscandb/relationships/Identifier/0 new file mode 100644 index 0000000..750a29b Binary files /dev/null and b/onionscandb/relationships/Identifier/0 differ diff --git a/onionscandb/relationships/Onion/0 b/onionscandb/relationships/Onion/0 new file mode 100644 index 0000000..c31dab5 Binary files /dev/null and b/onionscandb/relationships/Onion/0 differ diff --git a/onionscandb/relationships/Type/0 b/onionscandb/relationships/Type/0 new file mode 100644 index 0000000..43d9617 Binary files /dev/null and b/onionscandb/relationships/Type/0 differ diff --git a/onionscandb/relationships/dat_0 b/onionscandb/relationships/dat_0 new file mode 100644 index 0000000..ef33f07 Binary files /dev/null and b/onionscandb/relationships/dat_0 differ diff --git a/onionscandb/relationships/id_0 b/onionscandb/relationships/id_0 new file mode 100644 index 0000000..68a7794 Binary files /dev/null and b/onionscandb/relationships/id_0 differ diff --git a/shallot.sh b/shallot.sh old mode 100644 new mode 100755 index c510956..773f5e4 --- a/shallot.sh +++ b/shallot.sh @@ -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