Commits

Skin36 committed 2fb8ac4

fix table on first tab:set read only

Comments (0)

Files changed (1)

gerix-wifi-cracker-master/gerix.py

 
 
 from threading import Thread
-from PyQt4 import QtGui, QtGui
+from PyQt4 import QtGui, QtCore
 from gerix_gui import Ui_Main_window
 #from PyQt4.QtGui import QApplication
 from PyQt4.QtGui import QMainWindow
             
             
             self.table_interfaces.insertRow(0)
- 
+            item=QtGui.QTableWidgetItem()
+            item.setFlags(QtCore.Qt.ItemIsSelectable|QtCore.Qt.ItemIsEnabled)
+            item.setText(intf[0])
+            self.table_interfaces.setItem(0, 0,item )
+            
+            item=QtGui.QTableWidgetItem()
+            item.setFlags(QtCore.Qt.ItemIsSelectable|QtCore.Qt.ItemIsEnabled)
+            item.setText(current_mac)
+            self.table_interfaces.setItem(0, 1,item )
+            
+            item=QtGui.QTableWidgetItem()
+            item.setFlags(QtCore.Qt.ItemIsSelectable|QtCore.Qt.ItemIsEnabled)
+            item.setText(intf[2])
+            self.table_interfaces.setItem(0, 2,item )
+            
+            item=QtGui.QTableWidgetItem()
+            item.setFlags(QtCore.Qt.ItemIsSelectable|QtCore.Qt.ItemIsEnabled)
+            item.setText((intf[3]))
+            self.table_interfaces.setItem(0, 3,item )
 
-            self.table_interfaces.setItem( 0, 0, QtGui.QTableWidgetItem((intf[0])))
-            self.table_interfaces.setItem( 0, 1, QtGui.QTableWidgetItem((current_mac)))
-            self.table_interfaces.setItem( 0, 2, QtGui.QTableWidgetItem((intf[2])))
-            self.table_interfaces.setItem( 0, 3, QtGui.QTableWidgetItem((intf[3])))
-            self.table_interfaces.setItem( 0, 4, QtGui.QTableWidgetItem((mode)))
+            item=QtGui.QTableWidgetItem()
+            item.setFlags(QtCore.Qt.ItemIsSelectable|QtCore.Qt.ItemIsEnabled)
+            item.setText(mode)
+            self.table_interfaces.setItem(0, 4,item )
 
         self.table_interfaces.clearSelection()
 
             essid   = match.group(8)
 
             self.table_networks.insertRow(0)
-            self.table_networks.setItem(0, 0, QtGui.QTableWidgetItem((essid)))
-            self.table_networks.setItem(0, 1,QtGui.QTableWidgetItem((bssid)))
-            self.table_networks.setItem(0, 2, QtGui.QTableWidgetItem((channel)))
-            self.table_networks.setItem(0, 3, QtGui.QTableWidgetItem((pwr)))
-            self.table_networks.setItem(0, 4, QtGui.QTableWidgetItem((enc + ' ' + cipher + ' ' + auth)))
-            self.table_networks.setItem(0, 5, QtGui.QTableWidgetItem((mb)))
+            item=QtGui.QTableWidgetItem()
+            item.setFlags(QtCore.Qt.ItemIsSelectable|QtCore.Qt.ItemIsEnabled)
+            item.setText(QtGui.QApplication.translate("Main_window", essid, None, QtGui.QApplication.UnicodeUTF8))
+            self.table_networks.setItem(0, 0,item )
+            item=QtGui.QTableWidgetItem(bssid)
+            item.setFlags(QtCore.Qt.ItemIsSelectable|QtCore.Qt.ItemIsEnabled)
+            item.setText(bssid)
+            self.table_networks.setItem(0, 1,item)
+        
+            item=QtGui.QTableWidgetItem()
+            item.setFlags(QtCore.Qt.ItemIsSelectable|QtCore.Qt.ItemIsEnabled)
+            item.setText(channel)
+            self.table_networks.setItem(0, 2,item)
+        
+            item=QtGui.QTableWidgetItem()
+            item.setFlags(QtCore.Qt.ItemIsSelectable|QtCore.Qt.ItemIsEnabled)
+            item.setText(pwr)
+            self.table_networks.setItem(0, 3,item)
+        
+            item=QtGui.QTableWidgetItem()
+            item.setFlags(QtCore.Qt.ItemIsSelectable|QtCore.Qt.ItemIsEnabled)
+            item.setText(enc + ' ' + cipher + ' ' + auth)
+            self.table_networks.setItem(0, 4, item)
+        
+            item=QtGui.QTableWidgetItem()
+            item.setFlags(QtCore.Qt.ItemIsSelectable|QtCore.Qt.ItemIsEnabled)
+            item.setText(mb)
+            self.table_networks.setItem(0, 5,item)
 
         self.table_networks.clearSelection()
         commands.getstatusoutput('rm /tmp/gerix-scan*')