This page hosts a formal specification of Hashcat Restore file using Kaitai Struct. This specification can be automatically translated into a variety of programming languages to get a parsing library.
digraph {
rankdir=LR;
node [shape=plaintext];
subgraph cluster__hashcat_restore {
label="HashcatRestore";
graph[style=dotted];
hashcat_restore__seq [label=<<TABLE BORDER="0" CELLBORDER="1" CELLSPACING="0">
<TR><TD BGCOLOR="#E0FFE0">pos</TD><TD BGCOLOR="#E0FFE0">size</TD><TD BGCOLOR="#E0FFE0">type</TD><TD BGCOLOR="#E0FFE0">id</TD></TR>
<TR><TD PORT="version_pos">0</TD><TD PORT="version_size">4</TD><TD>u4le</TD><TD PORT="version_type">version</TD></TR>
<TR><TD PORT="cwd_pos">4</TD><TD PORT="cwd_size">256</TD><TD>str(UTF-8)</TD><TD PORT="cwd_type">cwd</TD></TR>
<TR><TD PORT="dicts_pos_pos">260</TD><TD PORT="dicts_pos_size">4</TD><TD>u4le</TD><TD PORT="dicts_pos_type">dicts_pos</TD></TR>
<TR><TD PORT="masks_pos_pos">264</TD><TD PORT="masks_pos_size">4</TD><TD>u4le</TD><TD PORT="masks_pos_type">masks_pos</TD></TR>
<TR><TD PORT="padding_pos">268</TD><TD PORT="padding_size">4</TD><TD></TD><TD PORT="padding_type">padding</TD></TR>
<TR><TD PORT="current_restore_point_pos">272</TD><TD PORT="current_restore_point_size">8</TD><TD>u8le</TD><TD PORT="current_restore_point_type">current_restore_point</TD></TR>
<TR><TD PORT="argc_pos">280</TD><TD PORT="argc_size">4</TD><TD>u4le</TD><TD PORT="argc_type">argc</TD></TR>
<TR><TD PORT="padding2_pos">284</TD><TD PORT="padding2_size">12</TD><TD></TD><TD PORT="padding2_type">padding2</TD></TR>
<TR><TD PORT="argv_pos">296</TD><TD PORT="argv_size">...</TD><TD>str(term=10, UTF-8)</TD><TD PORT="argv_type">argv</TD></TR>
<TR><TD COLSPAN="4" PORT="argv__repeat">repeat argc times</TD></TR>
</TABLE>>];
}
hashcat_restore__seq:argc_type -> hashcat_restore__seq:argv__repeat [color="#404040"];
}