show static words in a sorted manner

This commit is contained in:
Miroslav Stampar 2010-10-14 12:38:06 +00:00
parent 255b21f2f4
commit f07608ef4d
2 changed files with 8 additions and 1 deletions

View File

@ -1150,9 +1150,16 @@ def showStaticWords(firstPage, secondPage):
commonText = firstPage[match[0]:match[0]+match[2]]
commonWords = getPageTextWordsSet(commonText)
infoMsg = "static words: "
if commonWords:
commonWords = list(commonWords)
commonWords.sort(lambda a, b: cmp(a.lower(), b.lower()))
for word in commonWords:
if len(word) > 2:
infoMsg += "'%s', " % word
infoMsg = infoMsg.rstrip(", ")
logger.info(infoMsg)
def decloakToNamedTemporaryFile(filepath, name=None):

View File

@ -1064,7 +1064,7 @@ def __setKnowledgeBaseAttributes():
kb.injPlace = None
kb.injType = None
kb.injections = xmlobject.XMLFile(path=paths.INJECTIONS_XML)
kb.keywords = getFileItems(paths.SQLKEYWORDS)
kb.keywords = set(getFileItems(paths.SQLKEYWORDS))
kb.nullConnection = None
# Back-end DBMS underlying operating system fingerprint via banner (-b)