https://github.com/initstring/pyshell
Simple netcat-like binary for Windows, created with python and py2exe.
https://github.com/initstring/pyshell
Last synced: 6 months ago
JSON representation
Simple netcat-like binary for Windows, created with python and py2exe.
- Host: GitHub
- URL: https://github.com/initstring/pyshell
- Owner: initstring
- License: mit
- Created: 2019-02-01T04:37:12.000Z (almost 7 years ago)
- Default Branch: master
- Last Pushed: 2019-02-01T04:39:05.000Z (almost 7 years ago)
- Last Synced: 2025-04-06T05:01:44.821Z (8 months ago)
- Language: Python
- Size: 4.72 MB
- Stars: 13
- Watchers: 2
- Forks: 4
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# Overview
A simple binary to get reverse shells on Windows machines. Like netcat but unknown for now by "next-gen" AV (lol).
Simply execute the exe on the target box with two arguments as follows. First, set up a nc listener on your machine.
```
pyshell.exe
```
NOTE: There is a line in the code to look for the specific binary name as sys.argv(0). This is in hopes of avoiding some AV sandboxes. If you renamed the binary without building your own, it probably won't work.
# Building a new exe
You'll need to use a Windows host to generate the exe after modifying the Python source.
**Requirements**
- Python 3.x
- pyinstaller installed using `pip install pyinstaller`
**Building the exe**
Run pyinstaller like the following to package the required DLLs:
```
pyinstaller -F pyshell.py
```
This should create a `dist` folder in your current directory with the new executable.
You can add the '--noconsole' swich when building to not display a console on the target. You can also hard-code the IP and Port into the Python script before building if you'd like a version that requires no arguments. Don't forget to get rid of argparse completely if you do so.
# Shout out
This thread: https://stackoverflow.com/questions/37991717/python-windows-reverse-shell-one-liner