Skip to content

Instantly share code, notes, and snippets.

@whoisjeeva
Created January 20, 2021 15:28
Show Gist options
  • Save whoisjeeva/e0363ddd289ebb2faecaa8f246c80f17 to your computer and use it in GitHub Desktop.
Save whoisjeeva/e0363ddd289ebb2faecaa8f246c80f17 to your computer and use it in GitHub Desktop.
Simple HTTP recon scanner script
#!/bin/bash
if [ -z "$1" ]
then
echo "Usage: ./recon.sh <IP>"
exit 1
fi
printf "\n----- NMAP -----\n\n" > results
echo "Running Nmap..."
nmap $1 | tail -n +5 | head -n -3 >> results
while read line
do
if [[ $line == *open* ]] && [[ $line == *http* ]]
then
echo "Running Gobuster..."
gobuster dir -u $1 -w /usr/share/wordlists/dirb/common.txt -qz > temp1
echo "Running WhatWeb..."
whatweb $1 -v > temp2
fi
done < results
if [ -e temp1 ]
then
printf "\n----- DIRS -----\n\n" >> results
cat temp1 >> results
rm temp1
fi
if [ -e temp2 ]
then
printf "\n----- WEB -----\n\n" >> results
cat temp2 >> results
rm temp2
fi
cat results
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment