T06 · System Persistence
- Location
scripts/setup.py:562- Finding
Persistent Scheduled Task Can Perform Unattended Real-Money Trading
- Content
View full analysis
> {log_path} 2>&1" print(f"\nAdd this line to your crontab (crontab -e):") print(f"{cron_entry}") print("\nThis will run every 30 minutes from 9 AM to 11 PM") print("Logs will be saved to:", log_path) auto_add = input("\nAttempt to add to crontab automatically? (y/N): ").strip().lower() if auto_add in ("y", "yes"): try: import subprocess result = subprocess.run( ["crontab", "-l"], capture_output=True, text=True ) existing_cron = result.stdout if result.returncode == 0 else "" # Check if entry already exists if "kalshi-autopilot" in existing_cron or script_path in existing_cron: print("⚠️ Similar cron entry already exists. Please check manually.") else: new_cron = existing_cron + f"\n# Kalshi Autopilot\n{cron_entry}\n" proc = subprocess.Popen(["crontab", "-"], stdin=subprocess.PIPE, text=True) proc.communicate(new_cron) if proc.returncode == 0: print("✅ Cron job added successfully") else: print("❌ Failed to add cron job. Please add manually.") ``` ### Technical Analysis The setup wizard can modify the current user's crontab and create a scheduled task that survives completio ...[truncated 2161 chars]- Remediation
View remediation
