SnakeScan 1.6.6__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.6
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
@@ -17,6 +17,9 @@ Project-URL: Repository, https://github.com/Den-Ram/SnakeScan
17
17
  ![PyPI version](https://badge.fury.io/py/SnakeScan.svg)
18
18
  ![License](https://img.shields.io/badge/License-MIT-blue.svg)
19
19
  ![Requires-python](https://img.shields.io/badge/requires--python-3.7+-red)
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
20
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.
21
24
  # Help with using the library
22
25
  ## If you use the library directly in your code:
@@ -40,26 +43,28 @@ SnakeScan.run()
40
43
  ## Help with attributes
41
44
  ```
42
45
  -P:
43
- snake -p 80,443 **Scanning specific ports**
44
- 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
45
- 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**
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
46
49
  -H:
47
- **Displays a list of attribute usages**
50
+ #Displays a list of attribute usages
48
51
  snake -h
49
52
  snake -help
50
53
  -SP:
51
- -sp:snake -sp **Uses selected pre-selected range and uses for scanning ProcessPoolExecutor**
54
+ -sp:snake -sp #Uses selected pre-selected range and uses for scanning ProcessPoolExecutor
52
55
  -V:
53
- snake -v **Shows the library version**
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
54
59
  -T:
55
- snake -t **Uses streams for port scanning**
60
+ snake -t #Uses streams for port scanning
56
61
  -CH:
57
- snake -ch **Scans the subnet for others IP**
62
+ snake -ch #Scans the subnet for others IP
58
63
  -L:
59
- snake -l **Shows your public internet IP address. Internet connection required for use**
64
+ snake -l #Shows your public internet IP address. Internet connection required for use
60
65
  -I:
61
- snake www.google.com -i **Shows information about the IP address.Can receive information from IPV4 and IPV6**
62
- **You can also use all attributes in place:**
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:
63
68
  ```
64
69
  snake -p 100,200,79-443 www.google.com -i -l -t -ch -sp
65
70
  ```
@@ -2,6 +2,9 @@
2
2
  ![PyPI version](https://badge.fury.io/py/SnakeScan.svg)
3
3
  ![License](https://img.shields.io/badge/License-MIT-blue.svg)
4
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
5
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.
6
9
  # Help with using the library
7
10
  ## If you use the library directly in your code:
@@ -25,26 +28,28 @@ SnakeScan.run()
25
28
  ## Help with attributes
26
29
  ```
27
30
  -P:
28
- snake -p 80,443 **Scanning specific ports**
29
- 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
30
- 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**
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
31
34
  -H:
32
- **Displays a list of attribute usages**
35
+ #Displays a list of attribute usages
33
36
  snake -h
34
37
  snake -help
35
38
  -SP:
36
- -sp:snake -sp **Uses selected pre-selected range and uses for scanning ProcessPoolExecutor**
39
+ -sp:snake -sp #Uses selected pre-selected range and uses for scanning ProcessPoolExecutor
37
40
  -V:
38
- snake -v **Shows the library version**
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
39
44
  -T:
40
- snake -t **Uses streams for port scanning**
45
+ snake -t #Uses streams for port scanning
41
46
  -CH:
42
- snake -ch **Scans the subnet for others IP**
47
+ snake -ch #Scans the subnet for others IP
43
48
  -L:
44
- snake -l **Shows your public internet IP address. Internet connection required for use**
49
+ snake -l #Shows your public internet IP address. Internet connection required for use
45
50
  -I:
46
- snake www.google.com -i **Shows information about the IP address.Can receive information from IPV4 and IPV6**
47
- **You can also use all attributes in place:**
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:
48
53
  ```
49
54
  snake -p 100,200,79-443 www.google.com -i -l -t -ch -sp
50
55
  ```
@@ -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.6"
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")
@@ -326,3 +332,5 @@ if SnakeArgs().version:
326
332
  if SnakeArgs().speed:
327
333
  print(f"ProcessPoolExecutor".center(60, "-"))
328
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.6"
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",
File without changes
File without changes