Updated Microsoft SQL Server signature XML file.

Minor layout adjustments to --update output messages/diff
This commit is contained in:
Bernardo Damele
2008-12-29 18:46:43 +00:00
parent 0e9873fd4f
commit 9340bf59fb
2 changed files with 45 additions and 9 deletions

View File

@@ -28,6 +28,7 @@ import difflib
import os
import re
import shutil
import sys
import tempfile
import urlparse
import zipfile
@@ -188,13 +189,8 @@ def __updateMSSQLXML():
logger.info(infoMsg)
# Compare the old XML file with the new one
differ = difflib.Differ()
differences = list(differ.compare(oldMssqlXmlList, newMssqlXmlList))
# Show only the different lines
for line in differences:
if line.startswith("-") or line.startswith("+") or line.startswith("?"):
print line.strip("\n")
diff = difflib.unified_diff(oldMssqlXmlList, newMssqlXmlList, "%s.bak" % paths.MSSQL_XML, paths.MSSQL_XML)
sys.stdout.writelines(diff)
else:
infoMsg = "no new Microsoft SQL Server versions since the "
infoMsg += "last update"
@@ -262,7 +258,7 @@ def __updateSqlmap():
logger.info(infoMsg)
elif sqlmapNewestVersion < VERSION:
infoMsg = "if you are running a version of sqlmap more updated than "
infoMsg = "you are running a version of sqlmap more updated than "
infoMsg += "the latest stable version (%s)" % sqlmapNewestVersion
logger.info(infoMsg)