2020-12-30 05:36:54 +00:00
|
|
|
#!./env/bin/python
|
2021-01-03 23:22:17 +00:00
|
|
|
import subprocess
|
|
|
|
|
2020-12-30 05:36:54 +00:00
|
|
|
import pwncat.manager
|
2021-01-03 23:22:17 +00:00
|
|
|
import pwncat.platform.windows
|
2021-01-01 23:53:13 +00:00
|
|
|
import time
|
2021-01-22 20:52:25 +00:00
|
|
|
import stat
|
2021-02-15 04:32:05 +00:00
|
|
|
import json
|
2020-12-30 05:36:54 +00:00
|
|
|
|
|
|
|
# Create a manager
|
|
|
|
manager = pwncat.manager.Manager("data/pwncatrc")
|
|
|
|
|
2021-04-10 19:52:47 +00:00
|
|
|
# Tell the manager to create verbose sessions that
|
|
|
|
# log all commands executed on the remote host
|
2021-05-02 18:28:41 +00:00
|
|
|
# manager.config.set("verbose", True, glob=True)
|
2021-04-10 19:52:47 +00:00
|
|
|
|
2020-12-30 05:36:54 +00:00
|
|
|
# Establish a session
|
2021-01-22 20:52:25 +00:00
|
|
|
# session = manager.create_session("windows", host="192.168.56.10", port=4444)
|
2021-04-10 19:52:47 +00:00
|
|
|
# session = manager.create_session("windows", host="192.168.122.11", port=4444)
|
2021-05-19 01:02:43 +00:00
|
|
|
session = manager.create_session("linux", host="pwncat-ubuntu", port=4444)
|
2021-02-15 04:32:05 +00:00
|
|
|
# session = manager.create_session("windows", host="0.0.0.0", port=4444)
|
2021-01-10 23:01:08 +00:00
|
|
|
|
2021-05-19 01:02:43 +00:00
|
|
|
while True:
|
|
|
|
session.platform.getuid()
|