diff --git a/gui/Scyther/Scyther.py b/gui/Scyther/Scyther.py index d0a9294..6b9b080 100755 --- a/gui/Scyther/Scyther.py +++ b/gui/Scyther/Scyther.py @@ -10,7 +10,6 @@ import os import os.path import sys import StringIO -import tempfile #--------------------------------------------------------------------------- @@ -37,6 +36,7 @@ class Scyther(object): # Init self.spdl = None self.inputfile = None + self.options = "" self.claims = None self.errors = None self.errorcount = 0 @@ -103,13 +103,19 @@ class Scyther(object): stderr.close() if self.xml: + self.validxml = False if len(output) > 0: + if output.startswith(""): + self.validxml = True + + if self.validxml: xmlfile = StringIO.StringIO(output) reader = XMLReader.XMLReader() self.claims = reader.readXML(xmlfile) else: - # no output... + # no xml output... store whatever comes out self.claims = [] + self.output = output result = self.claims else: self.output = output @@ -130,8 +136,8 @@ class Scyther(object): if self.errorcount > 0: return "%i errors:\n%s" % (self.errorcount, "\n".join(self.errors)) else: - if self.xml: - s = "Claim results:\n" + if self.xml and self.validxml: + s = "Verification results:\n" for cl in self.claims: s += str(cl) + "\n" return s @@ -141,29 +147,3 @@ class Scyther(object): return "Scyther has not been run yet." -def basicTest(): - # Some basic testing - #if sys.platform.startswith('win'): - # print "Dir test" - # p = os.popen("dir") - # print p.read() - # print p.close() - # confirm("See the dir?") - # - print "I don't know what to test now." - - -def simpleRun(args): - x = Scyther() - x.options = args - x.verify() - return x - -if __name__ == '__main__': - pars = sys.argv[1:] - if len(pars) == 0: - basicTest() - else: - print simpleRun(" ".join(pars)) - - diff --git a/gui/scyther.py b/gui/scyther.py index 7fcf6d2..4e147ef 100755 --- a/gui/scyther.py +++ b/gui/scyther.py @@ -1,6 +1,6 @@ #!/usr/bin/python # -# Scyther interface +# python wrapper for the Scyther command-line tool # #--------------------------------------------------------------------------- diff --git a/gui/todo.txt b/gui/todo.txt index a4f2b01..1749e7f 100644 --- a/gui/todo.txt +++ b/gui/todo.txt @@ -1,8 +1,17 @@ +URGENT +- Splash screen image is not located correctly (after dir move), causing + the windows version to break. + +TO BE DONE +- Verify buttons need redesign and must be smaller (or maybe simply move + to text) +- Windows buttons are not visible now. + +WOULD LIKE TO HAVE +- Attacks are not kept centered well. - Ideally we somehow color the correct/incorrect tags in the editor. - Line numbering is needed for the editor window otherwise you cannot - interpret attacks. -- Bottom bar should have obvious 'view' buttons for attacks that provide - views, to guide the user. + interpret attacks. Probably use wx.Py editor things. - Preferences window. - Save in local file on close. - Scyther executable should be able to be set by means of preferences.