fix: Restore correct import of cai.caibench instead of pentestperf

During rebase, the import was incorrectly changed from 'import cai.caibench as ptt'
to 'import pentestperf as ptt'. This commit restores the correct import.

The original code uses cai.caibench, not an external pentestperf module.
This commit is contained in:
Paul Zabalegui 2025-12-10 15:22:34 +01:00
parent bd88b3cd23
commit 2f88474338
1 changed files with 11 additions and 1 deletions

View File

@ -31,8 +31,14 @@ from wasabi import color
from cai import is_pentestperf_available
# Import caibench (pentestperf) if available
if is_pentestperf_available():
import pentestperf as ptt
import cai.caibench as ptt
PTT_AVAILABLE = True
else:
ptt = None
PTT_AVAILABLE = False
import signal
# Global timing variables for tracking active and idle time
@ -4368,6 +4374,10 @@ def setup_ctf():
print(color("CTF name not provided, necessary to run CTF", fg="white", bg="red"))
sys.exit(1)
if not PTT_AVAILABLE or ptt is None:
print(color("pentestperf module not available, cannot setup CTF", fg="white", bg="red"))
sys.exit(1)
print(
color("Setting up CTF: ", fg="black", bg="yellow")
+ color(ctf_name, fg="black", bg="yellow")