@@ -41,6 +41,23 @@ def unSafeFormatString(value):
4141 retVal = retVal .replace ("__LEFT_SQUARE_BRACKET__" , "[" ).replace ("__RIGHT_SQUARE_BRACKET__" , "]" )
4242 return retVal
4343
44+ def setTestedTechniques ():
45+ """
46+ Save information retrieved about dynamic markings to the
47+ session file.
48+ """
49+
50+ condition = (
51+ ( not kb .resumedQueries
52+ or ( kb .resumedQueries .has_key (conf .url ) and
53+ not kb .resumedQueries [conf .url ].has_key ("Tested techniques" )) )
54+ or ( kb .resumedQueries [conf .url ].has_key ("Tested techniques" )
55+ and base64unpickle (kb .resumedQueries [conf .url ]["Tested techniques" ][:- 1 ]) != conf .tech
56+ ) )
57+
58+ if condition :
59+ dataToSessionFile ("[%s][%s][%s][Tested techniques][%s]\n " % (conf .url , None , None , base64pickle (conf .tech )))
60+
4461def setInjection (inj ):
4562 """
4663 Save information retrieved about injection place and parameter in the
@@ -51,7 +68,7 @@ def setInjection(inj):
5168 or ( kb .resumedQueries .has_key (conf .url ) and
5269 not kb .resumedQueries [conf .url ].has_key ("Injection data" ))
5370 or ( kb .resumedQueries [conf .url ].has_key ("Injection data" )
54- and intersect (base64unpickle (kb .resumedQueries [conf .url ]["Injection data" ][:- 1 ]).data .keys (),\
71+ and intersect (base64unpickle (kb .resumedQueries [conf .url ]["Injection data" ][:- 1 ]).data .keys (), \
5572 inj .data .keys ()) != inj .data .keys ()
5673 ) )
5774
@@ -165,7 +182,12 @@ def setXpCmdshellAvailability(available):
165182 dataToSessionFile ("[%s][%s][%s][xp_cmdshell availability][%s]\n " % (conf .url , kb .injection .place , safeFormatString (conf .parameters [kb .injection .place ]), str (available ).lower ()))
166183
167184def resumeConfKb (expression , url , value ):
168- if expression == "Injection data" and url == conf .url :
185+ if expression == "Tested techniques" and url == conf .url :
186+ kb .tested .extend (base64unpickle (value [:- 1 ]))
187+ kb .tested = list (set (kb .tested ))
188+ kb .tested .sort ()
189+
190+ elif expression == "Injection data" and url == conf .url :
169191 injection = base64unpickle (value [:- 1 ])
170192
171193 if injection .place in conf .paramDict and \
0 commit comments