SnakeScan 1.6.5__tar.gz → 1.6.7__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.6.5
3
+ Version: 1.6.7
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
@@ -14,16 +14,19 @@ Project-URL: Homepage, https://github.com/Den-Ram/SnakeScan
14
14
  Project-URL: Repository, https://github.com/Den-Ram/SnakeScan
15
15
 
16
16
  # SnakeScan
17
- Use to scan Ports and use carefully
18
17
  ![PyPI version](https://badge.fury.io/py/SnakeScan.svg)
19
18
  ![License](https://img.shields.io/badge/License-MIT-blue.svg)
20
19
  ![Requires-python](https://img.shields.io/badge/requires--python-3.7+-red)
21
- This is the final release version, which already has full functionality. Further work will include bug fixes and the creation of more user-friendly documentation for the code and functions. AI was not used in this code.It was used only to gain knowledge on how to implement this. After all, I did not find more convenient libraries for port scanning on the Internet, so the library was created to make scanning easier. If you want, you can improve it at your discretion. Enjoy using it! \|•√•|/
20
+ ![Status](https://img.shields.io/badge/State-In%20development-yellow)
21
+ ![Platforms](https://img.shields.io/badge/Platforms-macOS%20%7C%20Linux%20%7C%20Windows-lightgrey)
22
+ #Description
23
+ Use to scan Ports and use carefully.Use the library in the terminal, because that's what it's focused on. If you don't want to use the terminal, run it in code, but then some new functions won't be present there.You will need to use it differently.
24
+ # Help with using the library
25
+ ## If you use the library directly in your code:
22
26
  ```
23
27
  import SnakeScan
24
28
  SnakeScan.run()
25
29
  ```
26
- ## Help
27
30
  - -l need internet to view public ip you device
28
31
  - -t threading port search
29
32
  - -s single search ports
@@ -31,17 +34,48 @@ SnakeScan.run()
31
34
  - -help in host /-help port in host
32
35
  - -check [host] scan subnet in ip
33
36
  - exit in host or port off script
37
+
38
+ ## Watcher commands
39
+ ```
40
+ Watcher.start() - Starts checking ports
41
+ Watcher.stop() - Stops port checking
42
+ ```
43
+ ## Help with attributes
44
+ ```
45
+ -P:
46
+ snake -p 80,443 #Scanning specific ports
47
+ snake -p 80,3437,8080,20-30,79-443 #Scanning individual ports and ranges. If you use ranges, then one port from the beginning is not be taken into account. For example:80-443 then it will start with 81-443, so you need to enter it from 79-443, then it will be taken into account
48
+ snake -p 80,3437,10-0,20-10,443-79 #You can enter ranges the other way around: 80-443,443-80 but the first value will start one port higher
49
+ -H:
50
+ #Displays a list of attribute usages
51
+ snake -h
52
+ snake -help
53
+ -SP:
54
+ -sp:snake -sp #Uses selected pre-selected range and uses for scanning ProcessPoolExecutor
55
+ -V:
56
+ snake -v #Shows the library version
57
+ -GS:
58
+ snake www.google.com -gs #Get a certificate from the official website. If you don't enter the hostname, you'll get this error [Errno 111] Connection refused
59
+ -T:
60
+ snake -t #Uses streams for port scanning
61
+ -CH:
62
+ snake -ch #Scans the subnet for others IP
63
+ -L:
64
+ snake -l #Shows your public internet IP address. Internet connection required for use
65
+ -I:
66
+ snake www.google.com -i #Shows information about the IP address.Can receive information from IPV4 and IPV6
67
+ #You can also use all attributes in place:
68
+ ```
69
+ snake -p 100,200,79-443 www.google.com -i -l -t -ch -sp
70
+ ```
71
+ # Library changes
72
+
34
73
  ## Added class Watcher:
35
74
  ```
36
75
  from SnakeScan import Watcher
37
76
  Watcher = Watcher(host="localhost",port="80",timeout=1)
38
77
  Watcher.start()
39
78
  ```
40
- ## Watcher commands
41
- ```
42
- Watcher.start() - Starts checking ports
43
- Watcher.stop() - Stops port checking
44
- ```
45
79
  ## Added multiple use Watcher:
46
80
  ```
47
81
  from SnakeScan import Watcher
@@ -51,7 +85,7 @@ SnakeScan.run()
51
85
  Watchers.append(Watcher("127.0.0.1",ports[i]))
52
86
  Watchers[i].start()
53
87
  ```
54
- ## Added CLI command line use snake or Snake
88
+ ## Library added for use in terminal to use enter snake or Snake
55
89
  ```
56
90
  usage: snake [-h] [-sp] [-v] [-i] [-p PORTS] [-t] [-ch]
57
91
  [-l]
@@ -73,19 +107,6 @@ options:
73
107
  -ch, --check scan subnet
74
108
  -l, --local view you public ip - need internet
75
109
  ```
76
- ## Attributes snake-Snake
77
- ```
78
- -p:snake -p 80,443,3437,20-1000,300-400
79
- -p:[20]-1000 will start from [21]-[1000]
80
- -h:snake -h [snake usage]
81
- -sp:snake -sp [use processpoolexecutir to scan host]
82
- -v:snake -v [Build_version]
83
- -t:snake -t [use thread pool to scan]
84
- -ch:snake -ch [scan subnet in host]
85
- -l:snake -l [view you public ip and to view need on internet]
86
- -i:snake www.google.com -i [info ip of host]
87
- All:snake -p 100,200,79-443 www.google.com -i -l -t -ch -sp
88
- ```
89
110
  ## Added Info about ipv6
90
111
  ```
91
112
  snake 2001:db8:: -i or snake [2001:4860:4860::8888] -i
@@ -0,0 +1,98 @@
1
+ # SnakeScan
2
+ ![PyPI version](https://badge.fury.io/py/SnakeScan.svg)
3
+ ![License](https://img.shields.io/badge/License-MIT-blue.svg)
4
+ ![Requires-python](https://img.shields.io/badge/requires--python-3.7+-red)
5
+ ![Status](https://img.shields.io/badge/State-In%20development-yellow)
6
+ ![Platforms](https://img.shields.io/badge/Platforms-macOS%20%7C%20Linux%20%7C%20Windows-lightgrey)
7
+ #Description
8
+ Use to scan Ports and use carefully.Use the library in the terminal, because that's what it's focused on. If you don't want to use the terminal, run it in code, but then some new functions won't be present there.You will need to use it differently.
9
+ # Help with using the library
10
+ ## If you use the library directly in your code:
11
+ ```
12
+ import SnakeScan
13
+ SnakeScan.run()
14
+ ```
15
+ - -l need internet to view public ip you device
16
+ - -t threading port search
17
+ - -s single search ports
18
+ - -i information about host
19
+ - -help in host /-help port in host
20
+ - -check [host] scan subnet in ip
21
+ - exit in host or port off script
22
+
23
+ ## Watcher commands
24
+ ```
25
+ Watcher.start() - Starts checking ports
26
+ Watcher.stop() - Stops port checking
27
+ ```
28
+ ## Help with attributes
29
+ ```
30
+ -P:
31
+ snake -p 80,443 #Scanning specific ports
32
+ snake -p 80,3437,8080,20-30,79-443 #Scanning individual ports and ranges. If you use ranges, then one port from the beginning is not be taken into account. For example:80-443 then it will start with 81-443, so you need to enter it from 79-443, then it will be taken into account
33
+ snake -p 80,3437,10-0,20-10,443-79 #You can enter ranges the other way around: 80-443,443-80 but the first value will start one port higher
34
+ -H:
35
+ #Displays a list of attribute usages
36
+ snake -h
37
+ snake -help
38
+ -SP:
39
+ -sp:snake -sp #Uses selected pre-selected range and uses for scanning ProcessPoolExecutor
40
+ -V:
41
+ snake -v #Shows the library version
42
+ -GS:
43
+ snake www.google.com -gs #Get a certificate from the official website. If you don't enter the hostname, you'll get this error [Errno 111] Connection refused
44
+ -T:
45
+ snake -t #Uses streams for port scanning
46
+ -CH:
47
+ snake -ch #Scans the subnet for others IP
48
+ -L:
49
+ snake -l #Shows your public internet IP address. Internet connection required for use
50
+ -I:
51
+ snake www.google.com -i #Shows information about the IP address.Can receive information from IPV4 and IPV6
52
+ #You can also use all attributes in place:
53
+ ```
54
+ snake -p 100,200,79-443 www.google.com -i -l -t -ch -sp
55
+ ```
56
+ # Library changes
57
+
58
+ ## Added class Watcher:
59
+ ```
60
+ from SnakeScan import Watcher
61
+ Watcher = Watcher(host="localhost",port="80",timeout=1)
62
+ Watcher.start()
63
+ ```
64
+ ## Added multiple use Watcher:
65
+ ```
66
+ from SnakeScan import Watcher
67
+ ports=[53,80,100,160]
68
+ Watchers=[]
69
+ for i in range(len(ports)):
70
+ Watchers.append(Watcher("127.0.0.1",ports[i]))
71
+ Watchers[i].start()
72
+ ```
73
+ ## Library added for use in terminal to use enter snake or Snake
74
+ ```
75
+ usage: snake [-h] [-sp] [-v] [-i] [-p PORTS] [-t] [-ch]
76
+ [-l]
77
+ [host]
78
+
79
+ Snake - It's a command line module SnakeScan. Use him for
80
+ more fast starting
81
+
82
+ positional arguments:
83
+ host
84
+
85
+ options:
86
+ -h, --help show this help message and exit
87
+ -sp, --speed speed scan
88
+ -v, --version version
89
+ -i, --info ip info
90
+ -p, --ports PORTS range ports to scan host
91
+ -t, --thread fast scan
92
+ -ch, --check scan subnet
93
+ -l, --local view you public ip - need internet
94
+ ```
95
+ ## Added Info about ipv6
96
+ ```
97
+ snake 2001:db8:: -i or snake [2001:4860:4860::8888] -i
98
+ ```
@@ -9,6 +9,7 @@ from threading import Thread
9
9
  from tqdm import tqdm
10
10
  from SnakeScan.Check_subnet import Check_network
11
11
  from SnakeScan.PoolExecutor import PoolProcessExecutor
12
+ from SnakeScan.Get_ssl import Get_ssl
12
13
 
13
14
 
14
15
  def main():
@@ -50,6 +51,8 @@ ports = {
50
51
  515: "PRINTER",
51
52
  554: "RTSP",
52
53
  587: "TLS/STARTTLS",
54
+ 636: "LDAPS",
55
+ 990: "FTPS",
53
56
  993: "IMAPS",
54
57
  995: "POP3S",
55
58
  1080: "SOCKS",
@@ -66,7 +69,7 @@ ports = {
66
69
  8080: "Tomcat",
67
70
  10000: "Webmin",
68
71
  }
69
- version = "1.6.5"
72
+ version = "1.6.7"
70
73
 
71
74
 
72
75
  def is_port_open(host, port):
@@ -126,6 +129,9 @@ def SnakeArgs():
126
129
  description="Snake - It's a command line module SnakeScan. Use him for more fast starting"
127
130
  )
128
131
  parser.add_argument("host", nargs="?", default="None")
132
+ parser.add_argument(
133
+ "-gs", "--getssl", action="store_true", help="get official ssl certificate"
134
+ )
129
135
  parser.add_argument("-sp", "--speed", action="store_true", help="speed scan")
130
136
  parser.add_argument("-v", "--version", action="store_true", help="version")
131
137
  parser.add_argument("-i", "--info", action="store_true", help="ip info")
@@ -184,6 +190,11 @@ if SnakeArgs().ports:
184
190
  first = rangeports[::2]
185
191
  second = rangeports[1::2]
186
192
  minimal = min(len(first), len(second))
193
+ for i in range(minimal):
194
+ if int(first[i]) > int(second[i]):
195
+ number = second[i]
196
+ second[i] = first[i]
197
+ first[i] = number
187
198
  for i in range(minimal):
188
199
  for port in tqdm(range(int(first[i]) + 1, int(second[i]) + 1)):
189
200
  if is_port_open(host, port):
@@ -210,6 +221,7 @@ if SnakeArgs().ports:
210
221
  portsopen = 0
211
222
  print("-" * 60)
212
223
  except Exception as e:
224
+ print(e)
213
225
  sys.exit()
214
226
  if SnakeArgs().check:
215
227
  Check_network(host)
@@ -320,3 +332,5 @@ if SnakeArgs().version:
320
332
  if SnakeArgs().speed:
321
333
  print(f"ProcessPoolExecutor".center(60, "-"))
322
334
  PoolProcessExecutor(host)
335
+ if SnakeArgs().getssl:
336
+ Get_ssl(host)
@@ -0,0 +1,17 @@
1
+ import socket
2
+ import ssl
3
+ import sys
4
+
5
+
6
+ def Get_ssl(host, port=443, timeout=2, protocol="HTTP/1.0"):
7
+ try:
8
+ sock = socket.create_connection((host, port), timeout)
9
+ context = ssl.create_default_context()
10
+ ssock = context.wrap_socket(sock, server_hostname=host)
11
+ ssock.sendall(f"GET / {protocol}\r\nHost:{host}\r\n\r\n".encode("utf-8"))
12
+ data = ssock.recv(4096)
13
+ print(data.decode(errors="replace"))
14
+ ssock.close()
15
+ except Exception as e:
16
+ print(e)
17
+ sys.exit()
@@ -1,6 +1,6 @@
1
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.5"
3
+ __version__ = "1.6.7"
4
4
  import socket
5
5
  import ipaddress
6
6
  from art import tprint
@@ -84,6 +84,8 @@ def run():
84
84
  515: "PRINTER",
85
85
  554: "RTSP",
86
86
  587: "TLS/STARTTLS",
87
+ 636: "LDAPS",
88
+ 990: "FTPS",
87
89
  993: "IMAPS",
88
90
  995: "POP3S",
89
91
  1080: "SOCKS",
snakescan-1.6.5/README.md DELETED
@@ -1,77 +0,0 @@
1
- # SnakeScan
2
- Use to scan Ports and use carefully
3
- ![PyPI version](https://badge.fury.io/py/SnakeScan.svg)
4
- ![License](https://img.shields.io/badge/License-MIT-blue.svg)
5
- ![Requires-python](https://img.shields.io/badge/requires--python-3.7+-red)
6
- This is the final release version, which already has full functionality. Further work will include bug fixes and the creation of more user-friendly documentation for the code and functions. AI was not used in this code.It was used only to gain knowledge on how to implement this. After all, I did not find more convenient libraries for port scanning on the Internet, so the library was created to make scanning easier. If you want, you can improve it at your discretion. Enjoy using it! \|•√•|/
7
- ```
8
- import SnakeScan
9
- SnakeScan.run()
10
- ```
11
- ## Help
12
- - -l need internet to view public ip you device
13
- - -t threading port search
14
- - -s single search ports
15
- - -i information about host
16
- - -help in host /-help port in host
17
- - -check [host] scan subnet in ip
18
- - exit in host or port off script
19
- ## Added class Watcher:
20
- ```
21
- from SnakeScan import Watcher
22
- Watcher = Watcher(host="localhost",port="80",timeout=1)
23
- Watcher.start()
24
- ```
25
- ## Watcher commands
26
- ```
27
- Watcher.start() - Starts checking ports
28
- Watcher.stop() - Stops port checking
29
- ```
30
- ## Added multiple use Watcher:
31
- ```
32
- from SnakeScan import Watcher
33
- ports=[53,80,100,160]
34
- Watchers=[]
35
- for i in range(len(ports)):
36
- Watchers.append(Watcher("127.0.0.1",ports[i]))
37
- Watchers[i].start()
38
- ```
39
- ## Added CLI command line use snake or Snake
40
- ```
41
- usage: snake [-h] [-sp] [-v] [-i] [-p PORTS] [-t] [-ch]
42
- [-l]
43
- [host]
44
-
45
- Snake - It's a command line module SnakeScan. Use him for
46
- more fast starting
47
-
48
- positional arguments:
49
- host
50
-
51
- options:
52
- -h, --help show this help message and exit
53
- -sp, --speed speed scan
54
- -v, --version version
55
- -i, --info ip info
56
- -p, --ports PORTS range ports to scan host
57
- -t, --thread fast scan
58
- -ch, --check scan subnet
59
- -l, --local view you public ip - need internet
60
- ```
61
- ## Attributes snake-Snake
62
- ```
63
- -p:snake -p 80,443,3437,20-1000,300-400
64
- -p:[20]-1000 will start from [21]-[1000]
65
- -h:snake -h [snake usage]
66
- -sp:snake -sp [use processpoolexecutir to scan host]
67
- -v:snake -v [Build_version]
68
- -t:snake -t [use thread pool to scan]
69
- -ch:snake -ch [scan subnet in host]
70
- -l:snake -l [view you public ip and to view need on internet]
71
- -i:snake www.google.com -i [info ip of host]
72
- All:snake -p 100,200,79-443 www.google.com -i -l -t -ch -sp
73
- ```
74
- ## Added Info about ipv6
75
- ```
76
- snake 2001:db8:: -i or snake [2001:4860:4860::8888] -i
77
- ```
File without changes
File without changes