SnakeScan 1.2.0__tar.gz → 1.2.2__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.2.
|
|
3
|
+
Version: 1.2.2
|
|
4
4
|
Summary: Module SnakeScan
|
|
5
5
|
Author: Den*Ram
|
|
6
6
|
Description-Content-Type: text/markdown
|
|
@@ -16,6 +16,10 @@ Simple Scanner to scan port.Example:import SnakeScan
|
|
|
16
16
|
and use module to scan port
|
|
17
17
|
if him not run install in pip art,tqdm,termcolor and run.
|
|
18
18
|
added new single search example:
|
|
19
|
-
|
|
19
|
+
|
|
20
|
+
[$]Port--> --s 50
|
|
20
21
|
requires-python=>3.1.1
|
|
22
|
+
added new check all port search:
|
|
23
|
+
[$]Port--> --a
|
|
24
|
+
|
|
21
25
|
|
|
@@ -4,6 +4,10 @@ Simple Scanner to scan port.Example:import SnakeScan
|
|
|
4
4
|
and use module to scan port
|
|
5
5
|
if him not run install in pip art,tqdm,termcolor and run.
|
|
6
6
|
added new single search example:
|
|
7
|
-
|
|
7
|
+
|
|
8
|
+
[$]Port--> --s 50
|
|
8
9
|
requires-python=>3.1.1
|
|
10
|
+
added new check all port search:
|
|
11
|
+
[$]Port--> --a
|
|
12
|
+
|
|
9
13
|
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
"""Module SnakeScan"""
|
|
2
|
-
__version__="1.2.
|
|
2
|
+
__version__="1.2.2"
|
|
3
3
|
import socket
|
|
4
4
|
from art import tprint
|
|
5
5
|
from datetime import datetime
|
|
@@ -37,15 +37,26 @@ print("–"*60)
|
|
|
37
37
|
tprint("SnakeScan")
|
|
38
38
|
print("–"*60)
|
|
39
39
|
print(f"{__version__}".rjust(60))
|
|
40
|
-
print(f"Skip{colored('|*|','blue')}Error: Host:
|
|
40
|
+
print(f"Skip{colored('|*|','blue')}Error: {colored('Host','green')}{colored('[X]:Error','red')} {colored('|$|','green')} {colored('Port','green')}{colored('[X]:Error','red')}")
|
|
41
41
|
while Run_now:
|
|
42
|
-
host=input(f"{colored('[$]','green')}Host
|
|
42
|
+
host=input(f"{colored('[$]','green')}Host-->")
|
|
43
43
|
if host == "Exit" or host == "exit":
|
|
44
44
|
break
|
|
45
45
|
if host == "":
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
46
|
+
while True:
|
|
47
|
+
print(f"{colored('Host','green')}{colored('[X]:Empty value','red')}")
|
|
48
|
+
host=input(f"{colored('[$]','green')}Host-->")
|
|
49
|
+
if host:
|
|
50
|
+
break
|
|
51
|
+
if host == "localhost":
|
|
52
|
+
host=socket.gethostbyname(socket.gethostname())
|
|
53
|
+
port_user=input(f"{colored('[$]','green')}Port-->")
|
|
54
|
+
if port_user == "":
|
|
55
|
+
while True:
|
|
56
|
+
print(f"{colored('Port','green')}{colored('[X]:Empty value','red')}")
|
|
57
|
+
port_user=input(f"{colored('[$]','green')}Port-->")
|
|
58
|
+
if port_user:
|
|
59
|
+
break
|
|
49
60
|
port_single=port_user
|
|
50
61
|
if port_user == "Exit" or port_user == "Exit":
|
|
51
62
|
break
|
|
@@ -53,14 +64,27 @@ while Run_now:
|
|
|
53
64
|
try:
|
|
54
65
|
length=int(port_user)
|
|
55
66
|
except:
|
|
67
|
+
if "--a" in str(port_user):
|
|
68
|
+
for all in ports.keys():
|
|
69
|
+
if is_port_open(host,all):
|
|
70
|
+
print(f"Open{colored('|√|','green')}-->{ports[all]}|{all}|")
|
|
71
|
+
else:
|
|
72
|
+
try:
|
|
73
|
+
print(f"Closed{colored('|X|','red')}-->{ports[all]}|{all}|")
|
|
74
|
+
except:
|
|
75
|
+
print(f"Closed{colored('|X|','red')}-->|{all}|")
|
|
76
|
+
continue
|
|
56
77
|
if "--s" in str(port_user):
|
|
57
78
|
port_user=port_single.strip().strip("--s")[1:len(port_user)]
|
|
58
79
|
for i in range(len(port_user)):
|
|
59
80
|
if port_user[i] == " ":
|
|
60
81
|
port_user=port_user[0:i]
|
|
61
82
|
break
|
|
62
|
-
|
|
63
|
-
|
|
83
|
+
try:
|
|
84
|
+
port_user=int(port_user)
|
|
85
|
+
except:
|
|
86
|
+
port_user="None"
|
|
87
|
+
for singel in range(1):
|
|
64
88
|
if is_port_open(host,port_user):
|
|
65
89
|
print(f"Open{colored('|√|','green')}-->{ports[port_user]}|{port_user}|")
|
|
66
90
|
else:
|
|
@@ -72,17 +96,17 @@ while Run_now:
|
|
|
72
96
|
continue
|
|
73
97
|
|
|
74
98
|
else:
|
|
75
|
-
port_user="
|
|
99
|
+
port_user="100"
|
|
76
100
|
print(f"{colored('[!]','red')}Port:invalid value")
|
|
77
101
|
for i in range(0,len(port_user)):
|
|
78
102
|
if port_user[i] == " ":
|
|
79
|
-
port_user=
|
|
103
|
+
port_user=100
|
|
80
104
|
break
|
|
81
105
|
port_user=int(port_user)
|
|
82
106
|
length=port_user
|
|
83
107
|
else:
|
|
84
|
-
print(f"{colored('|*|','blue')}
|
|
85
|
-
port_user=
|
|
108
|
+
print(f"{colored('|*|','blue')}100")
|
|
109
|
+
port_user=100
|
|
86
110
|
length=port_user
|
|
87
111
|
print(f"{colored('|!|','red')}Listening {host} please wait...")
|
|
88
112
|
#|-----------------Starting---------------------|
|
|
File without changes
|
|
File without changes
|