From dca2c1b510f748493e0fa67609091fa0a1e406ea Mon Sep 17 00:00:00 2001 From: Tim McLean Date: Tue, 20 Aug 2019 15:32:40 -0700 Subject: [PATCH 1/2] Replace hard coded IP and Port with Bash variables --- modes/webscan.sh | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/modes/webscan.sh b/modes/webscan.sh index 47ffcd4..81c885f 100644 --- a/modes/webscan.sh +++ b/modes/webscan.sh @@ -59,18 +59,18 @@ if [ "$MODE" = "webscan" ]; then for a in {1..30}; do echo -n "[-] SCAN #$a: " - curl -sI "http://127.0.0.1:1337/v0.1/scan/$a" | grep HTTP | awk '{print $2}' - BURP_STATUS=$(curl -s http://127.0.0.1:1337/v0.1/scan/$a | grep -o -P "crawl_and_audit.{1,100}" | cut -d\" -f3 | grep "remaining") + curl -sI "http://$BURP_HOST:$BURP_PORT/v0.1/scan/$a" | grep HTTP | awk '{print $2}' + BURP_STATUS=$(curl -s http://$BURP_HOST:$BURP_PORT/v0.1/scan/$a | grep -o -P "crawl_and_audit.{1,100}" | cut -d\" -f3 | grep "remaining") while [[ ${#BURP_STATUS} -gt "5" ]]; do - BURP_STATUS=$(curl -s http://127.0.0.1:1337/v0.1/scan/$a | grep -o -P "crawl_and_audit.{1,100}" | cut -d\" -f3 | grep "remaining") - BURP_STATUS_FULL=$(curl -s http://127.0.0.1:1337/v0.1/scan/$a | grep -o -P "crawl_and_audit.{1,100}" | cut -d\" -f3) + BURP_STATUS=$(curl -s http://$BURP_HOST:$BURP_PORT/v0.1/scan/$a | grep -o -P "crawl_and_audit.{1,100}" | cut -d\" -f3 | grep "remaining") + BURP_STATUS_FULL=$(curl -s http://$BURP_HOST:$BURP_PORT/v0.1/scan/$a | grep -o -P "crawl_and_audit.{1,100}" | cut -d\" -f3) echo "[i] STATUS: $BURP_STATUS_FULL" sleep 15 done echo "[+] VULNERABILITIES: " echo "----------------------------------------------------------------" - curl -s "http://127.0.0.1:1337/v0.1/scan/$a" | grep -o -P "name.{1,100}" | cut -d\" -f3 | sort -u | tee $LOOT_DIR/web/burpsuite-$TARGET-$a.txt + curl -s "http://$BURP_HOST:$BURP_PORT/v0.1/scan/$a" | grep -o -P "name.{1,100}" | cut -d\" -f3 | sort -u | tee $LOOT_DIR/web/burpsuite-$TARGET-$a.txt done echo "[-] Done!" fi @@ -103,4 +103,4 @@ if [ "$MODE" = "webscan" ]; then /bin/bash "$INSTALL_DIR/bin/slack.sh" "[xerosecurity.com] •?((¯°·._.• Finished Sn1per scan: $TARGET [$MODE] (`date +"%Y-%m-%d %H:%M"`) •._.·°¯))؟•" fi exit -fi \ No newline at end of file +fi From 2948d9962bfb437efd7ea0166c70690061adfb4a Mon Sep 17 00:00:00 2001 From: Tim McLean Date: Fri, 23 Aug 2019 08:38:56 -0700 Subject: [PATCH 2/2] Fix typo --- modes/normal.sh | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/modes/normal.sh b/modes/normal.sh index 2becbd9..05cb4a9 100644 --- a/modes/normal.sh +++ b/modes/normal.sh @@ -574,7 +574,7 @@ else fi fi -if [ -z "$port_161U" ]; +if [ -z "$port_161" ]; then echo -e "$OKRED + -- --=[Port 161 closed... skipping.$RESET" else @@ -1310,4 +1310,4 @@ if [ "$SLACK_NOTIFICATIONS" == "1" ]; then fi if [ "$LOOT" = "1" ] && [ -z "$NOLOOT" ]; then loot -fi \ No newline at end of file +fi