Skip to content

Commit

Permalink
update
Browse files Browse the repository at this point in the history
  • Loading branch information
darryllane committed Dec 7, 2019
1 parent 2f92e89 commit 29bebd4
Show file tree
Hide file tree
Showing 3 changed files with 34 additions and 15 deletions.
2 changes: 1 addition & 1 deletion Bluto/bluto
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,7 @@ USERAGENT_F = path + "/Bluto/doc/user_agents.txt"
COUNTRIES_FILE = path + "/Bluto/doc/countries.txt"
INFO_LOG_FILE = os.path.expanduser('~/Bluto/log/bluto-info.log')

version = '2.4.16'
version = '2.4.17'

title = """
BBBBBBBBBBBBBBBBB lllllll tttt
Expand Down
45 changes: 32 additions & 13 deletions Bluto/modules/general.py
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@
import datetime
import re
import sys
import random
import socket
import dns.resolver
import dns.query
Expand Down Expand Up @@ -39,11 +40,12 @@ def action_whois(domain):
except Exception:
print '\nThere seems to be no Registrar for this domain.'
company = domain
pass
splitup = company.lower().split()

splitup = domain.lower().split('.')[0]
patern = re.compile('|'.join(splitup))
while True:
if patern.search(domain):
if patern.search(splitup):
company = splitup
info('Whois Results Are Good ' + company)
print '\nThe Whois Results Look Promising: ' + colored('{}','green').format(company)
accept = raw_input(colored('\nIs The Search Term sufficient?: ','green')).lower()
Expand Down Expand Up @@ -108,6 +110,14 @@ def action_whois(domain):
return company

def action_country_id(countries_file, prox):

def errorcheck(r):
if 'success' in r.json():
key_change = True
else:
key_change = False
return key_change

info('Identifying Country')
userCountry = ''
userServer = ''
Expand All @@ -132,16 +142,25 @@ def action_country_id(countries_file, prox):

while True:
try:
if prox == True:
proxy = {'https' : 'http://127.0.0.1:8080'}
r = requests.get(r'http://api.ipstack.com/check?access_key=dd763372274e9ae8aed34a55a7a4b36a', proxies=proxy, verify=False)
ip = r.json()['ip']
originCountry = r.json()['country_name']

else:
r = requests.get(r'http://api.ipstack.com/check?access_key=dd763372274e9ae8aed34a55a7a4b36a', verify=False)
ip = r.json()['ip']
originCountry = r.json()['country_name']

while True:
api_keys = ['5751cce3503b56584e4b1267a7076904', 'dd763372274e9ae8aed34a55a7a4b36a']
random.Random(500)
key = random.choice(api_keys)
if prox == True:
proxy = {'http' : 'http://127.0.0.1:8080'}
r = requests.get(r'http://api.ipstack.com/check?access_key={}'.format(key), proxies=proxy, verify=False)
key_change = errorcheck(r)
originCountry = r.json()['country_name']

else:
r = requests.get(r'http://api.ipstack.com/check?access_key={}'.format(key), verify=False)
key_change = errorcheck(r)

if not key_change:
break

originCountry = r.json()['country_name']

except ValueError as e:
if o == 0:
Expand Down
2 changes: 1 addition & 1 deletion setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

setup(
name='Bluto',
version='2.4.16post1',
version='2.4.17',
author='Darryl lane',
author_email='DarrylLane101@gmail.com',
url='https://github.com/darryllane/Bluto',
Expand Down

0 comments on commit 29bebd4

Please sign in to comment.