From f4aab2ac396185ae5bf200b795102e296df11eb8 Mon Sep 17 00:00:00 2001 From: Chris Maddalena Date: Sun, 26 Jul 2015 20:53:42 -0400 Subject: [PATCH 1/2] Small bug fix --- lib/toolbox.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lib/toolbox.py b/lib/toolbox.py index 0425630..feadda4 100644 --- a/lib/toolbox.py +++ b/lib/toolbox.py @@ -54,7 +54,7 @@ def startHTTPServer(PORT): try: httpd = SocketServer.TCPServer(("", PORT), handler) print bcolors.OKGREEN + "[+] " + bcolors.ENDC + "Done. See output at 127.0.0.1:",PORT - print ncolors.WARNING + "[!] " + bcolors.ENDC + "Use CTRL+C to kill the web server." + print bcolors.WARNING + "[!] " + bcolors.ENDC + "Use CTRL+C to kill the web server." httpd.serve_forever() except: print bcolors.FAIL + "[-] Server stopped or could not be started. Check port number." + bcolors.ENDC @@ -66,4 +66,4 @@ def encodeImage(IMAGE): print bcolors.OKGREEN + "[+] " + bcolors.ENDC + "Image has been encoded. Copy this string:\n" img_64 = base64.b64encode(image.read()) print img_64 + "\n" - print ncolors.OKGREEN + "[+] " + bcolors.ENDC + "End of encoded string." + print bcolors.OKGREEN + "[+] " + bcolors.ENDC + "End of encoded string." From 77f10da8dc5cda659adcc1688a0381551ee9e23b Mon Sep 17 00:00:00 2001 From: Chris Maddalena Date: Sun, 26 Jul 2015 21:11:08 -0400 Subject: [PATCH 2/2] Output HTML is now cleaner MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Expanded use of Beautiful Soup’s prettify() --- lib/phishemail.py | 14 ++++++-------- lib/phishexit.py | 2 +- lib/phishgate.py | 2 +- 3 files changed, 8 insertions(+), 10 deletions(-) diff --git a/lib/phishemail.py b/lib/phishemail.py index a6f6e50..76aa229 100644 --- a/lib/phishemail.py +++ b/lib/phishemail.py @@ -24,16 +24,13 @@ def decodeEmailText(ENCODING): print bcolors.OKGREEN + "[+] " + bcolors.ENDC + "Decoding quoted-printable text." #Decode the quoted-printable text source = quopri.decodestring(encoded) - output = open('source.html', "w") - output.write(source) - output.close() if ENCODING in ['base64', 'Base64', 'b64', 'B64']: print bcolors.OKGREEN + "[+] " + bcolors.ENDC + "Decoding Base64 text." #Decode the Base64 text source = base64.b64decode(encoded) - output = open('source.html', "w") - output.write(source) - output.close() + output = open('source.html', "w") + output.write(source) + output.close() #This is Step 2 - URLs are replaced with our phishing URLs and new text is saved to source.html def replaceURL(): @@ -50,7 +47,7 @@ def replaceURL(): #Find all