diff --git a/crackapd/crackapd.py b/crackapd/crackapd.py index 1ef992a..564edc0 100755 --- a/crackapd/crackapd.py +++ b/crackapd/crackapd.py @@ -193,14 +193,37 @@ def run(self): # We'll now enter the main loop. We check to see whether the runfile exists. # if it does, we continue processing. # If it does not, we exit and put None in the queues... - while(os.path.isfile(RUNFILE)): + # Open tow files(hashcat_hashes.txt / John_hashes.txt) to write the hashes to. + fh_hashcat_hashes = open("/tmp/Hashcat_hashes.txt", "a", 1) + fh_john_hashes = open("/tmp/John_hashes.txt", "a", 1) + + while(os.path.isfile(RUNFILE)): if INPUTNODE == None: break s = INPUTNODE.readline() if str(s) != "": s = str(s).replace("\r", "").replace("\n", "") PrintResult(VERBOSE, "MANA - CrackApd - ITEM ADDED TO QUEUE " + str(s)) - WRKQUEUE.put(s) + + # Thomas edit + print(str(s)) + + (a,b,c,d) = str(s).split("|") + hash_name = str(b) + hash_part1 = str(c).replace(":", "") + hash_part2 = str(d).replace(":", "") + + # hashcat + hashcat_hash = hash_name + ":" * 4 + hash_part2 + ":" * 1 + hash_part1 + fh_hashcat_hashes.write(hashcat_hash + "\n") + # John + john_hash = hash_name + ":" * 1 + "$NETNTLM$" + hash_part1 + "$" + hash_part2 + ":" * 7 + fh_john_hashes.write(john_hash + "\n") + print("Hashcat hash is: " + str(hashcat_hash)) + print + print("John hash is: " + str(john_hash)) + + WRKQUEUE.put(s) # If we reach this, the runfile has been removed. We exit. PrintResult(VERBOSE, "MANA - CrackApd - Run file has been removed. We're exiting now...") @@ -211,3 +234,7 @@ def run(self): for i in range(THREADS): PrintResult(VERBOSE, "MANA - CrackApd - Clearing Threads") WRKQUEUE.put(None) + + # Close hash files + fh_hashcat_hashes.close + fh_john_hashes.close diff --git a/run-mana/mana_wrapper.py b/run-mana/mana_wrapper.py new file mode 100644 index 0000000..91ae4e7 --- /dev/null +++ b/run-mana/mana_wrapper.py @@ -0,0 +1,36 @@ +#!/usr/bin/python2 + +import argparse +import sys +import os + + +parser = argparse.ArgumentParser( + description='Mana script wrapper', + epilog='*** Making Mana great again! ***', + formatter_class=argparse.RawTextHelpFormatter) +group = parser.add_mutually_exclusive_group(required=True) +group.add_argument("-snf", action='store_true', help="Will fire up MANA in NAT mode (you'll need an upstream link) with all the MitM bells and whistles") +group.add_argument("-sns", action='store_true', help="Will fire up MANA in NAT mode, but without any of the firelamb, sslstrip, sslsplit etc") +group.add_argument("-snos", action='store_true', help="Will start MANA in a 'fake Internet' mode. Useful for places where people leave their\n" + + "wifi on, but there is no upstream Internet. Also containsthe captive portal.") +group.add_argument("-snoseap", action='store_true', help="Will start MANA with the EAP attack and noupstream mode") +#parser.add_argument("hash_file", help="File containing NTLM hashes", type=str) +#parser.add_argument("working_directory", help="Directory where files will be written to.") +#parser.add_argument("-l", "--level", type=int, choices=[0, 1, 2],default=0, help="0-> Default" + '\n' + "1-> GPU Cracking" + '\n' + "2-> Mask Cracking") +#parser.add_argument("-l", "--level", type=int, choices=[0, 1, 2], help="0-> Default" + '\n' + "1-> Default + GPU Cracking" + '\n' + "2-> Default + GPU Cracking + Mask Cracking") + +args = parser.parse_args() + +#quick_Cracking = False +#gpu_Cracking = False +#mask_Cracking = False + +if args.snf: + os.system("bash start-nat-full.sh") +elif args.sns: + os.system("bash start-nat-simple.sh") +elif args.snos: + os.system("bash start-noupstream.sh") +elif args.snoseap: + os.system("bash start-noupstream-eaponly.sh")