def main(self): if len(sys.argv) <= 2:Banner().usage(True) try: opts,args = getopt.getopt(sys.argv[1:],'d:s:i:v:hb', ['domain=','source=','info=','breach','verbose=','help']) except Exception as e: Banner().usage(True) Banner().banner() for o,a in opts: if o in ('-d','--domain'):self.domain=checkTarget(a) if o in ('-v','--verbose'):self.verbose=checkVerbose(a) if o in ('-s','--source'):self.source=checkSource(a) if o in ('-b','--breach'):self.breach=True if o in ('-i','--info'):self.listEmail.append(checkEmail(a)) if o in ('-h','--help'):usage(True) ### start #### print if self.domain != ('' or None): if self.source == 'ask':self.engine(self.domain,'ask') if self.source == 'all':self.engine(self.domain,'all') if self.source == 'google':self.engine(self.domain,'google') if self.source == 'baidu':self.engine(self.domain,'baidu') if self.source == 'bing':self.engine(self.domain,'bing') if self.source == 'dogpile':self.engine(self.domain,'dogpile') if self.source == 'exalead':self.engine(self.domain,'exalead') if self.source == 'pgp':self.engine(self.domain,'pgp') if self.source == 'yahoo':self.engine(self.domain,'yahoo') if self.listEmail == ([] or None):exit(warn('Not found emails... :(')) for email in self.listEmail: ip = self.tester(email) if ip != ([] or None): for i in ip: # search info and print info :) data(i,json.loads(self.shodan(i).decode('utf-8')),email,self.verbose) if self.breach:ppwned(self.pwned(email),self.verbose) else:more('Not found any informations for %s'%(email))
def main(self): if len(sys.argv) <= 2: Banner().usage(True) try: opts, args = getopt.getopt(sys.argv[1:], 'd:s:o:v:r:hb', [ 'domain=', 'source=', 'osint=', 'breach-check', 'verbose=', 'help', 'report=' ]) except Exception as e: Banner().usage(True) Banner().banner() for o, a in opts: if o in ('-d', '--domain'): self.domain = checkTarget(a) if o in ('-v', '--verbose'): self.verbose = checkVerbose(a) if o in ('-s', '--source'): self.source = checkSource(a) if o in ('-b', '--breach-check'): self.breach = True if o in ('-r', '--report'): self.report = open(a, 'wb') if a != '' else None if o in ('-o', '--osint'): self.listEmail.append(checkEmail(a)) plus('Searching for: %s' % a) if o in ('-h', '--help'): Banner().usage(True) ### start #### if self.domain != ('' or None): if self.source == 'ask': self.engine(self.domain, 'ask') if self.source == 'all': self.engine(self.domain, 'all') if self.source == 'google': self.engine(self.domain, 'google') if self.source == 'baidu': self.engine(self.domain, 'baidu') if self.source == 'bing': self.engine(self.domain, 'bing') if self.source == 'dogpile': self.engine(self.domain, 'dogpile') if self.source == 'exalead': self.engine(self.domain, 'exalead') if self.source == 'pgp': self.engine(self.domain, 'pgp') if self.source == 'yahoo': self.engine(self.domain, 'yahoo') if self.listEmail == [] or self.listEmail == None: sys.exit(warn('Not found emails... :(')) for email in self.listEmail: ip = self.tester(email) if ip != ([] or None): ips = [] for i in ip: if i not in ips: ips.append(i) if len(ips) >= 2: info("Found multiple IP\'s for this email...") PPrint(ips, email, self.verbose, self.breach, self.report).output() else: more('No Information found for %s' % (email)) if self.report != None: info('File saved in: ' + self.report.name) self.report.close()
def main(): """程序的主函数""" Banner.show() check_environment() load_conf() CollectInfo().start_up()
def main(): # 程序的主函数 Banner.show() check_environment() CollectInfo().start_up()
def main(self): if len(sys.argv) <= 2: Banner().usage(True) try: if sys.argv[1] == '--emailgather': self.method = 'emailgather' opts, args = getopt.getopt(sys.argv[1:], 'd:t:f:i:v:o:hb', [ 'emailgather', 'domain=', 'info=', 'file=', 'type=', 'breach', 'verbose=', 'help', 'output=' ]) elif sys.arg[1] == '--emailsend': self.method = 'emailsend' opts, args = getopt.getopt(sys.argv[1:], 'h:f:e:p:s:', [ 'emailgather', 'html=', 'file=', 'email=', 'password='******'subject=' ]) else: Banner().usage(True) except Exception as e: Banner().usage(True) Banner().banner() if self.method == 'emailgather': for o, a in opts: if o in ('-d', '--domain'): self.domain = checkTarget(a) elif o in ('-f', '--file'): self.input = checkFile(a) if o in ('-t', '--type'): self.filetype = checkType(a) if o in ('-v', '--verbose'): self.verbose = checkVerbose(a) if o in ('-b', '--breach'): self.breach = True if o in ('-o', '--output'): if a != '': self.fileName = checkPath(a) self.output = writePANDAS(a) self.outtype = checkouttype(a) else: Banner().usage(True) if o in ('-h', '--help'): Banner().usage(True) if ((self.domain != None and self.input != None) or (self.domain == None and self.input == None)): Banner().usage(True) ### start #### if (self.input == None): if self.domain != ('' or None): plus('Searching for: %s' % self.domain) self.engine(self.domain, 'all') if self.listEmail == [] or self.listEmail == None: sys.exit(warn('Not found emails... :(')) else: Banner().output() info("List of found emails is...") for email in self.listEmail: plus(email) if type(self.output) != 'NoneType': self.listEmail = ','.join(self.listEmail) self.output = appendRow(self.output, self.domain, self.ip, self.listEmail) self.listEmail = [] if self.outtype == 'csv': outputCSV(self.output, self.fileName) elif self.outtype == 'json': outputJSON(self.output, self.fileName) elif (self.input != None): if self.filetype == 1: self.domain_list = readCSV(self.input, self.filetype) for domain in self.domain_list: self.domain = domain if self.domain != ('' or None): plus('Searching for: %s' % self.domain) self.engine(self.domain, 'all') if self.listEmail == [] or self.listEmail == None: warn('No Emails were found...') else: Banner().output() info("List of found emails is...") for email in self.listEmail: plus(email) if type(self.output) != 'NoneType': self.listEmail = ','.join(self.listEmail) self.output = appendRow(self.output, self.domain, self.ip, self.listEmail) self.listEmail = [] print(""" """) if self.outtype == 'csv': outputCSV(self.output, self.fileName) elif self.outtype == 'json': outputJSON(self.output, self.fileName) elif self.filetype == 2: self.domain_list = readCSV(self.input, self.filetype) for i in range(0, len(self.domain_list)): self.domain = self.domain_list[i][0] self.ip = self.domain_list[i][1] if self.domain != ('' or None): plus('Searching for: %s' % self.domain) self.engine(self.domain, 'all') if self.listEmail == [] or self.listEmail == None: warn('No Emails were found...') else: Banner().output() info("List of found emails is...") for email in self.listEmail: plus(email) if type(self.output) != 'NoneType': self.listEmail = ','.join(self.listEmail) self.output = appendRow(self.output, self.domain, self.ip, self.listEmail) self.listEmail = [] print(""" """) if self.outtype == 'csv': outputCSV(self.output, self.fileName) elif self.outtype == 'json': outputJSON(self.output, self.fileName) if self.filetype == 3: self.domain_list = readCSV(self.input, self.filetype) for i in range(0, len(self.domain_list)): self.domain = self.domain_list[i][0] self.ip = self.domain_list[i][1] self.listEmail = self.domain_list[i][2] emailsFound = True if self.listEmail == 'nan': self.listEmail = [] emailsFound = False if self.domain != ('' or None): plus('Searching for: %s' % self.domain) self.engine(self.domain, 'all') if self.listEmail == [] or self.listEmail == None: warn('No Emails were found...') else: Banner().output() info("List of found emails is...") for email in self.listEmail: plus(email) print(""" """) if type(self.output) != 'NoneType': if emailsFound == False: self.listEmail = ','.join(self.listEmail) self.output = appendRow(self.output, self.domain, self.ip, self.listEmail) self.listEmail = [] if self.outtype == 'csv': outputCSV(self.output, self.fileName) elif self.outtype == 'json': outputJSON(self.output, self.fileName)
def post(self, target): #if len(sys.argv) <= 2:Banner().usage(True) try: '''opts,args = getopt.getopt(sys.argv[1:],'d:s:i:v:r:hb', ['domain=','source=','info=','breach','verbose=','help','report='])''' print( "-----------------------------------------------------------------------" ) #opts.clear() opts = [] opts.append(('--info', target)) opts.append(('-s', 'all')) opts.append(('--breach', '')) opts.append(('-v', '3')) opts.append(('--report', 'result.txt')) #[('--info', '*****@*****.**'), ('-s', 'all'), ('--breach', ''), ('-v', '3'), ('--report', 'result.txt')] print(opts) except Exception as e: Banner().usage(True) Banner().banner() for o, a in opts: if o in ('-d', '--domain'): self.domain = checkTarget(a) if o in ('-v', '--verbose'): self.verbose = checkVerbose(a) if o in ('-s', '--source'): self.source = checkSource(a) if o in ('-b', '--breach'): self.breach = True if o in ('-r', '--report'): self.report = open(a, 'wb') if a != '' else None if o in ('-i', '--info'): self.listEmail.append(checkEmail(a)) plus('Searching for: %s' % a) if o in ('-h', '--help'): Banner().usage(True) ### start #### if self.domain != ('' or None): if self.source == 'ask': self.engine(self.domain, 'ask') if self.source == 'all': self.engine(self.domain, 'all') if self.source == 'google': self.engine(self.domain, 'google') if self.source == 'baidu': self.engine(self.domain, 'baidu') if self.source == 'bing': self.engine(self.domain, 'bing') if self.source == 'dogpile': self.engine(self.domain, 'dogpile') if self.source == 'exalead': self.engine(self.domain, 'exalead') if self.source == 'pgp': self.engine(self.domain, 'pgp') if self.source == 'yahoo': self.engine(self.domain, 'yahoo') if self.listEmail == [] or self.listEmail == None: sys.exit(warn('Not found emails... :(')) for email in self.listEmail: ip = self.tester(email) if ip != ([] or None): ips = [] for i in ip: if i not in ips: ips.append(i) if len(ips) >= 2: info("Found multiple ip for this email...") PPrint(ips, email, self.verbose, self.breach, self.report).output() else: more('Not found any informations for %s' % (email)) if self.report != None: info('File saved in: ' + self.report.name) self.report.close() return target, 201
def main(kwargs): # main function of nict Banner.show() check_environment() CollectInfo(kwargs)