Ejemplo n.º 1
0
 def _initTab(self, callbacks):
     '''
     Initial Burp Tab View
     '''
     self._toolkitTab = swing.JTabbedPane()
     self._toolkitTab.addTab('Tomcat Fs Login', self._tomcatMainPanel)
     callbacks.customizeUiComponent(self._toolkitTab)
     callbacks.addSuiteTab(self)
Ejemplo n.º 2
0
 def create(self):
     if len(ViewConfig.tabs) == 1:
         panel = TabView(tab)
         self.extension = panel.fetch_panel()
     else:
         self.extension = swing.JTabbedPane()
         #各パネルをタブの下に
         for tab_name in ViewConfig.tabs:
             tab = TabView(tab_name)
             self.extension.addTab(tab_name, tab.fetch_panel())
Ejemplo n.º 3
0
 def reportSolution(self, output):#w#for genome-scale analysis
     sampletabs = swing.JTabbedPane()
     samples, monitors = QSSPN.Table.output2table(output)
     outputtable=[]
     for i in range(len(samples)):
         sample = samples[i]
         table = QSSPNTable(); table.write_output(sample, monitors, 'Output')
         tab = swing.JScrollPane(table)
         sampletabs.addTab('Sample'+str(i+1), tab)
         outputtable+=[table]
     TabCloser('Output').put(sampletabs, self)
     for table in outputtable: table.setColWidths_gsa(self.getWidth())
     if self.listener: self.listener()
Ejemplo n.º 4
0
    def registerExtenderCallbacks(self, callbacks):

        sys.stdout = callbacks.getStdout()
        self._callbacks = callbacks
        callbacks.setExtensionName("CMDinjection")
        callbacks.registerExtensionStateListener(self)
        self._helpers = callbacks.getHelpers()
        self.is_logger_init = False
        callbacks.registerContextMenuFactory(self)

        self._jConfigTab = swing.JTabbedPane()
        self.arrange_request_tab()
        self.arrange_detail_tab()
        
        callbacks.customizeUiComponent(self._jConfigTab)
        callbacks.addSuiteTab(self)
        return
Ejemplo n.º 5
0
    def showControlTable(self):
        self.contabs = swing.JTabbedPane()
        #lines_para, lines_monitor, lines_state, lines_func = loadControl()
        self.table_para = QSSPNTable(); self.table_para.write_control('ConPara', self.qsspn);tab_para = swing.JScrollPane(self.table_para)
        self.table_init = QSSPNTable(); self.table_init.write_control('ConInit', self.qsspn);tab_init = swing.JScrollPane(self.table_init)
        self.table_func = QSSPNTable(); self.table_func.write_control('ConFunc', self.qsspn);tab_func = swing.JScrollPane(self.table_func)
        self.table_flux = QSSPNTable(); self.table_flux.write_control('ConFlux', self.qsspn);tab_flux = swing.JScrollPane(self.table_flux)
        self.contabs.addTab('Parameters', tab_para)
        self.contabs.addTab('InitialStates', tab_init)
        self.contabs.addTab('Functions', tab_func)
        self.contabs.addTab('FluxMap', tab_flux)
#        scrollpane = swing.JScrollPane(table_control)
        self.addTab("Control", self.contabs)
#            TabCloser("Control").put(scrollpane, self)
        self.table_para.setColWidths_gsa(self.getWidth())
        self.table_init.setColWidths_gsa(self.getWidth())
        self.table_func.setColWidths_gsa(self.getWidth())
        self.table_flux.setColWidths_gsa(self.getWidth())
Ejemplo n.º 6
0
    def __init__(self):
        swing.JFrame.__init__(self)
        self.title='Network Application Organizer'
        self.windowClosing=lambda x: sys.exit()

        self.namePane=swing.JPanel(layout=java.awt.BorderLayout())
        self.namePane.add(swing.JLabel('Name:'),'West')
        self.nameText=swing.JTextField(actionPerformed=self.onTrySetName)
        self.namePane.add(self.nameText)
        self.contentPane.add(self.namePane,'North')

        self.tab=swing.JTabbedPane()
        
        self.runningAppData=RunningAppTableModel()
        self.table=swing.JTable(self.runningAppData)
        self.table.selectionMode=swing.ListSelectionModel.SINGLE_SELECTION
        self.table.preferredScrollableViewportSize=300,50
        self.table.mouseClicked=self.onTableClicked

        self.appTypeList=swing.JList(mouseClicked=self.onTypeListClicked,valueChanged=self.onTypeListSelectionChanged)
        createPane=swing.JPanel(layout=java.awt.BorderLayout())
        createPane.add(swing.JScrollPane(self.appTypeList),'West')
        self.startAppButton=swing.JButton('Start',actionPerformed=self.onStartApp)
        createPane.add(self.startAppButton,'East')

        self.optionPanelLayout=java.awt.CardLayout()
        self.optionPanel=swing.JPanel(layout=self.optionPanelLayout)
        self.optionEditor=swing.JComboBox(font=swing.JTable().font)
        createPane.add(self.optionPanel)

        self.tab.addTab('Start New App',createPane)
        self.tab.addTab('Running Apps',swing.JScrollPane(self.table))

        self.contentPane.add(self.tab)
        
        self.pack()
        self.show()
Ejemplo n.º 7
0
    def registerExtenderCallbacks(self, callbacks):
    
        # Required for easier debugging: 
        # https://github.com/securityMB/burp-exceptions
        sys.stdout = callbacks.getStdout()

        # Keep a reference to our callbacks object
        self.callbacks = callbacks

        # Set our extension name
        self.callbacks.setExtensionName("Encode/Decode/Hash")
        
        # Create the tab
        self.tab = swing.JPanel(BorderLayout())

        # Create the text area at the top of the tab
        textPanel = swing.JPanel()
        
        # Create the label for the text area
        boxVertical = swing.Box.createVerticalBox()
        boxHorizontal = swing.Box.createHorizontalBox()
        textLabel = swing.JLabel("Text to be encoded/decoded/hashed")
        boxHorizontal.add(textLabel)
        boxVertical.add(boxHorizontal)

        # Create the text area itself
        boxHorizontal = swing.Box.createHorizontalBox()
        self.textArea = swing.JTextArea('', 6, 100)
        self.textArea.setLineWrap(True)
        scroll = swing.JScrollPane(self.textArea)
        boxHorizontal.add(scroll)
        boxVertical.add(boxHorizontal)

        # Add the text label and area to the text panel
        textPanel.add(boxVertical)

        # Add the text panel to the top of the main tab
        self.tab.add(textPanel, BorderLayout.NORTH)

        # Created a tabbed pane to go in the center of the
        # main tab, below the text area
        tabbedPane = swing.JTabbedPane()
        self.tab.add("Center", tabbedPane);

        # First tab
        firstTab = swing.JPanel()
        firstTab.layout = BorderLayout()
        tabbedPane.addTab("Encode", firstTab)

        # Button for first tab
        buttonPanel = swing.JPanel()
        buttonPanel.add(swing.JButton('Encode', actionPerformed=self.handleButtonClick))
        firstTab.add(buttonPanel, "North")

        # Panel for the encoders. Each label and text field
        # will go in horizontal boxes which will then go in 
        # a vertical box
        encPanel = swing.JPanel()
        boxVertical = swing.Box.createVerticalBox()
        
        boxHorizontal = swing.Box.createHorizontalBox()
        self.b64EncField = swing.JTextArea('', 3, 65)
        self.b64EncField.setLineWrap(True)
        scroll = swing.JScrollPane(self.b64EncField)
        boxHorizontal.add(swing.JLabel("  Base64   :"))
        boxHorizontal.add(scroll)
        boxVertical.add(boxHorizontal)

        boxHorizontal = swing.Box.createHorizontalBox()
        self.urlEncField = swing.JTextArea('', 3, 65)
        self.urlEncField.setLineWrap(True)
        scroll = swing.JScrollPane(self.urlEncField)
        boxHorizontal.add(swing.JLabel("  URL         :"))
        boxHorizontal.add(scroll)
        boxVertical.add(boxHorizontal)

        boxHorizontal = swing.Box.createHorizontalBox()
        self.asciiHexEncField = swing.JTextArea('', 3, 65)
        self.asciiHexEncField.setLineWrap(True)
        scroll = swing.JScrollPane(self.asciiHexEncField)
        boxHorizontal.add(swing.JLabel("  Ascii Hex :"))
        boxHorizontal.add(scroll)
        boxVertical.add(boxHorizontal)

        boxHorizontal = swing.Box.createHorizontalBox()
        self.htmlEncField = swing.JTextArea('', 3, 65)
        self.htmlEncField.setLineWrap(True)
        scroll = swing.JScrollPane(self.htmlEncField)
        boxHorizontal.add(swing.JLabel("  HTML       :"))
        boxHorizontal.add(scroll)
        boxVertical.add(boxHorizontal)

        boxHorizontal = swing.Box.createHorizontalBox()
        self.jsEncField = swing.JTextArea('', 3, 65)
        self.jsEncField.setLineWrap(True)
        scroll = swing.JScrollPane(self.jsEncField)
        boxHorizontal.add(swing.JLabel("  JavaScript:"))
        boxHorizontal.add(scroll)
        boxVertical.add(boxHorizontal)

        # Add the vertical box to the Encode tab
        firstTab.add(boxVertical, "Center")

        # Repeat the same process for the remaining tabs
        secondTab = swing.JPanel()
        secondTab.layout = BorderLayout()
        tabbedPane.addTab("Decode", secondTab)

        buttonPanel = swing.JPanel()
        buttonPanel.add(swing.JButton('Decode', actionPerformed=self.handleButtonClick))
        secondTab.add(buttonPanel, "North")

        decPanel = swing.JPanel()
        boxVertical = swing.Box.createVerticalBox()
        
        boxHorizontal = swing.Box.createHorizontalBox()
        self.b64DecField = swing.JTextArea('', 3, 65)
        self.b64DecField.setLineWrap(True)
        scroll = swing.JScrollPane(self.b64DecField)
        boxHorizontal.add(swing.JLabel("  Base64   :"))
        boxHorizontal.add(scroll)
        boxVertical.add(boxHorizontal)

        boxHorizontal = swing.Box.createHorizontalBox()
        self.urlDecField = swing.JTextArea('', 3, 65)
        self.urlDecField.setLineWrap(True)
        scroll = swing.JScrollPane(self.urlDecField)
        boxHorizontal.add(swing.JLabel("  URL         :"))
        boxHorizontal.add(scroll)
        boxVertical.add(boxHorizontal)

        boxHorizontal = swing.Box.createHorizontalBox()
        self.asciiHexDecField = swing.JTextArea('', 3, 75)
        self.asciiHexDecField.setLineWrap(True)
        scroll = swing.JScrollPane(self.asciiHexDecField)
        boxHorizontal.add(swing.JLabel("  Ascii Hex :"))
        boxHorizontal.add(scroll)
        boxVertical.add(boxHorizontal)

        boxHorizontal = swing.Box.createHorizontalBox()
        self.htmlDecField = swing.JTextArea('', 3, 75)
        self.htmlDecField.setLineWrap(True)
        scroll = swing.JScrollPane(self.htmlDecField)
        boxHorizontal.add(swing.JLabel("  HTML       :"))
        boxHorizontal.add(scroll)
        boxVertical.add(boxHorizontal)

        boxHorizontal = swing.Box.createHorizontalBox()
        self.jsDecField = swing.JTextArea('', 3, 65)
        self.jsDecField.setLineWrap(True)
        scroll = swing.JScrollPane(self.jsDecField)
        boxHorizontal.add(swing.JLabel("  JavaScript:"))
        boxHorizontal.add(scroll)
        boxVertical.add(boxHorizontal)

        secondTab.add(boxVertical, "Center")

        thirdTab = swing.JPanel()
        thirdTab.layout = BorderLayout()
        tabbedPane.addTab("Hash", thirdTab)

        buttonPanel = swing.JPanel()
        buttonPanel.add(swing.JButton('Hash', actionPerformed=self.handleButtonClick))
        thirdTab.add(buttonPanel, "North")

        decPanel = swing.JPanel()
        boxVertical = swing.Box.createVerticalBox()
        
        boxHorizontal = swing.Box.createHorizontalBox()
        self.md5Field = swing.JTextField('', 75)
        boxHorizontal.add(swing.JLabel("  MD5        :"))
        boxHorizontal.add(self.md5Field)
        boxVertical.add(boxHorizontal)

        boxHorizontal = swing.Box.createHorizontalBox()
        self.sha1Field = swing.JTextField('', 75)
        boxHorizontal.add(swing.JLabel("  SHA-1     :"))
        boxHorizontal.add(self.sha1Field)
        boxVertical.add(boxHorizontal)

        boxHorizontal = swing.Box.createHorizontalBox()
        self.sha256Field = swing.JTextField('', 75)
        boxHorizontal.add(swing.JLabel("  SHA-256 :"))
        boxHorizontal.add(self.sha256Field)
        boxVertical.add(boxHorizontal)

        boxHorizontal = swing.Box.createHorizontalBox()
        self.sha512Field = swing.JTextField('', 75)
        boxHorizontal.add(swing.JLabel("  SHA-512 :"))
        boxHorizontal.add(self.sha512Field)
        boxVertical.add(boxHorizontal)

        boxHorizontal = swing.Box.createHorizontalBox()
        self.ntlmField = swing.JTextField('', 75)
        boxHorizontal.add(swing.JLabel("  NTLM       :"))
        boxHorizontal.add(self.ntlmField)
        boxVertical.add(boxHorizontal)

        thirdTab.add(boxVertical, "Center")

        # Add the custom tab to Burp's UI
        callbacks.addSuiteTab(self)
        return
Ejemplo n.º 8
0
    def registerExtenderCallbacks(self, callbacks):
        # Print information about the plugin, set extension name, setup basic stuff
        self.printHeader()
        callbacks.setExtensionName("BurpHelper")
        self._callbacks = callbacks
        self._helpers = callbacks.getHelpers()
        callbacks.registerContextMenuFactory(self)
        # Create main panel with Components
        self._jTitleFont = Font("", Font.BOLD, 15)

        ##Current IP
        self._jLabelCurrentIPMainText = swing.JLabel()
        self._jLabelCurrentIPDesText = swing.JLabel()
        self._jLabelCurrentWanIpDes = swing.JLabel()
        self._jLabelCurrentLanIpDes = swing.JLabel()
        self._jLabelCurrentWanIp = swing.JLabel()
        self._jLabelCurrentLanIp = swing.JLabel()
        self._jCheckIPButton = swing.JButton("Check IP",
                                             actionPerformed=self.CheckIP)

        ##Proxy Setting

        self._jPAddButton = swing.JButton("Add", actionPerformed=self.PitemAdd)
        self._jPEditButton = swing.JButton("Edit",
                                           actionPerformed=self.PitemEdit)
        self._jPRemoveButton = swing.JButton("Remove",
                                             actionPerformed=self.PitemRemove)
        self._jLabelMainText = swing.JLabel()
        self._jLabelScanIPListen = swing.JLabel()

        self._jScanPanel = swing.JPanel()
        self._jScanPanel.setLayout(None)
        self._jTabledata = MappingTableModel(callbacks, self._jScanPanel)
        self._jTable = swing.JTable(self._jTabledata)
        self._jTablecont = swing.JScrollPane(self._jTable)
        self._jSeparator_first = swing.JSeparator(swing.JSeparator.HORIZONTAL)
        self._jSeparator_second = swing.JSeparator(swing.JSeparator.HORIZONTAL)

        ##Dashboard
        self._jLabelDashboardText = swing.JLabel()
        self._jLabelDashboardDesText = swing.JLabel()
        self._jDTabledata = DashboardTableModel(callbacks, self._jScanPanel)
        self._jDTable = swing.JTable(self._jDTabledata)
        self._jDTablecont = swing.JScrollPane(self._jDTable)

        # Configure GUI
        self._jLabelCurrentIPMainText.setText('Check Current IP ')
        self._jLabelCurrentIPMainText.setForeground(Color(228, 127, 0))
        self._jLabelCurrentIPMainText.setFont(self._jTitleFont)
        self._jLabelCurrentIPDesText.setText('You can check your current IP')
        self._jLabelCurrentWanIpDes.setText("Wan IP : ")
        self._jLabelCurrentLanIpDes.setText("Lan IP : ")

        self._jLabelMainText.setText('Proxy Server Setting')
        self._jLabelMainText.setForeground(Color(228, 127, 0))
        self._jLabelMainText.setFont(self._jTitleFont)
        self._jLabelScanIPListen.setText(
            'You can set the proxy server, When the plugin is loading, Proxy Setting is initialized'
        )
        self._jTable.getColumn("Name").setPreferredWidth(200)
        self._jTable.getColumn("IP").setPreferredWidth(150)
        self._jTable.getColumn("Port").setPreferredWidth(100)
        self._jTable.getColumn("Enabled").setPreferredWidth(50)

        self._jDTable.getColumn("URL").setPreferredWidth(180)
        self._jDTable.getColumn("Privilege").setPreferredWidth(130)
        self._jDTable.getColumn("ID").setPreferredWidth(100)
        self._jDTable.getColumn("Password").setPreferredWidth(100)
        self._jDTable.getColumn("Comment").setPreferredWidth(200)

        self._jScanPanel.setPreferredSize(awt.Dimension(1010, 1010))

        self._jLabelDashboardText.setText('Target Site List')
        self._jLabelDashboardText.setForeground(Color(228, 127, 0))
        self._jLabelDashboardText.setFont(self._jTitleFont)
        self._jLabelDashboardDesText.setText(
            'You can save the account list per site.')
        self._jDAddButton = swing.JButton("Add", actionPerformed=self.DitemAdd)
        self._jDEditButton = swing.JButton("Edit",
                                           actionPerformed=self.DitemEdit)
        self._jDRemoveButton = swing.JButton("Remove",
                                             actionPerformed=self.DitemRemove)
        self._jDIDCopyButton = swing.JButton("ID Copy",
                                             actionPerformed=self.DIDCopy)
        self._jDPwCopyButton = swing.JButton("PW Copy",
                                             actionPerformed=self.DPwCopy)
        self._jDitemsDelete = swing.JButton("Clear",
                                            actionPerformed=self.DitemsDelete)
        self._jDURLConButton = swing.JButton("Open URL",
                                             actionPerformed=self.DOpenURL)

        # Configure locations
        self._jLabelCurrentIPMainText.setBounds(15, 10, 300, 20)
        self._jLabelCurrentIPDesText.setBounds(15, 32, 300, 20)
        self._jLabelCurrentWanIpDes.setBounds(15, 60, 60, 15)
        self._jLabelCurrentLanIpDes.setBounds(15, 80, 60, 15)
        self._jLabelCurrentWanIp.setBounds(80, 60, 100, 15)
        self._jLabelCurrentLanIp.setBounds(80, 80, 100, 15)
        self._jCheckIPButton.setBounds(190, 57, 90, 40)

        self._jSeparator_first.setBounds(15, 110, 900, 15)

        self._jLabelMainText.setBounds(15, 120, 300, 20)
        self._jLabelScanIPListen.setBounds(15, 142, 500, 20)
        self._jPAddButton.setBounds(15, 170, 100, 30)
        self._jPEditButton.setBounds(15, 205, 100, 30)
        self._jPRemoveButton.setBounds(15, 240, 100, 30)
        self._jTablecont.setBounds(120, 170, 600, 150)
        self._jSeparator_second.setBounds(15, 335, 900, 15)

        self._jLabelDashboardText.setBounds(15, 350, 300, 20)
        self._jLabelDashboardDesText.setBounds(15, 372, 300, 20)
        self._jDAddButton.setBounds(15, 400, 100, 30)
        self._jDEditButton.setBounds(15, 435, 100, 30)
        self._jDRemoveButton.setBounds(15, 470, 100, 30)
        self._jDURLConButton.setBounds(15, 505, 100, 30)
        self._jDIDCopyButton.setBounds(15, 540, 100, 30)
        self._jDPwCopyButton.setBounds(15, 575, 100, 30)
        self._jDTablecont.setBounds(120, 400, 750, 205)
        self._jDitemsDelete.setBounds(810, 375, 60, 25)

        # Component ADD
        self._jScanPanel.add(self._jLabelCurrentIPMainText)
        self._jScanPanel.add(self._jLabelCurrentIPDesText)
        self._jScanPanel.add(self._jLabelCurrentWanIp)
        self._jScanPanel.add(self._jLabelCurrentLanIp)
        self._jScanPanel.add(self._jLabelCurrentWanIpDes)
        self._jScanPanel.add(self._jLabelCurrentLanIpDes)
        self._jScanPanel.add(self._jCheckIPButton)
        self._jScanPanel.add(self._jLabelMainText)
        self._jScanPanel.add(self._jLabelScanIPListen)
        self._jScanPanel.add(self._jPAddButton)
        self._jScanPanel.add(self._jPEditButton)
        self._jScanPanel.add(self._jPRemoveButton)
        self._jScanPanel.add(self._jSeparator_first)
        self._jScanPanel.add(self._jTablecont)
        self._jScanPanel.add(self._jSeparator_second)
        self._jScanPanel.add(self._jLabelDashboardText)
        self._jScanPanel.add(self._jLabelDashboardDesText)
        self._jScanPanel.add(self._jDAddButton)
        self._jScanPanel.add(self._jDEditButton)
        self._jScanPanel.add(self._jDRemoveButton)
        self._jScanPanel.add(self._jDIDCopyButton)
        self._jScanPanel.add(self._jDPwCopyButton)
        self._jScanPanel.add(self._jDTablecont)
        self._jScanPanel.add(self._jDitemsDelete)
        self._jScanPanel.add(self._jDURLConButton)

        # ADD/EDIT Dialog Create Component
        ## PROXY

        self.panel = swing.JPanel()
        self.panel.setLayout(None)
        self.panel.setPreferredSize(awt.Dimension(200, 140))
        self.DescriptionLabel = swing.JLabel()
        self.NameLabel = swing.JLabel()
        self.IPLabel = swing.JLabel()
        self.PortLabel = swing.JLabel()
        self.Nametext = swing.JTextField(50)
        self.IPtext = swing.JTextField(50)
        self.Porttext = swing.JTextField(50)

        ## ACOUNT
        self.Dpanel = swing.JPanel()
        self.Dpanel.setLayout(None)
        self.Dpanel.setPreferredSize(awt.Dimension(260, 210))
        self.DDescriptionLabel = swing.JLabel()
        self.DURLLabel = swing.JLabel()
        self.DURLText = swing.JTextField(50)
        self.DPrivLabel = swing.JLabel()
        self.DPrivCombo = swing.JComboBox()
        self.DIDLabel = swing.JLabel()
        self.DIDText = swing.JTextField(50)
        self.DPassLabel = swing.JLabel()
        self.DPassText = swing.JTextField(50)
        self.DCommentLabel = swing.JLabel()
        self.DCommentText = swing.JTextField(50)
        self.DSubCommentLabel = swing.JLabel()

        # ADD/EDIT Dialog Configure locations
        ## PROXY

        self.DescriptionLabel.setBounds(0, 0, 190, 15)
        self.NameLabel.setBounds(5, 35, 50, 30)
        self.IPLabel.setBounds(5, 70, 50, 30)
        self.PortLabel.setBounds(5, 105, 50, 30)
        self.Nametext.setBounds(60, 35, 150, 30)
        self.IPtext.setBounds(60, 70, 150, 30)
        self.Porttext.setBounds(60, 105, 150, 30)

        ## ACCOUNT
        self.DDescriptionLabel.setBounds(0, 0, 200, 10)

        self.DURLLabel.setBounds(5, 35, 70, 30)
        self.DURLText.setBounds(80, 35, 180, 30)
        self.DPrivLabel.setBounds(5, 70, 70, 30)
        self.DPrivCombo.setBounds(80, 70, 180, 30)
        self.DIDLabel.setBounds(5, 105, 70, 30)
        self.DIDText.setBounds(80, 105, 180, 30)
        self.DPassLabel.setBounds(5, 140, 70, 30)
        self.DPassText.setBounds(80, 140, 180, 30)
        self.DCommentLabel.setBounds(5, 175, 70, 15)
        self.DCommentText.setBounds(80, 175, 180, 30)
        self.DSubCommentLabel.setBounds(0, 190, 80, 15)

        # ADD/EDIT Dialog Configure GUI
        ## PROXY

        self.DescriptionLabel.setText("Input your proxy server details.")
        self.NameLabel.setText("NAME : ")
        self.IPLabel.setText("IP : ")
        self.PortLabel.setText("PORT : ")

        ## ACCOUNT
        self.DDescriptionLabel.setText("Input your account details")
        self.DURLLabel.setText("URL : ")
        self.DPrivLabel.setText("Privilege : ")
        self.DIDLabel.setText("ID : ")
        self.DPassLabel.setText("Password : "******"Comment : ")
        self.DSubCommentLabel.setText("(Unique Text)")
        self.DPrivCombo.addItem("System Administrator")
        self.DPrivCombo.addItem("Staff Administrator")
        self.DPrivCombo.addItem("Internal Staff")
        self.DPrivCombo.addItem("Customer")
        self.DPrivCombo.addItem("The Lowest Privilege")
        self.DPrivCombo.addItem("ETC")
        self.DPrivCombo.setEditable(False)

        # ADD/EDIT Dialog Component ADD
        ## PROXY
        self.panel.add(self.DescriptionLabel)
        self.panel.add(self.NameLabel)
        self.panel.add(self.IPLabel)
        self.panel.add(self.PortLabel)
        self.panel.add(self.Nametext)
        self.panel.add(self.IPtext)
        self.panel.add(self.Porttext)

        ## ACCOUNT
        self.Dpanel.add(self.DDescriptionLabel)
        self.Dpanel.add(self.DURLLabel)
        self.Dpanel.add(self.DURLText)
        self.Dpanel.add(self.DIDLabel)
        self.Dpanel.add(self.DIDText)
        self.Dpanel.add(self.DPassLabel)
        self.Dpanel.add(self.DPassText)
        self.Dpanel.add(self.DPrivLabel)
        self.Dpanel.add(self.DPrivCombo)
        self.Dpanel.add(self.DCommentLabel)
        self.Dpanel.add(self.DCommentText)
        self.Dpanel.add(self.DSubCommentLabel)

        # Setup Tabs
        self._jConfigTab = swing.JTabbedPane()
        self._jConfigTab.addTab("Smart Settings", self._jScanPanel)
        callbacks.addSuiteTab(self)
        return
Ejemplo n.º 9
0
  def registerExtenderCallbacks(self, callbacks):
    # Print information about the plugin, set extension name, setup basic stuff
    self.printHeader()
    callbacks.setExtensionName("SQLiPy")
    self._callbacks = callbacks
    self._helpers = callbacks.getHelpers()
    callbacks.registerContextMenuFactory(self)

    # Create SQLMap API configuration JPanel
    self._jPanel = swing.JPanel()
    self._jPanel.setLayout(awt.GridBagLayout())
    self._jPanelConstraints = awt.GridBagConstraints()

    # Create panel for IP info
    self._jLabelIPListen = swing.JLabel("Listen on IP:")
    self._jPanelConstraints.fill = awt.GridBagConstraints.HORIZONTAL
    self._jPanelConstraints.gridx = 0
    self._jPanelConstraints.gridy = 0
    self._jPanel.add(self._jLabelIPListen, self._jPanelConstraints)

    self._jTextFieldIPListen = swing.JTextField("",15)
    self._jPanelConstraints.fill = awt.GridBagConstraints.HORIZONTAL
    self._jPanelConstraints.gridx = 1
    self._jPanelConstraints.gridy = 0
    self._jPanel.add(self._jTextFieldIPListen, self._jPanelConstraints)

    # Create panel for Port info
    self._jLabelPortListen = swing.JLabel("Listen on Port:")
    self._jPanelConstraints.fill = awt.GridBagConstraints.HORIZONTAL
    self._jPanelConstraints.gridx = 0
    self._jPanelConstraints.gridy = 1
    self._jPanel.add(self._jLabelPortListen, self._jPanelConstraints)

    self._jTextFieldPortListen = swing.JTextField("",3)
    self._jPanelConstraints.fill = awt.GridBagConstraints.HORIZONTAL
    self._jPanelConstraints.gridx = 1
    self._jPanelConstraints.gridy = 1
    self._jPanel.add(self._jTextFieldPortListen, self._jPanelConstraints)

    # Create panel to contain Python button
    self._jLabelPython = swing.JLabel("Select Python:")
    self._jPanelConstraints.fill = awt.GridBagConstraints.HORIZONTAL
    self._jPanelConstraints.gridx = 0
    self._jPanelConstraints.gridy = 2
    self._jPanel.add(self._jLabelPython, self._jPanelConstraints)

    self._jButtonSetPython = swing.JButton('Python', actionPerformed=self.setPython)
    self._jPanelConstraints.fill = awt.GridBagConstraints.HORIZONTAL
    self._jPanelConstraints.gridx = 1
    self._jPanelConstraints.gridy = 2
    self._jPanel.add(self._jButtonSetPython, self._jPanelConstraints)

    # Create panel to contain API button
    self._jLabelAPI = swing.JLabel("Select API:")
    self._jPanelConstraints.fill = awt.GridBagConstraints.HORIZONTAL
    self._jPanelConstraints.gridx = 0
    self._jPanelConstraints.gridy = 3
    self._jPanel.add(self._jLabelAPI, self._jPanelConstraints)

    self._jButtonSetAPI = swing.JButton('SQLMap API', actionPerformed=self.setAPI)
    self._jPanelConstraints.fill = awt.GridBagConstraints.HORIZONTAL
    self._jPanelConstraints.gridx = 1
    self._jPanelConstraints.gridy = 3
    self._jPanel.add(self._jButtonSetAPI, self._jPanelConstraints)

    # Create panel to execute API
    self._jButtonStartAPI = swing.JButton('Start API', actionPerformed=self.startAPI)
    self._jPanelConstraints.fill = awt.GridBagConstraints.HORIZONTAL
    self._jPanelConstraints.gridx = 0
    self._jPanelConstraints.gridy = 4
    self._jPanelConstraints.gridwidth = 2
    self._jPanel.add(self._jButtonStartAPI, self._jPanelConstraints)

    # Create SQLMap scanner panel
    # Combobox Values
    levelValues = [1,2,3,4,5]
    riskValues = [0,1,2,3]
    threadValues = [1,2,3,4,5,6,7,8,9,10]
    delayValues = [0,1,2,3,4,5]
    timeoutValues = [1,5,10,15,20,25,30,35,40,45,50,55,60]
    retryValues = [1,2,3,4,5,6,7,8,9,10]
    dbmsValues = ['Any', 'MySQL', 'Oracle', 'PostgreSQL', 'Microsoft SQL Server', 'Microsoft Access', 'SQLite', 'Firebird', 'Sybase', 'SAP MaxDB', 'DB2']
    osValues = ['Any', 'Linux', 'Windows']
    timeSecValues = [1,2,3,4,5,6,7,8,9,10,11,12,13,14,15]
    torTypes = ['HTTP', 'SOCKS4', 'SOCKS5']

    # GUI components
    self._jLabelScanText = swing.JLabel()
    self._jLabelScanIPListen = swing.JLabel()
    self._jLabelScanPortListen = swing.JLabel()
    self._jTextFieldScanIPListen = swing.JTextField()
    self._jTextFieldScanPortListen = swing.JTextField()
    self._jSeparator1 = swing.JSeparator()
    self._jLabelURL = swing.JLabel()
    self._jTextFieldURL = swing.JTextField()
    self._jLabelData = swing.JLabel()
    self._jTextData = swing.JTextArea()
    self._jScrollPaneData = swing.JScrollPane(self._jTextData)
    self._jLabelCookie = swing.JLabel()
    self._jTextFieldCookie = swing.JTextField()
    self._jLabelReferer = swing.JLabel()
    self._jTextFieldReferer = swing.JTextField()
    self._jLabelUA = swing.JLabel()
    self._jTextFieldUA = swing.JTextField()
    self._jSeparator2 = swing.JSeparator()
    self._jLabelParam = swing.JLabel()
    self._jTextFieldParam = swing.JTextField()
    self._jCheckTO = swing.JCheckBox()
    self._jSeparator3 = swing.JSeparator()
    self._jComboLevel = swing.JComboBox(levelValues)
    self._jLabelLevel = swing.JLabel()
    self._jLabelRisk = swing.JLabel()
    self._jComboRisk = swing.JComboBox(riskValues)
    self._jSeparator4 = swing.JSeparator()
    self._jCheckHPP = swing.JCheckBox('Param Pollution')
    self._jCheckCU = swing.JCheckBox('Current User')
    self._jCheckDB = swing.JCheckBox('Current DB')
    self._jCheckHost = swing.JCheckBox('Hostname')
    self._jCheckDBA = swing.JCheckBox('Is DBA?')
    self._jCheckUsers = swing.JCheckBox('List Users')
    self._jCheckPrivs = swing.JCheckBox('List Privs')
    self._jCheckPswds = swing.JCheckBox('List Passwords')
    self._jCheckRoles = swing.JCheckBox('List Roles')
    self._jCheckDBs = swing.JCheckBox('List DBs')
    self._jSeparator5 = swing.JSeparator()
    self._jLabelThreads = swing.JLabel()
    self._jLabelDelay = swing.JLabel()
    self._jLabelTimeout = swing.JLabel()
    self._jLabelRetry = swing.JLabel()
    self._jLabelTimeSec = swing.JLabel()
    self._jComboThreads = swing.JComboBox(threadValues)
    self._jComboDelay = swing.JComboBox(delayValues)
    self._jComboTimeout = swing.JComboBox(timeoutValues)
    self._jComboRetry = swing.JComboBox(retryValues)
    self._jComboTimeSec = swing.JComboBox(timeSecValues)
    self._jSeparator6 = swing.JSeparator()
    self._jLabelDBMS = swing.JLabel()
    self._jComboDBMS = swing.JComboBox(dbmsValues)
    self._jLabelOS = swing.JLabel()
    self._jComboOS = swing.JComboBox(osValues)
    self._jSeparator7 = swing.JSeparator()
    self._jLabelProxy = swing.JLabel()
    self._jTextFieldProxy = swing.JTextField()
    self._jSeparator8 = swing.JSeparator()
    self._jLabelTamper = swing.JLabel()
    self._jTextFieldTamper = swing.JTextField()
    self._jButtonStartScan = swing.JButton('Start Scan', actionPerformed=self.startScan)
    self._jLabelScanAPI = swing.JLabel()
    self._jSeparator9 = swing.JSeparator()
    self._jSeparator10 = swing.JSeparator()
    self._jCheckTor = swing.JCheckBox('Enable Tor')
    self._jLabelTorType = swing.JLabel()
    self._jComboTorType = swing.JComboBox(torTypes)
    self._jLabelTorPort = swing.JLabel()
    self._jTextFieldTorPort = swing.JTextField()

    # Configure GUI
    self._jLabelScanText.setText('API Listening On:')
    self._jLabelScanIPListen.setText('SQLMap API IP:')
    self._jLabelScanPortListen.setText('SQLMap API Port:')
    self._jLabelURL.setText('URL:')
    self._jLabelData.setText('Post Data:')
    self._jTextData.setColumns(20)
    self._jTextData.setRows(5)
    self._jTextData.setLineWrap(True)
    self._jScrollPaneData.setVerticalScrollBarPolicy(swing.JScrollPane.VERTICAL_SCROLLBAR_ALWAYS)
    self._jLabelCookie.setText('Cookies:')
    self._jLabelReferer.setText('Referer:')
    self._jLabelUA.setText('User-Agent:')
    self._jLabelParam.setText('Test Parameter(s):')
    self._jCheckTO.setText('Text Only')
    self._jLabelLevel.setText('Level:')
    self._jLabelRisk.setText('Risk:')
    self._jComboLevel.setSelectedIndex(2)
    self._jComboRisk.setSelectedIndex(1)
    self._jComboThreads.setSelectedIndex(0)
    self._jComboDelay.setSelectedIndex(0)
    self._jComboTimeout.setSelectedIndex(6)
    self._jComboRetry.setSelectedIndex(2)
    self._jComboTimeSec.setSelectedIndex(4)
    self._jComboDBMS.setSelectedIndex(0)
    self._jComboOS.setSelectedIndex(0)
    self._jComboTorType.setSelectedIndex(2)
    self._jLabelThreads.setText('Threads:')
    self._jLabelDelay.setText('Delay:')
    self._jLabelTimeout.setText('Timeout:')
    self._jLabelRetry.setText('Retries:')
    self._jLabelTimeSec.setText('Time-Sec:')
    self._jLabelDBMS.setText('DBMS Backend:')
    self._jLabelOS.setText('Operating System:')
    self._jLabelProxy.setText('Proxy (HTTP://IP:Port):')
    self._jLabelTamper.setText('Tamper Scripts:')
    self._jLabelTorType.setText('Tor Type:')
    self._jLabelTorPort.setText('Tor Port:')
    self._jTextFieldTorPort.setText('9050')

    # Configure locations
    self._jLabelScanText.setBounds(15, 16, 126, 20)
    self._jLabelScanIPListen.setBounds(15, 58, 115, 20)
    self._jLabelScanPortListen.setBounds(402, 55, 129, 20)
    self._jTextFieldScanIPListen.setBounds(167, 52, 206, 26)
    self._jTextFieldScanPortListen.setBounds(546, 52, 63, 26)
    self._jSeparator1.setBounds(15, 96, 790, 10)
    self._jLabelURL.setBounds(15, 117, 35, 20)
    self._jTextFieldURL.setBounds(166, 114, 535, 26)
    self._jLabelData.setBounds(15, 156, 73, 20)
    self._jTextData.setColumns(20)
    self._jTextData.setRows(5)
    self._jScrollPaneData.setBounds(166, 156, 535, 96)
    self._jLabelCookie.setBounds(15, 271, 61, 20)
    self._jTextFieldCookie.setBounds(166, 271, 535, 26)
    self._jLabelReferer.setBounds(15, 320, 57, 20)
    self._jTextFieldReferer.setBounds(166, 320, 535, 26)
    self._jLabelUA.setBounds(15, 374, 86, 20)
    self._jTextFieldUA.setBounds(166, 371, 535, 26)
    self._jSeparator2.setBounds(15, 459, 790, 10)
    self._jLabelParam.setBounds(15, 483, 132, 20)
    self._jTextFieldParam.setBounds(165, 480, 366, 26)
    self._jCheckTO.setBounds(584, 479, 101, 29)
    self._jSeparator3.setBounds(15, 526, 790, 10)
    self._jComboLevel.setBounds(165, 544, 180, 26)
    self._jLabelLevel.setBounds(15, 547, 42, 20)
    self._jLabelRisk.setBounds(430, 547, 35, 20)
    self._jComboRisk.setBounds(518, 544, 180, 26)
    self._jSeparator4.setBounds(15, 588, 790, 10)
    self._jCheckHPP.setBounds(15, 608, 145, 29)
    self._jCheckCU.setBounds(191, 608, 123, 29)
    self._jCheckDB.setBounds(340, 608, 111, 29)
    self._jCheckHost.setBounds(469, 608, 103, 29)
    self._jCheckDBA.setBounds(599, 608, 105, 29)
    self._jCheckUsers.setBounds(15, 655, 101, 29)
    self._jCheckPswds.setBounds(191, 655, 135, 29)
    self._jCheckPrivs.setBounds(344, 655, 95, 29)
    self._jCheckRoles.setBounds(469, 655, 99, 29)
    self._jCheckDBs.setBounds(599, 655, 89, 29)
    self._jSeparator5.setBounds(15, 696, 790, 10)
    self._jLabelThreads.setBounds(15, 719, 63, 20)
    self._jLabelDelay.setBounds(173, 719, 45, 20)
    self._jLabelTimeout.setBounds(326, 719, 65, 20)
    self._jLabelRetry.setBounds(484, 719, 48, 20)
    self._jLabelTimeSec.setBounds(642, 719, 65, 20)
    self._jComboThreads.setBounds(80, 716, 78, 26)
    self._jComboDelay.setBounds(233, 716, 78, 26)
    self._jComboTimeout.setBounds(391, 716, 78, 26)
    self._jComboRetry.setBounds(549, 716, 78, 26)
    self._jComboTimeSec.setBounds(717, 716, 78, 26)
    self._jSeparator6.setBounds(15, 758, 790, 10)
    self._jLabelDBMS.setBounds(15, 781, 110, 20)
    self._jComboDBMS.setBounds(143, 778, 191, 26)
    self._jLabelOS.setBounds(352, 781, 132, 20)
    self._jComboOS.setBounds(502, 778, 191, 26)
    self._jSeparator7.setBounds(15, 820, 790, 10)
    self._jLabelProxy.setBounds(15, 844, 171, 20)
    self._jTextFieldProxy.setBounds(204, 841, 256, 26)
    self._jSeparator8.setBounds(15, 887, 790, 10)
    self._jCheckTor.setBounds(15, 911, 171, 20)
    self._jLabelTorType.setBounds(206, 908, 65, 26)
    self._jComboTorType.setBounds(291, 908, 100, 26)
    self._jLabelTorPort.setBounds(460, 908, 129, 26)
    self._jTextFieldTorPort.setBounds(545, 908, 65, 26)
    self._jSeparator9.setBounds(15, 954, 790, 10)
    self._jLabelTamper.setBounds(15, 979, 171, 20)
    self._jTextFieldTamper.setBounds(204, 976, 256, 26)
    self._jSeparator10.setBounds(15, 1024, 790, 10)
    self._jButtonStartScan.setBounds(346, 1047, 103, 29)
    self._jLabelScanAPI.setBounds(167, 16, 275, 20)

    # Create main panel
    self._jScanPanel = swing.JPanel()
    self._jScanPanel.setLayout(None)
    self._jScanPanel.setPreferredSize(awt.Dimension(1010,1010))
    self._jScanPanel.add(self._jLabelScanText)
    self._jScanPanel.add(self._jLabelScanIPListen)
    self._jScanPanel.add(self._jLabelScanPortListen)
    self._jScanPanel.add(self._jTextFieldScanIPListen)
    self._jScanPanel.add(self._jTextFieldScanPortListen)
    self._jScanPanel.add(self._jSeparator1)
    self._jScanPanel.add(self._jLabelURL)
    self._jScanPanel.add(self._jTextFieldURL)
    self._jScanPanel.add(self._jLabelData)
    self._jScanPanel.add(self._jScrollPaneData)
    self._jScanPanel.add(self._jLabelCookie)
    self._jScanPanel.add(self._jTextFieldCookie)
    self._jScanPanel.add(self._jLabelReferer)
    self._jScanPanel.add(self._jTextFieldReferer)
    self._jScanPanel.add(self._jLabelUA)
    self._jScanPanel.add(self._jTextFieldUA)
    self._jScanPanel.add(self._jSeparator2)
    self._jScanPanel.add(self._jLabelParam)
    self._jScanPanel.add(self._jTextFieldParam)
    self._jScanPanel.add(self._jCheckTO)
    self._jScanPanel.add(self._jSeparator3)
    self._jScanPanel.add(self._jComboLevel)
    self._jScanPanel.add(self._jLabelLevel)
    self._jScanPanel.add(self._jLabelRisk)
    self._jScanPanel.add(self._jComboRisk)
    self._jScanPanel.add(self._jSeparator4)
    self._jScanPanel.add(self._jCheckHPP)
    self._jScanPanel.add(self._jCheckCU)
    self._jScanPanel.add(self._jCheckDB)
    self._jScanPanel.add(self._jCheckHost)
    self._jScanPanel.add(self._jCheckDBA)
    self._jScanPanel.add(self._jCheckUsers)
    self._jScanPanel.add(self._jCheckPswds)
    self._jScanPanel.add(self._jCheckPrivs)
    self._jScanPanel.add(self._jCheckRoles)
    self._jScanPanel.add(self._jCheckDBs)
    self._jScanPanel.add(self._jSeparator5)
    self._jScanPanel.add(self._jLabelThreads)
    self._jScanPanel.add(self._jLabelDelay)
    self._jScanPanel.add(self._jLabelTimeout)
    self._jScanPanel.add(self._jLabelRetry)
    self._jScanPanel.add(self._jLabelTimeSec)
    self._jScanPanel.add(self._jComboThreads)
    self._jScanPanel.add(self._jComboDelay)
    self._jScanPanel.add(self._jComboTimeout)
    self._jScanPanel.add(self._jComboRetry)
    self._jScanPanel.add(self._jComboTimeSec)
    self._jScanPanel.add(self._jSeparator6)
    self._jScanPanel.add(self._jLabelDBMS)
    self._jScanPanel.add(self._jComboDBMS)
    self._jScanPanel.add(self._jLabelOS)
    self._jScanPanel.add(self._jComboOS)
    self._jScanPanel.add(self._jSeparator7)
    self._jScanPanel.add(self._jLabelProxy)
    self._jScanPanel.add(self._jTextFieldProxy)
    self._jScanPanel.add(self._jSeparator8)
    self._jScanPanel.add(self._jCheckTor)
    self._jScanPanel.add(self._jLabelTorType)
    self._jScanPanel.add(self._jComboTorType)
    self._jScanPanel.add(self._jLabelTorPort)
    self._jScanPanel.add(self._jTextFieldTorPort)
    self._jScanPanel.add(self._jSeparator9)
    self._jScanPanel.add(self._jLabelTamper)
    self._jScanPanel.add(self._jTextFieldTamper)
    self._jScanPanel.add(self._jSeparator10)
    self._jScanPanel.add(self._jButtonStartScan)
    self._jScanPanel.add(self._jLabelScanAPI)
    self._jScrollPaneMain = swing.JScrollPane(self._jScanPanel)
    self._jScrollPaneMain.setViewportView(self._jScanPanel)
    self._jScrollPaneMain.setPreferredSize(awt.Dimension(999,999))

    # Create SQLMap log JPanel
    self._jLogPanel = swing.JPanel()
    self._jLogPanel.setLayout(None)

    # Create label, combobox, and button to get logs and textarea to display them
    self._jLabelLog = swing.JLabel("Logs for Scan ID:")
    self._jComboLogs = swing.JComboBox(self.scantasks)
    self._jButtonGetLogs = swing.JButton('Get', actionPerformed=self.getLogs)
    self._jButtonRemoveLogs = swing.JButton('Remove', actionPerformed=self.removeLogs)
    self._jTextLogs = swing.JTextArea()
    self._jTextLogs.setColumns(50)
    self._jTextLogs.setRows(50)
    self._jTextLogs.setLineWrap(True)
    self._jTextLogs.setEditable(False)
    self._jScrollPaneLogs = swing.JScrollPane(self._jTextLogs)
    self._jScrollPaneLogs.setVerticalScrollBarPolicy(swing.JScrollPane.VERTICAL_SCROLLBAR_ALWAYS)

    self._jLabelLog.setBounds(15, 16, 126, 20)
    self._jComboLogs.setBounds(167, 16, 535, 20)
    self._jButtonGetLogs.setBounds(718, 16, 50, 20)
    self._jButtonRemoveLogs.setBounds(783, 16, 80, 20)
    self._jScrollPaneLogs.setBounds(15, 58, 846, 400)

    self._jLogPanel.add(self._jLabelLog)
    self._jLogPanel.add(self._jComboLogs)
    self._jLogPanel.add(self._jButtonGetLogs)
    self._jLogPanel.add(self._jButtonRemoveLogs)
    self._jLogPanel.add(self._jScrollPaneLogs)

    # Create SQLMap stop scan JPanel
    self._jStopScanPanel = swing.JPanel()
    self._jStopScanPanel.setLayout(None)

    # Create label, combobox, and button to stop scans and textfield to display success
    self._jLabelStopScan = swing.JLabel("Stop Scan ID:")
    self._jComboStopScan = swing.JComboBox(self.scantasks)
    self._jButtonStopScan = swing.JButton('Stop', actionPerformed=self.stopScan)
    self._jButtonRemoveScan = swing.JButton('Remove', actionPerformed=self.removeScan)
    self._jLabelStopStatus = swing.JLabel()

    self._jLabelStopScan.setBounds(15, 16, 126, 20)
    self._jComboStopScan.setBounds(167, 16, 535, 20)
    self._jButtonStopScan.setBounds(718, 16, 55, 20)
    self._jButtonRemoveScan.setBounds(783, 16, 80, 20)
    self._jLabelStopStatus.setBounds(167, 58, 846, 20)

    self._jStopScanPanel.add(self._jLabelStopScan)
    self._jStopScanPanel.add(self._jComboStopScan)
    self._jStopScanPanel.add(self._jButtonStopScan)
    self._jStopScanPanel.add(self._jButtonRemoveScan)
    self._jStopScanPanel.add(self._jLabelStopStatus)

    # Setup Tabs
    self._jConfigTab = swing.JTabbedPane()
    self._jConfigTab.addTab("SQLMap API", self._jPanel)
    self._jConfigTab.addTab("SQLMap Scanner", self._jScrollPaneMain)
    self._jConfigTab.addTab("SQLMap Logs", self._jLogPanel)
    self._jConfigTab.addTab("SQLMap Scan Stop", self._jStopScanPanel)

    callbacks.customizeUiComponent(self._jConfigTab)
    callbacks.addSuiteTab(self)
    return
Ejemplo n.º 10
0
    def registerExtenderCallbacks(self, callbacks):
        print "Name: \t\t" + BurpExtender.EXT_NAME
        print "Description: \t" + BurpExtender.EXT_DESC
        print "Authors: \t" + BurpExtender.EXT_AUTHOR
        # Required for easier debugging:
        # https://github.com/securityMB/burp-exceptions
        sys.stdout = callbacks.getStdout()
        self._callbacks = callbacks
        self._helpers = callbacks.getHelpers()
        callbacks.setExtensionName(BurpExtender.EXT_NAME)

        #Create Burp Collaborator Instance
        self.burpCollab = self._callbacks.createBurpCollaboratorClientContext()
        self.collaboratorDomain = self.burpCollab.generatePayload(True)

        #Create panels used for layout; we must stack and layer to get the desired GUI
        self.tab = swing.Box(swing.BoxLayout.Y_AXIS)
        self.tabbedPane = swing.JTabbedPane()
        self.tab.add(self.tabbedPane)

        # First tab
        self.collabfiltratorTab = swing.Box(swing.BoxLayout.Y_AXIS)
        self.tabbedPane.addTab("Collabfiltrator", self.collabfiltratorTab)

        # Second tab
        #self.configurationTab = swing.Box(swing.BoxLayout.Y_AXIS)
        #self.tabbedPane.addTab("Configuration", self.configurationTab)

        # Create objects for the first tab's GUI
        # These rows will add top to bottom on the Y Axis
        self.t1r1 = swing.JPanel(FlowLayout())
        self.t1r2 = swing.JPanel(FlowLayout())
        self.t1r3 = swing.JPanel(FlowLayout())
        self.t1r4 = swing.JPanel(FlowLayout())
        self.t1r5 = swing.JPanel(FlowLayout())
        self.t1r6 = swing.JPanel(FlowLayout())
        self.t1r7 = swing.JPanel(FlowLayout())

        # Now add content to the first tab's GUI objects
        self.osComboBox = swing.JComboBox(
            ["Windows", "Linux_ping", "Linux_nslookup", "Linux_dig"])
        #self.commandTxt = swing.JTextField("ls -lah", 35)
        self.commandTxt = swing.JTextField("dir C:\inetpub\wwwroot", 25)
        self.payloadTxt = swing.JTextArea(10, 50)
        self.payloadTxt.setBackground(Color.lightGray)
        self.payloadTxt.setEditable(
            False)  # So you can't messup the generated payload
        self.payloadTxt.setLineWrap(True)  #Wordwrap the output of payload box
        self.outputTxt = swing.JTextArea(10, 50)
        self.outputScroll = swing.JScrollPane(
            self.outputTxt)  # Make the output scrollable

        self.progressBar = swing.JProgressBar(5, 15)
        self.progressBar.setVisible(False)  # Progressbar is hiding

        self.outputTxt.setBackground(Color.lightGray)
        self.outputTxt.setEditable(False)
        self.outputTxt.setLineWrap(True)
        self.burpCollaboratorDomainTxt = swing.JTextPane(
        )  # burp collaboratorTextPane
        self.burpCollaboratorDomainTxt.setText(
            " ")  #burp collaborator domain goes here
        self.burpCollaboratorDomainTxt.setEditable(False)
        self.burpCollaboratorDomainTxt.setBackground(None)
        self.burpCollaboratorDomainTxt.setBorder(None)
        self.t1r1.add(
            swing.JLabel(
                "<html><center><h2>Collabfiltrator</h2>Exfiltrate blind remote code execution output over DNS via Burp Collaborator.</center></html>"
            ))
        self.t1r2.add(swing.JLabel("Platform"))
        self.t1r2.add(self.osComboBox)
        self.t1r2.add(swing.JLabel("Command"))
        self.t1r2.add(self.commandTxt)
        self.t1r2.add(
            swing.JButton("Execute", actionPerformed=self.executePayload))
        self.t1r3.add(swing.JLabel("Payload"))
        self.t1r3.add(self.payloadTxt)
        self.t1r6.add(
            self.burpCollaboratorDomainTxt)  #burp Collab Domain will go here
        self.t1r4.add(
            swing.JButton("Copy Payload to Clipboard",
                          actionPerformed=self.copyToClipboard))
        self.t1r4.add(
            swing.JButton("Start poll results",
                          actionPerformed=self.startPollResults))
        self.t1r4.add(
            swing.JButton("Stop listener",
                          actionPerformed=self.stopPollResults))
        self.t1r4.add(swing.JButton("Show logs",
                                    actionPerformed=self.showLogs))
        self.t1r5.add(swing.JLabel("Output"))
        self.t1r5.add(self.outputScroll)  #add output scroll bar to page
        self.t1r7.add(self.progressBar)

        # Add the GUI objects into the first tab
        self.collabfiltratorTab.add(self.t1r1)
        self.collabfiltratorTab.add(self.t1r2)
        self.collabfiltratorTab.add(self.t1r3)
        self.collabfiltratorTab.add(self.t1r6)
        self.collabfiltratorTab.add(self.t1r4)
        self.collabfiltratorTab.add(self.t1r7)
        self.collabfiltratorTab.add(self.t1r5)

        # Create objects for the second tab's GUI
        self.dummylabel = swing.JLabel(
            "Burp Collaborator Config options will go here.")

        # Add the GUI objects into the second tab
        ########self.configurationTab.add(self.dummylabel)

        # Now that the GUI objects are added, we can resize them to fit snug in the UI
        self.t1r1.setMaximumSize(Dimension(800, 100))
        self.t1r2.setMaximumSize(Dimension(800, 50))
        self.t1r3.setMaximumSize(Dimension(800, 200))
        self.t1r4.setMaximumSize(Dimension(800, 200))
        self.t1r6.setMaximumSize(Dimension(800, 50))
        self.t1r7.setMaximumSize(Dimension(800, 50))

        #Register the panel in the Burp GUI
        callbacks.addSuiteTab(self)
        return
Ejemplo n.º 11
0
    def registerExtenderCallbacks(self, callbacks):
        self._helpers = callbacks.getHelpers()

        self._jDecoderPanel = swing.JPanel()
        self._jDecoderPanel.setLayout(None)

        # Combobox Values
        self._decodeType = ['Convert to chniese',
                            'Str to Unicode',
                            'Str To UTF-8',
                            'Base64 Eecode',
                            'Base64 Decode']

        self._decodeTypeFunc = [self.convertToChinese,
                                self.strToUnicode,
                                self.strToUtf8,
                                self.base64Encode,
                                self.base64Decode]

        # GUI components
        self._jLabelInput = swing.JLabel()
        self._jLabelOutput = swing.JLabel()
        self._jLabelExample = swing.JLabel()
        self._jLabelOputFormat = swing.JLabel()
        self._jCheckBoxOutputFormat = swing.JCheckBox()
        self._jTextAreaInputData = swing.JTextArea()
        self._jTextAreaOutputData = swing.JTextArea()
        self._jScrollPaneIntput = swing.JScrollPane(self._jTextAreaInputData)
        self._jScrollPaneOutput = swing.JScrollPane(self._jTextAreaOutputData)

        self._jButtonDecoder = swing.JButton('Execute', actionPerformed=self.decode)
        self._jComboDecodeType = swing.JComboBox(self._decodeType, actionListener=self.change_decode)

        # Configure GUI
        self._jLabelInput.setText('Input:')
        self._jLabelOutput.setText('Output:')
        self._jLabelExample.setText('Example: ')
        self._jLabelOputFormat.setText(r'Replace % with \ ')
        self._jLabelExample.setFont(Font("Consolas", Font.PLAIN, 14))

        self._jDecoderPanel.add(self._jLabelInput)
        self._jDecoderPanel.add(self._jLabelOutput)

        self._jScrollPaneIntput.setVerticalScrollBarPolicy(swing.JScrollPane.VERTICAL_SCROLLBAR_AS_NEEDED)
        self._jScrollPaneOutput.setVerticalScrollBarPolicy(swing.JScrollPane.VERTICAL_SCROLLBAR_AS_NEEDED)
        self._jLabelExample.setText(self._decodeTypeFunc[0]())


        # Configure locations
        self._jLabelInput.setBounds(20, 15, self.LABEL_WIDTH, self.LABEL_HEIGHT)
        self._jLabelOutput.setBounds(20, 225, self.LABEL_WIDTH, self.LABEL_HEIGHT)
        self._jLabelExample.setBounds(20, 190, self.TEXTAREA_WIDTH, 30)
        self._jLabelOputFormat.setBounds(self.TEXTAREA_WIDTH + 80, 117, 150, 30)
        self._jCheckBoxOutputFormat.setBounds(self.TEXTAREA_WIDTH + 50, 120, 20, 20)
        self._jScrollPaneIntput.setBounds(20 ,40, self.TEXTAREA_WIDTH, self.TEXTAREA_HEIGHT)
        self._jScrollPaneOutput.setBounds(20, 250, self.TEXTAREA_WIDTH, self.TEXTAREA_HEIGHT)
        self._jButtonDecoder.setBounds(self.TEXTAREA_WIDTH + 50, 40, 150, 30)
        self._jComboDecodeType.setBounds(self.TEXTAREA_WIDTH + 50, 80, 150,30)
 
        self._jDecoderPanel.add(self._jLabelInput)
        self._jDecoderPanel.add(self._jLabelOutput)
        self._jDecoderPanel.add(self._jLabelExample)
        self._jDecoderPanel.add(self._jLabelOputFormat)
        self._jDecoderPanel.add(self._jCheckBoxOutputFormat)
        self._jDecoderPanel.add(self._jComboDecodeType)
        self._jDecoderPanel.add(self._jScrollPaneIntput)
        self._jDecoderPanel.add(self._jScrollPaneOutput)
        self._jDecoderPanel.add(self._jButtonDecoder)

        # Setup Tabs
        self._jConfigTab = swing.JTabbedPane()
        self._jConfigTab.addTab("Decoder", self._jDecoderPanel)
        callbacks.customizeUiComponent(self._jConfigTab)
        callbacks.addSuiteTab(self)
        callbacks.registerContextMenuFactory(self)

        return
Ejemplo n.º 12
0
    def createGui(self):

        mpanel = swing.JPanel(java.awt.BorderLayout())
        self.available = jlist = swing.JList()
        jlist.setVisibleRowCount(5)
        jlsp = swing.JScrollPane(jlist)
        self.addTitledBorder(jlsp, "Members")

        #jlist.setListData( ("catssssssssss", "rats" ))
        mpanel.add(jlsp, java.awt.BorderLayout.WEST)
        jtp = swing.JTabbedPane()
        mpanel.add(jtp, java.awt.BorderLayout.CENTER)

        tpanel = swing.JPanel()
        slayout = swing.SpringLayout()
        tpanel.setLayout(slayout)
        jtp.addTab("Messages", tpanel)
        self.jta = jta = swing.JTextArea()
        jsp = swing.JScrollPane(jta)
        self.addTitledBorder(jsp, "Instant Messages")
        jsp.setPreferredSize(java.awt.Dimension(500, 200))
        tpanel.add(jsp)
        slayout.putConstraint(slayout.NORTH, jsp, 5, slayout.NORTH, tpanel)
        slayout.putConstraint(slayout.EAST, tpanel, 5, slayout.EAST, jsp)
        self.sendmessage = jta2 = swing.JTextArea()
        jsp2 = swing.JScrollPane(jta2)
        self.addTitledBorder(jsp2, "Compose Message")
        jsp2.setPreferredSize(java.awt.Dimension(250, 200))
        tpanel.add(jsp2)
        slayout.putConstraint(slayout.NORTH, jsp2, 5, slayout.SOUTH, jsp)
        jb = swing.JButton("Send Message")
        jb.actionPerformed = lambda event: self.sendMessage()
        tpanel.add(jb)
        slayout.putConstraint(slayout.NORTH, jb, 0, slayout.NORTH, jsp2)
        slayout.putConstraint(slayout.WEST, jb, 5, slayout.EAST, jsp2)
        jb2 = swing.JButton("Clear")
        jb2.actionPerformed = lambda event: self.sendmessage.setText("")
        tpanel.add(jb2)
        slayout.putConstraint(slayout.NORTH, jb2, 5, slayout.SOUTH, jb)
        slayout.putConstraint(slayout.WEST, jb2, 5, slayout.EAST, jsp2)
        slayout.putConstraint(slayout.SOUTH, tpanel, 5, slayout.SOUTH, jsp2)

        npanel = swing.JPanel()
        slayout = swing.SpringLayout()
        npanel.setLayout(slayout)
        jtp.addTab("Nodes", npanel)
        self.table = jtable = swing.JTable()

        self.dtm = dtm = swing.table.DefaultTableModel()
        dtm.addColumn("From")
        dtm.addColumn("Node Name")
        jtable.setModel(dtm)
        jsp3 = swing.JScrollPane(jtable)
        jsp3.setPreferredSize(java.awt.Dimension(500, 200))
        npanel.add(jsp3)
        slayout.putConstraint(slayout.NORTH, jsp3, 5, slayout.NORTH, npanel)
        slayout.putConstraint(slayout.EAST, npanel, 5, slayout.EAST, jsp3)
        jb3 = swing.JButton("Send Current Node To")
        jb3.actionPerformed = lambda event: self.sendNode()
        npanel.add(jb3)
        slayout.putConstraint(slayout.NORTH, jb3, 5, slayout.SOUTH, jsp3)
        slayout.putConstraint(slayout.SOUTH, npanel, 5, slayout.SOUTH, jb3)
        jb4 = swing.JButton("Insert Selected Row")
        jb4.actionPerformed = lambda event: self.insertNode()
        npanel.add(jb4)
        slayout.putConstraint(slayout.NORTH, jb4, 0, slayout.NORTH, jb3)
        slayout.putConstraint(slayout.EAST, jb4, 0, slayout.EAST, jsp3)
        jf = swing.JFrame()
        jf.add(mpanel)
        jf.pack()
        jf.visible = 1
Ejemplo n.º 13
0
    def getUiComponent(self):
        # Create the tab
        self.tab = swing.JPanel(BorderLayout())

        # Created a tabbed pane to go in the center of the
        # main tab, below the text area
        tabbedPane = swing.JTabbedPane()
        self.tab.add("Center", tabbedPane)

        # First tab
        parseTab = swing.JPanel(BorderLayout())
        tabbedPane.addTab("Parser", parseTab)

        # Second tab
        enumTab = swing.JPanel(BorderLayout())
        tabbedPane.addTab("Enumerate Functions", enumTab)

        # Create a vertical box to house GWT message and label
        # Create a horizontal box for GWT-RPC text box's label
        # Add the label to the horizontal box
        # Add the horizontal box to the vertical box
        gwtMessageBoxVertical = swing.Box.createVerticalBox()
        gwtLabelBoxHorizontal = swing.Box.createHorizontalBox()
        gwtRPCTextLabel = swing.JLabel("GWT-RPC Message")
        gwtLabelBoxHorizontal.add(gwtRPCTextLabel)
        gwtMessageBoxVertical.add(gwtLabelBoxHorizontal)

        # Create a horizontal text box to house the GWT message itself
        # Add text area to message box
        # Add new box to gwtMessageBoxVertical
        gwtMessageTextBoxHorizontal = swing.Box.createHorizontalBox()
        self.gwtTextArea = swing.JTextArea('', 4, 120)
        self.gwtTextArea.setLineWrap(True)
        gwtMessageTextBoxHorizontal.add(self.gwtTextArea)
        gwtMessageBoxVertical.add(gwtMessageTextBoxHorizontal)

        #
        gwtParseButtonBoxHorizontal = swing.Box.createHorizontalBox()
        parseButtonPanel = swing.JPanel()
        parseButtonPanel.add(
            swing.JButton('Parse', actionPerformed=self.parseGWT))
        gwtParseButtonBoxHorizontal.add(parseButtonPanel)
        gwtMessageBoxVertical.add(gwtParseButtonBoxHorizontal)

        # Panel for the boxes. Each label and text field
        # will go in horizontal boxes which will then go in
        # a vertical box

        parseTabGWTMessageBoxHorizontal = swing.Box.createHorizontalBox()
        parseTabGWTMessageBoxHorizontal.add(gwtMessageBoxVertical)
        parseTab.add("North", parseTabGWTMessageBoxHorizontal)

        parsedBoxVertical = swing.Box.createVerticalBox()

        parsedBoxHorizontal = swing.Box.createHorizontalBox()
        self.parsedGWTField = swing.JTextArea()
        parsedBoxHorizontal.add(self.parsedGWTField)
        parsedBoxVertical.add(parsedBoxHorizontal)

        # Label for the insertion points box
        # horizontal box (label)
        # horizontal box (textarea)
        # inside a vertical box (insertBoxVertical)
        insertBoxVertical = swing.Box.createVerticalBox()

        insertPointBoxHorizontal = swing.Box.createHorizontalBox()
        self.insertPointField = swing.JTextArea()
        insertPointBoxHorizontal.add(self.insertPointField)
        insertBoxVertical.add(insertPointBoxHorizontal)

        functions = ["test", "test2"]
        functionList = swing.JList(functions)

        # Create and set split pane contents for enumerate tab
        spl = swing.JSplitPane(swing.JSplitPane.HORIZONTAL_SPLIT)
        spl.leftComponent = swing.JScrollPane(functionList)
        spl.rightComponent = swing.JLabel("right")

        enumTab.add("Center", spl)

        parseTabTabbedPane = swing.JTabbedPane()
        parseTab.add(parseTabTabbedPane)

        # Parse tab
        parsedRPCTab = swing.JPanel(BorderLayout())
        parseTabTabbedPane.addTab("Parsed", parsedRPCTab)

        # Insert points tab
        insertPointsTab = swing.JPanel(BorderLayout())
        parseTabTabbedPane.addTab("Insertion Points", insertPointsTab)

        parsedRPCTab.add("Center", parsedBoxVertical)
        insertPointsTab.add("Center", insertBoxVertical)

        return self.tab
    def registerExtenderCallbacks(self, callbacks):
        # Required for easier debugging:
        # https://github.com/securityMB/burp-exceptions
        sys.stdout = callbacks.getStdout()

        # Keep a reference to our callbacks object
        self.callbacks = callbacks

        # Set our extension name
        self.callbacks.setExtensionName("AES Plugin by XzC")

        # Create the tab
        self.tab = swing.JPanel(BorderLayout())

        # Create the text area at the top of the tab
        textPanel = swing.JPanel()

        # Create the label for the text area
        boxVertical = swing.Box.createVerticalBox()
        boxHorizontal = swing.Box.createHorizontalBox()
        textLabel = swing.JLabel("Text to be encoded/decoded/hashed")
        boxHorizontal.add(textLabel)
        boxVertical.add(boxHorizontal)

        # Create the text area itself
        boxHorizontal = swing.Box.createHorizontalBox()
        self.textArea = swing.JTextArea('', 6, 100)
        self.textArea.setLineWrap(True)
        boxHorizontal.add(self.textArea)
        boxVertical.add(boxHorizontal)

        # Add the text label and area to the text panel
        textPanel.add(boxVertical)

        # Add the text panel to the top of the main tab
        self.tab.add(textPanel, BorderLayout.NORTH)

        # Created a tabbed pane to go in the center of the
        # main tab, below the text area
        tabbedPane = swing.JTabbedPane()
        self.tab.add("Center", tabbedPane)

        # First tab
        firstTab = swing.JPanel()
        firstTab.layout = BorderLayout()
        tabbedPane.addTab("Encode", firstTab)

        # Button for first tab
        buttonPanel = swing.JPanel()
        buttonPanel.add(swing.JButton('Encode', actionPerformed=self.encrypt))
        firstTab.add(buttonPanel, "North")

        # Panel for the encoders. Each label and text field
        # will go in horizontal boxes which will then go in
        # a vertical box
        encPanel = swing.JPanel()
        boxVertical = swing.Box.createVerticalBox()

        boxHorizontal = swing.Box.createHorizontalBox()
        self.b74EncField = swing.JTextField('', 75)
        boxHorizontal.add(swing.JLabel("  Encode   :"))
        boxHorizontal.add(self.b74EncField)
        boxVertical.add(boxHorizontal)

        # Add the vertical box to the Encode tab
        firstTab.add(boxVertical, "Center")
        #
        #
        #
        # Second tab
        secondTab = swing.JPanel()
        secondTab.layout = BorderLayout()
        tabbedPane.addTab("Decode", secondTab)
        # Button for first tab
        buttonPanel = swing.JPanel()
        buttonPanel.add(swing.JButton('Decode', actionPerformed=self.decrypt))
        secondTab.add(buttonPanel, "North")

        # Panel for the encoders. Each label and text field
        # will go in horizontal boxes which will then go in
        # a vertical box
        encPanel = swing.JPanel()
        boxVertical = swing.Box.createVerticalBox()

        boxHorizontal = swing.Box.createHorizontalBox()
        self.b64EncField = swing.JTextField('', 75)
        boxHorizontal.add(swing.JLabel("  Decode   :"))
        boxHorizontal.add(self.b64EncField)
        boxVertical.add(boxHorizontal)

        # Add the vertical box to the Encode tab
        secondTab.add(boxVertical, "Center")

        # Add the custom tab to Burp's UI
        callbacks.addSuiteTab(self)
        return
Ejemplo n.º 15
0
 def __init__( self, switch_on_add = 1 ):
     self.jtp = swing.JTabbedPane()
     self.base = swing.JPanel( java.awt.GridLayout( 1, 1 ) )
     self.count = 0
     self.components_names = java.util.WeakHashMap()
     self.switch_on_add = switch_on_add
Ejemplo n.º 16
0
 def initTabs(self):
     self.tabs = swing.JTabbedPane()
     self.add(self.tabs, awt.BorderLayout.CENTER)
Ejemplo n.º 17
0
    def registerExtenderCallbacks(self, callbacks):
        print "Name: \t\t"      + BurpExtender.EXT_NAME
        print "Description: \t" + BurpExtender.EXT_DESC
        print "Authors: \t"      + BurpExtender.EXT_AUTHOR
        # Required for easier debugging:
        # https://github.com/securityMB/burp-exceptions
        sys.stdout = callbacks.getStdout()
        self._callbacks = callbacks
        self._helpers   = callbacks.getHelpers()
        callbacks.setExtensionName(BurpExtender.EXT_NAME)
        stdout = PrintWriter(callbacks.getStdout(), True)
        callbacks.registerContextMenuFactory(self)
        self.httpTraffic = None
        self.resp = None

        #Create panels used for layout; we must stack and layer to get the desired GUI
        self.tab = swing.Box(swing.BoxLayout.Y_AXIS)
        self.tabbedPane  = swing.JTabbedPane()
        self.tab.add(self.tabbedPane)
        
        # First tab
        self.duetTab = swing.Box(swing.BoxLayout.Y_AXIS)
        self.tabbedPane.addTab("MSSQLi-DUET", self.duetTab)
                
        # Create objects for the first tab's GUI
        # These rows will add top to bottom on the Y Axis
        self.t1r1 = swing.JPanel(FlowLayout())
        self.t1r2 = swing.JPanel(FlowLayout())
        self.t1r3 = swing.JPanel(FlowLayout())
        self.t1r4 = swing.JPanel(FlowLayout())
        self.t1r5 = swing.JPanel(FlowLayout())
        self.t1r6 = swing.JPanel(FlowLayout())
        self.t1r7 = swing.JPanel(FlowLayout())

        # Now add content to the first tab's GUI objects
        self.encodingBox = swing.JComboBox(["None","unicode","unicode_unescaped","doubleencode","unmagicquotes"])
        self.delayBox = swing.JTextField("0",3)
        self.ridMinBox = swing.JTextField("1000",5)
        self.ridMaxBox = swing.JTextField("1500",5)
        self.paramBox = swing.JTextField("",15)
        self.injectBox = swing.JTextField("",15)
        self.outputTxt = swing.JTextArea(10,50)
        self.outputScroll = swing.JScrollPane(self.outputTxt)
        self.requestTxt = swing.JTextArea(10,50)
        self.requestScroll = swing.JScrollPane(self.requestTxt)
        self.requestTxt.setLineWrap(True)
        self.outputTxt.setBackground(Color.lightGray)
        self.outputTxt.setEditable(False)
        self.outputTxt.setLineWrap(True)
       
        self.t1r1.add(swing.JLabel("<html><center><h2>MSSQLi-DUET</h2>Enumerate Active Directory users, groups, and machines via SQL injection.</center></html>"))
        
        #Add labels here for all of the args needed.
        self.t1r2.add(swing.JLabel("WAF Bypass Method:"))
        self.t1r2.add(self.encodingBox)
        
        #Minimum RID value
        self.t1r2.add(swing.JLabel("Minimum RID value:"))
        self.t1r2.add(self.ridMinBox)
        #Maximum RID value
        self.t1r2.add(swing.JLabel("Maximum RID value:"))
        self.t1r2.add(self.ridMaxBox)
        #Delay for requests
        self.t1r2.add(swing.JLabel("Delay:"))
        self.t1r2.add(self.delayBox)
        #Vulnerable parameter
        self.t1r3.add(swing.JLabel("Vulnerable Parameter:"))
        self.t1r3.add(self.paramBox)
        #Injection starting point
        self.t1r3.add(swing.JLabel("Injection start:"))
        self.t1r3.add(self.injectBox)

        #Request section
        self.t1r4.add(swing.JLabel("Raw request:"))
        self.t1r4.add(self.requestScroll)       
        self.t1r5.add(swing.JButton("Run", actionPerformed=self.executePayload))
        self.t1r5.add(swing.JButton("Clear", actionPerformed=self.clearRequest))  

        #Results section
        self.t1r6.add(swing.JLabel("Results Output:"))
        self.t1r6.add(self.outputScroll) 
        self.t1r7.add(swing.JButton("Copy results to Clipboard", actionPerformed=self.copyToClipboard))
        self.t1r7.add(swing.JButton("Clear", actionPerformed=self.clearOutput)) 

        # Add the GUI objects into the first tab
        self.duetTab.add(self.t1r1)
        self.duetTab.add(self.t1r2)
        self.duetTab.add(self.t1r3)
        self.duetTab.add(self.t1r4)
        self.duetTab.add(self.t1r5)
        self.duetTab.add(self.t1r6)
        self.duetTab.add(self.t1r7)
       
        # Now that the GUI objects are added, we can resize them to fit snug in the UI
        self.t1r1.setMaximumSize(Dimension(850, 100))
        self.t1r2.setMaximumSize(Dimension(875, 50))
        self.t1r3.setMaximumSize(Dimension(800, 75))
        self.t1r4.setMaximumSize(Dimension(800, 200))
        self.t1r5.setMaximumSize(Dimension(800, 50))
        self.t1r6.setMaximumSize(Dimension(800, 200))
        self.t1r7.setMaximumSize(Dimension(800, 200))
        #Register the panel in the Burp GUI
        callbacks.addSuiteTab(self)
        return
Ejemplo n.º 18
0
    def reportSolution_gsa(self, output,
                           cmdarray):  #w#for genome-scale analysis
        recordtabs = swing.JTabbedPane()
        #        records = output.split(ENDTAG)
        records = output.split(';\n')
        outputtable = []
        pscript = self.getScript()  #problem file
        precs = pscript.split(';')
        for i in range(len(records) - 1):
            record = records[i]
            outtabs = swing.JTabbedPane()
            if self.program == Util.GFAA:
                lines_reac, lines_gene = Data.Tabular.output2table_gfaa(record)
                table_reac = OutputTable.OutputTable(self.metabolicModel)
                table_reac.write(lines_reac, 'GFAAreac')
                tab_reac = swing.JScrollPane(table_reac)
                table_gene = OutputTable.OutputTable(self.metabolicModel)
                table_gene.write(lines_gene, 'GFAAgene')
                tab_gene = swing.JScrollPane(table_gene)
                outtabs.addTab('Reaction', tab_reac)
                outtabs.addTab('Gene', tab_gene)
                outtabs.setToolTipTextAt(outtabs.indexOfTab('Reaction'),
                                         'Flux-activity state for reactions')
                outtabs.setToolTipTextAt(outtabs.indexOfTab('Gene'),
                                         'Flux-activity state for Gene')
                outputtable += [table_reac, table_gene]
                recordtabs.addTab('Record' + str(i + 1), outtabs)
            elif self.program in (Util.GFVA2, Util.GFVA3, Util.GIMME2):
                lines_obj, lines_reac = Data.Tabular.output2table_gfva(
                    record, self.program)
                table_obj = OutputTable.OutputTable(self.metabolicModel)
                table_reac = OutputTable.OutputTable(self.metabolicModel)
                table_obj.write(lines_obj, 'GFVAobj')
                table_reac.write(lines_reac, 'GFVAreac')
                tabpanel = swing.JPanel()
                #                tabpanelsp = swing.JScrollPane(tabpanel)
                tabpanel.setLayout(
                    swing.BoxLayout(tabpanel, swing.BoxLayout.Y_AXIS))
                tab1 = swing.JScrollPane(table_obj)
                tab1.setPreferredSize(awt.Dimension(0, 60))
                tab2 = swing.JScrollPane(table_reac)
                tabpanel.add(tab1)
                tabpanel.add(tab2)
                #                outtabs.addTab('Results', tabpanel)
                outputtable += [table_obj, table_reac]
                recordtabs.addTab('Record' + str(i + 1), tabpanel)
            elif self.program == 'SGNI':
                media = precs[i].strip().split('\n')[0].strip().lstrip(
                    '!').split(' ')
                lines_blp, lines_gni = Data.Tabular.output2table_sgni(
                    record, media)
                table_blp = OutputTable.OutputTable(self.metabolicModel)
                table_blp.write_gni(lines_blp, 'SGNIblp', media)
                tab_blp = swing.JScrollPane(table_blp)
                table_gni = OutputTable.OutputTable(self.metabolicModel)
                table_gni.write_gni(lines_gni, 'SGNIgni', media)
                for col in range(table_gni.getColumnCount())[1:]:
                    table_gni.getColumnModel().getColumn(col).setCellRenderer(
                        OutputTable.SGNIRenderer())
                tab_gni = swing.JScrollPane(table_gni)
                outtabs.addTab('Results', tab_blp)
                outtabs.addTab('GNI matrix', tab_gni)
                outtabs.setToolTipTextAt(outtabs.indexOfTab('Results'),
                                         'bi-level LP optimization results')
                outtabs.setToolTipTextAt(
                    outtabs.indexOfTab('GNI matrix'),
                    'the predicted gene-nutrient interactions')
                outputtable += [table_blp, table_gni]
                recordtabs.addTab('Record' + str(i + 1), outtabs)
            elif self.program == 'WGNI':
                media = precs[i].strip().split('\n')[0].strip().lstrip(
                    '!').split(' ')
                lines_out, lines_gni = Data.Tabular.output2table_wgni(
                    record, media)
                table_out = OutputTable.OutputTable(self.metabolicModel)
                table_out.write(lines_out, 'WGNIout')
                tab_out = swing.JScrollPane(table_out)
                table_gni = OutputTable.OutputTable(self.metabolicModel)
                table_gni.write_gni(lines_gni, 'WGNIgni', media)
                tab_gni = swing.JScrollPane(table_gni)
                outtabs.addTab('Results', tab_out)
                outtabs.addTab('GNI matrix', tab_gni)
                outtabs.setToolTipTextAt(outtabs.indexOfTab('Results'),
                                         'weak GNI results')
                outtabs.setToolTipTextAt(
                    outtabs.indexOfTab('GNI matrix'),
                    'the predicted gene-nutrient interactions')
                outputtable += [table_out, table_gni]
                recordtabs.addTab('Record' + str(i + 1), outtabs)
            elif self.program == 'DPAplot':
                lines_m2g, lines_g2m, lines_mat, glist = Data.Tabular.output2table_dpaplot(
                    record)
                self.table_m2g = OutputTable.OutputTable(self.metabolicModel)
                table_g2m = OutputTable.OutputTable(self.metabolicModel)
                table_mat = OutputTable.OutputTable(self.metabolicModel)
                self.table_m2g.write(lines_m2g, 'DPAm2g')
                table_g2m.write(lines_g2m, 'DPAg2m')
                table_mat.write_gni(lines_mat, 'DPAmat', glist)
                tab_m2g = swing.JScrollPane(self.table_m2g)
                tab_g2m = swing.JScrollPane(table_g2m)
                tab_mat = swing.JScrollPane(table_mat)
                outtabs.addTab('Metabolites', tab_m2g)
                outtabs.addTab('Genes', tab_g2m)
                outtabs.addTab('Producibility of WT and KO', tab_mat)
                outtabs.setToolTipTextAt(
                    outtabs.indexOfTab('Metabolites'),
                    'mapping from metabolites to essential genes')
                outtabs.setToolTipTextAt(outtabs.indexOfTab('Genes'),
                                         'mapping from gene to metabolites')
                outtabs.setToolTipTextAt(
                    outtabs.indexOfTab('Producibility of WT and KO'),
                    'metabolic producibility in wildtype and gene-knockout models'
                )
                outputtable += [self.table_m2g, table_g2m, table_mat]
                recordtabs.addTab('Record' + str(i + 1), outtabs)
            elif self.program == 'DPAsig':
                lines_up, lines_dw, list = Data.Tabular.output2table_dpasig(
                    record)
                table_up = OutputTable.OutputTable(self.metabolicModel)
                table_dw = OutputTable.OutputTable(self.metabolicModel)
                table_up.write_gni(lines_up, 'DPAsig', list)
                table_dw.write_gni(lines_dw, 'DPAsig', list)
                tab_up = swing.JScrollPane(table_up)
                tab_dw = swing.JScrollPane(table_dw)
                outtabs.addTab('Signals_UP', tab_up)
                outtabs.addTab('Signals_DOWN', tab_dw)
                outtabs.setToolTipTextAt(outtabs.indexOfTab('Signals_UP'),
                                         'Signals for up-regulated genes')
                outtabs.setToolTipTextAt(outtabs.indexOfTab('Signals_DOWN'),
                                         'Signals for down-regulated genes')
                outputtable += [table_up, table_dw]
                recordtabs.addTab('Record' + str(i + 1), outtabs)
            else:
                reclines = record.strip().split('\n')
                table = OutputTable.OutputTable(self.metabolicModel)
                table.write(reclines, self.program)
                tab = swing.JScrollPane(table)
                #                table.setColWidths(self.getWidth())
                outputtable += [table]
                recordtabs.addTab('Record' + str(i + 1), tab)
#            if self.program in ('GFAA','SGNI','WGNI','DPAplot','DPAsig'):
#                recordtabs.addTab('Record'+str(i+1), outtabs)
#            else: recordtabs.addTab('Record'+str(i+1), outtab)

        INFO = '#Analysis : ' + self.program + '\n\n'
        for i in range(len(precs) - 1):
            INFO += '#Record' + str(i +
                                    1) + ' :\n' + precs[i].strip() + '\n;\n\n'
        INFO += '\n#Command :\n' + ' '.join(cmdarray) + '\n\n'
        INFO += '\n#Time spent : ' + records[-1].split(
            ':')[1].strip() + ' (second)\n\n'

        textArea = swing.JTextArea()
        textArea.append(INFO)
        textArea.setLineWrap(True)
        tab_info = swing.JScrollPane(textArea)
        recordtabs.addTab('INFO.', tab_info)
        TabCloser(self.program).put(recordtabs, self)
        for table in outputtable:
            table.setColWidths_gsa(self.getWidth())
        if self.listener:
            self.listener()
        #self.table=table#wtr#
        #print self.table#wtr#
        self.tabtitle = self.getTitleAt(self.getSelectedIndex())  #wtr#
Ejemplo n.º 19
0
    def registerExtenderCallbacks(self, callbacks):
        print("Name: \t\t" + BurpExtender.EXT_NAME)
        print("Description: \t" + BurpExtender.EXT_DESC)
        print("Authors: \t" + BurpExtender.EXT_AUTHOR)
        print("Version: \t" + BurpExtender.EXT_VERSION + "\n")
        # Required for easier debugging:
        # https://github.com/securityMB/burp-exceptions
        sys.stdout = callbacks.getStdout()
        self._callbacks = callbacks
        self._helpers = callbacks.getHelpers()
        callbacks.setExtensionName(BurpExtender.EXT_NAME)

        self.killDanglingThreadsOnUnload = callbacks.registerExtensionStateListener(
            self.killDanglingThreads)

        #Create Burp Collaborator Instance
        self.burpCollab = self._callbacks.createBurpCollaboratorClientContext()
        self.collaboratorDomain = self.burpCollab.generatePayload(True)

        #Create panels used for layout; we must stack and layer to get the desired GUI
        self.tab = swing.Box(swing.BoxLayout.Y_AXIS)
        self.tabbedPane = swing.JTabbedPane()
        self.tab.add(self.tabbedPane)

        # First tab
        self.collabfiltratorTab = swing.Box(swing.BoxLayout.Y_AXIS)
        self.tabbedPane.addTab("Collabfiltrator", self.collabfiltratorTab)

        # Second tab
        #self.configurationTab = swing.Box(swing.BoxLayout.Y_AXIS)
        #self.tabbedPane.addTab("Configuration", self.configurationTab)

        # Create objects for the first tab's GUI
        # These rows will add top to bottom on the Y Axis
        self.t1r1 = swing.JPanel(FlowLayout())  # title and description frame
        self.t1r2 = swing.JPanel(FlowLayout())  #platform and command box frame
        self.t1r3 = swing.JPanel(FlowLayout())  #payload box frame
        self.t1r5 = swing.JPanel(
            FlowLayout())  #copy payload to clipboard frame
        self.t1r7 = swing.JPanel(FlowLayout())  #output box frame
        self.t1r4 = swing.JPanel(FlowLayout())  # collaborator domainname frame
        self.t1r6 = swing.JPanel(
            FlowLayout()
        )  # hidden stop listener frame that only appears upon payload generation
        self.t1r8 = swing.JPanel(FlowLayout())  #clearOutput box frame

        # Now add content to the first tab's GUI objects
        self.osComboBox = swing.JComboBox(
            ["Windows PowerShell", "Linux (sh + ping)"])
        self.commandTxt = swing.JTextField("hostname", 35)
        #self.commandTxt = swing.JTextField("dir c:\inetpub\wwwroot", 35)
        self.payloadTxt = swing.JTextArea(10, 55)
        self.payloadTxt.setEditable(
            False)  # So you can't messup the generated payload
        self.payloadTxt.setLineWrap(True)  #Wordwrap the output of payload box
        self.outputTxt = swing.JTextArea(10, 55)
        self.outputScroll = swing.JScrollPane(
            self.outputTxt)  # Make the output scrollable
        self.payloadScroll = swing.JScrollPane(
            self.payloadTxt)  # Make the payloadText scrollable

        self.progressBar = swing.JProgressBar(5, 15)
        self.progressBar.setVisible(False)  # Progressbar is hiding

        self.outputTxt.setEditable(False)
        self.outputTxt.setLineWrap(True)
        self.burpCollaboratorDomainTxt = swing.JTextPane(
        )  # burp collaboratorTextPane
        self.burpCollaboratorDomainTxt.setText(
            " ")  #burp collaborator domain goes here
        self.burpCollaboratorDomainTxt.setEditable(False)
        self.burpCollaboratorDomainTxt.setBackground(None)
        self.burpCollaboratorDomainTxt.setBorder(None)
        titleLabel = swing.JLabel(
            "<html><center><h2>Collabfiltrator</h2>Exfiltrate blind remote code execution output over DNS via Burp Collaborator.</center></html>"
        )
        titleLabel.putClientProperty("html.disable", None)
        self.t1r1.add(titleLabel)
        self.t1r2.add(swing.JLabel("Platform"))
        self.t1r2.add(self.osComboBox)
        self.t1r2.add(swing.JLabel("Command"))
        self.t1r2.add(self.commandTxt)
        self.t1r2.add(
            swing.JButton("Execute", actionPerformed=self.executePayload))
        self.t1r3.add(swing.JLabel("Payload"))
        self.t1r3.add(self.payloadScroll)
        self.t1r4.add(
            self.burpCollaboratorDomainTxt)  #burp Collab Domain will go here
        self.t1r5.add(
            swing.JButton("Copy Payload to Clipboard",
                          actionPerformed=self.copyToClipboard))
        self.t1r6.add(self.progressBar)
        self.stopListenerButton = swing.JButton(
            "Stop Listener", actionPerformed=self.stopListener)
        self.stopListenerButton.setVisible(False)  # hide stopListenerButton
        self.t1r6.add(self.stopListenerButton)
        self.t1r7.add(swing.JLabel("Output"))
        self.t1r7.add(self.outputScroll)  #add output scroll bar to page
        self.t1r8.add(
            swing.JButton("Clear Output", actionPerformed=self.clearOutput))

        # Add the GUI objects into the first tab
        self.collabfiltratorTab.add(self.t1r1)
        self.collabfiltratorTab.add(self.t1r2)
        self.collabfiltratorTab.add(self.t1r3)
        self.collabfiltratorTab.add(self.t1r4)
        self.collabfiltratorTab.add(self.t1r5)
        self.collabfiltratorTab.add(self.t1r6)
        self.collabfiltratorTab.add(self.t1r7)
        self.collabfiltratorTab.add(self.t1r8)

        # Create objects for the second tab's GUI
        self.dummylabel = swing.JLabel(
            "Burp Collaborator Config options will go here.")

        # Add the GUI objects into the second tab
        ########self.configurationTab.add(self.dummylabel)

        #Register the panel in the Burp GUI
        callbacks.addSuiteTab(self)
        return
Ejemplo n.º 20
0
    def __init__(self):
        #########################################################
        #
        # set up the overall frame (the window itself)
        #
        self.window = swing.JFrame("Swing Sampler!")
        self.window.windowClosing = self.goodbye
        self.window.contentPane.layout = awt.BorderLayout()

        #########################################################
        #
        # under this will be a tabbed pane; each tab is named
        # and contains a panel with other stuff in it.
        #
        tabbedPane = swing.JTabbedPane()
        self.window.contentPane.add("Center", tabbedPane)

        #########################################################
        #
        # The first tabbed panel will be named "Some Basic
        # Widgets", and is referenced by variable 'firstTab'
        #
        firstTab = swing.JPanel()
        firstTab.layout = awt.BorderLayout()
        tabbedPane.addTab("Some Basic Widgets", firstTab)

        #
        # slap in some labels, a list, a text field, etc... Some
        # of these are contained in their own panels for
        # layout purposes.
        #
        tmpPanel = swing.JPanel()
        tmpPanel.layout = awt.GridLayout(3, 1)
        tmpPanel.border = swing.BorderFactory.createTitledBorder(
            "Labels are simple")
        tmpPanel.add(swing.JLabel("I am a label. I am quite boring."))
        tmpPanel.add(
            swing.JLabel(
                "<HTML><FONT COLOR='blue'>HTML <B>labels</B></FONT> are <I>somewhat</I> <U>less boring</U>.</HTML>"
            ))
        tmpPanel.add(
            swing.JLabel("Labels can also be aligned", swing.JLabel.RIGHT))
        firstTab.add(tmpPanel, "North")

        #
        # Notice that the variable "tmpPanel" gets reused here.
        # This next line creates a new panel, but we reuse the
        # "tmpPanel" name to refer to it.  The panel that
        # tmpPanel used to refer to still exists, but we no
        # longer have a way to name it (but that's ok, since
        # we don't need to refer to it any more).

        #
        tmpPanel = swing.JPanel()
        tmpPanel.layout = awt.BorderLayout()
        tmpPanel.border = swing.BorderFactory.createTitledBorder(
            "Tasty tasty lists")

        #
        # Note that here we stash a reference to the list in
        # "self.list".  This puts it in the scope of the object,
        # rather than this function.  This is because we'll be
        # referring to it later from outside this function, so
        # it needs to be "bumped up a level."
        #

        listData = [
            "January", "February", "March", "April", "May", "June", "July",
            "August", "September", "October", "November", "December"
        ]
        self.list = swing.JList(listData)
        tmpPanel.add("Center", swing.JScrollPane(self.list))
        button = swing.JButton("What's Selected?")
        button.actionPerformed = self.whatsSelectedCallback
        tmpPanel.add("East", button)
        firstTab.add("Center", tmpPanel)

        tmpPanel = swing.JPanel()
        tmpPanel.layout = awt.BorderLayout()

        #
        # The text field also goes in self, since the callback
        # that displays the contents will need to get at it.
        #
        # Also note that because the callback is a function inside
        # the SwingSampler object, you refer to it through self.
        # (The callback could potentially be outside the object,
        # as a top-level function. In that case you wouldn't
        # use the 'self' selector; any variables that it uses
        # would have to be in the global scope.
        #
        self.field = swing.JTextField()
        tmpPanel.add(self.field)
        tmpPanel.add(
            swing.JButton("Click Me", actionPerformed=self.clickMeCallback),
            "East")
        firstTab.add(tmpPanel, "South")

        #########################################################
        #
        # The second tabbed panel is next...  This shows
        # how to build a basic web browser in about 20 lines.
        #
        secondTab = swing.JPanel()
        secondTab.layout = awt.BorderLayout()
        tabbedPane.addTab("HTML Fanciness", secondTab)

        tmpPanel = swing.JPanel()
        tmpPanel.add(swing.JLabel("Go to:"))
        self.urlField = swing.JTextField(40, actionPerformed=self.goToCallback)
        tmpPanel.add(self.urlField)
        tmpPanel.add(swing.JButton("Go!", actionPerformed=self.goToCallback))
        secondTab.add(tmpPanel, "North")

        self.htmlPane = swing.JEditorPane("http://www.google.com",
                                          editable=0,
                                          hyperlinkUpdate=self.followHyperlink,
                                          preferredSize=(400, 400))
        secondTab.add(swing.JScrollPane(self.htmlPane), "Center")

        self.statusLine = swing.JLabel("(status line)")
        secondTab.add(self.statusLine, "South")

        #########################################################
        #
        # The third tabbed panel is next...
        #
        thirdTab = swing.JPanel()
        tabbedPane.addTab("Other Widgets", thirdTab)

        imageLabel = swing.JLabel(
            swing.ImageIcon(
                net.URL("http://www.gatech.edu/images/logo-gatech.gif")))
        imageLabel.toolTipText = "Labels can have images! Every widget can have a tooltip!"
        thirdTab.add(imageLabel)

        tmpPanel = swing.JPanel()
        tmpPanel.layout = awt.GridLayout(3, 2)
        tmpPanel.border = swing.BorderFactory.createTitledBorder(
            "Travel Checklist")
        tmpPanel.add(
            swing.JCheckBox("Umbrella", actionPerformed=self.checkCallback))
        tmpPanel.add(
            swing.JCheckBox("Rain coat", actionPerformed=self.checkCallback))
        tmpPanel.add(
            swing.JCheckBox("Passport", actionPerformed=self.checkCallback))
        tmpPanel.add(
            swing.JCheckBox("Airline tickets",
                            actionPerformed=self.checkCallback))
        tmpPanel.add(
            swing.JCheckBox("iPod", actionPerformed=self.checkCallback))
        tmpPanel.add(
            swing.JCheckBox("Laptop", actionPerformed=self.checkCallback))
        thirdTab.add(tmpPanel)

        tmpPanel = swing.JPanel()
        tmpPanel.layout = awt.GridLayout(4, 1)
        tmpPanel.border = swing.BorderFactory.createTitledBorder("My Pets")
        #
        # A ButtonGroup is used to indicate which radio buttons
        # go together.
        #
        buttonGroup = swing.ButtonGroup()

        radioButton = swing.JRadioButton("Dog",
                                         actionPerformed=self.radioCallback)
        buttonGroup.add(radioButton)
        tmpPanel.add(radioButton)

        radioButton = swing.JRadioButton("Cat",
                                         actionPerformed=self.radioCallback)
        buttonGroup.add(radioButton)
        tmpPanel.add(radioButton)

        radioButton = swing.JRadioButton("Pig",
                                         actionPerformed=self.radioCallback)
        buttonGroup.add(radioButton)
        tmpPanel.add(radioButton)

        radioButton = swing.JRadioButton("Capybara",
                                         actionPerformed=self.radioCallback)
        buttonGroup.add(radioButton)
        tmpPanel.add(radioButton)

        thirdTab.add(tmpPanel)

        self.window.pack()
        self.window.show()
Ejemplo n.º 21
0
 def createFrame (self):
 
     # Create the find panel...
     #outer = Tk.Frame(self.frame,relief="groove",bd=2)
     #outer.pack(padx=2,pady=2)
     self.top = swing.JFrame()
     g.app.gui.addLAFListener( self.top )
     #self.top.setDefaultCloseOperation( swing.JFrame.EXIT_ON_CLOSE )
     self.top.title = self.title
     jtab = swing.JTabbedPane()
     self.top.add( jtab )
     cpane = swing.JPanel()
     jtab.addTab( "regular search", cpane )
     clnsearch = swing.JPanel()
     clnsearch.setName( "Leodialog" )
     jtab.addTab( "node search", clnsearch )
     #cpane = outer.getContentPane()
     cpane.setName( "Leodialog" )
     cpane.setLayout( awt.GridLayout( 3, 1 ) )
 
     
     #@    << Create the Find and Change panes >>
     #@+node:mork.20050127121143.6:<< Create the Find and Change panes >>
     #fc = Tk.Frame(outer, bd="1m")
     #fc.pack(anchor="n", fill="x", expand=1)
     findPanel = self.findPanel = swing.JTextArea()
     self.CutCopyPaste( findPanel )
     fspane = swing.JScrollPane( findPanel )
     
     self.changePanel = changePanel = swing.JTextArea()
     self.CutCopyPaste( changePanel )
     cpane2 = swing.JScrollPane( changePanel )
     splitpane = swing.JSplitPane( swing.JSplitPane.VERTICAL_SPLIT, fspane, cpane2 )
     splitpane.setDividerLocation( .5 )
     #outer.getContentPane().add( splitpane )
     cpane.add( splitpane )
     #outer.pack()
     
     
     # Removed unused height/width params: using fractions causes problems in some locales!
     #fpane = Tk.Frame(fc, bd=1)
     #cpane = Tk.Frame(fc, bd=1)
     
     #fpane.pack(anchor="n", expand=1, fill="x")
     #cpane.pack(anchor="s", expand=1, fill="x")
     
     # Create the labels and text fields...
     #flab = Tk.Label(fpane, width=8, text="Find:")
     #clab = Tk.Label(cpane, width=8, text="Change:")
     
     # Use bigger boxes for scripts.
     #self.find_text   = ftxt = Tk.Text(fpane,bd=1,relief="groove",height=4,width=20)
     #3self.change_text = ctxt = Tk.Text(cpane,bd=1,relief="groove",height=4,width=20)
     
     #fBar = Tk.Scrollbar(fpane,name='findBar')
     #cBar = Tk.Scrollbar(cpane,name='changeBar')
     
     # Add scrollbars.
     #for bar,txt in ((fBar,ftxt),(cBar,ctxt)):
     #    txt['yscrollcommand'] = bar.set
     #    bar['command'] = txt.yview
     #    bar.pack(side="right", fill="y")
     
     #flab.pack(side="left")
     #clab.pack(side="left")
     #ctxt.pack(side="right", expand=1, fill="both")
     #ftxt.pack(side="right", expand=1, fill="both")
     #@nonl
     #@-node:mork.20050127121143.6:<< Create the Find and Change panes >>
     #@nl
     #@    << Create four columns of radio and checkboxes >>
     #@+node:mork.20050127121143.7:<< Create four columns of radio and checkboxes >>
     #columnsFrame = Tk.Frame(outer,relief="groove",bd=2)
     #columnsFrame.pack(anchor="e",expand=1,padx="7p",pady="2p") # Don't fill.
     columnsFrame = swing.JPanel()
     columnsFrame.setLayout( swing.BoxLayout( columnsFrame, swing.BoxLayout.X_AXIS ) )
     cpane.add( columnsFrame, awt.BorderLayout.SOUTH )
     
     numberOfColumns = 4 # Number of columns
     columns = [] ; radioLists = [] ; checkLists = []; buttonGroups = []
     for i in xrange(numberOfColumns):
         #columns.append(Tk.Frame(columnsFrame,bd=1))
         jp = swing.JPanel()
         jp.setLayout( swing.BoxLayout( jp, swing.BoxLayout.Y_AXIS ) )
         columns.append( jp )
         radioLists.append([])
         checkLists.append([])
         buttonGroups.append( swing.ButtonGroup() )
     
     for i in xrange(numberOfColumns):
         columnsFrame.add( columns[ i ] )
         #columns[i].pack(side="left",padx="1p") # fill="y" Aligns to top. padx expands columns.
     
     radioLists[0] = [
         (self.dict["radio-find-type"],"Plain Search","plain-search"),  
         (self.dict["radio-find-type"],"Pattern Match Search","pattern-search"),
         (self.dict["radio-find-type"],"Script Search","script-search")]
     checkLists[0] = [
         ("Script Change",self.dict["script_change"])]
     checkLists[1] = [
         ("Whole Word",  self.dict["whole_word"]),
         ("Ignore Case", self.dict["ignore_case"]),
         ("Wrap Around", self.dict["wrap"]),
         ("Reverse",     self.dict["reverse"])]
     radioLists[2] = [
         (self.dict["radio-search-scope"],"Entire Outline","entire-outine"),
         (self.dict["radio-search-scope"],"Suboutline Only","suboutline-only"),  
         (self.dict["radio-search-scope"],"Node Only","node-only"),
         # I don't know what selection-only is supposed to do.
         (self.dict["radio-search-scope"],"Selection Only","selection-only")]
     checkLists[2] = []
     checkLists[3] = [
         ("Search Headline Text", self.dict["search_headline"]),
         ("Search Body Text",     self.dict["search_body"]),
         ("Mark Finds",           self.dict["mark_finds"]),
         ("Mark Changes",         self.dict["mark_changes"])]
         
         
     class rAction( swing.AbstractAction ):
         
         def __init__( self, name, var , val ):
             swing.AbstractAction.__init__( self, name )
             self.name = name
             self.var = var
             self.val = val
             
         def actionPerformed( self, aE ):
             self.var.set( self.val )
             
     class jcbAction( swing.AbstractAction ):
         
         def __init__( self, name, var ):
             swing.AbstractAction.__init__( self, name )
             self.var = var
             
         def actionPerformed( self, ae ):
         
             val = self.var.get()
             if val:
                 self.var.set( 0 )
             else:
                 self.var.set( 1 )
     
     for i in xrange(numberOfColumns):
         for var,name,val in radioLists[i]:
             aa = rAction( name, var, val )
             but = swing.JRadioButton( aa )
             columns[ i ].add( but )
             buttonGroups[ i ].add( but )
             #box = Tk.Radiobutton(columns[i],anchor="w",text=name,variable=var,value=val)
             #box.pack(fill="x")
             #box.bind("<1>", self.resetWrap)
             #if val == None: box.configure(state="disabled")
         for name, var in checkLists[i]:
             cbut = swing.JCheckBox( jcbAction( name, var ) )
             columns[ i ].add( cbut )
             #box = Tk.Checkbutton(columns[i],anchor="w",text=name,variable=var)
             #box.pack(fill="x")
             #box.bind("<1>", self.resetWrap)
             #if var is None: box.configure(state="disabled")
     
     for z in buttonGroups:
         
         elements = z.getElements()
         for x in elements:
             x.setSelected( True )
             break
     #@-node:mork.20050127121143.7:<< Create four columns of radio and checkboxes >>
     #@nl
     #@    << Create two rows of buttons >>
     #@+node:mork.20050127121143.8:<< Create two rows of buttons >>
     # Create the button panes
     secondGroup = swing.JPanel()
     secondGroup.setLayout( awt.GridLayout( 2, 3 , 10, 10 ) )
     cpane.add( secondGroup )
     #buttons  = Tk.Frame(outer,bd=1)
     #buttons2 = Tk.Frame(outer,bd=1)
     #buttons.pack (anchor="n",expand=1,fill="x")
     #buttons2.pack(anchor="n",expand=1,fill="x")
     class commandAA( swing.AbstractAction ):
         
         def __init__( self, name, command ):
             swing.AbstractAction.__init__( self, name )
             self.command = command
             
         def actionPerformed( self, aE ):
             self.command()
     
     
     # Create the first row of buttons
     #findButton=Tk.Button(buttons,width=8,text="Find",bd=4,command=self.findButton) # The default.
     #contextBox=Tk.Checkbutton(buttons,anchor="w",text="Show Context",variable=self.dict["batch"])
     #findAllButton=Tk.Button(buttons,width=8,text="Find All",command=self.findAllButton)
     findButton = swing.JButton( commandAA( "Find", self.findButton ) )
     contextBox = swing.JCheckBox( "Show Context" )
     findAllButton = swing.JButton( commandAA( "Find All", self.findAllButton ) )
     secondGroup.add( findButton )
     secondGroup.add( contextBox )
     secondGroup.add( findAllButton )
     
     #findButton.pack   (pady="1p",padx="25p",side="left")
     #contextBox.pack   (pady="1p",           side="left",expand=1)
     #findAllButton.pack(pady="1p",padx="25p",side="right",fill="x",)
     
     # Create the second row of buttons
     #changeButton    =Tk.Button(buttons2,width=8,text="Change",command=self.changeButton)
     #changeFindButton=Tk.Button(buttons2,        text="Change, Then Find",command=self.changeThenFindButton)
     #changeAllButton =Tk.Button(buttons2,width=8,text="Change All",command=self.changeAllButton)
     changeButton = swing.JButton( commandAA( "Change", self.changeButton ) )
     changeFindButton = swing.JButton( commandAA( "Change, Then Find", self.changeThenFindButton ) )
     changeAllButton = swing.JButton( commandAA( "Change All", self.changeAllButton ) )
     secondGroup.add( changeButton )
     secondGroup.add( changeFindButton )
     secondGroup.add( changeAllButton )
     
     #changeButton.pack    (pady="1p",padx="25p",side="left")
     #changeFindButton.pack(pady="1p",           side="left",expand=1)
     #changeAllButton.pack (pady="1p",padx="25p",side="right")
     #@nonl
     #@-node:mork.20050127121143.8:<< Create two rows of buttons >>
     #@nl
     
     self.createNodeSearchFrame( clnsearch )
     #self.top.setSize( 500, 500 )
     self.top.pack()
     size = self.top.getSize()
     size.width = size.width + 50
     self.top.setSize( size )
     splitpane.setDividerLocation( .5 )