Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit 795777b

Browse files
committed
Minor patch
1 parent 5f2c31f commit 795777b

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

lib/takeover/web.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -257,9 +257,9 @@ def webInit(self):
257257
self.webStagerFilePath = posixpath.join(ntToPosixSlashes(directory), stagerName)
258258

259259
handle, filename = tempfile.mkstemp()
260-
os.fdopen(handle).close() # close low level handle (causing problems later)
260+
os.close(handle)
261261

262-
with open(filename, "w+") as f:
262+
with open(filename, "w+b") as f:
263263
_ = decloak(os.path.join(paths.SQLMAP_SHELL_PATH, "stager.%s_" % self.webApi))
264264
_ = _.replace("WRITABLE_DIR", utf8encode(directory.replace('/', '\\\\') if Backend.isOs(OS.WINDOWS) else directory))
265265
f.write(_)

0 commit comments

Comments
 (0)