Skip to content

Commit

Permalink
Solved Invalid row selected on sorted table
Browse files Browse the repository at this point in the history
  • Loading branch information
Anof-cyber committed Dec 17, 2022
1 parent 4e08e46 commit 5cf8a74
Showing 1 changed file with 7 additions and 3 deletions.
10 changes: 7 additions & 3 deletions PentestMapper.py
Original file line number Diff line number Diff line change
Expand Up @@ -918,7 +918,8 @@ def sendVulnItem(self,event):
def sendRepeaterItem(self,event):
row = self.logTable.getSelectedRows()
for rows in row:
logEntry = self._log[rows]
modelRowIndex = self.logTable.convertRowIndexToModel(rows)
logEntry = self._log[modelRowIndex]
fullurl = logEntry._url
url = urlparse(str(fullurl))
hostname = url.hostname
Expand All @@ -936,15 +937,18 @@ def sendRepeaterItem(self,event):
def deleterow(self,event):
row = self.logTable.getSelectedRows()


for rows in sorted(row, reverse=True):
self._log.pop(rows)
modelRowIndex = self.logTable.convertRowIndexToModel(rows)
self._log.pop(modelRowIndex)
self.fireTableDataChanged()

# delete row from the vulnerability table
def deletevuln(self,e):
totalvulnrows = self.table3.getSelectedRows()
for rows in sorted(totalvulnrows, reverse=True):
self.dataModel2.removeRow(rows)
modelRowIndex = self.table3.convertRowIndexToModel(rows)
self.dataModel2.removeRow(modelRowIndex)


# allow users to search vulnerablity from select vulnerablity list in vulnerability table
Expand Down

0 comments on commit 5cf8a74

Please sign in to comment.