SnakeScan 1.2.0__tar.gz → 1.2.4__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.2.0
3
+ Version: 1.2.4
4
4
  Summary: Module SnakeScan
5
5
  Author: Den*Ram
6
6
  Description-Content-Type: text/markdown
@@ -10,12 +10,21 @@ Requires-Dist: art
10
10
  Requires-Dist: tqdm
11
11
  Requires-Dist: termcolor
12
12
 
13
- Description
14
- -------------------
15
- Simple Scanner to scan port.Example:import SnakeScan
13
+ Scanner to scan port
14
+
15
+ import SnakeScan
16
+
16
17
  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
- [$]Port/Skip--> --s 50
20
- requires-python=>3.1.1
18
+
19
+ requires=>tqdm,termcolor,art
20
+
21
+ added new single search:
22
+
23
+ [$]Port--> --s 50
24
+
25
+ requires-python=>3.9
26
+
27
+ added new check all port search:
28
+ [$]Port--> --a
29
+
21
30
 
@@ -0,0 +1,18 @@
1
+ Scanner to scan port
2
+
3
+ import SnakeScan
4
+
5
+ and use module to scan port
6
+
7
+ requires=>tqdm,termcolor,art
8
+
9
+ added new single search:
10
+
11
+ [$]Port--> --s 50
12
+
13
+ requires-python=>3.9
14
+
15
+ added new check all port search:
16
+ [$]Port--> --a
17
+
18
+
@@ -1,5 +1,5 @@
1
1
  """Module SnakeScan"""
2
- __version__="1.2.0"
2
+ __version__="1.2.4"
3
3
  import socket
4
4
  from art import tprint
5
5
  from datetime import datetime
@@ -37,15 +37,26 @@ print("–"*60)
37
37
  tprint("SnakeScan")
38
38
  print("–"*60)
39
39
  print(f"{__version__}".rjust(60))
40
- print(f"Skip{colored('|*|','blue')}Error: Host:localhost{colored('|$|','green')}Port:4000 ports")
40
+ print(f"Skip{colored('|*|','blue')}Error: {colored('Host','green')}{colored('[X]:Error','red')} {colored('|$|','green')} {colored('Port','green')}{colored('[X]:Error','red')}")
41
41
  while Run_now:
42
- host=input(f"{colored('[$]','green')}Host/Skip-->")
42
+ host=input(f"{colored('[$]','green')}Host-->")
43
43
  if host == "Exit" or host == "exit":
44
44
  break
45
45
  if host == "":
46
- print(f"{colored('|*|','blue')}localhost")
47
- host=socket.gethostbyname(socket.gethostname())
48
- 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
49
60
  port_single=port_user
50
61
  if port_user == "Exit" or port_user == "Exit":
51
62
  break
@@ -53,14 +64,29 @@ while Run_now:
53
64
  try:
54
65
  length=int(port_user)
55
66
  except:
67
+ if "--a" in str(port_user):
68
+ print(f"Check All Ports".center(60,"-"))
69
+ for all in ports.keys():
70
+ if is_port_open(host,all):
71
+ print(f"Open{colored('|√|','green')}-->{ports[all]}|{all}|")
72
+ else:
73
+ try:
74
+ print(f"Closed{colored('|X|','red')}-->{ports[all]}|{all}|")
75
+ except:
76
+ print(f"Closed{colored('|X|','red')}-->|{all}|")
77
+ continue
56
78
  if "--s" in str(port_user):
79
+ print(f"{socket.gethostbyname(socket.gethostname())}-->{host}:")
57
80
  port_user=port_single.strip().strip("--s")[1:len(port_user)]
58
81
  for i in range(len(port_user)):
59
82
  if port_user[i] == " ":
60
83
  port_user=port_user[0:i]
61
84
  break
62
- port_user=int(port_user)
63
- for single in range(1):
85
+ try:
86
+ port_user=int(port_user)
87
+ except:
88
+ port_user="None"
89
+ for singel in range(1):
64
90
  if is_port_open(host,port_user):
65
91
  print(f"Open{colored('|√|','green')}-->{ports[port_user]}|{port_user}|")
66
92
  else:
@@ -72,17 +98,17 @@ while Run_now:
72
98
  continue
73
99
 
74
100
  else:
75
- port_user="4000"
101
+ port_user="100"
76
102
  print(f"{colored('[!]','red')}Port:invalid value")
77
103
  for i in range(0,len(port_user)):
78
104
  if port_user[i] == " ":
79
- port_user=4000
105
+ port_user=100
80
106
  break
81
107
  port_user=int(port_user)
82
108
  length=port_user
83
109
  else:
84
- print(f"{colored('|*|','blue')}4000")
85
- port_user=4000
110
+ print(f"{colored('|*|','blue')}100")
111
+ port_user=100
86
112
  length=port_user
87
113
  print(f"{colored('|!|','red')}Listening {host} please wait...")
88
114
  #|-----------------Starting---------------------|
snakescan-1.2.0/README.md DELETED
@@ -1,9 +0,0 @@
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
- [$]Port/Skip--> --s 50
8
- requires-python=>3.1.1
9
-
File without changes
File without changes