eva-exploit 3.3.4__tar.gz → 3.3.6__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.4 → eva_exploit-3.3.6}/PKG-INFO +1 -1
  2. {eva_exploit-3.3.4 → eva_exploit-3.3.6}/config.py +1 -1
  3. {eva_exploit-3.3.4 → eva_exploit-3.3.6}/eva_exploit.egg-info/PKG-INFO +1 -1
  4. {eva_exploit-3.3.4 → eva_exploit-3.3.6}/modules/llm.py +43 -93
  5. {eva_exploit-3.3.4 → eva_exploit-3.3.6}/pyproject.toml +1 -1
  6. {eva_exploit-3.3.4 → eva_exploit-3.3.6}/utils/system.py +1 -1
  7. {eva_exploit-3.3.4 → eva_exploit-3.3.6}/README.md +0 -0
  8. {eva_exploit-3.3.4 → eva_exploit-3.3.6}/eva.py +0 -0
  9. {eva_exploit-3.3.4 → eva_exploit-3.3.6}/eva_exploit.egg-info/SOURCES.txt +0 -0
  10. {eva_exploit-3.3.4 → eva_exploit-3.3.6}/eva_exploit.egg-info/dependency_links.txt +0 -0
  11. {eva_exploit-3.3.4 → eva_exploit-3.3.6}/eva_exploit.egg-info/entry_points.txt +0 -0
  12. {eva_exploit-3.3.4 → eva_exploit-3.3.6}/eva_exploit.egg-info/requires.txt +0 -0
  13. {eva_exploit-3.3.4 → eva_exploit-3.3.6}/eva_exploit.egg-info/top_level.txt +0 -0
  14. {eva_exploit-3.3.4 → eva_exploit-3.3.6}/modules/__init__.py +0 -0
  15. {eva_exploit-3.3.4 → eva_exploit-3.3.6}/modules/attack_map.py +0 -0
  16. {eva_exploit-3.3.4 → eva_exploit-3.3.6}/modules/exploit_search.py +0 -0
  17. {eva_exploit-3.3.4 → eva_exploit-3.3.6}/modules/prompt_builder.py +0 -0
  18. {eva_exploit-3.3.4 → eva_exploit-3.3.6}/modules/reporting.py +0 -0
  19. {eva_exploit-3.3.4 → eva_exploit-3.3.6}/modules/tooling.py +0 -0
  20. {eva_exploit-3.3.4 → eva_exploit-3.3.6}/modules/vuln_intel.py +0 -0
  21. {eva_exploit-3.3.4 → eva_exploit-3.3.6}/modules/workflow.py +0 -0
  22. {eva_exploit-3.3.4 → eva_exploit-3.3.6}/sessions/__init__.py +0 -0
  23. {eva_exploit-3.3.4 → eva_exploit-3.3.6}/sessions/eva_session.py +0 -0
  24. {eva_exploit-3.3.4 → eva_exploit-3.3.6}/setup.cfg +0 -0
  25. {eva_exploit-3.3.4 → eva_exploit-3.3.6}/utils/__init__.py +0 -0
  26. {eva_exploit-3.3.4 → eva_exploit-3.3.6}/utils/ui.py +0 -0
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: eva-exploit
3
- Version: 3.3.4
3
+ Version: 3.3.6
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.4"
13
+ APP_VERSION = "3.3.6"
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.4
3
+ Version: 3.3.6
4
4
  Summary: Exploit Vector Agent
5
5
  Author: ARCANGEL0
6
6
  License: MIT
@@ -38,6 +38,9 @@ OLLAMA_HISTORY_LIMIT = 6
38
38
  LAST_OUTPUT_PROMPT_MAX_CHARS = 2200
39
39
  LAST_OUTPUT_CHUNK_TRIGGER = 5000
40
40
  LAST_OUTPUT_CHUNK_SIZE = 2800
41
+ OLLAMA_HTTP_CONNECT_TIMEOUT = 5
42
+ OLLAMA_HTTP_READ_TIMEOUT = 240
43
+ OLLAMA_RUN_TIMEOUT = 240
41
44
  STREAM_HIDE_MARKERS = [
42
45
  "[:::] analysis_output:",
43
46
  "output valid json only",
@@ -332,109 +335,56 @@ def _stream_visible_fragment(text, pending, suppress_output):
332
335
 
333
336
 
334
337
  def _ollama_chat(messages, on_stream_start=None):
335
- def _extract_chunk_text(item):
336
- if isinstance(item, dict):
337
- return item.get("message", {}).get("content", "") or item.get("response", "")
338
- message = getattr(item, "message", None)
339
- if message is not None:
340
- return getattr(message, "content", "") or ""
341
- return getattr(item, "response", "") or ""
342
-
343
338
  def _ollama_run_stream_fallback(prompt):
344
- proc = subprocess.Popen(
345
- ["ollama", "run", OLLAMA_MODEL],
346
- stdin=subprocess.PIPE,
347
- stdout=subprocess.PIPE,
348
- stderr=subprocess.STDOUT,
349
- text=True,
350
- bufsize=1,
351
- )
352
- collected = []
353
- started = False
354
339
  try:
355
- if proc.stdin:
356
- proc.stdin.write(prompt)
357
- proc.stdin.flush()
358
- proc.stdin.close()
359
- while True:
360
- ch = proc.stdout.read(1)
361
- if ch == "" and proc.poll() is not None:
362
- break
363
- if not ch:
364
- continue
365
- if not started and on_stream_start:
366
- on_stream_start()
367
- started = True
368
- collected.append(ch)
340
+ proc = subprocess.run(
341
+ ["ollama", "run", OLLAMA_MODEL],
342
+ input=prompt,
343
+ text=True,
344
+ capture_output=True,
345
+ timeout=OLLAMA_RUN_TIMEOUT,
346
+ )
347
+ raw = proc.stdout or proc.stderr or ""
348
+ if raw and on_stream_start:
349
+ on_stream_start()
350
+ return raw, False
351
+ except subprocess.TimeoutExpired:
352
+ return "", False
369
353
  except KeyboardInterrupt:
370
- proc.terminate()
371
354
  raise
372
- finally:
373
- try:
374
- proc.wait(timeout=5)
375
- except subprocess.TimeoutExpired:
376
- proc.kill()
377
- proc.wait(timeout=2)
378
- return "".join(collected), False
379
-
355
+ payload = {"model": OLLAMA_MODEL, "messages": messages, "stream": False}
380
356
  try:
381
- from ollama import chat as ollama_chat
382
-
383
- stream = ollama_chat(
384
- model=OLLAMA_MODEL,
385
- messages=messages,
386
- stream=True,
357
+ r = requests.post(
358
+ "http://127.0.0.1:11434/api/chat",
359
+ json=payload,
360
+ timeout=(OLLAMA_HTTP_CONNECT_TIMEOUT, OLLAMA_HTTP_READ_TIMEOUT),
387
361
  )
362
+ r.raise_for_status()
363
+ data = r.json()
364
+ raw = data.get("message", {}).get("content", "") or data.get("response", "")
365
+ if raw and on_stream_start:
366
+ on_stream_start()
367
+ if raw:
368
+ return raw, False
369
+ except (requests.RequestException, json.JSONDecodeError):
370
+ pass
388
371
 
389
- chunks = []
390
- started = False
391
- for item in stream:
392
- if not started and on_stream_start:
393
- on_stream_start()
394
- started = True
395
- text = _extract_chunk_text(item)
396
- if text:
397
- chunks.append(text)
398
- return "".join(chunks), False
399
- except Exception:
400
- payload = {"model": OLLAMA_MODEL, "messages": messages, "stream": True}
401
- try:
402
- r = requests.post(
403
- "http://127.0.0.1:11434/api/chat",
404
- json=payload,
405
- timeout=(5, 20),
406
- stream=True,
407
- )
408
- r.raise_for_status()
409
- chunks = []
410
- started = False
411
- for line in r.iter_lines(decode_unicode=True):
412
- if not line:
413
- continue
414
- data = json.loads(line)
415
- if not started and on_stream_start:
416
- on_stream_start()
417
- started = True
418
- chunk = data.get("message", {}).get("content", "") or data.get("response", "")
419
- if chunk:
420
- chunks.append(chunk)
421
- if chunks:
422
- return "".join(chunks), False
423
- prompt = messages[-1].get("content", "") if messages else ""
424
- return _ollama_run_stream_fallback(prompt)
425
- except (requests.RequestException, json.JSONDecodeError):
426
- prompt = messages[-1].get("content", "") if messages else ""
427
- return _ollama_run_stream_fallback(prompt)
372
+ prompt = messages[-1].get("content", "") if messages else ""
373
+ return _ollama_run_stream_fallback(prompt)
428
374
 
429
375
 
430
376
  def _ollama_run_fallback(prompt):
431
- p = subprocess.run(
432
- ["ollama", "run", OLLAMA_MODEL],
433
- input=prompt,
434
- text=True,
435
- capture_output=True,
436
- )
437
- return p.stdout
377
+ try:
378
+ p = subprocess.run(
379
+ ["ollama", "run", OLLAMA_MODEL],
380
+ input=prompt,
381
+ text=True,
382
+ capture_output=True,
383
+ timeout=OLLAMA_RUN_TIMEOUT,
384
+ )
385
+ return p.stdout
386
+ except subprocess.TimeoutExpired:
387
+ return ""
438
388
 
439
389
 
440
390
  def _query_g4f(history):
@@ -4,7 +4,7 @@ build-backend = "setuptools.build_meta"
4
4
 
5
5
  [project]
6
6
  name = "eva-exploit"
7
- version = "3.3.4"
7
+ version = "3.3.6"
8
8
  description = "Exploit Vector Agent"
9
9
  readme = "README.md"
10
10
  requires-python = ">=3.10"
@@ -20,7 +20,7 @@ from urllib import error, request
20
20
  import tomllib
21
21
  import config as config_module
22
22
 
23
- from colorama import Fore
23
+ from colorama import Fore, Style
24
24
 
25
25
  from config import (
26
26
  ANTHROPIC_API_KEY,
File without changes
File without changes
File without changes
File without changes