(self)
| 36 | pass |
| 37 | |
| 38 | def getRemoteTempPath(self): |
| 39 | if not conf.tmpPath and Backend.isDbms(DBMS.MSSQL): |
| 40 | debugMsg = "identifying Microsoft SQL Server error log directory " |
| 41 | debugMsg += "that sqlmap will use to store temporary files with " |
| 42 | debugMsg += "commands' output" |
| 43 | logger.debug(debugMsg) |
| 44 | |
| 45 | _ = unArrayizeValue(inject.getValue("SELECT SERVERPROPERTY('ErrorLogFileName')", safeCharEncode=False)) |
| 46 | |
| 47 | if _: |
| 48 | conf.tmpPath = ntpath.dirname(_) |
| 49 | |
| 50 | if not conf.tmpPath: |
| 51 | if Backend.isOs(OS.WINDOWS): |
| 52 | if conf.direct: |
| 53 | conf.tmpPath = "%TEMP%" |
| 54 | else: |
| 55 | self.checkDbmsOs(detailed=True) |
| 56 | |
| 57 | if Backend.getOsVersion() in ("2000", "NT"): |
| 58 | conf.tmpPath = "C:/WINNT/Temp" |
| 59 | elif Backend.isOs("XP"): |
| 60 | conf.tmpPath = "C:/Documents and Settings/All Users/Application Data/Temp" |
| 61 | else: |
| 62 | conf.tmpPath = "C:/Windows/Temp" |
| 63 | else: |
| 64 | conf.tmpPath = "/tmp" |
| 65 | |
| 66 | if re.search(r"\A[\w]:[\/\\]+", conf.tmpPath, re.I): |
| 67 | Backend.setOs(OS.WINDOWS) |
| 68 | |
| 69 | conf.tmpPath = normalizePath(conf.tmpPath) |
| 70 | conf.tmpPath = ntToPosixSlashes(conf.tmpPath) |
| 71 | |
| 72 | singleTimeDebugMessage("going to use '%s' as temporary files directory" % conf.tmpPath) |
| 73 | |
| 74 | hashDBWrite(HASHDB_KEYS.CONF_TMP_PATH, conf.tmpPath) |
| 75 | |
| 76 | return conf.tmpPath |
| 77 | |
| 78 | def getVersionFromBanner(self): |
| 79 | if "dbmsVersion" in kb.bannerFp: |
no test coverage detected