Codebase list emailharvester / 932ca05
validate domain+instagram+reddit release 1.3.1 validate domain instagram plugin added reddit plugin added validators required maldevel 8 years ago
5 changed file(s) with 164 addition(s) and 6 deletion(s). Raw diff Collapse all Expand all
2727 __copyright__ = "Copyright (c) 2016 @maldevel"
2828 __credits__ = ["maldevel", "PaulSec", "cclauss", "Christian Martorella"]
2929 __license__ = "GPLv3"
30 __version__ = "1.3.0"
30 __version__ = "1.3.1"
3131 __maintainer__ = "maldevel"
3232
3333 ################################
34
3435 import argparse
3536 import sys
3637 import time
3738 import requests
3839 import re
3940 import os
41 import validators
4042
4143 from termcolor import colored
4244 from argparse import RawTextHelpFormatter
4345 from sys import platform as _platform
4446 from urllib.parse import urlparse
47
4548 ################################
49
4650
4751 if _platform == 'win32':
4852 import colorama
172176 return x
173177 raise argparse.ArgumentTypeError("Minimum results limit is 1.")
174178
179 def checkDomain(value):
180 domain_checked = validators.domain(value)
181 if not domain_checked:
182 raise argparse.ArgumentTypeError('Invalid {} domain.'.format(value))
183 return value
184
175185 ###################################################################
176186
177187 if __name__ == '__main__':
191201 formatter_class=RawTextHelpFormatter)
192202
193203 parser.add_argument("-d", '--domain', action="store", metavar='DOMAIN', dest='domain',
194 default=None, type=str, help="Domain to search.")
204 default=None, type=checkDomain, help="Domain to search.")
195205 parser.add_argument("-s", '--save', action="store", metavar='FILE', dest='filename',
196206 default=None, type=str, help="Save the results into a TXT and XML file (both).")
197207
1313 * termcolor
1414 * colorama
1515 * requests
16 * validators
1617
1718
1819 Features
1920 =====
20 * Retrieve Domain email addresses from Search Engines (Google, Bing, Yahoo, ASK, Baidu, Dogpile, Exalead).
21 * Retrieve Domain email addresses from popular Search engines (Google, Bing, Yahoo, ASK, Baidu, Dogpile, Exalead).
2122 * Export results to txt and xml files.
2223 * Limit search results.
2324 * Define your own User-Agent string.
2425 * Use proxy server.
2526 * Plugins system.
26 * Search in popular web sites using Search engines (Twitter, LinkedIn, Google+, Github).
27 * Search in popular web sites using Search engines (Twitter, LinkedIn, Google+, Github, Instagram, Reddit).
2728
2829
2930 Download/Installation
4647 \____/|_| |_| |_| \__,_||_||_| \_| |_/ \__,_||_| \_/ \___||___/ \__|\___||_|
4748
4849 A tool to retrieve Domain email addresses from Search Engines | @maldevel
49 Version: 1.3.0
50 Version: 1.3.1
5051
5152 optional arguments:
5253 -h, --help show this help message and exit
0 """
1 This file is part of EmailHarvester
2 Copyright (C) 2016 @maldevel
3 https://github.com/maldevel/EmailHarvester
4
5 EmailHarvester - A tool to retrieve Domain email addresses from Search Engines.
6
7 This program is free software: you can redistribute it and/or modify
8 it under the terms of the GNU General Public License as published by
9 the Free Software Foundation, either version 3 of the License, or
10 (at your option) any later version.
11
12 This program is distributed in the hope that it will be useful,
13 but WITHOUT ANY WARRANTY; without even the implied warranty of
14 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15 GNU General Public License for more details.
16
17 You should have received a copy of the GNU General Public License
18 along with this program. If not, see <http://www.gnu.org/licenses/>.
19
20 For more see the file 'LICENSE' for copying permission.
21 """
22
23 #config = None
24 app_emailharvester = None
25
26
27 def search(domain, limit):
28 all_emails = []
29 app_emailharvester.show_message("\n[+] Searching in Instagram..\n")
30
31 app_emailharvester.show_message("\n[+] Searching in Yahoo + Instagram..\n")
32 yahooUrl = "http://search.yahoo.com/search?p=site%3Ainstagram.com+%40{word}&n=100&ei=UTF-8&va_vt=any&vo_vt=any&ve_vt=any&vp_vt=any&vd=all&vst=0&vf=all&vm=p&fl=0&fr=yfp-t-152&xargs=0&pstart=1&b={counter}"
33 app_emailharvester.init_search(yahooUrl, domain, limit, 1, 100)
34 app_emailharvester.process()
35 all_emails += app_emailharvester.get_emails()
36
37 app_emailharvester.show_message("\n[+] Searching in Bing + Instagram..\n")
38 bingUrl = "http://www.bing.com/search?q=site%3Ainstagram.com+%40{word}&count=50&first={counter}"
39 app_emailharvester.init_search(bingUrl, domain, limit, 0, 50)
40 app_emailharvester.process()
41 all_emails += app_emailharvester.get_emails()
42
43 app_emailharvester.show_message("\n[+] Searching in Google + Instagram..\n")
44 googleUrl = 'https://www.google.com/search?num=100&start={counter}&hl=en&q=site%3Ainstagram.com+"%40{word}"'
45 app_emailharvester.init_search(googleUrl, domain, limit, 0, 100)
46 app_emailharvester.process()
47 all_emails += app_emailharvester.get_emails()
48
49 app_emailharvester.show_message("\n[+] Searching in Baidu + Instagram..\n")
50 url = 'http://www.baidu.com/search/s?wd=site%3Ainstagram.com+"%40{word}"&pn={counter}'
51 app_emailharvester.init_search(url, domain, limit, 0, 10)
52 app_emailharvester.process()
53 all_emails += app_emailharvester.get_emails()
54
55 app_emailharvester.show_message("\n[+] Searching in Exalead + Instagram..\n")
56 url = "http://www.exalead.com/search/web/results/?q=site%3Ainstagram.com+%40{word}&elements_per_page=10&start_index={counter}"
57 app_emailharvester.init_search(url, domain, limit, 0, 50)
58 app_emailharvester.process()
59 all_emails += app_emailharvester.get_emails()
60
61 #dogpile seems to not support site:
62
63 return all_emails
64
65
66 class Plugin:
67 def __init__(self, app, conf):#
68 global app_emailharvester, config
69 #config = conf
70 app.register_plugin('instagram', {'search': search})
71 app_emailharvester = app
72
0 """
1 This file is part of EmailHarvester
2 Copyright (C) 2016 @maldevel
3 https://github.com/maldevel/EmailHarvester
4
5 EmailHarvester - A tool to retrieve Domain email addresses from Search Engines.
6
7 This program is free software: you can redistribute it and/or modify
8 it under the terms of the GNU General Public License as published by
9 the Free Software Foundation, either version 3 of the License, or
10 (at your option) any later version.
11
12 This program is distributed in the hope that it will be useful,
13 but WITHOUT ANY WARRANTY; without even the implied warranty of
14 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15 GNU General Public License for more details.
16
17 You should have received a copy of the GNU General Public License
18 along with this program. If not, see <http://www.gnu.org/licenses/>.
19
20 For more see the file 'LICENSE' for copying permission.
21 """
22
23 #config = None
24 app_emailharvester = None
25
26
27 def search(domain, limit):
28 all_emails = []
29 app_emailharvester.show_message("\n[+] Searching in Reddit..\n")
30
31 app_emailharvester.show_message("\n[+] Searching in Yahoo + Reddit..\n")
32 yahooUrl = "http://search.yahoo.com/search?p=site%3Areddit.com+%40{word}&n=100&ei=UTF-8&va_vt=any&vo_vt=any&ve_vt=any&vp_vt=any&vd=all&vst=0&vf=all&vm=p&fl=0&fr=yfp-t-152&xargs=0&pstart=1&b={counter}"
33 app_emailharvester.init_search(yahooUrl, domain, limit, 1, 100)
34 app_emailharvester.process()
35 all_emails += app_emailharvester.get_emails()
36
37 app_emailharvester.show_message("\n[+] Searching in Bing + Reddit..\n")
38 bingUrl = "http://www.bing.com/search?q=site%3Areddit.com+%40{word}&count=50&first={counter}"
39 app_emailharvester.init_search(bingUrl, domain, limit, 0, 50)
40 app_emailharvester.process()
41 all_emails += app_emailharvester.get_emails()
42
43 app_emailharvester.show_message("\n[+] Searching in Google + Reddit..\n")
44 googleUrl = 'https://www.google.com/search?num=100&start={counter}&hl=en&q=site%3Areddit.com+"%40{word}"'
45 app_emailharvester.init_search(googleUrl, domain, limit, 0, 100)
46 app_emailharvester.process()
47 all_emails += app_emailharvester.get_emails()
48
49 app_emailharvester.show_message("\n[+] Searching in Baidu + Reddit..\n")
50 url = 'http://www.baidu.com/search/s?wd=site%3Areddit.com+"%40{word}"&pn={counter}'
51 app_emailharvester.init_search(url, domain, limit, 0, 10)
52 app_emailharvester.process()
53 all_emails += app_emailharvester.get_emails()
54
55 app_emailharvester.show_message("\n[+] Searching in Exalead + Reddit..\n")
56 url = "http://www.exalead.com/search/web/results/?q=site%3Areddit.com+%40{word}&elements_per_page=10&start_index={counter}"
57 app_emailharvester.init_search(url, domain, limit, 0, 50)
58 app_emailharvester.process()
59 all_emails += app_emailharvester.get_emails()
60
61 #dogpile seems to not support site:
62
63 return all_emails
64
65
66 class Plugin:
67 def __init__(self, app, conf):#
68 global app_emailharvester, config
69 #config = conf
70 app.register_plugin('reddit', {'search': search})
71 app_emailharvester = app
72
00 termcolor
11 colorama
2 requests
2 requests
3 validators