File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -228,7 +228,7 @@ def getDocRoot():
228228 pagePath = os .path .dirname (conf .path )
229229
230230 if kb .os == "Windows" :
231- defaultDocRoot = "C:\\ Inetput \\ wwwroot\\ "
231+ defaultDocRoot = "C:/Inetpub/ wwwroot/ "
232232 else :
233233 defaultDocRoot = "/var/www/"
234234
@@ -247,7 +247,7 @@ def getDocRoot():
247247 docRoot = absFilePath [:index ]
248248
249249 if absFilePathWin :
250- docRoot = "C:\\ %s" % docRoot .replace ("/ " , "\\ " )
250+ docRoot = "C:/ %s" % docRoot .replace ("\\ " , "/ " )
251251
252252 break
253253
@@ -274,7 +274,7 @@ def getDirs():
274274 directories = set ()
275275
276276 if kb .os == "Windows" :
277- defaultDir = "C:\\ Inetput \\ wwwroot\\ test\\ "
277+ defaultDir = "C:/Inetpub/ wwwroot/ test/ "
278278 else :
279279 defaultDir = "/var/www/test/"
280280
Original file line number Diff line number Diff line change @@ -137,14 +137,9 @@ def __webBackdoorInit(self):
137137 uploaderName = "uploader.php"
138138 uploaderStr = fileToStr ("%s/%s" % (paths .SQLMAP_SHELL_PATH , uploaderName ))
139139
140- if kb .os == "Windows" :
141- sep = "\\ \\ "
142- else :
143- sep = "/"
144-
145140 for directory in directories :
146141 # Upload the uploader agent
147- outFile = os .path .normpath ("%s%s%s " % (directory , sep , uploaderName ))
142+ outFile = os .path .normpath ("%s/%s " % (directory , uploaderName ))
148143 uplQuery = uploaderStr .replace ("WRITABLE_DIR" , directory )
149144 query = " LIMIT 1 INTO OUTFILE '%s' " % outFile
150145 query += "LINES TERMINATED BY 0x%s --" % hexencode (uplQuery )
You can’t perform that action at this time.
0 commit comments