diff options
author | dusoleil <howcansocksbereal@gmail.com> | 2021-08-31 19:32:24 -0400 |
---|---|---|
committer | dusoleil <howcansocksbereal@gmail.com> | 2021-08-31 19:32:24 -0400 |
commit | 26b1c7a2c68d0747784cc5cebe71f835e8e24255 (patch) | |
tree | 61b1659167607d6cef6d6c44dbc415ae27bb2997 /tools | |
parent | 72cf7bc384249a4140dbcfc3898589c1d83b6e25 (diff) | |
download | lib-des-gnux-26b1c7a2c68d0747784cc5cebe71f835e8e24255.tar.gz lib-des-gnux-26b1c7a2c68d0747784cc5cebe71f835e8e24255.zip |
Use With Statement for Temporary Directory
Signed-off-by: dusoleil <howcansocksbereal@gmail.com>
Diffstat (limited to 'tools')
-rw-r--r-- | tools/sploit/sploit/main.py | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/tools/sploit/sploit/main.py b/tools/sploit/sploit/main.py index ebcbd41..6d181b8 100644 --- a/tools/sploit/sploit/main.py +++ b/tools/sploit/sploit/main.py @@ -25,10 +25,10 @@ def main(): def daemon(script): print("Running in Pipe Daemon Mode...") - tmpdir = tempfile.TemporaryDirectory() - tmp = os.path.split(tmpdir.name)[1] - while(True): - runscript(script,Comm(Pipes(tmp))); + with tempfile.TemporaryDirectory() as tmpdir: + tmp = os.path.split(tmpdir)[1] + while(True): + runscript(script,Comm(Pipes(tmp))); def pipe(script): print("Running in Pipe Mode..."); |