Appearance
GUI interface
GUI (Graphical User Interface) is a user interface that interacts with computer programs through graphical means. It uses graphic elements (such as windows, buttons, menus, etc.) to represent the functions and operations of the program. Users can interact with these graphic elements through input devices such as mice and keyboards to complete various tasks.
Log related
comment_notes
To add comments to a specific memory address, use the set_comment_dotes
function, which takes two parameters passed. Parameter 1 is used to specify the memory address that needs to be annotated, and parameter 2 is used to specify a comment content. The function returns true if executed successfully, otherwise it returns false.
python
>>> eip = dbg.get_eip()
>>> hex(eip)
'0x776ef127'
>>>
>>> dbg.set_comment_notes(eip,"notes1")
True
>>> dbg.set_comment_notes(eip+10,"notes1")
True
loger_output
Output a log string in the log window, use the set_loger_output
function, and simply pass in a segment of the output content to achieve the function of printing logs.
python
>>> dbg.set_loger_output("hello lyscript")
True
To clear the data in the log window, you can directly call the clear_log
function.
python
>>> dbg.clear_log()
True
status_bar_message
Add status bar prompt information. By calling the set_status_bar_message
function and passing in a status message, the string can be written out to the bottom prompt of the debugger.
python
>>> dbg.set_status_bar_message()
True
switch_cpu
Switch the debugger to the CPU window and use the switch_cpu
function to switch.
python
>>> dbg.switch_cpu()
True
update_all_view
Update all data in the window using the update_all_view
function.
python
>>> dbg.update_all_view()
True
Pop up related
message_box
Pop up a regular prompt box and call the messagee_box
function to implement a pop-up window. This function passes in a pop-up prompt string, which returns true if successful or false if unsuccessful.
python
>>> retn = dbg.message_box("hello lyscript")
>>> retn
True
message_box_yes_no
Pop up a prompt box with a selection box, call the message_box_yes_no
function to implement a pop-up window. If yes is selected, it returns true; otherwise, it returns false.
python
>>> retn = dbg.message_box_yes_no("hello lyscript")
>>> if(retn == True):
... print("Click Yes")
... else:
... print("Click No")
...
Click Yes
input_string_box
Pop up an information box with input function and call the input_string_box
function, which can accept user input of a piece of data. When the input is completed and the button is clicked, the input result can be received.
python
>>> retn = dbg.input_string_box("Please enter a string")
>>> retn
'hello lyscript'
Annotation related
argument_brackets
Add parentheses to the comments and call the set_argument_brackets
function, which can be used to add a parenthesis at a specific comment position. This function passes in two parameters, a starting address and an ending address. It returns true after successful execution, otherwise it returns false.
python
>>> eip = dbg.get_eip()
>>> hex(eip)
'0xf015bb'
>>>
>>> dbg.set_argument_brackets(eip,eip+10)
True
If you need to remove this bracket, you can call the del_argument_brackets
function, which also takes a starting address and returns true after successful execution. Otherwise, it returns false.
python
>>> eip = dbg.get_eip()
>>> hex(eip)
'0xf015bb'
>>>
>>> dbg.del_argument_brackets(eip)
True
function_brackets
Adding parentheses at the machine code position allows you to call the set_function_brackets
function, which is consistent with set_argument_brackets
and requires two parameters to be passed in. If executed successfully, it returns true, otherwise it returns false.
python
>>> eip = dbg.get_eip()
>>> hex(eip)
'0xf015bb'
>>>
>>> dbg.set_function_brackets(eip,eip+10)
True
If you need to remove parentheses, you can call the del_function_brackets
function and pass in a starting address.
python
>>> eip = dbg.get_eip()
>>> hex(eip)
'0xf015bb'
>>>
>>> dbg.del_function_brackets(eip)
True
loop_brackets
Adding parentheses at the disassembly position is the same as adding parentheses at the comments. Calling the set_loop_brackets
function can add a parenthesis at the disassembly position, and its parameter passing is consistent with the former.
python
>>> eip = dbg.get_eip()
>>> hex(eip)
'0xf015bb'
>>>
>>> dbg.set_loop_brackets(eip,eip+20)
True
If you need to delete the set parentheses, you can call the del_loop_brackets
function, which requires passing in two parameters: the deletion length and the deletion start address.
python
>>> eip = dbg.get_eip()
>>> hex(eip)
'0xf015bb'
>>>
>>> dbg.del_loop_brackets(1,eip)
True
label_at
Setting a label at a specific location can be achieved by calling the set_label_at
function. The function passes in an address and a label name, and the label name must remain unique. If set successfully, it returns true, otherwise it returns false.
python
>>> eip = dbg.get_eip()
>>> hex(eip)
'0xf015bb'
>>>
>>> dbg.set_label_at(eip,"labels1")
True
Locate the label and return the memory address. By calling the location_label_at
function, it is possible to locate a specific label location and return the memory address of that label. This function simply passes in a label name, and upon successful execution, the memory address is returned, while on failure, false is returned.
python
>>> dbg.location_label_at("labels1")
15734203
>>>
>>> address = dbg.location_label_at("labels1")
>>> hex(address)
'0xf015bb'
Clearing all labels can be achieved by calling the clear_label
function, which has no parameter passing and will clear all labels after being called.
python
>>> dbg.clear_label()
True