SnakeScan 1.0.0__tar.gz → 1.1.5__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,16 +1,19 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: SnakeScan
3
- Version: 1.0.0
3
+ Version: 1.1.5
4
4
  Summary: Module SnakeScan
5
5
  Author: Den*Ram
6
6
  Description-Content-Type: text/markdown
7
7
  License-Expression: MIT
8
8
  License-File: LICENSE
9
9
 
10
- =========
11
10
  Description
12
- =========
11
+ -------------------
13
12
  Simple Scanner to scan port.
14
13
  Example:
15
14
  import SnakeScan
16
- and use him you need-python 3.11 and art module.
15
+ and use module to scan port
16
+ if him not run install in pip art,tqdm,termcolor and run
17
+ added new single search enter example:
18
+ [$]Port/Skip--> --s 50
19
+
@@ -0,0 +1,10 @@
1
+ Description
2
+ -------------------
3
+ Simple Scanner to scan port.
4
+ Example:
5
+ import SnakeScan
6
+ and use module to scan port
7
+ if him not run install in pip art,tqdm,termcolor and run
8
+ added new single search enter example:
9
+ [$]Port/Skip--> --s 50
10
+
@@ -1,14 +1,17 @@
1
1
  """Module SnakeScan"""
2
- __version__="1.0.0"
2
+ __version__="1.1.5"
3
3
  import socket
4
4
  from art import tprint
5
5
  from datetime import datetime
6
+ from tqdm import tqdm
7
+ from termcolor import colored
6
8
  portsopen=0
7
9
  portsclosed=0
8
10
  Run_now=True
9
11
  Bool=True
10
12
  boolean=0
11
13
  #PORT-LIST(ALL-PORTS)
14
+ OpenPorts=[]
12
15
  ports = {
13
16
  20: "FTP-DATA", 21: "FTP", 22: "SSH", 23: "Telnet",
14
17
  25: "SMTP", 43: "WHOIS", 53: "DNS", 80: "http",
@@ -33,44 +36,59 @@ def is_port_open(host,port):
33
36
  return True
34
37
  print("–"*60)
35
38
  tprint("SnakeScan")
36
- print(" \033[1;32;1m Made by DEN*RAM\033[0;0m".rjust(50))
37
39
  print("–"*60)
38
- print("V1.0.0".rjust(60))
39
- print("#ToolsforEveryone/SnakeScan.py:")
40
- print("Skip/Error:|Host:localhost Port:4000 ports|")
40
+ print("V1.1.5".rjust(60))
41
+ print(f"Skip{colored('|*|','blue')}Error: Host:localhost{colored('|$|','green')}Port:4000 ports")
41
42
  while Run_now:
42
- host=input("[$]Host/Skip-->")
43
+ host=input(f"{colored('[$]','green')}Host/Skip-->")
43
44
  if host == "Exit" or host == "exit":
44
45
  break
45
46
  if host == "":
47
+ print(f"{colored('|*|','blue')}localhost")
46
48
  host=socket.gethostbyname(socket.gethostname())
47
- port_user=input("[$]Port/Range/Skip-->")
49
+ port_user=input(f"{colored('[$]','green')}Port/Skip-->")
50
+ port_single=port_user
48
51
  if port_user == "Exit" or port_user == "Exit":
49
52
  break
50
53
  if port_user:
51
54
  try:
52
55
  length=int(port_user)
53
56
  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
57
+ if "--s" in str(port_user):
58
+ port_user=int(port_single.strip("--s")[:3])
59
+ length=1
60
+ for single in range(0,length):
61
+ if is_port_open(host,port_user):
62
+ print(f"Open{colored('|√|','green')}-->{ports[port_user]}|{port_user}|")
63
+ else:
64
+ try:
65
+ print(f"Closed{colored('|X|','red')}-->{ports[port_user]}|{port_user}|")
66
+ except:
67
+ print(f"Closed{colored('|X|','red')}-->|{port_user}|")
68
+
69
+ continue
70
+
71
+ else:
72
+ port_user="4000"
73
+ print(f"{colored('[!]','red')}Port:invalid value")
74
+ for i in range(0,len(port_user)):
75
+ if port_user[i] == " ":
76
+ port_user=4000
77
+ break
78
+ port_user=int(port_user)
79
+ length=port_user
61
80
  else:
81
+ print(f"{colored('|*|','blue')}4000")
62
82
  port_user=4000
63
83
  length=port_user
64
- print(f"[!]Listening {host} please wait...")
84
+ print(f"{colored('|!|','red')}Listening {host} please wait...")
65
85
  #|-----------------Starting---------------------|
66
86
  length=int(length)+1
67
- is_port_open(host,port_user)
68
- start=datetime.now()
69
- for port in range(1,length):
87
+ for port in tqdm(range(1,length)):
70
88
  if is_port_open(host,port):
71
89
  for name in ports:
72
90
  if port == name:
73
- print(f"Open:{port}//{ports[name]}")
91
+ OpenPorts=[port]
74
92
  portsopen+=1
75
93
  else:
76
94
  portsclosed+=1
@@ -86,15 +104,11 @@ while Run_now:
86
104
  Bool=False
87
105
  if boolean == 1:
88
106
  pass
107
+ for i in OpenPorts:
108
+ print(f"Open{colored('|√|','green')}-->{ports[i]}|{i}|")
89
109
  print(f"{host}".center(60,"-"))
90
- print(f"Closed:{portsclosed}")
110
+ print(f"Closed{colored('|X|','red')}:{portsclosed}")
91
111
  portsclosed=0
92
- print(f"Open:{portsopen}")
112
+ print(f"Open{colored('|√|','green')}:{portsopen}")
93
113
  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
114
+ print("-"*60)
@@ -1,5 +1,5 @@
1
1
  [build-system]
2
- requires = ["flit_core >=3.11,<4","art"]
2
+ requires = ["flit_core >=3.11,<4","art","tqdm","termcolor"]
3
3
  build-backend = "flit_core.buildapi"
4
4
 
5
5
  [project]
snakescan-1.0.0/README.md DELETED
@@ -1,7 +0,0 @@
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.
File without changes