1
0
mirror of https://github.com/calebstewart/pwncat.git synced 2024-11-27 10:54:14 +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

4
.gitignore vendored
View File

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

View File

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

View File

@ -27,6 +27,7 @@ class Method(BaseMethod):
b"[sudo]" in output b"[sudo]" in output
or b"password for " in output or b"password for " in output
or output.endswith(b"password: ") or output.endswith(b"password: ")
or b"lecture" in output
): ):
if current_user.password is None: if current_user.password is None:
pwncat.victim.client.send(CTRL_C) # break out of password prompt 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 from typing import Dict, Optional, IO, Any, List, Tuple, Iterator, Union
import paramiko import paramiko
import pkg_resources
import requests import requests
from colorama import Fore from colorama import Fore
from sqlalchemy.engine import Engine, create_engine from sqlalchemy.engine import Engine, create_engine
@ -122,7 +123,9 @@ class Victim:
"nc": ["netcat", "ncat"], "nc": ["netcat", "ncat"],
} }
# GTFObins manager for this host # 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 # Whether the user has pressed the defined prefix
self.has_prefix = False self.has_prefix = False
# Parser for local command input # Parser for local command input

View File

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