SnakeScan 1.1.5__tar.gz → 1.2.2__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,25 @@
1
+ Metadata-Version: 2.4
2
+ Name: SnakeScan
3
+ Version: 1.2.2
4
+ Summary: Module SnakeScan
5
+ Author: Den*Ram
6
+ Description-Content-Type: text/markdown
7
+ License-Expression: MIT
8
+ License-File: LICENSE
9
+ Requires-Dist: art
10
+ Requires-Dist: tqdm
11
+ Requires-Dist: termcolor
12
+
13
+ Description
14
+ -------------------
15
+ Simple Scanner to scan port.Example:import SnakeScan
16
+ and use module to scan port
17
+ if him not run install in pip art,tqdm,termcolor and run.
18
+ added new single search example:
19
+
20
+ [$]Port--> --s 50
21
+ requires-python=>3.1.1
22
+ added new check all port search:
23
+ [$]Port--> --a
24
+
25
+
@@ -0,0 +1,13 @@
1
+ Description
2
+ -------------------
3
+ Simple Scanner to scan port.Example:import SnakeScan
4
+ and use module to scan port
5
+ if him not run install in pip art,tqdm,termcolor and run.
6
+ added new single search example:
7
+
8
+ [$]Port--> --s 50
9
+ requires-python=>3.1.1
10
+ added new check all port search:
11
+ [$]Port--> --a
12
+
13
+
@@ -1,5 +1,5 @@
1
1
  """Module SnakeScan"""
2
- __version__="1.1.5"
2
+ __version__="1.2.2"
3
3
  import socket
4
4
  from art import tprint
5
5
  from datetime import datetime
@@ -10,7 +10,6 @@ portsclosed=0
10
10
  Run_now=True
11
11
  Bool=True
12
12
  boolean=0
13
- #PORT-LIST(ALL-PORTS)
14
13
  OpenPorts=[]
15
14
  ports = {
16
15
  20: "FTP-DATA", 21: "FTP", 22: "SSH", 23: "Telnet",
@@ -37,16 +36,27 @@ def is_port_open(host,port):
37
36
  print("–"*60)
38
37
  tprint("SnakeScan")
39
38
  print("–"*60)
40
- print("V1.1.5".rjust(60))
41
- print(f"Skip{colored('|*|','blue')}Error: Host:localhost{colored('|$|','green')}Port:4000 ports")
39
+ print(f"{__version__}".rjust(60))
40
+ print(f"Skip{colored('|*|','blue')}Error: {colored('Host','green')}{colored('[X]:Error','red')} {colored('|$|','green')} {colored('Port','green')}{colored('[X]:Error','red')}")
42
41
  while Run_now:
43
- host=input(f"{colored('[$]','green')}Host/Skip-->")
42
+ host=input(f"{colored('[$]','green')}Host-->")
44
43
  if host == "Exit" or host == "exit":
45
44
  break
46
45
  if host == "":
47
- print(f"{colored('|*|','blue')}localhost")
48
- host=socket.gethostbyname(socket.gethostname())
49
- port_user=input(f"{colored('[$]','green')}Port/Skip-->")
46
+ while True:
47
+ print(f"{colored('Host','green')}{colored('[X]:Empty value','red')}")
48
+ host=input(f"{colored('[$]','green')}Host-->")
49
+ if host:
50
+ break
51
+ if host == "localhost":
52
+ host=socket.gethostbyname(socket.gethostname())
53
+ port_user=input(f"{colored('[$]','green')}Port-->")
54
+ if port_user == "":
55
+ while True:
56
+ print(f"{colored('Port','green')}{colored('[X]:Empty value','red')}")
57
+ port_user=input(f"{colored('[$]','green')}Port-->")
58
+ if port_user:
59
+ break
50
60
  port_single=port_user
51
61
  if port_user == "Exit" or port_user == "Exit":
52
62
  break
@@ -54,10 +64,27 @@ while Run_now:
54
64
  try:
55
65
  length=int(port_user)
56
66
  except:
67
+ if "--a" in str(port_user):
68
+ for all in ports.keys():
69
+ if is_port_open(host,all):
70
+ print(f"Open{colored('|√|','green')}-->{ports[all]}|{all}|")
71
+ else:
72
+ try:
73
+ print(f"Closed{colored('|X|','red')}-->{ports[all]}|{all}|")
74
+ except:
75
+ print(f"Closed{colored('|X|','red')}-->|{all}|")
76
+ continue
57
77
  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):
78
+ port_user=port_single.strip().strip("--s")[1:len(port_user)]
79
+ for i in range(len(port_user)):
80
+ if port_user[i] == " ":
81
+ port_user=port_user[0:i]
82
+ break
83
+ try:
84
+ port_user=int(port_user)
85
+ except:
86
+ port_user="None"
87
+ for singel in range(1):
61
88
  if is_port_open(host,port_user):
62
89
  print(f"Open{colored('|√|','green')}-->{ports[port_user]}|{port_user}|")
63
90
  else:
@@ -69,17 +96,17 @@ while Run_now:
69
96
  continue
70
97
 
71
98
  else:
72
- port_user="4000"
99
+ port_user="100"
73
100
  print(f"{colored('[!]','red')}Port:invalid value")
74
101
  for i in range(0,len(port_user)):
75
102
  if port_user[i] == " ":
76
- port_user=4000
103
+ port_user=100
77
104
  break
78
105
  port_user=int(port_user)
79
106
  length=port_user
80
107
  else:
81
- print(f"{colored('|*|','blue')}4000")
82
- port_user=4000
108
+ print(f"{colored('|*|','blue')}100")
109
+ port_user=100
83
110
  length=port_user
84
111
  print(f"{colored('|!|','red')}Listening {host} please wait...")
85
112
  #|-----------------Starting---------------------|
@@ -1,10 +1,15 @@
1
1
  [build-system]
2
- requires = ["flit_core >=3.11,<4","art","tqdm","termcolor"]
2
+ requires = ["flit_core >=3.11,<4"]
3
3
  build-backend = "flit_core.buildapi"
4
4
 
5
5
  [project]
6
6
  name = "SnakeScan"
7
7
  authors = [{name = "Den*Ram"}]
8
+ dependencies = [
9
+ "art",
10
+ "tqdm",
11
+ "termcolor",
12
+ ]
8
13
  readme = "README.md"
9
14
  license = "MIT"
10
15
  license-files = ["LICENSE"]
snakescan-1.1.5/PKG-INFO DELETED
@@ -1,19 +0,0 @@
1
- Metadata-Version: 2.4
2
- Name: SnakeScan
3
- Version: 1.1.5
4
- Summary: Module SnakeScan
5
- Author: Den*Ram
6
- Description-Content-Type: text/markdown
7
- License-Expression: MIT
8
- License-File: LICENSE
9
-
10
- Description
11
- -------------------
12
- Simple Scanner to scan port.
13
- Example:
14
- import SnakeScan
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
-
snakescan-1.1.5/README.md DELETED
@@ -1,10 +0,0 @@
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
-
File without changes