Update on Overleaf.

This commit is contained in:
nb72soza Bittner
2025-05-27 23:23:07 +00:00
committed by node
parent 463c45f08d
commit ca61978462
3 changed files with 151 additions and 63 deletions

View File

@@ -0,0 +1,55 @@
\begin{tikzpicture}[
node distance=0.8cm and 1.1cm,
box/.style={draw, rounded corners, minimum width=3cm, minimum height=1cm, align=center},
arrow/.style={-{Stealth}, thick},
decision/.style={diamond, draw, aspect=2, align=center},
io/.style={trapezium, trapezium left angle=70, trapezium right angle=110, draw, minimum width=2.5cm, align=center}
]
% Nodes
\node[box] (start) {record\_card():\\ Init PcscLink, Card, Recorder};
\node[box, below=of start] (scenarioLoop) {For each Scenario\\ Instantiate and Run Scenario.run(card)};
\node[box, below=of scenarioLoop] (isdrcall) {Card ISD-R command};
% Mutation engine path
\node[decision, below=of isdrcall] (mutateQ) {Mutation Engine?};
\node[box, right=1.2cm of mutateQ] (originalAPDU) {Send original APDU};
\node[box, left=1.2cm of mutateQ] (mutateAPDU) {Mutate APDU};
\node[box, below=of mutateQ] (sendAPDU) {Transmit APDU to card};
\node[box, below=of sendAPDU] (record) {Record mutation result\\ in OperationRecorder};
% Error / reset path
\node[decision, below=of record] (errorQ) {Exception during scenario?};
\node[box, left=of errorQ] (logFail) {Log failure\\ in current mutation node};
\node[box, below=of errorQ] (checkTree) {All mutations tried?};
\node[box, right=of checkTree] (repeatScenario) {Repeat Scenario};
\node[box, below=of checkTree] (saveFile) {Save .resim file};
\node[box, below=of saveFile] (clearReset) {Clear recorder,\\ Reset card};
% Arrows
\draw[arrow] (start) -- (scenarioLoop);
\draw[arrow] (scenarioLoop) -- (isdrcall);
\draw[arrow] (isdrcall) -- (mutateQ);
\draw[arrow] (mutateQ) -- node[above] {No} (originalAPDU);
\draw[arrow] (mutateQ) -- node[above] {Yes} (mutateAPDU);
\draw[arrow] (mutateAPDU) |- (sendAPDU);
\draw[arrow] (originalAPDU) |- (sendAPDU);
\draw[arrow] (sendAPDU) -- (record);
\draw[arrow] (record) -- (errorQ);
\draw[arrow] (errorQ) -- node[above] {Yes} (logFail);
\draw[arrow] (logFail) |- (checkTree);
\draw[arrow] (errorQ) -- node[above] {No} (checkTree);
\draw[arrow] (checkTree) -- node[above] {No} (repeatScenario);
\draw[arrow] (checkTree) -- node[right] {Yes} (saveFile);
\draw[arrow] (saveFile) -- (clearReset);
\end{tikzpicture}