2020-12-30 06:36:54 +01:00
|
|
|
#!./env/bin/python
|
2021-05-25 08:05:23 +02:00
|
|
|
import json
|
|
|
|
import stat
|
|
|
|
import time
|
2021-06-14 00:48:33 +02:00
|
|
|
import shutil
|
2021-01-04 00:22:17 +01:00
|
|
|
import subprocess
|
|
|
|
|
2020-12-30 06:36:54 +01:00
|
|
|
import pwncat.manager
|
2021-01-04 00:22:17 +01:00
|
|
|
import pwncat.platform.windows
|
2020-12-30 06:36:54 +01:00
|
|
|
|
|
|
|
# Create a manager
|
2021-05-25 08:05:23 +02:00
|
|
|
with pwncat.manager.Manager("data/pwncatrc") as manager:
|
2020-12-30 06:36:54 +01:00
|
|
|
|
2021-05-25 08:05:23 +02:00
|
|
|
# Tell the manager to create verbose sessions that
|
|
|
|
# log all commands executed on the remote host
|
|
|
|
# manager.config.set("verbose", True, glob=True)
|
2021-04-10 21:52:47 +02:00
|
|
|
|
2021-05-25 08:05:23 +02:00
|
|
|
# Establish a session
|
|
|
|
# session = manager.create_session("windows", host="192.168.56.10", port=4444)
|
2021-06-14 00:48:33 +02:00
|
|
|
# session = manager.create_session("windows", host="192.168.122.11", port=4444)
|
2021-05-25 08:05:23 +02:00
|
|
|
# session = manager.create_session("linux", host="pwncat-ubuntu", port=4444)
|
2021-06-14 04:09:41 +02:00
|
|
|
# session = manager.create_session("linux", host="127.0.0.1", port=4444)
|
2021-06-19 22:37:58 +02:00
|
|
|
# session = manager.create_session(
|
|
|
|
# "linux", certfile="/tmp/cert.pem", keyfile="/tmp/cert.pem", port=4444
|
|
|
|
# )
|
2021-01-11 00:01:08 +01:00
|
|
|
|
2021-06-12 09:10:14 +02:00
|
|
|
# session.platform.powershell("amsiutils")
|
|
|
|
|
2021-06-19 22:37:58 +02:00
|
|
|
listener = manager.create_listener(
|
|
|
|
protocol="socket", host="0.0.0.0", port=4444, platform="windows"
|
|
|
|
)
|
2021-06-20 01:58:44 +02:00
|
|
|
listener = manager.create_listener(protocol="socket", host="0.0.0.0", port=9999)
|
2021-06-19 22:37:58 +02:00
|
|
|
|
2021-06-12 09:10:14 +02:00
|
|
|
manager.interactive()
|