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:
Bernardo Damele 2012-01-13 18:08:44 +00:00
parent 0043336620
commit 5e853cae64
2 changed files with 10 additions and 6 deletions

View File

@ -150,10 +150,11 @@ class Fingerprint(GenericFingerprint):
# Get back-end DBMS underlying operating system version # Get back-end DBMS underlying operating system version
for version, data in versions.items(): for version, data in versions.items():
query = "(SELECT LEN(%s) FROM %s WHERE %s " % (self.tblField, self.fileTblName, self.tblField) query = "SELECT LEN(%s) FROM %s WHERE %s " % (self.tblField, self.fileTblName, self.tblField)
query += "LIKE '%Windows NT " + data[0] + "%')>0" 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) Backend.setOsVersion(version)
infoMsg += " %s" % Backend.getOsVersion() infoMsg += " %s" % Backend.getOsVersion()
break break
@ -175,10 +176,11 @@ class Fingerprint(GenericFingerprint):
sps = versions[Backend.getOsVersion()][1] sps = versions[Backend.getOsVersion()][1]
for sp in sps: for sp in sps:
query = "(SELECT LEN(%s) FROM %s WHERE %s " % (self.tblField, self.fileTblName, self.tblField) query = "SELECT LEN(%s) FROM %s WHERE %s " % (self.tblField, self.fileTblName, self.tblField)
query += "LIKE '%Service Pack " + getUnicode(sp) + "%')>0" 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) Backend.setOsServicePack(sp)
break break

View File

@ -39,6 +39,8 @@ class Miscellaneous:
def getRemoteTempPath(self): def getRemoteTempPath(self):
if not conf.tmpPath: if not conf.tmpPath:
if Backend.isOs(OS.WINDOWS): if Backend.isOs(OS.WINDOWS):
self.checkDbmsOs(detailed=True)
if Backend.getOsVersion() == "2000": if Backend.getOsVersion() == "2000":
conf.tmpPath = "C:/WINNT/Temp" conf.tmpPath = "C:/WINNT/Temp"
else: else: