Skip to content

Add explicit CLI flag for interactive shell mode#2

Open
Xyborg wants to merge 3 commits into
ynsmroztas:mainfrom
ToritoIO:main
Open

Add explicit CLI flag for interactive shell mode#2
Xyborg wants to merge 3 commits into
ynsmroztas:mainfrom
ToritoIO:main

Conversation

@Xyborg

@Xyborg Xyborg commented Dec 7, 2025

Copy link
Copy Markdown

Introduces an opt-in CLI switch to enter the interactive shell after a successful exploit, keeps default scans non-interactive, and runs shell mode sequentially to stop after the first compromised target.

  • Introduce -i/--shell flag to opt into the interactive post-exploit shell; single-target runs no longer auto-enter shell.
  • Run interactive mode sequentially to avoid thread/input clashes and stop after the first successful exploit.
  • Keep scan behavior unchanged for non-shell runs; mass scans still use the thread pool.
  • Normalize scan_and_exploit return values (always boolean) so shell mode logic is reliable.

Testing

  • Manual: python3 nextrce.py -u http://example.com (no shell without -i).
  • Manual: python3 nextrce.py -i -u http://example.com (enters shell after first success, then stops).
  • Manual: python3 nextrce.py -i -l urls.txt (opens shell on first vulnerable target only).

Added interactive shell support: after the first successful exploit, the script now drops into a prompt to run arbitrary commands on the compromised host without rerunning. Refactored RCE routine to accept per-command execution and return success/output so the shell loop can reuse the same exploit. New CLI flag -i/--shell; interactive mode also auto-enables when only one target is supplied. Sequential execution prevents thread/input clashes. Updated flow in nextrce.py to keep mass scanning unchanged while enabling on-demand shells for single targets. Usage examples:

Single target (auto shell): python3 nextrce.py -u https://target Force shell after success (even with a list): python3 nextrce.py -l urls.txt -i
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant