From f5c1b4aeeb95a432c9279d86d716f911c5142883 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?P=C3=B3l?= Date: Fri, 18 Jan 2019 11:08:36 +0000 Subject: [PATCH] Update InSpy.py Fixes #17. If no employees are found then 'emails' (line 72) never gets initialised --- InSpy.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/InSpy.py b/InSpy.py index 2f6dda0..080d056 100755 --- a/InSpy.py +++ b/InSpy.py @@ -77,6 +77,9 @@ print "\nEmails crafted\n".format(len(emails.keys())) for name, email in emails.items(): print email + else: + print("No employees found!") + exit(0) #export results if args.html: @@ -88,4 +91,4 @@ if args.csv: output("csv", args.csv, args.company, domain, employees, emails) except (KeyboardInterrupt, SystemExit): - print "\nTerminated script.\n" \ No newline at end of file + print "\nTerminated script.\n"