本文整理汇总了Python中burp.IContextMenuFactory方法的典型用法代码示例。如果您正苦于以下问题:Python burp.IContextMenuFactory方法的具体用法?Python burp.IContextMenuFactory怎么用?Python burp.IContextMenuFactory使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类burp
的用法示例。
在下文中一共展示了burp.IContextMenuFactory方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。
示例1: createMenuItems
# 需要导入模块: import burp [as 别名]
# 或者: from burp import IContextMenuFactory [as 别名]
def createMenuItems(self, invocation):
"""
Overrides IContextMenuFactory callback
:param invocation: handles menu selected invocation
:return:
"""
try:
r = invocation.getSelectedMessages()[0]
info = self._helpers.analyzeRequest(r)
url = str(info.getUrl())
if not any([x in url for x in URLS]):
return None
body = r.getRequest()[info.getBodyOffset():].tostring()
for h in info.getHeaders():
if h.lower().startswith("host:"):
domain = h[5:].strip()
self._action_listener.ctx(fname='dummy.query', host=domain, payload=body)
mymenu = []
mymenu.append(self._burp_menuitem)
except Exception as ex:
return None
return mymenu
示例2: processHttpMessage
# 需要导入模块: import burp [as 别名]
# 或者: from burp import IContextMenuFactory [as 别名]
def processHttpMessage(self, tool, isRequest, msg):
if not tool & self.confBurpTools or isRequest and self.confBurpOnlyResp:
return
doc = self.genESDoc(msg)
doc.save()
### IContextMenuFactory ###