Browse code

print more intelligent warnings, use next safe version, not highest

Hanno Böck authored on28/07/2008 02:04:20
Showing1 changed files
... ...
@@ -163,8 +163,16 @@ for fdir in args:
163 163
                         else:
164 164
                             if opts.DEBUG:
165 165
                                 print "File "+mfile
166
+                            safev=""
167
+                            for ver in item['old_safe']:
168
+                                if (versioncompare(ver.split('.'), \
169
+                                    findversion.split('.') ) ):
170
+                                    safev=ver
171
+                            if safev=="":
172
+                                safev=item['safe']
173
+
166 174
                             vulnprint (item['name'], findversion, \
167
-                                       item['safe'], item['vuln'], \
175
+                                       safev, item['vuln'], \
168 176
                                        mfile, item['subdir'], opts.FANCY)
169 177
 
170 178
                     else: