SnakeScan 1.2.4__tar.gz → 1.2.5__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.5
|
|
4
4
|
Summary: Module SnakeScan
|
|
5
5
|
Author: Den*Ram
|
|
6
6
|
Description-Content-Type: text/markdown
|
|
@@ -26,5 +26,7 @@ requires-python=>3.9
|
|
|
26
26
|
|
|
27
27
|
added new check all port search:
|
|
28
28
|
[$]Port--> --a
|
|
29
|
+
added new check all port using thread:
|
|
30
|
+
[$]Port--> --t
|
|
29
31
|
|
|
30
32
|
|
|
@@ -1,10 +1,11 @@
|
|
|
1
1
|
"""Module SnakeScan"""
|
|
2
|
-
__version__="1.2.
|
|
2
|
+
__version__="1.2.5"
|
|
3
3
|
import socket
|
|
4
4
|
from art import tprint
|
|
5
5
|
from datetime import datetime
|
|
6
6
|
from tqdm import tqdm
|
|
7
7
|
from termcolor import colored
|
|
8
|
+
from threading import Thread
|
|
8
9
|
portsopen=0
|
|
9
10
|
portsclosed=0
|
|
10
11
|
Run_now=True
|
|
@@ -33,6 +34,22 @@ def is_port_open(host,port):
|
|
|
33
34
|
else:
|
|
34
35
|
s.close()
|
|
35
36
|
return True
|
|
37
|
+
def is_port_open_threads(host,port):
|
|
38
|
+
s=socket.socket(socket.AF_INET,socket.SOCK_STREAM)
|
|
39
|
+
try:
|
|
40
|
+
#Connecting...
|
|
41
|
+
s.connect((host,port))
|
|
42
|
+
#Port//(Closed<--or-->Open)
|
|
43
|
+
except:
|
|
44
|
+
s.close()
|
|
45
|
+
try:
|
|
46
|
+
print(f"Closed{colored('|X|','red')}-->{ports[all]}|{all}|")
|
|
47
|
+
except:
|
|
48
|
+
print(f"Closed{colored('|X|','red')}-->|{all}|")
|
|
49
|
+
else:
|
|
50
|
+
s.close()
|
|
51
|
+
print(f"Open{colored('|√|','green')}-->{ports[all]}|{all}|")
|
|
52
|
+
|
|
36
53
|
print("–"*60)
|
|
37
54
|
tprint("SnakeScan")
|
|
38
55
|
print("–"*60)
|
|
@@ -64,6 +81,12 @@ while Run_now:
|
|
|
64
81
|
try:
|
|
65
82
|
length=int(port_user)
|
|
66
83
|
except:
|
|
84
|
+
if "--t" in str(port_user):
|
|
85
|
+
print(f"Thread".center(60,"-"))
|
|
86
|
+
for all in ports.keys():
|
|
87
|
+
t=Thread(target=is_port_open_threads,kwargs={"host":host,"port":all})
|
|
88
|
+
t.start()
|
|
89
|
+
t.join()
|
|
67
90
|
if "--a" in str(port_user):
|
|
68
91
|
print(f"Check All Ports".center(60,"-"))
|
|
69
92
|
for all in ports.keys():
|
|
@@ -76,7 +99,6 @@ while Run_now:
|
|
|
76
99
|
print(f"Closed{colored('|X|','red')}-->|{all}|")
|
|
77
100
|
continue
|
|
78
101
|
if "--s" in str(port_user):
|
|
79
|
-
print(f"{socket.gethostbyname(socket.gethostname())}-->{host}:")
|
|
80
102
|
port_user=port_single.strip().strip("--s")[1:len(port_user)]
|
|
81
103
|
for i in range(len(port_user)):
|
|
82
104
|
if port_user[i] == " ":
|
|
@@ -98,6 +120,9 @@ while Run_now:
|
|
|
98
120
|
continue
|
|
99
121
|
|
|
100
122
|
else:
|
|
123
|
+
if "--t" in port_user:
|
|
124
|
+
t.join()
|
|
125
|
+
continue
|
|
101
126
|
port_user="100"
|
|
102
127
|
print(f"{colored('[!]','red')}Port:invalid value")
|
|
103
128
|
for i in range(0,len(port_user)):
|
|
File without changes
|
|
File without changes
|