mirror of
https://github.com/sqlmapproject/sqlmap.git
synced 2024-11-28 20:43:49 +03:00
Minor bug fix so now when the back-end DBMS operating system is Windows 2000, it sets the temporary folder automatically to C:\WINNT\Temp - the user does not need to provide it anymore with --tmp-path C:\\WINNT\\Temp
This commit is contained in:
parent
0043336620
commit
5e853cae64
|
@ -150,10 +150,11 @@ class Fingerprint(GenericFingerprint):
|
|||
|
||||
# Get back-end DBMS underlying operating system version
|
||||
for version, data in versions.items():
|
||||
query = "(SELECT LEN(%s) FROM %s WHERE %s " % (self.tblField, self.fileTblName, self.tblField)
|
||||
query += "LIKE '%Windows NT " + data[0] + "%')>0"
|
||||
query = "SELECT LEN(%s) FROM %s WHERE %s " % (self.tblField, self.fileTblName, self.tblField)
|
||||
query += "LIKE '%Windows NT " + data[0] + "%'"
|
||||
result = inject.goStacked(query)
|
||||
|
||||
if inject.checkBooleanExpression(query):
|
||||
if result is not None and result.isdigit():
|
||||
Backend.setOsVersion(version)
|
||||
infoMsg += " %s" % Backend.getOsVersion()
|
||||
break
|
||||
|
@ -175,10 +176,11 @@ class Fingerprint(GenericFingerprint):
|
|||
sps = versions[Backend.getOsVersion()][1]
|
||||
|
||||
for sp in sps:
|
||||
query = "(SELECT LEN(%s) FROM %s WHERE %s " % (self.tblField, self.fileTblName, self.tblField)
|
||||
query += "LIKE '%Service Pack " + getUnicode(sp) + "%')>0"
|
||||
query = "SELECT LEN(%s) FROM %s WHERE %s " % (self.tblField, self.fileTblName, self.tblField)
|
||||
query += "LIKE '%Service Pack " + getUnicode(sp) + "%'"
|
||||
result = inject.goStacked(query)
|
||||
|
||||
if inject.checkBooleanExpression(query):
|
||||
if result is not None and result.isdigit():
|
||||
Backend.setOsServicePack(sp)
|
||||
break
|
||||
|
||||
|
|
|
@ -39,6 +39,8 @@ class Miscellaneous:
|
|||
def getRemoteTempPath(self):
|
||||
if not conf.tmpPath:
|
||||
if Backend.isOs(OS.WINDOWS):
|
||||
self.checkDbmsOs(detailed=True)
|
||||
|
||||
if Backend.getOsVersion() == "2000":
|
||||
conf.tmpPath = "C:/WINNT/Temp"
|
||||
else:
|
||||
|
|
Loading…
Reference in New Issue
Block a user