本文整理匯總了Python中ida_kernwin.Form方法的典型用法代碼示例。如果您正苦於以下問題:Python ida_kernwin.Form方法的具體用法?Python ida_kernwin.Form怎麽用?Python ida_kernwin.Form使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在類ida_kernwin
的用法示例。
在下文中一共展示了ida_kernwin.Form方法的7個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的Python代碼示例。
示例1: __init__
# 需要導入模塊: import ida_kernwin [as 別名]
# 或者: from ida_kernwin import Form [as 別名]
def __init__(self):
self.invert = False
ida_kernwin.Form.__init__(self, r"""STARTITEM 0
BUTTON YES Ok
BUTTON NO* No
BUTTON Cancel Cancel
VirusTotal Plugin for IDA Pro 7
Welcome to the Beta Version of the VirusTotal IDA Pro Plugin !
Auto uploads of samples is enabled by default. By submitting
your file to VirusTotal you are asking VirusTotal to share
your submission with the security community and agree to our
Terms of Service and Privacy Policy.
For further information click on the following links:
- {cHtml1}
- {cHtml2}
Press "Ok" to agree, "No" to disable uploads or "Cancel"
to stop using this plugin.
""", {
'cHtml1': ida_kernwin.Form.StringLabel(
'<a href=\"https://support.virustotal.com/hc/en-us/articles/115002145529-Terms-of-Service\">Terms of Service</a>',
tp=ida_kernwin.Form.FT_HTML_LABEL
),
'cHtml2': ida_kernwin.Form.StringLabel(
'<a href=\"https://support.virustotal.com/hc/en-us/articles/115002168385-Privacy-Policy\">Privacy Policy</a>',
tp=ida_kernwin.Form.FT_HTML_LABEL
)
})
示例2: __init__
# 需要導入模塊: import ida_kernwin [as 別名]
# 或者: from ida_kernwin import Form [as 別名]
def __init__(self):
addr = idc.ScreenEA()
func = idaapi.get_func(addr)
tests_choice = "\n".join(map(lambda x: "<%s:{r%s}>" % (x, x), AVAILABLE_TESTS))
ida_kernwin.Form.__init__(self,
r"""BUTTON YES* Launch
BUTTON CANCEL NONE
Sibyl Settings
{FormChangeCb}
Apply on:
<One function:{rOneFunc}>
<All functions:{rAllFunc}>{cMode}>
<Targeted function:{cbFunc}>
Testsets to use:
%s{cTest}>
""" % tests_choice, {
'FormChangeCb': ida_kernwin.Form.FormChangeCb(self.OnFormChange),
'cMode': ida_kernwin.Form.RadGroupControl(("rOneFunc", "rAllFunc")),
'cTest': ida_kernwin.Form.ChkGroupControl(map(lambda x: "r%s" % x,
AVAILABLE_TESTS),
value=(1 << len(AVAILABLE_TESTS)) - 1),
'cbFunc': ida_kernwin.Form.DropdownListControl(
items=self.available_funcs,
readonly=False,
selval="0x%x" % func.startEA),
}
)
self.Compile()
示例3: __init__
# 需要導入模塊: import ida_kernwin [as 別名]
# 或者: from ida_kernwin import Form [as 別名]
def __init__(self, address, current_name):
"""
Display a Pop-Up and get a new name for the symbol
"""
self.invert = False
rename_form_dict = {
'cAddr': ida_kernwin.Form.NumericLabel(address,
ida_kernwin.Form.FT_ADDR),
'cLbl': ida_kernwin.Form.StringLabel(current_name),
'iStr': ida_kernwin.Form.StringInput(),
}
ida_kernwin.Form.__init__(self, RENAME_FORM_TEXT, rename_form_dict)
示例4: __init__
# 需要導入模塊: import ida_kernwin [as 別名]
# 或者: from ida_kernwin import Form [as 別名]
def __init__(self):
ida_kernwin.Form.__init__(self,
r"""BUTTON YES* Run
BUTTON CANCEL Cancel
stackstring_static
{FormChangeCb}
<current function only:{cCurrentOnly}>
<enable debug messages:{cDebug}>
<enable xor decoding:{cDecode}>{cGroup}>
""",
{
'FormChangeCb': ida_kernwin.Form.FormChangeCb(self.OnFormChange),
'cGroup': ida_kernwin.Form.ChkGroupControl(("cCurrentOnly", "cDebug", "cDecode")),
})
示例5: __init__
# 需要導入模塊: import ida_kernwin [as 別名]
# 或者: from ida_kernwin import Form [as 別名]
def __init__(self):
ida_kernwin.Form.__init__(
self,
r"""BUTTON YES* Launch
BUTTON CANCEL NONE
Graph IR Settings
{FormChangeCb}
Analysis:
<Graph IR :{rGraphIR}>
<Graph IR + SSA :{rGraphIRSSA}>
<Graph IR + SSA + UnSSA :{rGraphIRSSAUNSSA}>{cScope}>
Options:
<Simplify code:{rCodeSimplify}>
<Subcalls dont change stack:{rDontModStack}>
<Load static memory:{rLoadMemInt}>{cOptions}>
""",
{
'FormChangeCb': ida_kernwin.Form.FormChangeCb(self.OnFormChange),
'cScope': ida_kernwin.Form.RadGroupControl(
(
"rGraphIR",
"rGraphIRSSA",
"rGraphIRSSAUNSSA"
)
),
'cOptions': ida_kernwin.Form.ChkGroupControl(
(
"rCodeSimplify",
"rDontModStack",
"rLoadMemInt"
)
),
}
)
form, _ = self.Compile()
form.rCodeSimplify.checked = True
form.rDontModStack.checked = False
form.rLoadMemInt.checked = False
示例6: get_options
# 需要導入模塊: import ida_kernwin [as 別名]
# 或者: from ida_kernwin import Form [as 別名]
def get_options(self, display):
"""
Displays the options menu and retrieves the option settings.
"""
fmt = "HELP\n"
fmt += "XML PROGRAM loader/importer plugin (Python)\n"
fmt += "IDA SDK: " + str(IDA_SDK_VERSION) + "\n\n"
fmt += "The XML PROGRAM loader loads elements from a "
fmt += "XML <PROGRAM> document to create an idb database.\n\n"
fmt += "ENDHELP\n"
fmt += "Import from XML PROGRAM document...."
fmt += "\n <##Options##Code Blocks:{CodeBlocks}>"
fmt += "\n <Entry Points:{EntryPoints}>"
fmt += "\n <Segment Register Value Ranges:{RegisterValues}>"
fmt += "\n <Data Types:{DataTypes}>"
fmt += "\n <Data Definitions:{DataDefinitions}>"
fmt += "\n <Symbols:{Symbols}>"
fmt += "\n <Comments:{Comments}>"
fmt += "\n <Bookmarks:{Bookmarks}>"
fmt += "\n <Functions:{Functions}>"
fmt += "\n <Memory References:{MemoryReferences}>"
fmt += "\n <Equate/Enum References:{EquateReferences}>"
fmt += "\n <Manual Instructions/Operands:{Manual}>{cGroup1}>"
fmt += "\n\n"
Opts = {'cGroup1': ida_kernwin.Form.ChkGroupControl((
"CodeBlocks",
"EntryPoints",
"RegisterValues",
"DataTypes",
"DataDefinitions",
"Symbols",
"Comments",
"Bookmarks",
"Functions",
"MemoryReferences",
"EquateReferences",
"Manual"
))}
self.options = ida_kernwin.Form(fmt, Opts)
self.options.Compile()
self.options.CodeBlocks.checked = True
self.options.EntryPoints.checked = True
self.options.RegisterValues.checked = True
self.options.DataTypes.checked = True
self.options.DataDefinitions.checked = True
self.options.Symbols.checked = True
self.options.Functions.checked = True
self.options.Comments.checked = True
self.options.Bookmarks.checked = True
self.options.MemoryReferences.checked = True
self.options.EquateReferences.checked = True
self.options.Manual.checked = True
if display == True:
ok = self.options.Execute()
if (ok == 0):
raise Cancelled
示例7: __init__
# 需要導入模塊: import ida_kernwin [as 別名]
# 或者: from ida_kernwin import Form [as 別名]
def __init__(self):
ida_kernwin.Form.__init__(self,
r"""BUTTON YES* Run
BUTTON CANCEL Cancel
fn_fuzzy
{FormChangeCb}
General Options
<DB file path:{iDBSave}>
<minimum function code size:{iMinBytes}>
<exclude library/thunk functions:{cLibthunk}>
<enable debug messages:{cDebug}>{cGroup}>
<##Commands##Export:{rExport}>
<Compare:{rCompare}>{rGroup}>
Export Options
<update the DB records:{cUpdate}>
<store flags as analyzed functions:{cAnaExp}>{cEGroup}>
<analyzed function name prefix/suffix (regex):{iPrefix}>
Compare Options
<compare with only analyzed functions:{cAnaCmp}>
<compare with only IDBs in the specified folder:{cFolCmp}>{cCGroup}>
<the folder path:{iFolder}>
<function code size comparison criteria (0-100):{iRatio}>
<function similarity score threshold (0-100) without CFG match:{iSimilarity}>
<function similarity score threshold (0-100) with CFG match:{iSimilarityCFG}>
<function code size threshold evaluated by only CFG match:{iMaxBytesForScore}>
""",
{
'FormChangeCb': ida_kernwin.Form.FormChangeCb(self.OnFormChange),
'cGroup': ida_kernwin.Form.ChkGroupControl(("cLibthunk", "cDebug")),
'iDBSave': ida_kernwin.Form.FileInput(save=True),
'iMinBytes': ida_kernwin.Form.NumericInput(tp=ida_kernwin.Form.FT_HEX),
'rGroup': ida_kernwin.Form.RadGroupControl(("rCompare", "rExport")),
'cEGroup': ida_kernwin.Form.ChkGroupControl(("cUpdate", "cAnaExp")),
'iPrefix': ida_kernwin.Form.StringInput(),
'cCGroup': ida_kernwin.Form.ChkGroupControl(("cAnaCmp", "cFolCmp")),
'iFolder': ida_kernwin.Form.DirInput(),
'iRatio': ida_kernwin.Form.NumericInput(tp=ida_kernwin.Form.FT_DEC),
'iSimilarity': ida_kernwin.Form.NumericInput(tp=ida_kernwin.Form.FT_DEC),
'iSimilarityCFG': ida_kernwin.Form.NumericInput(tp=ida_kernwin.Form.FT_DEC),
'iMaxBytesForScore': ida_kernwin.Form.NumericInput(tp=ida_kernwin.Form.FT_HEX),
})