|
2 | 2 | import requests
|
3 | 3 | import json
|
4 | 4 | import time
|
5 |
| -import urllib |
6 |
| -import os |
7 |
| - |
8 |
| -class config: |
9 |
| - key = "4a1ede76e87d9e64682b284e8620ad68" |
10 |
| - # key = "4395fd642c2f1b24f5d9d01e0a1f838a" |
11 |
| - # NOTE: You can get ur own api key there: https://numverify.com/ |
12 | 5 |
|
13 | 6 | def banner():
|
14 |
| - print (""" |
15 |
| - _____ _ _____ _ |
16 |
| - | ___(_)_ __ ___| ___| |_ _ |
17 |
| - | |_ | | '__/ _ \ |_ | | | | | |
18 |
| - | _| | | | | __/ _| | | |_| | |
19 |
| - |_| |_|_| \___|_| |_|\__, | |
20 |
| - |___/ |
| 7 | + print(''' |
| 8 | + ______ _ ______ _ |
| 9 | + | ____(_) | ____| | |
| 10 | + | |__ _ _ __ ___| |__ | |_ _ |
| 11 | + | __| | | '__/ _ \ __| | | | | | |
| 12 | + | | | | | | __/ | | | |_| | |
| 13 | + |_| |_|_| \___|_| |_|\__, | |
| 14 | + __/ | |
| 15 | + |___/ |
21 | 16 | Author: Lexxrt
|
22 | 17 | Github: https://github.com/Lexxrt
|
23 |
| - """) |
| 18 | + ''') |
24 | 19 |
|
25 | 20 | def main():
|
26 | 21 | banner()
|
27 | 22 | if len(sys.argv) == 2:
|
28 | 23 | number = sys.argv[1]
|
29 |
| - api = "http://apilayer.net/api/validate?access_key=" + config.key + "&number=" + number + "&country_code=&format=1" |
30 |
| - output = requests.get(api) |
31 |
| - content = output.text |
32 |
| - obj = json.loads(content) |
| 24 | + output = requests.get(f'http://apilayer.net/api/validate?access_key={key}&number={number}&country_code=&format=1').text |
| 25 | + obj = json.loads(output) |
| 26 | + |
33 | 27 | country_code = obj['country_code']
|
34 | 28 | country_name = obj['country_name']
|
35 | 29 | location = obj['location']
|
36 | 30 | carrier = obj['carrier']
|
37 | 31 | line_type = obj['line_type']
|
38 | 32 |
|
39 |
| - print ("[+] " + "Phone number information gathering") |
40 |
| - print ("--------------------------------------") |
| 33 | + print('[+] Phone number information gathering') |
| 34 | + print('--------------------------------------') |
41 | 35 | time.sleep(0.2)
|
42 | 36 |
|
43 |
| - if country_code == "": |
44 |
| - print (" - Getting Country [ " + "FAILED " + "]") |
| 37 | + if country_code == '': |
| 38 | + print(' - Getting Country\t\t[ FAILED ]') |
45 | 39 | else:
|
46 |
| - print (" - Getting Country [ " + "OK " + "]") |
| 40 | + print(' - Getting Country\t\t[ OK ]') |
47 | 41 |
|
48 | 42 | time.sleep(0.2)
|
49 |
| - if country_name == "": |
50 |
| - print (" - Getting Country Name [ " + "FAILED " + "]") |
| 43 | + if country_name == '': |
| 44 | + print(' - Getting Country Name\t\t[ FAILED ]') |
51 | 45 | else:
|
52 |
| - print (" - Getting Country Name [ " + "OK " + "]") |
| 46 | + print(' - Getting Country Name\t\t[ OK ]') |
53 | 47 |
|
54 | 48 | time.sleep(0.2)
|
55 |
| - if location == "": |
56 |
| - print (" - Getting Location [ " + "FAILED " + "]") |
| 49 | + if location == '': |
| 50 | + print(' - Getting Location\t\t[ FAILED ]') |
57 | 51 | else:
|
58 |
| - print (" - Getting Location [ " + "OK " + "]") |
| 52 | + print(' - Getting Location\t\t[ OK ]') |
59 | 53 |
|
60 | 54 | time.sleep(0.2)
|
61 |
| - if carrier == "": |
62 |
| - print (" - Getting Carrier [ " + "FAILED " + "]") |
| 55 | + if carrier == '': |
| 56 | + print(' - Getting Carrier\t\t[ FAILED ]') |
63 | 57 | else:
|
64 |
| - print (" - Getting Carrier [ " + "OK " + "]") |
| 58 | + print(' - Getting Carrier\t\t[ OK ]') |
65 | 59 |
|
66 | 60 | time.sleep(0.2)
|
67 | 61 | if line_type == None:
|
68 |
| - print (" - Getting Device [ " + "FAILED " + "]") |
| 62 | + print(' - Getting Device\t\t[ FAILED ]') |
69 | 63 | else:
|
70 |
| - print (" - Getting Device [ " + "OK " + "]") |
| 64 | + print(' - Getting Device\t\t[ OK ]') |
71 | 65 |
|
72 |
| - print ("") |
73 |
| - print ("[+] " + "Information Output") |
74 |
| - print ("--------------------------------------") |
75 |
| - print (" - Phone number: " + str(number)) |
76 |
| - print (" - Country: " + str(country_code)) |
77 |
| - print (" - Country Name: " + str(country_name)) |
78 |
| - print (" - Location: " + str(location)) |
79 |
| - print (" - Carrier: " + str(carrier)) |
80 |
| - print (" - Device: " + str(line_type)) |
| 66 | + print('[+] Information Output') |
| 67 | + print('--------------------------------------') |
| 68 | + print(' - Phone number:', number) |
| 69 | + print(' - Country:', country_code) |
| 70 | + print(' - Country Name:', country_name) |
| 71 | + print(' - Location:', location) |
| 72 | + print(' - Carrier:', carrier) |
| 73 | + print(' - Device:', line_type) |
81 | 74 | else:
|
82 |
| - print ("[?] Usage:") |
83 |
| - print (" ./%s <phone-number>" % (sys.argv[0])) |
84 |
| - print (" ./%s +13213707446" % (sys.argv[0])) |
| 75 | + print('[?] Usage:') |
| 76 | + print('\tFireFly.py <phone-number>') |
| 77 | + print(' python3 FireFly.py +13213707446 (Test Number)') |
85 | 78 |
|
86 |
| -main() |
| 79 | +if __name__ == '__main__': |
| 80 | + config = open('config.json').read() |
| 81 | + data = json.loads(config) |
| 82 | + key = data['api_key'] |
| 83 | + main() |
0 commit comments