Beispiel #1
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)
Beispiel #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)
Beispiel #3
0
    def getIPThread(self):
        while len(self.subs) > 0:
            self.len += 1
            per = int(self.len * 100 / self.sublen)
            print_process(per)

            d = self.subs.pop(0)
            try:
                sip = str(gethostbyname(d))
            except:
                try:
                    sip = str(gethostbyname('www.' + d))
                except:
                    continue

            if sip not in CONFIG.IP_WHITE_LIST:
                if sip in self.listip.keys():
                    self.listip[sip].append(d)
                else:
                    self.listip[sip] = [d]
Beispiel #4
0
	def getIPThread(self):
		while len(self.subs) > 0:
			self.len += 1
			per = int(self.len*100/self.sublen)
			print_process(per)

			d = self.subs.pop(0)
			try:
				sip	= str(gethostbyname(d))
			except:
				try:
					sip	= str(gethostbyname('www.'+d))
				except:
					continue

			if sip not in CONFIG.IP_WHITE_LIST:
				if sip in self.listip.keys():
					self.listip[sip].append(d)
				else:
					self.listip[sip] = [d]
Beispiel #5
0
    def get_parallel(self):
        while len(self.domains) > 0:
            d = self.domains.pop(0)

            self.len += 1
            percent = int(self.len*100/self.sublen)
            print_process(percent)

            try:
                sip = str(gethostbyname(d))
            except:
                try:
                    sip = str(gethostbyname('www.'+d))
                except:
                    continue

            if sip not in CONFIG.IP_WHITE_LIST:
                if sip in self.ips.keys():
                    self.ips[sip].append(d)
                else:
                    self.ips[sip] = [d]
Beispiel #6
0
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)
Beispiel #7
0
	def print_process(self, percent):
		printer.print_process(percent, self.options['USECOLOR'])
Beispiel #8
0
 def print_process(self, percent):
     printer.print_process(percent, self.options['USECOLOR'])