def find_file_ext(): while True: check_call(["clear"]) print(logo) colorprint( "info", "Dosyanın türünü bulmak için 'file' tool'u kullanılacaktır.") path = config_get('paths', 'path') if path == '': colorprint("fatal", "\n\tKaydedilmiş dosya yolu bulunamadı. :(") colorprint("fatal", "\n\tDevam etmek için dosyanın yolunu girin:\n") path = raw_input("Axion TERMINAL(" + Style.BRIGHT + Fore.CYAN + "/file_analysis/find_file_ext" + Style.RESET_ALL + ")\n-->") config_set('paths', 'path', path) colorprint( "info", "\nDosya yolunu daha sonraki işlemleriniz için saklayacağız...\n" ) colorprint("success", "\n[*] " + path + " kullanılıyor\n") choice = raw_input( Style.DIM + Fore.WHITE + "Devam etmek için Enter'a, yeni dosya yolu girmek için 'p'ye basın..." + Style.RESET_ALL).lower() if choice == 'p': path = raw_input("Axion TERMINAL(" + Style.BRIGHT + Fore.CYAN + "/file_analysis/find_file_ext" + Style.RESET_ALL + ")\n--> Yeni dosya yolu: ") config_set('paths', 'path', path) colorprint("success", "\n[*] " + path + " kullanılıyor\n") std = Popen(["file", path], stdout=PIPE, stderr=PIPE) (out, err) = std.communicate() if out.find("No") == -1: colorprint("success", out) else: colorprint("fatal", out) colorprint("warn", "9-->Üst menüye dön") colorprint("fatal", "0-->Çık") choice = raw_input("Axion TERMINAL(" + Style.BRIGHT + Fore.CYAN + "/file_analysis/find_file_ext" + Style.RESET_ALL + ")\n-->").lower() if choice == "9": return elif choice == "0": sys.exit()
def volatility_iehistory(): while True: check_call(["clear"]) print (logo) colorprint("info","'volatility' will be used to look for Internet Explorer history cache information.") path = config_get('paths', 'path') if path == '': colorprint("fatal", "\n\tOh, it seems there is no path stored before :(") colorprint("fatal","\n\tPlease specify one to continue:\n") path = raw_input("Axion TERMINAL("+Style.BRIGHT+Fore.CYAN+"/ram_analysis/volatility_cmdscan"+Style.RESET_ALL+")\n-->") config_set('paths', 'path', path) colorprint("info", "\nWell, we'll store this path for next operations...\n") colorprint("success", "\n[*] Using "+path+"\n") colorprint("warn","9-->Go back to the top menu") colorprint("fatal","0-->Quit") choice = raw_input(Style.DIM + Fore.WHITE + "Press Enter to continue or 'p' to new path..." + Style.RESET_ALL).lower() if choice == "9": return elif choice == "0": sys.exit() if choice == 'p': path = raw_input("Axion TERMINAL("+Style.BRIGHT+Fore.CYAN+"/file_analysis/find_file_ext"+Style.RESET_ALL+")\n--> New path: ") config_set('paths', 'path', path) colorprint("success", "\n[*] Using "+path+"\n") colorprint("warn", "Please wait...") std = Popen("volatility -f " + path + " imageinfo | grep Suggested | cut -d ',' -f1 | cut -d ':' -f2", shell=True, stdout=PIPE,stderr=PIPE) (out, err) = std.communicate() if err.find("The requested file doesn't exist") != -1: colorprint("fatal" ,err) else: out = out.rstrip() if out.find("No") != -1: colorprint("warn", out) colorprint("fatal", "This file is not a RAM Dump file Restarting...") else: std = Popen("volatility -f " + path + " --profile" + out + " iehistory", shell=True, stdout=PIPE,stderr=PIPE) (out, err) = std.communicate() colorprint("success", out) raw_input(Style.DIM + Fore.WHITE + "Press Enter to continue..." + Style.RESET_ALL)
def qr_decoder(): while True: check_call(["clear"]) print(logo) colorprint("info", "The 'zbarimg' command will be used to decode QRCode") path = config_get('paths', 'path') if path == '': colorprint("fatal", "\n\tOh, it seems there is no path stored before :(") colorprint("fatal", "\n\tPlease specify one to continue:\n") path = raw_input("Axion TERMINAL(" + Style.BRIGHT + Fore.CYAN + "/crypto/qr_decoder" + Style.RESET_ALL + ")\n-->") config_set('paths', 'path', path) colorprint( "info", "\nWell, we'll store this path for next operations...\n") colorprint("success", "\n[*] Using " + path + "\n") choice = raw_input(Style.DIM + Fore.WHITE + "Press Enter to continue or 'p' to new path..." + Style.RESET_ALL).lower() if choice == 'p': path = raw_input("Axion TERMINAL(" + Style.BRIGHT + Fore.CYAN + "/crypto/qr_decoder" + Style.RESET_ALL + ")\n--> New path: ") config_set('paths', 'path', path) colorprint("success", "\n[*] Using " + path + "\n") std = Popen(["zbarimg", path], stdout=PIPE, stderr=PIPE) (out, err) = std.communicate() if out.find("No") == -1: colorprint("success", out) else: colorprint("fatal", out) if err: colorprint("fatal", err) colorprint("warn", "9-->Go back to the top menu") colorprint("fatal", "0-->Quit") choice = raw_input("Axion TERMINAL(" + Style.BRIGHT + Fore.CYAN + "/crypto/qr_decoder" + Style.RESET_ALL + ")\n-->").lower() if choice == "9": return elif choice == "0": sys.exit()
def hash_extractor(): check_call(["clear"]) while True: print (logo) colorprint("info", "In this section, you can get hashed passwords out of ZIP, RAR and TrueCrypt files.") colorprint("info", "'JohntheRipper' utilities will be used to do this.") path = config_get('paths', 'path') if path == '': colorprint("fatal", "\n\tOh, it seems there is no path stored before :(") colorprint("fatal","\n\tPlease specify one to continue:\n") path = raw_input("Axion TERMINAL("+Style.BRIGHT+Fore.CYAN+"/file_analysis/hash_extractor"+Style.RESET_ALL+")\n-->") config_set('paths', 'path', path) colorprint("info", "\nWell, we'll store this path for next operations...\n") colorprint("success", "\n[*] Using "+path+"\n") choice = raw_input(Style.DIM + Fore.WHITE + "Press Enter to continue or 'p' to new path..." + Style.RESET_ALL).lower() if choice == 'p': path = raw_input("Axion TERMINAL("+Style.BRIGHT+Fore.CYAN+"/file_analysis/hash_extractor"+Style.RESET_ALL+")\n--> New path: ") config_set('paths', 'path', path) colorprint("success", "\n[*] Using "+path+"\n") colorprint("info", "1-->RAR files") colorprint("info", "2-->ZIP archives") colorprint("info", "3-->TrueCrypt files") colorprint("warn", "9-->Go back to the top menu") colorprint("fatal", "0-->Quit") choice = raw_input( "Axion TERMINAL(" + Style.BRIGHT + Fore.CYAN + "/file_analysis/hash_extractor" + Style.RESET_ALL + ")\n-->") if choice == "9": return elif choice == "0": sys.exit() elif choice == "1": rar2john(path) elif choice == "2": zip2john(path) elif choice == "3": truecrypt2john(path) colorprint("warn", "9-->Go back to the top menu") colorprint("fatal", "0-->Quit") choice = raw_input(Style.DIM + Fore.WHITE + "Press Enter to continue..." + Style.RESET_ALL) if choice == "9": return elif choice == "0": sys.exit()
def pdf_parser(): while True: os.system('clear') print(logo) path = config_get('paths', 'path') if path == '': colorprint("fatal", "\n\tKaydedilmiş dosya yolu bulunamadı. :(") colorprint("fatal", "\n\tDevam etmek için dosyanın yolunu girin:\n") path = raw_input("Axion TERMINAL(" + Style.BRIGHT + Fore.CYAN + "/file_analysis/find_file_ext" + Style.RESET_ALL + ")\n-->") config_set('paths', 'path', path) colorprint( "info", "\nDosya yolunu daha sonraki işlemleriniz için saklayacağız...\n" ) colorprint("success", "\n[*] " + path + " kullanılıyor\n") colorprint("warn", "9-->Üst menüye dön") colorprint("fatal", "0-->Çık") choice = raw_input( Style.DIM + Fore.WHITE + "Devam etmek için Enter'a, yeni dosya yolu girmek için 'p'ye basın..." + Style.RESET_ALL).lower() if choice == "9": return elif choice == "0": sys.exit() if choice == 'p': path = raw_input("Axion TERMINAL(" + Style.BRIGHT + Fore.CYAN + "/file_analysis/hash_brute" + Style.RESET_ALL + ")\n--> Yeni dosya yolu: ") config_set('paths', 'path', path) colorprint("success", "\n[*] " + path + " kullanılıyor\n") std = Popen(["python", "imports/pdf-parser.py", path], stdout=PIPE, stderr=PIPE) (out, err) = std.communicate() if out.find("No such file or directory") == -1: func(path) else: colorprint( "fatal", "Böyle bir dosya bulunamadı.\nTekrar başlatılıyor...\n")
def pdf_parser(): while True: os.system('clear') print(logo) path = config_get('paths', 'path') if path == '': colorprint("fatal", "\n\tOh, it seems there is no path stored before :(") colorprint("fatal", "\n\tPlease specify one to continue:\n") path = raw_input("Axion TERMINAL(" + Style.BRIGHT + Fore.CYAN + "/file_analysis/find_file_ext" + Style.RESET_ALL + ")\n-->") config_set('paths', 'path', path) colorprint( "info", "\nWell, we'll store this path for next operations...\n") colorprint("success", "\n[*] Using " + path + "\n") colorprint("warn", "9-->Go back to the top menu") colorprint("fatal", "0-->Quit") choice = raw_input(Style.DIM + Fore.WHITE + "Press Enter to continue or 'p' to new path..." + Style.RESET_ALL).lower() if choice == "9": return elif choice == "0": sys.exit() if choice == 'p': path = raw_input("Axion TERMINAL(" + Style.BRIGHT + Fore.CYAN + "/file_analysis/hash_brute" + Style.RESET_ALL + ")\n--> New path: ") config_set('paths', 'path', path) colorprint("success", "\n[*] Using " + path + "\n") std = Popen(["python", "imports/pdf-parser.py", path], stdout=PIPE, stderr=PIPE) (out, err) = std.communicate() if out.find("No such file or directory") == -1: func(path) else: colorprint("fatal", "There is no such file.\nRestarting...\n")
def volatility_cmdscan(): while True: check_call(["clear"]) print(logo) colorprint( "info", "RAM dump cmd'de çalışan komutları görüntülemek için 'volatility' tool'u kullanılacaktır." ) path = config_get('paths', 'path') if path == '': colorprint("fatal", "\n\tKaydedilmiş dosya yolu bulunamadı. :(") colorprint("fatal", "\n\tDevam etmek için dosyanın yolunu girin:\n") path = raw_input("Axion TERMINAL(" + Style.BRIGHT + Fore.CYAN + "/ram_analysis/volatility_cmdscan" + Style.RESET_ALL + ")\n-->") config_set('paths', 'path', path) colorprint( "info", "\nDosya yolunu daha sonraki işlemleriniz için saklayacağız...\n" ) colorprint("success", "\n[*] " + path + " kullanılıyor\n") colorprint("warn", "9-->Üst menüye dön") colorprint("fatal", "0-->Çık") choice = raw_input( Style.DIM + Fore.WHITE + "Devam etmek için Enter'a, yeni dosya yolu girmek için 'p'ye basın..." + Style.RESET_ALL).lower() if choice == "9": return elif choice == "0": sys.exit() if choice == 'p': path = raw_input("Axion TERMINAL(" + Style.BRIGHT + Fore.CYAN + "/ram_analysis/volatility_cmdscan" + Style.RESET_ALL + ")\n--> Yeni dosya yolu: ") config_set('paths', 'path', path) colorprint("success", "\n[*] " + path + " kullanılıyor\n") colorprint("warn", "Lütfen bekleyin...") std = Popen( "volatility -f " + path + " imageinfo | grep Suggested | cut -d ',' -f1 | cut -d ':' -f2", shell=True, stdout=PIPE, stderr=PIPE) (out, err) = std.communicate() if err.find("The requested file doesn't exist") != -1: colorprint("fatal", err) else: out = out.rstrip() if out.find("No") != -1: colorprint("warn", out) colorprint( "fatal", "Dosya, RAM Dump dosyası değil. Yeniden başlatılıyor...") else: std = Popen("volatility -f " + path + " --profile" + out + " cmdscan", shell=True, stdout=PIPE, stderr=PIPE) (out, err) = std.communicate() colorprint("success", out) raw_input(Style.DIM + Fore.WHITE + "Devam etmek için Enter'a basın..." + Style.RESET_ALL)
def binary_search(): check_call(["clear"]) while True: print(logo) colorprint("info", "The 'binwalk' tool will be used for binary searching.") colorprint( "info", "If a file signature match is found in the search, it will be extracted with the 'foremost' tool." ) path = config_get('paths', 'path') if path == '': colorprint("fatal", "\n\tOh, it seems there is no path stored before :(") colorprint("fatal", "\n\tPlease specify one to continue:\n") path = raw_input("Axion TERMINAL(" + Style.BRIGHT + Fore.CYAN + "/file_analysis/binary_search" + Style.RESET_ALL + ")\n-->") config_set('paths', 'path', path) colorprint( "info", "\nWell, we'll store this path for next operations...\n") colorprint("success", "\n[*] Using " + path + "\n") choice = raw_input(Style.DIM + Fore.WHITE + "Press Enter to continue or 'p' to new path..." + Style.RESET_ALL).lower() if choice == 'p': path = raw_input("Axion TERMINAL(" + Style.BRIGHT + Fore.CYAN + "/file_analysis/binary_search" + Style.RESET_ALL + ")\n--> New path: ") config_set('paths', 'path', path) colorprint("success", "\n[*] Using " + path + "\n") std = Popen(["binwalk", path], stdout=PIPE, stderr=PIPE) (out, err) = std.communicate() if not err: print(out) print("Extract embedded files? Y/N\n") colorprint("warn", "9-->Go back to the top menu") colorprint("fatal", "0-->Quit") extract_choice = raw_input("Axion TERMINAL(" + Style.BRIGHT + Fore.CYAN + "/file_analysis/binary_search" + Style.RESET_ALL + ")\n-->").lower() if extract_choice == "9": return elif extract_choice == "0": sys.exit() elif extract_choice == "y": while True: print("\nSpecify the output path:") colorprint("warn", "Abort -> 9") colorprint("fatal", "Quit -> 0") out_path = raw_input("Axion TERMINAL(" + Style.BRIGHT + Fore.CYAN + "/file_analysis/binary_search" + Style.RESET_ALL + ")\n--> Output path: ") if out_path == "9": return elif out_path == "0": sys.exit() std = Popen(["foremost", path, "-o", out_path], stdout=PIPE, stderr=PIPE) (out, err) = std.communicate() if out.find("ERROR") == -1: if out_path == '': colorprint( "success", "Found files are written to the 'output/'\n") else: colorprint( "success", "Found files are written to the " + out_path + ".\n") raw_input(Style.DIM + Fore.WHITE + "Press Enter to continue..." + Style.RESET_ALL) break else: colorprint( "fatal", "The file already exists in the output path you specify, try another one." ) raw_input(Style.DIM + Fore.WHITE + "Press Enter to continue..." + Style.RESET_ALL) else: colorprint("fatal", "No such file was found.\nResetting...\n") raw_input(Style.DIM + Fore.WHITE + "Press Enter to continue..." + Style.RESET_ALL)
def metadata_search(): check_call(["clear"]) while True: print(logo) colorprint( "info", "Belirlediğiniz keywordü bulmak için 'exiftool' ve 'strings' kullanılacaktır." ) path = config_get('paths', 'path') if path == '': colorprint("fatal", "\n\tKaydedilmiş dosya yolu bulunamadı. :(") colorprint("fatal", "\n\tDevam etmek için dosyanın yolunu girin:\n") path = raw_input("Axion TERMINAL(" + Style.BRIGHT + Fore.CYAN + "/file_analysis/metadata_search" + Style.RESET_ALL + ")\n-->") config_set('paths', 'path', path) colorprint( "info", "\nDosya yolunu daha sonraki işlemleriniz için saklayacağız...\n" ) colorprint("success", "\n[*] Using " + path + "\n") choice = raw_input( Style.DIM + Fore.WHITE + "Devam etmek için Enter'a, yeni dosya yolu girmek için 'p'ye basın..." + Style.RESET_ALL).lower() if choice == 'p': path = raw_input("Axion TERMINAL(" + Style.BRIGHT + Fore.CYAN + "/file_analysis/hash_brute" + Style.RESET_ALL + ")\n--> Yeni dosya yolu: ") config_set('paths', 'path', path) colorprint("success", "\n[*] Using " + path + "\n") std = Popen(["file", path], stdout=PIPE, stderr=PIPE) (out, err) = std.communicate() if out.find("No such file or directory") == -1: colorprint( "info", "1-->'exiftool' ve 'strings' çıktısında belirli bir keyword için arama yap" ) colorprint("info", "2-->MetaData'yı göster") colorprint("info", "3-->Strings çıktısını göster") colorprint("warn", "9-->Üst menüye dön") colorprint("fatal", "0-->Çık") choose = raw_input("Axion TERMINAL(" + Style.BRIGHT + Fore.CYAN + "/file_analysis/metadata_search" + Style.RESET_ALL + ")\n-->").lower() if choose == "1": searcher(path) raw_input(Style.DIM + Fore.WHITE + "Devam etmek için Enter'a basın..." + Style.RESET_ALL) elif choose == "2": colorprint("warn", exiftool_out(path)) raw_input(Style.DIM + Fore.WHITE + "Devam etmek için Enter'a basın..." + Style.RESET_ALL) elif choose == "3": colorprint("warn", strings_out(path)) raw_input(Style.DIM + Fore.WHITE + "Devam etmek için Enter'a basın..." + Style.RESET_ALL) elif choose == "9": return elif choose == "0": sys.exit() else: colorprint("fatal", "Yanlış girdi.\nTekrar başlatılıyor...\n") raw_input(Style.DIM + Fore.WHITE + "Devam etmek için Enter'a basın..." + Style.RESET_ALL) else: colorprint( "fatal", "Böyle bir dosya bulunamadı.\nTekrar başlatılıyor...\n") raw_input(Style.DIM + Fore.WHITE + "Devam etmek için Enter'a basın..." + Style.RESET_ALL) break
def metadata_search(): check_call(["clear"]) while True: print(logo) colorprint( "info", "'exiftool' and 'strings' will be used to search for a string you specify." ) path = config_get('paths', 'path') if path == '': colorprint("fatal", "\n\tOh, it seems there is no path stored before :(") colorprint("fatal", "\n\tPlease specify one to continue:\n") path = raw_input("Axion TERMINAL(" + Style.BRIGHT + Fore.CYAN + "/file_analysis/metadata_search" + Style.RESET_ALL + ")\n-->") config_set('paths', 'path', path) colorprint( "info", "\nWell, we'll store this path for next operations...\n") colorprint("success", "\n[*] Using " + path + "\n") choice = raw_input(Style.DIM + Fore.WHITE + "Press Enter to continue or 'p' to new path..." + Style.RESET_ALL).lower() if choice == 'p': path = raw_input("Axion TERMINAL(" + Style.BRIGHT + Fore.CYAN + "/file_analysis/hash_brute" + Style.RESET_ALL + ")\n--> New path: ") config_set('paths', 'path', path) colorprint("success", "\n[*] Using " + path + "\n") std = Popen(["file", path], stdout=PIPE, stderr=PIPE) (out, err) = std.communicate() if out.find("No such file or directory") == -1: colorprint( "info", "1-->Search for a specific keyword in 'exiftool' and 'strings' output" ) colorprint("info", "2-->Print meta-data information") colorprint("info", "3-->Print 'strings' output") colorprint("warn", "9-->Go back to the top menu") colorprint("fatal", "0-->Quit") choose = raw_input("Axion TERMINAL(" + Style.BRIGHT + Fore.CYAN + "/file_analysis/metadata_search" + Style.RESET_ALL + ")\n-->").lower() if choose == "1": searcher(path) raw_input(Style.DIM + Fore.WHITE + "Press Enter to continue..." + Style.RESET_ALL) elif choose == "2": colorprint("warn", exiftool_out(path)) raw_input(Style.DIM + Fore.WHITE + "Press Enter to continue..." + Style.RESET_ALL) elif choose == "3": colorprint("warn", strings_out(path)) raw_input(Style.DIM + Fore.WHITE + "Press Enter to continue..." + Style.RESET_ALL) elif choose == "9": return elif choose == "0": sys.exit() else: colorprint("fatal", "Wrong input.\nResetting...\n") raw_input(Style.DIM + Fore.WHITE + "Press Enter to continue..." + Style.RESET_ALL) else: colorprint("fatal", "There is no such file.\nRestarting...\n") raw_input(Style.DIM + Fore.WHITE + "Press Enter to continue..." + Style.RESET_ALL) break
def hash_extractor(): check_call(["clear"]) while True: print(logo) colorprint( "info", "Bu bölümde RAR, ZIP ve TrueCrypt hashlerini dosyaların içerisinden çıkartabilirsiniz." ) colorprint("info", "Bu iş için 'JohntheRipper' araçları kullanılacaktır.") path = config_get('paths', 'path') if path == '': colorprint("fatal", "\n\tKaydedilmiş dosya yolu bulunamadı. :(") colorprint("fatal", "\n\tDevam etmek için dosyanın yolunu girin:\n") path = raw_input("Axion TERMINAL(" + Style.BRIGHT + Fore.CYAN + "/file_analysis/hash_extractor" + Style.RESET_ALL + ")\n-->") config_set('paths', 'path', path) colorprint( "info", "\nDosya yolunu daha sonraki işlemleriniz için saklayacağız...\n" ) colorprint("success", "\n[*] Using " + path + "\n") choice = raw_input( Style.DIM + Fore.WHITE + "Devam etmek için Enter'a, yeni dosya yolu girmek için 'p'ye basın..." + Style.RESET_ALL).lower() if choice == 'p': path = raw_input("Axion TERMINAL(" + Style.BRIGHT + Fore.CYAN + "/file_analysis/hash_extractor" + Style.RESET_ALL + ")\n--> Yeni dosya yolu: ") config_set('paths', 'path', path) colorprint("success", "\n[*] " + path + " kullanılıyor\n") colorprint("info", "1-->RAR dosyaları") colorprint("info", "2-->ZIP dosyaları") colorprint("info", "3-->TrueCrypt dosyaları") colorprint("warn", "9-->Üst menüye dön") colorprint("fatal", "0-->Çık") choice = raw_input("Axion TERMINAL(" + Style.BRIGHT + Fore.CYAN + "/file_analysis/hash_extractor" + Style.RESET_ALL + ")\n-->") if choice == "9": return elif choice == "0": sys.exit() elif choice == "1": rar2john(path) elif choice == "2": zip2john(path) elif choice == "3": truecrypt2john(path) colorprint("warn", "9-->Üst menüye dön") colorprint("fatal", "0-->Çık") choice = raw_input(Style.DIM + Fore.WHITE + "Devam etmek için Enter'a basın..." + Style.RESET_ALL) if choice == "9": return elif choice == "0": sys.exit()
def hash_brute(): check_call(["clear"]) while True: print (logo) colorprint("info", "Bu bölümde belirlediğiniz wordlistler ile hash kırabilirsiniz.") colorprint("info", "Bu iş için 'JohnTheRipper' kullanılacaktır.") colorprint("info", "Belirtilen dosya yolu, hash'in bulunduğu dosya için kullanılacaktır.") path = config_get('paths', 'path') if path == '': colorprint("fatal", "\n\tKaydedilmiş dosya yolu bulunamadı :(") colorprint("fatal","\n\tDevam etmek için dosyanın yolunu girin:\n") path = raw_input("Axion TERMINAL("+Style.BRIGHT+Fore.CYAN+"/file_analysis/hash_brute"+Style.RESET_ALL+")\n-->") config_set('paths', 'path', path) colorprint("info", "\nDosya yolunu daha sonraki işlemleriniz için saklayacağız...\n") colorprint("success", "\n[*] Using "+path+"\n") choice = raw_input(Style.DIM + Fore.WHITE + "Devam etmek için Enter'a, yeni dosya yolu girmek için 'p'ye basın..." + Style.RESET_ALL).lower() if choice == 'p': path = raw_input("Axion TERMINAL("+Style.BRIGHT+Fore.CYAN+"/file_analysis/hash_brute"+Style.RESET_ALL+")\n--> Yeni dosya yolu: ") config_set('paths', 'path', path) colorprint("success", "\n[*] "+path+" kullanılıyor \n") colorprint("info", "Eğer özel bir wordlist'iniz varsa lütfen yolunu girin.") colorprint("warn", "Boş bırak-->JohnTheRipper'ın hazır wordlist'ini kullan.") wordlist_path = raw_input("Axion TERMINAL(" + Style.BRIGHT + Fore.CYAN + "/file_analysis/hash_brute" + Style.RESET_ALL + ")-->") colorprint("info", "Format parametresi girmek istiyor msuunuz?") colorprint("warn", "1 -->Tüm hash formatlarını listele") colorprint("warn", "Boş bırak -->John tarafından belirlenen varsayılan formatı kullan") format = raw_input("Axion TERMINAL(" + Style.BRIGHT + Fore.CYAN + "/file_analysis/hash_brute" + Style.RESET_ALL + ")-->") if format == "1": colorprint("warn",format_list) raw_input(Style.DIM + Fore.WHITE + "Devam etmek için Enter'a basın..." + Style.RESET_ALL) continue if wordlist_path == "": if format == "": cmd = "./john_files/john " + path else: cmd = "./john_files/john " + path + " --format=" + format else: if format == "": cmd = "./john_files/john " + path + " --wordlist=" + wordlist_path else: cmd = "./john_files/john " + path + " --wordlist=" + wordlist_path + " --format=" + format run_john(cmd) std = Popen(["./john_files/john", "--show", path], stdout=PIPE, stderr=PIPE) (out, err) = std.communicate() if err: colorprint("fatal", err) if out: colorprint("success", out) colorprint("warn", "9-->Üst menüye dön") colorprint("fatal", "0-->Çık") choice = raw_input(Style.DIM + Fore.WHITE + "Devam etmek için Enter'a basın..." + Style.RESET_ALL) if choice == "9": return elif choice == "0": sys.exit()
def hash_brute(): check_call(["clear"]) while True: print(logo) colorprint( "info", "Here, you can try to crack hashes with the wordlists you want.") colorprint("info", "'JohnTheRipper' will be used.") colorprint( "info", "Also specified path will be used as text file containing the hash." ) path = config_get('paths', 'path') if path == '': colorprint("fatal", "\n\tOh, it seems there is no path stored before :(") colorprint("fatal", "\n\tPlease specify one to continue:\n") path = raw_input("Axion TERMINAL(" + Style.BRIGHT + Fore.CYAN + "/file_analysis/hash_brute" + Style.RESET_ALL + ")\n-->") config_set('paths', 'path', path) colorprint( "info", "\nWell, we'll store this path for next operations...\n") colorprint("success", "\n[*] Using " + path + "\n") choice = raw_input(Style.DIM + Fore.WHITE + "Press Enter to continue or 'p' to new path..." + Style.RESET_ALL).lower() if choice == 'p': path = raw_input("Axion TERMINAL(" + Style.BRIGHT + Fore.CYAN + "/file_analysis/hash_brute" + Style.RESET_ALL + ")\n--> New path: ") config_set('paths', 'path', path) colorprint("success", "\n[*] Using " + path + "\n") colorprint("info", "If you have a custom wordlist, please enter the path.") colorprint("warn", "Leave Empty-->Use default wordlist for JohnTheRipper.") wordlist_path = raw_input("Axion TERMINAL(" + Style.BRIGHT + Fore.CYAN + "/file_analysis/hash_brute" + Style.RESET_ALL + ")-->") colorprint("info", "Do you want to enter a format parameter?") colorprint("warn", "1 -->List all formats for hashes.") colorprint("warn", "Leave Empty-->Use default format detected by John.") format = raw_input("Axion TERMINAL(" + Style.BRIGHT + Fore.CYAN + "/file_analysis/hash_brute" + Style.RESET_ALL + ")-->") if format == "1": colorprint("warn", format_list) raw_input(Style.DIM + Fore.WHITE + "Press Enter to continue..." + Style.RESET_ALL) continue if wordlist_path == "": if format == "": cmd = "./john_files/john " + path else: cmd = "./john_files/john " + path + " --format=" + format else: if format == "": cmd = "./john_files/john " + path + " --wordlist=" + wordlist_path else: cmd = "./john_files/john " + path + " --wordlist=" + wordlist_path + " --format=" + format run_john(cmd) std = Popen(["./john_files/john", "--show", path], stdout=PIPE, stderr=PIPE) (out, err) = std.communicate() if err: colorprint("fatal", err) if out: colorprint("success", out) colorprint("warn", "9-->Go back to the top menu") colorprint("fatal", "0-->Quit") choice = raw_input(Style.DIM + Fore.WHITE + "Press Enter to continue..." + Style.RESET_ALL) if choice == "9": return elif choice == "0": sys.exit()
def hash_brute(): check_call(["clear"]) while True: print(logo) colorprint( "warn", "To use this feature you must have the John Jumbo package (available in the Kali distribution)." ) colorprint( "info", "Here, you can try to crack hashes with the wordlists you want.") colorprint("info", "'JohnTheRipper' will be used.") colorprint( "info", "Also specified path will be used as text file containing the hash." ) path = config_get('paths', 'path') if path == '': colorprint("fatal", "\n\tOh, it seems there is no path stored before :(") colorprint("fatal", "\n\tPlease specify one to continue:\n") path = raw_input("Axion TERMINAL(" + Style.BRIGHT + Fore.CYAN + "/file_analysis/hash_brute" + Style.RESET_ALL + ")\n-->") config_set('paths', 'path', path) colorprint( "info", "\nWell, we'll store this path for next operations...\n") colorprint("success", "\n[*] Using " + path + "\n") choice = raw_input(Style.DIM + Fore.WHITE + "Press Enter to continue or 'p' to new path..." + Style.RESET_ALL).lower() if choice == 'p': path = raw_input("Axion TERMINAL(" + Style.BRIGHT + Fore.CYAN + "/file_analysis/hash_brute" + Style.RESET_ALL + ")\n--> New path: ") config_set('paths', 'path', path) colorprint("success", "\n[*] Using " + path + "\n") colorprint("info", "If you have a custom wordlist, please enter the path.") colorprint("warn", "0-->Use default wordlist for JohnTheRipper") wordlist_path = raw_input("Axion TERMINAL(" + Style.BRIGHT + Fore.CYAN + "/file_analysis/hash_brute" + Style.RESET_ALL + ")-->") if wordlist_path == "0": std = Popen(["john", path], stdout=PIPE, stderr=PIPE) (out, err) = std.communicate() else: std = Popen(["john", "--wordlist=" + wordlist_path, path], stdout=PIPE, stderr=PIPE) (out, err) = std.communicate() if err: colorprint("fatal", err) if out: colorprint("success", out) std = Popen(["john", "--show", path], stdout=PIPE, stderr=PIPE) (out, err) = std.communicate() if err: colorprint("fatal", err) if out: colorprint("success", out) colorprint("warn", "9-->Go back to the top menu") colorprint("fatal", "0-->Quit") choice = raw_input(Style.DIM + Fore.WHITE + "Press Enter to continue..." + Style.RESET_ALL) if choice == "9": return elif choice == "0": sys.exit()
def binary_search(): check_call(["clear"]) while True: print(logo) colorprint("info", "Binary taraması için 'binwalk' tool'u kullanılacaktır.") colorprint( "info", "Taramada bulunan dosyalar 'foremost' tool'u ile çıkartılacaktır.") path = config_get('paths', 'path') if path == '': colorprint("fatal", "\n\tKaydedilmiş dosya yolu bulunamadı. :(") colorprint("fatal", "\n\tDevam etmek için dosyanın yolunu girin:\n") path = raw_input("Axion TERMINAL(" + Style.BRIGHT + Fore.CYAN + "/file_analysis/binary_search" + Style.RESET_ALL + ")\n-->") config_set('paths', 'path', path) colorprint( "info", "\nDosya yolunu daha sonraki işlemleriniz için saklayacağız...\n" ) colorprint("success", "\n[*] " + path + " kullanılıyor\n") choice = raw_input( Style.DIM + Fore.WHITE + "Devam etmek için Enter'a, yeni dosya yolu girmek için 'p'ye basın..." + Style.RESET_ALL).lower() if choice == 'p': path = raw_input("Axion TERMINAL(" + Style.BRIGHT + Fore.CYAN + "/file_analysis/binary_search" + Style.RESET_ALL + ")\n--> Yeni dosya yolu: ") config_set('paths', 'path', path) colorprint("success", "\n[*] " + path + " kullanılıyor\n") std = Popen(["binwalk", path], stdout=PIPE, stderr=PIPE) (out, err) = std.communicate() if not err: print(out) print("Gömülü dosyaları çıkartmak ister misiniz? E/H\n") colorprint("warn", "9-->Üst menüye dön") colorprint("fatal", "0-->Çık") extract_choice = raw_input("Axion TERMINAL(" + Style.BRIGHT + Fore.CYAN + "/file_analysis/binary_search" + Style.RESET_ALL + ")\n-->").lower() if extract_choice == "9": return elif extract_choice == "0": sys.exit() elif extract_choice == "y": while True: print("\nLütfen çıktı klasörü yolunu belirtin:") colorprint("warn", "İşlemi iptal et -> 9") colorprint("fatal", "Çık -> 0") out_path = raw_input("Axion TERMINAL(" + Style.BRIGHT + Fore.CYAN + "/file_analysis/binary_search" + Style.RESET_ALL + ")\n--> Output path: ") if out_path == "9": return elif out_path == "0": sys.exit() std = Popen(["foremost", path, "-o", out_path], stdout=PIPE, stderr=PIPE) (out, err) = std.communicate() if out.find("ERROR") == -1: if out_path == '': colorprint( "success", "Bulunan dosyalar 'output/' dizinine yazılıyor...\n" ) else: colorprint( "success", "Bulunan dosyalar " + out_path + "dizinine yazılıyor...\n") raw_input(Style.DIM + Fore.WHITE + "Devam etmek için Enter'a basın..." + Style.RESET_ALL) break else: colorprint( "fatal", "Girdiğiniz çıktı yolunda dosya zaten mevcut. Başka bir yol belirtin." ) raw_input(Style.DIM + Fore.WHITE + "Devam etmek için Enter'a basın..." + Style.RESET_ALL) else: colorprint( "fatal", "Böyle bir dosya bulunamadı.\nTekrar başlatılıyor...\n") raw_input(Style.DIM + Fore.WHITE + "Devam etmek için Enter'a basın..." + Style.RESET_ALL)