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.
Files changed (26) hide show
  1. {eva_exploit-3.3.6 → eva_exploit-3.3.7}/PKG-INFO +1 -1
  2. {eva_exploit-3.3.6 → eva_exploit-3.3.7}/config.py +1 -1
  3. {eva_exploit-3.3.6 → eva_exploit-3.3.7}/eva_exploit.egg-info/PKG-INFO +1 -1
  4. {eva_exploit-3.3.6 → eva_exploit-3.3.7}/pyproject.toml +1 -1
  5. {eva_exploit-3.3.6 → eva_exploit-3.3.7}/utils/system.py +86 -9
  6. {eva_exploit-3.3.6 → eva_exploit-3.3.7}/utils/ui.py +12 -0
  7. {eva_exploit-3.3.6 → eva_exploit-3.3.7}/README.md +0 -0
  8. {eva_exploit-3.3.6 → eva_exploit-3.3.7}/eva.py +0 -0
  9. {eva_exploit-3.3.6 → eva_exploit-3.3.7}/eva_exploit.egg-info/SOURCES.txt +0 -0
  10. {eva_exploit-3.3.6 → eva_exploit-3.3.7}/eva_exploit.egg-info/dependency_links.txt +0 -0
  11. {eva_exploit-3.3.6 → eva_exploit-3.3.7}/eva_exploit.egg-info/entry_points.txt +0 -0
  12. {eva_exploit-3.3.6 → eva_exploit-3.3.7}/eva_exploit.egg-info/requires.txt +0 -0
  13. {eva_exploit-3.3.6 → eva_exploit-3.3.7}/eva_exploit.egg-info/top_level.txt +0 -0
  14. {eva_exploit-3.3.6 → eva_exploit-3.3.7}/modules/__init__.py +0 -0
  15. {eva_exploit-3.3.6 → eva_exploit-3.3.7}/modules/attack_map.py +0 -0
  16. {eva_exploit-3.3.6 → eva_exploit-3.3.7}/modules/exploit_search.py +0 -0
  17. {eva_exploit-3.3.6 → eva_exploit-3.3.7}/modules/llm.py +0 -0
  18. {eva_exploit-3.3.6 → eva_exploit-3.3.7}/modules/prompt_builder.py +0 -0
  19. {eva_exploit-3.3.6 → eva_exploit-3.3.7}/modules/reporting.py +0 -0
  20. {eva_exploit-3.3.6 → eva_exploit-3.3.7}/modules/tooling.py +0 -0
  21. {eva_exploit-3.3.6 → eva_exploit-3.3.7}/modules/vuln_intel.py +0 -0
  22. {eva_exploit-3.3.6 → eva_exploit-3.3.7}/modules/workflow.py +0 -0
  23. {eva_exploit-3.3.6 → eva_exploit-3.3.7}/sessions/__init__.py +0 -0
  24. {eva_exploit-3.3.6 → eva_exploit-3.3.7}/sessions/eva_session.py +0 -0
  25. {eva_exploit-3.3.6 → eva_exploit-3.3.7}/setup.cfg +0 -0
  26. {eva_exploit-3.3.6 → eva_exploit-3.3.7}/utils/__init__.py +0 -0
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: eva-exploit
3
- Version: 3.3.6
3
+ Version: 3.3.7
4
4
  Summary: Exploit Vector Agent
5
5
  Author: ARCANGEL0
6
6
  License: MIT
@@ -10,7 +10,7 @@ from pathlib import Path
10
10
 
11
11
  # ================= CONFIG =================
12
12
  APP_NAME = "EVA"
13
- APP_VERSION = "3.3.6"
13
+ APP_VERSION = "3.3.7"
14
14
  GITHUB_REPO = "arcangel0/EVA"
15
15
  PYPI_PACKAGE = "eva-exploit"
16
16
  API_ENDPOINT = "NOT_SET"
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: eva-exploit
3
- Version: 3.3.6
3
+ Version: 3.3.7
4
4
  Summary: Exploit Vector Agent
5
5
  Author: ARCANGEL0
6
6
  License: MIT
@@ -4,7 +4,7 @@ build-backend = "setuptools.build_meta"
4
4
 
5
5
  [project]
6
6
  name = "eva-exploit"
7
- version = "3.3.6"
7
+ version = "3.3.7"
8
8
  description = "Exploit Vector Agent"
9
9
  readme = "README.md"
10
10
  requires-python = ">=3.10"
@@ -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 checkupdts():
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
- socket.create_connection(("pypi.org", 443), timeout=2)
280
- except OSError:
281
- return
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
- latest = fetch_latest_pypi_version()
285
- if not latest:
286
- return
287
- if _is_newer(latest, current):
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 + "|> Update eva to latest version running " + Style.BRIGHT + Fore.YELLOW + "eva -u" + Style.RESET_ALL)
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