-
Notifications
You must be signed in to change notification settings - Fork 2
Expand file tree
/
Copy pathHackClientUI.py
More file actions
35 lines (28 loc) · 1.16 KB
/
Copy pathHackClientUI.py
File metadata and controls
35 lines (28 loc) · 1.16 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
from PyQt4.QtCore import QObject, pyqtSlot
from HackClient import HackClient
__author__ = 'daniel'
class HackClientUI(QObject):
def __init__(self, parent = None):
super(HackClientUI, self).__init__(parent)
self.parent = parent
self.hackClientButton = self.parent.hackClientButton
self.clientLineEdit = self.parent.clientLineEdit
self.apLineEdit = self.parent.apLineEdit
self.is_hacking = False
self.initUI()
self.scan = self.parent.scanUI.scan
self.clientAttack = HackClient(self, self.parent.AP_List)
def initUI(self):
self.hackClientButton.clicked.connect(self.hackClientButtonClicked)
@pyqtSlot()
def hackClientButtonClicked(self):
if not self.is_hacking:
client_mac = str(self.clientLineEdit.text())
ap_mac = str(self.apLineEdit.text())
self.clientAttack.start_attack_client(ap_mac, client_mac)
self.hackClientButton.setText("Stop!")
self.is_hacking = True
else:
self.clientAttack.stop_attack_client()
self.hackClientButton.setText("Hack!")
self.is_hacking = False