Skip to content
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

Fix cli #2845

Closed
wants to merge 5 commits into from
Closed

Fix cli #2845

wants to merge 5 commits into from

Conversation

nzqo
Copy link
Contributor

@nzqo nzqo commented May 4, 2023

(Starting with) fixing beef cli option handling. Fixes #2174
I still consider this WIP because I am not very well acquainted with ruby. Let me know if you find any issues or things to improve.

Category

Core Functionality

Feature/Issue Description

Q: Please give a brief summary of your feature/fix
A: Beef options were not part of the --help before and not clearly communicated.

Q: Give a technical rundown of what you have changed (if applicable)
A: The problem seems to pertain to Sinatra. Since some extensions use Sinatra, it is required from loader.rb (by requiring the bundle defaults). From then on, Sinatra basically hogs the command line parsing, parsing --helpand then exiting.

After discussion I decided to simply shadow the Sinatra CLI handling. The changes consume the CLI args, Sinatra is left with nothing.

Result

With these changes, we would at least see all the command line options being printed when running ./beef --help, i.e.

Usage: beef [options]
    -x, --reset                      Reset the database
    -v, --verbose                    Display debug information
    -a, --ascii-art                  Prints BeEF ascii art
    -c, --config FILE                Specify configuration file to load (instead of ./config.yaml)
    -p, --port PORT                  Change the default BeEF listening port
    -w, --wsport WS_PORT             Change the default BeEF WebSocket listening port
        --update-disable             Skips update
        --update-auto                Automatic update with no prompt
    -h, --help                       Prints this help

@nzqo nzqo had a problem deploying to Integrate Pull Request May 4, 2023 08:50 — with GitHub Actions Failure
@github-actions
Copy link

Stale pull request message

@github-actions
Copy link

Stale pull request message

@bcoles bcoles added Review Issue that needs to be reviewed for completion and removed no-pr-activity labels Jun 15, 2023
@github-actions
Copy link

Stale pull request message

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
no-pr-activity Review Issue that needs to be reviewed for completion
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Update ./beef launch flags in wiki and --help menu
2 participants