-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathFuzzingTool_Dialog_ErrorLog_Child.py
32 lines (26 loc) · 1.54 KB
/
FuzzingTool_Dialog_ErrorLog_Child.py
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
"""Subclass of Dialog_ErrorLog, which is generated by wxFormBuilder."""
import wx
import FuzzingTool
from FuzzingTool_Dialog_ErrorLog import FuzzingTool_Dialog_ErrorLog
# Implementing Dialog_ErrorLog
class FuzzingTool_Dialog_ErrorLog_Child( FuzzingTool_Dialog_ErrorLog ):
def __init__( self, parent, errorcode=""):
FuzzingTool.Dialog_ErrorLog.__init__( self, parent )
self.Text_ErrorCode.SetLabel("Error code: "+errorcode[7:-8])
if errorcode.find('Pipe at the beginning of \'core_pattern\'')!=-1:
self.Text_Solution.SetLabel("Please execute either of the following commands.\nsudo echo core >/proc/sys/kernel/core_pattern\necho \'core\' | sudo tee /proc/sys/kernel/core_pattern")
elif errorcode.find('not found or not executable')!=-1:
self.Text_Solution.SetLabel("The program you selected isn't found or executable.")
elif errorcode.find('No usable test cases')!=-1:
self.Text_Solution.SetLabel("No seed input file is found in the directory you selected.")
elif errorcode.find("No instrumentation detected")!=-1:
self.Text_Solution.SetLabel("The program you selected isn't compiled for AFL.")
elif errorcode.find("Directory './out' is in use")!=-1:
self.Text_Solution.SetLabel("Another AFL process is using the directory \"./out\"\nPlease terminate it or change the working directory.")
else:
self.Text_Solution.SetLabel("Unexpected error occurred in AFL.")
self.DoLayoutAdaptation()
# Handlers for Dialog_ErrorLog events.
def Button_OKOnButtonClick( self, event ):
# TODO: Implement Button_OKOnButtonClick
self.EndModal(True)