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

Skip to content

Commit d0acb1c

Browse files
committed
another fix. hope it works :)
1 parent f8056f4 commit d0acb1c

2 files changed

Lines changed: 4 additions & 3 deletions

File tree

lib/contrib/multipartpost.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -54,7 +54,7 @@ def http_request(self, request):
5454

5555
try:
5656
for(key, value) in data.items():
57-
if type(value) == file:
57+
if type(value) == file or hasattr(value, 'file'):
5858
v_files.append((key, value))
5959
else:
6060
v_vars.append((key, value))

lib/takeover/web.py

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@
2424

2525
import os
2626
import re
27-
from tempfile import TemporaryFile
27+
from tempfile import NamedTemporaryFile
2828

2929
from lib.core.agent import agent
3030
from lib.core.common import fileToStr
@@ -157,7 +157,8 @@ def webInit(self):
157157
logger.warn("invalid value, it must be 1 or 3")
158158

159159
backdoorName = "backdoor.%s" % self.webApi
160-
backdoorStream = TemporaryFile()
160+
backdoorStream = NamedTemporaryFile()
161+
backdoorStream.name = backdoorName
161162
backdoorStream.write(decloak(os.path.join(paths.SQLMAP_SHELL_PATH, backdoorName + '_')))
162163
backdoorStream.seek(0)
163164

0 commit comments

Comments
 (0)