本文整理匯總了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 ###