mirror of
https://github.com/calebstewart/pwncat.git
synced 2024-11-30 12:24:14 +01:00
Merge branch 'master' into issue-179-fix-euid-handling
This commit is contained in:
commit
f3811ff8b2
@ -22,11 +22,16 @@ and simply didn't have the time to go back and retroactively create one.
|
||||
- Added custom `which` implementation for linux when `which` is not available ([#193](https://github.com/calebstewart/pwncat/issues/193)).
|
||||
- Correctly handle `--listen` argument ([#201](https://github.com/calebstewart/pwncat/issues/201))
|
||||
- Added handler for `OSError` when attempting to detect the running shell ([#179](https://github.com/calebstewart/pwncat/issues/179))
|
||||
- Added additional check for stat time of file birth field (#208)
|
||||
- Removed shell compare with ["nologin", "false", "sync", "git-shell"] (#210)
|
||||
- Added shell compare with not in ["bash", "zsh", "ksh", "fish"] (#210)
|
||||
### Added
|
||||
- Added alternatives to `bash` to be used during _shell upgrade_ for a _better shell_
|
||||
- Added a warning message when a `KeyboardInterrupt` is caught
|
||||
- Added `--verbose/-V` for argument parser
|
||||
- Added `OSError` for `bind` protocol to show appropriate error messages
|
||||
- Contributing guidelines for GitHub maintainers
|
||||
- Installation instructions for BlackArch
|
||||
### Changed
|
||||
- Removed handling of `shell` argument to `Popen` to prevent `euid` problems ([#179](https://github.com/calebstewart/pwncat/issues/179))
|
||||
- Changed some 'red' warning message color to 'yellow'
|
||||
|
@ -122,3 +122,79 @@ WINDOWS_HOST=10.10.10.10 WINDOWS_BIND_PORT=4444 ./run-tests.sh
|
||||
The included unit tests are not great. They do not have a lot of coverage, but
|
||||
they at least ensure that the basic automated functionality of pwncat is not
|
||||
broken across some common target types.
|
||||
|
||||
## Maintainer Responsibilities and Expectations
|
||||
|
||||
The primary maintainer or repository owner will be Caleb Stewart (`calebstewart`)
|
||||
until otherwised announced or changed in the future. Other users may be invited
|
||||
as Co-Maintainers in the future to assist in the daily maintenance, issue review
|
||||
and pull request review processes with the project. The follow section describes
|
||||
the expectations of Co-Maintainers within the project and their conduct.
|
||||
|
||||
This is a community project supported by open source software and as such, there
|
||||
are no requirements for participation in development or review. At any time, a
|
||||
Co-Maintainer can request to leave the project with no hard feelings. Co-Maintainers
|
||||
will be invited based on consistent interaction with the project including issues,
|
||||
pull requests and discussions. Additionally, the quality of interactions with
|
||||
respect to the above contribution guidelines will also be taken into account.
|
||||
|
||||
We understand this is a part time involvement. There is no expectation or
|
||||
agreement between you and this project which requires your participation.
|
||||
pwncat is an open source project, and participation is obviously voluntary.
|
||||
If at any time, you feel overwhelmed or simply lack the free time to
|
||||
support the project, you have no responsiblity to contribute simply by
|
||||
accepting the role of a co-maintainer.
|
||||
|
||||
Just as Co-Maintainer participation is not bound by any formal requirements or
|
||||
agreement, the status of Co-Maintainer can be revoked at any time by the primary
|
||||
maintainer normally based on the following criteria:
|
||||
|
||||
- Active particpation in issues and pull requests.
|
||||
- Professionalism in correspondence with contributors.
|
||||
- Adherence to the above contribution guidelines.
|
||||
- Other factors determined by the primary maintainer which negatively impact
|
||||
the pwncat community or code base.
|
||||
|
||||
In addition to the above guidelines for issue and pull request submission,
|
||||
Co-Maintainers are expected to participate in third-part issues and pull
|
||||
requests. This is the main goal of inviting Co-Maintainers. Your assistance
|
||||
in maintaining the project and producing a helpful tool for the community
|
||||
is greatly appreciated. :)
|
||||
|
||||
As a Co-Maintainer, you **do not** have permission to merge pull requests which
|
||||
implement new features into any branch. Co-Maintainers are expected to assist in
|
||||
the review and application of bug fixes and resolution of issues. When creating new
|
||||
features, the primary maintainer is responsible for approving and merging changes.
|
||||
Merging changes into `release` branches is strictly a role of the primary maintainer.
|
||||
|
||||
Further, Co-Maintainers should not cut new releases of any kind. Cutting minor and
|
||||
major releases is the sole responsibility of the primary maintainer. If a
|
||||
Co-Maintainer believes a new minor release is needed in order to implement important
|
||||
bug fixes, a pull request can be opened bumping the version number **separately
|
||||
from any other changes** explaining the need for a new version release and request
|
||||
a review from the primary maintainer. At which point, the primary maintainer will
|
||||
review and cut a release if appropriate.
|
||||
|
||||
In contrast, Co-Maintainers are expected to do the following as your personal
|
||||
life permits:
|
||||
|
||||
- Uphold the above contributing guidelines at all times. This includes when
|
||||
opening personal issues and pull requests as well as helping to *instruct*
|
||||
users when the guidelines are not being followed. This project should always
|
||||
foster Open Source contribution and learning, and therefore this instruction
|
||||
to third-party contributors should always be polite and constructive.
|
||||
- Participate as a primary voice in issues and pull requests. In no way are
|
||||
you required to particpate in every issue or pull request, however as a
|
||||
Co-Maintainer, you are expected to have a higher level of knowledge,
|
||||
participation and/or professionalism when interacting with third-parties.
|
||||
- Merge bug-fixes which adhere to the above contribution guidelines and which
|
||||
have been thoroughly tested. Co-Maintainers act as reviewers for bug-fix pull
|
||||
requests and have permission to merge those changes into the `master` branch.
|
||||
|
||||
If you have an interest in becoming a Co-Maintainer, would like to be removed
|
||||
as a Co-Maintainer or have a general question about these guidelines, feel free
|
||||
to reach out to the primary maintainer. At the time of writing, you can reach
|
||||
out in the following ways:
|
||||
|
||||
- Open a discussion in the `Discussions` tab of GitHub.
|
||||
- Send an E-mail directly to `Caleb Stewart <caleb.stewart94@gmail.com>`.
|
||||
|
10
README.md
10
README.md
@ -131,6 +131,16 @@ The setup script will install three binaries. They are all identical, but
|
||||
provide convenience aliases for pwncat. The three binaries are: `pwncat`,
|
||||
`pc` and `pcat`.
|
||||
|
||||
## BlackArch Packaging
|
||||
|
||||
[![Packaging status](https://repology.org/badge/vertical-allrepos/pwncat-caleb.svg)](https://repology.org/project/pwncat-caleb/versions)
|
||||
|
||||
Installation on BlackArch is as simple as:
|
||||
|
||||
``` shell
|
||||
pacman -Syu pwncat-caleb
|
||||
```
|
||||
|
||||
### Connecting to a Victim
|
||||
|
||||
The command line parameters for pwncat attempt to be flexible and accept
|
||||
|
@ -52,6 +52,16 @@ After installation, you can use pwncat via the installed script:
|
||||
--list List installed implants with remote connection
|
||||
capability
|
||||
|
||||
BlackArch Package
|
||||
-----------------
|
||||
|
||||
pwncat is packaged for BlackArch and in the standard repositories. Installation on
|
||||
BlackArch is as simple as:
|
||||
|
||||
.. code-block:: bash
|
||||
|
||||
$ pacman -Syu pwncat-caleb
|
||||
|
||||
Windows Plugin Binaries
|
||||
-----------------------
|
||||
|
||||
|
@ -616,19 +616,14 @@ class Linux(Platform):
|
||||
if self.shell == "" or self.shell is None:
|
||||
self.shell = "/bin/sh"
|
||||
|
||||
# This doesn't make sense, but happened for some people (see issue #116)
|
||||
if os.path.basename(self.shell) in ["nologin", "false", "sync", "git-shell"]:
|
||||
self.shell = "/bin/sh"
|
||||
self.channel.sendline(b" export SHELL=/bin/sh")
|
||||
|
||||
if self._do_which("which") is None:
|
||||
self._do_which = self._do_custom_which
|
||||
|
||||
if os.path.basename(self.shell) in ["sh", "dash"]:
|
||||
better_shells = ["bash", "zsh", "ksh", "fish"]
|
||||
if os.path.basename(self.shell) not in better_shells:
|
||||
# Try to find a better shell
|
||||
# a custom `pwncat shell prompt` may not be available for all shells
|
||||
# see `self.PROMPTS`
|
||||
better_shells = ["bash", "zsh", "ksh", "fish"]
|
||||
|
||||
for better_shell in better_shells:
|
||||
shell = self._do_which(better_shell)
|
||||
@ -1751,6 +1746,10 @@ class Linux(Platform):
|
||||
if fields[i] == "?":
|
||||
fields[i] = "0"
|
||||
|
||||
# Fix stat output issues in some enviroments
|
||||
if fields[1] == "W":
|
||||
fields[1] = "0"
|
||||
|
||||
stat = os.stat_result(
|
||||
tuple(
|
||||
[
|
||||
|
Loading…
Reference in New Issue
Block a user