Skip to content

Commit

Permalink
Merge pull request #1 from Anof-cyber/Anof-cyber-patch-1-1
Browse files Browse the repository at this point in the history
Bug Fixed
  • Loading branch information
Anof-cyber authored Apr 15, 2022
2 parents ae84342 + 129e66a commit a6d7882
Showing 1 changed file with 17 additions and 1 deletion.
18 changes: 17 additions & 1 deletion PentestMapper.py
Original file line number Diff line number Diff line change
Expand Up @@ -288,6 +288,13 @@ def registerExtenderCallbacks(self, callbacks):
comboColumn = self.table3.getColumnModel().getColumn(2)
comboColumn.setCellEditor(DefaultCellEditor(self.comboBox))



popupMenu2 = JPopupMenu()
deletevulnerability = JMenuItem("Delete Vulnerability", actionPerformed=self.deletevuln)
popupMenu2.add(deletevulnerability)
self.table3.setComponentPopupMenu(popupMenu2)



# adding the table size, width, location and will add the scroller to the table
Expand Down Expand Up @@ -349,6 +356,14 @@ def deleterow(self,event):
#totalrow = self.logTable.getRowCount()
#self.callbacks.printOutput(str(totalrow))


def deletevuln(self,e):
totalvulnrows = self.table3.getSelectedRows()
#self.callbacks.printOutput(str(totalvulnrows))
for rows in totalvulnrows:
#self.callbacks.printOutput(str(rows))
self.dataModel2.removeRow(rows)



# part of custom table model to get total number of row in the table, it will check the data in the list amd will return when called
Expand Down Expand Up @@ -559,7 +574,8 @@ def importchecklist(self, e):
if ret == JFileChooser.APPROVE_OPTION:
fileLoad = chooseFile.getSelectedFile()
self.filepath = fileLoad.getAbsolutePath()

self.comboBox.removeAllItems()
self.comboBox.addItem(None)
self.dataModel.setRowCount(0)
with open(self.filepath, 'rb') as f:
reader2 = csv.reader(f, delimiter=',')
Expand Down

0 comments on commit a6d7882

Please sign in to comment.