-
Notifications
You must be signed in to change notification settings - Fork 478
/
cam-hackers.py
69 lines (51 loc) · 3.22 KB
/
cam-hackers.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
#!/usr/bin/env python3
#-*- coding: utf-8 -*-
#github.com/AngelSecurityTeam/Cam-Hackers
import requests, re , colorama ,random
from requests.structures import CaseInsensitiveDict
colorama.init()
url = "http://www.insecam.org/en/jsoncountries/"
headers = CaseInsensitiveDict()
headers["Accept"] = "text/html,application/xhtml+xml,application/xml;q=0.9,image/avif,image/webp,image/apng,*/*;q=0.8,application/signed-exchange;v=b3;q=0.7"
headers["Cache-Control"] = "max-age=0"
headers["Connection"] = "keep-alive"
headers["Host"] = "www.insecam.org"
headers["Upgrade-Insecure-Requests"] = "1"
headers["User-Agent"] = "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/110.0.0.0 Safari/537.36"
resp = requests.get(url, headers=headers)
data = resp.json()
countries = data['countries']
print("""
\033[1;31m\033[1;37m ██████╗ █████╗ ███╗ ███╗ ██╗ ██╗ █████╗ ██████╗██╗ ██╗███████╗██████╗ ███████╗
██╔════╝██╔══██╗████╗ ████║ ██║ ██║██╔══██╗██╔════╝██║ ██╔╝██╔════╝██╔══██╗██╔════╝
██║ ███████║██╔████╔██║█████╗███████║███████║██║ █████╔╝ █████╗ ██████╔╝███████╗
██║ ██╔══██║██║╚██╔╝██║╚════╝██╔══██║██╔══██║██║ ██╔═██╗ ██╔══╝ ██╔══██╗╚════██║
╚██████╗██║ ██║██║ ╚═╝ ██║ ██║ ██║██║ ██║╚██████╗██║ ██╗███████╗██║ ██║███████║
\033[1;31m ╚═════╝╚═╝ ╚═╝╚═╝ ╚═╝ ╚═╝ ╚═╝╚═╝ ╚═╝ ╚═════╝╚═╝ ╚═╝╚══════╝╚═╝ ╚═╝╚══════╝
\033[1;31m ANGELSECURITYTEAM \033[1;31m\033[1;37m""")
for key, value in countries.items():
print(f'Code : ({key}) - {value["country"]} / ({value["count"]}) ')
print("")
try:
country = input("Code(##) : ")
res = requests.get(
f"http://www.insecam.org/en/bycountry/{country}", headers=headers
)
last_page = re.findall(r'pagenavigator\("\?page=", (\d+)', res.text)[0]
for page in range(int(last_page)):
res = requests.get(
f"http://www.insecam.org/en/bycountry/{country}/?page={page}",
headers=headers
)
find_ip = re.findall(r"http://\d+.\d+.\d+.\d+:\d+", res.text)
with open(f'{country}.txt', 'w') as f:
for ip in find_ip:
print("")
print("\033[1;31m", ip)
f.write(f'{ip}\n')
except:
pass
finally:
print("\033[1;37m")
print('\033[37mSave File :'+country+'.txt')
exit()