File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 77
88from lib .core .common import Backend
99from lib .core .common import Format
10+ from lib .core .common import unArrayizeValue
1011from lib .core .data import conf
1112from lib .core .data import kb
1213from lib .core .data import logger
@@ -98,12 +99,17 @@ def checkDbms(self):
9899 infoMsg = "actively fingerprinting %s" % DBMS .SYBASE
99100 logger .info (infoMsg )
100101
101- for version in xrange (6 , 17 ):
102- result = inject .checkBooleanExpression ("PATINDEX('%%/%d[./]%%',@@VERSION)>0" % version )
102+ result = unArrayizeValue (inject .getValue ("SUBSTRING(@@VERSION,1,1)" ))
103103
104- if result :
105- Backend .setVersion (str (version ))
106- break
104+ if result and result .isdigit ():
105+ Backend .setVersion (str (result ))
106+ else :
107+ for version in xrange (12 , 16 ):
108+ result = inject .checkBooleanExpression ("PATINDEX('%%/%d[./]%%',@@VERSION)>0" % version )
109+
110+ if result :
111+ Backend .setVersion (str (version ))
112+ break
107113
108114 return True
109115 else :
You can’t perform that action at this time.
0 commit comments