Skip to content

Commit 7a0c4f5

Browse files
committed
noprint option
option added for not printing discovered emails on terminal
1 parent a96f2a5 commit 7a0c4f5

File tree

2 files changed

+12
-7
lines changed

2 files changed

+12
-7
lines changed

EmailHarvester.py

Lines changed: 7 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@
2828
__copyright__ = "Copyright (c) 2016 @maldevel"
2929
__credits__ = ["maldevel", "cclauss", "Christian Martorella"]
3030
__license__ = "GPLv3"
31-
__version__ = "1.1.5"
31+
__version__ = "1.1.6"
3232
__maintainer__ = "maldevel"
3333

3434

@@ -214,7 +214,9 @@ def yahoo(domain, limit, userAgent, proxy):
214214
parser.add_argument("-l", '--limit', metavar='LIMIT', dest='limit', type=limit_type, default=100, help="Limit the number of results.")
215215
parser.add_argument('-u', '--user-agent', metavar='USER-AGENT', dest='uagent', type=str, help="Set the User-Agent request header.")
216216
parser.add_argument('-x', '--proxy', metavar='PROXY', dest='proxy', type=checkProxyUrl, help='Setup proxy server (example: http://127.0.0.1:8080)')
217-
217+
parser.add_argument('--noprint', action='store_true', help='EmailHarvester will print discovered emails to terminal. It is possible to tell EmailHarvester not to print results to terminal with this option.')
218+
219+
218220
if len(sys.argv) is 1:
219221
parser.print_help()
220222
sys.exit()
@@ -261,8 +263,9 @@ def yahoo(domain, limit, userAgent, proxy):
261263
print(green(msg))
262264
print(green("-" * len(msg)))
263265

264-
for emails in all_emails:
265-
print(emails)
266+
if not args.noprint:
267+
for emails in all_emails:
268+
print(emails)
266269

267270
if filename:
268271
try:

README.md

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@ Usage
3535
=====
3636
```
3737
usage: EmailHarvester.py [-h] [-d DOMAIN] [-s FILE] [-e ENGINE] [-l LIMIT]
38-
[-u USER-AGENT] [-x PROXY]
38+
[-u USER-AGENT] [-x PROXY] [--noprint]
3939
4040
_____ _ _ _ _ _
4141
| ___| (_)| | | | | | | |
@@ -45,13 +45,13 @@ usage: EmailHarvester.py [-h] [-d DOMAIN] [-s FILE] [-e ENGINE] [-l LIMIT]
4545
\____/|_| |_| |_| \__,_||_||_| \_| |_/ \__,_||_| \_/ \___||___/ \__|\___||_|
4646
4747
A tool to retrieve Domain email addresses from Search Engines | @maldevel
48-
Version: 1.1.5
48+
Version: 1.1.6
4949
5050
optional arguments:
5151
-h, --help show this help message and exit
5252
-d DOMAIN, --domain DOMAIN
5353
Domain to search.
54-
-s FILE, --save FILE Save the results into a TXT and XML file.
54+
-s FILE, --save FILE Save the results into a TXT and XML file (both).
5555
-e ENGINE, --engine ENGINE
5656
Select search engine(google, bing, yahoo, ask, all).
5757
-l LIMIT, --limit LIMIT
@@ -60,6 +60,8 @@ optional arguments:
6060
Set the User-Agent request header.
6161
-x PROXY, --proxy PROXY
6262
Setup proxy server (example: http://127.0.0.1:8080)
63+
--noprint EmailHarvester will print discovered emails to terminal.
64+
It is possible to tell EmailHarvester not to print results to terminal with this option.
6365
```
6466

6567

0 commit comments

Comments
 (0)