SnakeScan 1.6.3__tar.gz → 1.6.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.
- {snakescan-1.6.3 → snakescan-1.6.4}/PKG-INFO +25 -8
- {snakescan-1.6.3 → snakescan-1.6.4}/README.md +23 -6
- {snakescan-1.6.3 → snakescan-1.6.4}/SnakeScan/CLI.py +1 -1
- {snakescan-1.6.3 → snakescan-1.6.4}/SnakeScan/__init__.py +34 -20
- {snakescan-1.6.3 → snakescan-1.6.4}/LICENSE +0 -0
- {snakescan-1.6.3 → snakescan-1.6.4}/SnakeScan/Check_subnet.py +0 -0
- {snakescan-1.6.3 → snakescan-1.6.4}/SnakeScan/PoolExecutor.py +0 -0
- {snakescan-1.6.3 → snakescan-1.6.4}/pyproject.toml +0 -0
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: SnakeScan
|
|
3
|
-
Version: 1.6.
|
|
4
|
-
Summary: IPv4 address scanner for collecting address information.Use carefully for your network safety.Use to get IPV4 from IPV6 address.Don't use it to scan IPV6 because it's not designed for it.
|
|
3
|
+
Version: 1.6.4
|
|
4
|
+
Summary: IPv4 address scanner for collecting address information.Use carefully for your network safety.Use to get IPV4 from IPV6 address.Don't use it to scan IPV6 because it's not designed for it. Scan only IPv4 or get the IPv4 address from the IPv6 host
|
|
5
5
|
Author: Den*Ram
|
|
6
6
|
Requires-Python: >=3.7
|
|
7
7
|
Description-Content-Type: text/markdown
|
|
@@ -24,21 +24,29 @@ SnakeScan.run()
|
|
|
24
24
|
## Help
|
|
25
25
|
- -l need internet to view public ip you device
|
|
26
26
|
- -t threading port search
|
|
27
|
+
- -s single search ports
|
|
27
28
|
- -i information about host
|
|
28
29
|
- -help in host /-help port in host
|
|
29
30
|
- -check [host] scan subnet in ip
|
|
30
31
|
- exit in host or port off script
|
|
31
32
|
## Added class Watcher:
|
|
32
33
|
```
|
|
33
|
-
|
|
34
|
-
Watcher(host
|
|
34
|
+
from SnakeScan import Watcher
|
|
35
|
+
Watcher = Watcher(host="localhost",port="80",timeout=1)
|
|
36
|
+
Watcher.start()
|
|
37
|
+
```
|
|
38
|
+
## Watcher commands
|
|
35
39
|
```
|
|
40
|
+
Watcher.start() - Starts checking ports
|
|
41
|
+
Watcher.stop() - Stops port checking
|
|
36
42
|
## Added multiple use Watcher:
|
|
37
43
|
```
|
|
38
44
|
from SnakeScan import Watcher
|
|
39
45
|
ports=[53,80,100,160]
|
|
46
|
+
Watchers=[]
|
|
40
47
|
for i in range(len(ports)):
|
|
41
|
-
Watcher("127.0.0.1",ports[i])
|
|
48
|
+
Watchers.append(Watcher("127.0.0.1",ports[i]))
|
|
49
|
+
Watchers[i].start()
|
|
42
50
|
```
|
|
43
51
|
## Added CLI command line use snake or Snake
|
|
44
52
|
```
|
|
@@ -62,10 +70,19 @@ options:
|
|
|
62
70
|
-ch, --check scan subnet
|
|
63
71
|
-l, --local view you public ip - need internet
|
|
64
72
|
```
|
|
65
|
-
## Attributes
|
|
73
|
+
## Attributes snake-Snake
|
|
74
|
+
```
|
|
75
|
+
-p:snake -p 80,443,3437,20-1000
|
|
76
|
+
-p:[20]-1000 will start from [21]-[1000]
|
|
77
|
+
-h:snake -h [snake usage]
|
|
78
|
+
-sp:snake -sp [use processpoolexecutir to scan host]
|
|
79
|
+
-v:snake -v [Build_version]
|
|
80
|
+
-t:snake -t [use thread pool to scan]
|
|
81
|
+
-ch:snake -ch [scan subnet in host]
|
|
82
|
+
-l:snake -l [view you public ip and to view need on internet]
|
|
83
|
+
-i:snake www.google.com -i [info ip of host]
|
|
84
|
+
All:snake -p 100,200,79-443 www.google.com -i -l -t -ch -sp
|
|
66
85
|
```
|
|
67
|
-
--p:snake -p 80,443,3437,20-1000
|
|
68
|
-
--p:[20]-1000 will start from [21]-[1000]
|
|
69
86
|
## Added Info about ipv6
|
|
70
87
|
```
|
|
71
88
|
snake 2001:db8:: -i or snake [2001:4860:4860::8888] -i
|
|
@@ -9,21 +9,29 @@ SnakeScan.run()
|
|
|
9
9
|
## Help
|
|
10
10
|
- -l need internet to view public ip you device
|
|
11
11
|
- -t threading port search
|
|
12
|
+
- -s single search ports
|
|
12
13
|
- -i information about host
|
|
13
14
|
- -help in host /-help port in host
|
|
14
15
|
- -check [host] scan subnet in ip
|
|
15
16
|
- exit in host or port off script
|
|
16
17
|
## Added class Watcher:
|
|
17
18
|
```
|
|
18
|
-
|
|
19
|
-
Watcher(host
|
|
19
|
+
from SnakeScan import Watcher
|
|
20
|
+
Watcher = Watcher(host="localhost",port="80",timeout=1)
|
|
21
|
+
Watcher.start()
|
|
22
|
+
```
|
|
23
|
+
## Watcher commands
|
|
20
24
|
```
|
|
25
|
+
Watcher.start() - Starts checking ports
|
|
26
|
+
Watcher.stop() - Stops port checking
|
|
21
27
|
## Added multiple use Watcher:
|
|
22
28
|
```
|
|
23
29
|
from SnakeScan import Watcher
|
|
24
30
|
ports=[53,80,100,160]
|
|
31
|
+
Watchers=[]
|
|
25
32
|
for i in range(len(ports)):
|
|
26
|
-
Watcher("127.0.0.1",ports[i])
|
|
33
|
+
Watchers.append(Watcher("127.0.0.1",ports[i]))
|
|
34
|
+
Watchers[i].start()
|
|
27
35
|
```
|
|
28
36
|
## Added CLI command line use snake or Snake
|
|
29
37
|
```
|
|
@@ -47,10 +55,19 @@ options:
|
|
|
47
55
|
-ch, --check scan subnet
|
|
48
56
|
-l, --local view you public ip - need internet
|
|
49
57
|
```
|
|
50
|
-
## Attributes
|
|
58
|
+
## Attributes snake-Snake
|
|
59
|
+
```
|
|
60
|
+
-p:snake -p 80,443,3437,20-1000
|
|
61
|
+
-p:[20]-1000 will start from [21]-[1000]
|
|
62
|
+
-h:snake -h [snake usage]
|
|
63
|
+
-sp:snake -sp [use processpoolexecutir to scan host]
|
|
64
|
+
-v:snake -v [Build_version]
|
|
65
|
+
-t:snake -t [use thread pool to scan]
|
|
66
|
+
-ch:snake -ch [scan subnet in host]
|
|
67
|
+
-l:snake -l [view you public ip and to view need on internet]
|
|
68
|
+
-i:snake www.google.com -i [info ip of host]
|
|
69
|
+
All:snake -p 100,200,79-443 www.google.com -i -l -t -ch -sp
|
|
51
70
|
```
|
|
52
|
-
--p:snake -p 80,443,3437,20-1000
|
|
53
|
-
--p:[20]-1000 will start from [21]-[1000]
|
|
54
71
|
## Added Info about ipv6
|
|
55
72
|
```
|
|
56
73
|
snake 2001:db8:: -i or snake [2001:4860:4860::8888] -i
|
|
@@ -1,9 +1,10 @@
|
|
|
1
|
-
"""IPv4 address scanner for collecting address information.Use carefully for your network safety.Use to get IPV4 from IPV6 address.Don't use it to scan IPV6 because it's not designed for it. """
|
|
1
|
+
"""IPv4 address scanner for collecting address information.Use carefully for your network safety.Use to get IPV4 from IPV6 address.Don't use it to scan IPV6 because it's not designed for it. Scan only IPv4 or get the IPv4 address from the IPv6 host """
|
|
2
2
|
|
|
3
|
-
__version__ = "1.6.
|
|
3
|
+
__version__ = "1.6.4"
|
|
4
4
|
import socket
|
|
5
5
|
import ipaddress
|
|
6
6
|
from art import tprint
|
|
7
|
+
from time import sleep
|
|
7
8
|
from tqdm import tqdm
|
|
8
9
|
from termcolor import colored
|
|
9
10
|
from threading import Thread
|
|
@@ -11,24 +12,37 @@ from SnakeScan.Check_subnet import Check_network
|
|
|
11
12
|
|
|
12
13
|
|
|
13
14
|
class Watcher:
|
|
14
|
-
def __init__(self, host, port_user):
|
|
15
|
-
|
|
16
|
-
self.
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
15
|
+
def __init__(self, host, port_user, timeout = 1):
|
|
16
|
+
#Initialized class and variables host, port, and delay.
|
|
17
|
+
self.host = host #localhost
|
|
18
|
+
self.port_user = port_user #80
|
|
19
|
+
self.timeout = timeout #2 or 2.0
|
|
20
|
+
self.work = False # run value
|
|
21
|
+
def run(self):
|
|
22
|
+
#Basic process of connecting to a host and checking the port
|
|
23
|
+
previous = None
|
|
24
|
+
while self.work:
|
|
25
|
+
try:
|
|
26
|
+
with socket.socket(socket.AF_INET, socket.SOCK_STREAM) as sock:
|
|
27
|
+
connection = sock.connect_ex((self.host, self.port_user))
|
|
28
|
+
if previous != connection:
|
|
29
|
+
if connection == 0:
|
|
30
|
+
print(f"Service is up {self.host}-->|{self.port_user}|")
|
|
31
|
+
else:
|
|
32
|
+
print(f"Service is down {self.host}-->|{self.port_user}|")
|
|
33
|
+
previous = connection
|
|
34
|
+
except Exception as e:
|
|
35
|
+
print(f"Unable to create scanner object:{e}")
|
|
36
|
+
sleep(self.timeout)
|
|
37
|
+
def start(self):
|
|
38
|
+
#Run a port check to see if it is running or offline.
|
|
39
|
+
self.work = True
|
|
40
|
+
self.thread = Thread(target=self.run)
|
|
41
|
+
self.thread.start()
|
|
42
|
+
def stop(self):
|
|
43
|
+
#Stops port checking
|
|
44
|
+
self.work = False
|
|
45
|
+
self.thread.join()
|
|
32
46
|
|
|
33
47
|
|
|
34
48
|
def run():
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|