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

Make --version switch universal so help2man will work properly #417

Merged
merged 1 commit into from
Sep 18, 2024

Conversation

jsherwood0
Copy link

Ensure that the --version switch is available in all modes so that help2man processing will function properly.

  • Moves the --version switch into generic_parser
  • Adds --version to the conditions that will suppress the requirement for target positional argument

Motivation: The netexec package (on Kali in this case) does not include man pages. The existence of man pages is required to enable the use of the apropos command. The apropos command is used when a user is trying to think of what command they need for what they are trying to do. For example:

# apropos smb brute force
brutespray (8)       - Python bruteforce tool
netexec (1)          - The network execution tool
patator (1)          - multi-purpose brute-forcer
smbmap (1)           - SMB enumeration tool

# apropos wmi query
netexec (1)          - The network execution tool

To ensure that users are more easily able to find and adopt netexec, the project should include man pages even if the --help pages are exhaustive. To minimize the overhead of generating man pages, the tool help2man can be used to convert the various already existing --help pages into actual man pages. The help2man tool works best when each program section (i.e., netexec, netexec ftp, netexec ldap, etc.) accepts both --help and --version. This change puts the --version switch into the universal "Generic" argument group and ensures that the target positional argument is not required when the --version switch is used.

@jsherwood0 jsherwood0 force-pushed the make_version_arg_universal branch from 45b0d17 to 9153779 Compare September 13, 2024 21:12
Copy link
Contributor

@NeffIsBack NeffIsBack left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Understood and LGTM 👍
image

@NeffIsBack NeffIsBack added the documentation Improvements or additions to documentation label Sep 18, 2024
@NeffIsBack NeffIsBack merged commit 2eebb7c into Pennyw0rth:main Sep 18, 2024
5 checks passed
@mpgn mpgn added this to the v1.3.0 milestone Sep 29, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
documentation Improvements or additions to documentation
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants