1
0
mirror of https://github.com/calebstewart/pwncat.git synced 2024-11-24 01:25:37 +01:00
pwncat/test.py
Caleb Stewart e3c4c12cad Working background listener API and commands
Needs more testing, but is functioning currently.
2021-06-19 19:58:44 -04:00

35 lines
1.1 KiB
Python
Executable File

#!./env/bin/python
import json
import stat
import time
import shutil
import subprocess
import pwncat.manager
import pwncat.platform.windows
# Create a manager
with pwncat.manager.Manager("data/pwncatrc") as manager:
# Tell the manager to create verbose sessions that
# log all commands executed on the remote host
# manager.config.set("verbose", True, glob=True)
# Establish a session
# session = manager.create_session("windows", host="192.168.56.10", port=4444)
# session = manager.create_session("windows", host="192.168.122.11", port=4444)
# session = manager.create_session("linux", host="pwncat-ubuntu", port=4444)
# session = manager.create_session("linux", host="127.0.0.1", port=4444)
# session = manager.create_session(
# "linux", certfile="/tmp/cert.pem", keyfile="/tmp/cert.pem", port=4444
# )
# session.platform.powershell("amsiutils")
listener = manager.create_listener(
protocol="socket", host="0.0.0.0", port=4444, platform="windows"
)
listener = manager.create_listener(protocol="socket", host="0.0.0.0", port=9999)
manager.interactive()