-
Notifications
You must be signed in to change notification settings - Fork 22
/
Copy pathmain.py
69 lines (61 loc) · 1.58 KB
/
main.py
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
# MODULES
import requests
from os import system as SYSS
from sys import exit as EXT
"""main checker"""
class main(object):
"""untuk mengecheck bin ada atau tidak"""
@classmethod
def check(cls, bins):
if bins == '':
EXT('[!] Bin not found!')
else:
cls.main(bins)
"""requests data json"""
@classmethod
def main(cls, x):
x = {
'author': 'DR4G0N5',
'url': 'https://bin-check-dr4g.herokuapp.com/api/'+x,
'version': '0.1.1'
}
req = requests.get(x['url'])
requests_json = req.json()
"""untuk check binnya valid / tidak"""
if requests_json['result'] == 'false':
EXT('[!] Bin Error.')
else:
r = requests_json['data']
cls.main_check(r, x)
"""pengeluaran data"""
@classmethod
def main_check(cls, r, xx):
full_data = r
"""datanya"""
data = {
'Bin': full_data['bin'],
'Vendor': full_data['vendor'],
'Type': full_data['type'],
'Level': full_data['level'],
'Bank': full_data['bank'],
'Country': full_data['country']
}
print("""
[+] Author: {}
[+] Version: {}""".format(xx['author'],xx['version']))
print("""
[+] Bin: {}
[+] vendor: {}
[+] Type: {}
[+] Level: {}
[+] Bank: {}
[+] Country: {}""".format(data['Bin'],
data['Vendor'],
data['Type'],
data['Level'],
data['Bank'],
data['Country']))
if __name__ == '__main__':
"""pemanggil bin"""
BINS = input('[+] Bin: ')
main.check(BINS)