mirror of
https://github.com/sqlmapproject/sqlmap.git
synced 2026-08-04 06:50:14 +00:00
Major bug fix in multipartpost and minor adjustments elsewhere
This commit is contained in:
parent
06af405efd
commit
10521b68eb
5 changed files with 30 additions and 23 deletions
|
|
@ -22,6 +22,7 @@ with sqlmap; if not, write to the Free Software Foundation, Inc., 51
|
|||
Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
|
||||
"""
|
||||
|
||||
import codecs
|
||||
import os
|
||||
import posixpath
|
||||
import re
|
||||
|
|
@ -82,13 +83,15 @@ class Web:
|
|||
return output
|
||||
|
||||
def webFileUpload(self, fileToUpload, destFileName, directory):
|
||||
inputFile = open(fileToUpload, "r")
|
||||
retVal = self.__webFileStreamUpload(inputFile, destFileName, directory)
|
||||
inputFile.close()
|
||||
inputFP = codecs.open(fileToUpload, "rb")
|
||||
retVal = self.__webFileStreamUpload(inputFP, destFileName, directory)
|
||||
inputFP.close()
|
||||
|
||||
return retVal
|
||||
|
||||
def __webFileStreamUpload(self, stream, destFileName, directory):
|
||||
stream.seek(0) #rewind
|
||||
stream.seek(0) # Rewind
|
||||
|
||||
if self.webApi in ("php", "asp"):
|
||||
multipartParams = {
|
||||
"upload": "1",
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue