def crackCaptureFile(): functions.getDependencies() try: capMethod = attacks.capObj(col) capMethod.showLogo() modules.createNewLine() print("{}Type [1] - Crack the WPA-HANDSHAKE with CPU".format( col.blue_deep)) print("{}Type [2] - Crack the WPA-HANDSHAKE with GPU (Much faster)".format( col.green_deep)) print("\n{}Type [99] - Return to menu {}".format( col.highlight, col.endl)) while True: modules.createNewLine() getOption = input(functions.displayCurrentPlace( "ENTER CHOICE", "PRE-EXISTING_HANDSHAKE")) if getOption.isdigit() and int(getOption) in [1,2,99]: break if int(getOption) == 1: capMethod.enumerateMissingOptions() capMethod.cpuCrack() elif int(getOption) == 2: capMethod.enumerateMissingOptions() capMethod.gpuCrack() #FINISH THIS except(KeyboardInterrupt, EOFError, Exception) as e: bashRun("killall aircrack-ng 2>/dev/null") bashRun("kill $(ps aux | grep -i hashcat |" " awk -F ' ' {'print $2'}) 2>/dev/null") finally: functions.menuOrExit()
def hashcatDownloadFunction(): try: if not modules.connActive(): raise ConnectionError hashcatDownloader = attacks.capObj(col) hashcatDownloader.downloadHashcat() except(ConnectionError): clearTerm() modules.createNewLine() modules.printRed(col, "Internet connection not found!") finally: functions.menuOrExit()
def aircrackng(): functions.getDependencies() try: aircrackMethod = attacks.aircrackObj(col) aircrackMethod.showLogo() aircrackMethod.createTempFiles() aircrackMethod.selectInitialCard() aircrackMethod.gatherInitialData() aircrackMethod.parseCsvData() aircrackMethod.selectTargetNetwork() aircrackMethod.callCompleteCleanup() clearTerm() modules.printDeepBlue( col, "{1}Did you see WPA Handshake: {0} at the top right?".format( aircrackMethod.selectedNetworkTarget[1], col.green_deep)) modules.printDeepBlue( col, modules.returnBold( col, "If you didn't see that," "then {}cleanup with CTRL+C{} and try again.".format( col.red_deep, col.endl_deep))) decryptHandshake = attacks.capObj(col, aircrackMethod.captureFilePath) decryptHandshake.enumerateMissingOptions() clearTerm() modules.printDeepBlue( col, "Which method do you want to crack the Handshake with:\n") while True: choice_of_cpu_gpu = input( "{0}Crack using{1}: CPU-->[c] (all CPUs)|" " GPU-->[g] (GTX 9xx,10xx+/AMD ROCM GPU) {2}${1} ".format( col.blue_deep, col.endl, col.green)).lower() if choice_of_cpu_gpu.startswith(("c", "g")): break if choice_of_cpu_gpu.startswith("c"): decryptHandshake.cpuCrack() elif choice_of_cpu_gpu.startswith("g"): decryptHandshake.gpuCrack() except (KeyboardInterrupt, EOFError, Exception) as e: try: aircrackMethod.callCompleteCleanup() except (KeyboardInterrupt, EOFError, Exception): modules.createNewLine() finally: functions.menuOrExit()