Skip to content

Commit

Permalink
Merge pull request #201 from Chrisdafur3/Development
Browse files Browse the repository at this point in the history
Limits on fwers, fwings Emails and Phone Numbers
  • Loading branch information
Datalux authored May 12, 2021
2 parents 5a8fe44 + c648e66 commit 6afc0f8
Show file tree
Hide file tree
Showing 2 changed files with 114 additions and 1 deletion.
9 changes: 9 additions & 0 deletions main.py
Original file line number Diff line number Diff line change
Expand Up @@ -153,9 +153,18 @@ def _quit():
}


signal.signal(signal.SIGINT, signal_handler)
if is_windows:
pyreadline.Readline().parse_and_bind("tab: complete")
pyreadline.Readline().set_completer(completer)
else:
gnureadline.parse_and_bind("tab: complete")
gnureadline.set_completer(completer)

if not args.command:
printlogo()


while True:
if args.command:
cmd = args.command
Expand Down
106 changes: 105 additions & 1 deletion src/Osintgram.py
Original file line number Diff line number Diff line change
Expand Up @@ -1209,11 +1209,37 @@ def get_fwersemail(self):
print("\n")

results = []

pc.printout("Do you want to get all emails? y/n: ", pc.YELLOW)
value = input()

if value == str("y") or value == str("yes") or value == str("Yes") or value == str("YES"):
value = len(followers)
elif value == str(""):
print("\n")
return
elif value == str("n") or value == str("no") or value == str("No") or value == str("NO"):
while True:
try:
pc.printout("How many emails do you want to get? ", pc.YELLOW)
new_value = int(input())
value = new_value - 1
break
except ValueError:
pc.printout("Error! Please enter a valid integer!", pc.RED)
print("\n")
return
else:
pc.printout("Error! Please enter y/n :-)", pc.RED)
print("\n")
return

for follow in followers:
user = self.api.user_info(str(follow['id']))
if 'public_email' in user['user'] and user['user']['public_email']:
follow['email'] = user['user']['public_email']
if len(results) > value:
break
results.append(follow)

except ClientThrottledError as e:
Expand Down Expand Up @@ -1286,13 +1312,39 @@ def get_fwingsemail(self):
next_max_id = results.get('next_max_id')

results = []

pc.printout("Do you want to get all emails? y/n: ", pc.YELLOW)
value = input()

if value == str("y") or value == str("yes") or value == str("Yes") or value == str("YES"):
value = len(followings)
elif value == str(""):
print("\n")
return
elif value == str("n") or value == str("no") or value == str("No") or value == str("NO"):
while True:
try:
pc.printout("How many emails do you want to get? ", pc.YELLOW)
new_value = int(input())
value = new_value - 1
break
except ValueError:
pc.printout("Error! Please enter a valid integer!", pc.RED)
print("\n")
return
else:
pc.printout("Error! Please enter y/n :-)", pc.RED)
print("\n")
return

for follow in followings:
sys.stdout.write("\rCatched %i followings email" % len(results))
sys.stdout.flush()
user = self.api.user_info(str(follow['id']))
if 'public_email' in user['user'] and user['user']['public_email']:
follow['email'] = user['user']['public_email']
if len(results) > value:
break
results.append(follow)

except ClientThrottledError as e:
Expand Down Expand Up @@ -1366,13 +1418,39 @@ def get_fwingsnumber(self):
next_max_id = results.get('next_max_id')

results = []

pc.printout("Do you want to get all phone numbers? y/n: ", pc.YELLOW)
value = input()

if value == str("y") or value == str("yes") or value == str("Yes") or value == str("YES"):
value = len(followings)
elif value == str(""):
print("\n")
return
elif value == str("n") or value == str("no") or value == str("No") or value == str("NO"):
while True:
try:
pc.printout("How many phone numbers do you want to get? ", pc.YELLOW)
new_value = int(input())
value = new_value - 1
break
except ValueError:
pc.printout("Error! Please enter a valid integer!", pc.RED)
print("\n")
return
else:
pc.printout("Error! Please enter y/n :-)", pc.RED)
print("\n")
return

for follow in followings:
sys.stdout.write("\rCatched %i followings phone numbers" % len(results))
sys.stdout.flush()
user = self.api.user_info(str(follow['id']))
if 'contact_phone_number' in user['user'] and user['user']['contact_phone_number']:
follow['contact_phone_number'] = user['user']['contact_phone_number']
if len(results) > value:
break
results.append(follow)

except ClientThrottledError as e:
Expand Down Expand Up @@ -1447,13 +1525,39 @@ def get_fwersnumber(self):
next_max_id = results.get('next_max_id')

results = []

pc.printout("Do you want to get all phone numbers? y/n: ", pc.YELLOW)
value = input()

if value == str("y") or value == str("yes") or value == str("Yes") or value == str("YES"):
value = len(followings)
elif value == str(""):
print("\n")
return
elif value == str("n") or value == str("no") or value == str("No") or value == str("NO"):
while True:
try:
pc.printout("How many phone numbers do you want to get? ", pc.YELLOW)
new_value = int(input())
value = new_value - 1
break
except ValueError:
pc.printout("Error! Please enter a valid integer!", pc.RED)
print("\n")
return
else:
pc.printout("Error! Please enter y/n :-)", pc.RED)
print("\n")
return

for follow in followings:
sys.stdout.write("\rCatched %i followers phone numbers" % len(results))
sys.stdout.flush()
user = self.api.user_info(str(follow['id']))
if 'contact_phone_number' in user['user'] and user['user']['contact_phone_number']:
follow['contact_phone_number'] = user['user']['contact_phone_number']
if len(results) > value:
break
results.append(follow)

except ClientThrottledError as e:
Expand Down Expand Up @@ -1558,4 +1662,4 @@ def clear_cache(self):
except FileNotFoundError:
pc.printout("Settings.json don't exist.\n",pc.RED)
finally:
f.close()
f.close()

0 comments on commit 6afc0f8

Please sign in to comment.