SnakeScan 1.0.0__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.
@@ -0,0 +1,21 @@
1
+ The MIT License (MIT)
2
+
3
+ Copyright (c) 2025 Den*Ram
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy
6
+ of this software and associated documentation files (the "Software"), to deal
7
+ in the Software without restriction, including without limitation the rights
8
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
+ copies of the Software, and to permit persons to whom the Software is
10
+ furnished to do so, subject to the following conditions:
11
+
12
+ The above copyright notice and this permission notice shall be included in
13
+ all copies or substantial portions of the Software.
14
+
15
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
21
+ THE SOFTWARE.
@@ -0,0 +1,16 @@
1
+ Metadata-Version: 2.4
2
+ Name: SnakeScan
3
+ Version: 1.0.0
4
+ Summary: Module SnakeScan
5
+ Author: Den*Ram
6
+ Description-Content-Type: text/markdown
7
+ License-Expression: MIT
8
+ License-File: LICENSE
9
+
10
+ =========
11
+ Description
12
+ =========
13
+ Simple Scanner to scan port.
14
+ Example:
15
+ import SnakeScan
16
+ and use him you need-python 3.11 and art module.
@@ -0,0 +1,7 @@
1
+ =========
2
+ Description
3
+ =========
4
+ Simple Scanner to scan port.
5
+ Example:
6
+ import SnakeScan
7
+ and use him you need-python 3.11 and art module.
@@ -0,0 +1,100 @@
1
+ """Module SnakeScan"""
2
+ __version__="1.0.0"
3
+ import socket
4
+ from art import tprint
5
+ from datetime import datetime
6
+ portsopen=0
7
+ portsclosed=0
8
+ Run_now=True
9
+ Bool=True
10
+ boolean=0
11
+ #PORT-LIST(ALL-PORTS)
12
+ ports = {
13
+ 20: "FTP-DATA", 21: "FTP", 22: "SSH", 23: "Telnet",
14
+ 25: "SMTP", 43: "WHOIS", 53: "DNS", 80: "http",
15
+ 115: "SFTP", 123: "NTP", 143: "IMAP", 161: "SNMP",
16
+ 179: "BGP", 443: "HTTPS", 445: "MICROSOFT-DS",
17
+ 514: "SYSLOG", 515: "PRINTER", 993: "IMAPS",
18
+ 995: "POP3S", 1080: "SOCKS", 1194: "OpenVPN",
19
+ 1433: "SQL Server", 1723: "PPTP", 3128: "HTTP",
20
+ 3268: "LDAP", 3306: "MySQL", 3389: "RDP",
21
+ 5432: "PostgreSQL", 5900: "VNC", 8080: "Tomcat", 10000: "Webmin" }
22
+ def is_port_open(host,port):
23
+ s=socket.socket(socket.AF_INET,socket.SOCK_STREAM)
24
+ try:
25
+ #Connecting...
26
+ s.connect((host,port))
27
+ #Port//(Closed<--or-->Open)
28
+ except:
29
+ s.close()
30
+ return False
31
+ else:
32
+ s.close()
33
+ return True
34
+ print("–"*60)
35
+ tprint("SnakeScan")
36
+ print(" \033[1;32;1m Made by DEN*RAM\033[0;0m".rjust(50))
37
+ print("–"*60)
38
+ print("V1.0.0".rjust(60))
39
+ print("#ToolsforEveryone/SnakeScan.py:")
40
+ print("Skip/Error:|Host:localhost Port:4000 ports|")
41
+ while Run_now:
42
+ host=input("[$]Host/Skip-->")
43
+ if host == "Exit" or host == "exit":
44
+ break
45
+ if host == "":
46
+ host=socket.gethostbyname(socket.gethostname())
47
+ port_user=input("[$]Port/Range/Skip-->")
48
+ if port_user == "Exit" or port_user == "Exit":
49
+ break
50
+ if port_user:
51
+ try:
52
+ length=int(port_user)
53
+ except:
54
+ port_user="4000"
55
+ for i in range(0,len(port_user)):
56
+ if port_user[i] == " ":
57
+ port_user=4000
58
+ break
59
+ port_user=int(port_user)
60
+ length=port_user
61
+ else:
62
+ port_user=4000
63
+ length=port_user
64
+ print(f"[!]Listening {host} please wait...")
65
+ #|-----------------Starting---------------------|
66
+ length=int(length)+1
67
+ is_port_open(host,port_user)
68
+ start=datetime.now()
69
+ for port in range(1,length):
70
+ if is_port_open(host,port):
71
+ for name in ports:
72
+ if port == name:
73
+ print(f"Open:{port}//{ports[name]}")
74
+ portsopen+=1
75
+ else:
76
+ portsclosed+=1
77
+ if port_user != "":
78
+ if int(port_user) == port:
79
+ if port_user == "":
80
+ pass
81
+ elif int(port_user) == port:
82
+ if is_port_open(host,port):
83
+ Bool=True
84
+ boolean+=1
85
+ else:
86
+ Bool=False
87
+ if boolean == 1:
88
+ pass
89
+ print(f"{host}".center(60,"-"))
90
+ print(f"Closed:{portsclosed}")
91
+ portsclosed=0
92
+ print(f"Open:{portsopen}")
93
+ portsopen=0
94
+ ends=datetime.now()
95
+ print("Time:{}".format(ends-start)[:12],"\033[0;0m")
96
+ print("-"*60)
97
+ #//////////////////////////////
98
+ #VERSION[1.0.0]
99
+ #/////////////////////////////
100
+ #FOR USE ONLY
@@ -0,0 +1,11 @@
1
+ [build-system]
2
+ requires = ["flit_core >=3.11,<4","art"]
3
+ build-backend = "flit_core.buildapi"
4
+
5
+ [project]
6
+ name = "SnakeScan"
7
+ authors = [{name = "Den*Ram"}]
8
+ readme = "README.md"
9
+ license = "MIT"
10
+ license-files = ["LICENSE"]
11
+ dynamic = ["version", "description"]