Support load data file and key file

pull/2/head
wh201906 5 years ago
parent 6765a84a80
commit c97c550439

@ -31,11 +31,6 @@
<source>B</source> <source>B</source>
<translation type="unfinished"></translation> <translation type="unfinished"></translation>
</message> </message>
<message>
<location filename="../ui/mf_attack_hardnesteddialog.ui" line="86"/>
<source>FFFFFFFFFFFF</source>
<translation type="unfinished"></translation>
</message>
<message> <message>
<location filename="../ui/mf_attack_hardnesteddialog.ui" line="95"/> <location filename="../ui/mf_attack_hardnesteddialog.ui" line="95"/>
<source>Target Block: </source> <source>Target Block: </source>
@ -82,11 +77,6 @@
<source>Path:</source> <source>Path:</source>
<translation type="unfinished"></translation> <translation type="unfinished"></translation>
</message> </message>
<message>
<location filename="../ui/mainwindow.ui" line="45"/>
<source>E:\Documents\source\qt\pm3\win64\proxmark3</source>
<translation type="unfinished"></translation>
</message>
<message> <message>
<location filename="../ui/mainwindow.ui" line="62"/> <location filename="../ui/mainwindow.ui" line="62"/>
<source>Refresh</source> <source>Refresh</source>
@ -149,19 +139,19 @@
</message> </message>
<message> <message>
<location filename="../ui/mainwindow.ui" line="308"/> <location filename="../ui/mainwindow.ui" line="308"/>
<location filename="../ui/mainwindow.ui" line="855"/> <location filename="../ui/mainwindow.ui" line="852"/>
<source>Load</source> <source>Load</source>
<translation type="unfinished"></translation> <translation type="unfinished"></translation>
</message> </message>
<message> <message>
<location filename="../ui/mainwindow.ui" line="321"/> <location filename="../ui/mainwindow.ui" line="321"/>
<location filename="../ui/mainwindow.ui" line="868"/> <location filename="../ui/mainwindow.ui" line="865"/>
<source>Save</source> <source>Save</source>
<translation type="unfinished"></translation> <translation type="unfinished"></translation>
</message> </message>
<message> <message>
<location filename="../ui/mainwindow.ui" line="328"/> <location filename="../ui/mainwindow.ui" line="328"/>
<location filename="../ui/mainwindow.cpp" line="312"/> <location filename="../ui/mainwindow.cpp" line="352"/>
<source>Data</source> <source>Data</source>
<translation type="unfinished"></translation> <translation type="unfinished"></translation>
</message> </message>
@ -171,250 +161,283 @@
<translation type="unfinished"></translation> <translation type="unfinished"></translation>
</message> </message>
<message> <message>
<location filename="../ui/mainwindow.ui" line="351"/> <location filename="../ui/mainwindow.ui" line="348"/>
<source>Attack</source> <source>Attack</source>
<translation type="unfinished"></translation> <translation type="unfinished"></translation>
</message> </message>
<message> <message>
<location filename="../ui/mainwindow.ui" line="376"/> <location filename="../ui/mainwindow.ui" line="373"/>
<source>Card Info</source> <source>Card Info</source>
<translation type="unfinished"></translation> <translation type="unfinished"></translation>
</message> </message>
<message> <message>
<location filename="../ui/mainwindow.ui" line="389"/> <location filename="../ui/mainwindow.ui" line="386"/>
<source>Check Default</source> <source>Check Default</source>
<translation type="unfinished"></translation> <translation type="unfinished"></translation>
</message> </message>
<message> <message>
<location filename="../ui/mainwindow.ui" line="402"/> <location filename="../ui/mainwindow.ui" line="399"/>
<source>Nested</source> <source>Nested</source>
<translation type="unfinished"></translation> <translation type="unfinished"></translation>
</message> </message>
<message> <message>
<location filename="../ui/mainwindow.ui" line="409"/> <location filename="../ui/mainwindow.ui" line="406"/>
<source>Hardnested</source> <source>Hardnested</source>
<translation type="unfinished"></translation> <translation type="unfinished"></translation>
</message> </message>
<message> <message>
<location filename="../ui/mainwindow.ui" line="434"/> <location filename="../ui/mainwindow.ui" line="431"/>
<source>Read/Write</source> <source>Read/Write</source>
<translation type="unfinished"></translation> <translation type="unfinished"></translation>
</message> </message>
<message> <message>
<location filename="../ui/mainwindow.ui" line="444"/> <location filename="../ui/mainwindow.ui" line="441"/>
<source>Block:</source> <source>Block:</source>
<translation type="unfinished"></translation> <translation type="unfinished"></translation>
</message> </message>
<message> <message>
<location filename="../ui/mainwindow.ui" line="476"/> <location filename="../ui/mainwindow.ui" line="473"/>
<source>Key:</source> <source>Key:</source>
<translation type="unfinished"></translation> <translation type="unfinished"></translation>
</message> </message>
<message> <message>
<location filename="../ui/mainwindow.ui" line="488"/> <location filename="../ui/mainwindow.ui" line="492"/>
<source>FFFFFFFFFFFF</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../ui/mainwindow.ui" line="495"/>
<source>Key Type:</source> <source>Key Type:</source>
<translation type="unfinished"></translation> <translation type="unfinished"></translation>
</message> </message>
<message> <message>
<location filename="../ui/mainwindow.ui" line="515"/> <location filename="../ui/mainwindow.ui" line="512"/>
<source>A</source> <source>A</source>
<translation type="unfinished"></translation> <translation type="unfinished"></translation>
</message> </message>
<message> <message>
<location filename="../ui/mainwindow.ui" line="520"/> <location filename="../ui/mainwindow.ui" line="517"/>
<source>B</source> <source>B</source>
<translation type="unfinished"></translation> <translation type="unfinished"></translation>
</message> </message>
<message> <message>
<location filename="../ui/mainwindow.ui" line="543"/> <location filename="../ui/mainwindow.ui" line="540"/>
<source>Normal(Require Password)</source> <source>Normal(Require Password)</source>
<translation type="unfinished"></translation> <translation type="unfinished"></translation>
</message> </message>
<message> <message>
<location filename="../ui/mainwindow.ui" line="558"/> <location filename="../ui/mainwindow.ui" line="555"/>
<location filename="../ui/mainwindow.ui" line="647"/> <location filename="../ui/mainwindow.ui" line="644"/>
<source>Read Block</source> <source>Read Block</source>
<translation type="unfinished"></translation> <translation type="unfinished"></translation>
</message> </message>
<message> <message>
<location filename="../ui/mainwindow.ui" line="565"/> <location filename="../ui/mainwindow.ui" line="562"/>
<location filename="../ui/mainwindow.ui" line="654"/> <location filename="../ui/mainwindow.ui" line="651"/>
<source>Write Block</source> <source>Write Block</source>
<translation type="unfinished"></translation> <translation type="unfinished"></translation>
</message> </message>
<message> <message>
<location filename="../ui/mainwindow.ui" line="572"/> <location filename="../ui/mainwindow.ui" line="569"/>
<location filename="../ui/mainwindow.ui" line="661"/> <location filename="../ui/mainwindow.ui" line="658"/>
<location filename="../ui/mainwindow.ui" line="761"/> <location filename="../ui/mainwindow.ui" line="758"/>
<source>Read All</source> <source>Read All</source>
<translation type="unfinished"></translation> <translation type="unfinished"></translation>
</message> </message>
<message> <message>
<location filename="../ui/mainwindow.ui" line="579"/> <location filename="../ui/mainwindow.ui" line="576"/>
<location filename="../ui/mainwindow.ui" line="668"/> <location filename="../ui/mainwindow.ui" line="665"/>
<source>Write All</source> <source>Write All</source>
<translation type="unfinished"></translation> <translation type="unfinished"></translation>
</message> </message>
<message> <message>
<location filename="../ui/mainwindow.ui" line="598"/> <location filename="../ui/mainwindow.ui" line="595"/>
<source>Dump</source> <source>Dump</source>
<translation type="unfinished"></translation> <translation type="unfinished"></translation>
</message> </message>
<message> <message>
<location filename="../ui/mainwindow.ui" line="611"/> <location filename="../ui/mainwindow.ui" line="608"/>
<source>Restore</source> <source>Restore</source>
<translation type="unfinished"></translation> <translation type="unfinished"></translation>
</message> </message>
<message> <message>
<location filename="../ui/mainwindow.ui" line="621"/> <location filename="../ui/mainwindow.ui" line="618"/>
<source>Chinese Magic Card(Without Password)</source> <source>Chinese Magic Card(Without Password)</source>
<translation type="unfinished"></translation> <translation type="unfinished"></translation>
</message> </message>
<message> <message>
<location filename="../ui/mainwindow.ui" line="633"/> <location filename="../ui/mainwindow.ui" line="630"/>
<source>Lock UFUID Card</source> <source>Lock UFUID Card</source>
<translation type="unfinished"></translation> <translation type="unfinished"></translation>
</message> </message>
<message> <message>
<location filename="../ui/mainwindow.ui" line="640"/> <location filename="../ui/mainwindow.ui" line="637"/>
<source>About UID Card</source> <source>About UID Card</source>
<translation type="unfinished"></translation> <translation type="unfinished"></translation>
</message> </message>
<message> <message>
<location filename="../ui/mainwindow.ui" line="681"/> <location filename="../ui/mainwindow.ui" line="678"/>
<source>Set Parameter</source> <source>Set Parameter</source>
<translation type="unfinished"></translation> <translation type="unfinished"></translation>
</message> </message>
<message> <message>
<location filename="../ui/mainwindow.ui" line="700"/> <location filename="../ui/mainwindow.ui" line="697"/>
<source>Wipe</source> <source>Wipe</source>
<translation type="unfinished"></translation> <translation type="unfinished"></translation>
</message> </message>
<message> <message>
<location filename="../ui/mainwindow.ui" line="726"/> <location filename="../ui/mainwindow.ui" line="723"/>
<location filename="../ui/mainwindow.ui" line="781"/> <location filename="../ui/mainwindow.ui" line="778"/>
<source>Simulate</source> <source>Simulate</source>
<translation type="unfinished"></translation> <translation type="unfinished"></translation>
</message> </message>
<message> <message>
<location filename="../ui/mainwindow.ui" line="754"/> <location filename="../ui/mainwindow.ui" line="751"/>
<source>Load from data above</source> <source>Load from data above</source>
<translation type="unfinished"></translation> <translation type="unfinished"></translation>
</message> </message>
<message> <message>
<location filename="../ui/mainwindow.ui" line="774"/> <location filename="../ui/mainwindow.ui" line="771"/>
<source>Clear</source> <source>Clear</source>
<translation type="unfinished"></translation> <translation type="unfinished"></translation>
</message> </message>
<message> <message>
<location filename="../ui/mainwindow.ui" line="804"/> <location filename="../ui/mainwindow.ui" line="801"/>
<location filename="../ui/mainwindow.ui" line="835"/> <location filename="../ui/mainwindow.ui" line="832"/>
<source>Sniff</source> <source>Sniff</source>
<translation type="unfinished"></translation> <translation type="unfinished"></translation>
</message> </message>
<message> <message>
<location filename="../ui/mainwindow.ui" line="842"/> <location filename="../ui/mainwindow.ui" line="839"/>
<source>List Sniff Data</source> <source>List Sniff Data</source>
<translation type="unfinished"></translation> <translation type="unfinished"></translation>
</message> </message>
<message> <message>
<location filename="../ui/mainwindow.ui" line="894"/> <location filename="../ui/mainwindow.ui" line="891"/>
<source>RawCommand</source> <source>RawCommand</source>
<translation type="unfinished"></translation> <translation type="unfinished"></translation>
</message> </message>
<message> <message>
<location filename="../ui/mainwindow.ui" line="926"/> <location filename="../ui/mainwindow.ui" line="923"/>
<location filename="../ui/mainwindow.cpp" line="134"/> <location filename="../ui/mainwindow.cpp" line="133"/>
<source>History:</source> <source>History:</source>
<translation type="unfinished"></translation> <translation type="unfinished"></translation>
</message> </message>
<message> <message>
<location filename="../ui/mainwindow.ui" line="955"/> <location filename="../ui/mainwindow.ui" line="952"/>
<source>ClearHistory</source> <source>ClearHistory</source>
<translation type="unfinished"></translation> <translation type="unfinished"></translation>
</message> </message>
<message> <message>
<location filename="../ui/mainwindow.ui" line="974"/> <location filename="../ui/mainwindow.ui" line="971"/>
<source>Send</source> <source>Send</source>
<translation type="unfinished"></translation> <translation type="unfinished"></translation>
</message> </message>
<message> <message>
<location filename="../ui/mainwindow.ui" line="981"/> <location filename="../ui/mainwindow.ui" line="978"/>
<source>ClearOutput</source> <source>ClearOutput</source>
<translation type="unfinished"></translation> <translation type="unfinished"></translation>
</message> </message>
<message> <message>
<location filename="../ui/mainwindow.cpp" line="70"/> <location filename="../ui/mainwindow.cpp" line="69"/>
<location filename="../ui/mainwindow.cpp" line="170"/> <location filename="../ui/mainwindow.cpp" line="169"/>
<location filename="../ui/mainwindow.cpp" line="198"/>
<location filename="../ui/mainwindow.cpp" line="211"/>
<source>Info</source> <source>Info</source>
<translation type="unfinished"></translation> <translation type="unfinished"></translation>
</message> </message>
<message> <message>
<location filename="../ui/mainwindow.cpp" line="70"/> <location filename="../ui/mainwindow.cpp" line="69"/>
<source>Plz choose a port first</source> <source>Plz choose a port first</source>
<translation type="unfinished"></translation> <translation type="unfinished"></translation>
</message> </message>
<message> <message>
<location filename="../ui/mainwindow.cpp" line="83"/> <location filename="../ui/mainwindow.cpp" line="82"/>
<source>Connected</source> <source>Connected</source>
<translation type="unfinished"></translation> <translation type="unfinished"></translation>
</message> </message>
<message> <message>
<location filename="../ui/mainwindow.cpp" line="87"/> <location filename="../ui/mainwindow.cpp" line="86"/>
<location filename="../ui/mainwindow.cpp" line="96"/> <location filename="../ui/mainwindow.cpp" line="95"/>
<location filename="../ui/mainwindow.cpp" line="302"/> <location filename="../ui/mainwindow.cpp" line="342"/>
<source>Not Connected</source> <source>Not Connected</source>
<translation type="unfinished"></translation> <translation type="unfinished"></translation>
</message> </message>
<message> <message>
<location filename="../ui/mainwindow.cpp" line="170"/> <location filename="../ui/mainwindow.cpp" line="169"/>
<source>When Changeing card type, the data and keys in this app will be cleard. <source>When Changeing card type, the data and keys in this app will be cleard.
Continue?</source> Continue?</source>
<translation type="unfinished"></translation> <translation type="unfinished"></translation>
</message> </message>
<message> <message>
<location filename="../ui/mainwindow.cpp" line="303"/> <location filename="../ui/mainwindow.cpp" line="191"/>
<source>Plz choose the data file:</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../ui/mainwindow.cpp" line="192"/>
<source>Binary Data Files(*.bin *.dump);;Text Data Files(*.txt *.eml);;All Files(*.*)</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../ui/mainwindow.cpp" line="198"/>
<location filename="../ui/mainwindow.cpp" line="211"/>
<source>Failed to open</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../ui/mainwindow.cpp" line="204"/>
<source>Plz choose the key file:</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../ui/mainwindow.cpp" line="205"/>
<source>Binary Key Files(*.bin *.dump);;All Files(*.*)</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../ui/mainwindow.cpp" line="220"/>
<source>Save data to</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../ui/mainwindow.cpp" line="222"/>
<source>Bin Files(*.bin *.dump);;Text Files(*.txt *.eml)</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../ui/mainwindow.cpp" line="343"/>
<source>Idle</source> <source>Idle</source>
<translation type="unfinished"></translation> <translation type="unfinished"></translation>
</message> </message>
<message> <message>
<location filename="../ui/mainwindow.cpp" line="310"/> <location filename="../ui/mainwindow.cpp" line="350"/>
<location filename="../ui/mainwindow.cpp" line="325"/> <location filename="../ui/mainwindow.cpp" line="359"/>
<source>Sec</source> <source>Sec</source>
<translation type="unfinished"></translation> <translation type="unfinished"></translation>
</message> </message>
<message> <message>
<location filename="../ui/mainwindow.cpp" line="311"/> <location filename="../ui/mainwindow.cpp" line="351"/>
<source>Blk</source> <source>Blk</source>
<translation type="unfinished"></translation> <translation type="unfinished"></translation>
</message> </message>
<message> <message>
<location filename="../ui/mainwindow.cpp" line="326"/> <location filename="../ui/mainwindow.cpp" line="360"/>
<source>KeyA</source> <source>KeyA</source>
<translation type="unfinished"></translation> <translation type="unfinished"></translation>
</message> </message>
<message> <message>
<location filename="../ui/mainwindow.cpp" line="327"/> <location filename="../ui/mainwindow.cpp" line="361"/>
<source>KeyB</source> <source>KeyB</source>
<translation type="unfinished"></translation> <translation type="unfinished"></translation>
</message> </message>
<message> <message>
<location filename="../ui/mainwindow.cpp" line="366"/> <location filename="../ui/mainwindow.cpp" line="394"/>
<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="368"/> <location filename="../ui/mainwindow.cpp" line="396"/>
<source>PM3:</source> <source>PM3:</source>
<translation type="unfinished"></translation> <translation type="unfinished"></translation>
</message> </message>
<message> <message>
<location filename="../ui/mainwindow.cpp" line="370"/> <location filename="../ui/mainwindow.cpp" line="398"/>
<source>State:</source> <source>State:</source>
<translation type="unfinished"></translation> <translation type="unfinished"></translation>
</message> </message>
@ -422,22 +445,22 @@ Continue?</source>
<context> <context>
<name>Mifare</name> <name>Mifare</name>
<message> <message>
<location filename="../module/mifare.cpp" line="269"/> <location filename="../module/mifare.cpp" line="268"/>
<location filename="../module/mifare.cpp" line="366"/> <location filename="../module/mifare.cpp" line="365"/>
<source>Success!</source> <source>Success!</source>
<translation type="unfinished"></translation> <translation type="unfinished"></translation>
</message> </message>
<message> <message>
<location filename="../module/mifare.cpp" line="269"/> <location filename="../module/mifare.cpp" line="268"/>
<location filename="../module/mifare.cpp" line="273"/> <location filename="../module/mifare.cpp" line="272"/>
<location filename="../module/mifare.cpp" line="366"/> <location filename="../module/mifare.cpp" line="365"/>
<location filename="../module/mifare.cpp" line="370"/> <location filename="../module/mifare.cpp" line="369"/>
<source>Info</source> <source>Info</source>
<translation type="unfinished"></translation> <translation type="unfinished"></translation>
</message> </message>
<message> <message>
<location filename="../module/mifare.cpp" line="273"/> <location filename="../module/mifare.cpp" line="272"/>
<location filename="../module/mifare.cpp" line="370"/> <location filename="../module/mifare.cpp" line="369"/>
<source>Failed!</source> <source>Failed!</source>
<translation type="unfinished"></translation> <translation type="unfinished"></translation>
</message> </message>

@ -35,11 +35,6 @@
<source>B</source> <source>B</source>
<translation></translation> <translation></translation>
</message> </message>
<message>
<location filename="../ui/mf_attack_hardnesteddialog.ui" line="86"/>
<source>FFFFFFFFFFFF</source>
<translation></translation>
</message>
<message> <message>
<location filename="../ui/mf_attack_hardnesteddialog.ui" line="95"/> <location filename="../ui/mf_attack_hardnesteddialog.ui" line="95"/>
<source>Target Block: </source> <source>Target Block: </source>
@ -86,11 +81,6 @@
<source>Path:</source> <source>Path:</source>
<translation></translation> <translation></translation>
</message> </message>
<message>
<location filename="../ui/mainwindow.ui" line="45"/>
<source>E:\Documents\source\qt\pm3\win64\proxmark3</source>
<translation></translation>
</message>
<message> <message>
<location filename="../ui/mainwindow.ui" line="62"/> <location filename="../ui/mainwindow.ui" line="62"/>
<source>Refresh</source> <source>Refresh</source>
@ -153,19 +143,19 @@
</message> </message>
<message> <message>
<location filename="../ui/mainwindow.ui" line="308"/> <location filename="../ui/mainwindow.ui" line="308"/>
<location filename="../ui/mainwindow.ui" line="855"/> <location filename="../ui/mainwindow.ui" line="852"/>
<source>Load</source> <source>Load</source>
<translation></translation> <translation></translation>
</message> </message>
<message> <message>
<location filename="../ui/mainwindow.ui" line="321"/> <location filename="../ui/mainwindow.ui" line="321"/>
<location filename="../ui/mainwindow.ui" line="868"/> <location filename="../ui/mainwindow.ui" line="865"/>
<source>Save</source> <source>Save</source>
<translation></translation> <translation></translation>
</message> </message>
<message> <message>
<location filename="../ui/mainwindow.ui" line="328"/> <location filename="../ui/mainwindow.ui" line="328"/>
<location filename="../ui/mainwindow.cpp" line="312"/> <location filename="../ui/mainwindow.cpp" line="352"/>
<source>Data</source> <source>Data</source>
<translation></translation> <translation></translation>
</message> </message>
@ -175,250 +165,283 @@
<translation></translation> <translation></translation>
</message> </message>
<message> <message>
<location filename="../ui/mainwindow.ui" line="351"/> <location filename="../ui/mainwindow.ui" line="348"/>
<source>Attack</source> <source>Attack</source>
<translation></translation> <translation></translation>
</message> </message>
<message> <message>
<location filename="../ui/mainwindow.ui" line="376"/> <location filename="../ui/mainwindow.ui" line="373"/>
<source>Card Info</source> <source>Card Info</source>
<translation></translation> <translation></translation>
</message> </message>
<message> <message>
<location filename="../ui/mainwindow.ui" line="389"/> <location filename="../ui/mainwindow.ui" line="386"/>
<source>Check Default</source> <source>Check Default</source>
<translation></translation> <translation></translation>
</message> </message>
<message> <message>
<location filename="../ui/mainwindow.ui" line="402"/> <location filename="../ui/mainwindow.ui" line="399"/>
<source>Nested</source> <source>Nested</source>
<translation>Nested</translation> <translation>Nested</translation>
</message> </message>
<message> <message>
<location filename="../ui/mainwindow.ui" line="409"/> <location filename="../ui/mainwindow.ui" line="406"/>
<source>Hardnested</source> <source>Hardnested</source>
<translation>Hardested</translation> <translation>Hardested</translation>
</message> </message>
<message> <message>
<location filename="../ui/mainwindow.ui" line="434"/> <location filename="../ui/mainwindow.ui" line="431"/>
<source>Read/Write</source> <source>Read/Write</source>
<translation>/</translation> <translation>/</translation>
</message> </message>
<message> <message>
<location filename="../ui/mainwindow.ui" line="444"/> <location filename="../ui/mainwindow.ui" line="441"/>
<source>Block:</source> <source>Block:</source>
<translation></translation> <translation></translation>
</message> </message>
<message> <message>
<location filename="../ui/mainwindow.ui" line="476"/> <location filename="../ui/mainwindow.ui" line="473"/>
<source>Key:</source> <source>Key:</source>
<translation></translation> <translation></translation>
</message> </message>
<message> <message>
<location filename="../ui/mainwindow.ui" line="488"/> <location filename="../ui/mainwindow.ui" line="492"/>
<source>FFFFFFFFFFFF</source>
<translation></translation>
</message>
<message>
<location filename="../ui/mainwindow.ui" line="495"/>
<source>Key Type:</source> <source>Key Type:</source>
<translation>Key</translation> <translation>Key</translation>
</message> </message>
<message> <message>
<location filename="../ui/mainwindow.ui" line="515"/> <location filename="../ui/mainwindow.ui" line="512"/>
<source>A</source> <source>A</source>
<translation></translation> <translation></translation>
</message> </message>
<message> <message>
<location filename="../ui/mainwindow.ui" line="520"/> <location filename="../ui/mainwindow.ui" line="517"/>
<source>B</source> <source>B</source>
<translation></translation> <translation></translation>
</message> </message>
<message> <message>
<location filename="../ui/mainwindow.ui" line="543"/> <location filename="../ui/mainwindow.ui" line="540"/>
<source>Normal(Require Password)</source> <source>Normal(Require Password)</source>
<translation></translation> <translation></translation>
</message> </message>
<message> <message>
<location filename="../ui/mainwindow.ui" line="558"/> <location filename="../ui/mainwindow.ui" line="555"/>
<location filename="../ui/mainwindow.ui" line="647"/> <location filename="../ui/mainwindow.ui" line="644"/>
<source>Read Block</source> <source>Read Block</source>
<translation></translation> <translation></translation>
</message> </message>
<message> <message>
<location filename="../ui/mainwindow.ui" line="565"/> <location filename="../ui/mainwindow.ui" line="562"/>
<location filename="../ui/mainwindow.ui" line="654"/> <location filename="../ui/mainwindow.ui" line="651"/>
<source>Write Block</source> <source>Write Block</source>
<translation></translation> <translation></translation>
</message> </message>
<message> <message>
<location filename="../ui/mainwindow.ui" line="572"/> <location filename="../ui/mainwindow.ui" line="569"/>
<location filename="../ui/mainwindow.ui" line="661"/> <location filename="../ui/mainwindow.ui" line="658"/>
<location filename="../ui/mainwindow.ui" line="761"/> <location filename="../ui/mainwindow.ui" line="758"/>
<source>Read All</source> <source>Read All</source>
<translation></translation> <translation></translation>
</message> </message>
<message> <message>
<location filename="../ui/mainwindow.ui" line="579"/> <location filename="../ui/mainwindow.ui" line="576"/>
<location filename="../ui/mainwindow.ui" line="668"/> <location filename="../ui/mainwindow.ui" line="665"/>
<source>Write All</source> <source>Write All</source>
<translation></translation> <translation></translation>
</message> </message>
<message> <message>
<location filename="../ui/mainwindow.ui" line="598"/> <location filename="../ui/mainwindow.ui" line="595"/>
<source>Dump</source> <source>Dump</source>
<translation>Dump</translation> <translation>Dump</translation>
</message> </message>
<message> <message>
<location filename="../ui/mainwindow.ui" line="611"/> <location filename="../ui/mainwindow.ui" line="608"/>
<source>Restore</source> <source>Restore</source>
<translation>Restore</translation> <translation>Restore</translation>
</message> </message>
<message> <message>
<location filename="../ui/mainwindow.ui" line="621"/> <location filename="../ui/mainwindow.ui" line="618"/>
<source>Chinese Magic Card(Without Password)</source> <source>Chinese Magic Card(Without Password)</source>
<translation>UID</translation> <translation>UID</translation>
</message> </message>
<message> <message>
<location filename="../ui/mainwindow.ui" line="633"/> <location filename="../ui/mainwindow.ui" line="630"/>
<source>Lock UFUID Card</source> <source>Lock UFUID Card</source>
<translation>UFUID</translation> <translation>UFUID</translation>
</message> </message>
<message> <message>
<location filename="../ui/mainwindow.ui" line="640"/> <location filename="../ui/mainwindow.ui" line="637"/>
<source>About UID Card</source> <source>About UID Card</source>
<translation>UID</translation> <translation>UID</translation>
</message> </message>
<message> <message>
<location filename="../ui/mainwindow.ui" line="681"/> <location filename="../ui/mainwindow.ui" line="678"/>
<source>Set Parameter</source> <source>Set Parameter</source>
<translation></translation> <translation></translation>
</message> </message>
<message> <message>
<location filename="../ui/mainwindow.ui" line="700"/> <location filename="../ui/mainwindow.ui" line="697"/>
<source>Wipe</source> <source>Wipe</source>
<translation></translation> <translation></translation>
</message> </message>
<message> <message>
<location filename="../ui/mainwindow.ui" line="726"/> <location filename="../ui/mainwindow.ui" line="723"/>
<location filename="../ui/mainwindow.ui" line="781"/> <location filename="../ui/mainwindow.ui" line="778"/>
<source>Simulate</source> <source>Simulate</source>
<translation></translation> <translation></translation>
</message> </message>
<message> <message>
<location filename="../ui/mainwindow.ui" line="754"/> <location filename="../ui/mainwindow.ui" line="751"/>
<source>Load from data above</source> <source>Load from data above</source>
<translation></translation> <translation></translation>
</message> </message>
<message> <message>
<location filename="../ui/mainwindow.ui" line="774"/> <location filename="../ui/mainwindow.ui" line="771"/>
<source>Clear</source> <source>Clear</source>
<translation></translation> <translation></translation>
</message> </message>
<message> <message>
<location filename="../ui/mainwindow.ui" line="804"/> <location filename="../ui/mainwindow.ui" line="801"/>
<location filename="../ui/mainwindow.ui" line="835"/> <location filename="../ui/mainwindow.ui" line="832"/>
<source>Sniff</source> <source>Sniff</source>
<translation></translation> <translation></translation>
</message> </message>
<message> <message>
<location filename="../ui/mainwindow.ui" line="842"/> <location filename="../ui/mainwindow.ui" line="839"/>
<source>List Sniff Data</source> <source>List Sniff Data</source>
<translation></translation> <translation></translation>
</message> </message>
<message> <message>
<location filename="../ui/mainwindow.ui" line="894"/> <location filename="../ui/mainwindow.ui" line="891"/>
<source>RawCommand</source> <source>RawCommand</source>
<translation></translation> <translation></translation>
</message> </message>
<message> <message>
<location filename="../ui/mainwindow.ui" line="926"/> <location filename="../ui/mainwindow.ui" line="923"/>
<location filename="../ui/mainwindow.cpp" line="134"/> <location filename="../ui/mainwindow.cpp" line="133"/>
<source>History:</source> <source>History:</source>
<translation></translation> <translation></translation>
</message> </message>
<message> <message>
<location filename="../ui/mainwindow.ui" line="955"/> <location filename="../ui/mainwindow.ui" line="952"/>
<source>ClearHistory</source> <source>ClearHistory</source>
<translation></translation> <translation></translation>
</message> </message>
<message> <message>
<location filename="../ui/mainwindow.ui" line="974"/> <location filename="../ui/mainwindow.ui" line="971"/>
<source>Send</source> <source>Send</source>
<translation></translation> <translation></translation>
</message> </message>
<message> <message>
<location filename="../ui/mainwindow.ui" line="981"/> <location filename="../ui/mainwindow.ui" line="978"/>
<source>ClearOutput</source> <source>ClearOutput</source>
<translation></translation> <translation></translation>
</message> </message>
<message> <message>
<location filename="../ui/mainwindow.cpp" line="70"/> <location filename="../ui/mainwindow.cpp" line="69"/>
<location filename="../ui/mainwindow.cpp" line="170"/> <location filename="../ui/mainwindow.cpp" line="169"/>
<location filename="../ui/mainwindow.cpp" line="198"/>
<location filename="../ui/mainwindow.cpp" line="211"/>
<source>Info</source> <source>Info</source>
<translation></translation> <translation></translation>
</message> </message>
<message> <message>
<location filename="../ui/mainwindow.cpp" line="70"/> <location filename="../ui/mainwindow.cpp" line="69"/>
<source>Plz choose a port first</source> <source>Plz choose a port first</source>
<translation></translation> <translation></translation>
</message> </message>
<message> <message>
<location filename="../ui/mainwindow.cpp" line="83"/> <location filename="../ui/mainwindow.cpp" line="82"/>
<source>Connected</source> <source>Connected</source>
<translation></translation> <translation></translation>
</message> </message>
<message> <message>
<location filename="../ui/mainwindow.cpp" line="87"/> <location filename="../ui/mainwindow.cpp" line="86"/>
<location filename="../ui/mainwindow.cpp" line="96"/> <location filename="../ui/mainwindow.cpp" line="95"/>
<location filename="../ui/mainwindow.cpp" line="302"/> <location filename="../ui/mainwindow.cpp" line="342"/>
<source>Not Connected</source> <source>Not Connected</source>
<translation></translation> <translation></translation>
</message> </message>
<message> <message>
<location filename="../ui/mainwindow.cpp" line="170"/> <location filename="../ui/mainwindow.cpp" line="169"/>
<source>When Changeing card type, the data and keys in this app will be cleard. <source>When Changeing card type, the data and keys in this app will be cleard.
Continue?</source> Continue?</source>
<translation>datakey\n</translation> <translation>datakey\n</translation>
</message> </message>
<message> <message>
<location filename="../ui/mainwindow.cpp" line="303"/> <location filename="../ui/mainwindow.cpp" line="191"/>
<source>Plz choose the data file:</source>
<translation>data</translation>
</message>
<message>
<location filename="../ui/mainwindow.cpp" line="192"/>
<source>Binary Data Files(*.bin *.dump);;Text Data Files(*.txt *.eml);;All Files(*.*)</source>
<translation>Data(*.bin *.dump);;Data(*.txt *.eml);;(*.*)</translation>
</message>
<message>
<location filename="../ui/mainwindow.cpp" line="198"/>
<location filename="../ui/mainwindow.cpp" line="211"/>
<source>Failed to open</source>
<translation></translation>
</message>
<message>
<location filename="../ui/mainwindow.cpp" line="204"/>
<source>Plz choose the key file:</source>
<translation>key</translation>
</message>
<message>
<location filename="../ui/mainwindow.cpp" line="205"/>
<source>Binary Key Files(*.bin *.dump);;All Files(*.*)</source>
<translation>Key(*.bin *.dump);;(*.*)</translation>
</message>
<message>
<location filename="../ui/mainwindow.cpp" line="220"/>
<source>Save data to</source>
<translation></translation>
</message>
<message>
<location filename="../ui/mainwindow.cpp" line="222"/>
<source>Bin Files(*.bin *.dump);;Text Files(*.txt *.eml)</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../ui/mainwindow.cpp" line="343"/>
<source>Idle</source> <source>Idle</source>
<translation></translation> <translation></translation>
</message> </message>
<message> <message>
<location filename="../ui/mainwindow.cpp" line="310"/> <location filename="../ui/mainwindow.cpp" line="350"/>
<location filename="../ui/mainwindow.cpp" line="325"/> <location filename="../ui/mainwindow.cpp" line="359"/>
<source>Sec</source> <source>Sec</source>
<translation></translation> <translation></translation>
</message> </message>
<message> <message>
<location filename="../ui/mainwindow.cpp" line="311"/> <location filename="../ui/mainwindow.cpp" line="351"/>
<source>Blk</source> <source>Blk</source>
<translation></translation> <translation></translation>
</message> </message>
<message> <message>
<location filename="../ui/mainwindow.cpp" line="326"/> <location filename="../ui/mainwindow.cpp" line="360"/>
<source>KeyA</source> <source>KeyA</source>
<translation></translation> <translation></translation>
</message> </message>
<message> <message>
<location filename="../ui/mainwindow.cpp" line="327"/> <location filename="../ui/mainwindow.cpp" line="361"/>
<source>KeyB</source> <source>KeyB</source>
<translation></translation> <translation></translation>
</message> </message>
<message> <message>
<location filename="../ui/mainwindow.cpp" line="366"/> <location filename="../ui/mainwindow.cpp" line="394"/>
<source>HW Version:</source> <source>HW Version:</source>
<translation></translation> <translation></translation>
</message> </message>
<message> <message>
<location filename="../ui/mainwindow.cpp" line="368"/> <location filename="../ui/mainwindow.cpp" line="396"/>
<source>PM3:</source> <source>PM3:</source>
<translation></translation> <translation></translation>
</message> </message>
<message> <message>
<location filename="../ui/mainwindow.cpp" line="370"/> <location filename="../ui/mainwindow.cpp" line="398"/>
<source>State:</source> <source>State:</source>
<translation></translation> <translation></translation>
</message> </message>
@ -430,22 +453,22 @@ Continue?</source>
<translation type="vanished"></translation> <translation type="vanished"></translation>
</message> </message>
<message> <message>
<location filename="../module/mifare.cpp" line="269"/> <location filename="../module/mifare.cpp" line="268"/>
<location filename="../module/mifare.cpp" line="366"/> <location filename="../module/mifare.cpp" line="365"/>
<source>Success!</source> <source>Success!</source>
<translation></translation> <translation></translation>
</message> </message>
<message> <message>
<location filename="../module/mifare.cpp" line="269"/> <location filename="../module/mifare.cpp" line="268"/>
<location filename="../module/mifare.cpp" line="273"/> <location filename="../module/mifare.cpp" line="272"/>
<location filename="../module/mifare.cpp" line="366"/> <location filename="../module/mifare.cpp" line="365"/>
<location filename="../module/mifare.cpp" line="370"/> <location filename="../module/mifare.cpp" line="369"/>
<source>Info</source> <source>Info</source>
<translation></translation> <translation></translation>
</message> </message>
<message> <message>
<location filename="../module/mifare.cpp" line="273"/> <location filename="../module/mifare.cpp" line="272"/>
<location filename="../module/mifare.cpp" line="370"/> <location filename="../module/mifare.cpp" line="369"/>
<source>Failed!</source> <source>Failed!</source>
<translation></translation> <translation></translation>
</message> </message>

@ -422,6 +422,7 @@ void Mifare::data_syncWithDataWidget(bool syncAll, int block)
{ {
for(int i = 0; i < cardType.blocks; i++) for(int i = 0; i < cardType.blocks; i++)
{ {
tmp = "";
tmp += dataList->at(i).mid(0, 2); tmp += dataList->at(i).mid(0, 2);
for(int j = 1; j < 16; j++) for(int j = 1; j < 16; j++)
{ {
@ -545,3 +546,99 @@ void Mifare::setCardType(int type)
data_clearData(); data_clearData();
} }
} }
bool Mifare::data_loadDataFile(const QString& filename)
{
QFile file(filename, this);
if(file.open(QIODevice::ReadOnly))
{
QByteArray buff;
buff = file.read(8192);
bool isBin = false;
for(int i = 0; i < cardType.blocks * 16; i++) // Detect the file type
{
// qDebug() << (unsigned char)buff[i];
if(!((buff[i] >= 'A' && buff[i] <= 'F') ||
(buff[i] >= 'a' && buff[i] <= 'f') ||
(buff[i] >= '0' && buff[i] <= '9') ||
buff[i] == '\n' ||
buff[i] == '\r'))
{
isBin = true;
break;
}
}
if(isBin)
{
char LByte, RByte;
char map[16] = {'0', '1', '2', '3', '4', '5', '6', '7', '8', '9', 'A', 'B', 'C', 'D', 'E', 'F'};
for(int i = 0; i < cardType.blocks; i++)
{
QString tmp = "";
for(int j = 0; j < 16; j++)
{
LByte = map[(unsigned char)buff[i * 16 + j] >> 4];
RByte = map[(unsigned char)buff[i * 16 + j] & 0xF];
tmp += LByte;
tmp += RByte;
}
qDebug() << tmp;
dataList->replace(i, tmp.toUpper());
}
}
else
{
QString tmp = buff.left(cardType.blocks * 34);
QStringList tmpList = tmp.split("\r\n");
for(int i = 0; i < cardType.blocks; i++)
{
dataList->replace(i, tmpList[i].toUpper());
qDebug() << tmpList[i];
}
}
file.close();
data_syncWithDataWidget();
return true;
}
else
{
return false;
}
}
bool Mifare::data_loadKeyFile(const QString& filename)
{
QFile file(filename, this);
if(file.open(QIODevice::ReadOnly))
{
QByteArray buff;
buff = file.read(960);
bool isBin = true;
if(isBin)
{
char LByte, RByte;
char map[16] = {'0', '1', '2', '3', '4', '5', '6', '7', '8', '9', 'A', 'B', 'C', 'D', 'E', 'F'};
for(int i = 0; i < cardType.sectors; i++)
{
QString tmp = "";
for(int j = 0; j < 12; j++)
{
LByte = map[(unsigned char)buff[i * 12 + j] >> 4];
RByte = map[(unsigned char)buff[i * 12 + j] & 0xF];
tmp += LByte;
tmp += RByte;
}
qDebug() << tmp;
keyAList->replace(i, tmp.left(12).toUpper());
keyBList->replace(i, tmp.right(12).toUpper());
}
}
file.close();
data_syncWithKeyWidget();
return true;
}
else
{
return false;
}
}

@ -93,6 +93,12 @@ public:
void readC(); void readC();
void wipeC(); void wipeC();
void setParameterC(); void setParameterC();
QStringList* keyAList;
QStringList* keyBList;
QStringList* dataList;
bool data_loadDataFile(const QString &filename);
bool data_loadKeyFile(const QString &filename);
public slots: public slots:
signals: signals:
@ -101,9 +107,7 @@ private:
Ui::MainWindow *ui; Ui::MainWindow *ui;
Util* util; Util* util;
QStringList* keyAList;
QStringList* keyBList;
QStringList* dataList;
QRegExp* dataPattern; QRegExp* dataPattern;
QRegExp* chkKeyPattern; QRegExp* chkKeyPattern;
QRegExp* nestedKeyPattern; QRegExp* nestedKeyPattern;

@ -17,7 +17,6 @@ MainWindow::MainWindow(QWidget *parent)
util = new Util(this); util = new Util(this);
mifare = new Mifare(ui, util, this); mifare = new Mifare(ui, util, this);
} }
MainWindow::~MainWindow() MainWindow::~MainWindow()
@ -30,7 +29,7 @@ MainWindow::~MainWindow()
delete pm3Thread; delete pm3Thread;
} }
void MainWindow::initUI() void MainWindow::initUI() // will be called by main.app
{ {
ui->retranslateUi(this); ui->retranslateUi(this);
uiInit(); uiInit();
@ -183,6 +182,47 @@ void MainWindow::MF_onTypeChanged(int id, bool st)
typeBtnGroup->blockSignals(false); typeBtnGroup->blockSignals(false);
} }
void MainWindow::on_MF_File_loadButton_clicked()
{
QString title = "";
QString filename = "";
if(ui->MF_File_dataBox->isChecked())
{
title = tr("Plz choose the data file:");
filename = QFileDialog::getOpenFileName(this, title, "./", tr("Binary Data Files(*.bin *.dump);;Text Data Files(*.txt *.eml);;All Files(*.*)"));
qDebug() << filename;
if(filename != "")
{
if(!mifare->data_loadDataFile(filename))
{
QMessageBox::information(this, tr("Info"), tr("Failed to open") + "\n" + filename);
}
}
}
else if(ui->MF_File_keyBox->isChecked())
{
title = tr("Plz choose the key file:");
filename = QFileDialog::getOpenFileName(this, title, "./", tr("Binary Key Files(*.bin *.dump);;All Files(*.*)"));
qDebug() << filename;
if(filename != "")
{
if(!mifare->data_loadKeyFile(filename))
{
QMessageBox::information(this, tr("Info"), tr("Failed to open") + "\n" + filename);
}
}
}
}
void MainWindow::on_MF_File_saveButton_clicked()
{
QString title = tr("Save data to");
QString selectedType = "";
QString filename = QFileDialog::getSaveFileName(this, title, "./", tr("Bin Files(*.bin *.dump);;Text Files(*.txt *.eml)"), &selectedType);
qDebug() << filename << selectedType;
}
void MainWindow::on_MF_Attack_infoButton_clicked() void MainWindow::on_MF_Attack_infoButton_clicked()
{ {
mifare->info(); mifare->info();
@ -314,12 +354,6 @@ void MainWindow::uiInit()
ui->MF_dataWidget->setColumnWidth(0, 35); ui->MF_dataWidget->setColumnWidth(0, 35);
ui->MF_dataWidget->setColumnWidth(1, 35); ui->MF_dataWidget->setColumnWidth(1, 35);
ui->MF_dataWidget->setColumnWidth(2, 400); ui->MF_dataWidget->setColumnWidth(2, 400);
// for(int i = 0; i < 256; i++)
// {
// ui->MF_dataWidget->setItem(i, 0, new QTableWidgetItem());
// ui->MF_dataWidget->setItem(i, 1, new QTableWidgetItem());
// ui->MF_dataWidget->setItem(i, 2, new QTableWidgetItem());
// }
ui->MF_keyWidget->setColumnCount(3); ui->MF_keyWidget->setColumnCount(3);
ui->MF_keyWidget->setHorizontalHeaderItem(0, new QTableWidgetItem(tr("Sec"))); ui->MF_keyWidget->setHorizontalHeaderItem(0, new QTableWidgetItem(tr("Sec")));
@ -329,12 +363,6 @@ void MainWindow::uiInit()
ui->MF_keyWidget->setColumnWidth(0, 35); ui->MF_keyWidget->setColumnWidth(0, 35);
ui->MF_keyWidget->setColumnWidth(1, 110); ui->MF_keyWidget->setColumnWidth(1, 110);
ui->MF_keyWidget->setColumnWidth(2, 110); ui->MF_keyWidget->setColumnWidth(2, 110);
// for(int i = 0; i < 40; i++)
// {
// ui->MF_keyWidget->setItem(i, 0, new QTableWidgetItem());
// ui->MF_keyWidget->setItem(i, 1, new QTableWidgetItem());
// ui->MF_keyWidget->setItem(i, 2, new QTableWidgetItem());
// }
MF_widgetReset(); MF_widgetReset();
typeBtnGroup = new QButtonGroup(this); typeBtnGroup = new QButtonGroup(this);

@ -9,6 +9,7 @@
#include <QListWidgetItem> #include <QListWidgetItem>
#include <QButtonGroup> #include <QButtonGroup>
#include <QRadioButton> #include <QRadioButton>
#include <QFileDialog>
#include <QtSerialPort/QSerialPortInfo> #include <QtSerialPort/QSerialPortInfo>
#include <QtSerialPort/QSerialPort> #include <QtSerialPort/QSerialPort>
@ -89,12 +90,17 @@ private slots:
void on_MF_UID_writeBlockButton_clicked(); void on_MF_UID_writeBlockButton_clicked();
void on_MF_File_loadButton_clicked();
void on_MF_File_saveButton_clicked();
private: private:
Ui::MainWindow *ui; Ui::MainWindow* ui;
QButtonGroup* typeBtnGroup; QButtonGroup* typeBtnGroup;
QLabel* connectStatusBar; QLabel* connectStatusBar;
QLabel* programStatusBar; QLabel* programStatusBar;
QLabel* PM3VersionBar; QLabel* PM3VersionBar;
void uiInit(); void uiInit();
PM3Process* pm3; PM3Process* pm3;

@ -6,7 +6,7 @@
<rect> <rect>
<x>0</x> <x>0</x>
<y>0</y> <y>0</y>
<width>800</width> <width>820</width>
<height>770</height> <height>770</height>
</rect> </rect>
</property> </property>
@ -323,7 +323,7 @@
</widget> </widget>
</item> </item>
<item> <item>
<widget class="QCheckBox" name="MF_File_dataBox"> <widget class="QRadioButton" name="MF_File_dataBox">
<property name="text"> <property name="text">
<string>Data</string> <string>Data</string>
</property> </property>
@ -333,13 +333,10 @@
</widget> </widget>
</item> </item>
<item> <item>
<widget class="QCheckBox" name="MF_File_keyBox"> <widget class="QRadioButton" name="MF_File_keyBox">
<property name="text"> <property name="text">
<string>Key</string> <string>Key</string>
</property> </property>
<property name="checked">
<bool>true</bool>
</property>
</widget> </widget>
</item> </item>
</layout> </layout>

Loading…
Cancel
Save