In case of Microsoft SQL Server password hash value is expanded to its components >>> pushValue(kb.forcedDbms) >>> kb.forcedDbms = DBMS.MSSQL >>> "salt: 4086ceb6" in parsePasswordHash("0x01004086ceb60c90646a8ab9889fe3ed8e5c150b5460ece8425a") True >>> kb.forcedDbms = popValu
(password)
| 1440 | return retVal |
| 1441 | |
| 1442 | def parsePasswordHash(password): |
| 1443 | """ |
| 1444 | In case of Microsoft SQL Server password hash value is expanded to its components |
| 1445 | |
| 1446 | >>> pushValue(kb.forcedDbms) |
| 1447 | >>> kb.forcedDbms = DBMS.MSSQL |
| 1448 | >>> "salt: 4086ceb6" in parsePasswordHash("0x01004086ceb60c90646a8ab9889fe3ed8e5c150b5460ece8425a") |
| 1449 | True |
| 1450 | >>> kb.forcedDbms = popValue() |
| 1451 | """ |
| 1452 | |
| 1453 | blank = ' ' * 8 |
| 1454 | |
| 1455 | if isNoneValue(password) or password == ' ': |
| 1456 | retVal = NULL |
| 1457 | else: |
| 1458 | retVal = password |
| 1459 | |
| 1460 | if Backend.isDbms(DBMS.MSSQL) and retVal != NULL and isHexEncodedString(password): |
| 1461 | retVal = "%s\n" % password |
| 1462 | retVal += "%sheader: %s\n" % (blank, password[:6]) |
| 1463 | retVal += "%ssalt: %s\n" % (blank, password[6:14]) |
| 1464 | retVal += "%smixedcase: %s\n" % (blank, password[14:54]) |
| 1465 | |
| 1466 | if password[54:]: |
| 1467 | retVal += "%suppercase: %s" % (blank, password[54:]) |
| 1468 | |
| 1469 | return retVal |
| 1470 | |
| 1471 | def cleanQuery(query): |
| 1472 | """ |
no test coverage detected
searching dependent graphs…