summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authordusoleil <howcansocksbereal@gmail.com>2021-08-31 20:10:10 -0400
committerdusoleil <howcansocksbereal@gmail.com>2021-08-31 20:10:10 -0400
commitaffe57a4ed9658a91fb38e7f03235584cd210b2c (patch)
treea354ac21b180ec7c1a97d898226c4cb33f143495
parent3c2e0b235b5df6004abb1c583316a370835c5570 (diff)
downloadsploit-affe57a4ed9658a91fb38e7f03235584cd210b2c.tar.gz
sploit-affe57a4ed9658a91fb38e7f03235584cd210b2c.zip
Use Entire Path When Given The Pipe Directory
Previously, you could specify a directory which must exist under /tmp. Now, you can give the full path to a directory to be used by Pipes. Signed-off-by: dusoleil <howcansocksbereal@gmail.com>
-rw-r--r--sploit/comm.py4
-rw-r--r--sploit/main.py3
2 files changed, 4 insertions, 3 deletions
diff --git a/sploit/comm.py b/sploit/comm.py
index 0b5bc2a..0e80051 100644
--- a/sploit/comm.py
+++ b/sploit/comm.py
@@ -111,7 +111,9 @@ class Pipes:
self.dir = tempfile.TemporaryDirectory()
dirname = self.dir.name
else:
- dirname = os.path.join("/tmp",tmp)
+ if(not os.path.exists(tmp)):
+ os.mkdir(tmp)
+ dirname = tmp
self.pathin = os.path.join(dirname,"in")
self.pathout = os.path.join(dirname,"out")
os.mkfifo(self.pathin)
diff --git a/sploit/main.py b/sploit/main.py
index 6d181b8..7ed23d2 100644
--- a/sploit/main.py
+++ b/sploit/main.py
@@ -26,9 +26,8 @@ def main():
def daemon(script):
print("Running in Pipe Daemon Mode...")
with tempfile.TemporaryDirectory() as tmpdir:
- tmp = os.path.split(tmpdir)[1]
while(True):
- runscript(script,Comm(Pipes(tmp)));
+ runscript(script,Comm(Pipes(tmpdir)));
def pipe(script):
print("Running in Pipe Mode...");