SnakeScan 1.2.2__tar.gz → 1.2.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,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: SnakeScan
3
- Version: 1.2.2
3
+ Version: 1.2.5
4
4
  Summary: Module SnakeScan
5
5
  Author: Den*Ram
6
6
  Description-Content-Type: text/markdown
@@ -10,16 +10,23 @@ 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:
18
+
19
+ requires=>tqdm,termcolor,art
20
+
21
+ added new single search:
19
22
 
20
23
  [$]Port--> --s 50
21
- requires-python=>3.1.1
24
+
25
+ requires-python=>3.9
26
+
22
27
  added new check all port search:
23
28
  [$]Port--> --a
29
+ added new check all port using thread:
30
+ [$]Port--> --t
24
31
 
25
32
 
@@ -0,0 +1,20 @@
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
+ added new check all port using thread:
18
+ [$]Port--> --t
19
+
20
+
@@ -1,10 +1,11 @@
1
1
  """Module SnakeScan"""
2
- __version__="1.2.2"
2
+ __version__="1.2.5"
3
3
  import socket
4
4
  from art import tprint
5
5
  from datetime import datetime
6
6
  from tqdm import tqdm
7
7
  from termcolor import colored
8
+ from threading import Thread
8
9
  portsopen=0
9
10
  portsclosed=0
10
11
  Run_now=True
@@ -33,6 +34,22 @@ def is_port_open(host,port):
33
34
  else:
34
35
  s.close()
35
36
  return True
37
+ def is_port_open_threads(host,port):
38
+ s=socket.socket(socket.AF_INET,socket.SOCK_STREAM)
39
+ try:
40
+ #Connecting...
41
+ s.connect((host,port))
42
+ #Port//(Closed<--or-->Open)
43
+ except:
44
+ s.close()
45
+ try:
46
+ print(f"Closed{colored('|X|','red')}-->{ports[all]}|{all}|")
47
+ except:
48
+ print(f"Closed{colored('|X|','red')}-->|{all}|")
49
+ else:
50
+ s.close()
51
+ print(f"Open{colored('|√|','green')}-->{ports[all]}|{all}|")
52
+
36
53
  print("–"*60)
37
54
  tprint("SnakeScan")
38
55
  print("–"*60)
@@ -64,7 +81,14 @@ while Run_now:
64
81
  try:
65
82
  length=int(port_user)
66
83
  except:
84
+ if "--t" in str(port_user):
85
+ print(f"Thread".center(60,"-"))
86
+ for all in ports.keys():
87
+ t=Thread(target=is_port_open_threads,kwargs={"host":host,"port":all})
88
+ t.start()
89
+ t.join()
67
90
  if "--a" in str(port_user):
91
+ print(f"Check All Ports".center(60,"-"))
68
92
  for all in ports.keys():
69
93
  if is_port_open(host,all):
70
94
  print(f"Open{colored('|√|','green')}-->{ports[all]}|{all}|")
@@ -73,7 +97,7 @@ while Run_now:
73
97
  print(f"Closed{colored('|X|','red')}-->{ports[all]}|{all}|")
74
98
  except:
75
99
  print(f"Closed{colored('|X|','red')}-->|{all}|")
76
- continue
100
+ continue
77
101
  if "--s" in str(port_user):
78
102
  port_user=port_single.strip().strip("--s")[1:len(port_user)]
79
103
  for i in range(len(port_user)):
@@ -96,6 +120,9 @@ while Run_now:
96
120
  continue
97
121
 
98
122
  else:
123
+ if "--t" in port_user:
124
+ t.join()
125
+ continue
99
126
  port_user="100"
100
127
  print(f"{colored('[!]','red')}Port:invalid value")
101
128
  for i in range(0,len(port_user)):
snakescan-1.2.2/README.md DELETED
@@ -1,13 +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
-
8
- [$]Port--> --s 50
9
- requires-python=>3.1.1
10
- added new check all port search:
11
- [$]Port--> --a
12
-
13
-
File without changes
File without changes