class D_Action: config = config() table = "data" def __init__(self): self.DB = D_Mysql(self.config.MySQL_user, self.config.MySQL_password, self.config.MySQL_host, self.config.MySQL_port, self.config.MySQL_db) def get_id(self): return self.__md5(uuid.uuid1()) def __md5(self, data): t = hashlib.md5("data") return t.hexdigest() def insert_data(self, taskid, data): taskid = self.__md5(taskid) data = {"taskid": "'" + taskid + "'", "data": "'" + data + "'"} self.DB.db_insert(self.table, data) def update_data(self, taskid, data): taskid = self.__md5(taskid) data = { "data": "'" + data + "'", } where = "taskid = '" + taskid + "'" self.DB.db_update(self.table, data, where) def get_data(self, taskid): taskid = self.__md5(taskid) where = "taskid = '" + taskid + "'" rec = self.DB.db_select(self.table, ['data'], where) return rec[0]
def __init__(self): self.net = N_Request() self.config = config() self.db = DB() self.output = CLIOutput() self.output2 = O_Output() self.exp = exp() Cmd.__init__(self) os.system("clear") self.output.printYellow(self.config.logo + "Welcome To Auto-Exploit-Framework\nThe world Will Remember You Forever") self.case_insensitive = False self.prompt = self.config.default_console_words self.isused = False self.file = IO_File()
def __init__(self, target, names_file, ignore_intranet, threads_num): self.config = config() self.target = target.strip() self.names_file = names_file self.ignore_intranet = ignore_intranet self.thread_count = self.threads_num = threads_num self.scan_count = self.found_count = 0 self.lock = threading.Lock() # Cal terminal width when starts up self.console_width = getTerminalSize()[0] - 2 self.resolvers = [dns.resolver.Resolver() for _ in range(threads_num)] self._load_dns_servers() self._load_sub_names() self._load_next_sub() self.ip_dict = {} self.sub = [] self.STOP_ME = False
def __init__(self): self.net = N_Request() self.config = config() self.db = DB() self.output = CLIOutput() self.output2 = O_Output() self.exp = exp() Cmd.__init__(self) os.system("clear") self.output.printYellow( self.config.logo + "Welcome To Auto-Exploit-Framework\nThe world Will Remember You Forever" ) self.case_insensitive = False self.prompt = self.config.default_console_words self.isused = False self.file = IO_File()
def __init__(self): self.config = config()
#!/usr/bin/env python # -*- coding: utf-8 -*- from auto_exp.config.config import config from auto_exp.lib.core.database.core import D_Mysql import time ISOTIMEFORMAT = '%Y%m%d' Config = config() class DB(object): type_sub = 0 type_path = 1 type_file = 2 db = D_Mysql(Config.MySQL_user, Config.MySQL_password, Config.MySQL_host, Config.MySQL_port, Config.MySQL_db) def get_exp(self, where='1=1'): result = self.db.db_select('exploit', ['*'], where) return result def insert_exp(self, name, desc, level, author): data = { 'name': "'" + str(name) + "'", 'desc': "'" + str(desc) + "'", 'level': str(level), 'author': "'" + str(author) + "'" } if len(self.db.db_select('exploit', ['*'], "name = '" + name + "'")) == 0: self.db.db_insert('exploit', data) else: