def __init__(self, FSettings): QWidget.__init__(self) self.FSettings = FSettings self.Ftemplates = GUIs.frm_PhishingManager() self.layout = QVBoxLayout() self.FormLayout = QFormLayout() self.GridForm = QGridLayout() self.Status = QStatusBar() self.StatusLabel = QLabel(self) self.Status.addWidget(QLabel('Status::')) self.Status.addWidget(self.StatusLabel) self.GroupBox = QGroupBox() self.GroupBox.setTitle('::Server-HTTP::') self.GroupBox.setLayout(self.FormLayout) self.btntemplates = QPushButton('Phishing M.') self.btnStopServer = QPushButton('Stop Server') self.btnRefresh = QPushButton('ReFresh') self.txt_IP = QLineEdit(self) self.ComboIface = QComboBox(self) self.txt_IP.setVisible(False) self.StatusServer(False) #icons self.btntemplates.setIcon(QIcon('icons/page.png')) self.btnStopServer.setIcon(QIcon('icons/close.png')) self.btnRefresh.setIcon(QIcon('icons/refresh.png')) #conects self.refrash_interface() self.btntemplates.clicked.connect(self.show_template_dialog) self.btnStopServer.clicked.connect(self.StopLocalServer) self.btnRefresh.clicked.connect(self.refrash_interface) self.connect(self.ComboIface, SIGNAL('currentIndexChanged(QString)'), self.discoveryIface) #layout self.GridForm.addWidget(self.ComboIface, 0, 1) self.GridForm.addWidget(self.btnRefresh, 0, 2) self.GridForm.addWidget(self.btntemplates, 1, 1) self.GridForm.addWidget(self.btnStopServer, 1, 2) self.FormLayout.addRow(self.GridForm) self.FormLayout.addWidget(self.Status) self.layout.addWidget(self.GroupBox) self.setLayout(self.layout)
def __init__(self,FSettings): QWidget.__init__(self) self.FSettings = FSettings self.Ftemplates = GUIs.frm_PhishingManager() self.layout = QVBoxLayout() self.FormLayout = QFormLayout() self.GridForm = QGridLayout() self.Status = QStatusBar() self.StatusLabel= QLabel(self) self.Status.addWidget(QLabel('Status::')) self.Status.addWidget(self.StatusLabel) self.GroupBox = QGroupBox() self.GroupBox.setTitle('::Server-HTTP::') self.GroupBox.setLayout(self.FormLayout) self.btntemplates = QPushButton('Phishing M.') self.btnStopServer = QPushButton('Stop Server') self.btnRefresh = QPushButton('ReFresh') self.txt_IP = QLineEdit(self) self.ComboIface = QComboBox(self) self.txt_IP.setVisible(False) self.StatusServer(False) #icons self.btntemplates.setIcon(QIcon('icons/page.png')) self.btnStopServer.setIcon(QIcon('icons/close.png')) self.btnRefresh.setIcon(QIcon('icons/refresh.png')) #conects self.refrash_interface() self.btntemplates.clicked.connect(self.show_template_dialog) self.btnStopServer.clicked.connect(self.StopLocalServer) self.btnRefresh.clicked.connect(self.refrash_interface) self.connect(self.ComboIface, SIGNAL('currentIndexChanged(QString)'), self.discoveryIface) #layout self.GridForm.addWidget(self.ComboIface,0,1) self.GridForm.addWidget(self.btnRefresh,0,2) self.GridForm.addWidget(self.btntemplates,1,1) self.GridForm.addWidget(self.btnStopServer,1,2) self.FormLayout.addRow(self.GridForm) self.FormLayout.addWidget(self.Status) self.layout.addWidget(self.GroupBox) self.setLayout(self.layout)
def __init__(self, mainWindow): super(WifiPumpkin,self).__init__() self.__class__.instances.append(weakref.proxy(self)) self.mainWindow = mainWindow self.InternetShareWiFi = True # share internet options # check update from github repository self.Timer = waiterSleepThread() self.Timer.quit.connect(self.get_status_new_commits) self.UpdateSoftware = frm_githubUpdate(version) self.UpdateSoftware.resize(480, 280) self.UpdateSoftware.show() self.UpdateSoftware.setHidden(True) self.UpdateSoftware.checkUpdate() self.Timer.start() # define all Widget TABs self.MainControl = QtGui.QVBoxLayout() self.TabControl = QtGui.QTabWidget() #self.Tab_Plugins = QtGui.QWidget() self.Tab_dock = QtGui.QMainWindow() # for dockarea self.FSettings = self.mainWindow.FSettings self.LeftTabBar = QtGui.QListWidget() self.Stack = QtGui.QStackedWidget(self) self.Stack.setSizePolicy(QtGui.QSizePolicy.Preferred, QtGui.QSizePolicy.Preferred) # create dockarea in Widget class self.dock = QtGui.QDockWidget() self.dock.setTitleBarWidget(QtGui.QWidget()) self.dock.setSizePolicy(QtGui.QSizePolicy.Preferred, QtGui.QSizePolicy.Preferred) self.dock.setFeatures(QtGui.QDockWidget.NoDockWidgetFeatures) self.dock.setAllowedAreas(QtCore.Qt.AllDockWidgetAreas) #TODO This is a new Implementation to simplify development self.coreui = DefaultWidget(self) self.wireless = WirelessModeController(self) self.dnsserver = DNSController(self) self.dnsDockList = [] self.dnsserver.dockMount.connect(self.dnsDockAdd) self.proxy = self.coreui.Plugins.Proxy self.proxy.dockMount.connect(self.proxyDockAdd) self.proxyDocklist = [] self.mitmhandler = self.coreui.Plugins.MITM self.mitmDockList=[] self.AreaDockInfo=[] self.mitmhandler.dockMount.connect(self.mitmDockAdd) #TODO Might need improvement, checking if the program needed are installed lista = ['', '', popen('which driftnet').read().split('\n')[0], popen('which dhcpd').read().split("\n")[0], '', popen('which hostapd').read().split("\n")[0], popen('which xterm').read().split("\n")[0] ] for i in lista: self.SettingsEnable['ProgCheck'].append(path.isfile(i)) self.LeftTabBar.currentRowChanged.connect(self.set_index_leftMenu) self.LeftTabBar.setFixedWidth(170) self.LeftTabBar.setStyleSheet(C.MENU_STYLE) # add in Tab default widget TABs self.status_plugin_proxy_name = QtGui.QLabel('') # status name proxy activated self.SessionsAP = loads(str(self.FSettings.Settings.get_setting('accesspoint','sessions'))) self.THReactor = ThreadReactor() # thread reactor for sslstrip self.window_phishing = GUIModules.frm_PhishingManager() # TODO Refactored default widget self.index = 0 indexpass = False for v in sorted(self.coreui.allui): if v.Name == "Home": indexpass =True self.LeftTabBar.addItem(v.tabinterface) self.Stack.addWidget(v) setattr(self, v.ID, v) if not indexpass: self.index+=1 # self.proxy.sendSingal_disable.connect(self.get_disable_proxy_status) self.proxy.SetNoProxy.connect(self. get_disable_proxy_status) #TODO DHCP Configuration Definition for v in self.proxy.get.values(): if not v.Hidden: self.LeftTabBar.addItem(v.tabinterface) self.Stack.addWidget(v) if self.proxy.isChecked(): # v.sendSingal_disable.connect(self.get_disable_proxy_status) if v.controlui.isChecked(): if v.Name == "No Proxy": self.set_proxy_statusbar('', disabled=True) v.sendSingal_disable.emit(v.controlui.isChecked()) else: self.set_proxy_statusbar(v.Name) else: self.set_proxy_statusbar('', disabled=True) v.sendSingal_disable.emit(v.controlui.isChecked()) self.DHCP = self.SessionConfig.DHCP.conf self.dhcpcontrol = DHCPController(self) self.SettingsAP = { 'interface': [ 'ifconfig %s up' % (self.SessionConfig.Wireless.WLANCard.currentText()), 'ifconfig %s %s netmask %s' % ( self.SessionConfig.Wireless.WLANCard.currentText(), self.DHCP['router'], self.DHCP['netmask']), 'ifconfig %s mtu 1400' % (self.SessionConfig.Wireless.WLANCard.currentText()), 'route add -net %s netmask %s gw %s' % (self.DHCP['subnet'], self.DHCP['netmask'], self.DHCP['router']) ], 'kill': [ 'iptables --flush', 'iptables --table nat --flush', 'iptables --delete-chain', 'iptables --table nat --delete-chain', 'ifconfig %s 0' % (self.SessionConfig.Wireless.WLANCard.currentText()), 'killall dhpcd 2>/dev/null', ], 'hostapd': [ 'interface={}\n'.format(str(self.SessionConfig.Wireless.WLANCard.currentText())), 'ssid={}\n'.format(str(self.SessionConfig.Wireless.EditSSID.text())), 'channel={}\n'.format(str(self.SessionConfig.Wireless.EditChannel.value())), 'bssid={}\n'.format(str(self.SessionConfig.Wireless.EditBSSID.text())), ], 'dhcp-server': [ 'authoritative;\n', 'default-lease-time {};\n'.format(self.DHCP['leasetimeDef']), 'max-lease-time {};\n'.format(self.DHCP['leasetimeMax']), 'subnet %s netmask %s {\n' % (self.DHCP['subnet'], self.DHCP['netmask']), 'option routers {};\n'.format(self.DHCP['router']), 'option subnet-mask {};\n'.format(self.DHCP['netmask']), 'option broadcast-address {};\n'.format(self.DHCP['broadcast']), 'option domain-name \"%s\";\n' % (str(self.SessionConfig.Wireless.EditSSID.text())), 'option domain-name-servers {};\n'.format('8.8.8.8'), 'range {};\n'.format(self.DHCP['range'].replace('/', ' ')), '}', ], } self.initial_GUI_loader() self.proxy.Active.dockwidget.addDock.emit(self.proxy.Active.controlui.isChecked()) for mitm in self.mitmhandler.Active: mitm.dockwidget.addDock.emit(mitm.controlui.isChecked()) self.DockArrage()
def __init__(self, mainWindow): super(WifiPumpkin, self).__init__() self.__class__.instances.append(weakref.proxy(self)) self.mainWindow = mainWindow self.InternetShareWiFi = True # share internet options # check update from github repository self.Timer = waiterSleepThread() self.Timer.quit.connect(self.get_status_new_commits) self.UpdateSoftware = frm_githubUpdate(version) self.UpdateSoftware.resize(480, 280) self.UpdateSoftware.show() self.UpdateSoftware.setHidden(True) self.UpdateSoftware.checkUpdate() self.Timer.start() self.status_plugin_proxy_name = QtGui.QLabel( '') # status name proxy activated # define all Widget TABs self.MainControl = QtGui.QVBoxLayout() self.TabControl = QtGui.QTabWidget() #self.Tab_Plugins = QtGui.QWidget() self.Tab_dock = QtGui.QMainWindow() # for dockarea self.FSettings = self.mainWindow.FSettings self.LeftTabBar = QtGui.QListWidget() self.Stack = QtGui.QStackedWidget(self) self.Stack.setSizePolicy(QtGui.QSizePolicy.Preferred, QtGui.QSizePolicy.Preferred) # create dockarea in Widget class self.dock = QtGui.QDockWidget() self.dock.setTitleBarWidget(QtGui.QWidget()) self.dock.setSizePolicy(QtGui.QSizePolicy.Preferred, QtGui.QSizePolicy.Preferred) self.dock.setFeatures(QtGui.QDockWidget.NoDockWidgetFeatures) self.dock.setAllowedAreas(QtCore.Qt.AllDockWidgetAreas) #TODO This is a new Implementation to simplify development self.coreui = DefaultWidget(self) self.wireless = WirelessModeController(self) self.dnsserver = DNSController(self) self.dnsDockList = [] self.dnsserver.dockMount.connect(self.dnsDockAdd) self.proxy = self.coreui.Plugins.Proxy self.proxy.dockMount.connect(self.proxyDockAdd) self.proxyDocklist = [] self.mitmhandler = self.coreui.Plugins.MITM self.mitmDockList = [] self.AreaDockInfo = [] self.mitmhandler.dockMount.connect(self.mitmDockAdd) #TODO Might need improvement, checking if the program needed are installed lista = [ '', '', popen('which driftnet').read().split('\n')[0], popen('which dhcpd').read().split("\n")[0], '', popen('which hostapd').read().split("\n")[0], popen('which xterm').read().split("\n")[0] ] for i in lista: self.SettingsEnable['ProgCheck'].append(path.isfile(i)) self.LeftTabBar.currentRowChanged.connect(self.set_index_leftMenu) self.LeftTabBar.setFixedWidth(170) self.LeftTabBar.setStyleSheet(C.MENU_STYLE) # add in Tab default widget TABs self.SessionsAP = loads( str(self.FSettings.Settings.get_setting('accesspoint', 'sessions'))) self.THReactor = ThreadReactor() # thread reactor for sslstrip self.window_phishing = GUIModules.frm_PhishingManager() # TODO Refactored default widget self.index = 0 indexpass = False for v in sorted(self.coreui.allui): if v.Name == "Home": indexpass = True self.LeftTabBar.addItem(v.tabinterface) self.Stack.addWidget(v) setattr(self, v.ID, v) if not indexpass: self.index += 1 # self.proxy.sendSingal_disable.connect(self.get_disable_proxy_status) self.proxy.SetNoProxy.connect(self.get_disable_proxy_status) #TODO DHCP Configuration Definition for v in self.proxy.get.values(): if not v.Hidden: self.LeftTabBar.addItem(v.tabinterface) self.Stack.addWidget(v) if self.proxy.isChecked(): # v.sendSingal_disable.connect(self.get_disable_proxy_status) if v.controlui.isChecked(): if v.Name == "No Proxy": self.set_proxy_statusbar('', disabled=True) v.sendSingal_disable.emit(v.controlui.isChecked()) else: self.set_proxy_statusbar(v.Name) else: self.set_proxy_statusbar('', disabled=True) v.sendSingal_disable.emit(v.controlui.isChecked()) self.DHCP = self.SessionConfig.DHCP.conf self.dhcpcontrol = DHCPController(self) self.updateSettingsAP() # create settings ap on startup self.initial_GUI_loader() self.proxy.Active.dockwidget.addDock.emit( self.proxy.Active.controlui.isChecked()) for mitm in self.mitmhandler.Active: mitm.dockwidget.addDock.emit(mitm.controlui.isChecked()) self.DockArrage()