
Eharvester is simple script which extracts email address from the given domain for penetration testing process.
Eharvester is simple script which extracts email address from the given domain for penetration testing process.
Script works on two modes:
+ In first mode you have to specify sitemap of website ,it is fast.Just visit this URL http://www.xml-sitemaps.com/ & make sitemap of victim website ;download text file of urllist.txt & put it in same directory of script.Now it crawl one by one url from urllist.txt & collect email address.
+ Second mode is automatic ; just supply domain name ; it make sitemap & then gather email address.But it is slow .
With help of esender you can send social engineering emails to all address which are gathered from eharveter.
Usage of script :
1 2 3 4 5 |
git clone https://github.com/MacAwesome/ehs-supermaster chmod +x harvester.sh chmod +x esender.sh ./harvester.sh ./esender.sh |
esender.sh script:
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 |
#!/usr/bin/env bash echo " _____ _ | ____| ___ ___ _ __ __| | ___ _ __ | _| _____ / __|/ _ \ _ \ / _ |/ _ \ __| | |___ |_____| \__ \ __/ | | | (_| | __/ | |_____| |___/\___|_| |_|\__,_|\___|_| " echo " Enter your email Address" read address echo " Enter your password" read -s passsword echo " Enter Subject" read subject echo " Enter message. If you want tot send HTML message enter HTML code start with <html>" read msg cat output.txt | while read f1 echo "Messages are sending" do sendEmail -f $address -t $f1 -u "$subject" -m "$msg" -s smtp.gmail.com:587 -xu "$address" -xp "$passsword" rm f1 done |
harvester.sh script:
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 |
#!/usr/bin/env bash #E-Harvester is simple script to harvest email address for penetration testing. #Script is working in two mode #In first mode you have to create sitemap manually. You can use (http://www.xml-sitemaps.com/) to create sitemap. #and put sitemap text file in working directory of E-HARVESTING.Give name it to urllist.txt #Second mode is automatic just specify domain name & it will first crawl website ;then harvest email address ;But it`s slow due to crawling process. echo " _____ _ _ _ ______ _______ ____ _____ _____ ____ | ____| | | | | / \ | _ \ \ / / ____/ ___|_ _| ____| _ \ | _| _____ | |_| | / _ \ | |_) \ \ / /| _| \___ \ | | | _| | |_) | | |___ |_____| | _ |/ ___ \| _ < \ V / | |___ ___) || | | |___| _ < |_____| |_| |_/_/ \_\_| \_\ \_/ |_____|____/ |_| |_____|_| \_\ " echo "Please choose method" echo " 1. If you have sitemap of website than make name urllist.txt & Put in same directory(work Fast) 2. Generate sitemap than harvest email(Automatic but slow) " read m1 if [ "$m1" = "1" ];then echo " Script is workng,Please be Patient & give some time to harvest it. " cat urllist.txt | while read f1 do w3m $f1 >> f1 perl -wne'while(/[\w\.]+@[\w\.]+/g){print "$&\n"}' f1 | sort -u >> output.txt rm f1 done cat output.txt echo " Harvesting is complete.Open output.txt file to view email address. " fi if [ "$m1" = "2" ];then echo " Please Enter Website To Harvest Email Address For example http://tipstrickshack.blogspot.com " read choice echo " Now we have to make urllist of website.So be Patient & give some time to harvest it. " wget --spider --recursive --no-verbose --output-file=wgetlog.txt "$choice" sed -n "s@.\+ URL:\([^ ]\+\) .\+@\1@p" wgetlog.txt | sed "s@&@\&@" > urllist.txt rm wgetlog.txt cat urllist.txt | while read f1 do w3m $f1 >> f1 perl -wne'while(/[\w\.]+@[\w\.]+/g){print "$&\n"}' f1 | sort -u >> output.txt rm f1 done cat output.txt echo " Harvesting is complete. Open output.txt file to view email address. " echo " Use E-sender to send email to harvested email Address " fi |
Source: https://github.com/MacAwesome