def passwd(self,args): fullname = args.fullname nickname = args.nickname englishname = args.englishname partnername = args.partnername phone = args.phone qq = args.qq keywords = args.keywords oldpasswd = args.oldpasswd keynumbers = args.keynumbers domain = args.domain startyear = args.startyear endyear = args.endyear splitword = args.splitword if startyear and endyear: pg = PasswdGenerator(startyear=startyear,endyear=endyear,splitword=splitword) result = pg.birthday() else: #print '社会工程学字典生成' pg = PasswdGenerator(fullname=fullname,nickname=nickname,englishname=englishname,partnername=partnername,phone=phone,qq=qq,keywords=keywords,oldpasswd=oldpasswd,keynumbers=keynumbers,domain=domain) result = pg.generate() output.pocOut('[*] 生成字典大小:%s条数据'%str(result[-1])) if args.o: with open(args.o,'w') as f: for i in result[0]: #print i f.write(str(i)+"\n") else: for i in result[0]: print i
def Exploit(self, args): #self.isview = args.v #添加一个-v显示详细信息的参数 # list所有的poc if args.list: files = [] all_files = os.listdir(paths['SCRIPT_PATH']) #print all_files for file in all_files: if 'pyc' in file or '__init__.py' in file: pass else: files.append(file) #print files mes1 = '[*] Script Name(总共%s个POC)' % str(len(files) - 1) output.dataOut(mes1) for file in files: if '__init__' not in file and 'pyc' not in file: output.dataOut(' ' + file) # 查询文件名 if args.q: keyword = args.q files = [] all_files = os.listdir(paths['SCRIPT_PATH']) #print all_files for file in all_files: if 'pyc' in file or '__init__.py' in file: pass else: files.append(file) mes = "[*] 查询关键字: %s" % keyword output.dataOut(mes) for file in files: if '__init__' not in file: if keyword in file: output.dataOut(' ' + file) #加载poc文件 if args.s: script_name = args.s if script_name.endswith('.py'): script_name = script_name[:-3] #print script_name output.pocOut('[*] 加载poc: %s.py ...\n' % script_name) script_path = paths['SCRIPT_PATH'] + script_name self.script_objs = loadScript(script_name) #print self.script_obj.poc(1) if (args.s and not args.u) and (args.s and not args.m) and (args.s and not args.f): output.error('请设置target目标') sys.exit() if args.a: if args.m: output.warning('please input single target') sys.exit() output.target(args.u) files = os.listdir(paths['SCRIPT_PATH']) for file in files: if file.endswith( '.py' ) and '__init__' not in file and 'test' not in file: file = file.rstrip('.py') self.script_objs = loadScript(file) #print self.script_objs loadTargets(args) output.pocOut('\n[*] 加载poc: %s.py' % file) self.scan() #print exploit_result self.printtable() if args.o: outfile = args.o self.report(exploit_result, outfile) sys.exit() #加载目标 loadTargets(args) # 如果是单个url, 直接调用scan函数,没必要用多线程 if args.u: output.target(args.u) self.scan() else: self.run() self.printtable() if args.o: outfile = args.o self.report(exploit_result, outfile)
def Exploit(self,args): #self.isview = args.v #添加一个-v显示详细信息的参数 # list所有的poc if args.list: files = [] all_files = os.listdir(paths['SCRIPT_PATH']) #print all_files for file in all_files: if 'pyc' in file or '__init__.py' in file: pass else: files.append(file) #print files mes1 = '[*] Script Name(总共%s个POC)'%str(len(files)-1) output.dataOut(mes1) for file in files: if '__init__' not in file and 'pyc' not in file: output.dataOut(' '+file) # 查询文件名 if args.q: keyword = args.q files = [] all_files = os.listdir(paths['SCRIPT_PATH']) #print all_files for file in all_files: if 'pyc' in file or '__init__.py' in file: pass else: files.append(file) mes = "[*] 查询关键字: %s"%keyword output.dataOut(mes) for file in files: if '__init__' not in file : if keyword in file: output.dataOut(' '+file) #加载poc文件 if args.s: script_name = args.s if script_name.endswith('.py'): script_name = script_name[:-3] #print script_name output.pocOut('[*] 加载poc: %s.py ...\n'%script_name) script_path = paths['SCRIPT_PATH']+script_name self.script_objs = loadScript(script_name) #print self.script_obj.poc(1) if (args.s and not args.u) and (args.s and not args.m): output.error('请设置target目标') sys.exit() if args.a: if args.m: output.warning('please input single target') sys.exit() output.target(args.u) files = os.listdir(paths['SCRIPT_PATH']) for file in files: if file.endswith('.py') and '__init__' not in file and 'test' not in file: file = file.rstrip('.py') self.script_objs = loadScript(file) #print self.script_objs loadTargets(args) output.pocOut('\n[*] 加载poc: %s.py'%file) self.scan() #print exploit_result self.printtable() if args.o: outfile = args.o self.report(exploit_result,outfile) sys.exit() #加载目标 loadTargets(args) # 如果是单个url, 直接调用scan函数,没必要用多线程 if args.u: output.target(args.u) self.scan() else: self.run() self.printtable() if args.o: outfile = args.o self.report(exploit_result,outfile)