SnakeScan 1.5.0__tar.gz → 1.5.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.
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: SnakeScan
3
- Version: 1.5.0
3
+ Version: 1.5.2
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
@@ -21,27 +21,9 @@ import SnakeScan
21
21
  SnakeScan.run()
22
22
  ```
23
23
  ## Help
24
-
25
24
  - --l need internet to view public ip you device
26
25
  - --t threading port search
27
26
  - --d dos
28
27
  - --s single port search
29
28
  - --i information about host
30
29
  - --h in host /--h port in host
31
-
32
- ## Added class Watcher:
33
- ```
34
- for SnakeScan import Watcher
35
- Watcher(host:str,port:int)
36
- ```
37
- ## Added more imformation about host:
38
- ```
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
45
- akamaitechnologies.com
46
- IP:2.21.240.137
47
- ```
@@ -0,0 +1,15 @@
1
+ # SnakeScan
2
+ ![PyPI version](https://badge.fury.io/py/SnakeScan.svg)
3
+ ![Requires-python](https://img.shields.io/badge/requires--python-3.6+-red)
4
+ ![License](https://img.shields.io/badge/License-MIT-blue.svg)
5
+ ```
6
+ import SnakeScan
7
+ SnakeScan.run()
8
+ ```
9
+ ## Help
10
+ - --l need internet to view public ip you device
11
+ - --t threading port search
12
+ - --d dos
13
+ - --s single port search
14
+ - --i information about host
15
+ - --h in host /--h port in host
@@ -1,5 +1,5 @@
1
1
  """Module SnakeScan using to scan port or ports in you device or other devices"""
2
- __version__="1.5.0"
2
+ __version__="1.5.2"
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,4 @@ def run():
327
323
  portsclosed=0
328
324
  print(f"Open{colored('|√|','green')}:{portsopen}")
329
325
  portsopen=0
330
- print("-"*60)
326
+ print("-"*60)
@@ -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"
snakescan-1.5.0/README.md DELETED
@@ -1,33 +0,0 @@
1
- # SnakeScan
2
- ![PyPI version](https://badge.fury.io/py/SnakeScan.svg)
3
- ![Requires-python](https://img.shields.io/badge/requires--python-3.6+-red)
4
- ![License](https://img.shields.io/badge/License-MIT-blue.svg)
5
- ```
6
- import SnakeScan
7
- SnakeScan.run()
8
- ```
9
- ## Help
10
-
11
- - --l need internet to view public ip you device
12
- - --t threading port search
13
- - --d dos
14
- - --s single port search
15
- - --i information about host
16
- - --h in host /--h port in host
17
-
18
- ## Added class Watcher:
19
- ```
20
- for SnakeScan import Watcher
21
- Watcher(host:str,port:int)
22
- ```
23
- ## Added more imformation about host:
24
- ```
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
31
- akamaitechnologies.com
32
- IP:2.21.240.137
33
- ```
File without changes