Skip to content

Commit 9340bf5

Browse files
committed
Updated Microsoft SQL Server signature XML file.
Minor layout adjustments to --update output messages/diff
1 parent 0e9873f commit 9340bf5

File tree

2 files changed

+45
-9
lines changed

2 files changed

+45
-9
lines changed

lib/core/update.py

Lines changed: 4 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,7 @@
2828
import os
2929
import re
3030
import shutil
31+
import sys
3132
import tempfile
3233
import urlparse
3334
import zipfile
@@ -188,13 +189,8 @@ def __updateMSSQLXML():
188189
logger.info(infoMsg)
189190

190191
# Compare the old XML file with the new one
191-
differ = difflib.Differ()
192-
differences = list(differ.compare(oldMssqlXmlList, newMssqlXmlList))
193-
194-
# Show only the different lines
195-
for line in differences:
196-
if line.startswith("-") or line.startswith("+") or line.startswith("?"):
197-
print line.strip("\n")
192+
diff = difflib.unified_diff(oldMssqlXmlList, newMssqlXmlList, "%s.bak" % paths.MSSQL_XML, paths.MSSQL_XML)
193+
sys.stdout.writelines(diff)
198194
else:
199195
infoMsg = "no new Microsoft SQL Server versions since the "
200196
infoMsg += "last update"
@@ -262,7 +258,7 @@ def __updateSqlmap():
262258
logger.info(infoMsg)
263259

264260
elif sqlmapNewestVersion < VERSION:
265-
infoMsg = "if you are running a version of sqlmap more updated than "
261+
infoMsg = "you are running a version of sqlmap more updated than "
266262
infoMsg += "the latest stable version (%s)" % sqlmapNewestVersion
267263
logger.info(infoMsg)
268264

xml/banner/mssql.xml

Lines changed: 41 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
10.00.1750
77
</version>
88
<servicepack>
9-
0+Q956718
9+
+Q956718
1010
</servicepack>
1111
</signature>
1212
<signature>
@@ -43,6 +43,30 @@
4343
</signature>
4444
</signatures>
4545
<signatures release="2005">
46+
<signature>
47+
<version>
48+
9.00.4035
49+
</version>
50+
<servicepack>
51+
+3
52+
</servicepack>
53+
</signature>
54+
<signature>
55+
<version>
56+
9.00.3301
57+
</version>
58+
<servicepack>
59+
2+Q958735
60+
</servicepack>
61+
</signature>
62+
<signature>
63+
<version>
64+
9.00.3295
65+
</version>
66+
<servicepack>
67+
2+Q959132
68+
</servicepack>
69+
</signature>
4670
<signature>
4771
<version>
4872
9.00.3294
@@ -51,6 +75,14 @@
5175
2+Q956854
5276
</servicepack>
5377
</signature>
78+
<signature>
79+
<version>
80+
9.00.3291
81+
</version>
82+
<servicepack>
83+
2+Q956889
84+
</servicepack>
85+
</signature>
5486
<signature>
5587
<version>
5688
9.00.3282
@@ -67,6 +99,14 @@
6799
2+Q954607
68100
</servicepack>
69101
</signature>
102+
<signature>
103+
<version>
104+
9.00.3261
105+
</version>
106+
<servicepack>
107+
2+Q955754
108+
</servicepack>
109+
</signature>
70110
<signature>
71111
<version>
72112
9.00.3260

0 commit comments

Comments
 (0)