eva-exploit 3.3.6__tar.gz → 3.3.7__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.
- {eva_exploit-3.3.6 → eva_exploit-3.3.7}/PKG-INFO +1 -1
- {eva_exploit-3.3.6 → eva_exploit-3.3.7}/config.py +1 -1
- {eva_exploit-3.3.6 → eva_exploit-3.3.7}/eva_exploit.egg-info/PKG-INFO +1 -1
- {eva_exploit-3.3.6 → eva_exploit-3.3.7}/pyproject.toml +1 -1
- {eva_exploit-3.3.6 → eva_exploit-3.3.7}/utils/system.py +86 -9
- {eva_exploit-3.3.6 → eva_exploit-3.3.7}/utils/ui.py +12 -0
- {eva_exploit-3.3.6 → eva_exploit-3.3.7}/README.md +0 -0
- {eva_exploit-3.3.6 → eva_exploit-3.3.7}/eva.py +0 -0
- {eva_exploit-3.3.6 → eva_exploit-3.3.7}/eva_exploit.egg-info/SOURCES.txt +0 -0
- {eva_exploit-3.3.6 → eva_exploit-3.3.7}/eva_exploit.egg-info/dependency_links.txt +0 -0
- {eva_exploit-3.3.6 → eva_exploit-3.3.7}/eva_exploit.egg-info/entry_points.txt +0 -0
- {eva_exploit-3.3.6 → eva_exploit-3.3.7}/eva_exploit.egg-info/requires.txt +0 -0
- {eva_exploit-3.3.6 → eva_exploit-3.3.7}/eva_exploit.egg-info/top_level.txt +0 -0
- {eva_exploit-3.3.6 → eva_exploit-3.3.7}/modules/__init__.py +0 -0
- {eva_exploit-3.3.6 → eva_exploit-3.3.7}/modules/attack_map.py +0 -0
- {eva_exploit-3.3.6 → eva_exploit-3.3.7}/modules/exploit_search.py +0 -0
- {eva_exploit-3.3.6 → eva_exploit-3.3.7}/modules/llm.py +0 -0
- {eva_exploit-3.3.6 → eva_exploit-3.3.7}/modules/prompt_builder.py +0 -0
- {eva_exploit-3.3.6 → eva_exploit-3.3.7}/modules/reporting.py +0 -0
- {eva_exploit-3.3.6 → eva_exploit-3.3.7}/modules/tooling.py +0 -0
- {eva_exploit-3.3.6 → eva_exploit-3.3.7}/modules/vuln_intel.py +0 -0
- {eva_exploit-3.3.6 → eva_exploit-3.3.7}/modules/workflow.py +0 -0
- {eva_exploit-3.3.6 → eva_exploit-3.3.7}/sessions/__init__.py +0 -0
- {eva_exploit-3.3.6 → eva_exploit-3.3.7}/sessions/eva_session.py +0 -0
- {eva_exploit-3.3.6 → eva_exploit-3.3.7}/setup.cfg +0 -0
- {eva_exploit-3.3.6 → eva_exploit-3.3.7}/utils/__init__.py +0 -0
|
@@ -30,6 +30,7 @@ from config import (
|
|
|
30
30
|
CONFIG_DIR,
|
|
31
31
|
CUSTOM_API_HANDLER,
|
|
32
32
|
GEMINI_API_KEY,
|
|
33
|
+
GITHUB_REPO,
|
|
33
34
|
OLLAMA_MODEL,
|
|
34
35
|
OPENAI_API_KEY,
|
|
35
36
|
PYPI_PACKAGE,
|
|
@@ -247,6 +248,41 @@ def _is_newer(latest, current):
|
|
|
247
248
|
return _split_version(latest) > _split_version(current)
|
|
248
249
|
|
|
249
250
|
|
|
251
|
+
_UPDATE_STATUS_CACHE = None
|
|
252
|
+
|
|
253
|
+
|
|
254
|
+
def _git_branch():
|
|
255
|
+
if not Path(".git").exists():
|
|
256
|
+
return "main"
|
|
257
|
+
branch_detect = subprocess.run(
|
|
258
|
+
["git", "rev-parse", "--abbrev-ref", "HEAD"],
|
|
259
|
+
capture_output=True,
|
|
260
|
+
text=True
|
|
261
|
+
)
|
|
262
|
+
if branch_detect.returncode == 0 and branch_detect.stdout.strip():
|
|
263
|
+
return branch_detect.stdout.strip()
|
|
264
|
+
return "main"
|
|
265
|
+
|
|
266
|
+
|
|
267
|
+
def _update_source():
|
|
268
|
+
if Path(".git").exists():
|
|
269
|
+
return "github"
|
|
270
|
+
try:
|
|
271
|
+
metadata.version(PYPI_PACKAGE)
|
|
272
|
+
return "pypi"
|
|
273
|
+
except metadata.PackageNotFoundError:
|
|
274
|
+
return "github"
|
|
275
|
+
|
|
276
|
+
|
|
277
|
+
def _can_reach_tls_host(host):
|
|
278
|
+
try:
|
|
279
|
+
sock = socket.create_connection((host, 443), timeout=2)
|
|
280
|
+
sock.close()
|
|
281
|
+
return True
|
|
282
|
+
except OSError:
|
|
283
|
+
return False
|
|
284
|
+
|
|
285
|
+
|
|
250
286
|
def get_current_version():
|
|
251
287
|
try:
|
|
252
288
|
return metadata.version(PYPI_PACKAGE)
|
|
@@ -274,20 +310,61 @@ def fetch_latest_pypi_version():
|
|
|
274
310
|
return None
|
|
275
311
|
|
|
276
312
|
|
|
277
|
-
def
|
|
313
|
+
def fetch_latest_github_version(branch=None):
|
|
314
|
+
target_branch = branch or _git_branch()
|
|
315
|
+
url = f"https://raw.githubusercontent.com/{GITHUB_REPO}/{target_branch}/config.py"
|
|
316
|
+
req = request.Request(url, headers={"Accept": "text/plain", "User-Agent": "eva-update-check"})
|
|
278
317
|
try:
|
|
279
|
-
|
|
280
|
-
|
|
281
|
-
|
|
318
|
+
with request.urlopen(req, timeout=5) as response:
|
|
319
|
+
raw = response.read().decode("utf-8", errors="ignore")
|
|
320
|
+
except (error.URLError, TimeoutError):
|
|
321
|
+
return None
|
|
322
|
+
match = re.search(r'^APP_VERSION\s*=\s*["\']([^"\']+)["\']', raw, flags=re.MULTILINE)
|
|
323
|
+
if not match:
|
|
324
|
+
return None
|
|
325
|
+
return match.group(1).strip()
|
|
326
|
+
|
|
327
|
+
|
|
328
|
+
def get_update_status(force=False):
|
|
329
|
+
global _UPDATE_STATUS_CACHE
|
|
330
|
+
if _UPDATE_STATUS_CACHE is not None and not force:
|
|
331
|
+
return _UPDATE_STATUS_CACHE
|
|
282
332
|
|
|
283
333
|
current = get_current_version()
|
|
284
|
-
|
|
285
|
-
if
|
|
286
|
-
|
|
287
|
-
|
|
334
|
+
source = _update_source()
|
|
335
|
+
branch = _git_branch() if source == "github" else None
|
|
336
|
+
if source == "github" and _can_reach_tls_host("raw.githubusercontent.com"):
|
|
337
|
+
latest = fetch_latest_github_version(branch)
|
|
338
|
+
elif source == "pypi" and _can_reach_tls_host("pypi.org"):
|
|
339
|
+
latest = fetch_latest_pypi_version()
|
|
340
|
+
else:
|
|
341
|
+
latest = None
|
|
342
|
+
available = bool(latest) and _is_newer(latest, current)
|
|
343
|
+
|
|
344
|
+
command = f"git pull --tags origin {branch}" if source == "github" else "eva -u"
|
|
345
|
+
prefix = "|> Update github checkout running " if source == "github" else "|> Update eva to latest version running "
|
|
346
|
+
|
|
347
|
+
_UPDATE_STATUS_CACHE = {
|
|
348
|
+
"available": available,
|
|
349
|
+
"current": current,
|
|
350
|
+
"latest": latest,
|
|
351
|
+
"source": source,
|
|
352
|
+
"command": command,
|
|
353
|
+
"hint_prefix": prefix,
|
|
354
|
+
}
|
|
355
|
+
return _UPDATE_STATUS_CACHE
|
|
356
|
+
|
|
357
|
+
|
|
358
|
+
def checkupdts():
|
|
359
|
+
status = get_update_status()
|
|
360
|
+
if status.get("available"):
|
|
361
|
+
current = status.get("current")
|
|
362
|
+
latest = status.get("latest")
|
|
363
|
+
hint_prefix = status.get("hint_prefix")
|
|
364
|
+
command = status.get("command")
|
|
288
365
|
print("\n" + Fore.CYAN + "." * 40)
|
|
289
366
|
print(Fore.CYAN + f"[!] U P D A T E A V A I L A B L E: {current} → {latest}")
|
|
290
|
-
print(Fore.GREEN +
|
|
367
|
+
print(Fore.GREEN + hint_prefix + Style.BRIGHT + Fore.YELLOW + command + Style.RESET_ALL)
|
|
291
368
|
print("." * 40 + Fore.CYAN + "\n")
|
|
292
369
|
|
|
293
370
|
|
|
@@ -113,6 +113,18 @@ def banner(version=None):
|
|
|
113
113
|
║ ᴍᴀᴅᴇ ʙʏ: 𝝺𝗿𝗰𝗮𝗻𝗴𝗲𝗹𝗼 ║
|
|
114
114
|
╚═════════════════════════════════════════════╝
|
|
115
115
|
{Style.BRIGHT} {Fore.MAGENTA} version: {version} {Style.RESET_ALL} """)
|
|
116
|
+
try:
|
|
117
|
+
from utils.system import get_update_status
|
|
118
|
+
status = get_update_status()
|
|
119
|
+
except Exception:
|
|
120
|
+
status = None
|
|
121
|
+
|
|
122
|
+
if status and status.get("available"):
|
|
123
|
+
current = status.get("current")
|
|
124
|
+
latest = status.get("latest")
|
|
125
|
+
hint_prefix = status.get("hint_prefix", "|> Update eva to latest version running ")
|
|
126
|
+
command = status.get("command", "eva -u")
|
|
127
|
+
print(Fore.CYAN + f"[!] U P D A T E A V A I L A B L E: {current} → {latest}")
|
|
116
128
|
|
|
117
129
|
|
|
118
130
|
# ╔═════════░░░═════════╗
|
|
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
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|