exploitsynth 0.3.1__tar.gz → 0.3.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.
- {exploitsynth-0.3.1 → exploitsynth-0.3.2}/PKG-INFO +1 -1
- {exploitsynth-0.3.1 → exploitsynth-0.3.2}/exploitsynth/__init__.py +1 -1
- {exploitsynth-0.3.1 → exploitsynth-0.3.2}/exploitsynth/targets.py +17 -2
- {exploitsynth-0.3.1 → exploitsynth-0.3.2}/pyproject.toml +1 -1
- {exploitsynth-0.3.1 → exploitsynth-0.3.2}/.gitignore +0 -0
- {exploitsynth-0.3.1 → exploitsynth-0.3.2}/README.md +0 -0
- {exploitsynth-0.3.1 → exploitsynth-0.3.2}/exploitsynth/__main__.py +0 -0
- {exploitsynth-0.3.1 → exploitsynth-0.3.2}/exploitsynth/cli.py +0 -0
- {exploitsynth-0.3.1 → exploitsynth-0.3.2}/exploitsynth/client.py +0 -0
- {exploitsynth-0.3.1 → exploitsynth-0.3.2}/exploitsynth/config.py +0 -0
- {exploitsynth-0.3.1 → exploitsynth-0.3.2}/exploitsynth/discover.py +0 -0
- {exploitsynth-0.3.1 → exploitsynth-0.3.2}/exploitsynth/live.py +0 -0
- {exploitsynth-0.3.1 → exploitsynth-0.3.2}/exploitsynth/output.py +0 -0
- {exploitsynth-0.3.1 → exploitsynth-0.3.2}/exploitsynth/parsers/__init__.py +0 -0
- {exploitsynth-0.3.1 → exploitsynth-0.3.2}/exploitsynth/parsers/nessus.py +0 -0
- {exploitsynth-0.3.1 → exploitsynth-0.3.2}/exploitsynth/parsers/nmap.py +0 -0
- {exploitsynth-0.3.1 → exploitsynth-0.3.2}/exploitsynth/ports.py +0 -0
- {exploitsynth-0.3.1 → exploitsynth-0.3.2}/exploitsynth/tunnel.py +0 -0
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: exploitsynth
|
|
3
|
-
Version: 0.3.
|
|
3
|
+
Version: 0.3.2
|
|
4
4
|
Summary: ExploitSynth scanner CLI — AI port-identification from your terminal
|
|
5
5
|
Project-URL: Homepage, https://scan.exploitsynth.com
|
|
6
6
|
Project-URL: Documentation, https://scan.exploitsynth.com/docs
|
|
@@ -4,7 +4,8 @@ from __future__ import annotations
|
|
|
4
4
|
|
|
5
5
|
import ipaddress
|
|
6
6
|
import re
|
|
7
|
-
|
|
7
|
+
import socket
|
|
8
|
+
from typing import List, Optional
|
|
8
9
|
|
|
9
10
|
MAX_HOSTS_PER_SCAN = 16
|
|
10
11
|
|
|
@@ -13,6 +14,15 @@ class TargetError(ValueError):
|
|
|
13
14
|
"""Raised when a target string can't be parsed or expands too wide."""
|
|
14
15
|
|
|
15
16
|
|
|
17
|
+
def _resolve_host(host: str) -> Optional[str]:
|
|
18
|
+
"""Resolve a hostname to its first IPv4 (A record), or None if it won't resolve."""
|
|
19
|
+
try:
|
|
20
|
+
infos = socket.getaddrinfo(host, None, socket.AF_INET, socket.SOCK_STREAM)
|
|
21
|
+
except socket.gaierror:
|
|
22
|
+
return None
|
|
23
|
+
return infos[0][4][0] if infos else None
|
|
24
|
+
|
|
25
|
+
|
|
16
26
|
def expand_targets(text: str) -> List[str]:
|
|
17
27
|
"""
|
|
18
28
|
Accept single IPs, CIDR ranges (10.0.0.0/24), and comma/space/newline lists.
|
|
@@ -47,7 +57,12 @@ def expand_targets(text: str) -> List[str]:
|
|
|
47
57
|
try:
|
|
48
58
|
ip = ipaddress.ip_address(token)
|
|
49
59
|
except ValueError:
|
|
50
|
-
|
|
60
|
+
# Not a literal IP — treat as a hostname and resolve it (A record).
|
|
61
|
+
resolved = _resolve_host(token)
|
|
62
|
+
if resolved is None:
|
|
63
|
+
raise TargetError(f"Could not resolve host: {token}")
|
|
64
|
+
add(resolved)
|
|
65
|
+
continue
|
|
51
66
|
if ip.version != 4:
|
|
52
67
|
raise TargetError(f"Only IPv4 is supported: {token}")
|
|
53
68
|
add(token)
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|