another fix. hope it works :)

This commit is contained in:
Miroslav Stampar 2010-01-27 16:01:50 +00:00
parent f8056f4098
commit d0acb1c5a3
2 changed files with 4 additions and 3 deletions

View File

@ -54,7 +54,7 @@ class MultipartPostHandler(urllib2.BaseHandler):
try: try:
for(key, value) in data.items(): for(key, value) in data.items():
if type(value) == file: if type(value) == file or hasattr(value, 'file'):
v_files.append((key, value)) v_files.append((key, value))
else: else:
v_vars.append((key, value)) v_vars.append((key, value))

View File

@ -24,7 +24,7 @@ Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
import os import os
import re import re
from tempfile import TemporaryFile from tempfile import NamedTemporaryFile
from lib.core.agent import agent from lib.core.agent import agent
from lib.core.common import fileToStr from lib.core.common import fileToStr
@ -157,7 +157,8 @@ class Web:
logger.warn("invalid value, it must be 1 or 3") logger.warn("invalid value, it must be 1 or 3")
backdoorName = "backdoor.%s" % self.webApi backdoorName = "backdoor.%s" % self.webApi
backdoorStream = TemporaryFile() backdoorStream = NamedTemporaryFile()
backdoorStream.name = backdoorName
backdoorStream.write(decloak(os.path.join(paths.SQLMAP_SHELL_PATH, backdoorName + '_'))) backdoorStream.write(decloak(os.path.join(paths.SQLMAP_SHELL_PATH, backdoorName + '_')))
backdoorStream.seek(0) backdoorStream.seek(0)