![]() |
|
Leak WordPress Scanner in Bash - Printable Version +- Sinisterly (https://sinister.ly) +-- Forum: Coding (https://sinister.ly/Forum-Coding) +--- Forum: Coding (https://sinister.ly/Forum-Coding--71) +--- Thread: Leak WordPress Scanner in Bash (/Thread-Leak-WordPress-Scanner-in-Bash) |
WordPress Scanner in Bash - sunjester - 09-12-2026 ![]() https://streamable.com/90b7za Code: #2023
#colors
RED="\e[31m"
STRIKE="\e[9m"
BLACK="\e[30m"
GOLD="\e[33m"
GREEN="\e[32m"
BGBLK="\e[40m" #backgrounds
BGRED="\e[41m"
BGGREEN="\e[42m"
NOC="\e[0m" #reset
#check for scan argument
if [ -z $1 ]
then
NUMHOSTS=50
else
NUMHOSTS=$1
fi
clear
echo -e "\e${BGRED}Number of hosts to scan: ${NUMHOSTS}\e${NOC}"
echo -e "\e${GREEN}Scanning\e${NOC}.."
sudo nmap -p80,443 -iR $NUMHOSTS -T4 --open -oG scanresult 2>&1>/dev/null
resultcount=$(wc -l scanresult |cut -d' ' -f1)
if [ $resultcount -lt 3 ]
then
echo -e "\e${RED}No hosts found.\e${NOC}"
exit 1
fi
echo -e "\e${GREEN}Gathering IP's..\e${NOC}"
~/.chril/scripts/getips.sh scanresult|sed -E 's/([0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3})/http:\/\/\1\/wp-json/g' >hosts
while IFS= read -r url; do
echo -en "\e${BGGREEN}\e${BLACK}Checking:\e${NOC} $url\t\t"
#curl -s -I $url |head -n1
check=$(curl --connect-timeout 5 -sL --insecure -I $url|head -n1)
echo -e "\e${GOLD} $check"
done < hosts
#echo "Done." |