All functions are compatible to Iceman/RRG fork

Use different foreground color for Trailer block and Block 0
pull/14/head
wh201906 4 years ago
parent 63f3424871
commit 4f10e3d75c

1
.gitignore vendored

@ -14,7 +14,6 @@
*.so.* *.so.*
*_pch.h.cpp *_pch.h.cpp
*_resource.rc *_resource.rc
*.qm
.#* .#*
*.*# *.*#
core core

Binary file not shown.

@ -45,72 +45,102 @@
<translation type="unfinished"></translation> <translation type="unfinished"></translation>
</message> </message>
<message> <message>
<location filename="../ui/mf_sim_simdialog.ui" line="37"/> <location filename="../ui/mf_sim_simdialog.ui" line="38"/>
<source>u</source> <source>u</source>
<translation type="unfinished"></translation> <translation type="unfinished"></translation>
</message> </message>
<message> <message>
<location filename="../ui/mf_sim_simdialog.ui" line="66"/> <location filename="../ui/mf_sim_simdialog.ui" line="67"/>
<source>UID 4 or 7 bytes. If not specified, the UID 4B from emulator memory will be used</source> <source>UID 4 or 7 bytes. If not specified, the UID 4B from emulator memory will be used</source>
<translation type="unfinished"></translation> <translation type="unfinished"></translation>
</message> </message>
<message> <message>
<location filename="../ui/mf_sim_simdialog.ui" line="87"/> <location filename="../ui/mf_sim_simdialog.ui" line="105"/>
<source>--atqa</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../ui/mf_sim_simdialog.ui" line="134"/>
<source>Provide explicit ATQA (2 bytes)</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../ui/mf_sim_simdialog.ui" line="172"/>
<source>--sak</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../ui/mf_sim_simdialog.ui" line="239"/>
<source>n</source> <source>n</source>
<translation type="unfinished"></translation> <translation type="unfinished"></translation>
</message> </message>
<message> <message>
<location filename="../ui/mf_sim_simdialog.ui" line="116"/> <location filename="../ui/mf_sim_simdialog.ui" line="268"/>
<source>Automatically exit simulation after &lt;numreads&gt; blocks have been read by reader. 0 = infinite</source> <source>Automatically exit simulation after &lt;numreads&gt; blocks have been read by reader. 0 = infinite</source>
<translation type="unfinished"></translation> <translation type="unfinished"></translation>
</message> </message>
<message> <message>
<location filename="../ui/mf_sim_simdialog.ui" line="137"/> <location filename="../ui/mf_sim_simdialog.ui" line="306"/>
<source>i</source> <source>i</source>
<translation type="unfinished"></translation> <translation type="unfinished"></translation>
</message> </message>
<message> <message>
<location filename="../ui/mf_sim_simdialog.ui" line="150"/> <location filename="../ui/mf_sim_simdialog.ui" line="319"/>
<source>Interactive, means that console will not be returned until simulation finishes or is aborted</source> <source>Interactive, means that console will not be returned until simulation finishes or is aborted</source>
<translation type="unfinished"></translation> <translation type="unfinished"></translation>
</message> </message>
<message> <message>
<location filename="../ui/mf_sim_simdialog.ui" line="171"/> <location filename="../ui/mf_sim_simdialog.ui" line="357"/>
<source>x</source> <source>x</source>
<translation type="unfinished"></translation> <translation type="unfinished"></translation>
</message> </message>
<message> <message>
<location filename="../ui/mf_sim_simdialog.ui" line="184"/> <location filename="../ui/mf_sim_simdialog.ui" line="370"/>
<source>Crack, performs the &apos;reader attack&apos;, nr/ar attack against a legitimate reader, fishes out the key(s)</source> <source>Crack, performs the &apos;reader attack&apos;, nr/ar attack against a legitimate reader, fishes out the key(s)</source>
<translation type="unfinished"></translation> <translation type="unfinished"></translation>
</message> </message>
<message> <message>
<location filename="../ui/mf_sim_simdialog.ui" line="205"/> <location filename="../ui/mf_sim_simdialog.ui" line="408"/>
<source>e</source> <source>e</source>
<translation type="unfinished"></translation> <translation type="unfinished"></translation>
</message> </message>
<message> <message>
<location filename="../ui/mf_sim_simdialog.ui" line="218"/> <location filename="../ui/mf_sim_simdialog.ui" line="421"/>
<source>set keys found from &apos;reader attack&apos; to emulator memory (implies x and i)</source> <source>set keys found from &apos;reader attack&apos; to emulator memory (implies x(--crack) and i)</source>
<translation type="unfinished"></translation> <translation type="unfinished"></translation>
</message> </message>
<message> <message>
<location filename="../ui/mf_sim_simdialog.ui" line="239"/> <location filename="../ui/mf_sim_simdialog.ui" line="577"/>
<source>-v</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../ui/mf_sim_simdialog.ui" line="590"/>
<source>verbose output</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../ui/mf_sim_simdialog.ui" line="459"/>
<source>f</source> <source>f</source>
<translation type="unfinished"></translation> <translation type="unfinished"></translation>
</message> </message>
<message> <message>
<location filename="../ui/mf_sim_simdialog.ui" line="268"/> <location filename="../ui/mf_sim_simdialog.ui" line="201"/>
<source>Provide explicit SAK (1 byte)</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../ui/mf_sim_simdialog.ui" line="488"/>
<source>get UIDs to use for &apos;reader attack&apos; from file &apos;f &lt;filename.txt&gt;&apos; (implies x and i)</source> <source>get UIDs to use for &apos;reader attack&apos; from file &apos;f &lt;filename.txt&gt;&apos; (implies x and i)</source>
<translation type="unfinished"></translation> <translation type="unfinished"></translation>
</message> </message>
<message> <message>
<location filename="../ui/mf_sim_simdialog.ui" line="289"/> <location filename="../ui/mf_sim_simdialog.ui" line="526"/>
<source>r</source> <source>r</source>
<translation type="unfinished"></translation> <translation type="unfinished"></translation>
</message> </message>
<message> <message>
<location filename="../ui/mf_sim_simdialog.ui" line="302"/> <location filename="../ui/mf_sim_simdialog.ui" line="539"/>
<source>Generate random nonces instead of sequential nonces. Standard reader attack won&apos;t work with this option, only moebius attack works</source> <source>Generate random nonces instead of sequential nonces. Standard reader attack won&apos;t work with this option, only moebius attack works</source>
<translation type="unfinished"></translation> <translation type="unfinished"></translation>
</message> </message>
@ -352,7 +382,7 @@ It could make the whole sector blocked irreversibly!</source>
</message> </message>
<message> <message>
<location filename="../ui/mainwindow.ui" line="493"/> <location filename="../ui/mainwindow.ui" line="493"/>
<location filename="../ui/mainwindow.cpp" line="918"/> <location filename="../ui/mainwindow.cpp" line="921"/>
<source>Data</source> <source>Data</source>
<translation type="unfinished"></translation> <translation type="unfinished"></translation>
</message> </message>
@ -411,11 +441,6 @@ It could make the whole sector blocked irreversibly!</source>
<source>Key Type:</source> <source>Key Type:</source>
<translation type="unfinished"></translation> <translation type="unfinished"></translation>
</message> </message>
<message>
<location filename="../ui/mainwindow.ui" line="1140"/>
<source>Snoop</source>
<translation type="unfinished"></translation>
</message>
<message> <message>
<location filename="../ui/mainwindow.ui" line="1153"/> <location filename="../ui/mainwindow.ui" line="1153"/>
<source>List Data</source> <source>List Data</source>
@ -556,6 +581,11 @@ It could make the whole sector blocked irreversibly!</source>
<source>Sniff</source> <source>Sniff</source>
<translation type="unfinished"></translation> <translation type="unfinished"></translation>
</message> </message>
<message>
<location filename="../ui/mainwindow.ui" line="1140"/>
<source>Sniff(14a)</source>
<translation type="unfinished"></translation>
</message>
<message> <message>
<location filename="../ui/mainwindow.ui" line="1208"/> <location filename="../ui/mainwindow.ui" line="1208"/>
<source>LF/Data</source> <source>LF/Data</source>
@ -739,7 +769,7 @@ or &quot;-p &lt;port&gt; -f&quot;</source>
</message> </message>
<message> <message>
<location filename="../ui/mainwindow.cpp" line="134"/> <location filename="../ui/mainwindow.cpp" line="134"/>
<location filename="../ui/mainwindow.cpp" line="906"/> <location filename="../ui/mainwindow.cpp" line="909"/>
<source>Not Connected</source> <source>Not Connected</source>
<translation type="unfinished"></translation> <translation type="unfinished"></translation>
</message> </message>
@ -934,54 +964,54 @@ or &quot;-p &lt;port&gt; -f&quot;</source>
<translation type="unfinished"></translation> <translation type="unfinished"></translation>
</message> </message>
<message> <message>
<location filename="../ui/mainwindow.cpp" line="907"/> <location filename="../ui/mainwindow.cpp" line="910"/>
<location filename="../ui/mainwindow.cpp" line="1076"/> <location filename="../ui/mainwindow.cpp" line="1079"/>
<source>Idle</source> <source>Idle</source>
<translation type="unfinished"></translation> <translation type="unfinished"></translation>
</message> </message>
<message> <message>
<location filename="../ui/mainwindow.cpp" line="909"/> <location filename="../ui/mainwindow.cpp" line="912"/>
<source>Stop</source> <source>Stop</source>
<translation type="unfinished"></translation> <translation type="unfinished"></translation>
</message> </message>
<message> <message>
<location filename="../ui/mainwindow.cpp" line="916"/> <location filename="../ui/mainwindow.cpp" line="919"/>
<location filename="../ui/mainwindow.cpp" line="923"/> <location filename="../ui/mainwindow.cpp" line="926"/>
<source>Sec</source> <source>Sec</source>
<translation type="unfinished"></translation> <translation type="unfinished"></translation>
</message> </message>
<message> <message>
<location filename="../ui/mainwindow.cpp" line="917"/> <location filename="../ui/mainwindow.cpp" line="920"/>
<source>Blk</source> <source>Blk</source>
<translation type="unfinished"></translation> <translation type="unfinished"></translation>
</message> </message>
<message> <message>
<location filename="../ui/mainwindow.cpp" line="924"/> <location filename="../ui/mainwindow.cpp" line="927"/>
<source>KeyA</source> <source>KeyA</source>
<translation type="unfinished"></translation> <translation type="unfinished"></translation>
</message> </message>
<message> <message>
<location filename="../ui/mainwindow.cpp" line="925"/> <location filename="../ui/mainwindow.cpp" line="928"/>
<source>KeyB</source> <source>KeyB</source>
<translation type="unfinished"></translation> <translation type="unfinished"></translation>
</message> </message>
<message> <message>
<location filename="../ui/mainwindow.cpp" line="1013"/> <location filename="../ui/mainwindow.cpp" line="1016"/>
<source>HW Version:</source> <source>HW Version:</source>
<translation type="unfinished"></translation> <translation type="unfinished"></translation>
</message> </message>
<message> <message>
<location filename="../ui/mainwindow.cpp" line="1015"/> <location filename="../ui/mainwindow.cpp" line="1018"/>
<source>PM3:</source> <source>PM3:</source>
<translation type="unfinished"></translation> <translation type="unfinished"></translation>
</message> </message>
<message> <message>
<location filename="../ui/mainwindow.cpp" line="1017"/> <location filename="../ui/mainwindow.cpp" line="1020"/>
<source>State:</source> <source>State:</source>
<translation type="unfinished"></translation> <translation type="unfinished"></translation>
</message> </message>
<message> <message>
<location filename="../ui/mainwindow.cpp" line="1072"/> <location filename="../ui/mainwindow.cpp" line="1075"/>
<source>Running</source> <source>Running</source>
<translation type="unfinished"></translation> <translation type="unfinished"></translation>
</message> </message>
@ -989,56 +1019,56 @@ or &quot;-p &lt;port&gt; -f&quot;</source>
<context> <context>
<name>Mifare</name> <name>Mifare</name>
<message> <message>
<location filename="../module/mifare.cpp" line="617"/> <location filename="../module/mifare.cpp" line="641"/>
<source>Success!</source> <source>Success!</source>
<translation type="unfinished"></translation> <translation type="unfinished"></translation>
</message> </message>
<message> <message>
<location filename="../module/mifare.cpp" line="229"/> <location filename="../module/mifare.cpp" line="228"/>
<location filename="../module/mifare.cpp" line="617"/> <location filename="../module/mifare.cpp" line="641"/>
<location filename="../module/mifare.cpp" line="621"/>
<location filename="../module/mifare.cpp" line="645"/> <location filename="../module/mifare.cpp" line="645"/>
<location filename="../module/mifare.cpp" line="684"/> <location filename="../module/mifare.cpp" line="669"/>
<location filename="../module/mifare.cpp" line="697"/> <location filename="../module/mifare.cpp" line="708"/>
<location filename="../module/mifare.cpp" line="743"/> <location filename="../module/mifare.cpp" line="721"/>
<location filename="../module/mifare.cpp" line="776"/>
<source>Info</source> <source>Info</source>
<translation type="unfinished"></translation> <translation type="unfinished"></translation>
</message> </message>
<message> <message>
<location filename="../module/mifare.cpp" line="229"/> <location filename="../module/mifare.cpp" line="228"/>
<source>Plz provide at least one known key</source> <source>Plz provide at least one known key</source>
<translation type="unfinished"></translation> <translation type="unfinished"></translation>
</message> </message>
<message> <message>
<location filename="../module/mifare.cpp" line="468"/> <location filename="../module/mifare.cpp" line="492"/>
<location filename="../module/mifare.cpp" line="621"/> <location filename="../module/mifare.cpp" line="645"/>
<source>Failed!</source> <source>Failed!</source>
<translation type="unfinished"></translation> <translation type="unfinished"></translation>
</message> </message>
<message> <message>
<location filename="../module/mifare.cpp" line="646"/> <location filename="../module/mifare.cpp" line="670"/>
<source>The Access Bits is invalid! <source>The Access Bits is invalid!
It could make the whole sector blocked irreversibly! It could make the whole sector blocked irreversibly!
Continue to write?</source> Continue to write?</source>
<translation type="unfinished"></translation> <translation type="unfinished"></translation>
</message> </message>
<message> <message>
<location filename="../module/mifare.cpp" line="684"/> <location filename="../module/mifare.cpp" line="708"/>
<source>Successful!</source> <source>Successful!</source>
<translation type="unfinished"></translation> <translation type="unfinished"></translation>
</message> </message>
<message> <message>
<location filename="../module/mifare.cpp" line="697"/> <location filename="../module/mifare.cpp" line="721"/>
<source>Failed to write to these blocks:</source> <source>Failed to write to these blocks:</source>
<translation type="unfinished"></translation> <translation type="unfinished"></translation>
</message> </message>
<message> <message>
<location filename="../module/mifare.cpp" line="701"/> <location filename="../module/mifare.cpp" line="725"/>
<source>Select them?</source> <source>Select them?</source>
<translation type="unfinished"></translation> <translation type="unfinished"></translation>
</message> </message>
<message> <message>
<location filename="../module/mifare.cpp" line="743"/> <location filename="../module/mifare.cpp" line="776"/>
<source>Failed to read card.</source> <source>Failed to read card.</source>
<translation type="unfinished"></translation> <translation type="unfinished"></translation>
</message> </message>

Binary file not shown.

@ -45,72 +45,102 @@
<translation></translation> <translation></translation>
</message> </message>
<message> <message>
<location filename="../ui/mf_sim_simdialog.ui" line="37"/> <location filename="../ui/mf_sim_simdialog.ui" line="38"/>
<source>u</source> <source>u</source>
<translation></translation> <translation></translation>
</message> </message>
<message> <message>
<location filename="../ui/mf_sim_simdialog.ui" line="66"/> <location filename="../ui/mf_sim_simdialog.ui" line="67"/>
<source>UID 4 or 7 bytes. If not specified, the UID 4B from emulator memory will be used</source> <source>UID 4 or 7 bytes. If not specified, the UID 4B from emulator memory will be used</source>
<translation>47UID使4UID</translation> <translation>47UID使4UID</translation>
</message> </message>
<message> <message>
<location filename="../ui/mf_sim_simdialog.ui" line="87"/> <location filename="../ui/mf_sim_simdialog.ui" line="105"/>
<source>--atqa</source>
<translation></translation>
</message>
<message>
<location filename="../ui/mf_sim_simdialog.ui" line="134"/>
<source>Provide explicit ATQA (2 bytes)</source>
<translation>ATQA2</translation>
</message>
<message>
<location filename="../ui/mf_sim_simdialog.ui" line="172"/>
<source>--sak</source>
<translation></translation>
</message>
<message>
<location filename="../ui/mf_sim_simdialog.ui" line="201"/>
<source>Provide explicit SAK (1 byte)</source>
<translation>SAK1</translation>
</message>
<message>
<location filename="../ui/mf_sim_simdialog.ui" line="239"/>
<source>n</source> <source>n</source>
<translation></translation> <translation></translation>
</message> </message>
<message> <message>
<location filename="../ui/mf_sim_simdialog.ui" line="116"/> <location filename="../ui/mf_sim_simdialog.ui" line="268"/>
<source>Automatically exit simulation after &lt;numreads&gt; blocks have been read by reader. 0 = infinite</source> <source>Automatically exit simulation after &lt;numreads&gt; blocks have been read by reader. 0 = infinite</source>
<translation>&lt;n&gt;退n0退</translation> <translation>&lt;n&gt;退n0退</translation>
</message> </message>
<message> <message>
<location filename="../ui/mf_sim_simdialog.ui" line="137"/> <location filename="../ui/mf_sim_simdialog.ui" line="306"/>
<source>i</source> <source>i</source>
<translation></translation> <translation></translation>
</message> </message>
<message> <message>
<location filename="../ui/mf_sim_simdialog.ui" line="150"/> <location filename="../ui/mf_sim_simdialog.ui" line="319"/>
<source>Interactive, means that console will not be returned until simulation finishes or is aborted</source> <source>Interactive, means that console will not be returned until simulation finishes or is aborted</source>
<translation>PM3使</translation> <translation>PM3使</translation>
</message> </message>
<message> <message>
<location filename="../ui/mf_sim_simdialog.ui" line="171"/> <location filename="../ui/mf_sim_simdialog.ui" line="357"/>
<source>x</source> <source>x</source>
<translation></translation> <translation></translation>
</message> </message>
<message> <message>
<location filename="../ui/mf_sim_simdialog.ui" line="184"/> <location filename="../ui/mf_sim_simdialog.ui" line="370"/>
<source>Crack, performs the &apos;reader attack&apos;, nr/ar attack against a legitimate reader, fishes out the key(s)</source> <source>Crack, performs the &apos;reader attack&apos;, nr/ar attack against a legitimate reader, fishes out the key(s)</source>
<translation>nr/ar()</translation> <translation>nr/ar()</translation>
</message> </message>
<message> <message>
<location filename="../ui/mf_sim_simdialog.ui" line="205"/> <location filename="../ui/mf_sim_simdialog.ui" line="408"/>
<source>e</source> <source>e</source>
<translation></translation> <translation></translation>
</message> </message>
<message> <message>
<location filename="../ui/mf_sim_simdialog.ui" line="218"/> <location filename="../ui/mf_sim_simdialog.ui" line="421"/>
<source>set keys found from &apos;reader attack&apos; to emulator memory (implies x and i)</source> <source>set keys found from &apos;reader attack&apos; to emulator memory (implies x(--crack) and i)</source>
<translation>xi</translation> <translation>x(--crack)i</translation>
</message> </message>
<message> <message>
<location filename="../ui/mf_sim_simdialog.ui" line="239"/> <location filename="../ui/mf_sim_simdialog.ui" line="577"/>
<source>-v</source>
<translation></translation>
</message>
<message>
<location filename="../ui/mf_sim_simdialog.ui" line="590"/>
<source>verbose output</source>
<translation></translation>
</message>
<message>
<location filename="../ui/mf_sim_simdialog.ui" line="459"/>
<source>f</source> <source>f</source>
<translation></translation> <translation></translation>
</message> </message>
<message> <message>
<location filename="../ui/mf_sim_simdialog.ui" line="268"/> <location filename="../ui/mf_sim_simdialog.ui" line="488"/>
<source>get UIDs to use for &apos;reader attack&apos; from file &apos;f &lt;filename.txt&gt;&apos; (implies x and i)</source> <source>get UIDs to use for &apos;reader attack&apos; from file &apos;f &lt;filename.txt&gt;&apos; (implies x and i)</source>
<translation>&lt;filename.txt&gt;UIDxi</translation> <translation>&lt;filename.txt&gt;UIDxi</translation>
</message> </message>
<message> <message>
<location filename="../ui/mf_sim_simdialog.ui" line="289"/> <location filename="../ui/mf_sim_simdialog.ui" line="526"/>
<source>r</source> <source>r</source>
<translation></translation> <translation></translation>
</message> </message>
<message> <message>
<location filename="../ui/mf_sim_simdialog.ui" line="302"/> <location filename="../ui/mf_sim_simdialog.ui" line="539"/>
<source>Generate random nonces instead of sequential nonces. Standard reader attack won&apos;t work with this option, only moebius attack works</source> <source>Generate random nonces instead of sequential nonces. Standard reader attack won&apos;t work with this option, only moebius attack works</source>
<translation>noncenoncePM3moebius</translation> <translation>noncenoncePM3moebius</translation>
</message> </message>
@ -356,7 +386,7 @@ It could make the whole sector blocked irreversibly!</source>
</message> </message>
<message> <message>
<location filename="../ui/mainwindow.ui" line="493"/> <location filename="../ui/mainwindow.ui" line="493"/>
<location filename="../ui/mainwindow.cpp" line="918"/> <location filename="../ui/mainwindow.cpp" line="921"/>
<source>Data</source> <source>Data</source>
<translation></translation> <translation></translation>
</message> </message>
@ -415,11 +445,6 @@ It could make the whole sector blocked irreversibly!</source>
<source>Key Type:</source> <source>Key Type:</source>
<translation></translation> <translation></translation>
</message> </message>
<message>
<location filename="../ui/mainwindow.ui" line="1140"/>
<source>Snoop</source>
<translation>(Snoop)</translation>
</message>
<message> <message>
<location filename="../ui/mainwindow.ui" line="1153"/> <location filename="../ui/mainwindow.ui" line="1153"/>
<source>List Data</source> <source>List Data</source>
@ -560,6 +585,11 @@ It could make the whole sector blocked irreversibly!</source>
<source>Sniff</source> <source>Sniff</source>
<translation></translation> <translation></translation>
</message> </message>
<message>
<location filename="../ui/mainwindow.ui" line="1140"/>
<source>Sniff(14a)</source>
<translation>(14a)</translation>
</message>
<message> <message>
<location filename="../ui/mainwindow.ui" line="1208"/> <location filename="../ui/mainwindow.ui" line="1208"/>
<source>LF/Data</source> <source>LF/Data</source>
@ -747,7 +777,7 @@ or &quot;-p &lt;port&gt; -f&quot;</source>
</message> </message>
<message> <message>
<location filename="../ui/mainwindow.cpp" line="134"/> <location filename="../ui/mainwindow.cpp" line="134"/>
<location filename="../ui/mainwindow.cpp" line="906"/> <location filename="../ui/mainwindow.cpp" line="909"/>
<source>Not Connected</source> <source>Not Connected</source>
<translation></translation> <translation></translation>
</message> </message>
@ -942,54 +972,54 @@ or &quot;-p &lt;port&gt; -f&quot;</source>
<translation>Trace(*.trc)</translation> <translation>Trace(*.trc)</translation>
</message> </message>
<message> <message>
<location filename="../ui/mainwindow.cpp" line="907"/> <location filename="../ui/mainwindow.cpp" line="910"/>
<location filename="../ui/mainwindow.cpp" line="1076"/> <location filename="../ui/mainwindow.cpp" line="1079"/>
<source>Idle</source> <source>Idle</source>
<translation></translation> <translation></translation>
</message> </message>
<message> <message>
<location filename="../ui/mainwindow.cpp" line="909"/> <location filename="../ui/mainwindow.cpp" line="912"/>
<source>Stop</source> <source>Stop</source>
<translation></translation> <translation></translation>
</message> </message>
<message> <message>
<location filename="../ui/mainwindow.cpp" line="916"/> <location filename="../ui/mainwindow.cpp" line="919"/>
<location filename="../ui/mainwindow.cpp" line="923"/> <location filename="../ui/mainwindow.cpp" line="926"/>
<source>Sec</source> <source>Sec</source>
<translation></translation> <translation></translation>
</message> </message>
<message> <message>
<location filename="../ui/mainwindow.cpp" line="917"/> <location filename="../ui/mainwindow.cpp" line="920"/>
<source>Blk</source> <source>Blk</source>
<translation></translation> <translation></translation>
</message> </message>
<message> <message>
<location filename="../ui/mainwindow.cpp" line="924"/> <location filename="../ui/mainwindow.cpp" line="927"/>
<source>KeyA</source> <source>KeyA</source>
<translation>A</translation> <translation>A</translation>
</message> </message>
<message> <message>
<location filename="../ui/mainwindow.cpp" line="925"/> <location filename="../ui/mainwindow.cpp" line="928"/>
<source>KeyB</source> <source>KeyB</source>
<translation>B</translation> <translation>B</translation>
</message> </message>
<message> <message>
<location filename="../ui/mainwindow.cpp" line="1013"/> <location filename="../ui/mainwindow.cpp" line="1016"/>
<source>HW Version:</source> <source>HW Version:</source>
<translation></translation> <translation></translation>
</message> </message>
<message> <message>
<location filename="../ui/mainwindow.cpp" line="1015"/> <location filename="../ui/mainwindow.cpp" line="1018"/>
<source>PM3:</source> <source>PM3:</source>
<translation></translation> <translation></translation>
</message> </message>
<message> <message>
<location filename="../ui/mainwindow.cpp" line="1017"/> <location filename="../ui/mainwindow.cpp" line="1020"/>
<source>State:</source> <source>State:</source>
<translation></translation> <translation></translation>
</message> </message>
<message> <message>
<location filename="../ui/mainwindow.cpp" line="1072"/> <location filename="../ui/mainwindow.cpp" line="1075"/>
<source>Running</source> <source>Running</source>
<translation></translation> <translation></translation>
</message> </message>
@ -997,34 +1027,34 @@ or &quot;-p &lt;port&gt; -f&quot;</source>
<context> <context>
<name>Mifare</name> <name>Mifare</name>
<message> <message>
<location filename="../module/mifare.cpp" line="617"/> <location filename="../module/mifare.cpp" line="641"/>
<source>Success!</source> <source>Success!</source>
<translation></translation> <translation></translation>
</message> </message>
<message> <message>
<location filename="../module/mifare.cpp" line="229"/> <location filename="../module/mifare.cpp" line="228"/>
<location filename="../module/mifare.cpp" line="617"/> <location filename="../module/mifare.cpp" line="641"/>
<location filename="../module/mifare.cpp" line="621"/>
<location filename="../module/mifare.cpp" line="645"/> <location filename="../module/mifare.cpp" line="645"/>
<location filename="../module/mifare.cpp" line="684"/> <location filename="../module/mifare.cpp" line="669"/>
<location filename="../module/mifare.cpp" line="697"/> <location filename="../module/mifare.cpp" line="708"/>
<location filename="../module/mifare.cpp" line="743"/> <location filename="../module/mifare.cpp" line="721"/>
<location filename="../module/mifare.cpp" line="776"/>
<source>Info</source> <source>Info</source>
<translation></translation> <translation></translation>
</message> </message>
<message> <message>
<location filename="../module/mifare.cpp" line="229"/> <location filename="../module/mifare.cpp" line="228"/>
<source>Plz provide at least one known key</source> <source>Plz provide at least one known key</source>
<translation></translation> <translation></translation>
</message> </message>
<message> <message>
<location filename="../module/mifare.cpp" line="468"/> <location filename="../module/mifare.cpp" line="492"/>
<location filename="../module/mifare.cpp" line="621"/> <location filename="../module/mifare.cpp" line="645"/>
<source>Failed!</source> <source>Failed!</source>
<translation></translation> <translation></translation>
</message> </message>
<message> <message>
<location filename="../module/mifare.cpp" line="646"/> <location filename="../module/mifare.cpp" line="670"/>
<source>The Access Bits is invalid! <source>The Access Bits is invalid!
It could make the whole sector blocked irreversibly! It could make the whole sector blocked irreversibly!
Continue to write?</source> Continue to write?</source>
@ -1033,22 +1063,22 @@ Continue to write?</source>
</translation> </translation>
</message> </message>
<message> <message>
<location filename="../module/mifare.cpp" line="684"/> <location filename="../module/mifare.cpp" line="708"/>
<source>Successful!</source> <source>Successful!</source>
<translation></translation> <translation></translation>
</message> </message>
<message> <message>
<location filename="../module/mifare.cpp" line="697"/> <location filename="../module/mifare.cpp" line="721"/>
<source>Failed to write to these blocks:</source> <source>Failed to write to these blocks:</source>
<translation></translation> <translation></translation>
</message> </message>
<message> <message>
<location filename="../module/mifare.cpp" line="701"/> <location filename="../module/mifare.cpp" line="725"/>
<source>Select them?</source> <source>Select them?</source>
<translation></translation> <translation></translation>
</message> </message>
<message> <message>
<location filename="../module/mifare.cpp" line="743"/> <location filename="../module/mifare.cpp" line="776"/>
<source>Failed to read card.</source> <source>Failed to read card.</source>
<translation></translation> <translation></translation>
</message> </message>

@ -89,7 +89,7 @@ Mifare::Mifare(Ui::MainWindow *ui, Util *addr, QWidget *parent): QObject(parent)
QString Mifare::info(bool isRequiringOutput) QString Mifare::info(bool isRequiringOutput)
{ {
if(util->getClientType() == Util::CLIENTTYPE_OFFICIAL || util->getClientType() == Util::CLIENTTYPE_ICEMAN) if(Util::getClientType() == Util::CLIENTTYPE_OFFICIAL || Util::getClientType() == Util::CLIENTTYPE_ICEMAN)
{ {
if(isRequiringOutput) if(isRequiringOutput)
{ {
@ -120,7 +120,7 @@ void Mifare::chk()
QString result; QString result;
int offset = 0; int offset = 0;
QString data; QString data;
if(util->getClientType() == Util::CLIENTTYPE_OFFICIAL) if(Util::getClientType() == Util::CLIENTTYPE_OFFICIAL)
{ {
result = util->execCMDWithOutput( result = util->execCMDWithOutput(
"hf mf chk *" "hf mf chk *"
@ -148,7 +148,7 @@ void Mifare::chk()
} }
} }
} }
else if(util->getClientType() == Util::CLIENTTYPE_ICEMAN) else if(Util::getClientType() == Util::CLIENTTYPE_ICEMAN)
{ {
result = util->execCMDWithOutput( result = util->execCMDWithOutput(
"hf mf chk --" "hf mf chk --"
@ -185,7 +185,7 @@ void Mifare::nested()
QString result; QString result;
int offset = 0; int offset = 0;
QString data; QString data;
if(util->getClientType() == Util::CLIENTTYPE_OFFICIAL) if(Util::getClientType() == Util::CLIENTTYPE_OFFICIAL)
{ {
result = util->execCMDWithOutput( result = util->execCMDWithOutput(
"hf mf nested " "hf mf nested "
@ -193,7 +193,7 @@ void Mifare::nested()
+ " *", + " *",
Util::ReturnTrigger(15000, {"Can't found", "\\|000\\|"})); Util::ReturnTrigger(15000, {"Can't found", "\\|000\\|"}));
} }
else if(util->getClientType() == Util::CLIENTTYPE_ICEMAN) else if(Util::getClientType() == Util::CLIENTTYPE_ICEMAN)
{ {
QString knownKeyInfo = ""; QString knownKeyInfo = "";
for(int i = 0; i < cardType.sector_size; i++) for(int i = 0; i < cardType.sector_size; i++)
@ -262,34 +262,41 @@ void Mifare::hardnested()
void Mifare::darkside() void Mifare::darkside()
{ {
if(util->getClientType() == Util::CLIENTTYPE_OFFICIAL) if(Util::getClientType() == Util::CLIENTTYPE_OFFICIAL)
{
util->execCMD("hf mf mifare"); util->execCMD("hf mf mifare");
ui->funcTab->setCurrentIndex(Util::rawTabIndex); else if(Util::getClientType() == Util::CLIENTTYPE_ICEMAN)
}
else if(util->getClientType() == Util::CLIENTTYPE_ICEMAN)
{
util->execCMD("hf mf darkside"); util->execCMD("hf mf darkside");
ui->funcTab->setCurrentIndex(Util::rawTabIndex);
}
ui->funcTab->setCurrentIndex(Util::rawTabIndex);
} }
void Mifare::sniff() void Mifare::sniff()
{ {
util->execCMD("hf mf sniff"); if(Util::getClientType() == Util::CLIENTTYPE_OFFICIAL)
util->execCMD("hf mf sniff");
else if(Util::getClientType() == Util::CLIENTTYPE_ICEMAN)
util->execCMD("hf sniff");
ui->funcTab->setCurrentIndex(Util::rawTabIndex); ui->funcTab->setCurrentIndex(Util::rawTabIndex);
} }
void Mifare::snoop() void Mifare::sniff14a()
{ {
util->execCMD("hf 14a snoop"); if(Util::getClientType() == Util::CLIENTTYPE_OFFICIAL)
util->execCMD("hf 14a snoop");
else if(Util::getClientType() == Util::CLIENTTYPE_ICEMAN)
util->execCMD("hf 14a sniff");
ui->funcTab->setCurrentIndex(Util::rawTabIndex); ui->funcTab->setCurrentIndex(Util::rawTabIndex);
} }
void Mifare::list() void Mifare::list()
{ {
util->execCMD("hf list mf"); if(Util::getClientType() == Util::CLIENTTYPE_OFFICIAL)
util->execCMD("hf list mf");
else if(Util::getClientType() == Util::CLIENTTYPE_ICEMAN)
util->execCMD("trace list -t mf");
ui->funcTab->setCurrentIndex(Util::rawTabIndex); ui->funcTab->setCurrentIndex(Util::rawTabIndex);
} }
@ -300,7 +307,7 @@ QString Mifare::_readblk(int blockId, KeyType keyType, const QString& key, Targe
QRegularExpressionMatch currMatch; QRegularExpressionMatch currMatch;
bool isTrailerBlock = (blockId < 128 && ((blockId + 1) % 4 == 0)) || ((blockId + 1) % 16 == 0); bool isTrailerBlock = (blockId < 128 && ((blockId + 1) % 4 == 0)) || ((blockId + 1) % 16 == 0);
if(util->getClientType() == Util::CLIENTTYPE_OFFICIAL || util->getClientType() == Util::CLIENTTYPE_ICEMAN) if(Util::getClientType() == Util::CLIENTTYPE_OFFICIAL || Util::getClientType() == Util::CLIENTTYPE_ICEMAN)
{ {
if(targetType == TARGET_MIFARE) if(targetType == TARGET_MIFARE)
{ {
@ -358,7 +365,7 @@ QString Mifare::_readblk(int blockId, KeyType keyType, const QString& key, Targe
data = ""; data = "";
} }
} }
if(util->getClientType() == Util::CLIENTTYPE_OFFICIAL) if(Util::getClientType() == Util::CLIENTTYPE_OFFICIAL)
{ {
if(targetType == TARGET_EMULATOR) if(targetType == TARGET_EMULATOR)
{ {
@ -370,7 +377,7 @@ QString Mifare::_readblk(int blockId, KeyType keyType, const QString& key, Targe
data.remove(" "); data.remove(" ");
} }
} }
else if(util->getClientType() == Util::CLIENTTYPE_ICEMAN) else if(Util::getClientType() == Util::CLIENTTYPE_ICEMAN)
{ {
if(targetType == TARGET_EMULATOR) if(targetType == TARGET_EMULATOR)
{ {
@ -397,7 +404,7 @@ QStringList Mifare::_readsec(int sectorId, KeyType keyType, const QString& key,
data.append(""); data.append("");
} }
if(util->getClientType() == Util::CLIENTTYPE_OFFICIAL || util->getClientType() == Util::CLIENTTYPE_ICEMAN) if(Util::getClientType() == Util::CLIENTTYPE_OFFICIAL || Util::getClientType() == Util::CLIENTTYPE_ICEMAN)
{ {
// try to read all blocks together // try to read all blocks together
if(targetType == TARGET_MIFARE) if(targetType == TARGET_MIFARE)
@ -583,7 +590,7 @@ bool Mifare::_writeblk(int blockId, KeyType keyType, const QString& key, const Q
if(data_isDataValid(input) != DATA_NOSPACE) if(data_isDataValid(input) != DATA_NOSPACE)
return false; return false;
if(util->getClientType() == Util::CLIENTTYPE_OFFICIAL || util->getClientType() == Util::CLIENTTYPE_ICEMAN) if(Util::getClientType() == Util::CLIENTTYPE_OFFICIAL || Util::getClientType() == Util::CLIENTTYPE_ICEMAN)
{ {
if(targetType == TARGET_MIFARE) if(targetType == TARGET_MIFARE)
{ {
@ -734,26 +741,28 @@ void Mifare::writeSelected(TargetType targetType)
void Mifare::dump() void Mifare::dump()
{ {
util->execCMD("hf mf dump"); if(Util::getClientType() == Util::CLIENTTYPE_OFFICIAL || Util::getClientType() == Util::CLIENTTYPE_ICEMAN)
util->execCMD("hf mf dump");
ui->funcTab->setCurrentIndex(Util::rawTabIndex); ui->funcTab->setCurrentIndex(Util::rawTabIndex);
} }
void Mifare::restore() void Mifare::restore()
{ {
util->execCMD("hf mf restore"); if(Util::getClientType() == Util::CLIENTTYPE_OFFICIAL || Util::getClientType() == Util::CLIENTTYPE_ICEMAN)
util->execCMD("hf mf restore");
ui->funcTab->setCurrentIndex(Util::rawTabIndex); ui->funcTab->setCurrentIndex(Util::rawTabIndex);
} }
void Mifare::wipeC() void Mifare::wipeC()
{ {
if(util->getClientType() == Util::CLIENTTYPE_OFFICIAL) if(Util::getClientType() == Util::CLIENTTYPE_OFFICIAL)
{ {
util->execCMD( util->execCMD(
"hf mf cwipe " "hf mf cwipe "
+ QString::number(cardType.type) + QString::number(cardType.type)
+ " f"); + " f");
} }
else if(util->getClientType() == Util::CLIENTTYPE_ICEMAN) else if(Util::getClientType() == Util::CLIENTTYPE_ICEMAN)
{ {
util->execCMD("hf mf cwipe"); util->execCMD("hf mf cwipe");
} }
@ -784,7 +793,7 @@ void Mifare::setParameterC()
void Mifare::lockC() void Mifare::lockC()
{ {
if(util->getClientType() == Util::CLIENTTYPE_OFFICIAL) if(Util::getClientType() == Util::CLIENTTYPE_OFFICIAL)
{ {
util->execCMD("hf 14a raw -pa -b7 40"); util->execCMD("hf 14a raw -pa -b7 40");
util->execCMD("hf 14a raw -pa 43"); util->execCMD("hf 14a raw -pa 43");
@ -793,7 +802,7 @@ void Mifare::lockC()
util->execCMD("hf 14a raw -pa 85 00 00 00 00 00 00 00 00 00 00 00 00 00 00 08 18 47"); util->execCMD("hf 14a raw -pa 85 00 00 00 00 00 00 00 00 00 00 00 00 00 00 08 18 47");
util->execCMD("hf 14a raw -a 52"); util->execCMD("hf 14a raw -a 52");
} }
else if(util->getClientType() == Util::CLIENTTYPE_ICEMAN) else if(Util::getClientType() == Util::CLIENTTYPE_ICEMAN)
{ {
util->execCMD("hf 14a raw -ak -b 7 40"); util->execCMD("hf 14a raw -ak -b 7 40");
util->execCMD("hf 14a raw -ak 43"); util->execCMD("hf 14a raw -ak 43");
@ -806,12 +815,13 @@ void Mifare::lockC()
void Mifare::wipeE() void Mifare::wipeE()
{ {
util->execCMD("hf mf eclr"); if(Util::getClientType() == Util::CLIENTTYPE_OFFICIAL || Util::getClientType() == Util::CLIENTTYPE_ICEMAN)
util->execCMD("hf mf eclr");
} }
void Mifare::simulate() void Mifare::simulate()
{ {
MF_Sim_simDialog dialog(cardType.type); MF_Sim_simDialog dialog(cardType.type, cardType.typeText);
connect(&dialog, &MF_Sim_simDialog::sendCMD, util, &Util::execCMD); connect(&dialog, &MF_Sim_simDialog::sendCMD, util, &Util::execCMD);
if(dialog.exec() == QDialog::Accepted) if(dialog.exec() == QDialog::Accepted)
ui->funcTab->setCurrentIndex(Util::rawTabIndex); ui->funcTab->setCurrentIndex(Util::rawTabIndex);
@ -819,13 +829,24 @@ void Mifare::simulate()
void Mifare::loadSniff(const QString& file) void Mifare::loadSniff(const QString& file)
{ {
util->execCMD("hf list mf -l " + file); if(Util::getClientType() == Util::CLIENTTYPE_OFFICIAL)
util->execCMD("hf list mf -l " + file);
else if(Util::getClientType() == Util::CLIENTTYPE_ICEMAN)
{
if(util->execCMDWithOutput("trace load -f " + file, Util::ReturnTrigger({"loaded"})) != "")
util->execCMD("trace list -t mf");
}
ui->funcTab->setCurrentIndex(Util::rawTabIndex); ui->funcTab->setCurrentIndex(Util::rawTabIndex);
} }
void Mifare::saveSniff(const QString& file) void Mifare::saveSniff(const QString& file)
{ {
util->execCMD("hf list mf -s " + file); if(Util::getClientType() == Util::CLIENTTYPE_OFFICIAL)
util->execCMD("hf list mf -s " + file);
else if(Util::getClientType() == Util::CLIENTTYPE_ICEMAN)
util->execCMD("trace save -f " + file);
ui->funcTab->setCurrentIndex(Util::rawTabIndex); ui->funcTab->setCurrentIndex(Util::rawTabIndex);
} }

@ -70,7 +70,7 @@ public:
void darkside(); void darkside();
void hardnested(); void hardnested();
void sniff(); void sniff();
void snoop(); void sniff14a();
void list(); void list();
void readOne(TargetType targetType = TARGET_MIFARE); void readOne(TargetType targetType = TARGET_MIFARE);
void readSelected(TargetType targetType = TARGET_MIFARE); void readSelected(TargetType targetType = TARGET_MIFARE);

@ -836,10 +836,10 @@ void MainWindow::on_MF_Sniff_sniffButton_clicked()
setState(true); setState(true);
} }
void MainWindow::on_MF_Sniff_snoopButton_clicked() void MainWindow::on_MF_14aSniff_snoopButton_clicked()
{ {
setState(false); setState(false);
mifare->snoop(); mifare->sniff14a();
setState(true); setState(true);
} }
@ -852,6 +852,7 @@ void MainWindow::MF_widgetReset()
{ {
int secs = mifare->cardType.sector_size; int secs = mifare->cardType.sector_size;
int blks = mifare->cardType.block_size; int blks = mifare->cardType.block_size;
QBrush trailerItemForeColor = QBrush(QColor(0, 160, 255));
ui->MF_RW_blockBox->clear(); ui->MF_RW_blockBox->clear();
ui->MF_keyWidget->setRowCount(secs); ui->MF_keyWidget->setRowCount(secs);
ui->MF_dataWidget->setRowCount(blks); ui->MF_dataWidget->setRowCount(blks);
@ -876,8 +877,10 @@ void MainWindow::MF_widgetReset()
setTableItem(ui->MF_keyWidget, i, 1, ""); setTableItem(ui->MF_keyWidget, i, 1, "");
setTableItem(ui->MF_keyWidget, i, 2, ""); setTableItem(ui->MF_keyWidget, i, 2, "");
setTableItem(ui->MF_dataWidget, mifare->cardType.blks[i], 0, QString::number(i)); setTableItem(ui->MF_dataWidget, mifare->cardType.blks[i], 0, QString::number(i));
ui->MF_dataWidget->item(mifare->cardType.blks[i] + mifare->cardType.blk[i] - 1, 2)->setForeground(trailerItemForeColor);
ui->MF_dataWidget->item(mifare->cardType.blks[i], 0)->setCheckState(Qt::Checked); ui->MF_dataWidget->item(mifare->cardType.blks[i], 0)->setCheckState(Qt::Checked);
} }
ui->MF_dataWidget->item(0, 2)->setForeground(QBrush(QColor(255, 160, 0)));
ui->MF_selectAllBox->setCheckState(Qt::Checked); ui->MF_selectAllBox->setCheckState(Qt::Checked);
ui->MF_selectTrailerBox->setCheckState(Qt::Checked); ui->MF_selectTrailerBox->setCheckState(Qt::Checked);

@ -149,7 +149,7 @@ private slots:
void on_MF_fillKeysButton_clicked(); void on_MF_fillKeysButton_clicked();
void on_MF_Sniff_snoopButton_clicked(); void on_MF_14aSniff_snoopButton_clicked();
void on_MF_trailerDecoderButton_clicked(); void on_MF_trailerDecoderButton_clicked();

@ -1129,7 +1129,7 @@
</widget> </widget>
</item> </item>
<item> <item>
<widget class="QPushButton" name="MF_Sniff_snoopButton"> <widget class="QPushButton" name="MF_14aSniff_snoopButton">
<property name="minimumSize"> <property name="minimumSize">
<size> <size>
<width>40</width> <width>40</width>
@ -1137,7 +1137,7 @@
</size> </size>
</property> </property>
<property name="text"> <property name="text">
<string>Snoop</string> <string>Sniff(14a)</string>
</property> </property>
</widget> </widget>
</item> </item>

@ -1,12 +1,34 @@
#include "mf_sim_simdialog.h" #include "mf_sim_simdialog.h"
#include "ui_mf_sim_simdialog.h" #include "ui_mf_sim_simdialog.h"
MF_Sim_simDialog::MF_Sim_simDialog(int cardType, QWidget *parent) : MF_Sim_simDialog::MF_Sim_simDialog(int cardType, QString cardTypeText, QWidget *parent) :
QDialog(parent), QDialog(parent),
ui(new Ui::MF_Sim_simDialog) ui(new Ui::MF_Sim_simDialog)
{ {
ui->setupUi(this); ui->setupUi(this);
if(Util::getClientType() == Util::CLIENTTYPE_OFFICIAL)
{
ui->atqaGroupBox->setVisible(false);
ui->atqaLine->setVisible(false);
ui->sakGroupBox->setVisible(false);
ui->sakLine->setVisible(false);
ui->vGroupBox->setVisible(false);
ui->vLine->setVisible(false);
}
else if(Util::getClientType() == Util::CLIENTTYPE_ICEMAN)
{
ui->fGroupBox->setVisible(false);
ui->fLine->setVisible(false);
ui->rGroupBox->setVisible(false);
ui->rLine->setVisible(false);
ui->uBox->setText("-u");
ui->nBox->setText("-n");
ui->iBox->setText("-i");
ui->xBox->setText("--crack");
ui->eBox->setText("-e");
}
this->cardType = cardType; this->cardType = cardType;
this->cardTypeText = cardTypeText;
} }
MF_Sim_simDialog::~MF_Sim_simDialog() MF_Sim_simDialog::~MF_Sim_simDialog()
@ -55,12 +77,27 @@ void MF_Sim_simDialog::on_fBox_clicked(bool checked)
void MF_Sim_simDialog::on_buttonBox_accepted() void MF_Sim_simDialog::on_buttonBox_accepted()
{ {
QString paras; QString paras;
paras += (ui->uBox->isChecked() ? "u " + ui->uEdit->text() + " " : ""); if(Util::getClientType() == Util::CLIENTTYPE_OFFICIAL)
paras += (ui->nBox->isChecked() ? "n " + ui->nEdit->text() + " " : ""); {
paras += (ui->iBox->isChecked() ? "i " : ""); paras += (ui->uBox->isChecked() ? "u " + ui->uEdit->text() + " " : "");
paras += (ui->xBox->isChecked() ? "x " : ""); paras += (ui->nBox->isChecked() ? "n " + ui->nEdit->text() + " " : "");
paras += (ui->eBox->isChecked() ? "e " : ""); paras += (ui->iBox->isChecked() ? "i " : "");
paras += (ui->fBox->isChecked() ? "f " + ui->fEdit->text() + " " : ""); paras += (ui->xBox->isChecked() ? "x " : "");
paras += (ui->rBox->isChecked() ? "r " : ""); paras += (ui->eBox->isChecked() ? "e " : "");
emit sendCMD(QString("hf mf sim ") + "*" + QString::number(cardType) + " " + paras.trimmed()); paras += (ui->fBox->isChecked() ? "f " + ui->fEdit->text() + " " : "");
paras += (ui->rBox->isChecked() ? "r " : "");
emit sendCMD(QString("hf mf sim ") + "*" + QString::number(cardType) + " " + paras.trimmed());
}
else if(Util::getClientType() == Util::CLIENTTYPE_ICEMAN)
{
paras += (ui->uBox->isChecked() ? "-u " + ui->uEdit->text() + " " : "");
paras += (ui->atqaBox->isChecked() ? "--atqa " + ui->atqaEdit->text() + " " : "");
paras += (ui->sakBox->isChecked() ? "--sak " + ui->sakEdit->text() + " " : "");
paras += (ui->nBox->isChecked() ? "-n " + ui->nEdit->text() + " " : "");
paras += (ui->iBox->isChecked() ? "-i " : "");
paras += (ui->xBox->isChecked() ? "--crack " : "");
paras += (ui->eBox->isChecked() ? "-e " : "");
paras += (ui->vBox->isChecked() ? "-v " : "");
emit sendCMD(QString("hf mf sim --") + cardTypeText + " " + paras.trimmed());
}
} }

@ -3,6 +3,7 @@
#include <QDialog> #include <QDialog>
#include <QDebug> #include <QDebug>
#include "common/util.h"
namespace Ui namespace Ui
{ {
@ -14,7 +15,7 @@ class MF_Sim_simDialog : public QDialog
Q_OBJECT Q_OBJECT
public: public:
explicit MF_Sim_simDialog(int cardType, QWidget *parent = nullptr); explicit MF_Sim_simDialog(int cardType, QString cardTypeText, QWidget *parent = nullptr);
~MF_Sim_simDialog(); ~MF_Sim_simDialog();
private slots: private slots:
@ -25,6 +26,7 @@ private slots:
private: private:
Ui::MF_Sim_simDialog *ui; Ui::MF_Sim_simDialog *ui;
int cardType; int cardType;
QString cardTypeText;
signals: signals:
void sendCMD(const QString& cmd); void sendCMD(const QString& cmd);
private slots: private slots:

@ -7,309 +7,598 @@
<x>0</x> <x>0</x>
<y>0</y> <y>0</y>
<width>461</width> <width>461</width>
<height>456</height> <height>524</height>
</rect> </rect>
</property> </property>
<property name="windowTitle"> <property name="windowTitle">
<string>Simulate</string> <string>Simulate</string>
</property> </property>
<layout class="QVBoxLayout" name="verticalLayout"> <layout class="QVBoxLayout" name="verticalLayout">
<property name="spacing">
<number>5</number>
</property>
<property name="leftMargin">
<number>5</number>
</property>
<property name="topMargin">
<number>5</number>
</property>
<property name="rightMargin">
<number>5</number>
</property>
<property name="bottomMargin">
<number>5</number>
</property>
<item> <item>
<layout class="QHBoxLayout" name="horizontalLayout"> <widget class="QGroupBox" name="uGroupBox">
<item> <layout class="QHBoxLayout" name="uLayout">
<widget class="QCheckBox" name="uBox"> <property name="spacing">
<property name="text"> <number>5</number>
<string>u</string> </property>
</property> <property name="leftMargin">
</widget> <number>0</number>
</item> </property>
<item> <property name="topMargin">
<widget class="QLineEdit" name="uEdit"> <number>0</number>
<property name="sizePolicy"> </property>
<sizepolicy hsizetype="Fixed" vsizetype="Fixed"> <property name="rightMargin">
<horstretch>0</horstretch> <number>0</number>
<verstretch>0</verstretch> </property>
</sizepolicy> <property name="bottomMargin">
</property> <number>0</number>
<property name="maximumSize"> </property>
<size> <item>
<width>100</width> <widget class="QCheckBox" name="uBox">
<height>16777215</height> <property name="text">
</size> <string>u</string>
</property> </property>
</widget> </widget>
</item> </item>
<item> <item>
<widget class="QLabel" name="label"> <widget class="QLineEdit" name="uEdit">
<property name="sizePolicy"> <property name="sizePolicy">
<sizepolicy hsizetype="Expanding" vsizetype="Preferred"> <sizepolicy hsizetype="Fixed" vsizetype="Fixed">
<horstretch>0</horstretch> <horstretch>0</horstretch>
<verstretch>0</verstretch> <verstretch>0</verstretch>
</sizepolicy> </sizepolicy>
</property> </property>
<property name="text"> <property name="maximumSize">
<string>UID 4 or 7 bytes. If not specified, the UID 4B from emulator memory will be used</string> <size>
</property> <width>100</width>
<property name="wordWrap"> <height>16777215</height>
<bool>true</bool> </size>
</property> </property>
</widget> </widget>
</item> </item>
</layout> <item>
<widget class="QLabel" name="label">
<property name="sizePolicy">
<sizepolicy hsizetype="Expanding" vsizetype="Preferred">
<horstretch>0</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
</property>
<property name="text">
<string>UID 4 or 7 bytes. If not specified, the UID 4B from emulator memory will be used</string>
</property>
<property name="wordWrap">
<bool>true</bool>
</property>
</widget>
</item>
</layout>
</widget>
</item>
<item>
<widget class="Line" name="uLine">
<property name="orientation">
<enum>Qt::Horizontal</enum>
</property>
</widget>
</item>
<item>
<widget class="QGroupBox" name="atqaGroupBox">
<layout class="QHBoxLayout" name="atqaLayout">
<property name="spacing">
<number>5</number>
</property>
<property name="leftMargin">
<number>0</number>
</property>
<property name="topMargin">
<number>0</number>
</property>
<property name="rightMargin">
<number>0</number>
</property>
<property name="bottomMargin">
<number>0</number>
</property>
<item>
<widget class="QCheckBox" name="atqaBox">
<property name="text">
<string>--atqa</string>
</property>
</widget>
</item>
<item>
<widget class="QLineEdit" name="atqaEdit">
<property name="sizePolicy">
<sizepolicy hsizetype="Fixed" vsizetype="Fixed">
<horstretch>0</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
</property>
<property name="maximumSize">
<size>
<width>100</width>
<height>16777215</height>
</size>
</property>
</widget>
</item>
<item>
<widget class="QLabel" name="label_8">
<property name="sizePolicy">
<sizepolicy hsizetype="Expanding" vsizetype="Preferred">
<horstretch>0</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
</property>
<property name="text">
<string>Provide explicit ATQA (2 bytes)</string>
</property>
<property name="wordWrap">
<bool>true</bool>
</property>
</widget>
</item>
</layout>
</widget>
</item>
<item>
<widget class="Line" name="atqaLine">
<property name="orientation">
<enum>Qt::Horizontal</enum>
</property>
</widget>
</item>
<item>
<widget class="QGroupBox" name="sakGroupBox">
<layout class="QHBoxLayout" name="sakLayout">
<property name="spacing">
<number>5</number>
</property>
<property name="leftMargin">
<number>0</number>
</property>
<property name="topMargin">
<number>0</number>
</property>
<property name="rightMargin">
<number>0</number>
</property>
<property name="bottomMargin">
<number>0</number>
</property>
<item>
<widget class="QCheckBox" name="sakBox">
<property name="text">
<string>--sak</string>
</property>
</widget>
</item>
<item>
<widget class="QLineEdit" name="sakEdit">
<property name="sizePolicy">
<sizepolicy hsizetype="Fixed" vsizetype="Fixed">
<horstretch>0</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
</property>
<property name="maximumSize">
<size>
<width>100</width>
<height>16777215</height>
</size>
</property>
</widget>
</item>
<item>
<widget class="QLabel" name="label_9">
<property name="sizePolicy">
<sizepolicy hsizetype="Expanding" vsizetype="Preferred">
<horstretch>0</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
</property>
<property name="text">
<string>Provide explicit SAK (1 byte)</string>
</property>
<property name="wordWrap">
<bool>true</bool>
</property>
</widget>
</item>
</layout>
</widget>
</item> </item>
<item> <item>
<widget class="Line" name="line_6"> <widget class="Line" name="sakLine">
<property name="orientation"> <property name="orientation">
<enum>Qt::Horizontal</enum> <enum>Qt::Horizontal</enum>
</property> </property>
</widget> </widget>
</item> </item>
<item> <item>
<layout class="QHBoxLayout" name="horizontalLayout_2"> <widget class="QGroupBox" name="nGroupBox">
<item> <layout class="QHBoxLayout" name="nLayout">
<widget class="QCheckBox" name="nBox"> <property name="spacing">
<property name="text"> <number>5</number>
<string>n</string> </property>
</property> <property name="leftMargin">
</widget> <number>0</number>
</item> </property>
<item> <property name="topMargin">
<widget class="QLineEdit" name="nEdit"> <number>0</number>
<property name="sizePolicy"> </property>
<sizepolicy hsizetype="Fixed" vsizetype="Fixed"> <property name="rightMargin">
<horstretch>0</horstretch> <number>0</number>
<verstretch>0</verstretch> </property>
</sizepolicy> <property name="bottomMargin">
</property> <number>0</number>
<property name="maximumSize"> </property>
<size> <item>
<width>100</width> <widget class="QCheckBox" name="nBox">
<height>16777215</height> <property name="text">
</size> <string>n</string>
</property> </property>
</widget> </widget>
</item> </item>
<item> <item>
<widget class="QLabel" name="label_2"> <widget class="QLineEdit" name="nEdit">
<property name="sizePolicy"> <property name="sizePolicy">
<sizepolicy hsizetype="Expanding" vsizetype="Preferred"> <sizepolicy hsizetype="Fixed" vsizetype="Fixed">
<horstretch>0</horstretch> <horstretch>0</horstretch>
<verstretch>0</verstretch> <verstretch>0</verstretch>
</sizepolicy> </sizepolicy>
</property> </property>
<property name="text"> <property name="maximumSize">
<string>Automatically exit simulation after &lt;numreads&gt; blocks have been read by reader. 0 = infinite</string> <size>
</property> <width>100</width>
<property name="wordWrap"> <height>16777215</height>
<bool>true</bool> </size>
</property> </property>
</widget> </widget>
</item> </item>
</layout> <item>
<widget class="QLabel" name="label_2">
<property name="sizePolicy">
<sizepolicy hsizetype="Expanding" vsizetype="Preferred">
<horstretch>0</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
</property>
<property name="text">
<string>Automatically exit simulation after &lt;numreads&gt; blocks have been read by reader. 0 = infinite</string>
</property>
<property name="wordWrap">
<bool>true</bool>
</property>
</widget>
</item>
</layout>
</widget>
</item> </item>
<item> <item>
<widget class="Line" name="line_5"> <widget class="Line" name="nLine">
<property name="orientation"> <property name="orientation">
<enum>Qt::Horizontal</enum> <enum>Qt::Horizontal</enum>
</property> </property>
</widget> </widget>
</item> </item>
<item> <item>
<layout class="QHBoxLayout" name="horizontalLayout_4"> <widget class="QGroupBox" name="iGroupBox">
<item> <layout class="QHBoxLayout" name="iLayout">
<widget class="QCheckBox" name="iBox"> <property name="spacing">
<property name="text"> <number>5</number>
<string>i</string> </property>
</property> <property name="leftMargin">
</widget> <number>0</number>
</item> </property>
<item> <property name="topMargin">
<widget class="QLabel" name="label_3"> <number>0</number>
<property name="sizePolicy"> </property>
<sizepolicy hsizetype="Expanding" vsizetype="Preferred"> <property name="rightMargin">
<horstretch>0</horstretch> <number>0</number>
<verstretch>0</verstretch> </property>
</sizepolicy> <property name="bottomMargin">
</property> <number>0</number>
<property name="text"> </property>
<string>Interactive, means that console will not be returned until simulation finishes or is aborted</string> <item>
</property> <widget class="QCheckBox" name="iBox">
<property name="wordWrap"> <property name="text">
<bool>true</bool> <string>i</string>
</property> </property>
</widget> </widget>
</item> </item>
</layout> <item>
<widget class="QLabel" name="label_3">
<property name="sizePolicy">
<sizepolicy hsizetype="Expanding" vsizetype="Preferred">
<horstretch>0</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
</property>
<property name="text">
<string>Interactive, means that console will not be returned until simulation finishes or is aborted</string>
</property>
<property name="wordWrap">
<bool>true</bool>
</property>
</widget>
</item>
</layout>
</widget>
</item> </item>
<item> <item>
<widget class="Line" name="line_4"> <widget class="Line" name="iLine">
<property name="orientation"> <property name="orientation">
<enum>Qt::Horizontal</enum> <enum>Qt::Horizontal</enum>
</property> </property>
</widget> </widget>
</item> </item>
<item> <item>
<layout class="QHBoxLayout" name="horizontalLayout_5"> <widget class="QGroupBox" name="xGroupBox">
<item> <layout class="QHBoxLayout" name="xLayout">
<widget class="QCheckBox" name="xBox"> <property name="spacing">
<property name="text"> <number>5</number>
<string>x</string> </property>
</property> <property name="leftMargin">
</widget> <number>0</number>
</item> </property>
<item> <property name="topMargin">
<widget class="QLabel" name="label_4"> <number>0</number>
<property name="sizePolicy"> </property>
<sizepolicy hsizetype="Expanding" vsizetype="Preferred"> <property name="rightMargin">
<horstretch>0</horstretch> <number>0</number>
<verstretch>0</verstretch> </property>
</sizepolicy> <property name="bottomMargin">
</property> <number>0</number>
<property name="text"> </property>
<string>Crack, performs the 'reader attack', nr/ar attack against a legitimate reader, fishes out the key(s)</string> <item>
</property> <widget class="QCheckBox" name="xBox">
<property name="wordWrap"> <property name="text">
<bool>true</bool> <string>x</string>
</property> </property>
</widget> </widget>
</item> </item>
</layout> <item>
<widget class="QLabel" name="label_4">
<property name="sizePolicy">
<sizepolicy hsizetype="Expanding" vsizetype="Preferred">
<horstretch>0</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
</property>
<property name="text">
<string>Crack, performs the 'reader attack', nr/ar attack against a legitimate reader, fishes out the key(s)</string>
</property>
<property name="wordWrap">
<bool>true</bool>
</property>
</widget>
</item>
</layout>
</widget>
</item> </item>
<item> <item>
<widget class="Line" name="line_3"> <widget class="Line" name="xLine">
<property name="orientation"> <property name="orientation">
<enum>Qt::Horizontal</enum> <enum>Qt::Horizontal</enum>
</property> </property>
</widget> </widget>
</item> </item>
<item> <item>
<layout class="QHBoxLayout" name="horizontalLayout_6"> <widget class="QGroupBox" name="eGroupBox">
<item> <layout class="QHBoxLayout" name="eLayout">
<widget class="QCheckBox" name="eBox"> <property name="spacing">
<property name="text"> <number>5</number>
<string>e</string> </property>
</property> <property name="leftMargin">
</widget> <number>0</number>
</item> </property>
<item> <property name="topMargin">
<widget class="QLabel" name="label_5"> <number>0</number>
<property name="sizePolicy"> </property>
<sizepolicy hsizetype="Expanding" vsizetype="Preferred"> <property name="rightMargin">
<horstretch>0</horstretch> <number>0</number>
<verstretch>0</verstretch> </property>
</sizepolicy> <property name="bottomMargin">
</property> <number>0</number>
<property name="text"> </property>
<string>set keys found from 'reader attack' to emulator memory (implies x and i)</string> <item>
</property> <widget class="QCheckBox" name="eBox">
<property name="wordWrap"> <property name="text">
<bool>true</bool> <string>e</string>
</property> </property>
</widget> </widget>
</item> </item>
</layout> <item>
<widget class="QLabel" name="label_5">
<property name="sizePolicy">
<sizepolicy hsizetype="Expanding" vsizetype="Preferred">
<horstretch>0</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
</property>
<property name="text">
<string>set keys found from 'reader attack' to emulator memory (implies x(--crack) and i)</string>
</property>
<property name="wordWrap">
<bool>true</bool>
</property>
</widget>
</item>
</layout>
</widget>
</item> </item>
<item> <item>
<widget class="Line" name="line_2"> <widget class="Line" name="eLine">
<property name="orientation"> <property name="orientation">
<enum>Qt::Horizontal</enum> <enum>Qt::Horizontal</enum>
</property> </property>
</widget> </widget>
</item> </item>
<item> <item>
<layout class="QHBoxLayout" name="horizontalLayout_3"> <widget class="QGroupBox" name="fGroupBox">
<item> <layout class="QHBoxLayout" name="fLayout">
<widget class="QCheckBox" name="fBox"> <property name="spacing">
<property name="text"> <number>5</number>
<string>f</string> </property>
</property> <property name="leftMargin">
</widget> <number>0</number>
</item> </property>
<item> <property name="topMargin">
<widget class="QLineEdit" name="fEdit"> <number>0</number>
<property name="sizePolicy"> </property>
<sizepolicy hsizetype="Fixed" vsizetype="Fixed"> <property name="rightMargin">
<horstretch>0</horstretch> <number>0</number>
<verstretch>0</verstretch> </property>
</sizepolicy> <property name="bottomMargin">
</property> <number>0</number>
<property name="maximumSize"> </property>
<size> <item>
<width>100</width> <widget class="QCheckBox" name="fBox">
<height>16777215</height> <property name="text">
</size> <string>f</string>
</property> </property>
</widget> </widget>
</item> </item>
<item> <item>
<widget class="QLabel" name="label_6"> <widget class="QLineEdit" name="fEdit">
<property name="sizePolicy"> <property name="sizePolicy">
<sizepolicy hsizetype="Expanding" vsizetype="Preferred"> <sizepolicy hsizetype="Fixed" vsizetype="Fixed">
<horstretch>0</horstretch> <horstretch>0</horstretch>
<verstretch>0</verstretch> <verstretch>0</verstretch>
</sizepolicy> </sizepolicy>
</property> </property>
<property name="text"> <property name="maximumSize">
<string>get UIDs to use for 'reader attack' from file 'f &lt;filename.txt&gt;' (implies x and i)</string> <size>
</property> <width>100</width>
<property name="wordWrap"> <height>16777215</height>
<bool>true</bool> </size>
</property> </property>
</widget> </widget>
</item> </item>
</layout> <item>
<widget class="QLabel" name="label_6">
<property name="sizePolicy">
<sizepolicy hsizetype="Expanding" vsizetype="Preferred">
<horstretch>0</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
</property>
<property name="text">
<string>get UIDs to use for 'reader attack' from file 'f &lt;filename.txt&gt;' (implies x and i)</string>
</property>
<property name="wordWrap">
<bool>true</bool>
</property>
</widget>
</item>
</layout>
</widget>
</item> </item>
<item> <item>
<widget class="Line" name="line"> <widget class="Line" name="fLine">
<property name="orientation"> <property name="orientation">
<enum>Qt::Horizontal</enum> <enum>Qt::Horizontal</enum>
</property> </property>
</widget> </widget>
</item> </item>
<item> <item>
<layout class="QHBoxLayout" name="horizontalLayout_7"> <widget class="QGroupBox" name="rGroupBox">
<item> <layout class="QHBoxLayout" name="rLayout">
<widget class="QCheckBox" name="rBox"> <property name="spacing">
<property name="text"> <number>5</number>
<string>r</string> </property>
</property> <property name="leftMargin">
</widget> <number>0</number>
</item> </property>
<item> <property name="topMargin">
<widget class="QLabel" name="label_7"> <number>0</number>
<property name="sizePolicy"> </property>
<sizepolicy hsizetype="Expanding" vsizetype="Preferred"> <property name="rightMargin">
<horstretch>0</horstretch> <number>0</number>
<verstretch>0</verstretch> </property>
</sizepolicy> <property name="bottomMargin">
</property> <number>0</number>
<property name="text"> </property>
<string>Generate random nonces instead of sequential nonces. Standard reader attack won't work with this option, only moebius attack works</string> <item>
</property> <widget class="QCheckBox" name="rBox">
<property name="wordWrap"> <property name="text">
<bool>true</bool> <string>r</string>
</property> </property>
</widget> </widget>
</item> </item>
</layout> <item>
<widget class="QLabel" name="label_7">
<property name="sizePolicy">
<sizepolicy hsizetype="Expanding" vsizetype="Preferred">
<horstretch>0</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
</property>
<property name="text">
<string>Generate random nonces instead of sequential nonces. Standard reader attack won't work with this option, only moebius attack works</string>
</property>
<property name="wordWrap">
<bool>true</bool>
</property>
</widget>
</item>
</layout>
</widget>
</item>
<item>
<widget class="Line" name="rLine">
<property name="orientation">
<enum>Qt::Horizontal</enum>
</property>
</widget>
</item>
<item>
<widget class="QGroupBox" name="vGroupBox">
<layout class="QHBoxLayout" name="vLayout">
<property name="spacing">
<number>5</number>
</property>
<property name="leftMargin">
<number>0</number>
</property>
<property name="topMargin">
<number>0</number>
</property>
<property name="rightMargin">
<number>0</number>
</property>
<property name="bottomMargin">
<number>0</number>
</property>
<item>
<widget class="QCheckBox" name="vBox">
<property name="text">
<string>-v</string>
</property>
</widget>
</item>
<item>
<widget class="QLabel" name="label_11">
<property name="sizePolicy">
<sizepolicy hsizetype="Expanding" vsizetype="Preferred">
<horstretch>0</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
</property>
<property name="text">
<string>verbose output</string>
</property>
<property name="wordWrap">
<bool>true</bool>
</property>
</widget>
</item>
</layout>
</widget>
</item> </item>
<item> <item>
<widget class="Line" name="line_7"> <widget class="Line" name="vLine">
<property name="orientation"> <property name="orientation">
<enum>Qt::Horizontal</enum> <enum>Qt::Horizontal</enum>
</property> </property>

Loading…
Cancel
Save