forked from P0cL4bs/WiFi-Pumpkin-deprecated
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathwifi-pumpkin.py
executable file
·74 lines (61 loc) · 2.66 KB
/
wifi-pumpkin.py
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
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
#!/usr/bin/env python2.7
from logging import getLogger,ERROR
getLogger('scapy.runtime').setLevel(ERROR)
"""
Author : Marcos Nesster - [email protected] PocL4bs Team
Licence : GPL v3
Description:
WiFi-Pumpkin - Framework for Rogue Wi-Fi Access Point Attack.
Copyright:
Copyright (C) 2015-2017 Marcos Nesster P0cl4bs Team
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation, either version 3 of the License, or
(at your option) any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with this program. If not, see <http://www.gnu.org/licenses/>
"""
from sys import argv,exit,version_info
import core.utility.constants as C
if version_info.major != 2:
exit('[!] WiFi-Pumpkin need Python 2 :(')
if __name__ == '__main__':
from core.loaders.checker.depedences import check_dep_pumpkin
from PyQt4 import QtGui
try:
from core.utility.application import ApplicationLoop
except ImportError:
exit('WiFi-Pumpkin need PyQt4 :(')
from core.main import Initialize
from core.loaders.checker.networkmanager import CLI_NetworkManager, UI_NetworkManager
from core.utility.collection import SettingsINI
check_dep_pumpkin()
from os import getuid
if not getuid() == 0:
exit('[{}!{}] WiFi-Pumpkin must be run as root.'.format(C.RED,C.ENDC))
app = ApplicationLoop(argv)
if app.isRunning():
QtGui.QMessageBox.warning(None,'Already Running','the wifi-pumpkin is already running')
exit('WiFi-Pumpkin Already Running.')
print('Loading GUI...')
main = Initialize()
main.setWindowIcon(QtGui.QIcon('icons/icon.png'))
main.center()
# check if Wireless connection
conf = SettingsINI(C.CONFIG_INI)
if conf.get_setting('accesspoint','checkConnectionWifi',format=bool):
networkcontrol = CLI_NetworkManager() # add all interface avaliable for exclude
main.networkcontrol = networkcontrol
if networkcontrol.run():
if networkcontrol.isWiFiConnected() and len(networkcontrol.ifaceAvaliable) > 0:
settings = UI_NetworkManager(main)
settings.setWindowIcon(QtGui.QIcon('icons/icon.png'))
settings.show()
exit(app.exec_())
main.show()
print('WiFi-Pumpkin Running!')
exit(app.exec_())