当前位置: 首页>>代码示例>>Python>>正文


Python swing.JMenuItem方法代码示例

本文整理汇总了Python中javax.swing.JMenuItem方法的典型用法代码示例。如果您正苦于以下问题:Python swing.JMenuItem方法的具体用法?Python swing.JMenuItem怎么用?Python swing.JMenuItem使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在javax.swing的用法示例。


在下文中一共展示了swing.JMenuItem方法的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。

示例1: createMenuItems

# 需要导入模块: from javax import swing [as 别名]
# 或者: from javax.swing import JMenuItem [as 别名]
def createMenuItems(self, invocation):
        '''
        Invoked by Burp when a right-click menu is created; adds Git Bridge's 
        options to the menu.
        '''

        context = invocation.getInvocationContext()
        tool = invocation.getToolFlag()
        if tool == self.callbacks.TOOL_REPEATER:
            if context in [invocation.CONTEXT_MESSAGE_EDITOR_REQUEST, invocation.CONTEXT_MESSAGE_VIEWER_RESPONSE]:
                item = JMenuItem("Send to Git Bridge")
                item.addActionListener(self.RepeaterHandler(self.callbacks, invocation, self.log))
                items = ArrayList()
                items.add(item)
                return items
        elif tool == self.callbacks.TOOL_SCANNER:
            if context in [invocation.CONTEXT_SCANNER_RESULTS]:
                item = JMenuItem("Send to Git Bridge")
                item.addActionListener(self.ScannerHandler(self.callbacks, invocation, self.log))
                items = ArrayList()
                items.add(item)
                return items
        else:
            # TODO: add support for other tools
            pass 
开发者ID:jfoote,项目名称:burp-git-bridge,代码行数:27,代码来源:burp_git_bridge.py

示例2: createMenuItems

# 需要导入模块: from javax import swing [as 别名]
# 或者: from javax.swing import JMenuItem [as 别名]
def createMenuItems(self, context_menu):
    self.context = context_menu
    menu_list = ArrayList()
    menu_list.add(JMenuItem("Send to js scraper", actionPerformed=self.pre_scan))

    return menu_list 
开发者ID:Lopseg,项目名称:Jsdir,代码行数:8,代码来源:jsdir_linux.py

示例3: createMenuItems

# 需要导入模块: from javax import swing [as 别名]
# 或者: from javax.swing import JMenuItem [as 别名]
def createMenuItems(self, invocation):
		if invocation.getInvocationContext() == invocation.CONTEXT_PROXY_HISTORY:
			mymenu=[]
			if self.isEnabled:
				item=JMenuItem("Multi-Browser Highlight (Running): Click to Disable ")
			else:
				item=JMenuItem("Multi-Browser Highlight (Stopped): Click to Enable ")
			item.addActionListener(self)
			mymenu.append(item)
			return mymenu

		else:
			return None 
开发者ID:aurainfosec,项目名称:burp-multi-browser-highlighting,代码行数:15,代码来源:multi-browser.py

示例4: createMenuItems

# 需要导入模块: from javax import swing [as 别名]
# 或者: from javax.swing import JMenuItem [as 别名]
def createMenuItems(self, contextMenuInvocation):
        self._contextMenuData = contextMenuInvocation.getSelectedMessages()
        menu_list = ArrayList()
        menu_list.add(JMenuItem("Send to BurpSmartBuster",actionPerformed=self.menuItemClicked))
        return menu_list 
开发者ID:pathetiq,项目名称:BurpSmartBuster,代码行数:7,代码来源:BurpSmartBuster.py

示例5: createMenuItems

# 需要导入模块: from javax import swing [as 别名]
# 或者: from javax.swing import JMenuItem [as 别名]
def createMenuItems(self, invocation):
        #get only  selected message
        self.messageInfo = invocation.getSelectedMessages()[0]
        menuItemList = ArrayList()
        menuItemList.add(JMenuItem("Send request to ZIP File Raider extender Repeater", actionPerformed = self.contextRepeaterClick))
        menuItemList.add(JMenuItem("Send request to ZIP File Raider extender Scanner", actionPerformed = self.contextScannerClick))
        return menuItemList 
开发者ID:destine21,项目名称:ZIPFileRaider,代码行数:9,代码来源:ZIPFileRaider.py

示例6: createMenuItems

# 需要导入模块: from javax import swing [as 别名]
# 或者: from javax.swing import JMenuItem [as 别名]
def createMenuItems(self, invocation):
        context = invocation.getInvocationContext()
        if context == invocation.CONTEXT_MESSAGE_EDITOR_REQUEST \
        or context == invocation.CONTEXT_MESSAGE_VIEWER_REQUEST \
        or context == invocation.CONTEXT_PROXY_HISTORY          \
        or context == invocation.CONTEXT_TARGET_SITE_MAP_TABLE  \
        or context == invocation.CONTEXT_SEARCH_RESULTS:
            self.messages_to_send = invocation.getSelectedMessages()
            if len(self.messages_to_send):
                return [JMenuItem('Send to CPH', actionPerformed=self.send_to_cph)]
        else:
            return None 
开发者ID:elespike,项目名称:burp-cph,代码行数:14,代码来源:CustomParamHandler.py

示例7: createMenuItems

# 需要导入模块: from javax import swing [as 别名]
# 或者: from javax.swing import JMenuItem [as 别名]
def createMenuItems(self, invocation):
        menuItems = list()
        selectedMsgs = invocation.getSelectedMessages()
        if selectedMsgs != None and len(selectedMsgs) >= 1:
            menuItems.append(JMenuItem("Add to ElasticSearch Index", actionPerformed=self.genAddToES(selectedMsgs, invocation.getInputEvent().getComponent())))
        return menuItems 
开发者ID:thomaspatzke,项目名称:WASE,代码行数:8,代码来源:ElasticBurp.py

示例8: createMenuItems

# 需要导入模块: from javax import swing [as 别名]
# 或者: from javax.swing import JMenuItem [as 别名]
def createMenuItems(self, invocation):
    menu = []

    # Which part of the interface the user selects
    ctx = invocation.getInvocationContext()

    # Message Viewer Req will show menu item if selected by the user
    if ctx == 0 or ctx == 2:
      menu.append(swing.JMenuItem("SQLiPy Scan", None, actionPerformed=lambda x, inv=invocation: self.sqlMapScan(inv)))

    return menu if menu else None 
开发者ID:codewatchorg,项目名称:sqlipy,代码行数:13,代码来源:SQLiPy.py

示例9: createMenuItems

# 需要导入模块: from javax import swing [as 别名]
# 或者: from javax.swing import JMenuItem [as 别名]
def createMenuItems(self, invocation):
        messages = invocation.getSelectedMessages()

        def addRequestsToTab(e):
            for messageInfo in messages:
                parameters = self._helpers.analyzeRequest(
                    messageInfo.getRequest()).getParameters()
                # saveBuffers is required since modifying the original from its
                # source changes the saved objects, its not a copy
                messageIndex = self._db.createNewMessage(
                    self._callbacks.saveBuffersToTempFiles(messageInfo),
                    messageInfo.getHost(),
                    self._helpers.analyzeRequest(
                        messageInfo.getRequest()).getMethod(),
                    self._helpers.analyzeRequest(messageInfo).getUrl().getPath(),
                    parameters,
                    True)
                # self._messageTable.getModel().addRow(row)
            self._messageTable.redrawTable()

        ret = []
        menuItem = JMenuItem("Send request(s) to LightBulb")
        menuItem.addActionListener(addRequestsToTab)
        ret.append(menuItem)
        return(ret)

    ##
    # implement IMessageEditorController
    # this allows our request/response viewers to obtain details about the messages being displayed
    ##
    # TODO: Is this necessary? The request viewers may not require this since they aren't editable
    ## 
开发者ID:lightbulb-framework,项目名称:lightbulb-framework,代码行数:34,代码来源:BurpExtension.py

示例10: generate_menu_items

# 需要导入模块: from javax import swing [as 别名]
# 或者: from javax.swing import JMenuItem [as 别名]
def generate_menu_items(self):
        all_tests = 'All tests'
        if all_tests not in self.useragents.keys():
            _tmparray = list()
            for v in self.useragents.values():
                _tmparray.extend(v)
            self.useragents[all_tests] = _tmparray
        if self.custom_file_text not in self.useragents.keys():
            self.useragents[self.custom_file_text] = []
        for k in self.useragents.keys():
            menuitem = JMenuItem(k, actionPerformed=self.menuItemClicked)
            self.menuitems[menuitem] = k 
开发者ID:EnableSecurity,项目名称:Identity-Crisis,代码行数:14,代码来源:identitycrisis.py

示例11: createMenuItems

# 需要导入模块: from javax import swing [as 别名]
# 或者: from javax.swing import JMenuItem [as 别名]
def createMenuItems(self, context_menu):
        self.context = context_menu 
        menu_list = ArrayList()
        menu_list.add(JMenuItem("Add subdomains to scope via Bumpster", actionPerformed=self.dnsdumpster_menu))
        return menu_list 
开发者ID:markclayton,项目名称:bumpster,代码行数:7,代码来源:bumpster.py

示例12: createMenuItems

# 需要导入模块: from javax import swing [as 别名]
# 或者: from javax.swing import JMenuItem [as 别名]
def createMenuItems(self, invocation):
        return [JMenuItem("Send to Burp WP Intruder",
                          actionPerformed=lambda x, inv=invocation: self.menu_send_to_intruder_on_click(inv))] 
开发者ID:kacperszurek,项目名称:burp_wp,代码行数:5,代码来源:burp_wp.py

示例13: __init__

# 需要导入模块: from javax import swing [as 别名]
# 或者: from javax.swing import JMenuItem [as 别名]
def __init__(self, text="Open In Browser"):
        self.menuitem = JMenuItem(text)
        self.menuitem.setEnabled(False)
        self.menuitem.addActionListener(self) 
开发者ID:doyensec,项目名称:inql,代码行数:6,代码来源:browser.py

示例14: __init__

# 需要导入模块: from javax import swing [as 别名]
# 或者: from javax.swing import JMenuItem [as 别名]
def __init__(self, helpers=None, callbacks=None, text=''):
        self._helpers = helpers
        self._callbacks = callbacks
        self.menuitem = JMenuItem(text)
        self._burp_menuitem = JMenuItem("inql: %s" % text)
        self.set_enabled(False)
        self._callbacks.registerContextMenuFactory(self) 
开发者ID:doyensec,项目名称:inql,代码行数:9,代码来源:sendto.py

示例15: __init__

# 需要导入模块: from javax import swing [as 别名]
# 或者: from javax.swing import JMenuItem [as 别名]
def __init__(self, text, action=None):
        self._action = action
        self.menuitem = JMenuItem(text)
        self.menuitem.setEnabled(True)
        self.menuitem.addActionListener(self) 
开发者ID:doyensec,项目名称:inql,代码行数:7,代码来源:executor.py


注:本文中的javax.swing.JMenuItem方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。