- Incorporated untrusted agents list (<untrusted> element in attack,
containing a <termlist>) - <commandline><arg>./scyther</arg> <arg>-x</arg>... is now available.
This commit is contained in:
parent
6a3e57913c
commit
a1fdbe119f
@ -4,11 +4,3 @@
|
|||||||
- Maybe it helps to fix the agents of the claim run (i.e. all different
|
- Maybe it helps to fix the agents of the claim run (i.e. all different
|
||||||
agents?, this restricts the attacks somewhat), make a switch for this.
|
agents?, this restricts the attacks somewhat), make a switch for this.
|
||||||
- SConstruct file should check whether ctags actually exists (avoiding errors)
|
- SConstruct file should check whether ctags actually exists (avoiding errors)
|
||||||
|
|
||||||
Gijs:
|
|
||||||
> Ik gebruik nu alleen wel hardcoded de naam Eve eigenlijk zouden de
|
|
||||||
> namen
|
|
||||||
> > van untrusted agents ook ergens in de XML file moeten staan. Ook
|
|
||||||
> > zou het
|
|
||||||
> > > handig zijn als de scyther command line in de XML file staat.
|
|
||||||
> > >
|
|
||||||
|
40
src/xmlout.c
40
src/xmlout.c
@ -97,6 +97,13 @@ xmlOutInteger (const char *tag, const int value)
|
|||||||
xmlPrint ("<%s>%i</%s>", tag, value, tag);
|
xmlPrint ("<%s>%i</%s>", tag, value, tag);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
//! Print a string
|
||||||
|
void
|
||||||
|
xmlOutString (const char *tag, const char *s)
|
||||||
|
{
|
||||||
|
xmlPrint ("<%s>%s</%s>", tag, s, tag);
|
||||||
|
}
|
||||||
|
|
||||||
//! Print a term in XML form (iteration inner)
|
//! Print a term in XML form (iteration inner)
|
||||||
void
|
void
|
||||||
xmlTermPrintInner (Term term)
|
xmlTermPrintInner (Term term)
|
||||||
@ -615,6 +622,35 @@ xmlInvolvedProtocolRoles (const System sys)
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
//! Untrusted agents
|
||||||
|
void
|
||||||
|
xmlUntrustedAgents (const System sys)
|
||||||
|
{
|
||||||
|
xmlPrint ("<untrusted>");
|
||||||
|
xmlindent++;
|
||||||
|
xmlTermlistPrint (sys->untrusted);
|
||||||
|
xmlindent--;
|
||||||
|
xmlPrint ("</untrusted>");
|
||||||
|
}
|
||||||
|
|
||||||
|
//! Commandline
|
||||||
|
void
|
||||||
|
xmlOutCommandline (void)
|
||||||
|
{
|
||||||
|
int i;
|
||||||
|
|
||||||
|
xmlPrint ("<commandline>");
|
||||||
|
xmlindent++;
|
||||||
|
i = 0;
|
||||||
|
while (i < switches.argc)
|
||||||
|
{
|
||||||
|
xmlPrint ("<arg>%s</arg>", switches.argv[i]);
|
||||||
|
i++;
|
||||||
|
}
|
||||||
|
xmlindent--;
|
||||||
|
xmlPrint ("</commandline>");
|
||||||
|
}
|
||||||
|
|
||||||
//! Global system info
|
//! Global system info
|
||||||
/**
|
/**
|
||||||
* To be used by concrete trace as well as semitrace output
|
* To be used by concrete trace as well as semitrace output
|
||||||
@ -625,10 +661,12 @@ xmlOutSysInfo (const System sys)
|
|||||||
xmlPrint ("<system>");
|
xmlPrint ("<system>");
|
||||||
xmlindent++;
|
xmlindent++;
|
||||||
|
|
||||||
|
xmlOutCommandline ();
|
||||||
xmlOutInteger ("match", switches.match);
|
xmlOutInteger ("match", switches.match);
|
||||||
|
|
||||||
xmlInitialKnowledge (sys);
|
xmlInitialKnowledge (sys);
|
||||||
xmlInvolvedProtocolRoles (sys);
|
xmlInvolvedProtocolRoles (sys);
|
||||||
|
xmlUntrustedAgents (sys);
|
||||||
xmlindent--;
|
xmlindent--;
|
||||||
xmlPrint ("</system>");
|
xmlPrint ("</system>");
|
||||||
}
|
}
|
||||||
@ -677,7 +715,7 @@ xmlRunInfo (const System sys, const int run)
|
|||||||
// Non-intruder run, check whether communicates with untrusted agents
|
// Non-intruder run, check whether communicates with untrusted agents
|
||||||
if (!isRunTrusted (sys, run))
|
if (!isRunTrusted (sys, run))
|
||||||
{
|
{
|
||||||
printf(" untrustedrun=\"true\"");
|
printf (" untrustedrun=\"true\"");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
printf (">");
|
printf (">");
|
||||||
|
Loading…
Reference in New Issue
Block a user