示例#1
0
    def initGui(self):
        self.sigv4ConfigurationTab = swing.JPanel()
        layout = swing.GroupLayout(self.sigv4ConfigurationTab)
        self.sigv4ConfigurationTab.setLayout(layout)

        self.addDomainInfo = swing.JLabel("Domain to test:")
        self.addDomainInfo.setFont(Font("Tahoma", 1, 12))
        self.configurationLoadedInfo = swing.JLabel("")
        self.configurationLoadedInfo.setFont(Font("Tahoma", 1, 12))
        self.isJsonCheck = swing.JCheckBox("JSON")
        self.isJsonCheck.setFont(Font("Tahoma", 1, 12))
        self.parseCredsBtn = swing.JButton('Load configuration', actionPerformed=self.parseCreds)
        self.credsPanel = swing.JScrollPane()
        self.credsText = swing.JTextArea("Paste Creds Here.")
        self.credsText.setLineWrap(True)
        self.credsPanel.setViewportView(self.credsText)
        self.scopeUrlField = swing.JTextField("api.example.io")

        layout.setHorizontalGroup(
            layout.createParallelGroup(swing.GroupLayout.Alignment.LEADING)
            .addGroup(layout.createSequentialGroup()
                .addGap(15)
                .addGroup(layout.createParallelGroup(swing.GroupLayout.Alignment.LEADING)
                    .addComponent(self.isJsonCheck)
                    .addComponent(self.credsPanel, swing.GroupLayout.PREFERRED_SIZE, 525, swing.GroupLayout.PREFERRED_SIZE)
                    .addComponent(self.addDomainInfo)
                    .addComponent(self.scopeUrlField, swing.GroupLayout.PREFERRED_SIZE, 350, swing.GroupLayout.PREFERRED_SIZE)
                    .addGroup(layout.createSequentialGroup()
                        .addGroup(layout.createParallelGroup(swing.GroupLayout.Alignment.TRAILING)
                            .addComponent(self.parseCredsBtn))
                            .addComponent(self.configurationLoadedInfo)
                        .addPreferredGap(swing.LayoutStyle.ComponentPlacement.UNRELATED))
                    .addComponent(self.addDomainInfo))
                .addContainerGap(26, lang.Short.MAX_VALUE)))

        layout.setVerticalGroup(
            layout.createParallelGroup(swing.GroupLayout.Alignment.LEADING)
            .addGroup(layout.createSequentialGroup()
                .addGap(10)
                .addComponent(self.isJsonCheck)
                .addGap(10)
                .addComponent(self.credsPanel, swing.GroupLayout.PREFERRED_SIZE, 125, swing.GroupLayout.PREFERRED_SIZE)
                .addPreferredGap(swing.LayoutStyle.ComponentPlacement.UNRELATED)
                .addGroup(layout.createParallelGroup(swing.GroupLayout.Alignment.LEADING)
                    .addGroup(layout.createSequentialGroup()
                        .addGap(10)
                        .addComponent(self.addDomainInfo)
                        .addGap(10)
                        .addComponent(self.scopeUrlField, swing.GroupLayout.PREFERRED_SIZE, swing.GroupLayout.DEFAULT_SIZE, swing.GroupLayout.PREFERRED_SIZE)
                        .addGroup(layout.createParallelGroup(swing.GroupLayout.Alignment.LEADING)
                            .addGroup(layout.createSequentialGroup()
                                .addGap(10)
                                .addComponent(self.parseCredsBtn)
                                .addGap(10)
                                .addComponent(self.configurationLoadedInfo)
                                .addPreferredGap(swing.LayoutStyle.ComponentPlacement.RELATED)
                .addPreferredGap(swing.LayoutStyle.ComponentPlacement.RELATED)
                .addContainerGap(swing.GroupLayout.DEFAULT_SIZE, lang.Short.MAX_VALUE)))))))
        
        return 
示例#2
0
    def initUI(self):
        self.tab = swing.JPanel()

        # UI for Output
        self.outputLabel = swing.JLabel("pMDetector Log:")
        self.outputLabel.setFont(Font("Tahoma", Font.BOLD, 14))
        self.outputLabel.setForeground(Color(255, 102, 52))
        self.logPane = swing.JScrollPane()
        self.outputTxtArea = swing.JTextArea()
        self.outputTxtArea.setFont(Font("Consolas", Font.PLAIN, 12))
        self.outputTxtArea.setLineWrap(True)
        self.logPane.setViewportView(self.outputTxtArea)
        self.clearBtn = swing.JButton("Clear Log", actionPerformed=self.clear)
        self.exportBtn = swing.JButton("Export Log",
                                       actionPerformed=self.export)
        self.parentFrm = swing.JFileChooser()

        # Layout
        layout = swing.GroupLayout(self.tab)
        layout.setAutoCreateGaps(True)
        layout.setAutoCreateContainerGaps(True)
        self.tab.setLayout(layout)

        layout.setHorizontalGroup(layout.createParallelGroup().addGroup(
            layout.createSequentialGroup().addGroup(
                layout.createParallelGroup().addComponent(
                    self.outputLabel).addComponent(self.logPane).addComponent(
                        self.clearBtn).addComponent(self.exportBtn))))

        layout.setVerticalGroup(layout.createParallelGroup().addGroup(
            layout.createParallelGroup().addGroup(
                layout.createSequentialGroup().addComponent(
                    self.outputLabel).addComponent(self.logPane).addComponent(
                        self.clearBtn).addComponent(self.exportBtn))))
示例#3
0
    def registerExtenderCallbacks(self, callbacks):

        print "Loading..."

        self._callbacks = callbacks
        self._callbacks.setExtensionName("PDF Metadata")

        self.rbFast = self.defineRadioButton(
            "Scan Fast - Will miss PDF files that don't have their name in the request"
        )
        self.rbThorough = self.defineRadioButton(
            "Scan Thoroughly - Will be slow, but won't miss PDF files", False)
        self.fast = True
        self.btnSave = swing.JButton("Save", actionPerformed=self.saveConfig)
        self.btnGroup = swing.ButtonGroup()
        self.btnGroup.add(self.rbFast)
        self.btnGroup.add(self.rbThorough)

        self.tab = swing.JPanel()
        layout = swing.GroupLayout(self.tab)
        self.tab.setLayout(layout)
        layout.setAutoCreateGaps(True)
        layout.setAutoCreateContainerGaps(True)
        layout.setHorizontalGroup(layout.createSequentialGroup().addGroup(
            layout.createParallelGroup().addComponent(
                self.rbFast).addComponent(self.rbThorough).addComponent(
                    self.btnSave)))
        layout.setVerticalGroup(layout.createSequentialGroup().addComponent(
            self.rbFast).addComponent(self.rbThorough).addComponent(
                self.btnSave))
        self.restoreConfig()
        self._callbacks.registerScannerCheck(self)
        self._callbacks.registerExtensionStateListener(self)
        self._helpers = callbacks.getHelpers()
        self._callbacks.addSuiteTab(self)

        self.initGui()

        # Variable to keep a browsable structure of the issues find on each host
        # later used in the export function.
        self.global_issues = {}

        print "Loaded PDF Metadata v" + VERSION + "!"
        return
示例#4
0
    def initGui(self):
        self.tab = swing.JPanel()
        self.titleLabel = swing.JLabel("Burp Importer")
        self.titleLabel.setFont(Font("Tahoma", 1, 16))
        self.titleLabel.setForeground(Color(235, 136, 0))
        self.infoLabel = swing.JLabel(
            "Burp Importer loads a list of URLs or parses output from various automated scanners and populates the sitemap with each successful connection."
        )
        self.infoLabel.setFont(Font("Tahoma", 0, 12))
        self.fileOptionLabel = swing.JLabel("File Load Option")
        self.fileOptionLabel.setFont(Font("Tahoma", 1, 12))
        self.fileDescLabel = swing.JLabel(
            "This option is only used when loading a file to be parsed for http(s) connections.  You can disregard this option and paste a list of URLs in the box below."
        )
        self.fileDescLabel.setFont(Font("Tahoma", 0, 12))
        self.fileDescLabel2 = swing.JLabel(
            "Supported files: .gnamp, .nessus, .txt")
        self.fileDescLabel2.setFont(Font("Tahoma", 0, 12))
        self.parseFileButton = swing.JButton("Load File to Parse",
                                             actionPerformed=self.loadFile)
        self.urlLabel = swing.JLabel("URL List")
        self.urlLabel.setFont(Font("Tahoma", 1, 12))
        self.urlDescLabel = swing.JLabel(
            "URLs in this list should be in the format: protocol://host:port/optional-path"
        )
        self.urlDescLabel.setFont(Font("Tahoma", 0, 12))
        self.urlDescLabel2 = swing.JLabel(
            "Example: https://127.0.0.1:443/index. Port is optional, 80 or 443 will be assumed."
        )
        self.urlDescLabel2.setFont(Font("Tahoma", 0, 12))
        self.pasteButton = swing.JButton("Paste", actionPerformed=self.paste)
        self.loadButton = swing.JButton("Copy List",
                                        actionPerformed=self.setClipboardText)
        self.removeButton = swing.JButton("Remove",
                                          actionPerformed=self.remove)
        self.clearButton = swing.JButton("Clear", actionPerformed=self.clear)
        self.urlListModel = swing.DefaultListModel()
        self.urlList = swing.JList(self.urlListModel)
        self.urlListPane = swing.JScrollPane(self.urlList)
        self.addButton = swing.JButton("Add", actionPerformed=self.addURL)
        self.runLabel = swing.JLabel(
            "<html>Click the <b>RUN</b> button to attempt a connection to each URL in the URL List.  Successful connections will be added to Burp's sitemap.</html>"
        )
        self.runLabel.setFont(Font("Tahoma", 0, 12))
        self.redirectsCheckbox = swing.JCheckBox(
            "Enable: Follow Redirects (301 or 302 Response)")
        self.runButton = swing.JButton("RUN", actionPerformed=self.runClicked)
        self.runButton.setFont(Font("Tahoma", 1, 12))
        self.addUrlField = swing.JTextField("New URL...",
                                            focusGained=self.clearField,
                                            focusLost=self.fillField)
        self.logLabel = swing.JLabel("Log:")
        self.logLabel.setFont(Font("Tahoma", 1, 12))
        self.logPane = swing.JScrollPane()
        self.logArea = swing.JTextArea(
            "Burp Importer Log - Parsing and Run details will be appended here.\n"
        )
        self.logArea.setLineWrap(True)
        self.logPane.setViewportView(self.logArea)
        self.webPortDict = {'80':'http','81':'http','82':'http','83':'http','443':'https','2301':'http','2381':'https','8000':'http','8008':'http','8080':'http','8083':'https','8180':'http','8400':'http',\
        '8443':'https','8834':'https','8888':'http','9001':'http','9043':'https','9080':'http','9090':'http','9100':'http','9443':'https'}
        self.bar = swing.JSeparator(swing.SwingConstants.HORIZONTAL)
        self.bar2 = swing.JSeparator(swing.SwingConstants.HORIZONTAL)
        layout = swing.GroupLayout(self.tab)
        self.tab.setLayout(layout)

        # Credit to Antonio Sánchez and https://github.com/Dionach/HeadersAnalyzer/
        layout.setHorizontalGroup(
            layout.createParallelGroup(swing.GroupLayout.Alignment.LEADING).
            addGroup(layout.createSequentialGroup().addGap(15).addGroup(
                layout.createParallelGroup(
                    swing.GroupLayout.Alignment.LEADING).addComponent(
                        self.titleLabel).addComponent(
                            self.infoLabel).addComponent(
                                self.fileOptionLabel).addComponent(
                                    self.fileDescLabel).addComponent(
                                        self.fileDescLabel2).addComponent(
                                            self.parseFileButton).addComponent(
                                                self.bar).addComponent(
                                                    self.urlLabel).
                addComponent(self.urlDescLabel).addComponent(
                    self.urlDescLabel2).addComponent(self.bar2).addComponent(
                        self.runLabel).addComponent(
                            self.redirectsCheckbox).addComponent(
                                self.runButton).addComponent(
                                    self.logPane,
                                    swing.GroupLayout.PREFERRED_SIZE, 525,
                                    swing.GroupLayout.PREFERRED_SIZE).
                addGroup(layout.createSequentialGroup().addGroup(
                    layout.createParallelGroup(
                        swing.GroupLayout.Alignment.TRAILING).
                    addComponent(self.addButton).addGroup(
                        layout.createParallelGroup(
                            swing.GroupLayout.Alignment.LEADING).addComponent(
                                self.logLabel).addGroup(
                                    layout.createParallelGroup(
                                        swing.GroupLayout.Alignment.TRAILING,
                                        False).addComponent(
                                            self.removeButton,
                                            swing.GroupLayout.DEFAULT_SIZE,
                                            swing.GroupLayout.DEFAULT_SIZE,
                                            lang.Short.MAX_VALUE).addComponent(
                                                self.pasteButton,
                                                swing.GroupLayout.DEFAULT_SIZE,
                                                swing.GroupLayout.DEFAULT_SIZE,
                                                lang.Short.MAX_VALUE).
                                    addComponent(
                                        self.loadButton,
                                        swing.GroupLayout.DEFAULT_SIZE,
                                        swing.GroupLayout.DEFAULT_SIZE,
                                        lang.Short.MAX_VALUE).addComponent(
                                            self.clearButton,
                                            swing.GroupLayout.DEFAULT_SIZE,
                                            swing.GroupLayout.PREFERRED_SIZE,
                                            lang.Short.MAX_VALUE)))
                ).addPreferredGap(
                    swing.LayoutStyle.ComponentPlacement.UNRELATED).addGroup(
                        layout.createParallelGroup(
                            swing.GroupLayout.Alignment.LEADING).addComponent(
                                self.urlListPane,
                                swing.GroupLayout.PREFERRED_SIZE, 350,
                                swing.GroupLayout.PREFERRED_SIZE).addComponent(
                                    self.addUrlField,
                                    swing.GroupLayout.PREFERRED_SIZE, 350,
                                    swing.GroupLayout.PREFERRED_SIZE)))).
                     addContainerGap(26, lang.Short.MAX_VALUE)))

        layout.setVerticalGroup(
            layout.createParallelGroup(swing.GroupLayout.Alignment.LEADING).
            addGroup(
                layout.createSequentialGroup().addGap(15).addComponent(
                    self.titleLabel).addGap(10).addComponent(
                        self.infoLabel).addGap(10).addComponent(
                            self.fileOptionLabel).addGap(10).addComponent(
                                self.fileDescLabel).addGap(10).addComponent(
                                    self.fileDescLabel2).addGap(10).
                addComponent(self.parseFileButton).addGap(10).addComponent(
                    self.bar).addComponent(
                        self.urlLabel).addGap(10).addComponent(
                            self.urlDescLabel).addGap(10).
                addComponent(self.urlDescLabel2).addPreferredGap(
                    swing.LayoutStyle.ComponentPlacement.UNRELATED).addGroup(
                        layout.createParallelGroup(
                            swing.GroupLayout.Alignment.LEADING).
                        addGroup(layout.createSequentialGroup().addGroup(
                            layout.createParallelGroup(
                                swing.GroupLayout.Alignment.LEADING).
                            addGroup(layout.createSequentialGroup(
                            ).addComponent(self.pasteButton).addPreferredGap(
                                swing.LayoutStyle.ComponentPlacement.RELATED
                            ).addComponent(self.loadButton).addPreferredGap(
                                swing.LayoutStyle.ComponentPlacement.RELATED
                            ).addComponent(self.removeButton).addPreferredGap(
                                swing.LayoutStyle.ComponentPlacement.RELATED
                            ).addComponent(self.clearButton)).addComponent(
                                self.urlListPane,
                                swing.GroupLayout.PREFERRED_SIZE, 138,
                                swing.GroupLayout.PREFERRED_SIZE)).addGap(10).
                                 addGroup(
                                     layout.createParallelGroup(
                                         swing.GroupLayout.Alignment.BASELINE).
                                     addComponent(self.addButton).addComponent(
                                         self.addUrlField,
                                         swing.GroupLayout.PREFERRED_SIZE,
                                         swing.GroupLayout.DEFAULT_SIZE,
                                         swing.GroupLayout.PREFERRED_SIZE)))
                    ).addGap(10).addComponent(self.bar2).addComponent(
                        self.runLabel).addGap(10).addComponent(
                            self.redirectsCheckbox).addGap(10).addComponent(
                                self.runButton).addGap(10).
                addComponent(self.logLabel).addPreferredGap(
                    swing.LayoutStyle.ComponentPlacement.RELATED).addGap(
                        8, 8, 8).addComponent(
                            self.logPane, swing.GroupLayout.PREFERRED_SIZE,
                            125,
                            swing.GroupLayout.PREFERRED_SIZE).addPreferredGap(
                                swing.LayoutStyle.ComponentPlacement.RELATED
                            ).addContainerGap(swing.GroupLayout.DEFAULT_SIZE,
                                              lang.Short.MAX_VALUE)))
        return
示例#5
0
    def drawUI(self):
        self.tab = swing.JPanel()
        self.uiLabel = swing.JLabel('Site Map Extractor Options')
        self.uiLabel.setFont(Font('Tahoma', Font.BOLD, 14))
        self.uiLabel.setForeground(Color(235, 136, 0))

        self.uiScopeOnly = swing.JRadioButton('In-scope only', True)
        self.uiScopeAll = swing.JRadioButton('Full site map', False)
        self.uiScopeButtonGroup = swing.ButtonGroup()
        self.uiScopeButtonGroup.add(self.uiScopeOnly)
        self.uiScopeButtonGroup.add(self.uiScopeAll)

        self.uipaneA = swing.JSplitPane(swing.JSplitPane.HORIZONTAL_SPLIT)
        self.uipaneA.setMaximumSize(Dimension(900, 125))
        self.uipaneA.setDividerSize(2)
        self.uipaneB = swing.JSplitPane(swing.JSplitPane.HORIZONTAL_SPLIT)
        self.uipaneB.setDividerSize(2)
        self.uipaneA.setRightComponent(self.uipaneB)
        self.uipaneA.setBorder(BorderFactory.createLineBorder(Color.black))

        # UI for Export <a href Links
        self.uiLinksPanel = swing.JPanel()
        self.uiLinksPanel.setPreferredSize(Dimension(200, 75))
        self.uiLinksPanel.setBorder(EmptyBorder(10, 10, 10, 10))
        self.uiLinksPanel.setLayout(BorderLayout())
        self.uiLinksLabel = swing.JLabel("Extract '<a href=' Links")
        self.uiLinksLabel.setFont(Font('Tahoma', Font.BOLD, 14))
        self.uiLinksAbs = swing.JCheckBox('Absolute     ', True)
        self.uiLinksRel = swing.JCheckBox('Relative     ', True)
        # create a subpanel so Run button will be centred
        self.uiLinksRun = swing.JButton('Run',
                                        actionPerformed=self.extractLinks)
        self.uiLinksSave = swing.JButton('Save Log to CSV File',
                                         actionPerformed=self.savetoCsvFile)
        self.uiLinksClear = swing.JButton('Clear Log',
                                          actionPerformed=self.clearLog)
        self.uiLinksButtonPanel = swing.JPanel()
        self.uiLinksButtonPanel.add(self.uiLinksRun)
        self.uiLinksButtonPanel.add(self.uiLinksSave)
        self.uiLinksButtonPanel.add(self.uiLinksClear)
        # add all elements to main Export Links panel
        self.uiLinksPanel.add(self.uiLinksLabel, BorderLayout.NORTH)
        self.uiLinksPanel.add(self.uiLinksAbs, BorderLayout.WEST)
        self.uiLinksPanel.add(self.uiLinksRel, BorderLayout.CENTER)
        self.uiLinksPanel.add(self.uiLinksButtonPanel, BorderLayout.SOUTH)
        self.uipaneA.setLeftComponent(
            self.uiLinksPanel)  # add Export Links panel to splitpane

        # UI for Export Response Codes
        self.uiCodesPanel = swing.JPanel()
        self.uiCodesPanel.setPreferredSize(Dimension(200, 75))
        self.uiCodesPanel.setBorder(EmptyBorder(10, 10, 10, 10))
        self.uiCodesPanel.setLayout(BorderLayout())
        self.uiCodesLabel = swing.JLabel('Extract Response Codes')
        self.uiCodesLabel.setFont(Font('Tahoma', Font.BOLD, 14))
        self.uiRcodePanel = swing.JPanel()
        self.uiRcodePanel.setLayout(GridLayout(1, 1))
        self.uiRcode1xx = swing.JCheckBox('1XX  ', False)
        self.uiRcode2xx = swing.JCheckBox('2XX  ', True)
        self.uiRcode3xx = swing.JCheckBox('3XX  ', True)
        self.uiRcode4xx = swing.JCheckBox('4XX  ', True)
        self.uiRcode5xx = swing.JCheckBox('5XX  ', True)
        self.uiCodesRun = swing.JButton('Run',
                                        actionPerformed=self.exportCodes)
        self.uiCodesSave = swing.JButton('Save Log to CSV File',
                                         actionPerformed=self.savetoCsvFile)
        self.uiCodesClear = swing.JButton('Clear Log',
                                          actionPerformed=self.clearLog)
        self.uiCodesButtonPanel = swing.JPanel()
        self.uiCodesButtonPanel.add(self.uiCodesRun)
        self.uiCodesButtonPanel.add(self.uiCodesSave)
        self.uiCodesButtonPanel.add(self.uiCodesClear)
        self.uiRcodePanel.add(self.uiRcode1xx)
        self.uiRcodePanel.add(self.uiRcode2xx)
        self.uiRcodePanel.add(self.uiRcode3xx)
        self.uiRcodePanel.add(self.uiRcode4xx)
        self.uiRcodePanel.add(self.uiRcode5xx)
        self.uiCodesPanel.add(self.uiCodesLabel, BorderLayout.NORTH)
        self.uiCodesPanel.add(self.uiRcodePanel, BorderLayout.WEST)
        self.uiCodesPanel.add(self.uiCodesButtonPanel, BorderLayout.SOUTH)
        self.uipaneB.setLeftComponent(self.uiCodesPanel)

        # Option 3 UI for Export Sitemap
        self.uiExportPanel = swing.JPanel()
        self.uiExportPanel.setPreferredSize(Dimension(200, 75))
        self.uiExportPanel.setBorder(EmptyBorder(10, 10, 10, 10))
        self.uiExportPanel.setLayout(BorderLayout())
        self.uiExportLabel = swing.JLabel('Export Site Map to File')
        self.uiExportLabel.setFont(Font('Tahoma', Font.BOLD, 14))
        self.uiMustHaveResponse = swing.JRadioButton(
            'Must have a response     ', True)
        self.uiAllRequests = swing.JRadioButton('All     ', False)
        self.uiResponseButtonGroup = swing.ButtonGroup()
        self.uiResponseButtonGroup.add(self.uiMustHaveResponse)
        self.uiResponseButtonGroup.add(self.uiAllRequests)
        self.uiExportRun = swing.JButton('Run',
                                         actionPerformed=self.exportSiteMap)
        self.uiExportClear = swing.JButton('Clear Log',
                                           actionPerformed=self.clearLog)
        self.uiExportButtonPanel = swing.JPanel()
        self.uiExportButtonPanel.add(self.uiExportRun)
        self.uiExportButtonPanel.add(self.uiExportClear)
        self.uiExportPanel.add(self.uiExportLabel, BorderLayout.NORTH)
        self.uiExportPanel.add(self.uiMustHaveResponse, BorderLayout.WEST)
        self.uiExportPanel.add(self.uiAllRequests, BorderLayout.CENTER)
        self.uiExportPanel.add(self.uiExportButtonPanel, BorderLayout.SOUTH)
        self.uipaneB.setRightComponent(self.uiExportPanel)

        # UI Common Elements
        self.uiLogLabel = swing.JLabel('Log:')
        self.uiLogLabel.setFont(Font('Tahoma', Font.BOLD, 14))
        self.uiLogPane = swing.JScrollPane()
        layout = swing.GroupLayout(self.tab)
        self.tab.setLayout(layout)

        # Thank you to Smeege (https://github.com/SmeegeSec/Burp-Importer/) for helping me figure out how this works.
        # He in turn gave credit to Antonio Sanchez (https://github.com/Dionach/HeadersAnalyzer/)
        layout.setHorizontalGroup(
            layout.createParallelGroup(
                swing.GroupLayout.Alignment.LEADING).addGroup(
                    layout.createSequentialGroup().addGap(10, 10, 10).addGroup(
                        layout.createParallelGroup(
                            swing.GroupLayout.Alignment.LEADING).addComponent(
                                self.uiLabel).addGroup(
                                    layout.createSequentialGroup().addGap(
                                        10, 10, 10).addComponent(
                                            self.uiScopeOnly).addGap(
                                                10, 10, 10).addComponent(
                                                    self.uiScopeAll)).
                        addGap(15, 15,
                               15).addComponent(self.uipaneA).addComponent(
                                   self.uiLogLabel).addComponent(
                                       self.uiLogPane)).addContainerGap(
                                           26, lang.Short.MAX_VALUE)))

        layout.setVerticalGroup(
            layout.createParallelGroup(swing.GroupLayout.Alignment.LEADING).
            addGroup(layout.createSequentialGroup().addGap(
                15, 15,
                15).addComponent(self.uiLabel).addGap(15, 15, 15).addGroup(
                    layout.createParallelGroup().addComponent(
                        self.uiScopeOnly).addComponent(
                            self.uiScopeAll)).addGap(
                                20, 20, 20).addComponent(self.uipaneA).addGap(
                                    20, 20,
                                    20).addComponent(self.uiLogLabel).addGap(
                                        5, 5,
                                        5).addComponent(self.uiLogPane).addGap(
                                            20, 20, 20)))
示例#6
0
    def initUI(self):
        self.tab = swing.JPanel()

        # UI for Decrypt Key
        self.decryptLabel = swing.JLabel("Decrypt Key:")
        self.decryptLabel.setFont(Font("Tahoma", Font.BOLD, 14))
        self.decryptLabel.setForeground(Color(255,102,52))
        self.urlLabel = swing.JLabel("URL:")
        self.urlTxtField = swing.JTextField("http://localhost/Telerik.Web.UI.DialogHandler.aspx", 40)
        self.charLabel = swing.JLabel("Character Set:")
        self.hexRadio = swing.JRadioButton("Hex", True)
        self.asciiRadio = swing.JRadioButton("ASCII", False)
        self.btnGroup = swing.ButtonGroup()
        self.btnGroup.add(self.hexRadio)
        self.btnGroup.add(self.asciiRadio)
        self.decryptBtn = swing.JButton("Decrypt Key", actionPerformed=self.mode_brutekey)
        self.cancelBtn = swing.JButton("Cancel", actionPerformed=self.cancel)

        # UI for Output
        self.outputLabel = swing.JLabel("Log:")
        self.outputLabel.setFont(Font("Tahoma", Font.BOLD, 14))
        self.outputLabel.setForeground(Color(255,102,52))
        self.logPane = swing.JScrollPane()
        self.outputTxtArea = swing.JTextArea()
        self.outputTxtArea.setFont(Font("Consolas", Font.PLAIN, 12))
        self.outputTxtArea.setLineWrap(True)
        self.logPane.setViewportView(self.outputTxtArea)
        self.clearBtn = swing.JButton("Clear Log", actionPerformed=self.clearLog)

        # Layout
        layout = swing.GroupLayout(self.tab)
        layout.setAutoCreateGaps(True)
        layout.setAutoCreateContainerGaps(True)
        self.tab.setLayout(layout)

        layout.setHorizontalGroup(
            layout.createParallelGroup()
            .addGroup(layout.createSequentialGroup()
                .addGroup(layout.createParallelGroup()
                    .addComponent(self.decryptLabel)
                    .addComponent(self.urlLabel)
                    .addComponent(self.urlTxtField, swing.GroupLayout.PREFERRED_SIZE, swing.GroupLayout.DEFAULT_SIZE, swing.GroupLayout.PREFERRED_SIZE)
                    .addComponent(self.charLabel)
                    .addGroup(layout.createSequentialGroup()
                        .addComponent(self.hexRadio)
                        .addComponent(self.asciiRadio)
                    )
                    .addGroup(layout.createSequentialGroup()
                    	.addComponent(self.decryptBtn)
                    	.addComponent(self.cancelBtn)
                    )
                )
                .addGroup(layout.createParallelGroup()
                    .addComponent(self.outputLabel)
                    .addComponent(self.logPane)
                    .addComponent(self.clearBtn)
                )
            )
        )
        
        layout.setVerticalGroup(
            layout.createParallelGroup()
            .addGroup(layout.createParallelGroup()
                .addGroup(layout.createSequentialGroup()
                    .addComponent(self.decryptLabel)
                    .addComponent(self.urlLabel)
                    .addComponent(self.urlTxtField, swing.GroupLayout.PREFERRED_SIZE, swing.GroupLayout.DEFAULT_SIZE, swing.GroupLayout.PREFERRED_SIZE)
                    .addComponent(self.charLabel)
                    .addGroup(layout.createParallelGroup()
                        .addComponent(self.hexRadio)
                        .addComponent(self.asciiRadio)
                    )
                    .addGroup(layout.createParallelGroup()
	                    .addComponent(self.decryptBtn)
	                    .addComponent(self.cancelBtn)
                    )
                )
                .addGroup(layout.createSequentialGroup()
                    .addComponent(self.outputLabel)
                    .addComponent(self.logPane)
                    .addComponent(self.clearBtn)
                )
            )
        )
示例#7
0
    def initGui(self):

        # Define elements        
        self.tab = swing.JPanel()
        self.settingsLabel = swing.JLabel("Settings:")
        self.settingsLabel.setFont(Font("Tahoma", 1, 12));
        self.boringHeadersLabel = swing.JLabel("Boring Headers")
        self.pasteButton = swing.JButton("Paste", actionPerformed=self.paste)
        self.loadButton = swing.JButton("Load", actionPerformed=self.load)
        self.removeButton = swing.JButton("Remove", actionPerformed=self.remove)
        self.clearButton = swing.JButton("Clear", actionPerformed=self.clear)
        self.jScrollPane1 = swing.JScrollPane()
        self.boringHeadersList = swing.JList()
        self.addButton = swing.JButton("Add", actionPerformed=self.add)
        self.addTF = swing.JTextField("New item...", focusGained=self.emptyTF, focusLost=self.fillTF)
        self.interestingHeadersCB = swing.JCheckBox("Check for Interesting Headers")
        self.securityHeadersCB = swing.JCheckBox("Check for Security Headers", actionPerformed=self.onSelect)
        self.xFrameOptionsCB = swing.JCheckBox("X-Frame-Options")
        self.xContentTypeOptionsCB = swing.JCheckBox("X-Content-Type-Options")
        self.xXssProtectionCB = swing.JCheckBox("X-XSS-Protection")
        self.HstsCB = swing.JCheckBox("Strict-Transport-Security (HSTS)")
        self.CorsCB = swing.JCheckBox("Access-Control-Allow-Origin (CORS)")
        self.contentSecurityPolicyCB = swing.JCheckBox("Content-Security-Policy")
        self.xPermittedCrossDomainPoliciesCB = swing.JCheckBox("X-Permitted-Cross-Domain-Policies")
        self.outputLabel = swing.JLabel("Output:")
        self.outputLabel.setFont(Font("Tahoma", 1, 12));
        self.logsLabel = swing.JLabel("Logs")
        self.jScrollPane2 = swing.JScrollPane()
        self.logsTA = swing.JTextArea()
        self.exportButton = swing.JButton("Export in report friendly format", actionPerformed=self.export)

        self.jScrollPane1.setViewportView(self.boringHeadersList)
        self.logsTA.setColumns(20)
        self.logsTA.setRows(7)
        self.jScrollPane2.setViewportView(self.logsTA)

        # Configure layout

        layout = swing.GroupLayout(self.tab)
        self.tab.setLayout(layout)
        layout.setHorizontalGroup(
            layout.createParallelGroup(swing.GroupLayout.Alignment.LEADING)
            .addGroup(layout.createSequentialGroup()
                .addGap(33, 33, 33)
                .addGroup(layout.createParallelGroup(swing.GroupLayout.Alignment.LEADING)
                    .addGroup(layout.createSequentialGroup()
                        .addGap(83, 83, 83)
                        .addComponent(self.boringHeadersLabel))
                    .addComponent(self.settingsLabel)
                    .addGroup(layout.createSequentialGroup()
                        .addComponent(self.interestingHeadersCB)
                        .addGap(149, 149, 149)
                        .addGroup(layout.createParallelGroup(swing.GroupLayout.Alignment.LEADING)
                            .addComponent(self.securityHeadersCB)
                            .addComponent(self.HstsCB)
                            .addGroup(layout.createSequentialGroup()
                                .addGroup(layout.createParallelGroup(swing.GroupLayout.Alignment.LEADING)
                                    .addGroup(swing.GroupLayout.Alignment.TRAILING, layout.createParallelGroup(swing.GroupLayout.Alignment.LEADING)
                                        .addGroup(layout.createSequentialGroup()
                                            .addComponent(self.xFrameOptionsCB)
                                            .addGap(83, 83, 83))
                                        .addGroup(layout.createSequentialGroup()
                                            .addComponent(self.xContentTypeOptionsCB)
                                            .addGap(47, 47, 47)))
                                    .addGroup(layout.createSequentialGroup()
                                        .addComponent(self.xXssProtectionCB)
                                        .addGap(83, 83, 83)))
                                .addGroup(layout.createParallelGroup(swing.GroupLayout.Alignment.LEADING)
                                    .addComponent(self.xPermittedCrossDomainPoliciesCB)
                                    .addComponent(self.contentSecurityPolicyCB)
                                    .addComponent(self.CorsCB)))))
                    .addGroup(layout.createSequentialGroup()
                        .addGroup(layout.createParallelGroup(swing.GroupLayout.Alignment.TRAILING)
                            .addComponent(self.addButton)
                            .addGroup(layout.createParallelGroup(swing.GroupLayout.Alignment.LEADING)
                                .addComponent(self.outputLabel)
                                .addGroup(layout.createParallelGroup(swing.GroupLayout.Alignment.TRAILING, False)
                                    .addComponent(self.removeButton, swing.GroupLayout.DEFAULT_SIZE, swing.GroupLayout.DEFAULT_SIZE, lang.Short.MAX_VALUE)
                                    .addComponent(self.pasteButton, swing.GroupLayout.DEFAULT_SIZE, swing.GroupLayout.DEFAULT_SIZE, lang.Short.MAX_VALUE)
                                    .addComponent(self.loadButton, swing.GroupLayout.DEFAULT_SIZE, swing.GroupLayout.DEFAULT_SIZE, lang.Short.MAX_VALUE)
                                    .addComponent(self.clearButton, swing.GroupLayout.DEFAULT_SIZE, swing.GroupLayout.PREFERRED_SIZE, lang.Short.MAX_VALUE))))
                        .addPreferredGap(swing.LayoutStyle.ComponentPlacement.UNRELATED)
                        .addGroup(layout.createParallelGroup(swing.GroupLayout.Alignment.LEADING)
                            .addComponent(self.jScrollPane1, swing.GroupLayout.PREFERRED_SIZE, 200, swing.GroupLayout.PREFERRED_SIZE)
                            .addComponent(self.addTF, swing.GroupLayout.PREFERRED_SIZE, 200, swing.GroupLayout.PREFERRED_SIZE)
                            .addComponent(self.jScrollPane2, swing.GroupLayout.PREFERRED_SIZE, 450, swing.GroupLayout.PREFERRED_SIZE)
                            .addComponent(self.logsLabel)
                            .addComponent(self.exportButton))))
                .addContainerGap(26, lang.Short.MAX_VALUE))
        )

        layout.setVerticalGroup(
            layout.createParallelGroup(swing.GroupLayout.Alignment.LEADING)
            .addGroup(layout.createSequentialGroup()
                .addGap(41, 41, 41)
                .addComponent(self.settingsLabel)
                .addGap(31, 31, 31)
                .addGroup(layout.createParallelGroup(swing.GroupLayout.Alignment.BASELINE)
                    .addComponent(self.interestingHeadersCB)
                    .addComponent(self.securityHeadersCB))
                .addGap(26, 26, 26)
                .addComponent(self.boringHeadersLabel)
                .addPreferredGap(swing.LayoutStyle.ComponentPlacement.UNRELATED)
                .addGroup(layout.createParallelGroup(swing.GroupLayout.Alignment.LEADING)
                    .addGroup(layout.createSequentialGroup()
                        .addGroup(layout.createParallelGroup(swing.GroupLayout.Alignment.LEADING)
                            .addGroup(layout.createSequentialGroup()
                                .addComponent(self.pasteButton)
                                .addPreferredGap(swing.LayoutStyle.ComponentPlacement.RELATED)
                                .addComponent(self.loadButton)
                                .addPreferredGap(swing.LayoutStyle.ComponentPlacement.RELATED)
                                .addComponent(self.removeButton)
                                .addPreferredGap(swing.LayoutStyle.ComponentPlacement.RELATED)
                                .addComponent(self.clearButton))
                            .addComponent(self.jScrollPane1, swing.GroupLayout.PREFERRED_SIZE, 138, swing.GroupLayout.PREFERRED_SIZE))
                        .addGap(18, 18, 18)
                        .addGroup(layout.createParallelGroup(swing.GroupLayout.Alignment.BASELINE)
                            .addComponent(self.addButton)
                            .addComponent(self.addTF, swing.GroupLayout.PREFERRED_SIZE, swing.GroupLayout.DEFAULT_SIZE, swing.GroupLayout.PREFERRED_SIZE)))
                    .addGroup(layout.createSequentialGroup()
                        .addGroup(layout.createParallelGroup(swing.GroupLayout.Alignment.BASELINE)
                            .addComponent(self.xFrameOptionsCB)
                            .addComponent(self.CorsCB))
                        .addPreferredGap(swing.LayoutStyle.ComponentPlacement.UNRELATED)
                        .addGroup(layout.createParallelGroup(swing.GroupLayout.Alignment.LEADING)
                            .addComponent(self.xContentTypeOptionsCB)
                            .addComponent(self.contentSecurityPolicyCB, swing.GroupLayout.Alignment.TRAILING))
                        .addPreferredGap(swing.LayoutStyle.ComponentPlacement.RELATED)
                        .addGroup(layout.createParallelGroup(swing.GroupLayout.Alignment.BASELINE)
                            .addComponent(self.xXssProtectionCB)
                            .addComponent(self.xPermittedCrossDomainPoliciesCB))
                        .addPreferredGap(swing.LayoutStyle.ComponentPlacement.UNRELATED)
                        .addComponent(self.HstsCB)))
                .addGap(30, 30, 30)
                .addComponent(self.outputLabel)
                .addPreferredGap(swing.LayoutStyle.ComponentPlacement.RELATED)
                .addComponent(self.logsLabel)
                .addGap(8, 8, 8)
                .addComponent(self.jScrollPane2, swing.GroupLayout.PREFERRED_SIZE, 250, swing.GroupLayout.PREFERRED_SIZE)
                .addPreferredGap(swing.LayoutStyle.ComponentPlacement.RELATED)
                .addComponent(self.exportButton)
                .addContainerGap(swing.GroupLayout.DEFAULT_SIZE, lang.Short.MAX_VALUE))
        )
 def drawUI(self):
     # Make a whole Burp Suite tab just for this plugin
     self.tab = swing.JPanel()
     # Draw title area
     self.uiLabel = swing.JLabel('Site Map to CSV Options')
     self.uiLabel.setFont(Font('Tahoma', Font.BOLD, 14))
     self.uiLabel.setForeground(Color(235,136,0))
     # UI for high-level options
     self.uiScopeOnly = swing.JRadioButton('In-scope only', True)
     self.uiScopeAll = swing.JRadioButton('All (disregard scope)', False)
     self.uiScopeButtonGroup = swing.ButtonGroup()
     self.uiScopeButtonGroup.add(self.uiScopeOnly)
     self.uiScopeButtonGroup.add(self.uiScopeAll)
     # Draw areas in the tab to keep different UI commands separate
     self.uipaneA = swing.JSplitPane(swing.JSplitPane.HORIZONTAL_SPLIT)
     self.uipaneA.setMaximumSize(Dimension(900,125))
     self.uipaneA.setDividerSize(2)
     self.uipaneB = swing.JSplitPane(swing.JSplitPane.HORIZONTAL_SPLIT)
     self.uipaneB.setDividerSize(2)
     self.uipaneA.setRightComponent(self.uipaneB)
     self.uipaneA.setBorder(BorderFactory.createLineBorder(Color.black))
     # Fill in UI area for response code filters
     self.uiCodesPanel = swing.JPanel()
     self.uiCodesPanel.setPreferredSize(Dimension(200, 75))
     self.uiCodesPanel.setBorder(EmptyBorder(10,10,10,10))
     self.uiCodesPanel.setLayout(BorderLayout())
     self.uiCodesLabel = swing.JLabel('Response code filters')
     self.uiCodesLabel.setFont(Font('Tahoma', Font.BOLD, 14))
     self.uiRcodePanel = swing.JPanel()
     self.uiRcodePanel.setLayout(GridLayout(1,1))
     self.uiRcode1xx = swing.JCheckBox('1XX  ', False)
     self.uiRcode2xx = swing.JCheckBox('2XX  ', True)
     self.uiRcode3xx = swing.JCheckBox('3XX  ', True)
     self.uiRcode4xx = swing.JCheckBox('4XX  ', True)
     self.uiRcode5xx = swing.JCheckBox('5XX     ', True)
     self.uiRcodePanel.add(self.uiRcode1xx)
     self.uiRcodePanel.add(self.uiRcode2xx)
     self.uiRcodePanel.add(self.uiRcode3xx)
     self.uiRcodePanel.add(self.uiRcode4xx)
     self.uiRcodePanel.add(self.uiRcode5xx)
     self.uiCodesPanel.add(self.uiCodesLabel,BorderLayout.NORTH)
     self.uiCodesPanel.add(self.uiRcodePanel,BorderLayout.WEST)
     self.uipaneA.setLeftComponent(self.uiCodesPanel)
     # Fill in UI area for initiating export to CSV
     self.uiExportPanel = swing.JPanel()
     self.uiExportPanel.setPreferredSize(Dimension(200, 75))
     self.uiExportPanel.setBorder(EmptyBorder(10,10,10,10))
     self.uiExportPanel.setLayout(BorderLayout())
     self.uiExportLabel = swing.JLabel('Export')
     self.uiExportLabel.setFont(Font('Tahoma', Font.BOLD, 14))
     self.uiMustHaveResponse = swing.JRadioButton('Must have a response     ', True)
     self.uiAllRequests = swing.JRadioButton('All (overrides response code filters)     ', False)
     self.uiResponseButtonGroup = swing.ButtonGroup()
     self.uiResponseButtonGroup.add(self.uiMustHaveResponse)
     self.uiResponseButtonGroup.add(self.uiAllRequests)
     self.uiExportRun = swing.JButton('Export',actionPerformed=self.exportAndSaveCsv)
     self.uiExportButtonPanel = swing.JPanel()
     self.uiExportButtonPanel.add(self.uiExportRun)    
     self.uiExportPanel.add(self.uiExportLabel,BorderLayout.NORTH)
     self.uiExportPanel.add(self.uiMustHaveResponse,BorderLayout.WEST)
     self.uiExportPanel.add(self.uiAllRequests,BorderLayout.CENTER)
     self.uiExportPanel.add(self.uiExportButtonPanel,BorderLayout.SOUTH)
     self.uipaneB.setLeftComponent(self.uiExportPanel)
     # Common UI stuff
     layout = swing.GroupLayout(self.tab)
     self.tab.setLayout(layout)
     # Thank you to Smeege (https://github.com/SmeegeSec/Burp-Importer/) for helping me figure out how this works.
     # He in turn gave credit to Antonio Sanchez (https://github.com/Dionach/HeadersAnalyzer/)
     layout.setHorizontalGroup(
         layout.createParallelGroup(swing.GroupLayout.Alignment.LEADING)
         .addGroup(layout.createSequentialGroup()
             .addGap(10, 10, 10)
             .addGroup(layout.createParallelGroup(swing.GroupLayout.Alignment.LEADING)
                 .addComponent(self.uiLabel)
                 .addGroup(layout.createSequentialGroup()
                     .addGap(10,10,10)
                     .addComponent(self.uiScopeOnly)
                     .addGap(10,10,10)
                     .addComponent(self.uiScopeAll))
                 .addGap(15,15,15)
                 .addComponent(self.uipaneA))
             .addContainerGap(26, lang.Short.MAX_VALUE)))
     layout.setVerticalGroup(
         layout.createParallelGroup(swing.GroupLayout.Alignment.LEADING)
         .addGroup(layout.createSequentialGroup()
             .addGap(15,15,15)
             .addComponent(self.uiLabel)
             .addGap(15,15,15)
             .addGroup(layout.createParallelGroup()
                 .addComponent(self.uiScopeOnly)
                 .addComponent(self.uiScopeAll))
             .addGap(20,20,20)
             .addComponent(self.uipaneA)
             .addGap(20,20,20)
             .addGap(5,5,5)
             .addGap(20,20,20)))
示例#9
0
	def initGui(self):
		self.tab = swing.JPanel()
		layout = swing.GroupLayout(self.tab)
		self.tab.setLayout(layout)
		self.titleLabel = swing.JLabel("RSA Plugin")
		self.titleLabel.setFont(Font("Tahoma", 1, 16))
 		self.titleLabel.setForeground(Color(235,136,0))
		self.infoLabel = swing.JLabel("Try to use eazier by use custom cotext menu button for RSA en/decode.")
		self.infoLabel.setFont(Font("Tahoma", 0, 12))
		self.attentionLabel = swing.JLabel("[*] ONlY SUPPORT PKCS#1, you could trans PKCS#8 to PKCS#1 for use this extension.")
		self.attentionLabel.setFont(Font("Tahoma", 1, 12))
 		self.attentionLabel.setForeground(Color(255,0,0))
		self.keyLabel = swing.JLabel("RSA keys")
		self.keyLabel.setFont(Font("Tahoma", 1, 12))
		self.rsapublickeyLabel = swing.JLabel("PublicKey")
		self.rsapublickeyTextArea = swing.JTextArea("")
		self.rsaprivatekeyLabel = swing.JLabel("PrivateKey")
		self.rsaprivatekeyTextArea = swing.JTextArea("")
		self.setkeyButton = swing.JButton("Set", actionPerformed=self.setOptions)
		self.generateButton = swing.JButton("Generate", actionPerformed=self.generateKeys)
		self.settingLabel = swing.JLabel("Settings")
		self.settingLabel.setFont(Font("Tahoma", 1, 12))
		self.autoreplaceCheckBox = swing.JCheckBox("Auto Replace (auto replace the words selected with the RSA result)", actionPerformed=self.autoReplaceCheck)
		self.urlcodeenableCheckBox = swing.JCheckBox("Urlcode Enable (for the data needs to be base64 en/decoded before/after RSA)", actionPerformed=self.urlcodeEnableCheck)
		self.logLabel = swing.JLabel("Log")
		self.logLabel.setFont(Font("Tahoma", 1, 12))
		self.logPane = swing.JScrollPane()
		self.logArea = swing.JTextArea("RSA Log - Every action's info will be appended here.\n")
		self.logArea.setLineWrap(True)
		self.logPane.setViewportView(self.logArea)
		self.logClearButton = swing.JButton("Clear", actionPerformed=self.logClear)
		self.bar = swing.JSeparator(swing.SwingConstants.HORIZONTAL)
		self.bar2 = swing.JSeparator(swing.SwingConstants.HORIZONTAL)
		self.bar3 = swing.JSeparator(swing.SwingConstants.HORIZONTAL)
		# 设置水平布局
		layout.setHorizontalGroup(
			layout.createParallelGroup(swing.GroupLayout.Alignment.LEADING)
			.addGroup(layout.createSequentialGroup()
				.addGap(15)
				.addGroup(layout.createParallelGroup(swing.GroupLayout.Alignment.LEADING)
					.addComponent(self.titleLabel)
					.addComponent(self.infoLabel)
					.addComponent(self.attentionLabel)
					.addComponent(self.bar)
					.addComponent(self.keyLabel)
					.addGroup(layout.createSequentialGroup()
						.addGroup(layout.createParallelGroup()
							.addComponent(self.setkeyButton)
							.addComponent(self.generateButton))
						.addPreferredGap(swing.LayoutStyle.ComponentPlacement.UNRELATED)
						.addGroup(layout.createParallelGroup()
							.addComponent(self.rsapublickeyLabel)
							.addComponent(self.rsapublickeyTextArea, swing.GroupLayout.PREFERRED_SIZE, 500, swing.GroupLayout.PREFERRED_SIZE))
						.addPreferredGap(swing.LayoutStyle.ComponentPlacement.UNRELATED)
						.addGroup(layout.createParallelGroup()
							.addComponent(self.rsaprivatekeyLabel)
							.addComponent(self.rsaprivatekeyTextArea, swing.GroupLayout.PREFERRED_SIZE, 500, swing.GroupLayout.PREFERRED_SIZE)))
					.addComponent(self.bar2)
					.addGroup(layout.createSequentialGroup()
						.addGroup(layout.createParallelGroup()
							.addComponent(self.settingLabel))
						.addPreferredGap(swing.LayoutStyle.ComponentPlacement.UNRELATED)
						.addGroup(layout.createParallelGroup()
							.addComponent(self.autoreplaceCheckBox)
							.addComponent(self.urlcodeenableCheckBox)))
					.addComponent(self.bar3)
					.addComponent(self.logLabel)
					.addGroup(layout.createSequentialGroup()
						.addGroup(layout.createParallelGroup()
							.addComponent(self.logClearButton))
						.addPreferredGap(swing.LayoutStyle.ComponentPlacement.UNRELATED)
						.addGroup(layout.createParallelGroup()
							.addComponent(self.logPane, swing.GroupLayout.PREFERRED_SIZE, 1100, swing.GroupLayout.PREFERRED_SIZE)))
					)))
		# 设置垂直布局
		layout.setVerticalGroup(
			layout.createParallelGroup(swing.GroupLayout.Alignment.LEADING)
			.addGroup(layout.createSequentialGroup()
				.addGap(15)
				.addComponent(self.titleLabel)
				.addGap(10)
				.addComponent(self.infoLabel)
				.addGap(10)
				.addComponent(self.attentionLabel)
				.addGap(10)
				.addComponent(self.bar)
				.addGap(10)
				.addComponent(self.keyLabel)
				.addGap(10)
				.addGroup(layout.createSequentialGroup()
					.addGroup(layout.createParallelGroup()
						.addComponent(self.rsapublickeyLabel)
						.addComponent(self.rsaprivatekeyLabel))
					.addPreferredGap(swing.LayoutStyle.ComponentPlacement.UNRELATED)
					.addGroup(layout.createParallelGroup()
						.addGroup(layout.createSequentialGroup()
							.addComponent(self.setkeyButton)
							.addGap(20)
							.addComponent(self.generateButton))
						.addComponent(self.rsapublickeyTextArea, swing.GroupLayout.PREFERRED_SIZE, 250, swing.GroupLayout.PREFERRED_SIZE)
						.addComponent(self.rsaprivatekeyTextArea, swing.GroupLayout.PREFERRED_SIZE, 250, swing.GroupLayout.PREFERRED_SIZE)))
				.addGap(10)
				.addComponent(self.bar2)
				.addGap(10)
				.addGroup(layout.createSequentialGroup()
					.addGroup(layout.createParallelGroup()
						.addComponent(self.settingLabel))
					.addPreferredGap(swing.LayoutStyle.ComponentPlacement.UNRELATED)
					.addGroup(layout.createSequentialGroup()
						.addComponent(self.autoreplaceCheckBox)
						.addGap(5)
						.addComponent(self.urlcodeenableCheckBox)))
				.addGap(10)
				.addComponent(self.bar3)
				.addGap(10)
				.addComponent(self.logLabel)
				.addGap(10)
				.addGroup(layout.createParallelGroup()
					.addComponent(self.logClearButton)
					.addComponent(self.logPane, swing.GroupLayout.PREFERRED_SIZE, 400, swing.GroupLayout.PREFERRED_SIZE))
				))