Python javax.swing.JMenuItem() Examples
The following are 18
code examples of javax.swing.JMenuItem().
You can vote up the ones you like or vote down the ones you don't like,
and go to the original project or source file by following the links above each example.
You may also want to check out all available functions/classes of the module
javax.swing
, or try the search function
.
Example #1
Source File: burp_git_bridge.py From burp-git-bridge with MIT License | 6 votes |
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
Example #2
Source File: identitycrisis.py From Identity-Crisis with MIT License | 5 votes |
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
Example #3
Source File: setcustomheader.py From inql with Apache License 2.0 | 5 votes |
def __init__(self, overrideheaders, text="Set Custom Header"): self.requests = {} self.menuitem = JMenuItem(text) self.menuitem.setEnabled(False) self.menuitem.addActionListener(self) self._overrideheaders = overrideheaders self._host = None
Example #4
Source File: executor.py From inql with Apache License 2.0 | 5 votes |
def __init__(self, text, action=None): self._action = action self.menuitem = JMenuItem(text) self.menuitem.setEnabled(True) self.menuitem.addActionListener(self)
Example #5
Source File: sendto.py From inql with Apache License 2.0 | 5 votes |
def __init__(self, text=None): self.menuitem = JMenuItem(text) self.menuitem.setEnabled(False)
Example #6
Source File: sendto.py From inql with Apache License 2.0 | 5 votes |
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)
Example #7
Source File: browser.py From inql with Apache License 2.0 | 5 votes |
def __init__(self, text="Open In Browser"): self.menuitem = JMenuItem(text) self.menuitem.setEnabled(False) self.menuitem.addActionListener(self)
Example #8
Source File: burp_wp.py From burp_wp with MIT License | 5 votes |
def createMenuItems(self, invocation): return [JMenuItem("Send to Burp WP Intruder", actionPerformed=lambda x, inv=invocation: self.menu_send_to_intruder_on_click(inv))]
Example #9
Source File: bumpster.py From bumpster with MIT License | 5 votes |
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
Example #10
Source File: jsdir_linux.py From Jsdir with GNU General Public License v3.0 | 5 votes |
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
Example #11
Source File: BurpExtension.py From lightbulb-framework with MIT License | 5 votes |
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 ##
Example #12
Source File: SQLiPy.py From sqlipy with The Unlicense | 5 votes |
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
Example #13
Source File: ElasticBurp.py From WASE with GNU General Public License v3.0 | 5 votes |
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
Example #14
Source File: CustomParamHandler.py From burp-cph with MIT License | 5 votes |
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
Example #15
Source File: ZIPFileRaider.py From ZIPFileRaider with MIT License | 5 votes |
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
Example #16
Source File: BurpSmartBuster.py From BurpSmartBuster with MIT License | 5 votes |
def createMenuItems(self, contextMenuInvocation): self._contextMenuData = contextMenuInvocation.getSelectedMessages() menu_list = ArrayList() menu_list.add(JMenuItem("Send to BurpSmartBuster",actionPerformed=self.menuItemClicked)) return menu_list
Example #17
Source File: multi-browser.py From burp-multi-browser-highlighting with MIT License | 5 votes |
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
Example #18
Source File: jsdir_windows.py From Jsdir with GNU General Public License v3.0 | 5 votes |
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