x1mdev / ReconPi

ReconPi - A lightweight recon tool that performs extensive scanning with the latest tools.
https://x1m.nl/posts/recon-pi/
MIT License
713 stars 116 forks source link

Add Discord notifications #79

Closed spazbg closed 3 years ago

spazbg commented 4 years ago

notifyDiscord() { startFunction "Trigger Discord Notification" takeover="$(cat $SUBS/takeovers | wc -l)" totalsum=$(cat $SUBS/hosts | wc -l) intfiles=$(cat $NUCLEISCAN/*.txt | wc -l) nucleiCveScan="$(cat $NUCLEISCAN/cve.txt)" nucleiFileScan="$(cat $NUCLEISCAN/files.txt)"

/usr/local/bin/discord.sh --webhook-url="$WEBHOOK" --text "Found '$totalsum' live hosts for '$domain'" --username "Recon Bot"

/usr/local/bin/discord.sh --webhook-url="$WEBHOOK" --text "Found '$intfiles' interesting files using nuclei" --username "Recon Bot"

/usr/local/bin/discord.sh --webhook-url="$WEBHOOK" --text "Found '$takeover' subdomain takeovers on '$domain'" --username "Recon Bot"

/usr/local/bin/discord.sh --webhook-url="$WEBHOOK" --text "CVEs found for $domain: \n $nucleiCveScan" --username "Recon Bot"

/usr/local/bin/discord.sh --webhook-url="$WEBHOOK" --text "Files for $domain: \n $nucleiFileScan" --username "Recon Bot"

echo -e "[$GREEN+$RESET] Done."

}

image

Dependencies: https://github.com/ChaoticWeg/discord.sh