def helpMenu(self,event): self._helpPopup = JFrame('JWT Fuzzer', size=(550, 450) ); self._helpPopup.setDefaultCloseOperation(JFrame.DISPOSE_ON_CLOSE) helpPanel = JPanel() helpPanel.setPreferredSize(Dimension(550, 450)) helpPanel.setBorder(EmptyBorder(10, 10, 10, 10)) helpPanel.setLayout(BoxLayout(helpPanel, BoxLayout.Y_AXIS)) self._helpPopup.setContentPane(helpPanel) helpHeadingText = JLabel("<html><h2>JWT Fuzzer</h2></html>") authorText = JLabel("<html><p>@author: <pinnace></p></html>") aboutText = JLabel("<html><br /> <p>This extension adds an Intruder payload processor for JWTs.</p><br /></html>") repositoryText = JLabel("<html>Documentation and source code:</html>") repositoryLink = JLabel("<html>- <a href=\"https://github.com/pinnace/burp-jwt-fuzzhelper-extension\">https://github.com/pinnace/burp-jwt-fuzzhelper-extension</a></html>") licenseText = JLabel("<html><br/><p>JWT Fuzzer uses a GPL 3 license. This license does not apply to the dependency below:<p></html>") dependencyLink = JLabel("<html>- <a href=\"https://github.com/jpadilla/pyjwt/blob/master/LICENSE\">pyjwt</a></html>") dependencyLink.addMouseListener(ClickListener()) dependencyLink.setCursor(Cursor.getPredefinedCursor(Cursor.HAND_CURSOR)) repositoryLink.addMouseListener(ClickListener()) repositoryLink.setCursor(Cursor.getPredefinedCursor(Cursor.HAND_CURSOR)) helpPanel.add(helpHeadingText) helpPanel.add(authorText) helpPanel.add(aboutText) helpPanel.add(repositoryText) helpPanel.add(repositoryLink) helpPanel.add(licenseText) helpPanel.add(dependencyLink) self._helpPopup.setSize(Dimension(550, 450)) self._helpPopup.pack() self._helpPopup.setLocationRelativeTo(None) self._helpPopup.setVisible(True) return
def getContentPane(): global contentPane global REMAP_WIDTH global REMAP_HEIGHT global MARGIN if not contentPane: global mainScreen global mainScreenImg mainScreen = JLabel() cursorImg = BufferedImage(16,16,BufferedImage.TYPE_INT_ARGB) blankCursor = Toolkit.getDefaultToolkit().createCustomCursor(cursorImg, Point(0,0), "blank cursor") mainScreen.setCursor(blankCursor) mainScreen.setPreferredSize( Dimension(REMAP_WIDTH + MARGIN, REMAP_HEIGHT + MARGIN)) mainScreen.setText("main screen!") image = BufferedImage(REMAP_WIDTH + MARGIN, REMAP_HEIGHT + MARGIN , BufferedImage.TYPE_INT_ARGB) g = image.createGraphics() g.setColor(Color.BLACK) g.fillRect(0, 0, REMAP_WIDTH + MARGIN, REMAP_HEIGHT + MARGIN) g.setColor(Color.WHITE) g.setFont(Font("Serif", Font.BOLD, 20)) g.drawString("Cursor will display on your device.", 50, 30) mainScreenImg = image mainScreen.setIcon(swing.ImageIcon(image)) mouseListener = ScrMouseListener() mainScreen.addMouseListener(mouseListener) mainScreen.addMouseMotionListener(mouseListener) mainScreen.addMouseWheelListener(mouseListener) keyListener = ScrKeyListener() mainScreen.addKeyListener(keyListener) mainScreen.setFocusable(True) scrPanel = JPanel() scrPanel.setLayout(BoxLayout(scrPanel, BoxLayout.Y_AXIS)) scrPanel.add(mainScreen) contentPane = JPanel() contentPane.setLayout(BorderLayout()) contentPane.add(scrPanel, BorderLayout.WEST) # contentPAne.add(controlPanel(). BorderLayout.EAST) return contentPane