From 79e664c181d1768b1abf8cc85988ca2a9681ba1e Mon Sep 17 00:00:00 2001 From: ccremers Date: Fri, 11 Aug 2006 17:25:34 +0000 Subject: [PATCH] - Improved stuff for mpa attacks. - Some todo addition. --- gui/mpa.py | 25 +++++++++++++++++-------- gui/todo.txt | 4 +++- 2 files changed, 20 insertions(+), 9 deletions(-) diff --git a/gui/mpa.py b/gui/mpa.py index 7faf026..3cf10a7 100755 --- a/gui/mpa.py +++ b/gui/mpa.py @@ -2,7 +2,11 @@ """ -Test script to execute multi-protocol attacks on some test set. +Example script to show how to perform large-scale tests using the +Scyther Python API (contained in the Scyther subdirectory) + +In this example, multi-protocol attack analysis is performed on a small +test set. """ @@ -111,21 +115,26 @@ def findAllMPA(protocolset,maxcount=3): """ Given a set of protocols, find multi-protocol attacks """ - (protocolset,correct) = getCorrectIsolatedClaims(protocolset) - print correct - for (protocol,claimid) in correct: - mpalist = findMPA(protocolset,protocol,claimid,maxcount=3) - if mpalist: - print "Darn, MPA on %s (%s) using %s" % (claimid,protocol,mpalist) + # Find all correct claims in each protocol + (protocolset,correct) = getCorrectIsolatedClaims(protocolset) + # For all these claims... + for (protocol,claimid) in correct: + # Try to find multi-protocol attacks + findMPA(protocolset,protocol,claimid,maxcount=3) if __name__ == '__main__': """ - Simple test case + Simple test case with a few protocols """ + list = ['me.spdl','ns3.spdl','nsl3.spdl'] + print "Performing multi-protocol analysis for the following protocols:", list + print findAllMPA(list) + print + print "Analysis complete." diff --git a/gui/todo.txt b/gui/todo.txt index 62fc156..91d0181 100644 --- a/gui/todo.txt +++ b/gui/todo.txt @@ -11,7 +11,9 @@ WOULD LIKE TO HAVE - Font selector for graphs. - Nice graph scaling for all platforms (now only supported under Linux - using the Python Imaging Library through postscript) + using the Python Imaging Library through postscript; currently + wxPython does not support any cross-platform vector format out of the + box, as SVG is still only a non-default build option.) - Support for using an external editor. - toggle for 'watch file'. - toggle for 'auto-verify on change' or something like that.