random- collection of un-sorted bollocks |
git clone git://git.acid.vegas/random.git |
Log | Files | Refs | Archive |
masscanify (898B)
1 #!/bin/sh 2 # masscan gotify alert - developed by acidvegas (https://git.acid.vegas) 3 4 GOTIFY_URL="https://push.change.me:5000" 5 GOTIFY_TOKEN="cHaNgEmE" 6 7 send_notification() { 8 result=$1 9 title=$2 10 data=$3 11 12 HOST=$(cat /etc/hostname) 13 14 if [ $result -eq 0 ]; then 15 status="completed" 16 elif [ $result -eq 69 ]; then 17 status="initiated" 18 elif [ $result -gt 128 ]; then 19 status="killed" 20 else 21 status="error" 22 fi 23 24 message="$title scan on $HOST for $data has changed to $status" 25 26 curl -X POST "$GOTIFY_URL/message?token=$GOTIFY_TOKEN" -F "title=$title" -F "message=$message" -F "priority=1" 27 } 28 29 [ $# -ne 1 ] && echo "usage: ./masscanify <ports>" && exit 1 30 31 ports=$1 32 33 send_notification 69 "masscan" $ports 34 35 masscan 0.0.0.0/0 -p${ports} --banners --source-port 61000 --open-only --rate 50000 --excludefile exclude.conf -oJ output.json --interactive 36 37 result=$? 38 39 send_notification $result "masscan" $ports