Add explicit CLI flag for interactive shell mode#2
Open
Xyborg wants to merge 3 commits into
Open
Conversation
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
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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.
-i/--shellflag to opt into the interactive post-exploit shell; single-target runs no longer auto-enter shell.Testing
python3 nextrce.py -u http://example.com(no shell without -i).python3 nextrce.py -i -u http://example.com(enters shell after first success, then stops).python3 nextrce.py -i -l urls.txt(opens shell on first vulnerable target only).