From 99b0d4fbd37406498ff83de215b25242bae8f4a4 Mon Sep 17 00:00:00 2001 From: younsle Date: Sun, 6 Dec 2020 19:16:29 +0900 Subject: [PATCH] crash message box --- src/.esp.log | 2 +- src/_test_.txt | 0 src/crashAllInfo.txt | 14 +++---- src/fuzz_hash.py | 96 +++++++++++++++++++++++++------------------ src/test.png | Bin 0 -> 25907 bytes src/test.txt | Bin 1131 -> 1131 bytes 6 files changed, 63 insertions(+), 49 deletions(-) create mode 100644 src/_test_.txt create mode 100644 src/test.png diff --git a/src/.esp.log b/src/.esp.log index 1016af6..79b00ac 100644 --- a/src/.esp.log +++ b/src/.esp.log @@ -1,2 +1,2 @@ -ESP: 0019ff28 ( 1703720) -> 2@@PP,@L@8@@tP,@Ll)CuP,CuuCwP,MP,@aDwquCwJsEw;Dw@P,Actx 2 (stack) +ESP: 0019ff28 ( 1703720) -> 2@@P ;@r7@8@@t ;@r7l)Cu ;CuuCw ;h` ;@aDwC N/A - EBX: 002c5000 ( 2904064) -> @]Owx(@[Owpv0]OwP(pm @HOw3OwaJ? (heap) - ECX: c44cb0bc (3293360316) -> N/A + EBX: 003b2000 ( 3874816) -> @]Owx(@[Owpv0]OwP(pm @HOw3OwaJ? (heap) + ECX: 3772be1e ( 930266654) -> N/A EDX: 00401000 ( 4198400) -> N/A EDI: 00401000 ( 4198400) -> N/A ESI: 00401000 ( 4198400) -> N/A EBP: 00d80ef4 ( 14159604) -> N/A - ESP: 0019ff28 ( 1703720) -> 2@@PP,@L@8@@tP,@Ll)CuP,CuuCwP,MP,@aDwquCwJsEw;Dw@P,Actx 2 (stack) - +00: 0019ffcc ( 1703884) -> DwquCwJsEw;Dw@P,Actx 2 4|N&DTq24J6[IY-22B,0_P8\^VD( (stack) + ESP: 0019ff28 ( 1703720) -> 2@@P ;@r7@8@@t ;@r7l)Cu ;CuuCw ;h` ;@aDwC DwC N/A +08: 00401000 ( 4198400) -> N/A +0c: 00401000 ( 4198400) -> N/A +10: 00d80ef4 ( 14159604) -> N/A - +14: 0019ff50 ( 1703760) -> 8@@tP,@Ll)CuP,CuuCwP,MP,@aDwquCwJsEw;Dw@P,Actx 2 4| (stack) + +14: 0019ff50 ( 1703760) -> 8@@t ;@r7l)Cu ;CuuCw ;h` ;@aDwC 00d832d3: push ebp 0019ffe4 -> 77449990: mov edi,edi - ffffffff -> 7745734a: nop + ffffffff -> 77457330: nop diff --git a/src/fuzz_hash.py b/src/fuzz_hash.py index 79cea0c..8734553 100644 --- a/src/fuzz_hash.py +++ b/src/fuzz_hash.py @@ -366,6 +366,7 @@ def __init__(self): self.programPath = '' self.samplePath = '' self.step = 0 + self.check = 0 # mainwindow btn slot self.btn_main_1.clicked.connect(self.openProgramPath) self.btn_main_2.clicked.connect(self.openSamplePath) @@ -391,30 +392,23 @@ def openCrashFile(self): try: with open('crashAllInfo.txt', 'r') as f: self.textBrowser_2.append(f.read()) + self.crashMessageBox() except: self.textBrowser_2.append("not crash") - # continue try: with open('.esp.log', 'r') as f: self.textBrowser.append(f.read()) except: self.textBrowser.append("is input?") - # continue time.sleep(3) - - # add step is the vuln detected before 'crashAllInfo file into the emtpy comapre so alert!!"" - # event - if self.step == 10: - self.showdialog() + if self.step >= 100: print("FIN") - # message BOx GO? - - - self.step += 1 - self.progressBar.setValue(self.step) + else: + self.step += 1 + self.progressBar.setValue(self.step) # next stacked -> stack thread (0) def enterData(self): @@ -423,47 +417,67 @@ def enterData(self): 1. file_fuzzer class instance 2. openCrashFile ''' + # You did not write down the file path. (break) + if 0 == len(self.programPath) & 0 == len(self.samplePath): + self.doPathMessageBox() # + return + else: + # print(self.programPath) + # print(self.samplePath) + fuzzer = file_fuzzer(str(self.programPath), str(self.samplePath)) + self.stacked.setCurrentIndex(1) + + nextStackThread = threading.Thread(target=fuzzer.fuzz) + nextStackThread.setDaemon(1) #True is Program exit together + nextStackThread.start() + + # textBrowser_2 testing file save to load + openCrashFileThread = threading.Thread(target=self.openCrashFile) + openCrashFileThread.setDaemon(0) + openCrashFileThread.start() - # translation sub layout - print("Loading next Stacked") - # fuzzing class (file_fuzzer) - - fuzzer = file_fuzzer(str(self.programPath), str(self.samplePath)) - self.stacked.setCurrentIndex(1) - nextStackThread = threading.Thread(target=fuzzer.fuzz) - nextStackThread.setDaemon(1) #True is Program exit together - nextStackThread.start() - - # textBrowser_2 testing file save to load - openCrashFileThread = threading.Thread(target=self.openCrashFile) - openCrashFileThread.setDaemon(0) - openCrashFileThread.start() + + # message box ok + def msgbtn(self): + print "Button pressed is:" - # messagebox - def showdialog(self): - msg = QMessageBox() - msg.setIcon(QMessageBox.Information) - msg.setText("CRASH DETECTED") - msg.setInformativeText("") - msg.setWindowTitle("CRASH DETECTED") + # crash messagebox + def crashMessageBox(self): + crashMsg = QMessageBox() + crashMsg.setIcon(QMessageBox.Information) + crashMsg.setText("CRASH DETECTED") + crashMsg.setInformativeText("") + crashMsg.setWindowTitle("CRASH DETECTED") try: with open(".hash.log", 'r') as f: - msg.setDetailedText(f.read()) + crashMsg.setDetailedText(f.read()) except: - msg.setDetailedText("NOT CRASH") + crashMsg.setDetailedText("NOT CRASH") - # msg.setDetailedText("MD5 %s" % CRASH_HASH) - msg.setStandardButtons(QMessageBox.Ok | QMessageBox.Cancel) - msg.buttonClicked.connect(self.msgbtn) + # crashMsg.setDetailedText("MD5 %s" % CRASH_HASH) + crashMsg.setStandardButtons(QMessageBox.Ok | QMessageBox.Cancel) + crashMsg.buttonClicked.connect(self.msgbtn) - retval = msg.exec_() + retval = crashMsg.exec_() print "value of pressed message box button:", retval - def msgbtn(self): - print "Button pressed is:" + + + # not push file path messagebox + def doPathMessageBox(self): + msg = QMessageBox() + msg.setIcon(QMessageBox.Critical) + msg.setText("FILE PATH") + msg.setWindowTitle("INPUT FILE PATH") + + # msg.setStandardButtons(QMessageBox.Ok | QMessageBox.Cancel) + msg.buttonClicked.connect(self.msgbtn) + retval = msg.exec_() + print "value of pressed message box button:", retval + def main(): diff --git a/src/test.png b/src/test.png new file mode 100644 index 0000000000000000000000000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