コード例 #1
0
ファイル: filter.py プロジェクト: gamehacker/web2attack
def Filter(domain, infos, type):
	subs	= []
	emails	= []
	checked	= []
	req		= HTTP('https://docs.google.com/')
	ci	= 0
	il	= len(infos)
	for i in infos:
		ci += 1
		pc = int(ci*100/il)
		print_process(pc)
		if i in checked:
			continue
		i['data']	= unquote(i['data'])
		d	= domain_filter(domain, unquote(i['url']))
		d	+= domain_filter(domain, i['data'])
		e	= email_filter(domain, i['data'])
		d	= sorted(list(set(realdomain(d))))
		e 	= sorted(list(set(realemail(e))))
		if len(d) >= type or len(e) >= type:
			try:
				data	= getLink(req, i['url'])
				d	+= domain_filter(domain, data)
				e	+= email_filter(domain, data)
			except Exception as ex:
				pass
			sleep(2)
		subs	+= sorted(list(set(realdomain(d))))
		emails 	+= sorted(list(set(realemail(e))))
		checked.append(i)
	print_line('')
	return (subs, emails)
コード例 #2
0
def Filter(domain, infos, type):
    subs = []
    emails = []
    checked = []
    req = HTTP('https://docs.google.com/')
    ci = 0
    il = len(infos)
    for i in infos:
        ci += 1
        pc = int(ci * 100 / il)
        print_process(pc)
        if i in checked:
            continue
        i['data'] = unquote(i['data'])
        d = domain_filter(domain, unquote(i['url']))
        d += domain_filter(domain, i['data'])
        e = email_filter(domain, i['data'])
        d = sorted(list(set(realdomain(d))))
        e = sorted(list(set(realemail(e))))
        if len(d) >= type or len(e) >= type:
            try:
                data = getLink(req, i['url'])
                d += domain_filter(domain, data)
                e += email_filter(domain, data)
            except Exception as ex:
                pass
            sleep(2)
        subs += sorted(list(set(realdomain(d))))
        emails += sorted(list(set(realemail(e))))
        checked.append(i)
    print_line('')
    return (subs, emails)
コード例 #3
0
 def run(self):
     while True:
         printer.print_line('\t{0:<25} {1:d}'.format(self.name, self.count))
         uri = self.uriCreater()
         if not self.Has_Next(self.do_search(uri)):
             break
         if self.count <= 1:
             break
         self.count += self.step
         if self.count >= self.limit:
             break
         sleep(self.delay)
コード例 #4
0
 def getListIP(self, subs, thread=1):
     self.listip = {}
     self.subs = subs
     threads = []
     self.sublen = len(subs)
     self.len = 0
     for i in range(thread):
         t = Thread(target=self.getIPThread)
         threads.append(t)
         t.start()
     for t in threads:
         t.join()
     print_line()
     return self.listip
コード例 #5
0
ファイル: ip.py プロジェクト: gamehacker/web2attack
	def getListIP(self, subs, thread = 1):
		self.listip	= {}
		self.subs	= subs
		threads		= []
		self.sublen	= len(subs)
		self.len	= 0
		for i in range(thread):
			t	= Thread(target = self.getIPThread)
			threads.append(t)
			t.start()
		for t in threads:
			t.join()
		print_line()
		return self.listip
コード例 #6
0
    def gets(self, domains, thread=1):
        self.ips = {}
        self.domains = domains
        self.sublen = len(domains)
        self.len = 0

        for i in range(thread):
            t = Thread(target=self.get_parallel)
            self.threads.append(t)
            t.start()

        for t in self.threads:
            t.join()

        print_line()
        return self.ips
コード例 #7
0
ファイル: filter.py プロジェクト: triplekill/web2attack
def filter(domain, contents, type, delay=2):
    result_subdomains = []
    result_emails = []

    total = len(contents)
    current = 0

    for i in contents:
        current += 1
        percent = int(current * 100 / total)
        print_process(percent)

        i['data'] = unquote(i['data'])

        d = domain_filter(domain, unquote(i['url']))
        d += domain_filter(domain, i['data'])

        e = email_filter(domain, i['data'])

        d = sorted(list(set(real_domain(d))))
        e = sorted(list(set(real_email(e))))

        if len(d) >= type or len(e) >= type:
            try:
                data = get_link(i['url'])
                d += domain_filter(domain, data)
                e += email_filter(domain, data)
            except Exception as error:
                pass
            sleep(delay)

        result_subdomains += sorted(list(set(real_domain(d))))
        result_emails += sorted(list(set(real_email(e))))

    print_line('')
    return (result_subdomains, result_emails)
コード例 #8
0
ファイル: core.py プロジェクト: gamehacker/web2attack
	def print_line(self, message = ''):
		printer.print_line(message)
コード例 #9
0
 def print_line(self, message=''):
     printer.print_line(message)