1
0
mirror of https://github.com/calebstewart/pwncat.git synced 2024-11-24 01:25:37 +01:00

Added gtfobins.json to the package data in setup.py as referenced in #14

This commit is contained in:
Caleb Stewart 2020-05-28 01:21:08 -04:00
parent 8461de7182
commit 9b0067a4ed
6 changed files with 9 additions and 5 deletions

2
.gitignore vendored
View File

@ -7,6 +7,6 @@ dist/
.byebug_history
testbed
.idea/
data/*.sqlite
**/*.sqlite
testing/
data/pwncat.sqlite-journal

View File

@ -7,7 +7,7 @@ set privkey "data/pwncat"
# Set the pwncat backdoor user and password
set backdoor_user "pwncat"
set backdoor_pass "pwncat"
set db "sqlite:///data/pwncat.sqlite"
set db "sqlite:///pwncat.sqlite"
set on_load {
# Run a command upon a stable connection

View File

@ -27,6 +27,7 @@ class Method(BaseMethod):
b"[sudo]" in output
or b"password for " in output
or output.endswith(b"password: ")
or b"lecture" in output
):
if current_user.password is None:
pwncat.victim.client.send(CTRL_C) # break out of password prompt

View File

@ -9,6 +9,7 @@ import time
from typing import Dict, Optional, IO, Any, List, Tuple, Iterator, Union
import paramiko
import pkg_resources
import requests
from colorama import Fore
from sqlalchemy.engine import Engine, create_engine
@ -122,7 +123,9 @@ class Victim:
"nc": ["netcat", "ncat"],
}
# GTFObins manager for this host
self.gtfo: GTFOBins = GTFOBins("data/gtfobins.json", self.which)
self.gtfo: GTFOBins = GTFOBins(
pkg_resources.resource_filename("pwncat", "data/gtfobins.json"), self.which
)
# Whether the user has pressed the defined prefix
self.has_prefix = False
# Parser for local command input

View File

@ -33,7 +33,7 @@ setup(
author="Caleb Stewart",
url="https://gitlab.com/calebstewart/pwncat",
packages=find_packages(),
package_data={},
package_data={"pwncat": ["data/*"]},
entry_points={"console_scripts": ["pwncat=pwncat.__main__:main"]},
data_files=[],
install_requires=dependencies,