-
Notifications
You must be signed in to change notification settings - Fork 1.1k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Restructuring of some command subtrees #1393
Open
maxlandon
wants to merge
112
commits into
BishopFox:master
Choose a base branch
from
maxlandon:commands
base: master
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Conversation
This file contains 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
bind flags, completions, apply command filters, etc.
- Correctly connects/disconnects from the server (fixed race condition). - Correctly proposes completions where required. - Correctly executes commands. Problems: - The pre-run/post-run can be more efficient. - Pre-run/post-runs should be bound to leaf commands where required. - Logging is quite big.
- Move server-only commands in a dir. - Refactor client code with a single entrypoint function for all CLI modes, with pre-connect, loops and everything.
This reverts commit d31592b.
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.
Note that this took me only an hour, it's just to illustrate something that I
think would be quite wise on the longer run. I also know this will break compatibility
with some users scripts/autoruns. I think it's worth doing this now, however, as
the window would be that wide open before long.
Discard if needed, didn't cost me much :)
Card
The present PR is a single-commit one aimed at moving some commands/subcommands
somewhere else in the tree, sometimes with a different verb.
Two objectives with this:
More elegant command tree discovery, or more generic approach with some commands.
(example:
generate traffic-encoders
becomestransports encoders
in the servermenu, which in turn enables to change
reconfig
totransports reconfig
in thesliver implant menu.)
Ensure a domain/activity-coherent tree of commands, so that any future development
and new functionality can easily fit into it. This is mainly aimed at everything
transports/C2 related, where one might see new dialers (bind) or staging stacks.
1) Changes (Server menu and excluding C2 stacks):
2) Changes (Sliver menu):
Changes (C2 commands):
This last section is where most changes take place, since its whole purpose is to
enable forward development within a consistent/coherent tree.
That enables to insert new stacks/tools like this: