2006-08-11 11:43:28 +01:00
|
|
|
#!/usr/bin/python
|
2007-06-11 13:09:24 +01:00
|
|
|
"""
|
|
|
|
Scyther : An automatic verifier for security protocols.
|
2013-10-05 23:56:12 +01:00
|
|
|
Copyright (C) 2007-2013 Cas Cremers
|
2007-06-11 13:09:24 +01:00
|
|
|
|
|
|
|
This program is free software; you can redistribute it and/or
|
|
|
|
modify it under the terms of the GNU General Public License
|
|
|
|
as published by the Free Software Foundation; either version 2
|
|
|
|
of the License, or (at your option) any later version.
|
|
|
|
|
|
|
|
This program is distributed in the hope that it will be useful,
|
|
|
|
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
|
|
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
|
|
GNU General Public License for more details.
|
|
|
|
|
|
|
|
You should have received a copy of the GNU General Public License
|
|
|
|
along with this program; if not, write to the Free Software
|
|
|
|
Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
|
|
|
|
"""
|
|
|
|
|
2006-08-11 11:43:28 +01:00
|
|
|
|
|
|
|
#---------------------------------------------------------------------------
|
|
|
|
|
|
|
|
""" Import externals """
|
|
|
|
import wx
|
|
|
|
import wx.html
|
2007-01-27 22:52:22 +00:00
|
|
|
import os.path
|
2006-08-11 11:43:28 +01:00
|
|
|
|
|
|
|
#---------------------------------------------------------------------------
|
|
|
|
|
|
|
|
""" Import scyther-gui components """
|
|
|
|
|
2007-05-18 13:06:29 +01:00
|
|
|
import Scyther
|
|
|
|
|
2006-08-11 11:43:28 +01:00
|
|
|
#---------------------------------------------------------------------------
|
|
|
|
|
2007-01-27 22:52:22 +00:00
|
|
|
""" Globals """
|
|
|
|
|
|
|
|
basedir = ""
|
|
|
|
|
|
|
|
#---------------------------------------------------------------------------
|
|
|
|
|
2007-05-18 13:06:29 +01:00
|
|
|
def setBaseDir(mybasedir):
|
|
|
|
global basedir
|
|
|
|
|
|
|
|
basedir = mybasedir
|
|
|
|
|
|
|
|
#---------------------------------------------------------------------------
|
|
|
|
|
2006-08-11 11:43:28 +01:00
|
|
|
class AboutScyther(wx.Dialog):
|
2007-01-27 22:52:22 +00:00
|
|
|
def __init__(self,parent,mybasedir=None):
|
2007-01-31 12:20:44 +00:00
|
|
|
|
2020-10-27 21:09:03 +00:00
|
|
|
from .Version import SCYTHER_GUI_VERSION
|
2007-01-31 12:20:44 +00:00
|
|
|
global basedir
|
|
|
|
|
2007-01-27 22:52:22 +00:00
|
|
|
self.text = '''
|
2006-08-11 11:43:28 +01:00
|
|
|
<html>
|
|
|
|
<body bgcolor="#ffffff">
|
2007-06-11 13:20:53 +01:00
|
|
|
<img src="$SPLASH">
|
|
|
|
<h5 align="right">Scyther : $VERSION</h5>
|
|
|
|
<small>
|
|
|
|
<p>
|
|
|
|
<b>Scyther</b> is an automatic tool for the verification and
|
|
|
|
falsification of security protocols.
|
|
|
|
</p>
|
|
|
|
<p>
|
|
|
|
For news and updates visit the Scyther pages at
|
2013-12-23 13:11:48 +00:00
|
|
|
<a target="_blank" href="http://www.cs.ox.ac.uk/people/cas.cremers/scyther/index.html">
|
|
|
|
http://www.cs.ox.ac.uk/people/cas.cremers/scyther/index.html</a>
|
2007-06-11 13:20:53 +01:00
|
|
|
</p>
|
|
|
|
<h5>License</h5>
|
|
|
|
<p>
|
|
|
|
Scyther : An automatic verifier for security protocols.<br>
|
2013-10-05 23:56:12 +01:00
|
|
|
Copyright (C) 2007-2013 Cas Cremers
|
2007-06-11 13:20:53 +01:00
|
|
|
</p>
|
|
|
|
<p>
|
|
|
|
This program is free software; you can redistribute it and/or
|
|
|
|
modify it under the terms of the GNU General Public License
|
|
|
|
as published by the Free Software Foundation; either version 2
|
|
|
|
of the License, or (at your option) any later version.
|
|
|
|
</p>
|
|
|
|
<p>
|
|
|
|
This program is distributed in the hope that it will be useful,
|
|
|
|
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
|
|
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
|
|
GNU General Public License for more details.
|
|
|
|
</p>
|
|
|
|
<p>
|
|
|
|
You should have received a copy of the GNU General Public License
|
|
|
|
along with this program; if not, write to the Free Software
|
|
|
|
Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
|
|
|
|
</p>
|
|
|
|
<h5>Backend version</h5>
|
|
|
|
<p>
|
|
|
|
$DETAILS
|
|
|
|
</p>
|
|
|
|
<h5>Credits</h5>
|
|
|
|
<p>
|
|
|
|
Cas Cremers (Scyther theory, backend, and main GUI
|
|
|
|
code), Gijs Hollestelle (Python parser for Scyther XML output).
|
|
|
|
</p>
|
|
|
|
</small>
|
2007-01-27 22:52:22 +00:00
|
|
|
'''
|
|
|
|
|
|
|
|
if mybasedir:
|
|
|
|
basedir = mybasedir
|
|
|
|
|
2007-05-18 13:06:29 +01:00
|
|
|
# Debugging output of some parameters
|
|
|
|
|
2007-01-27 22:52:22 +00:00
|
|
|
splashdir = os.path.join(basedir,"Images")
|
|
|
|
splashimage = os.path.join(splashdir,"scyther-splash.png")
|
2007-05-18 13:06:29 +01:00
|
|
|
details_html = "Base directory: %s<br>\n" % (basedir)
|
|
|
|
details_html += Scyther.Scyther.GetInfo(html=True)
|
|
|
|
|
2007-01-27 22:52:22 +00:00
|
|
|
self.text = self.text.replace("$SPLASH",splashimage)
|
2007-05-18 13:06:29 +01:00
|
|
|
self.text = self.text.replace("$DETAILS",details_html)
|
2007-01-27 22:52:22 +00:00
|
|
|
|
|
|
|
# version information
|
2007-05-18 13:06:29 +01:00
|
|
|
self.text = self.text.replace("$VERSION", SCYTHER_GUI_VERSION)
|
2006-08-11 11:43:28 +01:00
|
|
|
|
|
|
|
wx.Dialog.__init__(self, parent, -1, 'About Scyther',
|
2007-01-27 22:52:22 +00:00
|
|
|
size=(660,620))
|
2006-08-11 11:43:28 +01:00
|
|
|
html = wx.html.HtmlWindow(self)
|
2007-01-27 22:52:22 +00:00
|
|
|
#if "gtk2" in wx.PlatformInfo:
|
|
|
|
# html.SetStandardFonts()
|
|
|
|
html.SetBorders(10)
|
2006-08-11 11:43:28 +01:00
|
|
|
html.SetPage(self.text)
|
2007-01-27 22:52:22 +00:00
|
|
|
button = wx.Button(self, wx.ID_OK, "Close window")
|
2006-08-11 11:43:28 +01:00
|
|
|
|
|
|
|
sizer = wx.BoxSizer(wx.VERTICAL)
|
2007-01-27 22:52:22 +00:00
|
|
|
sizer.Add(html, 1, wx.EXPAND|wx.ALL,0)
|
2006-08-11 11:43:28 +01:00
|
|
|
sizer.Add(button,0,wx.ALIGN_CENTER|wx.ALL,5)
|
|
|
|
|
|
|
|
self.SetSizer(sizer)
|
|
|
|
self.Layout()
|
|
|
|
|
2007-01-27 22:52:22 +00:00
|
|
|
# vim: set ts=4 sw=4 et list lcs=tab\:>-:
|