-
-
Notifications
You must be signed in to change notification settings - Fork 0
/
wifiinfo.py
354 lines (304 loc) · 15.5 KB
/
wifiinfo.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
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
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
import ifcfg
import time
import psutil
import nmcli as nt
import requests
import colorama
from colorama import Fore, Style
import speedtest_cli as speedtest
import os
clear = os.system("clear")
if clear == True:
os.system("cls")
else:
print()
colorama.init()
print(Fore.MAGENTA)
pattern = '''
__ __ ______ ________ ______ ______ __ __ ________ ______
| \ _ | \ \ \ \ | \ \ | \ \/ \
| ▓▓ / \ | ▓▓\▓▓▓▓▓▓ ▓▓▓▓▓▓▓▓\▓▓▓▓▓▓ \▓▓▓▓▓▓ ▓▓\ | ▓▓ ▓▓▓▓▓▓▓▓ ▓▓▓▓▓▓
| ▓▓/ ▓\| ▓▓ | ▓▓ | ▓▓__ | ▓▓ | ▓▓ | ▓▓▓\| ▓▓ ▓▓__ | ▓▓ | ▓▓
| ▓▓ ▓▓▓\ ▓▓ | ▓▓ | ▓▓ \ | ▓▓ | ▓▓ | ▓▓▓▓\ ▓▓ ▓▓ \ | ▓▓ | ▓▓
| ▓▓ ▓▓\▓▓\▓▓ | ▓▓ | ▓▓▓▓▓ | ▓▓ | ▓▓ | ▓▓\▓▓ ▓▓ ▓▓▓▓▓ | ▓▓ | ▓▓
| ▓▓▓▓ \▓▓▓▓_| ▓▓_| ▓▓ _| ▓▓_ _| ▓▓_| ▓▓ \▓▓▓▓ ▓▓ | ▓▓__/ ▓▓
| ▓▓▓ \▓▓▓ ▓▓ \ ▓▓ | ▓▓ \ | ▓▓ \ ▓▓ \▓▓▓ ▓▓ \▓▓ ▓▓
\▓▓ \▓▓\▓▓▓▓▓▓\▓▓ \▓▓▓▓▓▓ \▓▓▓▓▓▓\▓▓ \▓▓\▓▓ \▓▓▓▓▓▓
⠠⠞⠑⠭⠞⠶⠠⠑⠙⠊⠞⠕⠗Github: https://github.com/suchsoak⠠⠞⠑⠭⠞⠶⠠⠑⠙⠊⠞⠕⠗
BY: suchsoak
v:1.0.4
'''
print(pattern)
print(Style.RESET_ALL)
time.sleep(2.0)
interfaces = ifcfg.interfaces()
wifi = ['inet', 'netmask', 'device', 'inet4', 'netmasks', 'broadcast', 'broadcasts']
# Information
for interface in interfaces.values():
if all(key in interface for key in wifi):
if all(interface) is not None:
print ("Inet: ",interface['inet'])
print ("−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−")
colorama.init()
print(Fore.MAGENTA)
print ("Device: ",interface['device'])
print ("−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−")
print(Style.RESET_ALL)
print ("Inet4: ",interface['inet4'])
print ("−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−")
print ("Inet6: ",interface['inet6'])
print ("−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−")
print ("Netmask: ",interface['netmask'])
print ("−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−")
print ("Netmasks: ",interface['netmasks'])
print ("−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−")
print ("Broadcast: ",interface['broadcast'])
print ("−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−")
print ("Broadcasts: ",interface['broadcasts'])
print ("−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−")
print ("prefixlens: ",interface['prefixlens'])
print ("−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−")
time.sleep(3.0)
print("\t")
colorama.init()
print(Fore.MAGENTA)
# Family Information
family = '''
.−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−.
| ⠠⠞⠑⠭⠞⠶⠠⠑⠙⠊⠞⠕⠗Family Information⠠⠞⠑⠭⠞⠶⠠⠑⠙⠊⠞⠕⠗ |
'−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−'
'''
print(family)
print(Style.RESET_ALL)
print("\t")
add = psutil.net_if_addrs()
for interface, addresses in add.items():
print(f"Interface: {interface}")
for address in addresses:
print("−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−")
print("Family:", address.family)
print("Address:", address.address)
time.sleep(1)
print("Netmask:", address.netmask)
print("Broadcast:", address.broadcast)
print()
net_connections = psutil.net_connections()
for conn in net_connections:
laddr = conn.laddr
raddr = conn.raddr
status = conn.status
pid = conn.pid
print("−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−")
print(f"Local: {laddr.ip}:{laddr.port}")
print(f"Status: {status}")
print(f"PID: {pid}")
print("−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−")
time.sleep(1.0)
search = os.system("nmcli")
if search == False:
wifi_info = nt.device.wifi()
for device in wifi_info:
try:
wifi_mode = device.mode
wifi_bssid = device.bssid
print()
wifi_ssid = device.ssid
print()
time.sleep(2)
wifi_signal = device.signal
wifi_cha = device.chan
wifi_frequency = device.freq
wifi_security = device.security
wifi_general = device.general
print(f"WiFi Mode: {wifi_mode}")
print(f"BSSID: {wifi_bssid}")
colorama.init()
print(Fore.MAGENTA)
print(f"SSID: {wifi_ssid}")
print(Style.RESET_ALL)
print(f"Signal Strength: {wifi_signal}")
print(f"WiFi Chang: {wifi_cha}")
print(f"wifi Frequency: {wifi_frequency}")
print(f"wifi Security: {wifi_security}")
print(f"wifi general: {wifi_general}")
print()
except Exception as error:
print(f"Error: {error}")
print("\t")
colorama.init()
print(Fore.MAGENTA)
else:
pass
# Firewall Test
firewall = '''
.−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−------.
| ⠠⠞⠑⠭⠞⠶⠠⠑⠙⠊⠞⠕⠗Firewall Test⠠⠞⠑⠭⠞⠶⠠⠑⠙⠊⠞⠕⠗ |
'−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−------'
'''
print(firewall)
print(Style.RESET_ALL)
try:
r = requests.get('https://www.torproject.org/')
proxy = requests.get('https://www.proxysite.com/')
vpnproton = requests.get('https://protonvpn.com/')
proxylist = requests.get('https://free-proxy-list.net/')
proxylist2 = requests.get('https://www.proxyscrape.com/free-proxy-list')
OnWorks = requests.get('https://www.onworks.net/')
nordvpn = requests.get('https://nordvpn.com/')
shodan = requests.get('https://www.shodan.io/')
zoomeye = requests.get('https://www.zoomeye.org/')
r.status_code
if r.status_code == 200:
colorama.init()
print(Fore.MAGENTA)
print("−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−")
print()
print("Tor is not blocked!", "Status Code: " ,r.status_code)
print()
print("Proxy is not blocked!", "Status Code: " ,proxy.status_code)
print()
print("Vpnproton is not blocked!", "Status Code: " ,vpnproton.status_code)
print()
print("free-proxy-list is not blocked!", "Status Code: " ,proxylist.status_code)
print()
print("Proxy_list2 is not blocked!", "Status Code: " ,proxylist2.status_code)
print()
print("OnWork is not blocked!", "Status Code: " ,OnWorks.status_code)
print()
print("NordVpn is not blocked!", "Status Code: " ,OnWorks.status_code)
print()
print("shodan is not blocked!", "Status Code: " ,shodan.status_code)
print()
print("zoomeye is not blocked!", "Status Code: " ,zoomeye.status_code)
print()
print("−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−")
print(Style.RESET_ALL)
elif r.status_code == 403:
colorama.init()
print(Fore.RED)
print("−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−")
print()
print("Tor is not found", "Status Code: " ,r.status_code)
print()
print("Proxy is not found!", "Status Code: " ,proxy.status_code)
print()
print("vpnproton is not found!", "Status Code: " ,vpnproton.status_code)
print()
print("free-proxy-list is not blocked!", "Status Code: " ,proxylist.status_code)
print()
print("Proxy_list2 is not blocked!", "Status Code: " ,proxylist2.status_code)
print()
print("OnWork is not blocked!", "Status Code: " ,OnWorks.status_code)
print()
print("NordVpn is not blocked!", "Status Code: " ,nordvpn.status_code)
print()
print("shodan is not blocked!", "Status Code: " ,shodan.status_code)
print()
print("zoomeye is not blocked!", "Status Code: " ,zoomeye.status_code)
print()
print("−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−")
print(Style.RESET_ALL)
elif r.status_code == 404:
colorama.init()
print(Fore.RED)
print("−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−")
print()
print("Tor is not found", "Status Code: " ,r.status_code)
print()
print("Proxy is not found!", "Status Code: " ,proxy.status_code)
print()
print("vpnproton is not found!", "Status Code: " ,vpnproton.status_code)
print()
print("free-proxy-list is not blocked!", "Status Code: " ,proxylist.status_code)
print()
print("Proxy_list2 is not blocked!", "Status Code: " ,proxylist2.status_code)
print()
print("OnWork is not blocked!", "Status Code: " ,OnWorks.status_code)
print()
print("NordVpn is not blocked!", "Status Code: " ,nordvpn.status_code)
print()
print("shodan is not blocked!", "Status Code: " ,shodan.status_code)
print()
print("zoomeye is not blocked!", "Status Code: " ,zoomeye.status_code)
print()
print("−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−")
print(Style.RESET_ALL)
elif r.status_code == 503:
colorama.init()
print(Fore.RED)
print("−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−")
print()
print("Tor is not found", r.status_code)
print()
print("Proxy is not found!", "Status Code: " ,proxy.status_code)
print()
print("vpnproton is not found!", "Status Code: " ,vpnproton.status_code)
print()
print("free-proxy-list is not blocked!", "Status Code: " ,proxylist.status_code)
print()
print("Proxy_list2 is not blocked!", "Status Code: " ,proxylist2.status_code)
print()
print("OnWork is not blocked!", "Status Code: " ,OnWorks.status_code)
print()
print("NordVpn is not blocked!", "Status Code: " ,nordvpn.status_code)
print()
print("shodan is not blocked!", "Status Code: " ,shodan.status_code)
print()
print("zoomeye is not blocked!", "Status Code: " ,zoomeye.status_code)
print()
print("−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−")
print(Style.RESET_ALL)
else:
colorama.init()
print(Fore.RED)
print("−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−")
print()
print("Tor rejected, bocked for firewall: ", r.status_code)
print()
print("Proxy blocked for firewall", "Status Code: " ,proxy.status_code)
print()
print("vpnproton blocked for firewall", "Status Code: " ,vpnproton.status_code)
print()
print("free-proxy-list blocked for firewall", "Status Code: " ,proxylist.status_code)
print()
print("Proxy_list2 blocked for firewall!", "Status Code: " ,OnWorks.status_code)
print()
print("NordVpn blocked for firewall!", "Status Code: " ,nordvpn.status_code)
print()
print("shodan blocked! for firewall!", "Status Code: " ,shodan.status_code)
print()
print("zoomeye blocked! for firewall!", "Status Code: " ,zoomeye.status_code)
print()
print("−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−")
print(Style.RESET_ALL)
except Exception as e:
print(e)
# Speed Teste
try:
s = speedtest.Speedtest()
s.get_best_server()
s.download()
s.upload()
speed = s.results
print()
colorama.init()
print(Fore.MAGENTA)
Speedtest = '''
.−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−-------.
| ⠠⠞⠑⠭⠞⠶⠠⠑⠙⠊⠞⠕⠗Speed teste⠠⠞⠑⠭⠞⠶⠠⠑⠙⠊⠞⠕⠗ |
'−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−-------'
'''
print(Speedtest)
print(Style.RESET_ALL)
print("−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−")
print("Download:", speed.download / 1024 / 1024, "Mbps")
print("−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−")
print("Upload:", speed.upload / 1024 / 1024, "Mbps")
print("−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−")
print("Ping:", speed.ping, "ms")
print("−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−")
print("Bytes:", speed.bytes_received, "bytes")
print("−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−")
print("Server:", speed.server['sponsor'])
except Exception as error:
print(error)