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 0000000..b4decf7 Binary files /dev/null and b/src/test.png differ diff --git a/src/test.txt b/src/test.txt index 51dbee0..8dd134b 100644 Binary files a/src/test.txt and b/src/test.txt differ