minimal cleanup

This commit is contained in:
anon 2023-01-08 22:54:14 +01:00
parent ba1cbfbd7a
commit 320bd71a3e

View File

@ -7,28 +7,27 @@ SCAN_DATE=`date "+%F-%H-%M"`
SHALLOT_DIR="/tmp/shallot-$SCAN_DATE"
mkdir -p $SHALLOT_DIR
echo "Shallot scritp v0.0.1"
echo "Shallot scritp v0.0.2"
if [[ $# -eq 0 ]] ; then
echo "No arguments was passed, exiting..."
echo "[ERROR] No arguments was passed, exiting..."
exit 1
fi
if [[ $# -ge 2 ]] ; then
echo "Too much argument was passed, expecting to only get 1 argument, exiting..."
exit 1
echo "[WARRNING] Too much argument was passed, this script uses only first one."
fi
ONIONSITE=$1
echo "Checking if Tor Browser proxy is running..."
echo "[INFO] Checking if Tor Browser proxy is running..."
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!"
echo "[INFO] Tor is running!"
else
echo "Tor is not running"
echo "[ERROR] Tor is not running, start Tor Browser and connect to Tor, then restart this scritp"
exit 1;
fi
@ -43,7 +42,7 @@ 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."
echo "[ERROR] Error occured, exiting, check $SHALLOT_DIR/onionscan_error.log for details."
exit 1
fi
@ -55,8 +54,12 @@ HTTP_HEADERS=$(proxychains -q -f /etc/proxychains4.conf /usr/bin/curl -I -s $1 |
echo $HTTP_HEADERS > $SHALLOT_DIR/http_headers.txt
if [ $? ] ; then
echo "HTTP headers done! Saved in $SHALLOT_DIR/http+headers.txt"
echo "HTTP headers done! Saved in $SHALLOT_DIR/http_headers.txt"
else
echo "Error occured, check $SHALLOT_DIR/http_headers_error.log"
echo "[ERROR] Error occured, check $SHALLOT_DIR/http_headers_error.log"
exit 1
fi
# Report analysis