SnakeScan 1.4.9__tar.gz → 1.5.1__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.4.9
3
+ Version: 1.5.1
4
4
  Summary: Module SnakeScan using to scan port or ports in you device or other devices
5
5
  Author: Den*Ram
6
6
  Description-Content-Type: text/markdown
@@ -34,14 +34,17 @@ SnakeScan.run()
34
34
  for SnakeScan import Watcher
35
35
  Watcher(host:str,port:int)
36
36
  ```
37
+ ##Changelog
38
+ **v1.5.1**
39
+ fixed dos and --t mode
37
40
  ## Added more imformation about host:
38
41
  ```
39
- [$]Host-->www.example.com --i
40
- ------------------------------------------------------------Type IP: <class 'ipaddress.IPv4Address'>
41
- Version IP: 4
42
- Network: 2.21.240.0/24
43
- Subnet mask: 255.255.255.0
44
- Host:a2-21-240-137.deploy.static.akamaitechnologies.com
45
- IP:2.21.240.137
46
- ------------------------------------------------------------
47
- ```
42
+ [$]Host-->www.example.com --i
43
+ Type IP: <class 'ipaddress.IPv4Address'>
44
+ Version IP: 4
45
+ Network: 2.21.240.0/24
46
+ Subnet mask: 255.255.255.0
47
+ Host:a2-21-240-137.deploy.static
48
+ akamaitechnologies.com
49
+ IP:2.21.240.137
50
+ ```
@@ -20,14 +20,17 @@ SnakeScan.run()
20
20
  for SnakeScan import Watcher
21
21
  Watcher(host:str,port:int)
22
22
  ```
23
+ ##Changelog
24
+ **v1.5.1**
25
+ fixed dos and --t mode
23
26
  ## Added more imformation about host:
24
27
  ```
25
- [$]Host-->www.example.com --i
26
- ------------------------------------------------------------Type IP: <class 'ipaddress.IPv4Address'>
27
- Version IP: 4
28
- Network: 2.21.240.0/24
29
- Subnet mask: 255.255.255.0
30
- Host:a2-21-240-137.deploy.static.akamaitechnologies.com
31
- IP:2.21.240.137
32
- ------------------------------------------------------------
33
- ```
28
+ [$]Host-->www.example.com --i
29
+ Type IP: <class 'ipaddress.IPv4Address'>
30
+ Version IP: 4
31
+ Network: 2.21.240.0/24
32
+ Subnet mask: 255.255.255.0
33
+ Host:a2-21-240-137.deploy.static
34
+ akamaitechnologies.com
35
+ IP:2.21.240.137
36
+ ```
@@ -1,5 +1,5 @@
1
1
  """Module SnakeScan using to scan port or ports in you device or other devices"""
2
- __version__="1.4.9"
2
+ __version__="1.5.1"
3
3
  import socket
4
4
  import ipaddress
5
5
  from art import tprint
@@ -7,9 +7,8 @@ from datetime import datetime
7
7
  from tqdm import tqdm
8
8
  from termcolor import colored
9
9
  from threading import Thread, Timer
10
-
10
+ import time
11
11
  next = None
12
-
13
12
  class Watcher():
14
13
  def __init__(self,host,port_user,sleep=0.5):
15
14
  self.host=host
@@ -35,6 +34,7 @@ def run():
35
34
  num=0
36
35
  boolean=0
37
36
  OpenPorts=[]
37
+ threading=[]
38
38
  ports = {
39
39
  20: "FTP-DATA", 21: "FTP", 22: "SSH", 23: "Telnet",
40
40
  25: "SMTP", 43: "WHOIS", 53: "DNS", 67:"DHCP", 68:"DHCP", 69:"TFTP", 80: "http", 110:"POP3",
@@ -48,9 +48,8 @@ def run():
48
48
  def is_port_open(host,port):
49
49
  s=socket.socket(socket.AF_INET,socket.SOCK_STREAM)
50
50
  try:
51
- #Connecting...
51
+ s.settimeout(1)
52
52
  s.connect((host,port))
53
- #Port//(Closed<--or-->Open)
54
53
  except:
55
54
  s.close()
56
55
  return False
@@ -73,9 +72,8 @@ def run():
73
72
  def is_port_open_threads(host,port):
74
73
  s=socket.socket(socket.AF_INET,socket.SOCK_STREAM)
75
74
  try:
76
- #Connecting...
75
+ s.settimeout(1)
77
76
  s.connect((host,port))
78
- #Port//(Closed<--or-->Open)
79
77
  except:
80
78
  s.close()
81
79
  try:
@@ -205,11 +203,10 @@ def run():
205
203
  num+=1
206
204
  t=Thread(target=dos_threads,kwargs={"host":host,"port":dos_port,"fake_ip":fake_ip})
207
205
  t.start()
208
- t.join()
209
206
  if dos_threads(host,dos_port,fake_ip):
210
207
  print("Dos-Information".center(60,"-"))
211
208
  print(f"{colored('[$]','green')}Threads--> {num} GET/HTTP/1.1")
212
-
209
+ num=0
213
210
  else:
214
211
  try:
215
212
  s=socket.socket(socket.AF_INET,socket.SOCK_STREAM)
@@ -258,7 +255,7 @@ def run():
258
255
  for all in ports.keys():
259
256
  t=Thread(target=is_port_open_threads,kwargs={"host":host,"port":all})
260
257
  t.start()
261
- t.join()
258
+ time.sleep(2)
262
259
  if "--s" in str(port_user):
263
260
  port_user=port_single.strip("--s")
264
261
  port_user=port_user.split()
@@ -283,7 +280,6 @@ def run():
283
280
 
284
281
  else:
285
282
  if "--t" in port_user:
286
- t.join()
287
283
  continue
288
284
  port_user="100"
289
285
  print(f"{colored('[!]','red')}Port:invalid value")
@@ -327,4 +323,5 @@ def run():
327
323
  portsclosed=0
328
324
  print(f"Open{colored('|√|','green')}:{portsopen}")
329
325
  portsopen=0
330
- print("-"*60)
326
+ print("-"*60)
327
+ run()
@@ -17,4 +17,6 @@ dependencies = [
17
17
  ]
18
18
  [project.urls]
19
19
  Homepage = "https://github.com/Den-Ram/SnakeScan"
20
- Repository = "https://github.com/Den-Ram/SnakeScan"
20
+ Repository = "https://github.com/Den-Ram/SnakeScan"
21
+ [project.scripts]
22
+ SnakeScan = "SnakeScan:run"
File without changes