SnakeScan 1.7.2__tar.gz → 1.7.4__tar.gz

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: SnakeScan
3
- Version: 1.7.2
3
+ Version: 1.7.4
4
4
  Summary: IPv4 address scanner for collecting address information.Scan or get the IPv4 address from the IPv6 host
5
5
  Author: Den*Ram
6
6
  Requires-Python: >=3.7
@@ -63,7 +63,5 @@ snake -l #Shows your public internet IP address. Internet connection required fo
63
63
  -I:
64
64
  snake www.google.com -i #Shows information about the IP address.Can receive information from IPV4 and IPV6
65
65
 
66
- #Update in 1.7.2
67
- - Unnecessary functions have been removed and some bugs have been fixed.
68
- - Now SnakeScan run is deleted and run in code is now impossible.
69
- - Fixed Several bugs.
66
+ #Update in 1.7.4
67
+ - Added more standart ports to fast scan
@@ -50,7 +50,5 @@ snake -l #Shows your public internet IP address. Internet connection required fo
50
50
  -I:
51
51
  snake www.google.com -i #Shows information about the IP address.Can receive information from IPV4 and IPV6
52
52
 
53
- #Update in 1.7.2
54
- - Unnecessary functions have been removed and some bugs have been fixed.
55
- - Now SnakeScan run is deleted and run in code is now impossible.
56
- - Fixed Several bugs.
53
+ #Update in 1.7.4
54
+ - Added more standart ports to fast scan
@@ -27,10 +27,10 @@ Bool = True
27
27
  boolsd = True
28
28
  boolean = 0
29
29
  ports = {
30
- 1: "tcpmux",
31
- 2: "compressnet",
32
- 3: "compressnet",
33
- 5: "rje",
30
+ 1: "Tcpmux",
31
+ 2: "Compressnet-Managment",
32
+ 3: "Compressnet-Compression",
33
+ 5: "RUE",
34
34
  7: "Echo",
35
35
  9: "Discard",
36
36
  11: "Systat",
@@ -42,48 +42,78 @@ ports = {
42
42
  21: "FTP-Control",
43
43
  22: "SSH",
44
44
  23: "Telnet",
45
- 24: "private mail",
45
+ 24: "Priv-mail",
46
46
  25: "SMTP",
47
- 27: "nsw-fe",
48
- 29: "msg-icp",
49
- 31: "msg-auth",
50
- 33: "dsp",
51
- 35: "private printer server",
47
+ 27: "NSW-FE",
48
+ 29: "MSG-ICP",
49
+ 31: "MSG-AUTH",
50
+ 33: "DSP",
51
+ 35: "Priv-print",
52
52
  37: "Time",
53
- 38: "rap",
54
- 39: "rlp",
55
- 41: "graphics",
53
+ 38: "RAP",
54
+ 39: "RLP",
55
+ 41: "Graphics",
56
56
  42: "WINS",
57
57
  43: "Whois",
58
- 44: "mpm-flags",
59
- 45: "mpm",
60
- 46: "mpm-snd",
61
- 47: "ni-ftp",
62
- 48: "auditd",
58
+ 44: "MPM-FLAGS",
59
+ 45: "MPM",
60
+ 46: "MPM-SND",
61
+ 47: "NI-FTP",
62
+ 48: "AUDITD",
63
63
  49: "TACACS",
64
- 50: "re-mail-ck",
65
- 51: "la-maint",
66
- 52: "xns-time",
64
+ 50: "RE-MAIL-CK",
65
+ 52: "XNS-TIME",
67
66
  53: "DNS",
68
- 54: "xns-ch",
69
- 55: "isi-gl",
70
- 56: "xns-auth",
71
- 57: "private terminal",
72
- 58: "xns-mail",
73
- 67: "DHCP server",
74
- 68: "DHCP client",
67
+ 54: "XNS-CH",
68
+ 55: "ISI-GL",
69
+ 57: "Priv-term",
70
+ 58: "XNS-MAIL",
71
+ 59: "Priv-file",
72
+ 61: "NI-MAIL",
73
+ 62: "ACAS",
74
+ 63: "WHOISPP",
75
+ 64: "COVIA",
76
+ 65: "TACACS-DS",
77
+ 66: "SQL-NET",
78
+ 67: "BOOTPS/DHCP server",
79
+ 68: "BOOTPC/DHCP client",
75
80
  69: "TFTP",
76
81
  70: "Gopher",
82
+ 75: "Priv-dial",
83
+ 76: "DEOS",
84
+ 77: "Priv-RUE",
85
+ 78: "VETTCP",
77
86
  79: "Finger",
78
87
  80: "HTTP",
88
+ 84: "CTF",
89
+ 87: "Priv-term-L",
79
90
  88: "Kerberos",
91
+ 92: "NPP",
92
+ 93: "DCP",
93
+ 97: "SWIFT-RVF",
94
+ 98: "TACNEWS",
95
+ 99: "METAGRAM",
96
+ 101: "HOSTNAMESERVER",
97
+ 102: "ISO-TSAP",
98
+ 103: "GPPITNP",
99
+ 104: "ACR-NEMA",
100
+ 105: "CSO,CSNET-NS",
101
+ 106: "3COM-TSMUX",
102
+ 107: "RTELNET",
103
+ 108: "SNAGAS",
80
104
  109: "POP2",
81
105
  110: "POP3",
82
106
  111: "RPCbind",
107
+ 112: "MCIDAS",
83
108
  113: "ident",
84
109
  115: "SFTP",
110
+ 116: "ANSANOTIFY",
111
+ 117: "UUCP-PATH",
85
112
  118: "SQLServ",
86
113
  119: "NNTP",
114
+ 120: "CFDPTKT",
115
+ 121: "ERPC",
116
+ 122: "SMAKYNET",
87
117
  123: "NTP",
88
118
  135: "MS-Locator",
89
119
  137: "NetBIOS-NS",
@@ -94,23 +124,112 @@ ports = {
94
124
  162: "SNMP-trap",
95
125
  179: "BGP",
96
126
  194: "IRC",
127
+ 199: "SMUX",
128
+ 200: "SRC",
97
129
  201: "AppleTalk routing maintenance",
98
130
  220: "IMAP3",
131
+ 311: "ASIP-WEBADMIN",
132
+ 318: "PKIX-TIMESTAMP",
133
+ 321: "PIP",
134
+ 322: "RTSPS",
135
+ 322: "RPKI-RTR",
136
+ 324: "RPKI-RTR-TLS",
137
+ 343: "TEXAR",
138
+ 344: "PDAP",
139
+ 345: "PAWSERV",
140
+ 346: "ZSERV",
141
+ 347: "FATSERV",
142
+ 381: "HP-COLLECTOR",
143
+ 382: "HP-MANAGED-NODE",
144
+ 383: "HP-ALARM-MGR",
145
+ 384: "ARNS",
146
+ 385: "IBM-APP",
147
+ 386: "ASA",
148
+ 387: "AURP",
149
+ 388: "UNIDATA-LDM",
99
150
  389: "LDAP",
151
+ 401: "UPS",
152
+ 413: "SMSP",
153
+ 427: "SVRLOC",
100
154
  443: "HTTPS",
101
- 445: "SMB",
102
- 465: "SMTPS",
155
+ 444: "SNPP",
156
+ 445: "SMB/MICROSOFT-DS",
157
+ 464: "KPASSWD",
158
+ 465: "URD/IGMPV3LITE/SMTPS",
103
159
  500: "ISAKMP",
104
- 514: "Syslog",
160
+ 512: "EXEC/COMSAT/BIFF",
161
+ 513: "LOGIN/WHO",
162
+ 514: "SHELL/SYSLOG",
163
+ 515: "PRINTER",
105
164
  520: "RIP",
165
+ 524: "NCP",
166
+ 530: "COURIER-RPC",
167
+ 540: "UUCP",
168
+ 541: "UUCP-RLOGIN",
169
+ 543: "KLOGIN",
170
+ 544: "KSHELL",
106
171
  546: "DHCPv6 client",
107
172
  547: "DHCPv6 server",
173
+ 551: "CYBERCASH",
174
+ 554: "RTSP",
175
+ 556: "REMOTEFS",
108
176
  587: "Submission",
177
+ 593: "HTTP-RPC-EPMAP",
178
+ 600: "IPCSERVER",
179
+ 601: "SYSLOG-CONN",
180
+ 602: "XMLRPV-BEEP",
181
+ 603: "IDPX",
182
+ 604: "TUNNEL",
183
+ 605: "SOAP-BEEP",
184
+ 606: "URM",
185
+ 607: "NQS",
109
186
  631: "IPP",
110
187
  636: "LDAPS",
188
+ 639: "MSDP",
189
+ 646: "LDP",
190
+ 647: "DHCP-FAILOVER",
191
+ 648: "RRP",
192
+ 654: "AODV",
193
+ 674: "ACAP",
194
+ 691: "MSEXCH-ROUTING",
195
+ 698: "OLSR",
196
+ 700: "EPP",
197
+ 701: "LMP",
198
+ 702: "IRIS-BEEP",
199
+ 704: "ELCSD",
200
+ 705: "AGENTX",
201
+ 706: "SILC",
202
+ 707: "BORLAND-DSJ",
203
+ 709: "ENTRUST-KMSH",
204
+ 710: "ENTRUST-ASH",
205
+ 711: "CISCO-TDP",
206
+ 712: "TBRPF",
207
+ 713: "IRIS-XPC/IRIS-XPCS",
208
+ 715: "IRIS-LWZ",
209
+ 716: "PANA",
210
+ 729: "NETVIEWDM1",
211
+ 730: "NETVIEWDM2",
212
+ 731: "NETVIEWDM3",
213
+ 748: "KERBEROS-ADM/RIS-CM",
214
+ 750: "KERBEROS-IV",
215
+ 753: "RRH",
216
+ 830: "NETCONF-SSH",
217
+ 831: "NETCONF-BEEP",
218
+ 832: "NETCONFSOAPHTTP",
219
+ 833: "NETCONFSOAPBEEP",
220
+ 847: "DHCP-FAILOVER2",
221
+ 848: "GDOI",
222
+ 860: "ISCSI",
223
+ 861: "OWAMP-CONTROL",
224
+ 862: "TWAPM-CONTROL",
225
+ 873: "RSYNC",
226
+ 989: "FTPS-DATA",
111
227
  990: "FTPS",
228
+ 991: "NAS",
229
+ 992: "TELNETS",
112
230
  993: "IMAPS",
113
231
  995: "POP3S",
232
+ 1038: "MTQP",
114
233
  1080: "SOCKS",
115
234
  1194: "OpenVPN",
116
235
  1433: "Microsoft SQL server",
@@ -118,10 +237,17 @@ ports = {
118
237
  1723: "PPTP",
119
238
  2049: "NFS",
120
239
  2222: "SSH",
240
+ 3050: "gds_db-Interbase/Firebird",
241
+ 3074: "Xbox Live",
121
242
  3128: "HTTP",
122
243
  3268: "LDAP",
123
244
  3306: "MySQL",
245
+ 3386: "GTP 3GPP GSM/UMTS CDR logging protocol",
124
246
  3389: "RDP",
247
+ 3455: "RSVP",
248
+ 3632: "Distributed compiler",
249
+ 3689: "DAAP",
250
+ 3702: "WS-Discovery",
125
251
  5060: "SIP",
126
252
  5353: "MDNS",
127
253
  5432: "PostgreSQL",
@@ -133,7 +259,8 @@ ports = {
133
259
  10000: "Webmin",
134
260
  }
135
261
 
136
- version = "1.7.2"
262
+
263
+ version = "1.7.4"
137
264
 
138
265
 
139
266
  def is_port_open(host, port):
@@ -208,7 +335,7 @@ def SnakeArgs():
208
335
  )
209
336
  parser.add_argument("-p", "--ports", help="Range ports to scan host")
210
337
  parser.add_argument(
211
- "-t", "--thread", action="store_true", help="Scan with using Threading"
338
+ "-t", "--thread", action="store_true", help="Scan with using ThreadPoolExecutor"
212
339
  )
213
340
  parser.add_argument("-ch", "--check", action="store_true", help="Scan ip subnet")
214
341
  parser.add_argument(
@@ -286,19 +413,19 @@ if SnakeArgs().ports:
286
413
  if OpenPorts:
287
414
  for i in OpenPorts:
288
415
  print(f"Open{colored('|√|','green')}-->{ports[i]}|{i}|")
289
- print(f"{host[n]}".center(60, "-"))
416
+ print(f"{host[n]}".center(60, ""))
290
417
  print(f"Closed{colored('|X|','red')}:{portsclosed}")
291
418
  portsclosed = 0
292
419
  print(f"Open{colored('|√|','green')}:{portsopen}")
293
420
  portsopen = 0
294
- print("-" * 60)
421
+ print("" * 60)
295
422
  else:
296
- print(f"{host[n]}".center(60, "-"))
423
+ print(f"{host[n]}".center(60, ""))
297
424
  print(f"Closed{colored('|X|','red')}:{portsclosed}")
298
425
  portsclosed = 0
299
426
  print(f"Open{colored('|√|','green')}:{portsopen}")
300
427
  portsopen = 0
301
- print("-" * 60)
428
+ print("" * 60)
302
429
  except Exception as e:
303
430
  print(e)
304
431
  sys.exit()
@@ -320,7 +447,7 @@ if SnakeArgs().info:
320
447
  if host[0] == "None":
321
448
  host[0] = "localhost"
322
449
  for n in range(len(host)):
323
- print("".center(60, "-"))
450
+ print(f"{host[n]}".center(60, ""))
324
451
  try:
325
452
  host[n] = socket.gethostbyname(host[n])
326
453
  except Exception as e:
@@ -392,12 +519,12 @@ if SnakeArgs().info:
392
519
  except:
393
520
  pass
394
521
  finally:
395
- print("".center(60, "-"))
522
+ print("".center(60, ""))
396
523
 
397
524
 
398
525
  if SnakeArgs().thread:
399
526
  for n in range(len(host)):
400
- print(f"{host[n]}".center(60, "-"))
527
+ print(f"{host[n]}".center(60, ""))
401
528
 
402
529
  for port in ports.keys():
403
530
  t = Thread(
@@ -412,8 +539,10 @@ if SnakeArgs().version:
412
539
  print(f"SnakeScan_Build_{version}")
413
540
  if SnakeArgs().speed:
414
541
  for n in range(len(host)):
415
- print(f"{host[n]}".center(60, "-"))
542
+ print(f"{host[n]}".center(60, ""))
416
543
  PoolProcessExecutor(host[n])
417
544
  if SnakeArgs().getssl:
418
545
  for n in range(len(host)):
546
+ print(f"{host[n]}".center(60, "—"))
419
547
  Get_ssl(host[n])
548
+ print("".center(60, "—"))
@@ -30,7 +30,7 @@ def Check_network(host):
30
30
  return False
31
31
 
32
32
  try:
33
- print("".center(60, "-"))
33
+ print(f"{host}".center(60, ""))
34
34
  try:
35
35
  host = socket.gethostbyname(host)
36
36
  except Exception as e:
@@ -9,9 +9,8 @@ def Get_ssl(host, port=443, timeout=2, protocol="HTTP/1.0"):
9
9
  context = ssl.create_default_context()
10
10
  ssock = context.wrap_socket(sock, server_hostname=host)
11
11
  ssock.sendall(f"GET / {protocol}\r\nHost:{host}\r\n\r\n".encode("utf-8"))
12
- data = ssock.recv(4096)
12
+ data = ssock.recv(8192)
13
13
  print(data.decode(errors="replace"))
14
14
  ssock.close()
15
15
  except Exception as e:
16
16
  print(e)
17
- sys.exit()
@@ -0,0 +1,260 @@
1
+ import socket
2
+ from termcolor import colored
3
+ from concurrent.futures import ProcessPoolExecutor
4
+
5
+ ports = {
6
+ 1: "Tcpmux",
7
+ 2: "Compressnet-Managment",
8
+ 3: "Compressnet-Compression",
9
+ 5: "RUE",
10
+ 7: "Echo",
11
+ 9: "Discard",
12
+ 11: "Systat",
13
+ 13: "Daytime",
14
+ 17: "QOTD",
15
+ 18: "MSP",
16
+ 19: "Chargen",
17
+ 20: "FTP-Data",
18
+ 21: "FTP-Control",
19
+ 22: "SSH",
20
+ 23: "Telnet",
21
+ 24: "Priv-mail",
22
+ 25: "SMTP",
23
+ 27: "NSW-FE",
24
+ 29: "MSG-ICP",
25
+ 31: "MSG-AUTH",
26
+ 33: "DSP",
27
+ 35: "Priv-print",
28
+ 37: "Time",
29
+ 38: "RAP",
30
+ 39: "RLP",
31
+ 41: "Graphics",
32
+ 42: "WINS",
33
+ 43: "Whois",
34
+ 44: "MPM-FLAGS",
35
+ 45: "MPM",
36
+ 46: "MPM-SND",
37
+ 47: "NI-FTP",
38
+ 48: "AUDITD",
39
+ 49: "TACACS",
40
+ 50: "RE-MAIL-CK",
41
+ 52: "XNS-TIME",
42
+ 53: "DNS",
43
+ 54: "XNS-CH",
44
+ 55: "ISI-GL",
45
+ 57: "Priv-term",
46
+ 58: "XNS-MAIL",
47
+ 59: "Priv-file",
48
+ 61: "NI-MAIL",
49
+ 62: "ACAS",
50
+ 63: "WHOISPP",
51
+ 64: "COVIA",
52
+ 65: "TACACS-DS",
53
+ 66: "SQL-NET",
54
+ 67: "BOOTPS/DHCP server",
55
+ 68: "BOOTPC/DHCP client",
56
+ 69: "TFTP",
57
+ 70: "Gopher",
58
+ 75: "Priv-dial",
59
+ 76: "DEOS",
60
+ 77: "Priv-RUE",
61
+ 78: "VETTCP",
62
+ 79: "Finger",
63
+ 80: "HTTP",
64
+ 84: "CTF",
65
+ 87: "Priv-term-L",
66
+ 88: "Kerberos",
67
+ 92: "NPP",
68
+ 93: "DCP",
69
+ 97: "SWIFT-RVF",
70
+ 98: "TACNEWS",
71
+ 99: "METAGRAM",
72
+ 101: "HOSTNAMESERVER",
73
+ 102: "ISO-TSAP",
74
+ 103: "GPPITNP",
75
+ 104: "ACR-NEMA",
76
+ 105: "CSO,CSNET-NS",
77
+ 106: "3COM-TSMUX",
78
+ 107: "RTELNET",
79
+ 108: "SNAGAS",
80
+ 109: "POP2",
81
+ 110: "POP3",
82
+ 111: "RPCbind",
83
+ 112: "MCIDAS",
84
+ 113: "ident",
85
+ 115: "SFTP",
86
+ 116: "ANSANOTIFY",
87
+ 117: "UUCP-PATH",
88
+ 118: "SQLServ",
89
+ 119: "NNTP",
90
+ 120: "CFDPTKT",
91
+ 121: "ERPC",
92
+ 122: "SMAKYNET",
93
+ 123: "NTP",
94
+ 135: "MS-Locator",
95
+ 137: "NetBIOS-NS",
96
+ 138: "NetBIOS-DGM",
97
+ 139: "NetBIOS-SSN",
98
+ 143: "IMAP",
99
+ 161: "SNMP",
100
+ 162: "SNMP-trap",
101
+ 179: "BGP",
102
+ 194: "IRC",
103
+ 199: "SMUX",
104
+ 200: "SRC",
105
+ 201: "AppleTalk routing maintenance",
106
+ 220: "IMAP3",
107
+ 311: "ASIP-WEBADMIN",
108
+ 318: "PKIX-TIMESTAMP",
109
+ 321: "PIP",
110
+ 322: "RTSPS",
111
+ 322: "RPKI-RTR",
112
+ 324: "RPKI-RTR-TLS",
113
+ 343: "TEXAR",
114
+ 344: "PDAP",
115
+ 345: "PAWSERV",
116
+ 346: "ZSERV",
117
+ 347: "FATSERV",
118
+ 381: "HP-COLLECTOR",
119
+ 382: "HP-MANAGED-NODE",
120
+ 383: "HP-ALARM-MGR",
121
+ 384: "ARNS",
122
+ 385: "IBM-APP",
123
+ 386: "ASA",
124
+ 387: "AURP",
125
+ 388: "UNIDATA-LDM",
126
+ 389: "LDAP",
127
+ 401: "UPS",
128
+ 413: "SMSP",
129
+ 427: "SVRLOC",
130
+ 443: "HTTPS",
131
+ 444: "SNPP",
132
+ 445: "SMB/MICROSOFT-DS",
133
+ 464: "KPASSWD",
134
+ 465: "URD/IGMPV3LITE/SMTPS",
135
+ 500: "ISAKMP",
136
+ 512: "EXEC/COMSAT/BIFF",
137
+ 513: "LOGIN/WHO",
138
+ 514: "SHELL/SYSLOG",
139
+ 515: "PRINTER",
140
+ 520: "RIP",
141
+ 524: "NCP",
142
+ 530: "COURIER-RPC",
143
+ 540: "UUCP",
144
+ 541: "UUCP-RLOGIN",
145
+ 543: "KLOGIN",
146
+ 544: "KSHELL",
147
+ 546: "DHCPv6 client",
148
+ 547: "DHCPv6 server",
149
+ 551: "CYBERCASH",
150
+ 554: "RTSP",
151
+ 556: "REMOTEFS",
152
+ 587: "Submission",
153
+ 593: "HTTP-RPC-EPMAP",
154
+ 600: "IPCSERVER",
155
+ 601: "SYSLOG-CONN",
156
+ 602: "XMLRPV-BEEP",
157
+ 603: "IDPX",
158
+ 604: "TUNNEL",
159
+ 605: "SOAP-BEEP",
160
+ 606: "URM",
161
+ 607: "NQS",
162
+ 631: "IPP",
163
+ 636: "LDAPS",
164
+ 639: "MSDP",
165
+ 646: "LDP",
166
+ 647: "DHCP-FAILOVER",
167
+ 648: "RRP",
168
+ 654: "AODV",
169
+ 674: "ACAP",
170
+ 691: "MSEXCH-ROUTING",
171
+ 698: "OLSR",
172
+ 700: "EPP",
173
+ 701: "LMP",
174
+ 702: "IRIS-BEEP",
175
+ 704: "ELCSD",
176
+ 705: "AGENTX",
177
+ 706: "SILC",
178
+ 707: "BORLAND-DSJ",
179
+ 709: "ENTRUST-KMSH",
180
+ 710: "ENTRUST-ASH",
181
+ 711: "CISCO-TDP",
182
+ 712: "TBRPF",
183
+ 713: "IRIS-XPC/IRIS-XPCS",
184
+ 715: "IRIS-LWZ",
185
+ 716: "PANA",
186
+ 729: "NETVIEWDM1",
187
+ 730: "NETVIEWDM2",
188
+ 731: "NETVIEWDM3",
189
+ 748: "KERBEROS-ADM/RIS-CM",
190
+ 750: "KERBEROS-IV",
191
+ 753: "RRH",
192
+ 830: "NETCONF-SSH",
193
+ 831: "NETCONF-BEEP",
194
+ 832: "NETCONFSOAPHTTP",
195
+ 833: "NETCONFSOAPBEEP",
196
+ 847: "DHCP-FAILOVER2",
197
+ 848: "GDOI",
198
+ 860: "ISCSI",
199
+ 861: "OWAMP-CONTROL",
200
+ 862: "TWAPM-CONTROL",
201
+ 873: "RSYNC",
202
+ 989: "FTPS-DATA",
203
+ 990: "FTPS",
204
+ 991: "NAS",
205
+ 992: "TELNETS",
206
+ 993: "IMAPS",
207
+ 995: "POP3S",
208
+ 1038: "MTQP",
209
+ 1080: "SOCKS",
210
+ 1194: "OpenVPN",
211
+ 1433: "Microsoft SQL server",
212
+ 1521: "Oracle",
213
+ 1723: "PPTP",
214
+ 2049: "NFS",
215
+ 2222: "SSH",
216
+ 3050: "gds_db-Interbase/Firebird",
217
+ 3074: "Xbox Live",
218
+ 3128: "HTTP",
219
+ 3268: "LDAP",
220
+ 3306: "MySQL",
221
+ 3386: "GTP 3GPP GSM/UMTS CDR logging protocol",
222
+ 3389: "RDP",
223
+ 3455: "RSVP",
224
+ 3632: "Distributed compiler",
225
+ 3689: "DAAP",
226
+ 3702: "WS-Discovery",
227
+ 5060: "SIP",
228
+ 5353: "MDNS",
229
+ 5432: "PostgreSQL",
230
+ 5900: "VNC",
231
+ 8000: "HTTP alternate",
232
+ 8080: "HTTP alternate",
233
+ 8443: "HTTPS alternate",
234
+ 8888: "HTTP alternate",
235
+ 10000: "Webmin",
236
+ }
237
+
238
+
239
+ def is_port_open_threads(host, port):
240
+ with socket.socket(socket.AF_INET, socket.SOCK_STREAM) as s:
241
+ try:
242
+ s.settimeout(1)
243
+ s.connect((host, port))
244
+ except (OSError, socket.timeout):
245
+ try:
246
+ print(f"Closed{colored('|X|','red')}-->{ports.get(port)}|{port}|")
247
+ except:
248
+ print(f"Closed{colored('|X|','red')}-->|{port}|")
249
+ else:
250
+ print(f"Open{colored('|√|','green')}-->{ports.get(port)}|{port}|")
251
+
252
+
253
+ def PoolProcessExecutor(host):
254
+ with ProcessPoolExecutor(max_workers=None) as executor:
255
+ try:
256
+ for port in ports.keys():
257
+ future = executor.submit(is_port_open_threads, host, port)
258
+
259
+ except Exception as e:
260
+ print(e)
@@ -1,6 +1,6 @@
1
1
  """IPv4 address scanner for collecting address information.Scan or get the IPv4 address from the IPv6 host"""
2
2
 
3
- __version__ = "1.7.2"
3
+ __version__ = "1.7.4"
4
4
  import socket
5
5
  from time import sleep
6
6
  from termcolor import colored
@@ -1,109 +0,0 @@
1
- import socket
2
- from termcolor import colored
3
- from concurrent.futures import ProcessPoolExecutor
4
-
5
- ports = {
6
- 7: "Echo",
7
- 9: "Discard",
8
- 11: "Systat",
9
- 13: "Daytime",
10
- 17: "QOTD",
11
- 18: "MSP",
12
- 19: "Chargen",
13
- 20: "FTP-Data",
14
- 21: "FTP-Control",
15
- 22: "SSH",
16
- 23: "Telnet",
17
- 25: "SMTP",
18
- 37: "Time",
19
- 42: "WINS",
20
- 43: "Whois",
21
- 49: "TACACS",
22
- 53: "DNS",
23
- 67: "DHCP server",
24
- 68: "DHCP client",
25
- 69: "TFTP",
26
- 70: "Gopher",
27
- 79: "Finger",
28
- 80: "HTTP",
29
- 88: "Kerberos",
30
- 109: "POP2",
31
- 110: "POP3",
32
- 111: "RPCbind",
33
- 113: "ident",
34
- 115: "SFTP",
35
- 118: "SQLServ",
36
- 119: "NNTP",
37
- 123: "NTP",
38
- 135: "MS-Locator",
39
- 137: "NetBIOS-NS",
40
- 138: "NetBIOS-DGM",
41
- 139: "NetBIOS-SSN",
42
- 143: "IMAP",
43
- 161: "SNMP",
44
- 162: "SNMP-trap",
45
- 179: "BGP",
46
- 194: "IRC",
47
- 201: "AppleTalk routing maintenance",
48
- 220: "IMAP3",
49
- 389: "LDAP",
50
- 443: "HTTPS",
51
- 445: "SMB",
52
- 465: "SMTPS",
53
- 500: "ISAKMP",
54
- 514: "Syslog",
55
- 520: "RIP",
56
- 546: "DHCPv6 client",
57
- 547: "DHCPv6 server",
58
- 587: "Submission",
59
- 631: "IPP",
60
- 636: "LDAPS",
61
- 990: "FTPS",
62
- 993: "IMAPS",
63
- 995: "POP3S",
64
- 1080: "SOCKS",
65
- 1194: "OpenVPN",
66
- 1433: "Microsoft SQL server",
67
- 1521: "Oracle",
68
- 1723: "PPTP",
69
- 2049: "NFS",
70
- 2222: "SSH",
71
- 3128: "HTTP",
72
- 3268: "LDAP",
73
- 3306: "MySQL",
74
- 3389: "RDP",
75
- 5060: "SIP",
76
- 5353: "MDNS",
77
- 5432: "PostgreSQL",
78
- 5900: "VNC",
79
- 8000: "HTTP alternate",
80
- 8080: "HTTP alternate",
81
- 8443: "HTTPS alternate",
82
- 8888: "HTTP alternate",
83
- 10000: "Webmin"
84
- }
85
-
86
-
87
-
88
- def is_port_open_threads(host, port):
89
- with socket.socket(socket.AF_INET, socket.SOCK_STREAM) as s:
90
- try:
91
- s.settimeout(1)
92
- s.connect((host, port))
93
- except (OSError, socket.timeout):
94
- try:
95
- print(f"Closed{colored('|X|','red')}-->{ports.get(port)}|{port}|")
96
- except:
97
- print(f"Closed{colored('|X|','red')}-->|{port}|")
98
- else:
99
- print(f"Open{colored('|√|','green')}-->{ports.get(port)}|{port}|")
100
-
101
-
102
- def PoolProcessExecutor(host):
103
- with ProcessPoolExecutor(max_workers=None) as executor:
104
- try:
105
- for port in ports.keys():
106
- future = executor.submit(is_port_open_threads, host, port)
107
-
108
- except Exception as e:
109
- print(e)
File without changes
File without changes