Last active
December 18, 2023 06:24
-
-
Save LuD1161/0a85aef8e27e4a7644fd4b69efb62caa to your computer and use it in GitHub Desktop.
Revisions
-
LuD1161 revised this gist
Oct 3, 2020 . 1 changed file with 2 additions and 1 deletion.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -23,7 +23,8 @@ UNDERLINE='\e[4m' domain=$1 typeOfRecon=$2 cd ~/tools dt=$(date +%F.%H.%M.%S) resultDir=~/tools/results/$domain-$dt echo -e "Results in : ${BOLD}$resultDir${NORMAL}" mkdir -p $resultDir ReconStartTime=$(date +%s) -
LuD1161 revised this gist
Oct 3, 2020 . 1 changed file with 1 addition and 1 deletion.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -214,7 +214,7 @@ curl 'https://exp.host/--/api/v2/push/send' \ --data-binary '[{"to":"'"$expToken"'","title":"Scanning complete For '"$domain"'","body":"'"$link"'"}]' \ --compressed } subfinder_and_amass massdns subjack masscan -
LuD1161 revised this gist
Oct 3, 2020 . 1 changed file with 179 additions and 136 deletions.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -5,6 +5,8 @@ if [ -z "$2" ] echo "2nd Argument not supplied" echo "2nd argument can be basic or advanced,it used for nmap" echo "Usage : ./master_script.sh domain basic|advanced" echo "Also do set your expo token export expToken=xxxx to receive push notification when this gets completed" echo "Get your expo token here : https://play.google.com/store/apps/details?id=com.hackingsimplified.notifyme" exit 1 fi @@ -21,8 +23,7 @@ UNDERLINE='\e[4m' domain=$1 typeOfRecon=$2 cd ~/tools resultDir=~/tools/results/$domain echo -e "Results in : ${BOLD}$resultDir${NORMAL}" mkdir -p $resultDir ReconStartTime=$(date +%s) @@ -50,146 +51,188 @@ check_finished() done echo "" } function subfinder_and_amass(){ ################# SUBFINDER AND AMASS ################################ amassScreen=$domain-amass screen -dmS $amassScreen bash sleep 1 screen -S $amassScreen -X stuff "scripts/amass.sh $domain $resultDir " amassOutput=$domain.amass.txt subfinderScreen=$domain-subfinder screen -dmS $subfinderScreen bash sleep 1 screen -S $subfinderScreen -X stuff "scripts/subfinder.sh $domain $resultDir " subfinderOutput=$domain.subfinder.txt # check whether both subfinder and amass have completed their work # close their screens # then merge them using sort -u STARTTIME=$(date +%s) echo -e "${LIGHT_YELLOW}Checking whether subfinder and amass finished working${NORMAL}" while : ; do sleep 5s # sleep for 5 seconds before again checking if [ -f $resultDir/$subfinderOutput.finished ] && [ -f $resultDir/$amassOutput.finished ]; then rm $resultDir/$subfinderOutput.finished rm $resultDir/$amassOutput.finished # kill both screens screen -X -S $subfinderScreen quit screen -X -S $amassScreen quit # Put sorted results of both in one file sort -u $resultDir/$subfinderOutput $resultDir/$amassOutput > $resultDir/$domain.amass_subfinder.txt echo -en "\rTime elapsed : $totalTime seconds" break; fi ENDTIME=$(date +%s) totalTime=$(( $ENDTIME-$STARTTIME )) echo -en "\rTime elapsed : ${BLINK}${LIGHT_GREEN}$totalTime${NORMAL} seconds" done echo "" echo -e "${LIGHT_GREEN}Done amass and subfinder${NORMAL}" ################# SUBFINDER AND AMASS COMPLETE ####################### } function massdns(){ ############################ MASSDNS #################################### echo -e "${LIGHT_YELLOW}Now doing massdns on the domain${NORMAL}" massdns_ip_screen=$domain-massdns screen -dmS $massdns_ip_screen bash sleep 1 screen -S $domain-massdns -X stuff "scripts/massdns_ip.sh $domain $resultDir " # Do masscanning only when massdns is finished working massdnsOutput=$domain.massdns_ip check_finished "massdns_ip" $massdnsOutput $massdns_ip_screen echo -e "${LIGHT_GREEN}Massdns complete${NORMAL}" ############################ MASSDNS COMPLETE ########################### } function subjack(){ ################# SUBJACK ########################################## subjack_screen=$domain-subjack subjackOutput=$domain.subjack screen -dmS $subjack_screen bash sleep 1 screen -S $subjack_screen -X stuff "scripts/subjack.sh $domain $resultDir " check_finished "subjack" $subjackOutput $subjack_screen echo -e "${LIGHT_GREEN}Done subjack${NORMAL}" ################# SUBJACK COMPLETE ################################# } function masscan(){ ############################ MASSCAN #################################### echo -e "${LIGHT_YELLOW}Now doing masscan on all the obtained ip addreses from massdns${NORMAL}" masscan_ip_screen=$domain-masscan-ips screen -dmS $masscan_ip_screen bash sleep 1 screen -S $masscan_ip_screen -X stuff "scripts/masscan.sh $resultDir/$domain.massdns_ip.ips.txt $domain $resultDir " masscanOutput=$domain.masscan check_finished "masscan-ip" $masscanOutput $masscan_ip_screen echo -e "${LIGHT_GREEN}Masscan complete${NORMAL}" ################# MASSCAN COMPLETE #################################### } function nmap_sorted(){ ################# NMAP SORTED FILE PYTHON ############################# echo -e "${LIGHT_YELLOW}Running python ~/tools/nmap-input-file-creator.py to create nmap suitable file${NORMAL}" python ~/tools/nmap-input-file-creator.py $resultDir/$domain.masscan-sorted.txt $resultDir/$domain.nmap-sorted.txt if [ $? -eq 0 ]; then echo -e "${LIGHT_YELLOW}Nmap input file created successfully${NORMAL}" else exit 1 fi nmapFile=$resultDir/$domain.nmap-sorted.txt ################# NMAP SORTED FILE PYTHON COMPLETE ################### } function nmap(){ ################# NMAP ############################################### nmapOutput=$domain.nmap nmapScreen=$domain-nmap screen -dmS $nmapScreen bash sleep 1 screen -S $nmapScreen -X stuff "scripts/nmap.sh $nmapFile $resultDir $domain $typeOfRecon " check_finished "nmap" $nmapOutput $nmapScreen ################# NMAP COMPLETE ###################################### } function searchsploit(){ ################# SEARCHSPLOIT ############################################### searchsploitOutput=$domain.searchsploit searchsploitScreen=$domain-searchsploit screen -dmS $searchsploitScreen bash sleep 1 screen -S $searchsploitScreen -X stuff "scripts/searchsploit.sh $domain $resultDir $typeOfRecon " check_finished "searchsploit" $searchsploitOutput $searchsploitScreen ################# SEARCHSPLOIT COMPLETE ###################################### } function aquatone(){ ################# AQUATONE ######################################### # # Run aquatone on only valid domains found using massdns # aquatone_screen=$domain-aquatone aquatoneOutput=$domain.aquatone screen -dmS $aquatone_screen bash sleep 1 screen -S $aquatone_screen -X stuff "scripts/aquatone.sh $domain $resultDir $typeOfRecon " check_finished "aquatone" $aquatoneOutput $aquatone_screen echo -e "${LIGHT_GREEN}Done aquatone${NORMAL}" ################# AQUATONE COMPLETE ################################ } function send_push_notification(){ curl 'https://exp.host/--/api/v2/push/send' \ -H 'authority: exp.host' \ -H 'accept: application/json' \ -H 'user-agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10_14_5) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/85.0.4183.121 Safari/537.36' \ -H 'content-type: application/json' \ -H 'origin: https://expo.io' \ -H 'sec-fetch-site: cross-site' \ -H 'sec-fetch-mode: cors' \ -H 'sec-fetch-dest: empty' \ -H 'referer: https://expo.io/' \ -H 'accept-language: en-GB,en-US;q=0.9,en;q=0.8' \ --data-binary '[{"to":"'"$expToken"'","title":"Scanning complete For '"$domain"'","body":"'"$link"'"}]' \ --compressed } # subfinder_and_amass massdns subjack masscan nmap_sorted nmap searchsploit aquatone ReconEndTime=$(date +%s) link=http://$(curl ifconfig.co)/$domain.zip if [ -z "expToken" ]; then send_push_notification else echo "expToken not set, no Push notificatons for you :p" fi echo -e "${BOLD}${LIGHT_GREEN}Reconnaissance finished${NORMAL}" echo -e "Results in : ${LIGHT_GREEN}$resultDir${NORMAL}" cd $resultDir && zip "/var/www/html/$domain.zip" -r . echo -e "${LIGHT_GREEN}" && tree $resultDir && echo -en "${NORMAL}" echo -e "Download your zip from : ${BOLD}${LIGHT_GREEN}${UNDERLINE}$link${NORMAL}" echo -e "Total Time taken : ${LIGHT_GREEN} $(( $ReconEndTime-$ReconStartTime )) ${NORMAL}seconds" -
LuD1161 revised this gist
May 29, 2019 . 1 changed file with 1 addition and 1 deletion.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -164,7 +164,7 @@ searchsploitOutput=$domain.searchsploit searchsploitScreen=$domain-searchsploit screen -dmS $searchsploitScreen bash sleep 1 screen -S $searchsploitScreen -X stuff "scripts/searchsploit.sh $domain $resultDir $typeOfRecon " check_finished "searchsploit" $searchsploitOutput $searchsploitScreen ################# SEARCHSPLOIT COMPLETE ###################################### -
LuD1161 revised this gist
Feb 6, 2019 . 1 changed file with 11 additions and 0 deletions.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -159,6 +159,17 @@ screen -S $nmapScreen -X stuff "scripts/nmap.sh $nmapFile $resultDir $domain $ty check_finished "nmap" $nmapOutput $nmapScreen ################# NMAP COMPLETE ###################################### ################# SEARCHSPLOIT ############################################### searchsploitOutput=$domain.searchsploit searchsploitScreen=$domain-searchsploit screen -dmS $searchsploitScreen bash sleep 1 screen -S $searchsploitScreen -X stuff "scripts/searchsploit.sh $searchsploitFile $resultDir $domain $typeOfRecon " check_finished "searchsploit" $searchsploitOutput $searchsploitScreen ################# SEARCHSPLOIT COMPLETE ###################################### ################# AQUATONE ######################################### # # Run aquatone on only valid domains found using massdns -
LuD1161 revised this gist
Jan 13, 2019 . No changes.There are no files selected for viewing
-
LuD1161 revised this gist
Jan 13, 2019 . 1 changed file with 26 additions and 13 deletions.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -111,21 +111,18 @@ check_finished "massdns_ip" $massdnsOutput $massdns_ip_screen echo -e "${LIGHT_GREEN}Massdns complete${NORMAL}" ############################ MASSDNS COMPLETE ########################### ################# SUBJACK ########################################## subjack_screen=$domain-subjack subjackOutput=$domain.subjack screen -dmS $subjack_screen bash sleep 1 screen -S $subjack_screen -X stuff "scripts/subjack.sh $domain $resultDir " check_finished "subjack" $subjackOutput $subjack_screen echo -e "${LIGHT_GREEN}Done subjack${NORMAL}" ################# SUBJACK COMPLETE ################################# ############################ MASSCAN #################################### echo -e "${LIGHT_YELLOW}Now doing masscan on all the obtained ip addreses from massdns${NORMAL}" @@ -143,13 +140,13 @@ echo -e "${LIGHT_GREEN}Masscan complete${NORMAL}" ################# NMAP SORTED FILE PYTHON ############################# echo -e "${LIGHT_YELLOW}Running python ~/tools/nmap-input-file-creator.py to create nmap suitable file${NORMAL}" python ~/tools/nmap-input-file-creator.py $resultDir/$domain.masscan-sorted.txt $resultDir/$domain.nmap-sorted.txt if [ $? -eq 0 ]; then echo -e "${LIGHT_YELLOW}Nmap input file created successfully${NORMAL}" else exit 1 fi nmapFile=$resultDir/$domain.nmap-sorted.txt ################# NMAP SORTED FILE PYTHON COMPLETE ################### ################# NMAP ############################################### @@ -161,6 +158,22 @@ screen -S $nmapScreen -X stuff "scripts/nmap.sh $nmapFile $resultDir $domain $ty " check_finished "nmap" $nmapOutput $nmapScreen ################# NMAP COMPLETE ###################################### ################# AQUATONE ######################################### # # Run aquatone on only valid domains found using massdns # aquatone_screen=$domain-aquatone aquatoneOutput=$domain.aquatone screen -dmS $aquatone_screen bash sleep 1 screen -S $aquatone_screen -X stuff "scripts/aquatone.sh $domain $resultDir $typeOfRecon " check_finished "aquatone" $aquatoneOutput $aquatone_screen echo -e "${LIGHT_GREEN}Done aquatone${NORMAL}" ################# AQUATONE COMPLETE ################################ ReconEndTime=$(date +%s) echo -e "${BOLD}${LIGHT_GREEN}Reconnaissance finished${NORMAL}" -
LuD1161 revised this gist
Dec 20, 2018 . 1 changed file with 4 additions and 0 deletions.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -101,6 +101,7 @@ echo -e "${LIGHT_YELLOW}Now doing massdns on the domain${NORMAL}" massdns_ip_screen=$domain-massdns screen -dmS $massdns_ip_screen bash sleep 1 screen -S $domain-massdns -X stuff "scripts/massdns_ip.sh $domain $resultDir " # Do masscanning only when massdns is finished working @@ -118,6 +119,7 @@ eyewitness_screen=$domain-eyewitness eyewitnessOutput=$domain.eyewitness screen -dmS $eyewitness_screen bash sleep 1 screen -S $eyewitness_screen -X stuff "scripts/eyewitness.sh $domain $resultDir " check_finished "EyeWitness" $eyewitnessOutput $eyewitness_screen @@ -130,6 +132,7 @@ echo -e "${LIGHT_YELLOW}Now doing masscan on all the obtained ip addreses from m masscan_ip_screen=$domain-masscan-ips screen -dmS $masscan_ip_screen bash sleep 1 screen -S $masscan_ip_screen -X stuff "scripts/masscan.sh $resultDir/$domain.massdns_ip.ips.txt $domain $resultDir " @@ -153,6 +156,7 @@ nmapFile=$resultDir/$domain-nmap-sorted.txt nmapOutput=$domain.nmap nmapScreen=$domain-nmap screen -dmS $nmapScreen bash sleep 1 screen -S $nmapScreen -X stuff "scripts/nmap.sh $nmapFile $resultDir $domain $typeOfRecon " check_finished "nmap" $nmapOutput $nmapScreen -
LuD1161 revised this gist
Aug 24, 2018 . 1 changed file with 1 addition and 1 deletion.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -162,6 +162,6 @@ ReconEndTime=$(date +%s) echo -e "${BOLD}${LIGHT_GREEN}Reconnaissance finished${NORMAL}" echo -e "Results in : ${LIGHT_GREEN}$resultDir${NORMAL}" cd $resultDir && zip "/var/www/html/$domain.zip" -r . echo -e "${LIGHT_GREEN}" && tree $resultDir && echo -en "${NORMAL}" echo -e "Download your zip from : ${BOLD}${LIGHT_GREEN}${UNDERLINE}http://$(curl ifconfig.co)/$domain.zip${NORMAL}" echo -e "Total Time taken : ${LIGHT_GREEN} $(( $ReconEndTime-$ReconStartTime )) ${NORMAL}seconds" -
LuD1161 revised this gist
Jul 23, 2018 . 1 changed file with 16 additions and 13 deletions.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -96,18 +96,6 @@ echo -e "${LIGHT_GREEN}Done amass and subfinder${NORMAL}" ################# SUBFINDER AND AMASS COMPLETE ####################### ############################ MASSDNS #################################### echo -e "${LIGHT_YELLOW}Now doing massdns on the domain${NORMAL}" @@ -122,6 +110,21 @@ check_finished "massdns_ip" $massdnsOutput $massdns_ip_screen echo -e "${LIGHT_GREEN}Massdns complete${NORMAL}" ############################ MASSDNS COMPLETE ########################### ################# EYEWITNESS ######################################### # # Run eyewitness on only valid domains found using massdns # eyewitness_screen=$domain-eyewitness eyewitnessOutput=$domain.eyewitness screen -dmS $eyewitness_screen bash screen -S $eyewitness_screen -X stuff "scripts/eyewitness.sh $domain $resultDir " check_finished "EyeWitness" $eyewitnessOutput $eyewitness_screen echo -e "${LIGHT_GREEN}Done EyeWitness${NORMAL}" ################# EYEWITNESS COMPLETE ################################ ############################ MASSCAN #################################### echo -e "${LIGHT_YELLOW}Now doing masscan on all the obtained ip addreses from massdns${NORMAL}" @@ -159,6 +162,6 @@ ReconEndTime=$(date +%s) echo -e "${BOLD}${LIGHT_GREEN}Reconnaissance finished${NORMAL}" echo -e "Results in : ${LIGHT_GREEN}$resultDir${NORMAL}" cd $resultDir && zip "/var/www/html/$domain.zip" -r . echo -e "${LIGHT_GREEN}" && tree $resultDir echo -en "${NORMAL}" echo -e "Download your zip from : ${BOLD}${LIGHT_GREEN}${UNDERLINE}http://$(curl ifconfig.co)/$domain.zip${NORMAL}" echo -e "Total Time taken : ${LIGHT_GREEN} $(( $ReconEndTime-$ReconStartTime )) ${NORMAL}seconds" -
LuD1161 revised this gist
Jul 22, 2018 . 1 changed file with 1 addition and 1 deletion.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -159,6 +159,6 @@ ReconEndTime=$(date +%s) echo -e "${BOLD}${LIGHT_GREEN}Reconnaissance finished${NORMAL}" echo -e "Results in : ${LIGHT_GREEN}$resultDir${NORMAL}" cd $resultDir && zip "/var/www/html/$domain.zip" -r . echo -e "${LIGHT_GREEN}" && tree $resultDir && echo -en "${NORMAL}" echo -e "Download your zip from : ${BOLD}${LIGHT_GREEN}${UNDERLINE}http://$(curl ifconfig.co)/$domain.zip${NORMAL}" echo -e "Total Time taken : ${LIGHT_GREEN} $(( $ReconEndTime-$ReconStartTime )) ${NORMAL}seconds" -
LuD1161 revised this gist
Jul 20, 2018 . 1 changed file with 1 addition and 1 deletion.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -159,6 +159,6 @@ ReconEndTime=$(date +%s) echo -e "${BOLD}${LIGHT_GREEN}Reconnaissance finished${NORMAL}" echo -e "Results in : ${LIGHT_GREEN}$resultDir${NORMAL}" cd $resultDir && zip "/var/www/html/$domain.zip" -r . echo -e "${LIGHT_GREEN}" && tree $resultDir echo -en "${NORMAL}" echo -e "Download your zip from : ${BOLD}${LIGHT_GREEN}${UNDERLINE}http://$(curl ifconfig.co)/$domain.zip${NORMAL}" echo -e "Total Time taken : ${LIGHT_GREEN} $(( $ReconEndTime-$ReconStartTime )) ${NORMAL}seconds" -
LuD1161 revised this gist
Jul 20, 2018 . 1 changed file with 3 additions and 3 deletions.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -158,7 +158,7 @@ ReconEndTime=$(date +%s) echo -e "${BOLD}${LIGHT_GREEN}Reconnaissance finished${NORMAL}" echo -e "Results in : ${LIGHT_GREEN}$resultDir${NORMAL}" cd $resultDir && zip "/var/www/html/$domain.zip" -r . echo -e "${LIGHT_GREEN}" && tree $resultDir${NORMAL}" echo -e "Download your zip from : ${BOLD}${LIGHT_GREEN}${UNDERLINE}http://$(curl ifconfig.co)/$domain.zip${NORMAL}" echo -e "Total Time taken : ${LIGHT_GREEN} $(( $ReconEndTime-$ReconStartTime )) ${NORMAL}seconds" -
LuD1161 revised this gist
Jul 19, 2018 . 1 changed file with 20 additions and 11 deletions.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -23,7 +23,7 @@ typeOfRecon=$2 cd ~/tools dt=$(date +%F.%H.%M.%S) resultDir=~/tools/results/$domain-$dt echo -e "Results in : ${BOLD}$resultDir${NORMAL}" mkdir -p $resultDir ReconStartTime=$(date +%s) check_finished() @@ -46,7 +46,7 @@ check_finished() fi ENDTIME=$(date +%s) totalTime=$(( $ENDTIME-$STARTTIME )) echo -en "\rTime elapsed : ${BLINK}${LIGHT_GREEN}$totalTime${NORMAL} seconds" done echo "" } @@ -55,14 +55,14 @@ check_finished() amassScreen=$domain-amass screen -dmS $amassScreen bash sleep 1 screen -S $amassScreen -X stuff "scripts/amass.sh $domain $resultDir " amassOutput=$domain.amass.txt subfinderScreen=$domain-subfinder screen -dmS $subfinderScreen bash sleep 1 screen -S $subfinderScreen -X stuff "scripts/subfinder.sh $domain $resultDir " subfinderOutput=$domain.subfinder.txt # check whether both subfinder and amass have completed their work @@ -88,17 +88,23 @@ do fi ENDTIME=$(date +%s) totalTime=$(( $ENDTIME-$STARTTIME )) echo -en "\rTime elapsed : ${BLINK}${LIGHT_GREEN}$totalTime${NORMAL} seconds" done echo "" echo -e "${LIGHT_GREEN}Done amass and subfinder${NORMAL}" ################# SUBFINDER AND AMASS COMPLETE ####################### ################# EYEWITNESS ######################################### eyewitness_screen=$domain-eyewitness eyewitnessOutput=$domain.eyewitness screen -dmS $eyewitness_screen bash screen -S $eyewitness_screen -X stuff "scripts/eyewitness.sh $domain $resultDir " check_finished "EyeWitness" $eyewitnessOutput $eyewitness_screen echo -e "${LIGHT_GREEN}Done EyeWitness${NORMAL}" ################# EYEWITNESS COMPLETE ################################ @@ -107,7 +113,7 @@ echo -e "${LIGHT_YELLOW}Now doing massdns on the domain${NORMAL}" massdns_ip_screen=$domain-massdns screen -dmS $massdns_ip_screen bash screen -S $domain-massdns -X stuff "scripts/massdns_ip.sh $domain $resultDir " # Do masscanning only when massdns is finished working massdnsOutput=$domain.massdns_ip @@ -121,7 +127,7 @@ echo -e "${LIGHT_YELLOW}Now doing masscan on all the obtained ip addreses from m masscan_ip_screen=$domain-masscan-ips screen -dmS $masscan_ip_screen bash screen -S $masscan_ip_screen -X stuff "scripts/masscan.sh $resultDir/$domain.massdns_ip.ips.txt $domain $resultDir " masscanOutput=$domain.masscan @@ -144,7 +150,7 @@ nmapFile=$resultDir/$domain-nmap-sorted.txt nmapOutput=$domain.nmap nmapScreen=$domain-nmap screen -dmS $nmapScreen bash screen -S $nmapScreen -X stuff "scripts/nmap.sh $nmapFile $resultDir $domain $typeOfRecon " check_finished "nmap" $nmapOutput $nmapScreen ################# NMAP COMPLETE ###################################### @@ -153,3 +159,6 @@ ReconEndTime=$(date +%s) echo -e "${BOLD}${LIGHT_GREEN}Reconnaissance finished${NORMAL}" echo -e "Results in : ${LIGHT_GREEN}$resultDir${NORMAL}" echo -e "Total Time taken : ${LIGHT_GREEN} $(( $ReconEndTime-$ReconStartTime )) ${NORMAL}seconds" cd $resultDir && zip "/var/www/html/$domain.zip" -r . echo "Download your zip from : ${BOLD}${LIGHT_GREEN}${UNDERLINE}http://$(curl ifconfig.co)/$domain.zip${NORMAL}" tree $resultDir -
LuD1161 revised this gist
Jul 19, 2018 . 1 changed file with 43 additions and 18 deletions.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -1,24 +1,38 @@ #!/bin/bash if [ -z "$2" ] then echo "2nd Argument not supplied" echo "2nd argument can be basic or advanced,it used for nmap" echo "Usage : ./master_script.sh domain basic|advanced" exit 1 fi #### COLORS #### ( Taken from : https://misc.flogisoft.com/bash/tip_colors_and_formatting ) NORMAL='\e[0m' RED='\e[31m' LIGHT_GREEN='\e[92m' LIGHT_YELLOW='\e[93m' BLINK='\e[5m' BOLD='\e[1m' UNDERLINE='\e[4m' ############### domain=$1 typeOfRecon=$2 cd ~/tools dt=$(date +%F.%H.%M.%S) resultDir=~/tools/results/$domain-$dt echo -e "Results in : ${BOLD}${UNDERLINE}$resultDir${NORMAL}" mkdir -p $resultDir ReconStartTime=$(date +%s) check_finished() { tool=$1 # tools="subfinder" toolOutput=$2 # toolOutput="subfinderOutput" toolScreen=$3 # toolScreen="subfinderScreen" echo -e "${LIGHT_YELLOW}Checking whether "$tool" finished working${NORMAL}" STARTTIME=$(date +%s) while : ; do sleep 5s # sleep for 5 seconds before again checking @@ -27,11 +41,14 @@ check_finished rm $resultDir/$toolOutput.finished # kill screen screen -X -S $toolScreen quit echo -en "\rTime elapsed : $totalTime seconds" break; fi ENDTIME=$(date +%s) totalTime=$(( $ENDTIME-$STARTTIME )) echo -en "\rTime elapsed : ${BLINK}$totalTime${NORMAL} seconds" done echo "" } ################# SUBFINDER AND AMASS ################################ @@ -53,7 +70,7 @@ subfinderOutput=$domain.subfinder.txt # then merge them using sort -u STARTTIME=$(date +%s) echo -e "${LIGHT_YELLOW}Checking whether subfinder and amass finished working${NORMAL}" while : ; do sleep 5s # sleep for 5 seconds before again checking @@ -66,13 +83,16 @@ do # Put sorted results of both in one file sort -u $resultDir/$subfinderOutput $resultDir/$amassOutput > $resultDir/$domain.amass_subfinder.txt echo -en "\rTime elapsed : $totalTime seconds" break; fi ENDTIME=$(date +%s) totalTime=$(( $ENDTIME-$STARTTIME )) echo -en "\rTime elapsed : ${BLINK}$totalTime${NORMAL} seconds" done echo "" echo -e "${LIGHT_GREEN}Done amass and subfinder${NORMAL}" ################# SUBFINDER AND AMASS COMPLETE ####################### ################# EYEWITNESS ######################################### @@ -83,7 +103,7 @@ echo "Done amass and subfinder" ################# EYEWITNESS COMPLETE ################################ ############################ MASSDNS #################################### echo -e "${LIGHT_YELLOW}Now doing massdns on the domain${NORMAL}" massdns_ip_screen=$domain-massdns screen -dmS $massdns_ip_screen bash @@ -93,11 +113,11 @@ screen -S $domain-massdns -X stuff "massdns_ip/massdns_ip.sh $domain $resultDir massdnsOutput=$domain.massdns_ip check_finished "massdns_ip" $massdnsOutput $massdns_ip_screen echo -e "${LIGHT_GREEN}Massdns complete${NORMAL}" ############################ MASSDNS COMPLETE ########################### ############################ MASSCAN #################################### echo -e "${LIGHT_YELLOW}Now doing masscan on all the obtained ip addreses from massdns${NORMAL}" masscan_ip_screen=$domain-masscan-ips screen -dmS $masscan_ip_screen bash @@ -106,14 +126,14 @@ screen -S $masscan_ip_screen -X stuff "masscan/masscan.sh $resultDir/$domain.mas masscanOutput=$domain.masscan check_finished "masscan-ip" $masscanOutput $masscan_ip_screen echo -e "${LIGHT_GREEN}Masscan complete${NORMAL}" ################# MASSCAN COMPLETE #################################### ################# NMAP SORTED FILE PYTHON ############################# echo -e "${LIGHT_YELLOW}Running python ~/tools/nmap-input-file-creator.py to create nmap suitable file${NORMAL}" python ~/tools/nmap-input-file-creator.py $resultDir/$domain-masscan-sorted.txt $resultDir/$domain-nmap-sorted.txt if [ $? -eq 0 ]; then echo -e "${LIGHT_YELLOW}Nmap input file created successfully${NORMAL}" else exit 1 fi @@ -124,7 +144,12 @@ nmapFile=$resultDir/$domain-nmap-sorted.txt nmapOutput=$domain.nmap nmapScreen=$domain-nmap screen -dmS $nmapScreen bash screen -S $nmapScreen -X stuff "nmap/nmap.sh $nmapFile $resultDir $domain $typeOfRecon " check_finished "nmap" $nmapOutput $nmapScreen ################# NMAP COMPLETE ###################################### ReconEndTime=$(date +%s) echo -e "${BOLD}${LIGHT_GREEN}Reconnaissance finished${NORMAL}" echo -e "Results in : ${LIGHT_GREEN}$resultDir${NORMAL}" echo -e "Total Time taken : ${LIGHT_GREEN} $(( $ReconEndTime-$ReconStartTime )) ${NORMAL}seconds" -
LuD1161 revised this gist
Jul 19, 2018 . 1 changed file with 64 additions and 20 deletions.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -13,6 +13,28 @@ resultDir=~/tools/results/$domain-$dt echo $resultDir mkdir -p $resultDir check_finished { tool=$1 # tools="subfinder" toolOutput=$2 # toolOutput="subfinderOutput" toolScreen=$3 # toolScreen="subfinderScreen" echo "Checking whether "$tool" finished working" while : ; do sleep 5s # sleep for 5 seconds before again checking if [ -f $resultDir/$toolOutput.finished ]; then # Delete flag file rm $resultDir/$toolOutput.finished # kill screen screen -X -S $toolScreen quit break; fi ENDTIME=$(date +%s) echo "Time elaspsed : "$(( $ENDTIME-$STARTTIME )) done } ################# SUBFINDER AND AMASS ################################ amassScreen=$domain-amass screen -dmS $amassScreen bash sleep 1 @@ -51,36 +73,58 @@ do done echo "Done amass and subfinder" ################# SUBFINDER AND AMASS COMPLETE ####################### ################# EYEWITNESS ######################################### #screen -dmS $domain-eyewitness bash #screen -S $domain-eyewitness -X stuff "cat $resultDir/$domain.massdns_ip.out.txt |xargs -L1 masscan/masscan.sh $domain $resultDir #" ################# EYEWITNESS COMPLETE ################################ ############################ MASSDNS #################################### echo "Now doing massdns on the doamin" massdns_ip_screen=$domain-massdns screen -dmS $massdns_ip_screen bash screen -S $domain-massdns -X stuff "massdns_ip/massdns_ip.sh $domain $resultDir " # Do masscanning only when massdns is finished working massdnsOutput=$domain.massdns_ip check_finished "massdns_ip" $massdnsOutput $massdns_ip_screen echo "Massdns complete" ############################ MASSDNS COMPLETE ########################### ############################ MASSCAN #################################### echo "Now doing masscan on all the obtained ip addreses from massdns" masscan_ip_screen=$domain-masscan-ips screen -dmS $masscan_ip_screen bash screen -S $masscan_ip_screen -X stuff "masscan/masscan.sh $resultDir/$domain.massdns_ip.ips.txt $domain $resultDir " masscanOutput=$domain.masscan check_finished "masscan-ip" $masscanOutput $masscan_ip_screen echo "Masscan complete" ################# MASSCAN COMPLETE #################################### ################# NMAP SORTED FILE PYTHON ############################# echo "Running python ~/tools/nmap-input-file-creator.py to create nmap suitable file" python ~/tools/nmap-input-file-creator.py $resultDir/$domain-masscan-sorted.txt $resultDir/$domain-nmap-sorted.txt if [ $? -eq 0 ]; then echo "Nmap input file created successfully" else exit 1 fi nmapFile=$resultDir/$domain-nmap-sorted.txt ################# NMAP SORTED FILE PYTHON COMPLETE ################### ################# NMAP ############################################### nmapOutput=$domain.nmap nmapScreen=$domain-nmap screen -dmS $nmapScreen bash screen -S $nmapScreen -X stuff "nmap/nmap.sh $nmapFile $resultDir $domain " check_finished "nmap" $nmapOutput $nmapScreen ################# NMAP COMPLETE ###################################### -
LuD1161 revised this gist
Jul 7, 2018 . 1 changed file with 33 additions and 4 deletions.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -15,13 +15,15 @@ mkdir -p $resultDir amassScreen=$domain-amass screen -dmS $amassScreen bash sleep 1 screen -S $amassScreen -X stuff "amass/amass.sh $domain $resultDir " amassOutput=$domain.amass.txt subfinderScreen=$domain-subfinder screen -dmS $subfinderScreen bash sleep 1 screen -S $subfinderScreen -X stuff "subfinder/subfinder.sh $domain $resultDir " subfinderOutput=$domain.subfinder.txt # check whether both subfinder and amass have completed their work @@ -48,10 +50,37 @@ do echo "Time elaspsed : "$(( $ENDTIME-$STARTTIME )) done echo "Done amass and subfinder" echo "Now doing massdns on the doamin" massdns_ip_screen=$domain-massdns screen -dmS $massdns_ip_screen bash screen -S $domain-massdns -X stuff "massdns_ip/massdns_ip.sh $domain $resultDir " # Do masscanning only when massdns is finished working massdnsOutput=$domain.massdns_ips STARTTIME=$(date +%s) echo "Checking whether massdns_ip has finished working" while : ; do sleep 5s # sleep for 5 seconds before again checking if [ -f $resultDir/$massdnsOutput.finished ] ; then rm $resultDir/$massdnsOutput.finished # kill the screen screen -X -S $massdns_ip_screen quit break; fi ENDTIME=$(date +%s) echo "Time elaspsed : "$(( $ENDTIME-$STARTTIME )) done echo "Massdns complete" echo "Now doing masscan on all the obtained ip addreses from massdns" screen -dmS $domain-ips bash screen -S $domain-ips -X stuff "cat $resultDir/$domain.massdns_ip.ips.txt |xargs -L1 masscan/masscan.sh $domain $resultDir " screen -dmS $domain-out bash screen -S $domain-out -X stuff "cat $resultDir/$domain.massdns_ip.out.txt |xargs -L1 masscan/masscan.sh $domain $resultDir " -
LuD1161 created this gist
Jul 7, 2018 .There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -0,0 +1,57 @@ #!/bin/bash if [ -z "$1" ] then echo "No argument supplied" exit fi domain=$1 cd ~/tools dt=$(date +%F.%H.%M.%S) resultDir=~/tools/results/$domain-$dt echo $resultDir mkdir -p $resultDir amassScreen=$domain-amass screen -dmS $amassScreen bash screen -S $amassScreen -X stuff "cd amass && ./amass.sh $domain $resultDir " amassOutput=$domain.amass.txt subfinderScreen=$domain-subfinder screen -dmS $subfinderScreen bash screen -S $subfinderScreen -X stuff "cd subfinder && ./subfinder.sh $domain $resultDir " subfinderOutput=$domain.subfinder.txt # check whether both subfinder and amass have completed their work # close their screens # then merge them using sort -u STARTTIME=$(date +%s) echo "Checking whether subfinder and amass finished working" while : ; do sleep 5s # sleep for 5 seconds before again checking if [ -f $resultDir/$subfinderOutput.finished ] && [ -f $resultDir/$amassOutput.finished ]; then rm $resultDir/$subfinderOutput.finished rm $resultDir/$amassOutput.finished # kill both screens screen -X -S $subfinderScreen quit screen -X -S $amassScreen quit # Put sorted results of both in one file sort -u $resultDir/$subfinderOutput $resultDir/$amassOutput > $resultDir/$domain.amass_subfinder.txt break; fi ENDTIME=$(date +%s) echo "Time elaspsed : "$(( $ENDTIME-$STARTTIME )) done screen -dmS $domain-ips bash screen -S $domain-ips -X stuff "cat $resultDir/$domain.ips.txt |xargs -L1 masscan/masscan.sh $domain $resultDir " screen -dmS $domain-out bash screen -S $domain-out -X stuff "cat $resultDir/$domain.out.txt |xargs -L1 masscan/masscan.sh $domain $resultDir "