def changeSelection(self, row, col, toggle, extend):
    
        # show the message entry for the selected row
        selectedMessage = self.getModel()._db.getMessageByRow(row)
        self._extender._tabs.removeAll()

        # NOTE: testing if .locked is ok here since its a manual operation
        if self.getModel()._db.lock.locked():
            # Provide some feedback on a click
            self.redrawTable()
            return

        # Create original Request tab and set default tab to Request
        # Then Create test tabs and set the default tab to Response for easy analysis
        originalTab = self.createRequestTabs(selectedMessage._requestResponse)
        originalTab.setSelectedIndex(0)
        self._extender._tabs.addTab("Original",originalTab)
        for userIndex in selectedMessage._userRuns.keys():
            if not self.getModel()._db.arrayOfUsers[userIndex].isDeleted():
                tabname = str(self.getModel()._db.arrayOfUsers[userIndex]._name)
                self._extender._tabs.addTab(tabname,self.createRequestTabs(selectedMessage._userRuns[userIndex]))
                
        # TODO: do this on a tab change on extender._tabs: I think its needed for sending to repeater and comparer
        # WEIRD: I think this should make it so that only the original can be sent to places
        # However, it looks like it is working as expected... ???
        self._extender._currentlyDisplayedItem = selectedMessage._requestResponse
        JTable.changeSelection(self, row, col, toggle, extend)
        return
Beispiel #2
0
 def changeSelection(self, row, col, toggle, extend):
     logEntry = self._extender._log.get(self.convertRowIndexToModel(row))
     self._extender.iRequestTextEditor.setMessage(logEntry._requestResponse.getRequest(), True)
     self._extender.iResponseTextEditor.setMessage(logEntry._requestResponse.getResponse(), False)
     self._extender._currentlyDisplayedItem = logEntry._requestResponse
     
     JTable.changeSelection(self, row, col, toggle, extend)
Beispiel #3
0
    def changeSelection(self, row, col, toggle, extend):

        # show the message entry for the selected row
        selectedMessage = self.getModel()._db.getMessageByRow(row)
        self._extender._tabs.removeAll()

        # NOTE: testing if .locked is ok here since its a manual operation
        if self.getModel()._db.lock.locked():
            # Provide some feedback on a click
            self.redrawTable()
            return

        # Create original Request tab and set default tab to Request
        # Then Create test tabs and set the default tab to Response for easy
        # analysis
        originalTab = self.createRequestTabs(selectedMessage._requestResponse)
        originalTab.setSelectedIndex(0)
        self._extender._tabs.addTab("Original", originalTab)
        for campaignIndex in selectedMessage._campaignRuns.keys():
            if not self.getModel(
            )._db.arrayOfCampaigns[campaignIndex].isDeleted():
                tabname = str(
                    self.getModel()._db.arrayOfCampaigns[campaignIndex]._name)
                self._extender._tabs.addTab(
                    tabname,
                    self.createRequestTabs(
                        selectedMessage._campaignRuns[campaignIndex]))

        self._extender._currentlyDisplayedItem = selectedMessage._requestResponse
        JTable.changeSelection(self, row, col, toggle, extend)
        return
Beispiel #4
0
    def changeSelection(self, row, col, toggle, extend):

        # shows "entries" matching

        # show the log entry for the selected row
        #print 'Selecting entry ' + str(row) + ' in changeSelection: '

        JTable.changeSelection(self, row, col, toggle, extend)

        modelRow = self.convertRowIndexToModel(row)
        #print 'converted: ' + str()

        logEntry = self._extender._log.get(modelRow)

        #print str(self._extender._helpers.analyzeRequest(logEntry._requestResponse).getUrl())

        self._extender.SELECTED_MODEL_ROW = modelRow
        self._extender.SELECTED_VIEW_ROW = row

        self._extender._currentlyDisplayedItem = logEntry._requestResponse
        self._extender._requestViewer.setMessage(
            logEntry._requestResponse.getRequest(), True)
        self._extender._responseViewer.setMessage(
            logEntry._requestResponse.getResponse(), False)

        #JTable.changeSelection(self, row, col, toggle, extend)
        return
Beispiel #5
0
 def changeSelection(self, row, col, toggle, extend):
     '''
     Displays the selected item in the content pane
     '''
 
     JTable.changeSelection(self, row, col, toggle, extend)
     self.bottom_pane.show_log_entry(self.gui_log.get(row))
Beispiel #6
0
    def changeSelection(self, row, col, toggle, extend):
        '''
        Displays the selected item in the content pane
        '''

        JTable.changeSelection(self, row, col, toggle, extend)
        self.bottom_pane.show_log_entry(self.gui_log.get(row))
Beispiel #7
0
    def changeSelection(self, row, col, toggle, extend):
        # show the log entry for the selected row
        logEntry = self._extender._log.get(
            self._extender.logTable.convertRowIndexToModel(row))
        self._extender._requestViewer.setMessage(
            logEntry._requestResponse.getRequest(), True)
        self._extender._responseViewer.setMessage(
            logEntry._requestResponse.getResponse(), False)
        self._extender._originalrequestViewer.setMessage(
            logEntry._originalrequestResponse.getRequest(), True)
        self._extender._originalresponseViewer.setMessage(
            logEntry._originalrequestResponse.getResponse(), False)

        if logEntry._unauthorizedRequestResponse != None:
            self._extender._unauthorizedrequestViewer.setMessage(
                logEntry._unauthorizedRequestResponse.getRequest(), True)
            self._extender._unauthorizedresponseViewer.setMessage(
                logEntry._unauthorizedRequestResponse.getResponse(), False)
        else:
            self._extender._unauthorizedrequestViewer.setMessage(
                "Request disabled", True)
            self._extender._unauthorizedresponseViewer.setMessage(
                "Response disabled", False)

        self._extender._currentlyDisplayedItem = logEntry._requestResponse
        JTable.changeSelection(self, row, col, toggle, extend)
        return
Beispiel #8
0
 def changeSelection(self, row, col, toggle, extend):    
     scopeInfo  = self._extender._scopes.get(row)
     self._extender._label_value_regex_now_2.setText(scopeInfo.value_regex.pattern)
     self._extender._form_value_regex.setText(scopeInfo.value_regex.pattern)
     self._extender._label_header_now_2.setText(scopeInfo.header_name)
     self._extender._form_header.setText(scopeInfo.header_name)
     
     JTable.changeSelection(self, row, col, toggle, extend)
Beispiel #9
0
 def changeSelection(self, row, col, toggle, extend):
     logEntry = self._extender._log.get(row)
     self._extender._requestViewer.setMessage(logEntry._requestResponse.getRequest(), True)
     self._extender._responseViewer.setMessage(logEntry._requestResponse.getResponse(), False)
     self._extender._currentlyDisplayedItem = logEntry._requestResponse
     
     JTable.changeSelection(self, row, col, toggle, extend)
     return
Beispiel #10
0
 def changeSelection(self, row, col, toggle, extend):
 
     # show the  entry for the selected row
     entry = self._extender._issues.get(row)
     self._extender._texteditor.setText(entry.getDetail())
     
     JTable.changeSelection(self, row, col, toggle, extend)
     return
Beispiel #11
0
    def changeSelection(self, row, col, toggle, extend):
        logEntry = self._extender._log.get(row)
        self._extender._requestViewer.setMessage(logEntry.getRequest(), True)
        self._extender._responseViewer.setMessage(logEntry.getResponse(),
                                                  False)
        self._extender._currentlyDisplayedItem = logEntry

        JTable.changeSelection(self, row, col, toggle, extend)
Beispiel #12
0
    def changeSelection(self, row, col, toggle, extend):
        # show the log entry for the selected row
        logEntry = self._extender._log.get(row)
        self._extender._requestViewer.setMessage(logEntry._requestResponse.getRequest(), True)
        self._extender._responseViewer.setMessage(logEntry._requestResponse.getResponse(), False)
        self._extender._currentlyDisplayedItem = logEntry._requestResponse

        JTable.changeSelection(self, row, col, toggle, extend)
        return
Beispiel #13
0
    def changeSelection(self, row, col, toggle, extend):
        # show the log entry for the selected row
        logEntry = self._extender._log.get(
            self._extender.logTable.convertRowIndexToModel(row))
        self._extender._requestViewer.setMessage(
            logEntry._requestResponse.getRequest(), True)
        self._extender._responseViewer.setMessage(
            logEntry._requestResponse.getResponse(), False)
        self._extender._originalrequestViewer.setMessage(
            logEntry._originalrequestResponse.getRequest(), True)
        self._extender._originalresponseViewer.setMessage(
            logEntry._originalrequestResponse.getResponse(), False)

        if logEntry._unauthorizedRequestResponse is not None:
            self._extender._unauthorizedrequestViewer.setMessage(
                logEntry._unauthorizedRequestResponse.getRequest(), True)
            self._extender._unauthorizedresponseViewer.setMessage(
                logEntry._unauthorizedRequestResponse.getResponse(), False)
        else:
            self._extender._unauthorizedrequestViewer.setMessage(
                "Request disabled", True)
            self._extender._unauthorizedresponseViewer.setMessage(
                "Response disabled", False)

        self._extender._currentlyDisplayedItem = logEntry

        if col == 3:
            collapse(self._extender, self._extender.modified_requests_tabs)
            collapse(self._extender,
                     self._extender.unauthenticated_requests_tabs)
            expand(self._extender, self._extender.original_requests_tabs)
        elif col == 4 or col == 6:
            collapse(self._extender, self._extender.original_requests_tabs)
            collapse(self._extender,
                     self._extender.unauthenticated_requests_tabs)
            expand(self._extender, self._extender.modified_requests_tabs)
        elif col == 5 or col == 7:
            collapse(self._extender, self._extender.original_requests_tabs)
            collapse(self._extender, self._extender.modified_requests_tabs)
            expand(self._extender,
                   self._extender.unauthenticated_requests_tabs)
        else:
            collapse(self._extender, self._extender.original_requests_tabs)
            collapse(self._extender, self._extender.modified_requests_tabs)
            collapse(self._extender,
                     self._extender.unauthenticated_requests_tabs)

        JTable.changeSelection(self, row, col, toggle, extend)
        return
Beispiel #14
0
 def changeSelection(self, row, col, toggle, extend):
 
     # show the log entry for the selected row
     logEntry = self._extender._log.get(row)
     self._extender._origRequestViewer.setMessage(logEntry._origRequestResponse.getRequest(), True)
     self._extender._origResponseViewer.setMessage(logEntry._origRequestResponse.getResponse(), False)
     if not logEntry._modRequestResponse is None:
         self._extender._modRequestViewer.setMessage(logEntry._modRequestResponse.getRequest(), True)
         self._extender._modResponseViewer.setMessage(logEntry._modRequestResponse.getResponse(), False)
     else:
         self._extender._modRequestViewer.setMessage(toBytes(""), True)
         self._extender._modResponseViewer.setMessage(toBytes(""), False)
     self._extender._currentlyDisplayedItem = logEntry._origRequestResponse
     JTable.changeSelection(self, row, col, toggle, extend)
     return
Beispiel #15
0
    def changeSelection(self, row, col, toggle, extend):
        """
        Called by Swing when a hacker clicks on a row. Calls selectRow on our TableModel and then calls the parent function to handle highlighting of the clicked cell and etc.

        Args:
            row: row number
            col: col number
            toggle: whether to toggle the selection upon this click.
            extend: whether to extend the selection and have two or more rows selected.
        """
        JTable.changeSelection(self, row, col, toggle, extend)

        try:
            self.model.selectRow(self.convertRowIndexToModel(row))
        except:
            logging.exception("Exception in selectRow")
Beispiel #16
0
    def changeSelection(self, row, col, toggle, extend):
        # show the log entry for the selected row
        logEntry = self._extender._log.get(self._extender.logTable.convertRowIndexToModel(row))
        self._extender._requestViewer.setMessage(logEntry._requestResponse.getRequest(), True)
        self._extender._responseViewer.setMessage(logEntry._requestResponse.getResponse(), False)
        self._extender._originalrequestViewer.setMessage(logEntry._originalrequestResponse.getRequest(), True)
        self._extender._originalresponseViewer.setMessage(logEntry._originalrequestResponse.getResponse(), False)

        if logEntry._unauthorizedRequestResponse != None:
            self._extender._unauthorizedrequestViewer.setMessage(logEntry._unauthorizedRequestResponse.getRequest(), True)
            self._extender._unauthorizedresponseViewer.setMessage(logEntry._unauthorizedRequestResponse.getResponse(), False)
        else:
            self._extender._unauthorizedrequestViewer.setMessage("Request disabled", True)
            self._extender._unauthorizedresponseViewer.setMessage("Response disabled", False)

        self._extender._currentlyDisplayedItem = logEntry._requestResponse
        JTable.changeSelection(self, row, col, toggle, extend)
        return
Beispiel #17
0
    def changeSelection(self, row, col, toggle, extend):

        # get a handle on the current log
        logEntry        = self._extender._log.get(row)
        requestResponse = logEntry._requestResponse
        parser          = ParamScraper(self._extender,
                                       self._helpers,
                                       requestResponse)
        request         = parser.getRequestWithScrapedParameters()
        response        = requestResponse.getResponse()



        logEntry.setExtraParamCount(parser.getExtraParamCount())
        self._extender._requestViewer.setMessage(request, True)
        self._extender._responseViewer.setMessage(response, False)
        self._extender._currentlyDisplayedItem = requestResponse

        JTable.changeSelection(self, row, col, toggle, extend)
Beispiel #18
0
	def changeSelection(self, row, col, toggle, extend):
		
		if col >= 0:
			self.performAction(row)
			self._extender.issuetab.setSelectedIndex(1)
			self._extender.tree.expandRow(0)

		if col == 4:
			self._extender.tree.collapseRow(2)
			self._extender.tree.collapseRow(3)
			self._extender.tree.expandRow(1)
	
		if col == 5:
			self._extender.tree.collapseRow(1)
			self._extender.tree.collapseRow(3)
			self._extender.tree.expandRow(2)

		if col == 6:
			self._extender.tree.collapseRow(1)
			self._extender.tree.collapseRow(2)
			self._extender.tree.expandRow(3)

		JTable.changeSelection(self, row, col, toggle, extend)
		return
    def changeSelection(self, row, col, toggle, extend):

        # show the log entry for the selected row
        # logEntry = self._extender.log[row]
        JTable.changeSelection(self, row, col, toggle, extend)
Beispiel #20
0
 def changeSelection(self, row, col, toggle, extend):
     # show the log entry for the selected row
     vulnObject = self._extender._log.get(row)
     self._extender.loadVulnerability(vulnObject)
     JTable.changeSelection(self, row, col, toggle, extend)
     return