1
0
mirror of https://github.com/calebstewart/pwncat.git synced 2024-11-24 01:25:37 +01:00

Added version option; updated documention for install

This commit is contained in:
Caleb Stewart 2021-06-15 21:17:08 -04:00
parent 8363732334
commit 7102430fcd
3 changed files with 22 additions and 10 deletions

View File

@ -10,19 +10,21 @@ and simply didn't have the time to go back and retroactively create one.
## [Unreleased] ## [Unreleased]
- Fixed `linux.enumerate.system.network` to work with old and new style `ip`. - Fixed `linux.enumerate.system.network` to work with old and new style `ip`.
- Fixed `ChannelFile.recvinto` which will no longer raise `BlockingIOError` (#126, #131) - Fixed `ChannelFile.recvinto` which will no longer raise `BlockingIOError` ([#126](https://github.com/calebstewart/pwncat/issues/126), [#131](https://github.com/calebstewart/pwncat/issues/131))
- Fixed sessions command with invalid session ID (#130) - Fixed sessions command with invalid session ID ([#130](https://github.com/calebstewart/pwncat/issues/130))
- Fixed zsh shell prompt color syntax (#130) - Fixed zsh shell prompt color syntax ([#130](https://github.com/calebstewart/pwncat/issues/130))
- Added Pull Request template - Added Pull Request template
- Added CONTRIBUTING.md - Added CONTRIBUTING.md
- Added `--version` option to entrypoint to retrieve pwncat version
- Added `latest` tag to documented install command to prevent dev installs
## [0.4.1] - 2021-06-14 ## [0.4.1] - 2021-06-14
### Added ### Added
- Differentiate prompt syntax for standard bash, zsh and sh (#126) - Differentiate prompt syntax for standard bash, zsh and sh ([#126](https://github.com/calebstewart/pwncat/issues/126))
- Added `-c=never` to `ip` command in `linux.enumerate.system.network` - Added `-c=never` to `ip` command in `linux.enumerate.system.network`
(#126) ([#126](https://github.com/calebstewart/pwncat/issues/126))
- Updated Dockerfile to properly build post-v0.4.0 releases (#125) - Updated Dockerfile to properly build post-v0.4.0 releases ([#125](https://github.com/calebstewart/pwncat/issues/125))
- Added check for `nologin` shell to stop pwncat from accidentally - Added check for `nologin` shell to stop pwncat from accidentally
closing the session (#116) closing the session ([#116](https://github.com/calebstewart/pwncat/issues/116))
- Resolved all flake8 errors (#123) - Resolved all flake8 errors ([#123](https://github.com/calebstewart/pwncat/issues/123))
- Improved EOF handling for Linux file-writes (#117) - Improved EOF handling for Linux file-writes ([#117](https://github.com/calebstewart/pwncat/issues/117))

View File

@ -13,7 +13,8 @@ Once you have a working ``pip`` installation, you can install pwncat with the pr
# A virtual environment is recommended # A virtual environment is recommended
python -m venv /opt/pwncat python -m venv /opt/pwncat
# Install pwncat within the virtual environment # Install pwncat within the virtual environment
/opt/pwncat/bin/pip install git+https://github.com/calebstewart/pwncat # Replace `latest` with a versioned tag if needed (e.g. `v0.4.0`)
/opt/pwncat/bin/pip install 'git+https://github.com/calebstewart/pwncat@latest#egg=pwncat'
# This allows you to use pwncat outside of the virtual environment # This allows you to use pwncat outside of the virtual environment
ln -s /opt/pwncat/bin/pwncat /usr/local/bin ln -s /opt/pwncat/bin/pwncat /usr/local/bin

View File

@ -2,6 +2,7 @@
import sys import sys
import logging import logging
import argparse import argparse
import importlib.metadata
from rich import box from rich import box
from rich.table import Table from rich.table import Table
@ -23,6 +24,9 @@ def main():
parser = argparse.ArgumentParser( parser = argparse.ArgumentParser(
description="""Start interactive pwncat session and optionally connect to existing victim via a known platform and channel type. This entrypoint can also be used to list known implants on previous targets.""" description="""Start interactive pwncat session and optionally connect to existing victim via a known platform and channel type. This entrypoint can also be used to list known implants on previous targets."""
) )
parser.add_argument(
"--version", "-v", action="store_true", help="Show version number and exit"
)
parser.add_argument( parser.add_argument(
"--download-plugins", "--download-plugins",
action="store_true", action="store_true",
@ -78,6 +82,11 @@ def main():
) )
args = parser.parse_args() args = parser.parse_args()
# Print the version number and exit.
if args.version:
print(importlib.metadata.version("pwncat"))
return
# Create the session manager # Create the session manager
with pwncat.manager.Manager(args.config) as manager: with pwncat.manager.Manager(args.config) as manager: