Compare commits
27 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
| c0afa6bb32 | |||
| 17c40fe941 | |||
| 60f965bfe7 | |||
| 36307dcda0 | |||
| dcc17963b6 | |||
| d4519f8667 | |||
| c2514602e8 | |||
| c277844cf4 | |||
| f285f76a20 | |||
| 24adc08d84 | |||
| d56c5f8dc7 | |||
| 222f271a31 | |||
| 0c339e91af | |||
| 85ea3fd744 | |||
| d0bc6808d0 | |||
| 03d9c601fc | |||
| 5a8ab42281 | |||
| 12a0837c50 | |||
| d6f02e7a69 | |||
| 02a8fe03e3 | |||
| 3523c1eace | |||
| bac6207634 | |||
| ccb07651cc | |||
| f706d59c48 | |||
| 9e31496131 | |||
| a232e4ec83 | |||
| 1bec73d1ad |
@@ -1,21 +1,504 @@
|
|||||||
MIT License
|
GNU LESSER GENERAL PUBLIC LICENSE
|
||||||
|
Version 2.1, February 1999
|
||||||
|
|
||||||
Copyright (c) 2020 wh201906
|
Copyright (C) 1991, 1999 Free Software Foundation, Inc.
|
||||||
|
51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
|
||||||
|
Everyone is permitted to copy and distribute verbatim copies
|
||||||
|
of this license document, but changing it is not allowed.
|
||||||
|
|
||||||
Permission is hereby granted, free of charge, to any person obtaining a copy
|
[This is the first released version of the Lesser GPL. It also counts
|
||||||
of this software and associated documentation files (the "Software"), to deal
|
as the successor of the GNU Library Public License, version 2, hence
|
||||||
in the Software without restriction, including without limitation the rights
|
the version number 2.1.]
|
||||||
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
||||||
copies of the Software, and to permit persons to whom the Software is
|
|
||||||
furnished to do so, subject to the following conditions:
|
|
||||||
|
|
||||||
The above copyright notice and this permission notice shall be included in all
|
Preamble
|
||||||
copies or substantial portions of the Software.
|
|
||||||
|
|
||||||
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
The licenses for most software are designed to take away your
|
||||||
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
freedom to share and change it. By contrast, the GNU General Public
|
||||||
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
Licenses are intended to guarantee your freedom to share and change
|
||||||
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
free software--to make sure the software is free for all its users.
|
||||||
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
||||||
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
This license, the Lesser General Public License, applies to some
|
||||||
SOFTWARE.
|
specially designated software packages--typically libraries--of the
|
||||||
|
Free Software Foundation and other authors who decide to use it. You
|
||||||
|
can use it too, but we suggest you first think carefully about whether
|
||||||
|
this license or the ordinary General Public License is the better
|
||||||
|
strategy to use in any particular case, based on the explanations below.
|
||||||
|
|
||||||
|
When we speak of free software, we are referring to freedom of use,
|
||||||
|
not price. Our General Public Licenses are designed to make sure that
|
||||||
|
you have the freedom to distribute copies of free software (and charge
|
||||||
|
for this service if you wish); that you receive source code or can get
|
||||||
|
it if you want it; that you can change the software and use pieces of
|
||||||
|
it in new free programs; and that you are informed that you can do
|
||||||
|
these things.
|
||||||
|
|
||||||
|
To protect your rights, we need to make restrictions that forbid
|
||||||
|
distributors to deny you these rights or to ask you to surrender these
|
||||||
|
rights. These restrictions translate to certain responsibilities for
|
||||||
|
you if you distribute copies of the library or if you modify it.
|
||||||
|
|
||||||
|
For example, if you distribute copies of the library, whether gratis
|
||||||
|
or for a fee, you must give the recipients all the rights that we gave
|
||||||
|
you. You must make sure that they, too, receive or can get the source
|
||||||
|
code. If you link other code with the library, you must provide
|
||||||
|
complete object files to the recipients, so that they can relink them
|
||||||
|
with the library after making changes to the library and recompiling
|
||||||
|
it. And you must show them these terms so they know their rights.
|
||||||
|
|
||||||
|
We protect your rights with a two-step method: (1) we copyright the
|
||||||
|
library, and (2) we offer you this license, which gives you legal
|
||||||
|
permission to copy, distribute and/or modify the library.
|
||||||
|
|
||||||
|
To protect each distributor, we want to make it very clear that
|
||||||
|
there is no warranty for the free library. Also, if the library is
|
||||||
|
modified by someone else and passed on, the recipients should know
|
||||||
|
that what they have is not the original version, so that the original
|
||||||
|
author's reputation will not be affected by problems that might be
|
||||||
|
introduced by others.
|
||||||
|
|
||||||
|
Finally, software patents pose a constant threat to the existence of
|
||||||
|
any free program. We wish to make sure that a company cannot
|
||||||
|
effectively restrict the users of a free program by obtaining a
|
||||||
|
restrictive license from a patent holder. Therefore, we insist that
|
||||||
|
any patent license obtained for a version of the library must be
|
||||||
|
consistent with the full freedom of use specified in this license.
|
||||||
|
|
||||||
|
Most GNU software, including some libraries, is covered by the
|
||||||
|
ordinary GNU General Public License. This license, the GNU Lesser
|
||||||
|
General Public License, applies to certain designated libraries, and
|
||||||
|
is quite different from the ordinary General Public License. We use
|
||||||
|
this license for certain libraries in order to permit linking those
|
||||||
|
libraries into non-free programs.
|
||||||
|
|
||||||
|
When a program is linked with a library, whether statically or using
|
||||||
|
a shared library, the combination of the two is legally speaking a
|
||||||
|
combined work, a derivative of the original library. The ordinary
|
||||||
|
General Public License therefore permits such linking only if the
|
||||||
|
entire combination fits its criteria of freedom. The Lesser General
|
||||||
|
Public License permits more lax criteria for linking other code with
|
||||||
|
the library.
|
||||||
|
|
||||||
|
We call this license the "Lesser" General Public License because it
|
||||||
|
does Less to protect the user's freedom than the ordinary General
|
||||||
|
Public License. It also provides other free software developers Less
|
||||||
|
of an advantage over competing non-free programs. These disadvantages
|
||||||
|
are the reason we use the ordinary General Public License for many
|
||||||
|
libraries. However, the Lesser license provides advantages in certain
|
||||||
|
special circumstances.
|
||||||
|
|
||||||
|
For example, on rare occasions, there may be a special need to
|
||||||
|
encourage the widest possible use of a certain library, so that it becomes
|
||||||
|
a de-facto standard. To achieve this, non-free programs must be
|
||||||
|
allowed to use the library. A more frequent case is that a free
|
||||||
|
library does the same job as widely used non-free libraries. In this
|
||||||
|
case, there is little to gain by limiting the free library to free
|
||||||
|
software only, so we use the Lesser General Public License.
|
||||||
|
|
||||||
|
In other cases, permission to use a particular library in non-free
|
||||||
|
programs enables a greater number of people to use a large body of
|
||||||
|
free software. For example, permission to use the GNU C Library in
|
||||||
|
non-free programs enables many more people to use the whole GNU
|
||||||
|
operating system, as well as its variant, the GNU/Linux operating
|
||||||
|
system.
|
||||||
|
|
||||||
|
Although the Lesser General Public License is Less protective of the
|
||||||
|
users' freedom, it does ensure that the user of a program that is
|
||||||
|
linked with the Library has the freedom and the wherewithal to run
|
||||||
|
that program using a modified version of the Library.
|
||||||
|
|
||||||
|
The precise terms and conditions for copying, distribution and
|
||||||
|
modification follow. Pay close attention to the difference between a
|
||||||
|
"work based on the library" and a "work that uses the library". The
|
||||||
|
former contains code derived from the library, whereas the latter must
|
||||||
|
be combined with the library in order to run.
|
||||||
|
|
||||||
|
GNU LESSER GENERAL PUBLIC LICENSE
|
||||||
|
TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION
|
||||||
|
|
||||||
|
0. This License Agreement applies to any software library or other
|
||||||
|
program which contains a notice placed by the copyright holder or
|
||||||
|
other authorized party saying it may be distributed under the terms of
|
||||||
|
this Lesser General Public License (also called "this License").
|
||||||
|
Each licensee is addressed as "you".
|
||||||
|
|
||||||
|
A "library" means a collection of software functions and/or data
|
||||||
|
prepared so as to be conveniently linked with application programs
|
||||||
|
(which use some of those functions and data) to form executables.
|
||||||
|
|
||||||
|
The "Library", below, refers to any such software library or work
|
||||||
|
which has been distributed under these terms. A "work based on the
|
||||||
|
Library" means either the Library or any derivative work under
|
||||||
|
copyright law: that is to say, a work containing the Library or a
|
||||||
|
portion of it, either verbatim or with modifications and/or translated
|
||||||
|
straightforwardly into another language. (Hereinafter, translation is
|
||||||
|
included without limitation in the term "modification".)
|
||||||
|
|
||||||
|
"Source code" for a work means the preferred form of the work for
|
||||||
|
making modifications to it. For a library, complete source code means
|
||||||
|
all the source code for all modules it contains, plus any associated
|
||||||
|
interface definition files, plus the scripts used to control compilation
|
||||||
|
and installation of the library.
|
||||||
|
|
||||||
|
Activities other than copying, distribution and modification are not
|
||||||
|
covered by this License; they are outside its scope. The act of
|
||||||
|
running a program using the Library is not restricted, and output from
|
||||||
|
such a program is covered only if its contents constitute a work based
|
||||||
|
on the Library (independent of the use of the Library in a tool for
|
||||||
|
writing it). Whether that is true depends on what the Library does
|
||||||
|
and what the program that uses the Library does.
|
||||||
|
|
||||||
|
1. You may copy and distribute verbatim copies of the Library's
|
||||||
|
complete source code as you receive it, in any medium, provided that
|
||||||
|
you conspicuously and appropriately publish on each copy an
|
||||||
|
appropriate copyright notice and disclaimer of warranty; keep intact
|
||||||
|
all the notices that refer to this License and to the absence of any
|
||||||
|
warranty; and distribute a copy of this License along with the
|
||||||
|
Library.
|
||||||
|
|
||||||
|
You may charge a fee for the physical act of transferring a copy,
|
||||||
|
and you may at your option offer warranty protection in exchange for a
|
||||||
|
fee.
|
||||||
|
|
||||||
|
2. You may modify your copy or copies of the Library or any portion
|
||||||
|
of it, thus forming a work based on the Library, and copy and
|
||||||
|
distribute such modifications or work under the terms of Section 1
|
||||||
|
above, provided that you also meet all of these conditions:
|
||||||
|
|
||||||
|
a) The modified work must itself be a software library.
|
||||||
|
|
||||||
|
b) You must cause the files modified to carry prominent notices
|
||||||
|
stating that you changed the files and the date of any change.
|
||||||
|
|
||||||
|
c) You must cause the whole of the work to be licensed at no
|
||||||
|
charge to all third parties under the terms of this License.
|
||||||
|
|
||||||
|
d) If a facility in the modified Library refers to a function or a
|
||||||
|
table of data to be supplied by an application program that uses
|
||||||
|
the facility, other than as an argument passed when the facility
|
||||||
|
is invoked, then you must make a good faith effort to ensure that,
|
||||||
|
in the event an application does not supply such function or
|
||||||
|
table, the facility still operates, and performs whatever part of
|
||||||
|
its purpose remains meaningful.
|
||||||
|
|
||||||
|
(For example, a function in a library to compute square roots has
|
||||||
|
a purpose that is entirely well-defined independent of the
|
||||||
|
application. Therefore, Subsection 2d requires that any
|
||||||
|
application-supplied function or table used by this function must
|
||||||
|
be optional: if the application does not supply it, the square
|
||||||
|
root function must still compute square roots.)
|
||||||
|
|
||||||
|
These requirements apply to the modified work as a whole. If
|
||||||
|
identifiable sections of that work are not derived from the Library,
|
||||||
|
and can be reasonably considered independent and separate works in
|
||||||
|
themselves, then this License, and its terms, do not apply to those
|
||||||
|
sections when you distribute them as separate works. But when you
|
||||||
|
distribute the same sections as part of a whole which is a work based
|
||||||
|
on the Library, the distribution of the whole must be on the terms of
|
||||||
|
this License, whose permissions for other licensees extend to the
|
||||||
|
entire whole, and thus to each and every part regardless of who wrote
|
||||||
|
it.
|
||||||
|
|
||||||
|
Thus, it is not the intent of this section to claim rights or contest
|
||||||
|
your rights to work written entirely by you; rather, the intent is to
|
||||||
|
exercise the right to control the distribution of derivative or
|
||||||
|
collective works based on the Library.
|
||||||
|
|
||||||
|
In addition, mere aggregation of another work not based on the Library
|
||||||
|
with the Library (or with a work based on the Library) on a volume of
|
||||||
|
a storage or distribution medium does not bring the other work under
|
||||||
|
the scope of this License.
|
||||||
|
|
||||||
|
3. You may opt to apply the terms of the ordinary GNU General Public
|
||||||
|
License instead of this License to a given copy of the Library. To do
|
||||||
|
this, you must alter all the notices that refer to this License, so
|
||||||
|
that they refer to the ordinary GNU General Public License, version 2,
|
||||||
|
instead of to this License. (If a newer version than version 2 of the
|
||||||
|
ordinary GNU General Public License has appeared, then you can specify
|
||||||
|
that version instead if you wish.) Do not make any other change in
|
||||||
|
these notices.
|
||||||
|
|
||||||
|
Once this change is made in a given copy, it is irreversible for
|
||||||
|
that copy, so the ordinary GNU General Public License applies to all
|
||||||
|
subsequent copies and derivative works made from that copy.
|
||||||
|
|
||||||
|
This option is useful when you wish to copy part of the code of
|
||||||
|
the Library into a program that is not a library.
|
||||||
|
|
||||||
|
4. You may copy and distribute the Library (or a portion or
|
||||||
|
derivative of it, under Section 2) in object code or executable form
|
||||||
|
under the terms of Sections 1 and 2 above provided that you accompany
|
||||||
|
it with the complete corresponding machine-readable source code, which
|
||||||
|
must be distributed under the terms of Sections 1 and 2 above on a
|
||||||
|
medium customarily used for software interchange.
|
||||||
|
|
||||||
|
If distribution of object code is made by offering access to copy
|
||||||
|
from a designated place, then offering equivalent access to copy the
|
||||||
|
source code from the same place satisfies the requirement to
|
||||||
|
distribute the source code, even though third parties are not
|
||||||
|
compelled to copy the source along with the object code.
|
||||||
|
|
||||||
|
5. A program that contains no derivative of any portion of the
|
||||||
|
Library, but is designed to work with the Library by being compiled or
|
||||||
|
linked with it, is called a "work that uses the Library". Such a
|
||||||
|
work, in isolation, is not a derivative work of the Library, and
|
||||||
|
therefore falls outside the scope of this License.
|
||||||
|
|
||||||
|
However, linking a "work that uses the Library" with the Library
|
||||||
|
creates an executable that is a derivative of the Library (because it
|
||||||
|
contains portions of the Library), rather than a "work that uses the
|
||||||
|
library". The executable is therefore covered by this License.
|
||||||
|
Section 6 states terms for distribution of such executables.
|
||||||
|
|
||||||
|
When a "work that uses the Library" uses material from a header file
|
||||||
|
that is part of the Library, the object code for the work may be a
|
||||||
|
derivative work of the Library even though the source code is not.
|
||||||
|
Whether this is true is especially significant if the work can be
|
||||||
|
linked without the Library, or if the work is itself a library. The
|
||||||
|
threshold for this to be true is not precisely defined by law.
|
||||||
|
|
||||||
|
If such an object file uses only numerical parameters, data
|
||||||
|
structure layouts and accessors, and small macros and small inline
|
||||||
|
functions (ten lines or less in length), then the use of the object
|
||||||
|
file is unrestricted, regardless of whether it is legally a derivative
|
||||||
|
work. (Executables containing this object code plus portions of the
|
||||||
|
Library will still fall under Section 6.)
|
||||||
|
|
||||||
|
Otherwise, if the work is a derivative of the Library, you may
|
||||||
|
distribute the object code for the work under the terms of Section 6.
|
||||||
|
Any executables containing that work also fall under Section 6,
|
||||||
|
whether or not they are linked directly with the Library itself.
|
||||||
|
|
||||||
|
6. As an exception to the Sections above, you may also combine or
|
||||||
|
link a "work that uses the Library" with the Library to produce a
|
||||||
|
work containing portions of the Library, and distribute that work
|
||||||
|
under terms of your choice, provided that the terms permit
|
||||||
|
modification of the work for the customer's own use and reverse
|
||||||
|
engineering for debugging such modifications.
|
||||||
|
|
||||||
|
You must give prominent notice with each copy of the work that the
|
||||||
|
Library is used in it and that the Library and its use are covered by
|
||||||
|
this License. You must supply a copy of this License. If the work
|
||||||
|
during execution displays copyright notices, you must include the
|
||||||
|
copyright notice for the Library among them, as well as a reference
|
||||||
|
directing the user to the copy of this License. Also, you must do one
|
||||||
|
of these things:
|
||||||
|
|
||||||
|
a) Accompany the work with the complete corresponding
|
||||||
|
machine-readable source code for the Library including whatever
|
||||||
|
changes were used in the work (which must be distributed under
|
||||||
|
Sections 1 and 2 above); and, if the work is an executable linked
|
||||||
|
with the Library, with the complete machine-readable "work that
|
||||||
|
uses the Library", as object code and/or source code, so that the
|
||||||
|
user can modify the Library and then relink to produce a modified
|
||||||
|
executable containing the modified Library. (It is understood
|
||||||
|
that the user who changes the contents of definitions files in the
|
||||||
|
Library will not necessarily be able to recompile the application
|
||||||
|
to use the modified definitions.)
|
||||||
|
|
||||||
|
b) Use a suitable shared library mechanism for linking with the
|
||||||
|
Library. A suitable mechanism is one that (1) uses at run time a
|
||||||
|
copy of the library already present on the user's computer system,
|
||||||
|
rather than copying library functions into the executable, and (2)
|
||||||
|
will operate properly with a modified version of the library, if
|
||||||
|
the user installs one, as long as the modified version is
|
||||||
|
interface-compatible with the version that the work was made with.
|
||||||
|
|
||||||
|
c) Accompany the work with a written offer, valid for at
|
||||||
|
least three years, to give the same user the materials
|
||||||
|
specified in Subsection 6a, above, for a charge no more
|
||||||
|
than the cost of performing this distribution.
|
||||||
|
|
||||||
|
d) If distribution of the work is made by offering access to copy
|
||||||
|
from a designated place, offer equivalent access to copy the above
|
||||||
|
specified materials from the same place.
|
||||||
|
|
||||||
|
e) Verify that the user has already received a copy of these
|
||||||
|
materials or that you have already sent this user a copy.
|
||||||
|
|
||||||
|
For an executable, the required form of the "work that uses the
|
||||||
|
Library" must include any data and utility programs needed for
|
||||||
|
reproducing the executable from it. However, as a special exception,
|
||||||
|
the materials to be distributed need not include anything that is
|
||||||
|
normally distributed (in either source or binary form) with the major
|
||||||
|
components (compiler, kernel, and so on) of the operating system on
|
||||||
|
which the executable runs, unless that component itself accompanies
|
||||||
|
the executable.
|
||||||
|
|
||||||
|
It may happen that this requirement contradicts the license
|
||||||
|
restrictions of other proprietary libraries that do not normally
|
||||||
|
accompany the operating system. Such a contradiction means you cannot
|
||||||
|
use both them and the Library together in an executable that you
|
||||||
|
distribute.
|
||||||
|
|
||||||
|
7. You may place library facilities that are a work based on the
|
||||||
|
Library side-by-side in a single library together with other library
|
||||||
|
facilities not covered by this License, and distribute such a combined
|
||||||
|
library, provided that the separate distribution of the work based on
|
||||||
|
the Library and of the other library facilities is otherwise
|
||||||
|
permitted, and provided that you do these two things:
|
||||||
|
|
||||||
|
a) Accompany the combined library with a copy of the same work
|
||||||
|
based on the Library, uncombined with any other library
|
||||||
|
facilities. This must be distributed under the terms of the
|
||||||
|
Sections above.
|
||||||
|
|
||||||
|
b) Give prominent notice with the combined library of the fact
|
||||||
|
that part of it is a work based on the Library, and explaining
|
||||||
|
where to find the accompanying uncombined form of the same work.
|
||||||
|
|
||||||
|
8. You may not copy, modify, sublicense, link with, or distribute
|
||||||
|
the Library except as expressly provided under this License. Any
|
||||||
|
attempt otherwise to copy, modify, sublicense, link with, or
|
||||||
|
distribute the Library is void, and will automatically terminate your
|
||||||
|
rights under this License. However, parties who have received copies,
|
||||||
|
or rights, from you under this License will not have their licenses
|
||||||
|
terminated so long as such parties remain in full compliance.
|
||||||
|
|
||||||
|
9. You are not required to accept this License, since you have not
|
||||||
|
signed it. However, nothing else grants you permission to modify or
|
||||||
|
distribute the Library or its derivative works. These actions are
|
||||||
|
prohibited by law if you do not accept this License. Therefore, by
|
||||||
|
modifying or distributing the Library (or any work based on the
|
||||||
|
Library), you indicate your acceptance of this License to do so, and
|
||||||
|
all its terms and conditions for copying, distributing or modifying
|
||||||
|
the Library or works based on it.
|
||||||
|
|
||||||
|
10. Each time you redistribute the Library (or any work based on the
|
||||||
|
Library), the recipient automatically receives a license from the
|
||||||
|
original licensor to copy, distribute, link with or modify the Library
|
||||||
|
subject to these terms and conditions. You may not impose any further
|
||||||
|
restrictions on the recipients' exercise of the rights granted herein.
|
||||||
|
You are not responsible for enforcing compliance by third parties with
|
||||||
|
this License.
|
||||||
|
|
||||||
|
11. If, as a consequence of a court judgment or allegation of patent
|
||||||
|
infringement or for any other reason (not limited to patent issues),
|
||||||
|
conditions are imposed on you (whether by court order, agreement or
|
||||||
|
otherwise) that contradict the conditions of this License, they do not
|
||||||
|
excuse you from the conditions of this License. If you cannot
|
||||||
|
distribute so as to satisfy simultaneously your obligations under this
|
||||||
|
License and any other pertinent obligations, then as a consequence you
|
||||||
|
may not distribute the Library at all. For example, if a patent
|
||||||
|
license would not permit royalty-free redistribution of the Library by
|
||||||
|
all those who receive copies directly or indirectly through you, then
|
||||||
|
the only way you could satisfy both it and this License would be to
|
||||||
|
refrain entirely from distribution of the Library.
|
||||||
|
|
||||||
|
If any portion of this section is held invalid or unenforceable under any
|
||||||
|
particular circumstance, the balance of the section is intended to apply,
|
||||||
|
and the section as a whole is intended to apply in other circumstances.
|
||||||
|
|
||||||
|
It is not the purpose of this section to induce you to infringe any
|
||||||
|
patents or other property right claims or to contest validity of any
|
||||||
|
such claims; this section has the sole purpose of protecting the
|
||||||
|
integrity of the free software distribution system which is
|
||||||
|
implemented by public license practices. Many people have made
|
||||||
|
generous contributions to the wide range of software distributed
|
||||||
|
through that system in reliance on consistent application of that
|
||||||
|
system; it is up to the author/donor to decide if he or she is willing
|
||||||
|
to distribute software through any other system and a licensee cannot
|
||||||
|
impose that choice.
|
||||||
|
|
||||||
|
This section is intended to make thoroughly clear what is believed to
|
||||||
|
be a consequence of the rest of this License.
|
||||||
|
|
||||||
|
12. If the distribution and/or use of the Library is restricted in
|
||||||
|
certain countries either by patents or by copyrighted interfaces, the
|
||||||
|
original copyright holder who places the Library under this License may add
|
||||||
|
an explicit geographical distribution limitation excluding those countries,
|
||||||
|
so that distribution is permitted only in or among countries not thus
|
||||||
|
excluded. In such case, this License incorporates the limitation as if
|
||||||
|
written in the body of this License.
|
||||||
|
|
||||||
|
13. The Free Software Foundation may publish revised and/or new
|
||||||
|
versions of the Lesser General Public License from time to time.
|
||||||
|
Such new versions will be similar in spirit to the present version,
|
||||||
|
but may differ in detail to address new problems or concerns.
|
||||||
|
|
||||||
|
Each version is given a distinguishing version number. If the Library
|
||||||
|
specifies a version number of this License which applies to it and
|
||||||
|
"any later version", you have the option of following the terms and
|
||||||
|
conditions either of that version or of any later version published by
|
||||||
|
the Free Software Foundation. If the Library does not specify a
|
||||||
|
license version number, you may choose any version ever published by
|
||||||
|
the Free Software Foundation.
|
||||||
|
|
||||||
|
14. If you wish to incorporate parts of the Library into other free
|
||||||
|
programs whose distribution conditions are incompatible with these,
|
||||||
|
write to the author to ask for permission. For software which is
|
||||||
|
copyrighted by the Free Software Foundation, write to the Free
|
||||||
|
Software Foundation; we sometimes make exceptions for this. Our
|
||||||
|
decision will be guided by the two goals of preserving the free status
|
||||||
|
of all derivatives of our free software and of promoting the sharing
|
||||||
|
and reuse of software generally.
|
||||||
|
|
||||||
|
NO WARRANTY
|
||||||
|
|
||||||
|
15. BECAUSE THE LIBRARY IS LICENSED FREE OF CHARGE, THERE IS NO
|
||||||
|
WARRANTY FOR THE LIBRARY, TO THE EXTENT PERMITTED BY APPLICABLE LAW.
|
||||||
|
EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR
|
||||||
|
OTHER PARTIES PROVIDE THE LIBRARY "AS IS" WITHOUT WARRANTY OF ANY
|
||||||
|
KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE
|
||||||
|
IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
|
||||||
|
PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE
|
||||||
|
LIBRARY IS WITH YOU. SHOULD THE LIBRARY PROVE DEFECTIVE, YOU ASSUME
|
||||||
|
THE COST OF ALL NECESSARY SERVICING, REPAIR OR CORRECTION.
|
||||||
|
|
||||||
|
16. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN
|
||||||
|
WRITING WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY
|
||||||
|
AND/OR REDISTRIBUTE THE LIBRARY AS PERMITTED ABOVE, BE LIABLE TO YOU
|
||||||
|
FOR DAMAGES, INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR
|
||||||
|
CONSEQUENTIAL DAMAGES ARISING OUT OF THE USE OR INABILITY TO USE THE
|
||||||
|
LIBRARY (INCLUDING BUT NOT LIMITED TO LOSS OF DATA OR DATA BEING
|
||||||
|
RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD PARTIES OR A
|
||||||
|
FAILURE OF THE LIBRARY TO OPERATE WITH ANY OTHER SOFTWARE), EVEN IF
|
||||||
|
SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH
|
||||||
|
DAMAGES.
|
||||||
|
|
||||||
|
END OF TERMS AND CONDITIONS
|
||||||
|
|
||||||
|
How to Apply These Terms to Your New Libraries
|
||||||
|
|
||||||
|
If you develop a new library, and you want it to be of the greatest
|
||||||
|
possible use to the public, we recommend making it free software that
|
||||||
|
everyone can redistribute and change. You can do so by permitting
|
||||||
|
redistribution under these terms (or, alternatively, under the terms of the
|
||||||
|
ordinary General Public License).
|
||||||
|
|
||||||
|
To apply these terms, attach the following notices to the library. It is
|
||||||
|
safest to attach them to the start of each source file to most effectively
|
||||||
|
convey the exclusion of warranty; and each file should have at least the
|
||||||
|
"copyright" line and a pointer to where the full notice is found.
|
||||||
|
|
||||||
|
<one line to give the library's name and a brief idea of what it does.>
|
||||||
|
Copyright (C) <year> <name of author>
|
||||||
|
|
||||||
|
This library is free software; you can redistribute it and/or
|
||||||
|
modify it under the terms of the GNU Lesser General Public
|
||||||
|
License as published by the Free Software Foundation; either
|
||||||
|
version 2.1 of the License, or (at your option) any later version.
|
||||||
|
|
||||||
|
This library is distributed in the hope that it will be useful,
|
||||||
|
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
|
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||||
|
Lesser General Public License for more details.
|
||||||
|
|
||||||
|
You should have received a copy of the GNU Lesser General Public
|
||||||
|
License along with this library; if not, write to the Free Software
|
||||||
|
Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301
|
||||||
|
USA
|
||||||
|
|
||||||
|
Also add information on how to contact you by electronic and paper mail.
|
||||||
|
|
||||||
|
You should also get your employer (if you work as a programmer) or your
|
||||||
|
school, if any, to sign a "copyright disclaimer" for the library, if
|
||||||
|
necessary. Here is a sample; alter the names:
|
||||||
|
|
||||||
|
Yoyodyne, Inc., hereby disclaims all copyright interest in the
|
||||||
|
library `Frob' (a library for tweaking knobs) written by James Random
|
||||||
|
Hacker.
|
||||||
|
|
||||||
|
<signature of Ty Coon>, 1 April 1990
|
||||||
|
Ty Coon, President of Vice
|
||||||
|
|
||||||
|
That's all there is to it!
|
||||||
|
|||||||
@@ -56,7 +56,7 @@ qnx: target.path = /tmp/$${TARGET}/bin
|
|||||||
else: unix:!android: target.path = /opt/$${TARGET}/bin
|
else: unix:!android: target.path = /opt/$${TARGET}/bin
|
||||||
!isEmpty(target.path): INSTALLS += target
|
!isEmpty(target.path): INSTALLS += target
|
||||||
|
|
||||||
VERSION = 0.2.0
|
VERSION = 0.2.3
|
||||||
QMAKE_TARGET_PRODUCT = "Proxmark3GUI"
|
QMAKE_TARGET_PRODUCT = "Proxmark3GUI"
|
||||||
QMAKE_TARGET_DESCRIPTION = "Proxmark3GUI"
|
QMAKE_TARGET_DESCRIPTION = "Proxmark3GUI"
|
||||||
QMAKE_TARGET_COMPANY = "wh201906"
|
QMAKE_TARGET_COMPANY = "wh201906"
|
||||||
|
|||||||
@@ -3,7 +3,7 @@
|
|||||||
|
|
||||||
A cross-platform GUI for [Proxmark3](https://github.com/Proxmark/proxmark3) client
|
A cross-platform GUI for [Proxmark3](https://github.com/Proxmark/proxmark3) client
|
||||||
|
|
||||||
[中文介绍](README/doc/README_zh_CN.md)
|
[中文介绍](doc/README/README_zh_CN.md)
|
||||||
|
|
||||||
***
|
***
|
||||||
|
|
||||||
@@ -26,16 +26,16 @@ A cross-platform GUI for [Proxmark3](https://github.com/Proxmark/proxmark3) clie
|
|||||||
***
|
***
|
||||||
|
|
||||||
## Preview
|
## Preview
|
||||||

|

|
||||||
|
|
||||||
[more previews](README/doc/previews.md)
|
[more previews](doc/preview/previews.md)
|
||||||
|
|
||||||
***
|
***
|
||||||
|
|
||||||
## About Iceman fork/repo
|
## About Iceman fork/repo
|
||||||
|
|
||||||
The [Iceman fork/repo](https://github.com/RfidResearchGroup/proxmark3) has more powerful functions like offline sniff. These guys even developed a new hardware called Proxmark3 RDV4 with smart card support. But the official repo and the Iceman repo is not fully compatible.
|
The [Iceman fork/repo](https://github.com/RfidResearchGroup/proxmark3) has more powerful functions. These guys even developed a new hardware called Proxmark3 RDV4 with smart card support. But the official repo and the Iceman repo is not fully compatible.
|
||||||
This GUI is compatible with Iceman/RRG repo(tested on v4.9237)
|
This GUI is compatible with Iceman/RRG repo(tested on v4.13441)
|
||||||
|
|
||||||
***
|
***
|
||||||
|
|
||||||
@@ -51,7 +51,9 @@ Great thanks to him.
|
|||||||
## Build on Linux
|
## Build on Linux
|
||||||
|
|
||||||
cd ~
|
cd ~
|
||||||
git clone https://github.com/wh201906/Proxmark3GUI.git
|
sudo apt-get update
|
||||||
|
sudo apt-get install qt5-default libqt5serialport5 libqt5serialport5-dev
|
||||||
|
git clone https://github.com/wh201906/Proxmark3GUI.git --depth=1
|
||||||
cd Proxmark3GUI
|
cd Proxmark3GUI
|
||||||
mkdir build
|
mkdir build
|
||||||
cd build
|
cd build
|
||||||
@@ -59,12 +61,32 @@ Great thanks to him.
|
|||||||
make
|
make
|
||||||
make clean
|
make clean
|
||||||
cp -r ../lang ./
|
cp -r ../lang ./
|
||||||
|
cp -r ../config ./
|
||||||
./Proxmark3GUI
|
./Proxmark3GUI
|
||||||
|
|
||||||
***
|
***
|
||||||
|
## Tutorial
|
||||||
|
|
||||||
|
[1.Quickstart](doc/tutorial/Quickstart/quickstart.md)
|
||||||
|
[2.Edit Mifare Classic data](doc/tutorial/Edit_Mifare_Classic_data/Edit_Mifare_Classic_data.md)(Proxmark3 hardware is not necessary)
|
||||||
|
***
|
||||||
|
|
||||||
## Update Log:
|
## Update Log:
|
||||||
|
|
||||||
|
### V0.2.3
|
||||||
|
+ Fix bug [#27](https://github.com/wh201906/Proxmark3GUI/issues/27)
|
||||||
|
+ Try to support Non-ASCII path
|
||||||
|
|
||||||
|
### V0.2.2
|
||||||
|
+ Load command format from external json file
|
||||||
|
+ Fix bug [#20](https://github.com/wh201906/Proxmark3GUI/issues/20), [#21](https://github.com/wh201906/Proxmark3GUI/issues/21), [#22](https://github.com/wh201906/Proxmark3GUI/issues/22)
|
||||||
|
+ Support Iceman/RRG repo v4.13441
|
||||||
|
|
||||||
|
### V0.2.1
|
||||||
|
+ Optimize MIFARE Classic reading logic
|
||||||
|
+ Fix bug [#16](https://github.com/wh201906/Proxmark3GUI/issues/16)
|
||||||
|
+ Fix bug [#15](https://github.com/wh201906/Proxmark3GUI/issues/15) partially (the path can contain spaces now)
|
||||||
|
|
||||||
### V0.2
|
### V0.2
|
||||||
+ Use Dock widget for more flexible layout
|
+ Use Dock widget for more flexible layout
|
||||||
+ Support basic LF commands
|
+ Support basic LF commands
|
||||||
|
|||||||
@@ -1,20 +0,0 @@
|
|||||||
## Previews
|
|
||||||
|
|
||||||
Raw Command:
|
|
||||||

|
|
||||||
|
|
||||||
Mifare Nested Attack:
|
|
||||||

|
|
||||||
|
|
||||||
Mifare Load File:
|
|
||||||

|
|
||||||
|
|
||||||
Mifare Edit File:
|
|
||||||

|
|
||||||
|
|
||||||
Mifare Trailer Decoder:
|
|
||||||

|
|
||||||
|
|
||||||
Dock Widget:
|
|
||||||

|
|
||||||

|
|
||||||
@@ -26,7 +26,7 @@ void PM3Process::connectPM3(const QString& path, const QStringList args)
|
|||||||
currArgs = args;
|
currArgs = args;
|
||||||
|
|
||||||
// using "-f" option to make the client output flushed after every print.
|
// using "-f" option to make the client output flushed after every print.
|
||||||
start(path, args, QProcess::Unbuffered | QProcess::ReadWrite);
|
start(path, args, QProcess::Unbuffered | QProcess::ReadWrite | QProcess::Text);
|
||||||
if(waitForStarted(10000))
|
if(waitForStarted(10000))
|
||||||
{
|
{
|
||||||
waitForReadyRead(10000);
|
waitForReadyRead(10000);
|
||||||
@@ -36,11 +36,13 @@ void PM3Process::connectPM3(const QString& path, const QStringList args)
|
|||||||
{
|
{
|
||||||
clientType = Util::CLIENTTYPE_ICEMAN;
|
clientType = Util::CLIENTTYPE_ICEMAN;
|
||||||
setRequiringOutput(true);
|
setRequiringOutput(true);
|
||||||
write("hw version\r\n");
|
write("hw version\n");
|
||||||
for(int i = 0; i < 10; i++)
|
for(int i = 0; i < 50; i++)
|
||||||
{
|
{
|
||||||
waitForReadyRead(200);
|
waitForReadyRead(200);
|
||||||
result += *requiredOutput;
|
result += *requiredOutput;
|
||||||
|
if(result.indexOf("os: ") != -1)
|
||||||
|
break;
|
||||||
}
|
}
|
||||||
setRequiringOutput(false);
|
setRequiringOutput(false);
|
||||||
}
|
}
|
||||||
@@ -52,8 +54,8 @@ void PM3Process::connectPM3(const QString& path, const QStringList args)
|
|||||||
{
|
{
|
||||||
emit changeClientType(clientType);
|
emit changeClientType(clientType);
|
||||||
result = result.mid(result.indexOf("os: "));
|
result = result.mid(result.indexOf("os: "));
|
||||||
result = result.left(result.indexOf("\r\n"));
|
result = result.left(result.indexOf("\n"));
|
||||||
result = result.mid(3, result.lastIndexOf(" ") - 3);
|
result = result.mid(4, result.indexOf(" ", 4) - 4);
|
||||||
emit PM3StatedChanged(true, result);
|
emit PM3StatedChanged(true, result);
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
@@ -105,6 +107,10 @@ void PM3Process::setSerialListener(bool state)
|
|||||||
|
|
||||||
void PM3Process::onTimeout() //when the proxmark3 client is unexpectedly terminated or the PM3 hardware is removed, the isBusy() will return false(only tested on Windows);
|
void PM3Process::onTimeout() //when the proxmark3 client is unexpectedly terminated or the PM3 hardware is removed, the isBusy() will return false(only tested on Windows);
|
||||||
{
|
{
|
||||||
|
// isBusy() is a deprecated function because it will block the serial port when the port is not in use.
|
||||||
|
// However, the PM3 client is supposed to use the target serial port exclusively, so it should be fine
|
||||||
|
// isBusy() will always return false on Raspbian, in this case, check "Keep the client active" in the Settings panel.
|
||||||
|
//
|
||||||
// qDebug()<<portInfo->isBusy();
|
// qDebug()<<portInfo->isBusy();
|
||||||
if(!portInfo->isBusy())
|
if(!portInfo->isBusy())
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -31,10 +31,10 @@ void Util::execCMD(const QString& cmd)
|
|||||||
{
|
{
|
||||||
qDebug() << "executing: " << cmd;
|
qDebug() << "executing: " << cmd;
|
||||||
if(isRunning)
|
if(isRunning)
|
||||||
emit write(cmd + "\r\n");
|
emit write(cmd + "\n");
|
||||||
}
|
}
|
||||||
|
|
||||||
QString Util::execCMDWithOutput(const QString& cmd, ReturnTrigger trigger)
|
QString Util::execCMDWithOutput(const QString& cmd, ReturnTrigger trigger, bool rawOutput)
|
||||||
{
|
{
|
||||||
// if the trigger is empty, this function will wait trigger.waitTime then return all outputs during the wait time.
|
// if the trigger is empty, this function will wait trigger.waitTime then return all outputs during the wait time.
|
||||||
// otherwise, this function will return empty string if no trigger is detected, or return outputs if any trigger is detected.
|
// otherwise, this function will return empty string if no trigger is detected, or return outputs if any trigger is detected.
|
||||||
@@ -78,7 +78,7 @@ QString Util::execCMDWithOutput(const QString& cmd, ReturnTrigger trigger)
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
isRequiringOutput = false;
|
isRequiringOutput = false;
|
||||||
return (isResultFound || trigger.expectedOutputs.isEmpty() ? *requiredOutput : "");
|
return (isResultFound || trigger.expectedOutputs.isEmpty() || rawOutput ? *requiredOutput : "");
|
||||||
}
|
}
|
||||||
|
|
||||||
void Util::delay(unsigned int msec)
|
void Util::delay(unsigned int msec)
|
||||||
|
|||||||
@@ -53,7 +53,7 @@ public:
|
|||||||
explicit Util(QObject *parent = nullptr);
|
explicit Util(QObject *parent = nullptr);
|
||||||
|
|
||||||
void execCMD(const QString& cmd);
|
void execCMD(const QString& cmd);
|
||||||
QString execCMDWithOutput(const QString& cmd, ReturnTrigger trigger = 10000);
|
QString execCMDWithOutput(const QString& cmd, ReturnTrigger trigger = 10000, bool rawOutput = false);
|
||||||
void delay(unsigned int msec);
|
void delay(unsigned int msec);
|
||||||
static ClientType getClientType();
|
static ClientType getClientType();
|
||||||
static int rawTabIndex;
|
static int rawTabIndex;
|
||||||
|
|||||||
@@ -0,0 +1,195 @@
|
|||||||
|
{
|
||||||
|
"//": "Based on Proxmark3 official repo v3.1.0, commit 6116334",
|
||||||
|
"//": "You can change this file if the command format of client changes",
|
||||||
|
"mifare classic": {
|
||||||
|
"nested": {
|
||||||
|
"cmd": "hf mf nested <card type> *",
|
||||||
|
"card type": {
|
||||||
|
"mini": "0",
|
||||||
|
"1k": "1",
|
||||||
|
"2k": "2",
|
||||||
|
"4k": "4"
|
||||||
|
},
|
||||||
|
"key pattern": "\\|\\s*\\d{3}\\s*\\|\\s*.+?\\s*\\|\\s*.+?\\s*\\|\\s*.+?\\s*\\|\\s*.+?\\s*\\|",
|
||||||
|
"key A index": 2,
|
||||||
|
"key B index": 4
|
||||||
|
},
|
||||||
|
"check": {
|
||||||
|
"cmd": "hf mf chk *<card type> ?",
|
||||||
|
"card type": {
|
||||||
|
"mini": "0",
|
||||||
|
"1k": "1",
|
||||||
|
"2k": "2",
|
||||||
|
"4k": "4"
|
||||||
|
},
|
||||||
|
"key pattern": "\\|\\s*\\d{3}\\s*\\|\\s*.+?\\s*\\|\\s*.+?\\s*\\|",
|
||||||
|
"key A index": 2,
|
||||||
|
"key B index": 3
|
||||||
|
},
|
||||||
|
"info": {
|
||||||
|
"cmd": "hf 14a info"
|
||||||
|
},
|
||||||
|
"sniff": {
|
||||||
|
"cmd": "hf mf sniff"
|
||||||
|
},
|
||||||
|
"sniff 14a": {
|
||||||
|
"cmd": "hf 14a snoop"
|
||||||
|
},
|
||||||
|
"list": {
|
||||||
|
"cmd": "hf list mf"
|
||||||
|
},
|
||||||
|
"dump": {
|
||||||
|
"cmd": "hf mf dump"
|
||||||
|
},
|
||||||
|
"restore": {
|
||||||
|
"cmd": "hf mf restore"
|
||||||
|
},
|
||||||
|
"emulator wipe": {
|
||||||
|
"cmd": "hf mf eclr"
|
||||||
|
},
|
||||||
|
"Magic Card wipe": {
|
||||||
|
"cmd": "hf mf cwipe <card type> f",
|
||||||
|
"card type": {
|
||||||
|
"mini": "0",
|
||||||
|
"1k": "1",
|
||||||
|
"2k": "2",
|
||||||
|
"4k": "4"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"emulator read block": {
|
||||||
|
"cmd": "hf mf eget <block>",
|
||||||
|
"data pattern": "([0-9a-fA-F]{2} ){15}[0-9a-fA-F]{2}"
|
||||||
|
},
|
||||||
|
"Magic Card read block": {
|
||||||
|
"cmd": "hf mf cgetblk <block>",
|
||||||
|
"data pattern": "([0-9a-fA-F]{2} ){15}[0-9a-fA-F]{2}"
|
||||||
|
},
|
||||||
|
"normal read block": {
|
||||||
|
"cmd": "hf mf rdbl <block> <key type> <key>",
|
||||||
|
"key type": {
|
||||||
|
"A": "A",
|
||||||
|
"B": "B"
|
||||||
|
},
|
||||||
|
"data pattern": "([0-9a-fA-F]{2} ){15}[0-9a-fA-F]{2}"
|
||||||
|
},
|
||||||
|
"darkside": {
|
||||||
|
"cmd": "hf mf mifare"
|
||||||
|
},
|
||||||
|
"save sniff": {
|
||||||
|
"cmd": "hf list mf -s <filename>"
|
||||||
|
},
|
||||||
|
"load sniff": {
|
||||||
|
"cmd": "hf list mf -l <filename>"
|
||||||
|
},
|
||||||
|
"hardnested": {
|
||||||
|
"cmd": "hf mf hardnested <known key block> <known key type> <known key> <target key block> <target key type>",
|
||||||
|
"known key type": {
|
||||||
|
"A": "A",
|
||||||
|
"B": "B"
|
||||||
|
},
|
||||||
|
"target key type": {
|
||||||
|
"A": "A",
|
||||||
|
"B": "B"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"normal read sector": {
|
||||||
|
"cmd": "hf mf rdsc <sector> <key type> <key>",
|
||||||
|
"key type": {
|
||||||
|
"A": "A",
|
||||||
|
"B": "B"
|
||||||
|
},
|
||||||
|
"data pattern": "([0-9a-fA-F]{2} ){15}[0-9a-fA-F]{2}"
|
||||||
|
},
|
||||||
|
"Magic Card read sector": {
|
||||||
|
"cmd": "hf mf cgetsc <sector>",
|
||||||
|
"data pattern": "([0-9a-fA-F]{2} ){15}[0-9a-fA-F]{2}"
|
||||||
|
},
|
||||||
|
"//": "When writing a block, if the result is not empty and doesn't contain the failed flag, the function will return true",
|
||||||
|
"normal write block": {
|
||||||
|
"cmd": "hf mf wrbl <block> <key type> <key> <data>",
|
||||||
|
"key type": {
|
||||||
|
"A": "A",
|
||||||
|
"B": "B"
|
||||||
|
},
|
||||||
|
"failed flag": [
|
||||||
|
"isOk:00"
|
||||||
|
]
|
||||||
|
},
|
||||||
|
"Magic Card write block": {
|
||||||
|
"cmd": "hf mf csetblk <block> <data>",
|
||||||
|
"failed flag": [
|
||||||
|
"No chinese magic"
|
||||||
|
]
|
||||||
|
},
|
||||||
|
"emulator write block": {
|
||||||
|
"cmd": "hf mf eset <block> <data>"
|
||||||
|
},
|
||||||
|
"Magic Card lock": {
|
||||||
|
"cmd": "hf 14a raw ",
|
||||||
|
"sequence": [
|
||||||
|
"-pa -b7 40",
|
||||||
|
"-pa 43",
|
||||||
|
"-pa E0 00 39 F7",
|
||||||
|
"-pa E1 00 E1 EE",
|
||||||
|
"-pa 85 00 00 00 00 00 00 00 00 00 00 00 00 00 00 08 18 47",
|
||||||
|
"-a 52"
|
||||||
|
]
|
||||||
|
},
|
||||||
|
"Magic Card set parameter": {
|
||||||
|
"cmd": "hf mf csetuid <uid> <atqa> <sak>"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"lf": {
|
||||||
|
"read": {
|
||||||
|
"cmd": "lf read",
|
||||||
|
"show cmd": "data plot"
|
||||||
|
},
|
||||||
|
"sniff": {
|
||||||
|
"cmd": "lf snoop",
|
||||||
|
"show cmd": "data plot"
|
||||||
|
},
|
||||||
|
"search": {
|
||||||
|
"cmd": "lf search u"
|
||||||
|
},
|
||||||
|
"tune": {
|
||||||
|
"cmd": "hw tune l"
|
||||||
|
},
|
||||||
|
"get config": {
|
||||||
|
"cmd": "hw status",
|
||||||
|
"field start": "LF Sampling config:",
|
||||||
|
"field end": "USB Speed:",
|
||||||
|
"divisor": {
|
||||||
|
"flag": "divisor:",
|
||||||
|
"pattern": "\\d+"
|
||||||
|
},
|
||||||
|
"bits per sample": {
|
||||||
|
"flag": "bps:",
|
||||||
|
"pattern": "\\d+"
|
||||||
|
},
|
||||||
|
"decimation": {
|
||||||
|
"flag": "decimation:",
|
||||||
|
"pattern": "\\d+"
|
||||||
|
},
|
||||||
|
"averaging": {
|
||||||
|
"flag": "averaging:",
|
||||||
|
"pattern": "\\d+"
|
||||||
|
},
|
||||||
|
"trigger threshold": {
|
||||||
|
"flag": "trigger threshold:",
|
||||||
|
"pattern": "\\d+"
|
||||||
|
},
|
||||||
|
"samples to skip": {
|
||||||
|
"flag": "samples to skip:",
|
||||||
|
"pattern": "\\d+"
|
||||||
|
},
|
||||||
|
"//": "execute 'cmd' then find parameters between 'field stard' and 'field end'",
|
||||||
|
"//": "for each line, if the line doesn't have any flag, skip",
|
||||||
|
"//": "otherwise, delete characters before 'flag' and 'flag' itself, then use 'pattern' to get the parameter",
|
||||||
|
"//": "If 'replace' dict exists, replace all keys with respective values before getting parameters"
|
||||||
|
},
|
||||||
|
"set config": {
|
||||||
|
"cmd": "lf config q <divisor> b <bits per sample> d <decimation> a <averaging> t <trigger threshold> s <samples to skip>",
|
||||||
|
"divisor cmd": "hw setlfdivisor <divisor>"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -0,0 +1,203 @@
|
|||||||
|
{
|
||||||
|
"//": "Based on Proxmark3 rrg repo v4.13441, commit 35ddebc",
|
||||||
|
"//": "You can change this file if the command format of client changes",
|
||||||
|
"mifare classic": {
|
||||||
|
"nested": {
|
||||||
|
"cmd": "hf mf nested --<card type> --blk <block> -<key type> -k <key>",
|
||||||
|
"static cmd": "hf mf staticnested --<card type> --blk <block> -<key type> -k <key>",
|
||||||
|
"card type": {
|
||||||
|
"mini": "mini",
|
||||||
|
"1k": "1k",
|
||||||
|
"2k": "2k",
|
||||||
|
"4k": "4k"
|
||||||
|
},
|
||||||
|
"key type": {
|
||||||
|
"A": "a",
|
||||||
|
"B": "b"
|
||||||
|
},
|
||||||
|
"key pattern": "\\|\\s*\\d{3}\\s*\\|\\s*.+?\\s*\\|\\s*.+?\\s*\\|\\s*.+?\\s*\\|\\s*.+?\\s*\\|",
|
||||||
|
"key A index": 2,
|
||||||
|
"key B index": 4
|
||||||
|
},
|
||||||
|
"check": {
|
||||||
|
"cmd": "hf mf chk --<card type>",
|
||||||
|
"card type": {
|
||||||
|
"mini": "mini",
|
||||||
|
"1k": "1k",
|
||||||
|
"2k": "2k",
|
||||||
|
"4k": "4k"
|
||||||
|
},
|
||||||
|
"key pattern": "\\|\\s*\\d{3}\\s*\\|\\s*.+?\\s*\\|\\s*.+?\\s*\\|\\s*.+?\\s*\\|\\s*.+?\\s*\\|",
|
||||||
|
"key A index": 2,
|
||||||
|
"key B index": 4
|
||||||
|
},
|
||||||
|
"info": {
|
||||||
|
"cmd": "hf 14a info"
|
||||||
|
},
|
||||||
|
"sniff": {
|
||||||
|
"cmd": "hf sniff"
|
||||||
|
},
|
||||||
|
"sniff 14a": {
|
||||||
|
"cmd": "hf 14a sniff"
|
||||||
|
},
|
||||||
|
"list": {
|
||||||
|
"cmd": "trace list -t mf"
|
||||||
|
},
|
||||||
|
"dump": {
|
||||||
|
"cmd": "hf mf dump"
|
||||||
|
},
|
||||||
|
"restore": {
|
||||||
|
"cmd": "hf mf restore"
|
||||||
|
},
|
||||||
|
"emulator wipe": {
|
||||||
|
"cmd": "hf mf eclr"
|
||||||
|
},
|
||||||
|
"Magic Card wipe": {
|
||||||
|
"cmd": "hf mf cwipe"
|
||||||
|
},
|
||||||
|
"emulator read block": {
|
||||||
|
"cmd": "hf mf egetblk --blk <block>",
|
||||||
|
"data pattern": "([0-9a-fA-F]{2} ){15}[0-9a-fA-F]{2}"
|
||||||
|
},
|
||||||
|
"Magic Card read block": {
|
||||||
|
"cmd": "hf mf cgetblk --blk <block>",
|
||||||
|
"data pattern": "([0-9a-fA-F]{2} ){15}[0-9a-fA-F]{2}"
|
||||||
|
},
|
||||||
|
"normal read block": {
|
||||||
|
"cmd": "hf mf rdbl --blk <block> -<key type> -k <key>",
|
||||||
|
"key type": {
|
||||||
|
"A": "a",
|
||||||
|
"B": "b"
|
||||||
|
},
|
||||||
|
"data pattern": "([0-9a-fA-F]{2} ){15}[0-9a-fA-F]{2}"
|
||||||
|
},
|
||||||
|
"darkside": {
|
||||||
|
"cmd": "hf mf darkside"
|
||||||
|
},
|
||||||
|
"save sniff": {
|
||||||
|
"cmd": "trace save -f <filename>"
|
||||||
|
},
|
||||||
|
"load sniff": {
|
||||||
|
"cmd": "trace load -f <filename>",
|
||||||
|
"show cmd": "trace list --buffer -t mf"
|
||||||
|
},
|
||||||
|
"hardnested": {
|
||||||
|
"cmd": "hf mf hardnested --blk <known key block> -<known key type> -k <known key> --tblk <target key block> --t<target key type>",
|
||||||
|
"known key type": {
|
||||||
|
"A": "a",
|
||||||
|
"B": "b"
|
||||||
|
},
|
||||||
|
"target key type": {
|
||||||
|
"A": "a",
|
||||||
|
"B": "b"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"normal read sector": {
|
||||||
|
"cmd": "hf mf rdsc --sec <sector> -<key type> -k <key>",
|
||||||
|
"key type": {
|
||||||
|
"A": "a",
|
||||||
|
"B": "b"
|
||||||
|
},
|
||||||
|
"data pattern": "([0-9a-fA-F]{2} ){15}[0-9a-fA-F]{2}"
|
||||||
|
},
|
||||||
|
"Magic Card read sector": {
|
||||||
|
"cmd": "hf mf cgetsc --sec <sector>",
|
||||||
|
"data pattern": "([0-9a-fA-F]{2} ){15}[0-9a-fA-F]{2}"
|
||||||
|
},
|
||||||
|
"//": "When writing a block, if the result is not empty and doesn't contain the failed flag, the function will return true",
|
||||||
|
"normal write block": {
|
||||||
|
"cmd": "hf mf wrbl --blk <block> -<key type> -k <key> -d <data>",
|
||||||
|
"key type": {
|
||||||
|
"A": "a",
|
||||||
|
"B": "b"
|
||||||
|
},
|
||||||
|
"failed flag": [
|
||||||
|
"fail",
|
||||||
|
"error"
|
||||||
|
]
|
||||||
|
},
|
||||||
|
"Magic Card write block": {
|
||||||
|
"cmd": "hf mf csetblk --blk <block> -d <data>",
|
||||||
|
"failed flag": [
|
||||||
|
"fail",
|
||||||
|
"error"
|
||||||
|
]
|
||||||
|
},
|
||||||
|
"emulator write block": {
|
||||||
|
"cmd": "hf mf esetblk --blk <block> -d <data>"
|
||||||
|
},
|
||||||
|
"Magic Card lock": {
|
||||||
|
"cmd": "hf 14a raw ",
|
||||||
|
"sequence": [
|
||||||
|
"-ak -b 7 40",
|
||||||
|
"-ak 43",
|
||||||
|
"-ak E0 00 39 F7",
|
||||||
|
"-ak E1 00 E1 EE",
|
||||||
|
"-ak 85 00 00 00 00 00 00 00 00 00 00 00 00 00 00 08 18 47",
|
||||||
|
"-a 52"
|
||||||
|
]
|
||||||
|
},
|
||||||
|
"Magic Card set parameter": {
|
||||||
|
"cmd": "hf mf csetuid --uid <uid> --atqa <atqa> --sak <sak>"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"lf": {
|
||||||
|
"read": {
|
||||||
|
"cmd": "lf read -v",
|
||||||
|
"show cmd": "data plot"
|
||||||
|
},
|
||||||
|
"sniff": {
|
||||||
|
"cmd": "lf sniff -v",
|
||||||
|
"show cmd": "data plot"
|
||||||
|
},
|
||||||
|
"search": {
|
||||||
|
"cmd": "lf search -u"
|
||||||
|
},
|
||||||
|
"tune": {
|
||||||
|
"cmd": "lf tune --divisor <divisor>"
|
||||||
|
},
|
||||||
|
"get config": {
|
||||||
|
"cmd": "hw status",
|
||||||
|
"field start": "LF Sampling config",
|
||||||
|
"field end": "LF Sampling Stack",
|
||||||
|
"divisor": {
|
||||||
|
"flag": "divisor",
|
||||||
|
"pattern": "\\d+"
|
||||||
|
},
|
||||||
|
"bits per sample": {
|
||||||
|
"flag": "bits per sample",
|
||||||
|
"pattern": "\\d+"
|
||||||
|
},
|
||||||
|
"decimation": {
|
||||||
|
"flag": "decimation",
|
||||||
|
"pattern": "\\d+"
|
||||||
|
},
|
||||||
|
"averaging": {
|
||||||
|
"flag": "averaging",
|
||||||
|
"pattern": "\\d+",
|
||||||
|
"replace": {
|
||||||
|
"yes": "1",
|
||||||
|
"no": "0",
|
||||||
|
"Yes": "1",
|
||||||
|
"No": "0"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"trigger threshold": {
|
||||||
|
"flag": "trigger threshold",
|
||||||
|
"pattern": "\\d+"
|
||||||
|
},
|
||||||
|
"samples to skip": {
|
||||||
|
"flag": "samples to skip",
|
||||||
|
"pattern": "\\d+"
|
||||||
|
},
|
||||||
|
"//": "execute 'cmd' then find parameters between 'field stard' and 'field end'",
|
||||||
|
"//": "for each line, if the line doesn't have any flag, skip",
|
||||||
|
"//": "otherwise, delete characters before 'flag' and 'flag' itself, then use 'pattern' to get the parameter",
|
||||||
|
"//": "If 'replace' dict exists, replace all keys with respective values before getting parameters"
|
||||||
|
},
|
||||||
|
"set config": {
|
||||||
|
"cmd": "lf config --divisor <divisor> --bps <bits per sample> --dec <decimation> --avg <averaging> --trig <trigger threshold> --skip <samples to skip>",
|
||||||
|
"divisor cmd": "hw setlfdivisor -d <divisor>"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -26,15 +26,15 @@
|
|||||||
***
|
***
|
||||||
|
|
||||||
## 预览图
|
## 预览图
|
||||||

|

|
||||||
|
|
||||||
[更多预览](../doc/previews.md)
|
[更多预览](../preview/previews.md)
|
||||||
|
|
||||||
***
|
***
|
||||||
|
|
||||||
## 关于冰人版
|
## 关于冰人版
|
||||||
[冰人版](https://github.com/RfidResearchGroup/proxmark3)(Iceman/RRG)的客户端和固件更新更为激进,相比官方版具有更多的功能
|
[冰人版](https://github.com/RfidResearchGroup/proxmark3)(Iceman/RRG)的客户端和固件更新更为激进,相比官方版具有更多的功能
|
||||||
此GUI所有功能均兼容冰人版(在v4.9237上测试通过)
|
此GUI所有功能均兼容冰人版(在v4.13441上测试通过)
|
||||||
|
|
||||||
***
|
***
|
||||||
|
|
||||||
@@ -50,7 +50,9 @@ release页面中有含客户端的GUI。这个GUI也可以搭配你自己的客
|
|||||||
## 在Linux系统下编译
|
## 在Linux系统下编译
|
||||||
|
|
||||||
cd ~
|
cd ~
|
||||||
git clone https://github.com/wh201906/Proxmark3GUI.git
|
sudo apt-get update
|
||||||
|
sudo apt-get install qt5-default libqt5serialport5 libqt5serialport5-dev
|
||||||
|
git clone https://github.com/wh201906/Proxmark3GUI.git --depth=1
|
||||||
cd Proxmark3GUI
|
cd Proxmark3GUI
|
||||||
mkdir build
|
mkdir build
|
||||||
cd build
|
cd build
|
||||||
@@ -58,12 +60,30 @@ release页面中有含客户端的GUI。这个GUI也可以搭配你自己的客
|
|||||||
make
|
make
|
||||||
make clean
|
make clean
|
||||||
cp -r ../lang ./
|
cp -r ../lang ./
|
||||||
|
cp -r ../config ./
|
||||||
./Proxmark3GUI
|
./Proxmark3GUI
|
||||||
|
|
||||||
***
|
***
|
||||||
|
## 教程
|
||||||
|
[1.快速上手](../tutorial/Quickstart/quickstart_zh_CN.md)
|
||||||
|
[2.编辑Mifare(IC)卡数据](../tutorial/Edit_Mifare_Classic_data/Edit_Mifare_Classic_data_zh_CN.md)(无需PM3硬件)
|
||||||
|
***
|
||||||
## 更新日志:
|
## 更新日志:
|
||||||
|
|
||||||
|
### V0.2.3
|
||||||
|
+ 修复 [#27](https://github.com/wh201906/Proxmark3GUI/issues/27)
|
||||||
|
+ 尝试支持中文启动路径
|
||||||
|
|
||||||
|
### V0.2.2
|
||||||
|
+ 从外部文件加载客户端命令格式
|
||||||
|
+ 修复 [#20](https://github.com/wh201906/Proxmark3GUI/issues/20), [#21](https://github.com/wh201906/Proxmark3GUI/issues/21), [#22](https://github.com/wh201906/Proxmark3GUI/issues/22)
|
||||||
|
+ 兼容冰人版客户端 v4.13441
|
||||||
|
|
||||||
|
### V0.2.1
|
||||||
|
+ 优化MIFARE Classic读卡逻辑
|
||||||
|
+ 修复 [#16](https://github.com/wh201906/Proxmark3GUI/issues/16) (配合新版RRG固件时无法读取扇区数据)
|
||||||
|
+ 修复 [#15](https://github.com/wh201906/Proxmark3GUI/issues/15) (路径中支持空格)
|
||||||
|
|
||||||
### V0.2
|
### V0.2
|
||||||
+ 使用浮动窗口,界面配置更加灵活
|
+ 使用浮动窗口,界面配置更加灵活
|
||||||
+ 支持部分低频命令
|
+ 支持部分低频命令
|
||||||
|
Before Width: | Height: | Size: 44 KiB After Width: | Height: | Size: 44 KiB |
|
Before Width: | Height: | Size: 50 KiB After Width: | Height: | Size: 50 KiB |
|
Before Width: | Height: | Size: 59 KiB After Width: | Height: | Size: 59 KiB |
|
Before Width: | Height: | Size: 40 KiB After Width: | Height: | Size: 40 KiB |
|
Before Width: | Height: | Size: 1.2 MiB After Width: | Height: | Size: 1.2 MiB |
|
Before Width: | Height: | Size: 797 KiB After Width: | Height: | Size: 797 KiB |
|
Before Width: | Height: | Size: 438 KiB After Width: | Height: | Size: 438 KiB |
|
Before Width: | Height: | Size: 468 KiB After Width: | Height: | Size: 468 KiB |
@@ -0,0 +1,20 @@
|
|||||||
|
## Previews
|
||||||
|
|
||||||
|
Raw Command:
|
||||||
|

|
||||||
|
|
||||||
|
Mifare Nested Attack:
|
||||||
|

|
||||||
|
|
||||||
|
Mifare Load File:
|
||||||
|

|
||||||
|
|
||||||
|
Mifare Edit File:
|
||||||
|

|
||||||
|
|
||||||
|
Mifare Trailer Decoder:
|
||||||
|

|
||||||
|
|
||||||
|
Dock Widget:
|
||||||
|

|
||||||
|

|
||||||
|
Before Width: | Height: | Size: 345 KiB After Width: | Height: | Size: 345 KiB |
@@ -0,0 +1,50 @@
|
|||||||
|
# Edit Mifare Classic data
|
||||||
|
|
||||||
|
[中文教程](Edit_Mifare_Classic_data_zh_CN.md)
|
||||||
|
This function is useful even if you don't use Proxmark3.
|
||||||
|
|
||||||
|
## About card type
|
||||||
|
There are four sizes of Mifare Classic card
|
||||||
|
+ 320Byte, also known as MINI, S20
|
||||||
|
+ 1kB, also known as S50
|
||||||
|
+ 2kB
|
||||||
|
+ 4kB, alsow known as S70
|
||||||
|
|
||||||
|
Before any operation, you need to choose the right card type.
|
||||||
|
If you don't know your card type, you can try 1K first. Mifare Classic S50(1K) is the most common type.
|
||||||
|

|
||||||
|
|
||||||
|
## About file format
|
||||||
|
This program supports binary data file and text data file.
|
||||||
|
Binary data files have the same size of chosen card type.(e.g, type 1K->1024KB data file).
|
||||||
|
The file extensions of them are always .dump or .bin.
|
||||||
|
You can edit them by hex editor or this program.
|
||||||
|

|
||||||
|
Text data files can be open by any text editors.
|
||||||
|
The file extensions of them are always .eml or .txt.
|
||||||
|

|
||||||
|
|
||||||
|
## Load
|
||||||
|
Go to "Mifare"->"File"->, choose "data" on the left and click "Load", then choose the file you want to load. The program will detect the file type by context.
|
||||||
|

|
||||||
|

|
||||||
|
Also, you can drag the file into data widget to load the data file.
|
||||||
|

|
||||||
|
|
||||||
|
## Edit
|
||||||
|
Double click any data row to start edit
|
||||||
|

|
||||||
|
You don't need to fill the space between every byte.
|
||||||
|

|
||||||
|
|
||||||
|
## Save
|
||||||
|
Go to "Mifare"->"File"->, choose "data" on the left and click "Save", then choose the path you want to save and the file format.
|
||||||
|

|
||||||
|
|
||||||
|
## File format convert
|
||||||
|
If you got a binary data file and you want to edit with notepad, here are the steps.
|
||||||
|
+ Load the orignal binary file
|
||||||
|
+ Save it as a text file
|
||||||
|
+ Edit the new file with whatever you want then save it
|
||||||
|
+ Load the edited file
|
||||||
|
+ Save it as binary file
|
||||||
@@ -0,0 +1,51 @@
|
|||||||
|
# 编辑Mifare(IC)卡数据
|
||||||
|
|
||||||
|
[English](Edit_Mifare_Classic_data.md)
|
||||||
|
此功能对没有PM3硬件的用户也很有用。
|
||||||
|
|
||||||
|
## 关于卡类型
|
||||||
|
Mifare Classic卡有四种不同的容量
|
||||||
|
+ 320字节,也被称作MINI卡,S20卡
|
||||||
|
+ 1k字节,也被称为S50卡,最常见的型号
|
||||||
|
+ 2k字节
|
||||||
|
+ 4k字节,也被称为S70卡
|
||||||
|
|
||||||
|
在操作前,请先选择卡类型。
|
||||||
|
如果自己不清楚卡类型,可尝试选择1k卡,这是最常见的型号。
|
||||||
|

|
||||||
|
|
||||||
|
## 关于文件格式
|
||||||
|
此程序支持二进制文件格式和文本文件格式。
|
||||||
|
二进制文件的大小和所选卡类型的大小完全相等,文件中的每一个字节对应卡片数据中的一个字节。
|
||||||
|
二进制文件的后缀名一般是.dump或.bin。
|
||||||
|
此类文件需要使用16进制编辑器或者此程序来编辑。
|
||||||
|

|
||||||
|
文本文件可被任意文本编辑器打开。
|
||||||
|
此类文件的后缀名一般是.eml或.txt。
|
||||||
|

|
||||||
|
|
||||||
|
## 加载文件
|
||||||
|
在“Mifare”选项卡->“文件”框中勾选“数据”,点击“加载”按钮载入文件。
|
||||||
|
此程序会根据文件内容判断待加载的文件格式。
|
||||||
|

|
||||||
|

|
||||||
|
程序还支持拖拽加载。你可以直接把文件拖入左边数据显示器中。
|
||||||
|

|
||||||
|
|
||||||
|
## 编辑数据
|
||||||
|
双击数据行即可开始编辑。
|
||||||
|

|
||||||
|
编辑过程中无需手动补全字节间空格。
|
||||||
|

|
||||||
|
|
||||||
|
## 保存文件
|
||||||
|
在“Mifare”选项卡->“文件”框中勾选“数据”,点击“保存”按钮,选择保存的路径和文件格式即可保存文件。
|
||||||
|

|
||||||
|
|
||||||
|
## 文件格式转换
|
||||||
|
如果你想用其它文本编辑器编辑二进制文件,可以参考以下步骤
|
||||||
|
+ 加载原始二进制文件
|
||||||
|
+ 保存为文本文件
|
||||||
|
+ 用自己喜欢的文本编辑器编辑后保存
|
||||||
|
+ 加载编辑后的文件
|
||||||
|
+ 保存为二进制文件
|
||||||
|
After Width: | Height: | Size: 20 KiB |
|
After Width: | Height: | Size: 22 KiB |
|
After Width: | Height: | Size: 30 KiB |
|
After Width: | Height: | Size: 1.8 KiB |
|
After Width: | Height: | Size: 1.5 KiB |
|
After Width: | Height: | Size: 15 KiB |
|
After Width: | Height: | Size: 14 KiB |
|
After Width: | Height: | Size: 11 KiB |
|
After Width: | Height: | Size: 2.2 KiB |
|
After Width: | Height: | Size: 2.6 KiB |
|
After Width: | Height: | Size: 11 KiB |
|
After Width: | Height: | Size: 26 KiB |
|
After Width: | Height: | Size: 25 KiB |
|
After Width: | Height: | Size: 11 KiB |
|
After Width: | Height: | Size: 2.5 KiB |
|
After Width: | Height: | Size: 2.6 KiB |
|
After Width: | Height: | Size: 2.6 KiB |
|
After Width: | Height: | Size: 2.8 KiB |
|
After Width: | Height: | Size: 2.4 KiB |
|
After Width: | Height: | Size: 4.6 KiB |
|
After Width: | Height: | Size: 13 KiB |
|
After Width: | Height: | Size: 11 KiB |
|
After Width: | Height: | Size: 1.4 KiB |
|
After Width: | Height: | Size: 1.5 KiB |
|
After Width: | Height: | Size: 3.5 KiB |
|
After Width: | Height: | Size: 3.7 KiB |
|
After Width: | Height: | Size: 28 KiB |
|
After Width: | Height: | Size: 20 KiB |
|
After Width: | Height: | Size: 4.4 KiB |
|
After Width: | Height: | Size: 4.0 KiB |
|
After Width: | Height: | Size: 3.2 KiB |
|
After Width: | Height: | Size: 4.2 KiB |
@@ -0,0 +1,45 @@
|
|||||||
|
# Quickstart
|
||||||
|
|
||||||
|
[中文教程](quickstart_zh_CN.md)
|
||||||
|
***
|
||||||
|
**On Windows**
|
||||||
|
***
|
||||||
|
## Use GUI with included client
|
||||||
|
(1) Download the GUI with included client on [release](https://github.com/wh201906/Proxmark3GUI/releases) page
|
||||||
|

|
||||||
|
|
||||||
|
(2) Extract the .7z file to a path. The target path should not contain non-ASCII characters
|
||||||
|

|
||||||
|
|
||||||
|
(3) Open Proxmark3GUI.exe in the GUI folder, then select the language and click "OK". Now you can use it
|
||||||
|

|
||||||
|

|
||||||
|
|
||||||
|
## Use the GUI with your own client
|
||||||
|
(1) Download the standalone GUI on [release](https://github.com/wh201906/Proxmark3GUI/releases) page
|
||||||
|

|
||||||
|
|
||||||
|
(2) Extract the .7z file to a path. The target path should not contain non-ASCII characters. Make sure the client path and the GUI path are different.
|
||||||
|
|
||||||
|
(3) Open the GUI. Input the client path in the "Client Path" editbox on the top of the main window.
|
||||||
|

|
||||||
|
|
||||||
|
(4) Go to "Settings" panel. Input the config file path which matching the client you use.
|
||||||
|

|
||||||
|
|
||||||
|
(5) If setup.bat is required, input the script path in the "Preload script path" editbox.
|
||||||
|

|
||||||
|
|
||||||
|
(6) If using RRG/Iceman repo, input "-p \<port\> -f" in the "Start arguments" editbox.
|
||||||
|

|
||||||
|
|
||||||
|
***
|
||||||
|
**On Linux**
|
||||||
|
***
|
||||||
|
(1) Build the GUI by following the instructions on [README](../../../README.md)
|
||||||
|
(2) Config the GUI with the same steps of "On Windows"->"Use the GUI with your own client"
|
||||||
|
(3) You might need to change "\<port\>" to "/dev/\<port\>" in "Settings"->"Start arguments" editbox
|
||||||
|

|
||||||
|
|
||||||
|
(4) If you are using Raspbian(Raspberry OS), you might need to check "Keep the client active even the PM3 hardware is disconnected." in the "Steeings" panel
|
||||||
|

|
||||||
@@ -0,0 +1,49 @@
|
|||||||
|
# 快速上手
|
||||||
|
|
||||||
|
[English](quickstart.md)
|
||||||
|
***
|
||||||
|
**Windows用户**
|
||||||
|
***
|
||||||
|
## 使用包含客户端的版本
|
||||||
|
(1) 直接下载[release](https://github.com/wh201906/Proxmark3GUI/releases)当中包含客户端的版本即可
|
||||||
|

|
||||||
|
(例如Vx.x.x-win-Officialclient.7z或Vx.x.x-win-RRGclient.7z,前者为官方客户端,后者为冰人版/RRG客户端)
|
||||||
|
|
||||||
|
(2) 下载完成后将压缩包内所有内容解压到不含中文的路径当中
|
||||||
|

|
||||||
|
|
||||||
|
(3) 双击GUI目录下的Proxmark3GUI.exe,选择语言,点击OK,即可正常运行
|
||||||
|

|
||||||
|

|
||||||
|
***
|
||||||
|
|
||||||
|
## 使用现有客户端
|
||||||
|
(1) 下载[release](https://github.com/wh201906/Proxmark3GUI/releases)当中不包含客户端的版本
|
||||||
|

|
||||||
|
|
||||||
|
(2) 解压到不含中文的路径当中
|
||||||
|
(注意,GUI所在目录和PM3客户端所在目录不能相同)
|
||||||
|
|
||||||
|
(3) 双击打开,选择语言,在顶端“客户端路径”当中填入proxmark3.exe的路径
|
||||||
|

|
||||||
|
|
||||||
|
(4) 进入“设置”面板,根据自己使用的客户端类型(官方版/冰人版)选择正确的配置文件
|
||||||
|
(./config/config_official.json或./config/config_rrgv4.13.json)
|
||||||
|

|
||||||
|
|
||||||
|
(5) 若客户端启动时需要双击setup.bat启动,而setup.bat内会设置客户端运行时的环境变量,则需要在“预加载脚本路径”当中填入setup.bat的路径
|
||||||
|

|
||||||
|
|
||||||
|
(6) 若使用的是冰人固件,则可能需要在“启动参数”当中填入“-p \<port\> -f”
|
||||||
|

|
||||||
|
|
||||||
|
***
|
||||||
|
**Linux用户**
|
||||||
|
***
|
||||||
|
(1) 参考[README](../../README/README_zh_CN.md)当中的编译步骤手动编译Proxmark3GUI
|
||||||
|
(2) 参考“Windows用户”->“使用现有客户端”的(2)~(6)步进行配置
|
||||||
|
(3) “设置”->“启动参数”当中可能需要将“\<port\>”改为“/dev/\<port\>”
|
||||||
|

|
||||||
|
|
||||||
|
(4) 若使用树莓派Raspbian系统且连接成功若干秒后PM3会自动断开,则需要在“设置”面板中勾选“在PM3断开后保持客户端运行”
|
||||||
|

|
||||||
@@ -5,11 +5,24 @@
|
|||||||
#include <QTranslator>
|
#include <QTranslator>
|
||||||
#include <QMessageBox>
|
#include <QMessageBox>
|
||||||
#include <QTextCodec>
|
#include <QTextCodec>
|
||||||
|
#include <QDir>
|
||||||
|
|
||||||
int main(int argc, char *argv[])
|
int main(int argc, char *argv[])
|
||||||
{
|
{
|
||||||
|
// A trick to handle non-ascii path
|
||||||
|
// The application cannot find the plugins when the path contains non ascii characters.
|
||||||
|
// However, the plugins will be load after creating MainWindow(or QApplication?).
|
||||||
|
// QDir will handle the path correctly.
|
||||||
|
QDir* pluginDir = new QDir;
|
||||||
|
if(pluginDir->cd("plugins")) // has plugins folder
|
||||||
|
{
|
||||||
|
qputenv("QT_PLUGIN_PATH", pluginDir->absolutePath().toLocal8Bit());
|
||||||
|
}
|
||||||
|
delete pluginDir;
|
||||||
|
|
||||||
QCoreApplication::setAttribute(Qt::AA_EnableHighDpiScaling);
|
QCoreApplication::setAttribute(Qt::AA_EnableHighDpiScaling);
|
||||||
QTextCodec::setCodecForLocale(QTextCodec::codecForName("UTF-8"));
|
QTextCodec::setCodecForLocale(QTextCodec::codecForName("UTF-8"));
|
||||||
|
QDir *langPath = new QDir();
|
||||||
QApplication a(argc, argv);
|
QApplication a(argc, argv);
|
||||||
MainWindow w;
|
MainWindow w;
|
||||||
|
|
||||||
@@ -29,14 +42,10 @@ int main(int argc, char *argv[])
|
|||||||
else
|
else
|
||||||
currLang = "en_US";
|
currLang = "en_US";
|
||||||
}
|
}
|
||||||
currLang = "lang/" + currLang;
|
|
||||||
#ifdef Q_OS_WIN
|
|
||||||
currLang += ".qm";
|
currLang += ".qm";
|
||||||
#else
|
langPath->cd("lang");
|
||||||
currLang += ".ts";;
|
|
||||||
#endif
|
|
||||||
QTranslator* translator = new QTranslator(&w);
|
QTranslator* translator = new QTranslator(&w);
|
||||||
if(translator->load(currLang))
|
if(translator->load(currLang, langPath->absolutePath()))
|
||||||
{
|
{
|
||||||
a.installTranslator(translator);
|
a.installTranslator(translator);
|
||||||
}
|
}
|
||||||
@@ -45,6 +54,7 @@ int main(int argc, char *argv[])
|
|||||||
QMessageBox::information(&w, "Error", "Can't load " + currLang + " as translation file.");
|
QMessageBox::information(&w, "Error", "Can't load " + currLang + " as translation file.");
|
||||||
}
|
}
|
||||||
delete settings;
|
delete settings;
|
||||||
|
delete langPath;
|
||||||
w.initUI();
|
w.initUI();
|
||||||
w.show();
|
w.show();
|
||||||
return a.exec();
|
return a.exec();
|
||||||
|
|||||||
@@ -1,6 +1,7 @@
|
|||||||
#include "lf.h"
|
#include "lf.h"
|
||||||
|
#include <QJsonArray>
|
||||||
|
|
||||||
const LF::Config LF::defaultConfig;
|
const LF::LFConfig LF::defaultLFConfig;
|
||||||
|
|
||||||
LF::LF(Ui::MainWindow *ui, Util *addr, QWidget *parent): QObject(parent)
|
LF::LF(Ui::MainWindow *ui, Util *addr, QWidget *parent): QObject(parent)
|
||||||
{
|
{
|
||||||
@@ -8,142 +9,126 @@ LF::LF(Ui::MainWindow *ui, Util *addr, QWidget *parent): QObject(parent)
|
|||||||
util = addr;
|
util = addr;
|
||||||
this->ui = ui;
|
this->ui = ui;
|
||||||
|
|
||||||
configPattern = new QRegularExpression("(\\d+)|Yes|No");
|
LFconfigPattern = new QRegularExpression("(\\d+)|Yes|No");
|
||||||
currConfig = defaultConfig;
|
currLFConfig = defaultLFConfig;
|
||||||
}
|
}
|
||||||
|
|
||||||
void LF::read()
|
void LF::read()
|
||||||
{
|
{
|
||||||
if(Util::getClientType() == Util::CLIENTTYPE_OFFICIAL)
|
QVariantMap config = configMap["read"].toMap();
|
||||||
util->execCMD("lf read");
|
util->execCMD(config["cmd"].toString());
|
||||||
else if(Util::getClientType() == Util::CLIENTTYPE_ICEMAN)
|
|
||||||
util->execCMD("lf read -v");
|
|
||||||
Util::gotoRawTab();
|
Util::gotoRawTab();
|
||||||
util->execCMD("data plot");
|
util->execCMD(config["show cmd"].toString());
|
||||||
}
|
}
|
||||||
|
|
||||||
void LF::sniff()
|
void LF::sniff()
|
||||||
{
|
{
|
||||||
if(Util::getClientType() == Util::CLIENTTYPE_OFFICIAL)
|
QVariantMap config = configMap["sniff"].toMap();
|
||||||
util->execCMD("lf snoop");
|
util->execCMD(config["cmd"].toString());
|
||||||
else if(Util::getClientType() == Util::CLIENTTYPE_ICEMAN)
|
|
||||||
util->execCMD("lf sniff -v");
|
|
||||||
Util::gotoRawTab();
|
Util::gotoRawTab();
|
||||||
util->execCMD("data plot");
|
util->execCMD(config["show cmd"].toString());
|
||||||
}
|
}
|
||||||
|
|
||||||
void LF::search()
|
void LF::search()
|
||||||
{
|
{
|
||||||
if(Util::getClientType() == Util::CLIENTTYPE_OFFICIAL)
|
QVariantMap config = configMap["search"].toMap();
|
||||||
util->execCMD("lf search u");
|
util->execCMD(config["cmd"].toString());
|
||||||
else if(Util::getClientType() == Util::CLIENTTYPE_ICEMAN)
|
|
||||||
util->execCMD("lf search -u");
|
|
||||||
Util::gotoRawTab();
|
Util::gotoRawTab();
|
||||||
}
|
}
|
||||||
|
|
||||||
void LF::tune()
|
void LF::tune()
|
||||||
{
|
{
|
||||||
if(Util::getClientType() == Util::CLIENTTYPE_OFFICIAL)
|
QVariantMap config = configMap["tune"].toMap();
|
||||||
util->execCMD("hw tune l");
|
QString cmd = config["cmd"].toString();
|
||||||
else if(Util::getClientType() == Util::CLIENTTYPE_ICEMAN)
|
cmd.replace("<divisor>", QString::number(currLFConfig.divisor));
|
||||||
util->execCMD("lf tune --divisor " + QString::number(currConfig.divisor));
|
util->execCMD(cmd);
|
||||||
Util::gotoRawTab();
|
Util::gotoRawTab();
|
||||||
}
|
}
|
||||||
|
|
||||||
void LF::getConfig()
|
bool LF::getLFConfig_helper(const QVariantMap& map, QString& str, int* result)
|
||||||
{
|
{
|
||||||
|
int len;
|
||||||
|
QString flag = map["flag"].toString();
|
||||||
|
QRegularExpressionMatch reMatch;
|
||||||
|
if(!str.contains(flag))
|
||||||
|
return false;
|
||||||
|
len = str.length() - (str.indexOf(flag) + flag.length());
|
||||||
|
str = str.right(len);
|
||||||
|
if(map.contains("replace"))
|
||||||
|
{
|
||||||
|
QVariantMap table = map["replace"].toMap();
|
||||||
|
for(auto it = table.begin(); it != table.end(); it++)
|
||||||
|
{
|
||||||
|
str.replace(it.key(), it.value().toString());
|
||||||
|
}
|
||||||
|
}
|
||||||
|
reMatch = QRegularExpression(map["pattern"].toString()).match(str);
|
||||||
|
if(!reMatch.hasMatch())
|
||||||
|
return false;
|
||||||
|
*result = reMatch.captured().toInt();
|
||||||
|
qDebug() << *result;
|
||||||
|
return true;
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
void LF::getLFConfig()
|
||||||
|
{
|
||||||
|
|
||||||
QRegularExpressionMatch reMatch;
|
QRegularExpressionMatch reMatch;
|
||||||
QString result;
|
QString result;
|
||||||
QStringList resultList;
|
QStringList resultList;
|
||||||
QStringList symbolList =
|
int start, end, temp;
|
||||||
|
QVariantMap config = configMap["get config"].toMap();
|
||||||
|
QString cmd = config["cmd"].toString();
|
||||||
|
result = util->execCMDWithOutput(cmd, 400);
|
||||||
|
start = result.indexOf(config["field start"].toString());
|
||||||
|
end = result.indexOf(config["field end"].toString());
|
||||||
|
result = result.mid(start, end - start);
|
||||||
|
#if (QT_VERSION <= QT_VERSION_CHECK(5,14,0))
|
||||||
|
resultList = result.split("\n", QString::SkipEmptyParts);
|
||||||
|
#else
|
||||||
|
resultList = result.split("\n", Qt::SkipEmptyParts);
|
||||||
|
#endif
|
||||||
|
qDebug() << "LF CONFIG GET\n" << resultList;
|
||||||
|
for(auto it = resultList.begin(); it != resultList.end(); it++)
|
||||||
{
|
{
|
||||||
"divisor",
|
if(getLFConfig_helper(config["divisor"].toMap(), *it, &temp))
|
||||||
"bps",
|
currLFConfig.divisor = temp;
|
||||||
"bits per sample",
|
else if(getLFConfig_helper(config["bits per sample"].toMap(), *it, &temp))
|
||||||
"decimation",
|
currLFConfig.bitsPerSample = temp;
|
||||||
"averaging",
|
else if(getLFConfig_helper(config["decimation"].toMap(), *it, &temp))
|
||||||
"trigger threshold",
|
currLFConfig.decimation = temp;
|
||||||
"samples to skip"
|
else if(getLFConfig_helper(config["averaging"].toMap(), *it, &temp))
|
||||||
};
|
currLFConfig.averaging = (bool)temp;
|
||||||
int offset;
|
else if(getLFConfig_helper(config["trigger threshold"].toMap(), *it, &temp))
|
||||||
QStringList configList = {"", "", "", "", "", "", ""};
|
currLFConfig.triggerThreshold = temp;
|
||||||
result = util->execCMDWithOutput("hw status", 400); // not all output from "hw status will be processed".
|
else if(getLFConfig_helper(config["samples to skip"].toMap(), *it, &temp))
|
||||||
result = result.right(result.length() - result.indexOf("LF Sampling config"));
|
currLFConfig.samplesToSkip = temp;
|
||||||
offset = result.indexOf("samples to skip");
|
|
||||||
offset = result.indexOf("\r\n", offset);
|
|
||||||
result = result.mid(0, offset + 2);
|
|
||||||
qDebug() << "LF CONFIG GET\n" << result;
|
|
||||||
resultList = result.split("\r\n");
|
|
||||||
for(int i = 0; i < resultList.length(); i++)
|
|
||||||
{
|
|
||||||
for(int j = 0; j < symbolList.length(); j++)
|
|
||||||
{
|
|
||||||
if(!configList[j].isEmpty())
|
|
||||||
continue;
|
|
||||||
offset = resultList[i].indexOf(symbolList[j]);
|
|
||||||
if(offset != -1)
|
|
||||||
{
|
|
||||||
reMatch = configPattern->match(resultList[i]);
|
|
||||||
qDebug() << "finded: " << resultList[i];
|
|
||||||
if(!reMatch.hasMatch())
|
|
||||||
continue;
|
|
||||||
qDebug() << "captured: " << reMatch.captured();
|
|
||||||
configList[j] = reMatch.captured();
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
qDebug() << "configList: " << configList;
|
|
||||||
currConfig.divisor = configList[0].toUInt();
|
|
||||||
currConfig.decimation = configList[3].toUInt();
|
|
||||||
currConfig.triggerThreshold = configList[5].toUInt();
|
|
||||||
currConfig.samplesToSkip = configList[6].toUInt();
|
|
||||||
if(Util::getClientType() == Util::CLIENTTYPE_OFFICIAL)
|
|
||||||
{
|
|
||||||
currConfig.bitPerSample = configList[1].toUInt();
|
|
||||||
currConfig.averaging = (configList[4] == "1");
|
|
||||||
}
|
|
||||||
else if(Util::getClientType() == Util::CLIENTTYPE_ICEMAN)
|
|
||||||
{
|
|
||||||
currConfig.bitPerSample = configList[2].toUInt();
|
|
||||||
currConfig.averaging = (configList[4] == "Yes");
|
|
||||||
}
|
}
|
||||||
syncWithUI();
|
syncWithUI();
|
||||||
}
|
}
|
||||||
|
|
||||||
void LF::setConfig(LF::Config config)
|
void LF::setLFConfig(LF::LFConfig lfconfig)
|
||||||
{
|
{
|
||||||
currConfig = config;
|
currLFConfig = lfconfig;
|
||||||
if(Util::getClientType() == Util::CLIENTTYPE_OFFICIAL)
|
QVariantMap config = configMap["set config"].toMap();
|
||||||
{
|
QString cmd = config["cmd"].toString();
|
||||||
util->execCMDWithOutput(QString("lf config")
|
cmd.replace("<divisor>", QString::number(currLFConfig.divisor));
|
||||||
+ " q " + QString::number(currConfig.divisor)
|
cmd.replace("<bits per sample>", QString::number(currLFConfig.bitsPerSample));
|
||||||
+ " b " + QString::number(currConfig.bitPerSample)
|
cmd.replace("<decimation>", QString::number(currLFConfig.decimation));
|
||||||
+ " d " + QString::number(currConfig.decimation)
|
cmd.replace("<averaging>", currLFConfig.averaging ? "1" : "0");
|
||||||
+ " a " + QString(currConfig.averaging ? "1" : "0")
|
cmd.replace("<trigger threshold>", QString::number(currLFConfig.triggerThreshold));
|
||||||
+ " t " + QString::number(currConfig.triggerThreshold)
|
cmd.replace("<samples to skip>", QString::number(currLFConfig.samplesToSkip));
|
||||||
+ " s " + QString::number(currConfig.samplesToSkip),
|
util->execCMDWithOutput(cmd, 500);
|
||||||
500);
|
cmd = config["divisor cmd"].toString();
|
||||||
util->execCMDWithOutput("hw setlfdivisor " + QString::number(currConfig.divisor), 500);
|
cmd.replace("<divisor>", QString::number(currLFConfig.divisor));
|
||||||
}
|
util->execCMDWithOutput(cmd, 500);
|
||||||
else if(Util::getClientType() == Util::CLIENTTYPE_ICEMAN)
|
|
||||||
{
|
|
||||||
util->execCMDWithOutput(QString("lf config")
|
|
||||||
+ " -a " + QString(currConfig.averaging ? "1" : "0")
|
|
||||||
+ " -b " + QString::number(currConfig.bitPerSample)
|
|
||||||
+ " --dec " + QString::number(currConfig.decimation)
|
|
||||||
+ " --divisor " + QString::number(currConfig.divisor)
|
|
||||||
+ " -s " + QString::number(currConfig.samplesToSkip)
|
|
||||||
+ " -t " + QString::number(currConfig.triggerThreshold),
|
|
||||||
500);
|
|
||||||
util->execCMDWithOutput("hw setlfdivisor -d " + QString::number(currConfig.divisor), 500);
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
void LF::resetConfig()
|
void LF::resetLFConfig()
|
||||||
{
|
{
|
||||||
setConfig(defaultConfig);
|
setLFConfig(defaultLFConfig);
|
||||||
getConfig();
|
getLFConfig();
|
||||||
}
|
}
|
||||||
|
|
||||||
float LF::divisor2Freq(uint8_t divisor)
|
float LF::divisor2Freq(uint8_t divisor)
|
||||||
@@ -158,10 +143,16 @@ uint8_t LF::freq2Divisor(float freq)
|
|||||||
|
|
||||||
void LF::syncWithUI()
|
void LF::syncWithUI()
|
||||||
{
|
{
|
||||||
ui->LF_Conf_freqDivisorBox->setValue(currConfig.divisor); // will trigger valueChanged()
|
ui->LF_LFConf_freqDivisorBox->setValue(currLFConfig.divisor); // will trigger valueChanged()
|
||||||
ui->LF_Conf_bitPerSampleBox->setValue(currConfig.bitPerSample);
|
ui->LF_LFConf_bitsPerSampleBox->setValue(currLFConfig.bitsPerSample);
|
||||||
ui->LF_Conf_decimationBox->setValue(currConfig.decimation);
|
ui->LF_LFConf_decimationBox->setValue(currLFConfig.decimation);
|
||||||
ui->LF_Conf_averagingBox->setChecked(currConfig.averaging);
|
ui->LF_LFConf_averagingBox->setChecked(currLFConfig.averaging);
|
||||||
ui->LF_Conf_thresholdBox->setValue(currConfig.triggerThreshold);
|
ui->LF_LFConf_thresholdBox->setValue(currLFConfig.triggerThreshold);
|
||||||
ui->LF_Conf_skipsBox->setValue(currConfig.samplesToSkip);
|
ui->LF_LFConf_skipsBox->setValue(currLFConfig.samplesToSkip);
|
||||||
|
}
|
||||||
|
|
||||||
|
void LF::setConfigMap(const QVariantMap& configMap)
|
||||||
|
{
|
||||||
|
this->configMap = configMap;
|
||||||
|
qDebug() << configMap;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -12,17 +12,17 @@ class LF : public QObject
|
|||||||
public:
|
public:
|
||||||
explicit LF(Ui::MainWindow *ui, Util *addr, QWidget *parent = nullptr);
|
explicit LF(Ui::MainWindow *ui, Util *addr, QWidget *parent = nullptr);
|
||||||
|
|
||||||
struct Config
|
struct LFConfig
|
||||||
{
|
{
|
||||||
uint8_t divisor;
|
uint8_t divisor;
|
||||||
uint8_t bitPerSample;
|
uint8_t bitsPerSample;
|
||||||
uint8_t decimation;
|
uint8_t decimation;
|
||||||
bool averaging;
|
bool averaging;
|
||||||
uint8_t triggerThreshold;
|
uint8_t triggerThreshold;
|
||||||
uint16_t samplesToSkip;
|
uint16_t samplesToSkip;
|
||||||
};
|
};
|
||||||
|
|
||||||
static constexpr Config defaultConfig =
|
static constexpr LFConfig defaultLFConfig =
|
||||||
{
|
{
|
||||||
95,
|
95,
|
||||||
8,
|
8,
|
||||||
@@ -36,19 +36,22 @@ public:
|
|||||||
void sniff();
|
void sniff();
|
||||||
void search();
|
void search();
|
||||||
void tune();
|
void tune();
|
||||||
void getConfig();
|
void getLFConfig();
|
||||||
void setConfig(LF::Config config);
|
void setLFConfig(LF::LFConfig lfconfig);
|
||||||
void resetConfig();
|
void resetLFConfig();
|
||||||
static float divisor2Freq(uint8_t divisor);
|
static float divisor2Freq(uint8_t divisor);
|
||||||
static uint8_t freq2Divisor(float freq);
|
static uint8_t freq2Divisor(float freq);
|
||||||
|
|
||||||
|
void setConfigMap(const QVariantMap &configMap);
|
||||||
private:
|
private:
|
||||||
QWidget* parent;
|
QWidget* parent;
|
||||||
Ui::MainWindow *ui;
|
Ui::MainWindow *ui;
|
||||||
Util* util;
|
Util* util;
|
||||||
Config currConfig;
|
LFConfig currLFConfig;
|
||||||
QRegularExpression* configPattern;
|
QRegularExpression* LFconfigPattern;
|
||||||
|
QVariantMap configMap;
|
||||||
void syncWithUI();
|
void syncWithUI();
|
||||||
|
bool getLFConfig_helper(const QVariantMap& map, QString& str, int* result);
|
||||||
signals:
|
signals:
|
||||||
|
|
||||||
};
|
};
|
||||||
|
|||||||
@@ -1,4 +1,5 @@
|
|||||||
#include "mifare.h"
|
#include "mifare.h"
|
||||||
|
#include <QJsonArray>
|
||||||
|
|
||||||
const Mifare::CardType Mifare::card_mini =
|
const Mifare::CardType Mifare::card_mini =
|
||||||
{
|
{
|
||||||
@@ -87,29 +88,37 @@ Mifare::Mifare(Ui::MainWindow *ui, Util *addr, QWidget *parent): QObject(parent)
|
|||||||
keyPattern = new QRegularExpression("\\|\\s*\\d{3}\\s*\\|\\s*.+?\\s*\\|\\s*.+?\\s*\\|");
|
keyPattern = new QRegularExpression("\\|\\s*\\d{3}\\s*\\|\\s*.+?\\s*\\|\\s*.+?\\s*\\|");
|
||||||
}
|
}
|
||||||
|
|
||||||
QString Mifare::info(bool isRequiringOutput)
|
void Mifare::setConfigMap(const QVariantMap& configMap)
|
||||||
{
|
{
|
||||||
if(Util::getClientType() == Util::CLIENTTYPE_OFFICIAL || Util::getClientType() == Util::CLIENTTYPE_ICEMAN)
|
this->configMap = configMap;
|
||||||
{
|
qDebug() << configMap;
|
||||||
|
}
|
||||||
|
|
||||||
|
QMap<QString, QString> Mifare::info(bool isRequiringOutput)
|
||||||
|
{
|
||||||
|
QMap<QString, QString> map;
|
||||||
|
QVariantMap config = configMap["info"].toMap();
|
||||||
if(isRequiringOutput)
|
if(isRequiringOutput)
|
||||||
{
|
{
|
||||||
QString result = util->execCMDWithOutput("hf 14a info", 500);
|
QString result = util->execCMDWithOutput(config["cmd"].toString(), 500);
|
||||||
int begin, end;
|
QStringList lineList = result.split("\n");
|
||||||
begin = result.indexOf("UID");
|
|
||||||
if(begin != -1)
|
for(auto line = lineList.begin(); line != lineList.end(); line++)
|
||||||
{
|
{
|
||||||
end = result.indexOf("SAK", begin);
|
if(line->contains("UID"))
|
||||||
end = result.indexOf("\n", end);
|
map["UID"] = line->replace("UID", "").replace(QRegularExpression("[^0-9a-fA-F]"), "").trimmed();
|
||||||
return result.mid(begin, end - begin + 1);
|
else if(line->contains("ATQA"))
|
||||||
|
map["ATQA"] = line->replace("ATQA", "").replace(QRegularExpression("[^0-9a-fA-F]"), "").trimmed();
|
||||||
|
else if(line->contains("SAK"))
|
||||||
|
map["SAK"] = line->replace("SAK", "").replace(QRegularExpression("\\[.+?\\]"), "").replace(QRegularExpression("[^0-9a-fA-F]"), "").trimmed();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
util->execCMD("hf 14a info");
|
util->execCMD(config["cmd"].toString());
|
||||||
Util::gotoRawTab();
|
Util::gotoRawTab();
|
||||||
}
|
}
|
||||||
}
|
return map;
|
||||||
return "";
|
|
||||||
}
|
}
|
||||||
|
|
||||||
void Mifare::chk()
|
void Mifare::chk()
|
||||||
@@ -118,131 +127,117 @@ void Mifare::chk()
|
|||||||
QString result;
|
QString result;
|
||||||
int offset = 0;
|
int offset = 0;
|
||||||
QString data;
|
QString data;
|
||||||
if(Util::getClientType() == Util::CLIENTTYPE_OFFICIAL)
|
QVariantMap config = configMap["check"].toMap();
|
||||||
{
|
QString cmd = config["cmd"].toString();
|
||||||
|
int keyAindex = config["key A index"].toInt();
|
||||||
|
int keyBindex = config["key B index"].toInt();
|
||||||
|
QRegularExpression keyPattern = QRegularExpression(config["key pattern"].toString());
|
||||||
|
cmd.replace("<card type>", config["card type"].toMap()[cardType.typeText].toString());
|
||||||
|
|
||||||
result = util->execCMDWithOutput(
|
result = util->execCMDWithOutput(
|
||||||
"hf mf chk *"
|
cmd,
|
||||||
+ QString::number(cardType.type)
|
Util::ReturnTrigger(1000 + cardType.sector_size * 200, {"No valid", keyPattern.pattern()}));
|
||||||
+ " ?",
|
|
||||||
Util::ReturnTrigger(1000 + cardType.sector_size * 200, {"No valid", keyPattern->pattern()}));
|
|
||||||
qDebug() << result;
|
|
||||||
for(int i = 0; i < cardType.sector_size; i++)
|
for(int i = 0; i < cardType.sector_size; i++)
|
||||||
{
|
{
|
||||||
reMatch = keyPattern->match(result, offset);
|
reMatch = keyPattern.match(result, offset);
|
||||||
offset = reMatch.capturedStart();
|
offset = reMatch.capturedStart();
|
||||||
if(reMatch.hasMatch())
|
if(reMatch.hasMatch())
|
||||||
{
|
{
|
||||||
data = reMatch.captured().toUpper();
|
data = reMatch.captured().toUpper();
|
||||||
offset += data.length();
|
offset += data.length();
|
||||||
QStringList cells = data.remove(" ").split("|");
|
QStringList cells = data.remove(" ").split("|");
|
||||||
if(!cells[2].contains("?"))
|
if(!cells[keyAindex].contains(QRegularExpression("[^0-9a-fA-F]")))
|
||||||
{
|
{
|
||||||
keyAList->replace(i, cells[2]);
|
keyAList->replace(i, cells[keyAindex]);
|
||||||
}
|
}
|
||||||
if(!cells[3].contains("?"))
|
if(!cells[keyBindex].contains(QRegularExpression("[^0-9a-fA-F]")))
|
||||||
{
|
{
|
||||||
keyBList->replace(i, cells[3]);
|
keyBList->replace(i, cells[keyBindex]);
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
else if(Util::getClientType() == Util::CLIENTTYPE_ICEMAN)
|
|
||||||
{
|
|
||||||
result = util->execCMDWithOutput(
|
|
||||||
"hf mf chk --"
|
|
||||||
+ cardType.typeText,
|
|
||||||
Util::ReturnTrigger(1000 + cardType.sector_size * 200, {"No valid", keyPattern_res->pattern()}));
|
|
||||||
qDebug() << "mf_chk_iceman_result" << result;
|
|
||||||
for(int i = 0; i < cardType.sector_size; i++)
|
|
||||||
{
|
|
||||||
reMatch = keyPattern_res->match(result, offset);
|
|
||||||
offset = reMatch.capturedStart();
|
|
||||||
if(reMatch.hasMatch())
|
|
||||||
{
|
|
||||||
data = reMatch.captured().toUpper();
|
|
||||||
offset += data.length();
|
|
||||||
QStringList cells = data.remove(" ").split("|");
|
|
||||||
if(cells[3] == "1")
|
|
||||||
{
|
|
||||||
keyAList->replace(i, cells[2]);
|
|
||||||
}
|
|
||||||
if(cells[5] == "1")
|
|
||||||
{
|
|
||||||
keyBList->replace(i, cells[4]);
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
|
||||||
data_syncWithKeyWidget();
|
data_syncWithKeyWidget();
|
||||||
}
|
}
|
||||||
|
|
||||||
void Mifare::nested()
|
void Mifare::nested(bool isStaticNested)
|
||||||
{
|
{
|
||||||
|
QVariantMap config = configMap["nested"].toMap();
|
||||||
|
QString cmd;
|
||||||
|
if(isStaticNested)
|
||||||
|
cmd = config["static cmd"].toString();
|
||||||
|
else
|
||||||
|
cmd = config["cmd"].toString();
|
||||||
|
int keyAindex = config["key A index"].toInt();
|
||||||
|
int keyBindex = config["key B index"].toInt();
|
||||||
|
QRegularExpression keyPattern = QRegularExpression(config["key pattern"].toString());
|
||||||
QRegularExpressionMatch reMatch;
|
QRegularExpressionMatch reMatch;
|
||||||
QString result;
|
QString result;
|
||||||
int offset = 0;
|
int offset = 0;
|
||||||
QString data;
|
QString data;
|
||||||
if(Util::getClientType() == Util::CLIENTTYPE_OFFICIAL)
|
|
||||||
|
cmd.replace("<card type>", config["card type"].toMap()[cardType.typeText].toString());
|
||||||
|
if(cmd.contains(QRegularExpression("<.+>"))) // need at least one section key
|
||||||
{
|
{
|
||||||
result = util->execCMDWithOutput(
|
QString knownKey, knownKeyType;
|
||||||
"hf mf nested "
|
int knownKeySector = -1;
|
||||||
+ QString::number(cardType.type)
|
|
||||||
+ " *",
|
|
||||||
Util::ReturnTrigger(15000, {"Can't found", "\\|000\\|"}));
|
|
||||||
}
|
|
||||||
else if(Util::getClientType() == Util::CLIENTTYPE_ICEMAN)
|
|
||||||
{
|
|
||||||
QString knownKeyInfo = "";
|
|
||||||
for(int i = 0; i < cardType.sector_size; i++)
|
for(int i = 0; i < cardType.sector_size; i++)
|
||||||
{
|
{
|
||||||
if(data_isKeyValid(keyAList->at(i)))
|
if(data_isKeyValid(keyAList->at(i)))
|
||||||
{
|
{
|
||||||
knownKeyInfo = " --blk " + QString::number(i * 4) + " -a -k " + keyAList->at(i);
|
knownKeyType = "A";
|
||||||
|
knownKey = keyAList->at(i);
|
||||||
|
knownKeySector = i;
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
else if(data_isKeyValid(keyBList->at(i)))
|
||||||
|
{
|
||||||
|
knownKeyType = "B";
|
||||||
|
knownKey = keyBList->at(i);
|
||||||
|
knownKeySector = i;
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if(knownKeyInfo == "")
|
if(knownKeySector != -1)
|
||||||
{
|
{
|
||||||
for(int i = 0; i < cardType.sector_size; i++)
|
cmd.replace("<block>", QString::number(cardType.blks[knownKeySector]));
|
||||||
{
|
cmd.replace("<key type>", config["key type"].toMap()[knownKeyType].toString());
|
||||||
if(data_isKeyValid(keyBList->at(i)))
|
cmd.replace("<key>", knownKey);
|
||||||
{
|
|
||||||
knownKeyInfo = " --blk " + QString::number(i * 4) + " -b -k " + keyBList->at(i);
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
if(knownKeyInfo != "")
|
|
||||||
{
|
|
||||||
result = util->execCMDWithOutput(
|
|
||||||
"hf mf nested --"
|
|
||||||
+ cardType.typeText
|
|
||||||
+ knownKeyInfo,
|
|
||||||
Util::ReturnTrigger(15000, {"Can't authenticate", keyPattern_res->pattern()}));
|
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
QMessageBox::information(parent, tr("Info"), tr("Plz provide at least one known key"));
|
QMessageBox::information(parent, tr("Info"), tr("Plz provide at least one known key"));
|
||||||
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
result = util->execCMDWithOutput(
|
||||||
|
cmd,
|
||||||
|
Util::ReturnTrigger(15000, {"Can't found", "Can't authenticate", keyPattern_res->pattern()}),
|
||||||
|
true);
|
||||||
|
|
||||||
|
if(result.contains("static") && !isStaticNested)
|
||||||
|
{
|
||||||
|
nested(true);
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
for(int i = 0; i < cardType.sector_size; i++)
|
for(int i = 0; i < cardType.sector_size; i++)
|
||||||
{
|
{
|
||||||
reMatch = keyPattern_res->match(result, offset);
|
reMatch = keyPattern.match(result, offset);
|
||||||
offset = reMatch.capturedStart();
|
offset = reMatch.capturedStart();
|
||||||
if(reMatch.hasMatch())
|
if(reMatch.hasMatch())
|
||||||
{
|
{
|
||||||
data = reMatch.captured().toUpper();
|
data = reMatch.captured().toUpper();
|
||||||
offset += data.length();
|
offset += data.length();
|
||||||
QStringList cells = data.remove(" ").split("|");
|
QStringList cells = data.remove(" ").split("|");
|
||||||
if(cells[3] == "1")
|
if(!cells[keyAindex].contains(QRegularExpression("[^0-9a-fA-F]")))
|
||||||
{
|
{
|
||||||
keyAList->replace(i, cells[2]);
|
keyAList->replace(i, cells[keyAindex]);
|
||||||
}
|
}
|
||||||
if(cells[5] == "1")
|
if(!cells[keyBindex].contains(QRegularExpression("[^0-9a-fA-F]")))
|
||||||
{
|
{
|
||||||
keyBList->replace(i, cells[4]);
|
keyBList->replace(i, cells[keyBindex]);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -252,7 +247,8 @@ void Mifare::nested()
|
|||||||
|
|
||||||
void Mifare::hardnested()
|
void Mifare::hardnested()
|
||||||
{
|
{
|
||||||
MF_Attack_hardnestedDialog dialog(cardType.block_size);
|
QVariantMap config = configMap["hardnested"].toMap();
|
||||||
|
MF_Attack_hardnestedDialog dialog(cardType.block_size, config);
|
||||||
connect(&dialog, &MF_Attack_hardnestedDialog::sendCMD, util, &Util::execCMD);
|
connect(&dialog, &MF_Attack_hardnestedDialog::sendCMD, util, &Util::execCMD);
|
||||||
if(dialog.exec() == QDialog::Accepted)
|
if(dialog.exec() == QDialog::Accepted)
|
||||||
Util::gotoRawTab();
|
Util::gotoRawTab();
|
||||||
@@ -260,40 +256,32 @@ void Mifare::hardnested()
|
|||||||
|
|
||||||
void Mifare::darkside()
|
void Mifare::darkside()
|
||||||
{
|
{
|
||||||
if(Util::getClientType() == Util::CLIENTTYPE_OFFICIAL)
|
QVariantMap config = configMap["darkside"].toMap();
|
||||||
util->execCMD("hf mf mifare");
|
util->execCMD(config["cmd"].toString());
|
||||||
else if(Util::getClientType() == Util::CLIENTTYPE_ICEMAN)
|
|
||||||
util->execCMD("hf mf darkside");
|
|
||||||
|
|
||||||
Util::gotoRawTab();
|
Util::gotoRawTab();
|
||||||
}
|
}
|
||||||
|
|
||||||
void Mifare::sniff()
|
void Mifare::sniff()
|
||||||
{
|
{
|
||||||
if(Util::getClientType() == Util::CLIENTTYPE_OFFICIAL)
|
QVariantMap config = configMap["sniff"].toMap();
|
||||||
util->execCMD("hf mf sniff");
|
util->execCMD(config["cmd"].toString());
|
||||||
else if(Util::getClientType() == Util::CLIENTTYPE_ICEMAN)
|
|
||||||
util->execCMD("hf sniff");
|
|
||||||
|
|
||||||
Util::gotoRawTab();
|
Util::gotoRawTab();
|
||||||
}
|
}
|
||||||
|
|
||||||
void Mifare::sniff14a()
|
void Mifare::sniff14a()
|
||||||
{
|
{
|
||||||
if(Util::getClientType() == Util::CLIENTTYPE_OFFICIAL)
|
QVariantMap config = configMap["sniff 14a"].toMap();
|
||||||
util->execCMD("hf 14a snoop");
|
util->execCMD(config["cmd"].toString());
|
||||||
else if(Util::getClientType() == Util::CLIENTTYPE_ICEMAN)
|
|
||||||
util->execCMD("hf 14a sniff");
|
|
||||||
|
|
||||||
Util::gotoRawTab();
|
Util::gotoRawTab();
|
||||||
}
|
}
|
||||||
|
|
||||||
void Mifare::list()
|
void Mifare::list()
|
||||||
{
|
{
|
||||||
if(Util::getClientType() == Util::CLIENTTYPE_OFFICIAL)
|
QVariantMap config = configMap["list"].toMap();
|
||||||
util->execCMD("hf list mf");
|
util->execCMD(config["cmd"].toString());
|
||||||
else if(Util::getClientType() == Util::CLIENTTYPE_ICEMAN)
|
|
||||||
util->execCMD("trace list -t mf");
|
|
||||||
|
|
||||||
Util::gotoRawTab();
|
Util::gotoRawTab();
|
||||||
}
|
}
|
||||||
@@ -305,24 +293,22 @@ 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(targetType == TARGET_MIFARE)
|
if(targetType == TARGET_MIFARE)
|
||||||
{
|
{
|
||||||
if(!data_isKeyValid(key))
|
if(!data_isKeyValid(key))
|
||||||
{
|
{
|
||||||
return "";
|
return "";
|
||||||
}
|
}
|
||||||
|
QVariantMap config = configMap["normal read block"].toMap();
|
||||||
|
QString cmd = config["cmd"].toString();
|
||||||
|
QRegularExpression dataPattern = QRegularExpression(config["data pattern"].toString());
|
||||||
|
cmd.replace("<block>", QString::number(blockId));
|
||||||
|
cmd.replace("<key type>", config["key type"].toMap()[QString((char)keyType)].toString());
|
||||||
|
cmd.replace("<key>", key);
|
||||||
// use the given key type to read the target block
|
// use the given key type to read the target block
|
||||||
result = util->execCMDWithOutput(
|
result = util->execCMDWithOutput(cmd, waitTime);
|
||||||
"hf mf rdbl "
|
|
||||||
+ QString::number(blockId)
|
currMatch = dataPattern.match(result);
|
||||||
+ " "
|
|
||||||
+ (char)keyType
|
|
||||||
+ " "
|
|
||||||
+ key,
|
|
||||||
waitTime);
|
|
||||||
currMatch = dataPattern->match(result);
|
|
||||||
if(currMatch.hasMatch())
|
if(currMatch.hasMatch())
|
||||||
{
|
{
|
||||||
data = currMatch.captured().toUpper();
|
data = currMatch.captured().toUpper();
|
||||||
@@ -349,11 +335,12 @@ QString Mifare::_readblk(int blockId, KeyType keyType, const QString& key, Targe
|
|||||||
}
|
}
|
||||||
else if(targetType == TARGET_UID)
|
else if(targetType == TARGET_UID)
|
||||||
{
|
{
|
||||||
result = util->execCMDWithOutput(
|
QVariantMap config = configMap["Magic Card read block"].toMap();
|
||||||
"hf mf cgetblk "
|
QString cmd = config["cmd"].toString();
|
||||||
+ QString::number(blockId),
|
QRegularExpression dataPattern = QRegularExpression(config["data pattern"].toString());
|
||||||
waitTime);
|
cmd.replace("<block>", QString::number(blockId));
|
||||||
currMatch = dataPattern->match(result);
|
result = util->execCMDWithOutput(cmd, waitTime);
|
||||||
|
currMatch = dataPattern.match(result);
|
||||||
if(currMatch.hasMatch())
|
if(currMatch.hasMatch())
|
||||||
{
|
{
|
||||||
data = currMatch.captured().toUpper();
|
data = currMatch.captured().toUpper();
|
||||||
@@ -362,36 +349,23 @@ QString Mifare::_readblk(int blockId, KeyType keyType, const QString& key, Targe
|
|||||||
else
|
else
|
||||||
data = "";
|
data = "";
|
||||||
}
|
}
|
||||||
}
|
else if(targetType == TARGET_EMULATOR)
|
||||||
if(Util::getClientType() == Util::CLIENTTYPE_OFFICIAL)
|
|
||||||
{
|
{
|
||||||
if(targetType == TARGET_EMULATOR)
|
QVariantMap config = configMap["emulator read block"].toMap();
|
||||||
{
|
QString cmd = config["cmd"].toString();
|
||||||
result = util->execCMDWithOutput(
|
QRegularExpression dataPattern = QRegularExpression(config["data pattern"].toString());
|
||||||
"hf mf eget "
|
cmd.replace("<block>", QString::number(blockId));
|
||||||
+ QString::number(blockId),
|
result = util->execCMDWithOutput(cmd, 150);
|
||||||
150);
|
data = dataPattern.match(result).captured().toUpper();
|
||||||
data = dataPattern->match(result).captured().toUpper();
|
|
||||||
data.remove(" ");
|
data.remove(" ");
|
||||||
}
|
}
|
||||||
}
|
|
||||||
else if(Util::getClientType() == Util::CLIENTTYPE_ICEMAN)
|
|
||||||
{
|
|
||||||
if(targetType == TARGET_EMULATOR)
|
|
||||||
{
|
|
||||||
result = util->execCMDWithOutput(
|
|
||||||
"hf mf egetblk "
|
|
||||||
+ QString::number(blockId),
|
|
||||||
150);
|
|
||||||
data = dataPattern->match(result).captured().toUpper();
|
|
||||||
data.remove(" ");
|
|
||||||
}
|
|
||||||
}
|
|
||||||
return data;
|
return data;
|
||||||
}
|
}
|
||||||
|
|
||||||
QStringList Mifare::_readsec(int sectorId, KeyType keyType, const QString& key, TargetType targetType, int waitTime)
|
QStringList Mifare::_readsec(int sectorId, KeyType keyType, const QString& key, TargetType targetType, int waitTime)
|
||||||
{
|
{
|
||||||
|
QVariantMap config;
|
||||||
QStringList data;
|
QStringList data;
|
||||||
QString result, tmp;
|
QString result, tmp;
|
||||||
QRegularExpressionMatch reMatch;
|
QRegularExpressionMatch reMatch;
|
||||||
@@ -402,8 +376,6 @@ 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)
|
|
||||||
{
|
|
||||||
// try to read all blocks together
|
// try to read all blocks together
|
||||||
if(targetType == TARGET_MIFARE)
|
if(targetType == TARGET_MIFARE)
|
||||||
{
|
{
|
||||||
@@ -411,29 +383,37 @@ QStringList Mifare::_readsec(int sectorId, KeyType keyType, const QString& key,
|
|||||||
{
|
{
|
||||||
return data;
|
return data;
|
||||||
}
|
}
|
||||||
result = util->execCMDWithOutput(
|
config = configMap["normal read sector"].toMap();
|
||||||
"hf mf rdsc "
|
QString cmd = config["cmd"].toString();
|
||||||
+ QString::number(sectorId)
|
cmd.replace("<sector>", QString::number(sectorId));
|
||||||
+ " "
|
cmd.replace("<key type>", config["key type"].toMap()[QString((char)keyType)].toString());
|
||||||
+ (char)keyType
|
cmd.replace("<key>", key);
|
||||||
+ " "
|
result = util->execCMDWithOutput(cmd, waitTime);
|
||||||
+ key,
|
|
||||||
waitTime);
|
|
||||||
offset = result.indexOf("isOk:01"); // find successful flag
|
|
||||||
}
|
}
|
||||||
else if(targetType == TARGET_UID)
|
else if(targetType == TARGET_UID)
|
||||||
{
|
{
|
||||||
result = util->execCMDWithOutput(
|
config = configMap["Magic Card read sector"].toMap();
|
||||||
"hf mf cgetsc "
|
QString cmd = config["cmd"].toString();
|
||||||
+ QString::number(sectorId),
|
cmd.replace("<sector>", QString::number(sectorId));
|
||||||
waitTime);
|
result = util->execCMDWithOutput(cmd, waitTime);
|
||||||
offset = result.indexOf("error") == -1 ? 0 : -1; // find failed flag
|
|
||||||
}
|
}
|
||||||
if(offset != -1)
|
else if(targetType == TARGET_EMULATOR)
|
||||||
|
{
|
||||||
|
for(int i = 0; i < cardType.blk[sectorId]; i++)
|
||||||
|
data[i] = _readblk(cardType.blks[sectorId] + i, keyType, key, targetType, waitTime);
|
||||||
|
return data;
|
||||||
|
}
|
||||||
|
|
||||||
|
// for TARGET_MIFARE and TARGET_UID
|
||||||
|
// if targetType == TARGET_EMULATOR, this function has returned
|
||||||
|
QRegularExpression dataPattern = QRegularExpression(config["data pattern"].toString());
|
||||||
|
reMatch = dataPattern.match(result);
|
||||||
|
offset = reMatch.capturedStart();
|
||||||
|
if(reMatch.hasMatch()) // read successful
|
||||||
{
|
{
|
||||||
for(int i = 0; i < cardType.blk[sectorId]; i++)
|
for(int i = 0; i < cardType.blk[sectorId]; i++)
|
||||||
{
|
{
|
||||||
reMatch = dataPattern->match(result, offset);
|
reMatch = dataPattern.match(result, offset);
|
||||||
offset = reMatch.capturedStart();
|
offset = reMatch.capturedStart();
|
||||||
if(reMatch.hasMatch())
|
if(reMatch.hasMatch())
|
||||||
{
|
{
|
||||||
@@ -444,13 +424,11 @@ QStringList Mifare::_readsec(int sectorId, KeyType keyType, const QString& key,
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
// if failed, try to read them seperately.
|
// when one of the block cannot be read, the rdsc will return nothing, so you need to read the rest of blocks manually
|
||||||
// (when one of the block cannot be read, the rdsc will return nothing, so you need to read the rest of blocks manually)
|
// the following rdbl operation is not handled there, for better speed(rdsc_A->rdsc_B->rdbl0~3)
|
||||||
else if(targetType == TARGET_UID || targetType == TARGET_EMULATOR) // if the targetType is Chinese Magic Card, then the result implies the backdoor command is invalid.
|
else if(targetType == TARGET_UID) // treat as MIFARE
|
||||||
{
|
data = _readsec(sectorId, keyType, key, TARGET_MIFARE, waitTime);
|
||||||
for(int i = 0; i < cardType.blk[sectorId]; i++)
|
|
||||||
data[i] = _readblk(cardType.blks[sectorId] + i, keyType, key, targetType, waitTime);
|
|
||||||
}
|
|
||||||
|
|
||||||
//process trailer(like _readblk())
|
//process trailer(like _readblk())
|
||||||
QString trailer = data[cardType.blk[sectorId] - 1];
|
QString trailer = data[cardType.blk[sectorId] - 1];
|
||||||
@@ -472,7 +450,7 @@ QStringList Mifare::_readsec(int sectorId, KeyType keyType, const QString& key,
|
|||||||
}
|
}
|
||||||
data[cardType.blk[sectorId] - 1] = trailer;
|
data[cardType.blk[sectorId] - 1] = trailer;
|
||||||
}
|
}
|
||||||
}
|
|
||||||
return data;
|
return data;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -493,7 +471,6 @@ void Mifare::readOne(TargetType targetType)
|
|||||||
|
|
||||||
void Mifare::readSelected(TargetType targetType)
|
void Mifare::readSelected(TargetType targetType)
|
||||||
{
|
{
|
||||||
QStringList data, dataA, dataB;
|
|
||||||
QString trailerA, trailerB;
|
QString trailerA, trailerB;
|
||||||
QList<bool> selectedSectors;
|
QList<bool> selectedSectors;
|
||||||
QList<int> selectedBlocks;
|
QList<int> selectedBlocks;
|
||||||
@@ -513,12 +490,11 @@ void Mifare::readSelected(TargetType targetType)
|
|||||||
}
|
}
|
||||||
|
|
||||||
for(int i = 0; i < cardType.sector_size; i++)
|
for(int i = 0; i < cardType.sector_size; i++)
|
||||||
{
|
|
||||||
{
|
{
|
||||||
if(!selectedSectors[i])
|
if(!selectedSectors[i])
|
||||||
{
|
|
||||||
continue;
|
continue;
|
||||||
}
|
|
||||||
|
QStringList data, dataA, dataB;
|
||||||
for(int j = 0; j < cardType.blk[i]; j++)
|
for(int j = 0; j < cardType.blk[i]; j++)
|
||||||
{
|
{
|
||||||
// dataA is always filled with "" because of the _readsec()
|
// dataA is always filled with "" because of the _readsec()
|
||||||
@@ -529,24 +505,41 @@ void Mifare::readSelected(TargetType targetType)
|
|||||||
dataA = _readsec(i, Mifare::KEY_A, keyAList->at(i), targetType);
|
dataA = _readsec(i, Mifare::KEY_A, keyAList->at(i), targetType);
|
||||||
|
|
||||||
// in other situations, the key doesn't matters
|
// in other situations, the key doesn't matters
|
||||||
|
// so the dataA is the final result
|
||||||
|
//
|
||||||
|
// if the targetType is TARGET_MIFARE and the dataA has unknown part, try to read by keyB
|
||||||
if(targetType == TARGET_MIFARE && (dataA.contains("") || dataA[cardType.blk[i] - 1].right(12) == "????????????"))
|
if(targetType == TARGET_MIFARE && (dataA.contains("") || dataA[cardType.blk[i] - 1].right(12) == "????????????"))
|
||||||
dataB = _readsec(i, Mifare::KEY_B, keyBList->at(i), targetType);
|
dataB = _readsec(i, Mifare::KEY_B, keyBList->at(i), targetType);
|
||||||
|
|
||||||
|
// process trailer block seperately
|
||||||
|
if(dataA[cardType.blk[i] - 1] == "" && selectedBlocks.contains(getTrailerBlockId(i)))
|
||||||
|
dataA[cardType.blk[i] - 1] = _readblk(getTrailerBlockId(i), Mifare::KEY_A, keyAList->at(i), targetType);
|
||||||
|
if(dataB[cardType.blk[i] - 1] == "" && dataA[cardType.blk[i] - 1].right(12) == "????????????" && selectedBlocks.contains(getTrailerBlockId(i)))
|
||||||
|
dataB[cardType.blk[i] - 1] = _readblk(getTrailerBlockId(i), Mifare::KEY_B, keyBList->at(i), targetType);
|
||||||
|
|
||||||
|
|
||||||
for(int j = 0; j < cardType.blk[i]; j++)
|
for(int j = 0; j < cardType.blk[i]; j++)
|
||||||
{
|
{
|
||||||
if(dataA[j] != "")
|
if(dataA[j] != "")
|
||||||
data[j] = dataA[j];
|
data[j] = dataA[j];
|
||||||
else
|
else
|
||||||
data[j] = dataB[j];
|
data[j] = dataB[j];
|
||||||
|
|
||||||
|
if(data[j] == "" && selectedBlocks.contains(cardType.blks[i] + j)) // try rdbl seperately
|
||||||
|
{
|
||||||
|
data[j] = _readblk(cardType.blks[i] + j, Mifare::KEY_A, keyAList->at(i), targetType);
|
||||||
|
if(data[j] == "")
|
||||||
|
data[j] = _readblk(cardType.blks[i] + j, Mifare::KEY_B, keyBList->at(i), targetType);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// process trailer block seperately
|
// process trailer block seperately
|
||||||
trailerA = dataA[cardType.blk[i] - 1];
|
trailerA = dataA[cardType.blk[i] - 1];
|
||||||
trailerB = dataB[cardType.blk[i] - 1];
|
trailerB = dataB[cardType.blk[i] - 1];
|
||||||
if(trailerA != "" && trailerB != "")
|
if(trailerA != "" && trailerB != "") // if KeyA and KeyB can both read the trailer, then concat them
|
||||||
{
|
{
|
||||||
QString ACbits = trailerA.mid(12, 8);
|
QString ACbits = trailerA.mid(12, 8);
|
||||||
QString key_A = trailerA.left(12);
|
QString key_A = trailerA.left(12); // KeyA cannot be read by KeyB
|
||||||
QString key_B = trailerA.at(31) != '?' ? trailerA.right(12) : trailerB.right(12);
|
QString key_B = trailerA.at(31) != '?' ? trailerA.right(12) : trailerB.right(12);
|
||||||
data[cardType.blk[i] - 1] = key_A + ACbits + key_B;
|
data[cardType.blk[i] - 1] = key_A + ACbits + key_B;
|
||||||
}
|
}
|
||||||
@@ -560,7 +553,7 @@ void Mifare::readSelected(TargetType targetType)
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if(selectedBlocks.contains(cardType.blks[i] + cardType.blk[i] - 1))
|
if(selectedBlocks.contains(getTrailerBlockId(i)))
|
||||||
{
|
{
|
||||||
// data widget has been updated, so this is just a temporary varient.
|
// data widget has been updated, so this is just a temporary varient.
|
||||||
if(data[cardType.blk[i] - 1] == "")
|
if(data[cardType.blk[i] - 1] == "")
|
||||||
@@ -574,8 +567,6 @@ void Mifare::readSelected(TargetType targetType)
|
|||||||
data_syncWithKeyWidget(false, i, KEY_A);
|
data_syncWithKeyWidget(false, i, KEY_A);
|
||||||
data_syncWithKeyWidget(false, i, KEY_B);
|
data_syncWithKeyWidget(false, i, KEY_B);
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -588,45 +579,57 @@ 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(targetType == TARGET_MIFARE)
|
if(targetType == TARGET_MIFARE)
|
||||||
{
|
{
|
||||||
if(!data_isKeyValid(key))
|
if(!data_isKeyValid(key))
|
||||||
return false;
|
return false;
|
||||||
result = util->execCMDWithOutput(
|
QVariantMap config = configMap["normal write block"].toMap();
|
||||||
"hf mf wrbl "
|
QString cmd = config["cmd"].toString();
|
||||||
+ QString::number(blockId)
|
cmd.replace("<block>", QString::number(blockId));
|
||||||
+ " "
|
cmd.replace("<key type>", config["key type"].toMap()[QString((char)keyType)].toString());
|
||||||
+ (char)keyType
|
cmd.replace("<key>", key);
|
||||||
+ " "
|
cmd.replace("<data>", input);
|
||||||
+ key
|
result = util->execCMDWithOutput(cmd, waitTime);
|
||||||
+ " "
|
if(result.isEmpty())
|
||||||
+ input,
|
return false;
|
||||||
waitTime);
|
|
||||||
return (result.indexOf("isOk:01") != -1);
|
QVariantList failedFlag = config["failed flag"].toJsonArray().toVariantList();
|
||||||
|
for(auto flag = failedFlag.begin(); flag != failedFlag.end(); flag++)
|
||||||
|
{
|
||||||
|
if(result.contains(flag->toString()))
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
return true;
|
||||||
}
|
}
|
||||||
else if(targetType == TARGET_UID)
|
else if(targetType == TARGET_UID)
|
||||||
{
|
{
|
||||||
result = util->execCMDWithOutput(
|
QVariantMap config = configMap["Magic Card write block"].toMap();
|
||||||
"hf mf csetblk "
|
QString cmd = config["cmd"].toString();
|
||||||
+ QString::number(blockId)
|
cmd.replace("<block>", QString::number(blockId));
|
||||||
+ " "
|
cmd.replace("<data>", input);
|
||||||
+ input,
|
result = util->execCMDWithOutput(cmd, waitTime);
|
||||||
waitTime);
|
if(result.isEmpty())
|
||||||
return (result.indexOf("error") == -1); // failed flag
|
return false;
|
||||||
|
|
||||||
|
QVariantList failedFlag = config["failed flag"].toJsonArray().toVariantList();
|
||||||
|
for(auto flag = failedFlag.begin(); flag != failedFlag.end(); flag++)
|
||||||
|
{
|
||||||
|
if(result.contains(flag->toString()))
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
return true;
|
||||||
}
|
}
|
||||||
else if(targetType == TARGET_EMULATOR)
|
else if(targetType == TARGET_EMULATOR)
|
||||||
{
|
{
|
||||||
util->execCMD(
|
QVariantMap config = configMap["emulator write block"].toMap();
|
||||||
"hf mf eset "
|
QString cmd = config["cmd"].toString();
|
||||||
+ QString::number(blockId)
|
cmd.replace("<block>", QString::number(blockId));
|
||||||
+ " "
|
cmd.replace("<data>", input);
|
||||||
+ input);
|
util->execCMD(cmd);
|
||||||
util->delay(5);
|
util->delay(5);
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
}
|
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -740,50 +743,40 @@ void Mifare::writeSelected(TargetType targetType)
|
|||||||
|
|
||||||
void Mifare::dump()
|
void Mifare::dump()
|
||||||
{
|
{
|
||||||
if(Util::getClientType() == Util::CLIENTTYPE_OFFICIAL || Util::getClientType() == Util::CLIENTTYPE_ICEMAN)
|
QVariantMap config = configMap["dump"].toMap();
|
||||||
util->execCMD("hf mf dump");
|
util->execCMD(config["cmd"].toString());
|
||||||
Util::gotoRawTab();
|
Util::gotoRawTab();
|
||||||
}
|
}
|
||||||
|
|
||||||
void Mifare::restore()
|
void Mifare::restore()
|
||||||
{
|
{
|
||||||
if(Util::getClientType() == Util::CLIENTTYPE_OFFICIAL || Util::getClientType() == Util::CLIENTTYPE_ICEMAN)
|
QVariantMap config = configMap["restore"].toMap();
|
||||||
util->execCMD("hf mf restore");
|
util->execCMD(config["cmd"].toString());
|
||||||
Util::gotoRawTab();
|
Util::gotoRawTab();
|
||||||
}
|
}
|
||||||
|
|
||||||
void Mifare::wipeC()
|
void Mifare::wipeC()
|
||||||
{
|
{
|
||||||
if(Util::getClientType() == Util::CLIENTTYPE_OFFICIAL)
|
QVariantMap config = configMap["Magic Card wipe"].toMap();
|
||||||
{
|
QString cmd = config["cmd"].toString();
|
||||||
util->execCMD(
|
if(cmd.contains("<card type>"))
|
||||||
"hf mf cwipe "
|
cmd.replace("<card type>", config["card type"].toMap()[cardType.typeText].toString());
|
||||||
+ QString::number(cardType.type)
|
util->execCMD(cmd);
|
||||||
+ " f");
|
|
||||||
}
|
|
||||||
else if(Util::getClientType() == Util::CLIENTTYPE_ICEMAN)
|
|
||||||
{
|
|
||||||
util->execCMD("hf mf cwipe");
|
|
||||||
}
|
|
||||||
Util::gotoRawTab();
|
Util::gotoRawTab();
|
||||||
}
|
}
|
||||||
|
|
||||||
void Mifare::setParameterC()
|
void Mifare::setParameterC()
|
||||||
{
|
{
|
||||||
QString result = info(true);
|
QVariantMap config = configMap["Magic Card set parameter"].toMap();
|
||||||
if(result == "")
|
QMap<QString, QString> result = info(true);
|
||||||
|
if(result.isEmpty())
|
||||||
|
{
|
||||||
QMessageBox::information(parent, tr("Info"), tr("Failed to read card."));
|
QMessageBox::information(parent, tr("Info"), tr("Failed to read card."));
|
||||||
|
return;
|
||||||
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
result.replace("\r\n", "");
|
MF_UID_parameterDialog dialog(result["UID"].toUpper(), result["ATQA"].toUpper(), result["SAK"].toUpper(), config);
|
||||||
result.replace(QRegularExpression("\\[.\\]"), "");
|
|
||||||
result.replace("UID", "");
|
|
||||||
result.replace("ATQA", "");
|
|
||||||
result.replace("SAK", "");
|
|
||||||
result.replace(" ", "");
|
|
||||||
QStringList lis = result.split(':');
|
|
||||||
qDebug() << lis;
|
|
||||||
MF_UID_parameterDialog dialog(lis[1].toUpper(), lis[2].toUpper(), lis[3].toUpper());
|
|
||||||
connect(&dialog, &MF_UID_parameterDialog::sendCMD, util, &Util::execCMD);
|
connect(&dialog, &MF_UID_parameterDialog::sendCMD, util, &Util::execCMD);
|
||||||
if(dialog.exec() == QDialog::Accepted)
|
if(dialog.exec() == QDialog::Accepted)
|
||||||
Util::gotoRawTab();
|
Util::gotoRawTab();
|
||||||
@@ -792,30 +785,20 @@ void Mifare::setParameterC()
|
|||||||
|
|
||||||
void Mifare::lockC()
|
void Mifare::lockC()
|
||||||
{
|
{
|
||||||
if(Util::getClientType() == Util::CLIENTTYPE_OFFICIAL)
|
QVariantMap config = configMap["Magic Card lock"].toMap();
|
||||||
|
QString cmd = config["cmd"].toString();
|
||||||
|
QVariantList list = config["sequence"].toJsonArray().toVariantList();
|
||||||
|
for(auto item = list.begin(); item != list.end(); item++)
|
||||||
{
|
{
|
||||||
util->execCMD("hf 14a raw -pa -b7 40");
|
qDebug() << cmd + item->toString();
|
||||||
util->execCMD("hf 14a raw -pa 43");
|
util->execCMD(cmd + item->toString());
|
||||||
util->execCMD("hf 14a raw -pa E0 00 39 F7");
|
|
||||||
util->execCMD("hf 14a raw -pa E1 00 E1 EE");
|
|
||||||
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");
|
|
||||||
}
|
|
||||||
else if(Util::getClientType() == Util::CLIENTTYPE_ICEMAN)
|
|
||||||
{
|
|
||||||
util->execCMD("hf 14a raw -ak -b 7 40");
|
|
||||||
util->execCMD("hf 14a raw -ak 43");
|
|
||||||
util->execCMD("hf 14a raw -ak E0 00 39 F7");
|
|
||||||
util->execCMD("hf 14a raw -ak E1 00 E1 EE");
|
|
||||||
util->execCMD("hf 14a raw -ak 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");
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
void Mifare::wipeE()
|
void Mifare::wipeE()
|
||||||
{
|
{
|
||||||
if(Util::getClientType() == Util::CLIENTTYPE_OFFICIAL || Util::getClientType() == Util::CLIENTTYPE_ICEMAN)
|
QVariantMap config = configMap["emulator wipe"].toMap();
|
||||||
util->execCMD("hf mf eclr");
|
util->execCMD(config["cmd"].toString());
|
||||||
}
|
}
|
||||||
|
|
||||||
void Mifare::simulate()
|
void Mifare::simulate()
|
||||||
@@ -828,12 +811,17 @@ void Mifare::simulate()
|
|||||||
|
|
||||||
void Mifare::loadSniff(const QString& file)
|
void Mifare::loadSniff(const QString& file)
|
||||||
{
|
{
|
||||||
if(Util::getClientType() == Util::CLIENTTYPE_OFFICIAL)
|
QVariantMap config = configMap["load sniff"].toMap();
|
||||||
util->execCMD("hf list mf -l " + file);
|
QString cmd = config["cmd"].toString();
|
||||||
else if(Util::getClientType() == Util::CLIENTTYPE_ICEMAN)
|
cmd.replace("<filename>", file);
|
||||||
|
if(config.contains("show cmd"))
|
||||||
{
|
{
|
||||||
if(util->execCMDWithOutput("trace load -f " + file, Util::ReturnTrigger({"loaded"})) != "")
|
if(util->execCMDWithOutput(cmd, Util::ReturnTrigger({"loaded"})) != "")
|
||||||
util->execCMD("trace list -t mf");
|
util->execCMD(config["show cmd"].toString());
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
util->execCMD(cmd);
|
||||||
}
|
}
|
||||||
|
|
||||||
Util::gotoRawTab();
|
Util::gotoRawTab();
|
||||||
@@ -841,10 +829,10 @@ void Mifare::loadSniff(const QString& file)
|
|||||||
|
|
||||||
void Mifare::saveSniff(const QString& file)
|
void Mifare::saveSniff(const QString& file)
|
||||||
{
|
{
|
||||||
if(Util::getClientType() == Util::CLIENTTYPE_OFFICIAL)
|
QVariantMap config = configMap["save sniff"].toMap();
|
||||||
util->execCMD("hf list mf -s " + file);
|
QString cmd = config["cmd"].toString();
|
||||||
else if(Util::getClientType() == Util::CLIENTTYPE_ICEMAN)
|
cmd.replace("<filename>", file);
|
||||||
util->execCMD("trace save -f " + file);
|
util->execCMD(cmd);
|
||||||
|
|
||||||
Util::gotoRawTab();
|
Util::gotoRawTab();
|
||||||
}
|
}
|
||||||
@@ -860,11 +848,11 @@ void Mifare::data_syncWithDataWidget(bool syncAll, int block)
|
|||||||
tmp = "";
|
tmp = "";
|
||||||
if(dataList->at(i) != "")
|
if(dataList->at(i) != "")
|
||||||
{
|
{
|
||||||
tmp += dataList->at(i).mid(0, 2);
|
tmp += dataList->at(i).midRef(0, 2);
|
||||||
for(int j = 1; j < 16; j++)
|
for(int j = 1; j < 16; j++)
|
||||||
{
|
{
|
||||||
tmp += " ";
|
tmp += " ";
|
||||||
tmp += dataList->at(i).mid(j * 2, 2);
|
tmp += dataList->at(i).midRef(j * 2, 2);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
ui->MF_dataWidget->item(i, 2)->setText(tmp);
|
ui->MF_dataWidget->item(i, 2)->setText(tmp);
|
||||||
@@ -875,11 +863,11 @@ void Mifare::data_syncWithDataWidget(bool syncAll, int block)
|
|||||||
tmp = "";
|
tmp = "";
|
||||||
if(dataList->at(block) != "")
|
if(dataList->at(block) != "")
|
||||||
{
|
{
|
||||||
tmp += dataList->at(block).mid(0, 2);
|
tmp += dataList->at(block).midRef(0, 2);
|
||||||
for(int j = 1; j < 16; j++)
|
for(int j = 1; j < 16; j++)
|
||||||
{
|
{
|
||||||
tmp += " ";
|
tmp += " ";
|
||||||
tmp += dataList->at(block).mid(j * 2, 2);
|
tmp += dataList->at(block).midRef(j * 2, 2);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
ui->MF_dataWidget->item(block, 2)->setText(tmp);
|
ui->MF_dataWidget->item(block, 2)->setText(tmp);
|
||||||
@@ -1052,7 +1040,7 @@ bool Mifare::data_loadDataFile(const QString& filename)
|
|||||||
else
|
else
|
||||||
{
|
{
|
||||||
QString tmp = buff.left(cardType.block_size * 34);
|
QString tmp = buff.left(cardType.block_size * 34);
|
||||||
QStringList tmpList = tmp.split("\r\n");
|
QStringList tmpList = tmp.split("\n");
|
||||||
for(int i = 0; i < cardType.block_size; i++)
|
for(int i = 0; i < cardType.block_size; i++)
|
||||||
{
|
{
|
||||||
dataList->replace(i, tmpList[i].toUpper());
|
dataList->replace(i, tmpList[i].toUpper());
|
||||||
@@ -1090,7 +1078,7 @@ bool Mifare::data_loadKeyFile(const QString& filename)
|
|||||||
{
|
{
|
||||||
for(int i = 0; i < cardType.sector_size; i++)
|
for(int i = 0; i < cardType.sector_size; i++)
|
||||||
{
|
{
|
||||||
int blk = cardType.blks[i] + cardType.blk[i] - 1;
|
int blk = getTrailerBlockId(i);
|
||||||
QString tmp = bin2text(buff, blk, 16);
|
QString tmp = bin2text(buff, blk, 16);
|
||||||
keyAList->replace(i, tmp.left(12).toUpper());
|
keyAList->replace(i, tmp.left(12).toUpper());
|
||||||
keyBList->replace(i, tmp.right(12).toUpper());
|
keyBList->replace(i, tmp.right(12).toUpper());
|
||||||
@@ -1155,7 +1143,7 @@ bool Mifare::data_saveDataFile(const QString& filename, bool isBin)
|
|||||||
for(int i = 0; i < cardType.block_size; i++)
|
for(int i = 0; i < cardType.block_size; i++)
|
||||||
{
|
{
|
||||||
buff += dataList->at(i);
|
buff += dataList->at(i);
|
||||||
buff += "\r\n";
|
buff += "\n";
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
bool ret = file.write(buff) != -1;
|
bool ret = file.write(buff) != -1;
|
||||||
@@ -1230,17 +1218,17 @@ void Mifare::data_key2Data()
|
|||||||
else
|
else
|
||||||
tmp += "????????????";
|
tmp += "????????????";
|
||||||
|
|
||||||
if(dataList->at(cardType.blks[i] + cardType.blk[i] - 1) == "")
|
if(dataList->at(getTrailerBlockId(i)) == "")
|
||||||
tmp += "FF078069"; // default control bytes
|
tmp += "FF078069"; // default control bytes
|
||||||
else
|
else
|
||||||
tmp += dataList->at(cardType.blks[i] + cardType.blk[i] - 1).mid(12, 8);
|
tmp += dataList->at(getTrailerBlockId(i)).midRef(12, 8);
|
||||||
|
|
||||||
if(data_isKeyValid(keyBList->at(i)))
|
if(data_isKeyValid(keyBList->at(i)))
|
||||||
tmp += keyBList->at(i);
|
tmp += keyBList->at(i);
|
||||||
else
|
else
|
||||||
tmp += "????????????";
|
tmp += "????????????";
|
||||||
|
|
||||||
dataList->replace(cardType.blks[i] + cardType.blk[i] - 1, tmp);
|
dataList->replace(getTrailerBlockId(i), tmp);
|
||||||
data_syncWithDataWidget();
|
data_syncWithDataWidget();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -1249,15 +1237,15 @@ void Mifare::data_data2Key()
|
|||||||
{
|
{
|
||||||
for(int i = 0; i < cardType.sector_size; i++)
|
for(int i = 0; i < cardType.sector_size; i++)
|
||||||
{
|
{
|
||||||
if(dataList->at(cardType.blks[i] + cardType.blk[i] - 1) == "")
|
if(dataList->at(getTrailerBlockId(i)) == "")
|
||||||
{
|
{
|
||||||
keyAList->replace(i, "????????????");
|
keyAList->replace(i, "????????????");
|
||||||
keyBList->replace(i, "????????????");
|
keyBList->replace(i, "????????????");
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
keyAList->replace(i, dataList->at(cardType.blks[i] + cardType.blk[i] - 1).left(12));
|
keyAList->replace(i, dataList->at(getTrailerBlockId(i)).left(12));
|
||||||
keyBList->replace(i, dataList->at(cardType.blks[i] + cardType.blk[i] - 1).right(12));
|
keyBList->replace(i, dataList->at(getTrailerBlockId(i)).right(12));
|
||||||
}
|
}
|
||||||
data_syncWithKeyWidget();
|
data_syncWithKeyWidget();
|
||||||
}
|
}
|
||||||
@@ -1348,3 +1336,18 @@ QString Mifare::data_getUID()
|
|||||||
else
|
else
|
||||||
return "";
|
return "";
|
||||||
}
|
}
|
||||||
|
|
||||||
|
quint16 Mifare::getTrailerBlockId(quint8 sectorId, qint8 cardTypeId)
|
||||||
|
{
|
||||||
|
if(cardTypeId == 0)
|
||||||
|
return (card_mini.blks[sectorId] + card_mini.blk[sectorId] - 1);
|
||||||
|
else if(cardTypeId == 1)
|
||||||
|
return (card_1k.blks[sectorId] + card_1k.blk[sectorId] - 1);
|
||||||
|
else if(cardTypeId == 2)
|
||||||
|
return (card_2k.blks[sectorId] + card_2k.blk[sectorId] - 1);
|
||||||
|
else if(cardTypeId == 4)
|
||||||
|
return (card_4k.blks[sectorId] + card_4k.blk[sectorId] - 1);
|
||||||
|
else
|
||||||
|
// other cardTypeId: use current cardtype(include default -1)
|
||||||
|
return (cardType.blks[sectorId] + cardType.blk[sectorId] - 1);
|
||||||
|
}
|
||||||
|
|||||||
@@ -11,6 +11,7 @@
|
|||||||
#include <QStringList>
|
#include <QStringList>
|
||||||
#include <QRegularExpression>
|
#include <QRegularExpression>
|
||||||
#include <QMessageBox>
|
#include <QMessageBox>
|
||||||
|
#include <QJsonObject>
|
||||||
class Mifare : public QObject
|
class Mifare : public QObject
|
||||||
{
|
{
|
||||||
Q_OBJECT
|
Q_OBJECT
|
||||||
@@ -64,9 +65,9 @@ public:
|
|||||||
static const AccessType trailerReadCondition[8][3];
|
static const AccessType trailerReadCondition[8][3];
|
||||||
static const AccessType trailerWriteCondition[8][3];
|
static const AccessType trailerWriteCondition[8][3];
|
||||||
|
|
||||||
QString info(bool isRequiringOutput = false);
|
QMap<QString, QString> info(bool isRequiringOutput = false);
|
||||||
void chk();
|
void chk();
|
||||||
void nested();
|
void nested(bool isStaticNested = false);
|
||||||
void darkside();
|
void darkside();
|
||||||
void hardnested();
|
void hardnested();
|
||||||
void sniff();
|
void sniff();
|
||||||
@@ -112,6 +113,8 @@ public:
|
|||||||
static int data_b2s(int block);
|
static int data_b2s(int block);
|
||||||
static bool data_isACBitsValid(const QString& text, QList<quint8> *returnHalfBytes = nullptr);
|
static bool data_isACBitsValid(const QString& text, QList<quint8> *returnHalfBytes = nullptr);
|
||||||
QString data_getUID();
|
QString data_getUID();
|
||||||
|
quint16 getTrailerBlockId(quint8 sectorId, qint8 cardTypeId = -1); // -1: use current cardtype
|
||||||
|
void setConfigMap(const QVariantMap& configMap);
|
||||||
public slots:
|
public slots:
|
||||||
signals:
|
signals:
|
||||||
|
|
||||||
@@ -120,6 +123,8 @@ private:
|
|||||||
Ui::MainWindow *ui;
|
Ui::MainWindow *ui;
|
||||||
Util* util;
|
Util* util;
|
||||||
|
|
||||||
|
QVariantMap configMap;
|
||||||
|
|
||||||
QStringList* keyAList;
|
QStringList* keyAList;
|
||||||
QStringList* keyBList;
|
QStringList* keyBList;
|
||||||
QStringList* dataList;
|
QStringList* dataList;
|
||||||
|
|||||||
@@ -1,6 +1,8 @@
|
|||||||
#include "mainwindow.h"
|
#include "mainwindow.h"
|
||||||
#include "ui_mainwindow.h"
|
#include "ui_mainwindow.h"
|
||||||
|
|
||||||
|
#include <QJsonDocument>
|
||||||
|
|
||||||
MainWindow::MainWindow(QWidget *parent):
|
MainWindow::MainWindow(QWidget *parent):
|
||||||
QMainWindow(parent)
|
QMainWindow(parent)
|
||||||
, ui(new Ui::MainWindow)
|
, ui(new Ui::MainWindow)
|
||||||
@@ -70,6 +72,22 @@ MainWindow::~MainWindow()
|
|||||||
delete pm3Thread;
|
delete pm3Thread;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void MainWindow::loadConfig()
|
||||||
|
{
|
||||||
|
QFile configList(ui->Set_Client_configPathEdit->text());
|
||||||
|
if(!configList.open(QFile::ReadOnly | QFile::Text))
|
||||||
|
{
|
||||||
|
QMessageBox::information(this, tr("Info"), tr("Failed to load config file"));
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
QByteArray configData = configList.readAll();
|
||||||
|
QJsonDocument configJson(QJsonDocument::fromJson(configData));
|
||||||
|
mifare->setConfigMap(configJson.object()["mifare classic"].toObject().toVariantMap());
|
||||||
|
lf->setConfigMap(configJson.object()["lf"].toObject().toVariantMap());
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
void MainWindow::initUI() // will be called by main.app
|
void MainWindow::initUI() // will be called by main.app
|
||||||
{
|
{
|
||||||
ui->retranslateUi(this);
|
ui->retranslateUi(this);
|
||||||
@@ -108,7 +126,7 @@ void MainWindow::on_PM3_connectButton_clicked()
|
|||||||
// on RRG repo, if no port is specified, the client will search the available port
|
// on RRG repo, if no port is specified, the client will search the available port
|
||||||
if(port == "" && startArgs.contains("<port>")) // has <port>, no port
|
if(port == "" && startArgs.contains("<port>")) // has <port>, no port
|
||||||
{
|
{
|
||||||
QMessageBox::information(NULL, tr("Info"), tr("Plz choose a port first"), QMessageBox::Ok);
|
QMessageBox::information(this, tr("Info"), tr("Plz choose a port first"), QMessageBox::Ok);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -123,20 +141,36 @@ void MainWindow::on_PM3_connectButton_clicked()
|
|||||||
if(envScriptPath.exists())
|
if(envScriptPath.exists())
|
||||||
{
|
{
|
||||||
qDebug() << envScriptPath.absoluteFilePath();
|
qDebug() << envScriptPath.absoluteFilePath();
|
||||||
|
// use the shell session to keep the environment then read it
|
||||||
#ifdef Q_OS_WIN
|
#ifdef Q_OS_WIN
|
||||||
// cmd /c "<path>">>nul && set
|
// cmd /c "<path>">>nul && set
|
||||||
envSetProcess.start("cmd /c \"" + envScriptPath.absoluteFilePath() + "\">>nul && set");
|
envSetProcess.start("cmd", {}, QProcess::Unbuffered | QProcess::ReadWrite | QProcess::Text);
|
||||||
|
envSetProcess.write(QString("\"" + envScriptPath.absoluteFilePath() + "\">>nul\n").toLatin1());
|
||||||
|
envSetProcess.waitForReadyRead(10000);
|
||||||
|
envSetProcess.readAll();
|
||||||
|
envSetProcess.write("set\n");
|
||||||
#else
|
#else
|
||||||
|
// need implementation(or test if space works)
|
||||||
// sh -c '. "<path>">>/dev/null && env'
|
// sh -c '. "<path>">>/dev/null && env'
|
||||||
envSetProcess.start("sh -c \' . \"" + envScriptPath.absoluteFilePath() + "\">>/dev/null && env");
|
envSetProcess.start("sh -c \' . \"" + envScriptPath.absoluteFilePath() + "\">>/dev/null && env");
|
||||||
#endif
|
#endif
|
||||||
envSetProcess.waitForReadyRead(10000);
|
envSetProcess.waitForReadyRead(10000);
|
||||||
clientEnv = QString(envSetProcess.readAll()).split(QRegExp("[\r\n]"), QString::SkipEmptyParts);
|
QString envSetResult = QString(envSetProcess.readAll());
|
||||||
|
#if (QT_VERSION <= QT_VERSION_CHECK(5,14,0))
|
||||||
|
clientEnv = envSetResult.split("\n", QString::SkipEmptyParts);
|
||||||
|
#else
|
||||||
|
clientEnv = envSetResult.split("\n", Qt::SkipEmptyParts);
|
||||||
|
#endif
|
||||||
|
if(clientEnv.size() > 2) // the first element is "set" and the last element is the current path
|
||||||
|
{
|
||||||
|
clientEnv.removeFirst();
|
||||||
|
clientEnv.removeLast();
|
||||||
|
emit setProcEnv(&clientEnv);
|
||||||
|
}
|
||||||
// qDebug() << "Get Env List" << clientEnv;
|
// qDebug() << "Get Env List" << clientEnv;
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
clientEnv.clear();
|
clientEnv.clear();
|
||||||
emit setProcEnv(&clientEnv);
|
|
||||||
|
|
||||||
clientWorkingDir->setPath(QApplication::applicationDirPath());
|
clientWorkingDir->setPath(QApplication::applicationDirPath());
|
||||||
qDebug() << clientWorkingDir->absolutePath();
|
qDebug() << clientWorkingDir->absolutePath();
|
||||||
@@ -146,13 +180,14 @@ void MainWindow::on_PM3_connectButton_clicked()
|
|||||||
qDebug() << clientWorkingDir->absolutePath();
|
qDebug() << clientWorkingDir->absolutePath();
|
||||||
emit setWorkingDir(clientWorkingDir->absolutePath());
|
emit setWorkingDir(clientWorkingDir->absolutePath());
|
||||||
|
|
||||||
|
loadConfig();
|
||||||
emit connectPM3(ui->PM3_pathEdit->text(), args);
|
emit connectPM3(ui->PM3_pathEdit->text(), args);
|
||||||
if(port != "" && !keepClientActive)
|
if(port != "" && !keepClientActive)
|
||||||
emit setSerialListener(port, true);
|
emit setSerialListener(port, true);
|
||||||
else if(!keepClientActive)
|
else if(!keepClientActive)
|
||||||
emit setSerialListener(false);
|
emit setSerialListener(false);
|
||||||
|
|
||||||
|
envSetProcess.kill();
|
||||||
}
|
}
|
||||||
|
|
||||||
void MainWindow::onPM3StateChanged(bool st, const QString& info)
|
void MainWindow::onPM3StateChanged(bool st, const QString& info)
|
||||||
@@ -604,7 +639,7 @@ void MainWindow::on_MF_File_loadButton_clicked()
|
|||||||
if(ui->MF_File_dataBox->isChecked())
|
if(ui->MF_File_dataBox->isChecked())
|
||||||
{
|
{
|
||||||
title = tr("Plz select the data file:");
|
title = tr("Plz select the data file:");
|
||||||
filename = QFileDialog::getOpenFileName(this, title, "./", tr("Binary Data Files(*.bin *.dump);;Text Data Files(*.txt *.eml);;All Files(*.*)"));
|
filename = QFileDialog::getOpenFileName(this, title, "./", tr("Binary Data Files(*.bin *.dump)") + ";;" + tr("Text Data Files(*.txt *.eml)") + ";;" + tr("All Files(*.*)"));
|
||||||
qDebug() << filename;
|
qDebug() << filename;
|
||||||
if(filename != "")
|
if(filename != "")
|
||||||
{
|
{
|
||||||
@@ -617,7 +652,7 @@ void MainWindow::on_MF_File_loadButton_clicked()
|
|||||||
else if(ui->MF_File_keyBox->isChecked())
|
else if(ui->MF_File_keyBox->isChecked())
|
||||||
{
|
{
|
||||||
title = tr("Plz select the key file:");
|
title = tr("Plz select the key file:");
|
||||||
filename = QFileDialog::getOpenFileName(this, title, "./", tr("Binary Key Files(*.bin *.dump);;Binary Data Files(*.bin *.dump);;All Files(*.*)"));
|
filename = QFileDialog::getOpenFileName(this, title, "./", tr("Binary Key Files(*.bin *.dump)") + ";;" + tr("All Files(*.*)"));
|
||||||
qDebug() << filename;
|
qDebug() << filename;
|
||||||
if(filename != "")
|
if(filename != "")
|
||||||
{
|
{
|
||||||
@@ -644,11 +679,11 @@ void MainWindow::on_MF_File_saveButton_clicked()
|
|||||||
if(ui->MF_File_dataBox->isChecked())
|
if(ui->MF_File_dataBox->isChecked())
|
||||||
{
|
{
|
||||||
title = tr("Plz select the location to save data file:");
|
title = tr("Plz select the location to save data file:");
|
||||||
filename = QFileDialog::getSaveFileName(this, title, "./data_" + defaultName, tr("Binary Data Files(*.bin *.dump);;Text Data Files(*.txt *.eml)"), &selectedType);
|
filename = QFileDialog::getSaveFileName(this, title, "./data_" + defaultName, tr("Binary Data Files(*.bin *.dump)") + ";;" + tr("Text Data Files(*.txt *.eml)"), &selectedType);
|
||||||
qDebug() << filename;
|
qDebug() << filename;
|
||||||
if(filename != "")
|
if(filename != "")
|
||||||
{
|
{
|
||||||
if(!mifare->data_saveDataFile(filename, selectedType == "Binary Data Files(*.bin *.dump)"))
|
if(!mifare->data_saveDataFile(filename, selectedType == tr("Binary Data Files(*.bin *.dump)")))
|
||||||
{
|
{
|
||||||
QMessageBox::information(this, tr("Info"), tr("Failed to save to") + "\n" + filename);
|
QMessageBox::information(this, tr("Info"), tr("Failed to save to") + "\n" + filename);
|
||||||
}
|
}
|
||||||
@@ -661,7 +696,7 @@ void MainWindow::on_MF_File_saveButton_clicked()
|
|||||||
qDebug() << filename;
|
qDebug() << filename;
|
||||||
if(filename != "")
|
if(filename != "")
|
||||||
{
|
{
|
||||||
if(!mifare->data_saveKeyFile(filename, selectedType == "Binary Key Files(*.bin *.dump)"))
|
if(!mifare->data_saveKeyFile(filename, selectedType == tr("Binary Key Files(*.bin *.dump)")))
|
||||||
{
|
{
|
||||||
QMessageBox::information(this, tr("Info"), tr("Failed to save to") + "\n" + filename);
|
QMessageBox::information(this, tr("Info"), tr("Failed to save to") + "\n" + filename);
|
||||||
}
|
}
|
||||||
@@ -842,15 +877,16 @@ void MainWindow::on_MF_Sniff_loadButton_clicked() // use a tmp file to support c
|
|||||||
QString filename = "";
|
QString filename = "";
|
||||||
|
|
||||||
title = tr("Plz select the trace file:");
|
title = tr("Plz select the trace file:");
|
||||||
filename = QFileDialog::getOpenFileName(this, title, "./", tr("Trace Files(*.trc);;All Files(*.*)"));
|
filename = QFileDialog::getOpenFileName(this, title, clientWorkingDir->absolutePath(), tr("Trace Files(*.trc)") + ";;" + tr("All Files(*.*)"));
|
||||||
qDebug() << filename;
|
qDebug() << filename;
|
||||||
if(filename != "")
|
if(filename != "")
|
||||||
{
|
{
|
||||||
QString tmpFile = "tmp" + QString::number(QDateTime::currentDateTime().toTime_t()) + ".trc";
|
QString tmpFile = "tmp" + QString::number(QDateTime::currentDateTime().toTime_t()) + ".trc";
|
||||||
if(QFile::copy(filename, "./" + tmpFile))
|
if(QFile::copy(filename, clientWorkingDir->absolutePath() + "/" + tmpFile))
|
||||||
{
|
{
|
||||||
mifare->loadSniff(tmpFile);
|
mifare->loadSniff(tmpFile);
|
||||||
QFile::remove("./" + tmpFile);
|
util->delay(3000);
|
||||||
|
QFile::remove(clientWorkingDir->absolutePath() + "/" + tmpFile);
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
@@ -865,17 +901,23 @@ void MainWindow::on_MF_Sniff_saveButton_clicked()
|
|||||||
QString filename = "";
|
QString filename = "";
|
||||||
|
|
||||||
title = tr("Plz select the location to save trace file:");
|
title = tr("Plz select the location to save trace file:");
|
||||||
filename = QFileDialog::getSaveFileName(this, title, "./", tr("Trace Files(*.trc)"));
|
filename = QFileDialog::getSaveFileName(this, title, clientWorkingDir->absolutePath(), tr("Trace Files(*.trc)"));
|
||||||
qDebug() << filename;
|
qDebug() << filename;
|
||||||
if(filename != "")
|
if(filename != "")
|
||||||
{
|
{
|
||||||
QString tmpFile = "tmp" + QString::number(QDateTime::currentDateTime().toTime_t()) + ".trc";
|
QString tmpFile = "tmp" + QString::number(QDateTime::currentDateTime().toTime_t()) + ".trc";
|
||||||
mifare->saveSniff(tmpFile);
|
mifare->saveSniff(tmpFile);
|
||||||
if(!QFile::copy("./" + tmpFile, filename))
|
for(int i = 0; i < 100; i++)
|
||||||
|
{
|
||||||
|
util->delay(100);
|
||||||
|
if(QFile::exists(clientWorkingDir->absolutePath() + "/" + tmpFile))
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
if(!QFile::copy(clientWorkingDir->absolutePath() + "/" + tmpFile, filename))
|
||||||
{
|
{
|
||||||
QMessageBox::information(this, tr("Info"), tr("Failed to save to") + "\n" + filename);
|
QMessageBox::information(this, tr("Info"), tr("Failed to save to") + "\n" + filename);
|
||||||
}
|
}
|
||||||
QFile::remove("./" + tmpFile);
|
QFile::remove(clientWorkingDir->absolutePath() + "/" + tmpFile);
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
@@ -967,17 +1009,9 @@ void MainWindow::uiInit()
|
|||||||
ui->statusbar->addPermanentWidget(programStatusBar, 1);
|
ui->statusbar->addPermanentWidget(programStatusBar, 1);
|
||||||
ui->statusbar->addPermanentWidget(stopButton);
|
ui->statusbar->addPermanentWidget(stopButton);
|
||||||
|
|
||||||
ui->MF_dataWidget->setColumnCount(3);
|
|
||||||
ui->MF_dataWidget->setHorizontalHeaderItem(0, new QTableWidgetItem(tr("Sec")));
|
|
||||||
ui->MF_dataWidget->setHorizontalHeaderItem(1, new QTableWidgetItem(tr("Blk")));
|
|
||||||
ui->MF_dataWidget->setHorizontalHeaderItem(2, new QTableWidgetItem(tr("Data")));
|
|
||||||
ui->MF_dataWidget->setColumnWidth(0, 55);
|
ui->MF_dataWidget->setColumnWidth(0, 55);
|
||||||
ui->MF_dataWidget->setColumnWidth(1, 55);
|
ui->MF_dataWidget->setColumnWidth(1, 55);
|
||||||
|
|
||||||
ui->MF_keyWidget->setColumnCount(3);
|
|
||||||
ui->MF_keyWidget->setHorizontalHeaderItem(0, new QTableWidgetItem(tr("Sec")));
|
|
||||||
ui->MF_keyWidget->setHorizontalHeaderItem(1, new QTableWidgetItem(tr("KeyA")));
|
|
||||||
ui->MF_keyWidget->setHorizontalHeaderItem(2, new QTableWidgetItem(tr("KeyB")));
|
|
||||||
ui->MF_keyWidget->setColumnWidth(0, 45);
|
ui->MF_keyWidget->setColumnWidth(0, 45);
|
||||||
|
|
||||||
MF_widgetReset();
|
MF_widgetReset();
|
||||||
@@ -1034,6 +1068,7 @@ void MainWindow::uiInit()
|
|||||||
settings->beginGroup("Client_Env");
|
settings->beginGroup("Client_Env");
|
||||||
ui->Set_Client_envScriptEdit->setText(settings->value("scriptPath").toString());
|
ui->Set_Client_envScriptEdit->setText(settings->value("scriptPath").toString());
|
||||||
ui->Set_Client_workingDirEdit->setText(settings->value("workingDir", "../data").toString());
|
ui->Set_Client_workingDirEdit->setText(settings->value("workingDir", "../data").toString());
|
||||||
|
ui->Set_Client_configPathEdit->setText(settings->value("configPath", "config.json").toString());
|
||||||
settings->endGroup();
|
settings->endGroup();
|
||||||
|
|
||||||
ui->MF_RW_keyTypeBox->addItem("A", Mifare::KEY_A);
|
ui->MF_RW_keyTypeBox->addItem("A", Mifare::KEY_A);
|
||||||
@@ -1152,7 +1187,7 @@ void MainWindow::setButtonsEnabled(bool st)
|
|||||||
ui->MF_sniffGroupBox->setEnabled(st);
|
ui->MF_sniffGroupBox->setEnabled(st);
|
||||||
ui->Raw_CMDEdit->setEnabled(st);
|
ui->Raw_CMDEdit->setEnabled(st);
|
||||||
ui->Raw_sendCMDButton->setEnabled(st);
|
ui->Raw_sendCMDButton->setEnabled(st);
|
||||||
ui->LF_configGroupBox->setEnabled(st);
|
ui->LF_LFconfigGroupBox->setEnabled(st);
|
||||||
ui->LF_operationGroupBox->setEnabled(st);
|
ui->LF_operationGroupBox->setEnabled(st);
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -1225,13 +1260,21 @@ void MainWindow::on_Set_Client_envScriptEdit_editingFinished()
|
|||||||
settings->endGroup();
|
settings->endGroup();
|
||||||
}
|
}
|
||||||
|
|
||||||
void MainWindow::on_Set_Client_saveWorkingDirButton_clicked()
|
void MainWindow::on_Set_Client_workingDirEdit_editingFinished()
|
||||||
{
|
{
|
||||||
settings->beginGroup("Client_Env");
|
settings->beginGroup("Client_Env");
|
||||||
settings->setValue("workingDir", ui->Set_Client_workingDirEdit->text());
|
settings->setValue("workingDir", ui->Set_Client_workingDirEdit->text());
|
||||||
settings->endGroup();
|
settings->endGroup();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
void MainWindow::on_Set_Client_configPathEdit_editingFinished()
|
||||||
|
{
|
||||||
|
settings->beginGroup("Client_Env");
|
||||||
|
settings->setValue("configPath", ui->Set_Client_configPathEdit->text());
|
||||||
|
settings->endGroup();
|
||||||
|
}
|
||||||
|
|
||||||
void MainWindow::on_Set_Client_keepClientActiveBox_stateChanged(int arg1)
|
void MainWindow::on_Set_Client_keepClientActiveBox_stateChanged(int arg1)
|
||||||
{
|
{
|
||||||
settings->beginGroup("Client_keepClientActive");
|
settings->beginGroup("Client_keepClientActive");
|
||||||
@@ -1241,37 +1284,37 @@ void MainWindow::on_Set_Client_keepClientActiveBox_stateChanged(int arg1)
|
|||||||
emit setSerialListener(!keepClientActive);
|
emit setSerialListener(!keepClientActive);
|
||||||
}
|
}
|
||||||
|
|
||||||
void MainWindow::on_LF_Conf_freqSlider_valueChanged(int value)
|
void MainWindow::on_LF_LFConf_freqSlider_valueChanged(int value)
|
||||||
{
|
{
|
||||||
onLFfreqConfChanged(value, true);
|
onLFfreqConfChanged(value, true);
|
||||||
}
|
}
|
||||||
|
|
||||||
void MainWindow::onLFfreqConfChanged(int value, bool isCustomized)
|
void MainWindow::onLFfreqConfChanged(int value, bool isCustomized)
|
||||||
{
|
{
|
||||||
ui->LF_Conf_freqDivisorBox->blockSignals(true);
|
ui->LF_LFConf_freqDivisorBox->blockSignals(true);
|
||||||
ui->LF_Conf_freqSlider->blockSignals(true);
|
ui->LF_LFConf_freqSlider->blockSignals(true);
|
||||||
|
|
||||||
if(isCustomized)
|
if(isCustomized)
|
||||||
ui->LF_Conf_freqOtherButton->setChecked(true);
|
ui->LF_LFConf_freqOtherButton->setChecked(true);
|
||||||
ui->LF_Conf_freqLabel->setText(tr("Actural Freq: ") + QString("%1kHz").arg(LF::divisor2Freq(value), 0, 'f', 3));
|
ui->LF_LFConf_freqLabel->setText(tr("Actural Freq: ") + QString("%1kHz").arg(LF::divisor2Freq(value), 0, 'f', 3));
|
||||||
ui->LF_Conf_freqDivisorBox->setValue(value);
|
ui->LF_LFConf_freqDivisorBox->setValue(value);
|
||||||
ui->LF_Conf_freqSlider->setValue(value);
|
ui->LF_LFConf_freqSlider->setValue(value);
|
||||||
|
|
||||||
ui->LF_Conf_freqDivisorBox->blockSignals(false);
|
ui->LF_LFConf_freqDivisorBox->blockSignals(false);
|
||||||
ui->LF_Conf_freqSlider->blockSignals(false);
|
ui->LF_LFConf_freqSlider->blockSignals(false);
|
||||||
}
|
}
|
||||||
|
|
||||||
void MainWindow::on_LF_Conf_freqDivisorBox_valueChanged(int arg1)
|
void MainWindow::on_LF_LFConf_freqDivisorBox_valueChanged(int arg1)
|
||||||
{
|
{
|
||||||
onLFfreqConfChanged(arg1, true);
|
onLFfreqConfChanged(arg1, true);
|
||||||
}
|
}
|
||||||
|
|
||||||
void MainWindow::on_LF_Conf_freq125kButton_clicked()
|
void MainWindow::on_LF_LFConf_freq125kButton_clicked()
|
||||||
{
|
{
|
||||||
onLFfreqConfChanged(95, false);
|
onLFfreqConfChanged(95, false);
|
||||||
}
|
}
|
||||||
|
|
||||||
void MainWindow::on_LF_Conf_freq134kButton_clicked()
|
void MainWindow::on_LF_LFConf_freq134kButton_clicked()
|
||||||
{
|
{
|
||||||
onLFfreqConfChanged(88, false);
|
onLFfreqConfChanged(88, false);
|
||||||
}
|
}
|
||||||
@@ -1337,31 +1380,32 @@ void MainWindow::contextMenuEvent(QContextMenuEvent *event)
|
|||||||
contextMenu->exec(event->globalPos());
|
contextMenu->exec(event->globalPos());
|
||||||
}
|
}
|
||||||
|
|
||||||
void MainWindow::on_LF_Conf_getButton_clicked()
|
void MainWindow::on_LF_LFConf_getButton_clicked()
|
||||||
{
|
{
|
||||||
setState(false);
|
setState(false);
|
||||||
lf->getConfig();
|
lf->getLFConfig();
|
||||||
setState(true);
|
setState(true);
|
||||||
}
|
}
|
||||||
|
|
||||||
void MainWindow::on_LF_Conf_setButton_clicked()
|
void MainWindow::on_LF_LFConf_setButton_clicked()
|
||||||
{
|
{
|
||||||
LF::Config config;
|
LF::LFConfig config;
|
||||||
setState(false);
|
setState(false);
|
||||||
config.divisor = ui->LF_Conf_freqDivisorBox->value();
|
config.divisor = ui->LF_LFConf_freqDivisorBox->value();
|
||||||
config.bitPerSample = ui->LF_Conf_bitPerSampleBox->value();
|
config.bitsPerSample = ui->LF_LFConf_bitsPerSampleBox->value();
|
||||||
config.decimation = ui->LF_Conf_decimationBox->value();
|
config.decimation = ui->LF_LFConf_decimationBox->value();
|
||||||
config.averaging = ui->LF_Conf_averagingBox->isChecked();
|
config.averaging = ui->LF_LFConf_averagingBox->isChecked();
|
||||||
config.triggerThreshold = ui->LF_Conf_thresholdBox->value();
|
config.triggerThreshold = ui->LF_LFConf_thresholdBox->value();
|
||||||
config.samplesToSkip = ui->LF_Conf_skipsBox->value();
|
config.samplesToSkip = ui->LF_LFConf_skipsBox->value();
|
||||||
lf->setConfig(config);
|
lf->setLFConfig(config);
|
||||||
Util::gotoRawTab();
|
Util::gotoRawTab();
|
||||||
setState(true);
|
setState(true);
|
||||||
}
|
}
|
||||||
|
|
||||||
void MainWindow::on_LF_Conf_resetButton_clicked()
|
void MainWindow::on_LF_LFConf_resetButton_clicked()
|
||||||
{
|
{
|
||||||
setState(false);
|
setState(false);
|
||||||
lf->resetConfig();
|
lf->resetLFConfig();
|
||||||
setState(true);
|
setState(true);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -177,17 +177,15 @@ private slots:
|
|||||||
|
|
||||||
void on_Set_Client_envScriptEdit_editingFinished();
|
void on_Set_Client_envScriptEdit_editingFinished();
|
||||||
|
|
||||||
void on_Set_Client_saveWorkingDirButton_clicked();
|
|
||||||
|
|
||||||
void on_Set_Client_keepClientActiveBox_stateChanged(int arg1);
|
void on_Set_Client_keepClientActiveBox_stateChanged(int arg1);
|
||||||
|
|
||||||
void on_LF_Conf_freqSlider_valueChanged(int value);
|
void on_LF_LFConf_freqSlider_valueChanged(int value);
|
||||||
|
|
||||||
void on_LF_Conf_freqDivisorBox_valueChanged(int arg1);
|
void on_LF_LFConf_freqDivisorBox_valueChanged(int arg1);
|
||||||
|
|
||||||
void on_LF_Conf_freq125kButton_clicked();
|
void on_LF_LFConf_freq125kButton_clicked();
|
||||||
|
|
||||||
void on_LF_Conf_freq134kButton_clicked();
|
void on_LF_LFConf_freq134kButton_clicked();
|
||||||
|
|
||||||
void on_LF_Op_searchButton_clicked();
|
void on_LF_Op_searchButton_clicked();
|
||||||
|
|
||||||
@@ -197,11 +195,15 @@ private slots:
|
|||||||
|
|
||||||
void on_LF_Op_sniffButton_clicked();
|
void on_LF_Op_sniffButton_clicked();
|
||||||
|
|
||||||
void on_LF_Conf_getButton_clicked();
|
void on_LF_LFConf_getButton_clicked();
|
||||||
|
|
||||||
void on_LF_Conf_setButton_clicked();
|
void on_LF_LFConf_setButton_clicked();
|
||||||
|
|
||||||
void on_LF_Conf_resetButton_clicked();
|
void on_LF_LFConf_resetButton_clicked();
|
||||||
|
|
||||||
|
void on_Set_Client_workingDirEdit_editingFinished();
|
||||||
|
|
||||||
|
void on_Set_Client_configPathEdit_editingFinished();
|
||||||
|
|
||||||
private:
|
private:
|
||||||
Ui::MainWindow* ui;
|
Ui::MainWindow* ui;
|
||||||
@@ -249,6 +251,7 @@ private:
|
|||||||
void saveClientPath(const QString& path);
|
void saveClientPath(const QString& path);
|
||||||
void onLFfreqConfChanged(int value, bool isCustomized);
|
void onLFfreqConfChanged(int value, bool isCustomized);
|
||||||
void dockInit();
|
void dockInit();
|
||||||
|
void loadConfig();
|
||||||
protected:
|
protected:
|
||||||
void contextMenuEvent(QContextMenuEvent *event) override;
|
void contextMenuEvent(QContextMenuEvent *event) override;
|
||||||
signals:
|
signals:
|
||||||
|
|||||||
@@ -7,7 +7,7 @@
|
|||||||
<x>0</x>
|
<x>0</x>
|
||||||
<y>0</y>
|
<y>0</y>
|
||||||
<width>1050</width>
|
<width>1050</width>
|
||||||
<height>700</height>
|
<height>750</height>
|
||||||
</rect>
|
</rect>
|
||||||
</property>
|
</property>
|
||||||
<property name="minimumSize">
|
<property name="minimumSize">
|
||||||
@@ -198,6 +198,21 @@
|
|||||||
<attribute name="verticalHeaderDefaultSectionSize">
|
<attribute name="verticalHeaderDefaultSectionSize">
|
||||||
<number>20</number>
|
<number>20</number>
|
||||||
</attribute>
|
</attribute>
|
||||||
|
<column>
|
||||||
|
<property name="text">
|
||||||
|
<string>Sec</string>
|
||||||
|
</property>
|
||||||
|
</column>
|
||||||
|
<column>
|
||||||
|
<property name="text">
|
||||||
|
<string>Blk</string>
|
||||||
|
</property>
|
||||||
|
</column>
|
||||||
|
<column>
|
||||||
|
<property name="text">
|
||||||
|
<string>Data</string>
|
||||||
|
</property>
|
||||||
|
</column>
|
||||||
</widget>
|
</widget>
|
||||||
</item>
|
</item>
|
||||||
<item>
|
<item>
|
||||||
@@ -360,6 +375,21 @@
|
|||||||
<attribute name="verticalHeaderDefaultSectionSize">
|
<attribute name="verticalHeaderDefaultSectionSize">
|
||||||
<number>20</number>
|
<number>20</number>
|
||||||
</attribute>
|
</attribute>
|
||||||
|
<column>
|
||||||
|
<property name="text">
|
||||||
|
<string>Sec</string>
|
||||||
|
</property>
|
||||||
|
</column>
|
||||||
|
<column>
|
||||||
|
<property name="text">
|
||||||
|
<string>KeyA</string>
|
||||||
|
</property>
|
||||||
|
</column>
|
||||||
|
<column>
|
||||||
|
<property name="text">
|
||||||
|
<string>KeyB</string>
|
||||||
|
</property>
|
||||||
|
</column>
|
||||||
</widget>
|
</widget>
|
||||||
</item>
|
</item>
|
||||||
</layout>
|
</layout>
|
||||||
@@ -1217,7 +1247,7 @@
|
|||||||
<item>
|
<item>
|
||||||
<layout class="QVBoxLayout" name="verticalLayout_14">
|
<layout class="QVBoxLayout" name="verticalLayout_14">
|
||||||
<item>
|
<item>
|
||||||
<widget class="QGroupBox" name="LF_configGroupBox">
|
<widget class="QGroupBox" name="LF_LFconfigGroupBox">
|
||||||
<property name="title">
|
<property name="title">
|
||||||
<string>LF Config</string>
|
<string>LF Config</string>
|
||||||
</property>
|
</property>
|
||||||
@@ -1238,7 +1268,7 @@
|
|||||||
<number>2</number>
|
<number>2</number>
|
||||||
</property>
|
</property>
|
||||||
<item>
|
<item>
|
||||||
<widget class="QGroupBox" name="LF_Conf_freqGroupBox">
|
<widget class="QGroupBox" name="LF_LFConf_freqGroupBox">
|
||||||
<property name="title">
|
<property name="title">
|
||||||
<string>Frequency</string>
|
<string>Frequency</string>
|
||||||
</property>
|
</property>
|
||||||
@@ -1261,7 +1291,7 @@
|
|||||||
<item>
|
<item>
|
||||||
<layout class="QHBoxLayout" name="horizontalLayout_13">
|
<layout class="QHBoxLayout" name="horizontalLayout_13">
|
||||||
<item>
|
<item>
|
||||||
<widget class="QRadioButton" name="LF_Conf_freq125kButton">
|
<widget class="QRadioButton" name="LF_LFConf_freq125kButton">
|
||||||
<property name="sizePolicy">
|
<property name="sizePolicy">
|
||||||
<sizepolicy hsizetype="Preferred" vsizetype="Fixed">
|
<sizepolicy hsizetype="Preferred" vsizetype="Fixed">
|
||||||
<horstretch>0</horstretch>
|
<horstretch>0</horstretch>
|
||||||
@@ -1277,7 +1307,7 @@
|
|||||||
</widget>
|
</widget>
|
||||||
</item>
|
</item>
|
||||||
<item>
|
<item>
|
||||||
<widget class="QRadioButton" name="LF_Conf_freq134kButton">
|
<widget class="QRadioButton" name="LF_LFConf_freq134kButton">
|
||||||
<property name="sizePolicy">
|
<property name="sizePolicy">
|
||||||
<sizepolicy hsizetype="Preferred" vsizetype="Fixed">
|
<sizepolicy hsizetype="Preferred" vsizetype="Fixed">
|
||||||
<horstretch>0</horstretch>
|
<horstretch>0</horstretch>
|
||||||
@@ -1290,7 +1320,7 @@
|
|||||||
</widget>
|
</widget>
|
||||||
</item>
|
</item>
|
||||||
<item>
|
<item>
|
||||||
<widget class="QRadioButton" name="LF_Conf_freqOtherButton">
|
<widget class="QRadioButton" name="LF_LFConf_freqOtherButton">
|
||||||
<property name="sizePolicy">
|
<property name="sizePolicy">
|
||||||
<sizepolicy hsizetype="Preferred" vsizetype="Fixed">
|
<sizepolicy hsizetype="Preferred" vsizetype="Fixed">
|
||||||
<horstretch>0</horstretch>
|
<horstretch>0</horstretch>
|
||||||
@@ -1310,7 +1340,7 @@
|
|||||||
</widget>
|
</widget>
|
||||||
</item>
|
</item>
|
||||||
<item>
|
<item>
|
||||||
<widget class="QSpinBox" name="LF_Conf_freqDivisorBox">
|
<widget class="QSpinBox" name="LF_LFConf_freqDivisorBox">
|
||||||
<property name="minimum">
|
<property name="minimum">
|
||||||
<number>19</number>
|
<number>19</number>
|
||||||
</property>
|
</property>
|
||||||
@@ -1323,7 +1353,7 @@
|
|||||||
</widget>
|
</widget>
|
||||||
</item>
|
</item>
|
||||||
<item>
|
<item>
|
||||||
<widget class="QLabel" name="LF_Conf_freqLabel">
|
<widget class="QLabel" name="LF_LFConf_freqLabel">
|
||||||
<property name="text">
|
<property name="text">
|
||||||
<string>Actural Freq: 125.000kHz</string>
|
<string>Actural Freq: 125.000kHz</string>
|
||||||
</property>
|
</property>
|
||||||
@@ -1345,7 +1375,7 @@
|
|||||||
</layout>
|
</layout>
|
||||||
</item>
|
</item>
|
||||||
<item>
|
<item>
|
||||||
<widget class="QSlider" name="LF_Conf_freqSlider">
|
<widget class="QSlider" name="LF_LFConf_freqSlider">
|
||||||
<property name="minimum">
|
<property name="minimum">
|
||||||
<number>19</number>
|
<number>19</number>
|
||||||
</property>
|
</property>
|
||||||
@@ -1363,8 +1393,7 @@
|
|||||||
<item>
|
<item>
|
||||||
<widget class="QLabel" name="label_22">
|
<widget class="QLabel" name="label_22">
|
||||||
<property name="text">
|
<property name="text">
|
||||||
<string>Note:
|
<string>You might need a modified LF antenna if the freq is not 125k/134k.
|
||||||
You might need a modified LF antenna if the freq is not 125k/134k.
|
|
||||||
When setting the freq, the "hw setlfdivisor" will also be called.</string>
|
When setting the freq, the "hw setlfdivisor" will also be called.</string>
|
||||||
</property>
|
</property>
|
||||||
<property name="wordWrap">
|
<property name="wordWrap">
|
||||||
@@ -1395,7 +1424,7 @@ When setting the freq, the "hw setlfdivisor" will also be called.</str
|
|||||||
<item row="0" column="0">
|
<item row="0" column="0">
|
||||||
<widget class="QLabel" name="label_6">
|
<widget class="QLabel" name="label_6">
|
||||||
<property name="text">
|
<property name="text">
|
||||||
<string>Bit per sample:</string>
|
<string>Bits per sample:</string>
|
||||||
</property>
|
</property>
|
||||||
</widget>
|
</widget>
|
||||||
</item>
|
</item>
|
||||||
@@ -1407,7 +1436,7 @@ When setting the freq, the "hw setlfdivisor" will also be called.</str
|
|||||||
</widget>
|
</widget>
|
||||||
</item>
|
</item>
|
||||||
<item row="1" column="1">
|
<item row="1" column="1">
|
||||||
<widget class="QSpinBox" name="LF_Conf_decimationBox">
|
<widget class="QSpinBox" name="LF_LFConf_decimationBox">
|
||||||
<property name="minimum">
|
<property name="minimum">
|
||||||
<number>1</number>
|
<number>1</number>
|
||||||
</property>
|
</property>
|
||||||
@@ -1424,7 +1453,7 @@ When setting the freq, the "hw setlfdivisor" will also be called.</str
|
|||||||
</widget>
|
</widget>
|
||||||
</item>
|
</item>
|
||||||
<item row="2" column="1">
|
<item row="2" column="1">
|
||||||
<widget class="QCheckBox" name="LF_Conf_averagingBox">
|
<widget class="QCheckBox" name="LF_LFConf_averagingBox">
|
||||||
<property name="text">
|
<property name="text">
|
||||||
<string/>
|
<string/>
|
||||||
</property>
|
</property>
|
||||||
@@ -1438,7 +1467,7 @@ When setting the freq, the "hw setlfdivisor" will also be called.</str
|
|||||||
</widget>
|
</widget>
|
||||||
</item>
|
</item>
|
||||||
<item row="3" column="1">
|
<item row="3" column="1">
|
||||||
<widget class="QSpinBox" name="LF_Conf_thresholdBox">
|
<widget class="QSpinBox" name="LF_LFConf_thresholdBox">
|
||||||
<property name="maximum">
|
<property name="maximum">
|
||||||
<number>128</number>
|
<number>128</number>
|
||||||
</property>
|
</property>
|
||||||
@@ -1452,14 +1481,14 @@ When setting the freq, the "hw setlfdivisor" will also be called.</str
|
|||||||
</widget>
|
</widget>
|
||||||
</item>
|
</item>
|
||||||
<item row="4" column="1">
|
<item row="4" column="1">
|
||||||
<widget class="QSpinBox" name="LF_Conf_skipsBox">
|
<widget class="QSpinBox" name="LF_LFConf_skipsBox">
|
||||||
<property name="maximum">
|
<property name="maximum">
|
||||||
<number>65535</number>
|
<number>65535</number>
|
||||||
</property>
|
</property>
|
||||||
</widget>
|
</widget>
|
||||||
</item>
|
</item>
|
||||||
<item row="0" column="1">
|
<item row="0" column="1">
|
||||||
<widget class="QSpinBox" name="LF_Conf_bitPerSampleBox">
|
<widget class="QSpinBox" name="LF_LFConf_bitsPerSampleBox">
|
||||||
<property name="minimum">
|
<property name="minimum">
|
||||||
<number>1</number>
|
<number>1</number>
|
||||||
</property>
|
</property>
|
||||||
@@ -1504,7 +1533,7 @@ When setting the freq, the "hw setlfdivisor" will also be called.</str
|
|||||||
</spacer>
|
</spacer>
|
||||||
</item>
|
</item>
|
||||||
<item>
|
<item>
|
||||||
<widget class="QPushButton" name="LF_Conf_getButton">
|
<widget class="QPushButton" name="LF_LFConf_getButton">
|
||||||
<property name="sizePolicy">
|
<property name="sizePolicy">
|
||||||
<sizepolicy hsizetype="Preferred" vsizetype="Fixed">
|
<sizepolicy hsizetype="Preferred" vsizetype="Fixed">
|
||||||
<horstretch>0</horstretch>
|
<horstretch>0</horstretch>
|
||||||
@@ -1523,7 +1552,7 @@ When setting the freq, the "hw setlfdivisor" will also be called.</str
|
|||||||
</widget>
|
</widget>
|
||||||
</item>
|
</item>
|
||||||
<item>
|
<item>
|
||||||
<widget class="QPushButton" name="LF_Conf_setButton">
|
<widget class="QPushButton" name="LF_LFConf_setButton">
|
||||||
<property name="sizePolicy">
|
<property name="sizePolicy">
|
||||||
<sizepolicy hsizetype="Preferred" vsizetype="Fixed">
|
<sizepolicy hsizetype="Preferred" vsizetype="Fixed">
|
||||||
<horstretch>0</horstretch>
|
<horstretch>0</horstretch>
|
||||||
@@ -1542,7 +1571,7 @@ When setting the freq, the "hw setlfdivisor" will also be called.</str
|
|||||||
</widget>
|
</widget>
|
||||||
</item>
|
</item>
|
||||||
<item>
|
<item>
|
||||||
<widget class="QPushButton" name="LF_Conf_resetButton">
|
<widget class="QPushButton" name="LF_LFConf_resetButton">
|
||||||
<property name="text">
|
<property name="text">
|
||||||
<string>Reset</string>
|
<string>Reset</string>
|
||||||
</property>
|
</property>
|
||||||
@@ -1853,15 +1882,640 @@ or the communication between a tag and a reader.</string>
|
|||||||
<attribute name="title">
|
<attribute name="title">
|
||||||
<string>T55xx</string>
|
<string>T55xx</string>
|
||||||
</attribute>
|
</attribute>
|
||||||
<widget class="QTableWidget" name="T55_dataWidget">
|
<widget class="QGroupBox" name="groupBox">
|
||||||
<property name="geometry">
|
<property name="geometry">
|
||||||
<rect>
|
<rect>
|
||||||
<x>20</x>
|
<x>360</x>
|
||||||
<y>10</y>
|
<y>20</y>
|
||||||
<width>256</width>
|
<width>281</width>
|
||||||
<height>192</height>
|
<height>511</height>
|
||||||
</rect>
|
</rect>
|
||||||
</property>
|
</property>
|
||||||
|
<property name="title">
|
||||||
|
<string>Basic Configuration(Page 0 Block 0)</string>
|
||||||
|
</property>
|
||||||
|
<layout class="QVBoxLayout" name="verticalLayout_21">
|
||||||
|
<property name="leftMargin">
|
||||||
|
<number>2</number>
|
||||||
|
</property>
|
||||||
|
<property name="rightMargin">
|
||||||
|
<number>2</number>
|
||||||
|
</property>
|
||||||
|
<item>
|
||||||
|
<layout class="QFormLayout" name="formLayout_4">
|
||||||
|
<item row="0" column="0">
|
||||||
|
<widget class="QLabel" name="label_43">
|
||||||
|
<property name="text">
|
||||||
|
<string>Hex:</string>
|
||||||
|
</property>
|
||||||
|
</widget>
|
||||||
|
</item>
|
||||||
|
<item row="1" column="0">
|
||||||
|
<widget class="QLabel" name="label_44">
|
||||||
|
<property name="text">
|
||||||
|
<string>Bin:</string>
|
||||||
|
</property>
|
||||||
|
</widget>
|
||||||
|
</item>
|
||||||
|
<item row="1" column="1">
|
||||||
|
<widget class="QLineEdit" name="lineEdit_4">
|
||||||
|
<property name="sizePolicy">
|
||||||
|
<sizepolicy hsizetype="Expanding" vsizetype="Fixed">
|
||||||
|
<horstretch>4</horstretch>
|
||||||
|
<verstretch>0</verstretch>
|
||||||
|
</sizepolicy>
|
||||||
|
</property>
|
||||||
|
</widget>
|
||||||
|
</item>
|
||||||
|
<item row="0" column="1">
|
||||||
|
<widget class="QLineEdit" name="lineEdit_3">
|
||||||
|
<property name="sizePolicy">
|
||||||
|
<sizepolicy hsizetype="Expanding" vsizetype="Fixed">
|
||||||
|
<horstretch>1</horstretch>
|
||||||
|
<verstretch>0</verstretch>
|
||||||
|
</sizepolicy>
|
||||||
|
</property>
|
||||||
|
</widget>
|
||||||
|
</item>
|
||||||
|
</layout>
|
||||||
|
</item>
|
||||||
|
<item>
|
||||||
|
<layout class="QHBoxLayout" name="horizontalLayout_23">
|
||||||
|
<item>
|
||||||
|
<spacer name="horizontalSpacer_15">
|
||||||
|
<property name="orientation">
|
||||||
|
<enum>Qt::Horizontal</enum>
|
||||||
|
</property>
|
||||||
|
<property name="sizeHint" stdset="0">
|
||||||
|
<size>
|
||||||
|
<width>40</width>
|
||||||
|
<height>20</height>
|
||||||
|
</size>
|
||||||
|
</property>
|
||||||
|
</spacer>
|
||||||
|
</item>
|
||||||
|
<item>
|
||||||
|
<widget class="QPushButton" name="pushButton">
|
||||||
|
<property name="text">
|
||||||
|
<string>Get from Data</string>
|
||||||
|
</property>
|
||||||
|
</widget>
|
||||||
|
</item>
|
||||||
|
<item>
|
||||||
|
<widget class="QPushButton" name="pushButton_2">
|
||||||
|
<property name="text">
|
||||||
|
<string>Set to Data</string>
|
||||||
|
</property>
|
||||||
|
</widget>
|
||||||
|
</item>
|
||||||
|
<item>
|
||||||
|
<spacer name="horizontalSpacer_14">
|
||||||
|
<property name="orientation">
|
||||||
|
<enum>Qt::Horizontal</enum>
|
||||||
|
</property>
|
||||||
|
<property name="sizeHint" stdset="0">
|
||||||
|
<size>
|
||||||
|
<width>40</width>
|
||||||
|
<height>20</height>
|
||||||
|
</size>
|
||||||
|
</property>
|
||||||
|
</spacer>
|
||||||
|
</item>
|
||||||
|
</layout>
|
||||||
|
</item>
|
||||||
|
<item>
|
||||||
|
<layout class="QFormLayout" name="formLayout_2">
|
||||||
|
<property name="horizontalSpacing">
|
||||||
|
<number>5</number>
|
||||||
|
</property>
|
||||||
|
<property name="verticalSpacing">
|
||||||
|
<number>5</number>
|
||||||
|
</property>
|
||||||
|
<item row="0" column="0">
|
||||||
|
<widget class="QLabel" name="label_28">
|
||||||
|
<property name="text">
|
||||||
|
<string>Locked:</string>
|
||||||
|
</property>
|
||||||
|
</widget>
|
||||||
|
</item>
|
||||||
|
<item row="0" column="1">
|
||||||
|
<widget class="QCheckBox" name="checkBox"/>
|
||||||
|
</item>
|
||||||
|
<item row="1" column="0">
|
||||||
|
<widget class="QLabel" name="label_29">
|
||||||
|
<property name="text">
|
||||||
|
<string>Master Key:</string>
|
||||||
|
</property>
|
||||||
|
</widget>
|
||||||
|
</item>
|
||||||
|
<item row="2" column="0">
|
||||||
|
<widget class="QLabel" name="label_30">
|
||||||
|
<property name="text">
|
||||||
|
<string>Data Bit Rate:</string>
|
||||||
|
</property>
|
||||||
|
</widget>
|
||||||
|
</item>
|
||||||
|
<item row="2" column="1">
|
||||||
|
<widget class="QComboBox" name="comboBox"/>
|
||||||
|
</item>
|
||||||
|
<item row="3" column="0">
|
||||||
|
<widget class="QLabel" name="label_31">
|
||||||
|
<property name="text">
|
||||||
|
<string>eXtended Mode:</string>
|
||||||
|
</property>
|
||||||
|
</widget>
|
||||||
|
</item>
|
||||||
|
<item row="4" column="0">
|
||||||
|
<widget class="QLabel" name="label_32">
|
||||||
|
<property name="text">
|
||||||
|
<string>Modulation:</string>
|
||||||
|
</property>
|
||||||
|
</widget>
|
||||||
|
</item>
|
||||||
|
<item row="5" column="0">
|
||||||
|
<widget class="QLabel" name="label_33">
|
||||||
|
<property name="text">
|
||||||
|
<string>PSK Clock Freq:</string>
|
||||||
|
</property>
|
||||||
|
</widget>
|
||||||
|
</item>
|
||||||
|
<item row="6" column="0">
|
||||||
|
<widget class="QLabel" name="label_34">
|
||||||
|
<property name="text">
|
||||||
|
<string>Answer on Request:</string>
|
||||||
|
</property>
|
||||||
|
</widget>
|
||||||
|
</item>
|
||||||
|
<item row="3" column="1">
|
||||||
|
<widget class="QCheckBox" name="checkBox_2"/>
|
||||||
|
</item>
|
||||||
|
<item row="4" column="1">
|
||||||
|
<widget class="QComboBox" name="comboBox_2"/>
|
||||||
|
</item>
|
||||||
|
<item row="7" column="0">
|
||||||
|
<widget class="QLabel" name="label_35">
|
||||||
|
<property name="text">
|
||||||
|
<string>One Time Pad:</string>
|
||||||
|
</property>
|
||||||
|
</widget>
|
||||||
|
</item>
|
||||||
|
<item row="8" column="0">
|
||||||
|
<widget class="QLabel" name="label_36">
|
||||||
|
<property name="text">
|
||||||
|
<string>Max Block:</string>
|
||||||
|
</property>
|
||||||
|
</widget>
|
||||||
|
</item>
|
||||||
|
<item row="9" column="0">
|
||||||
|
<widget class="QLabel" name="label_37">
|
||||||
|
<property name="text">
|
||||||
|
<string>Password:</string>
|
||||||
|
</property>
|
||||||
|
</widget>
|
||||||
|
</item>
|
||||||
|
<item row="10" column="0">
|
||||||
|
<widget class="QLabel" name="label_38">
|
||||||
|
<property name="text">
|
||||||
|
<string>Seq. Terminator:</string>
|
||||||
|
</property>
|
||||||
|
</widget>
|
||||||
|
</item>
|
||||||
|
<item row="11" column="0">
|
||||||
|
<widget class="QLabel" name="label_39">
|
||||||
|
<property name="text">
|
||||||
|
<string>Seq. Start Marker:</string>
|
||||||
|
</property>
|
||||||
|
</widget>
|
||||||
|
</item>
|
||||||
|
<item row="12" column="0">
|
||||||
|
<widget class="QLabel" name="label_40">
|
||||||
|
<property name="text">
|
||||||
|
<string>Fast Downlink:</string>
|
||||||
|
</property>
|
||||||
|
</widget>
|
||||||
|
</item>
|
||||||
|
<item row="13" column="0">
|
||||||
|
<widget class="QLabel" name="label_41">
|
||||||
|
<property name="text">
|
||||||
|
<string>Inverse Data:</string>
|
||||||
|
</property>
|
||||||
|
</widget>
|
||||||
|
</item>
|
||||||
|
<item row="14" column="0">
|
||||||
|
<widget class="QLabel" name="label_42">
|
||||||
|
<property name="text">
|
||||||
|
<string>Init-Delay:</string>
|
||||||
|
</property>
|
||||||
|
</widget>
|
||||||
|
</item>
|
||||||
|
<item row="14" column="1">
|
||||||
|
<widget class="QCheckBox" name="checkBox_3"/>
|
||||||
|
</item>
|
||||||
|
<item row="13" column="1">
|
||||||
|
<widget class="QCheckBox" name="checkBox_4"/>
|
||||||
|
</item>
|
||||||
|
<item row="12" column="1">
|
||||||
|
<widget class="QCheckBox" name="checkBox_5"/>
|
||||||
|
</item>
|
||||||
|
<item row="11" column="1">
|
||||||
|
<widget class="QCheckBox" name="checkBox_6"/>
|
||||||
|
</item>
|
||||||
|
<item row="10" column="1">
|
||||||
|
<widget class="QCheckBox" name="checkBox_7"/>
|
||||||
|
</item>
|
||||||
|
<item row="9" column="1">
|
||||||
|
<widget class="QCheckBox" name="checkBox_8"/>
|
||||||
|
</item>
|
||||||
|
<item row="1" column="1">
|
||||||
|
<widget class="QSpinBox" name="spinBox"/>
|
||||||
|
</item>
|
||||||
|
<item row="5" column="1">
|
||||||
|
<widget class="QComboBox" name="comboBox_3"/>
|
||||||
|
</item>
|
||||||
|
<item row="6" column="1">
|
||||||
|
<widget class="QCheckBox" name="checkBox_9"/>
|
||||||
|
</item>
|
||||||
|
<item row="7" column="1">
|
||||||
|
<widget class="QCheckBox" name="checkBox_10"/>
|
||||||
|
</item>
|
||||||
|
<item row="8" column="1">
|
||||||
|
<widget class="QSpinBox" name="spinBox_2"/>
|
||||||
|
</item>
|
||||||
|
</layout>
|
||||||
|
</item>
|
||||||
|
<item>
|
||||||
|
<spacer name="verticalSpacer_10">
|
||||||
|
<property name="orientation">
|
||||||
|
<enum>Qt::Vertical</enum>
|
||||||
|
</property>
|
||||||
|
<property name="sizeHint" stdset="0">
|
||||||
|
<size>
|
||||||
|
<width>20</width>
|
||||||
|
<height>40</height>
|
||||||
|
</size>
|
||||||
|
</property>
|
||||||
|
</spacer>
|
||||||
|
</item>
|
||||||
|
</layout>
|
||||||
|
</widget>
|
||||||
|
<widget class="QGroupBox" name="groupBox_3">
|
||||||
|
<property name="geometry">
|
||||||
|
<rect>
|
||||||
|
<x>670</x>
|
||||||
|
<y>20</y>
|
||||||
|
<width>311</width>
|
||||||
|
<height>511</height>
|
||||||
|
</rect>
|
||||||
|
</property>
|
||||||
|
<property name="title">
|
||||||
|
<string>Analog Front-End Option(Page 1 Block 3)</string>
|
||||||
|
</property>
|
||||||
|
<layout class="QVBoxLayout" name="verticalLayout_22">
|
||||||
|
<property name="leftMargin">
|
||||||
|
<number>2</number>
|
||||||
|
</property>
|
||||||
|
<property name="rightMargin">
|
||||||
|
<number>2</number>
|
||||||
|
</property>
|
||||||
|
<item>
|
||||||
|
<layout class="QFormLayout" name="formLayout_5">
|
||||||
|
<item row="0" column="0">
|
||||||
|
<widget class="QLabel" name="label_45">
|
||||||
|
<property name="text">
|
||||||
|
<string>Hex:</string>
|
||||||
|
</property>
|
||||||
|
</widget>
|
||||||
|
</item>
|
||||||
|
<item row="1" column="0">
|
||||||
|
<widget class="QLabel" name="label_46">
|
||||||
|
<property name="text">
|
||||||
|
<string>Bin:</string>
|
||||||
|
</property>
|
||||||
|
</widget>
|
||||||
|
</item>
|
||||||
|
<item row="1" column="1">
|
||||||
|
<widget class="QLineEdit" name="lineEdit_5">
|
||||||
|
<property name="sizePolicy">
|
||||||
|
<sizepolicy hsizetype="Expanding" vsizetype="Fixed">
|
||||||
|
<horstretch>4</horstretch>
|
||||||
|
<verstretch>0</verstretch>
|
||||||
|
</sizepolicy>
|
||||||
|
</property>
|
||||||
|
</widget>
|
||||||
|
</item>
|
||||||
|
<item row="0" column="1">
|
||||||
|
<widget class="QLineEdit" name="lineEdit_6">
|
||||||
|
<property name="sizePolicy">
|
||||||
|
<sizepolicy hsizetype="Expanding" vsizetype="Fixed">
|
||||||
|
<horstretch>1</horstretch>
|
||||||
|
<verstretch>0</verstretch>
|
||||||
|
</sizepolicy>
|
||||||
|
</property>
|
||||||
|
</widget>
|
||||||
|
</item>
|
||||||
|
</layout>
|
||||||
|
</item>
|
||||||
|
<item>
|
||||||
|
<layout class="QHBoxLayout" name="horizontalLayout_24">
|
||||||
|
<item>
|
||||||
|
<spacer name="horizontalSpacer_16">
|
||||||
|
<property name="orientation">
|
||||||
|
<enum>Qt::Horizontal</enum>
|
||||||
|
</property>
|
||||||
|
<property name="sizeHint" stdset="0">
|
||||||
|
<size>
|
||||||
|
<width>40</width>
|
||||||
|
<height>20</height>
|
||||||
|
</size>
|
||||||
|
</property>
|
||||||
|
</spacer>
|
||||||
|
</item>
|
||||||
|
<item>
|
||||||
|
<widget class="QPushButton" name="pushButton_3">
|
||||||
|
<property name="text">
|
||||||
|
<string>Get from Data</string>
|
||||||
|
</property>
|
||||||
|
</widget>
|
||||||
|
</item>
|
||||||
|
<item>
|
||||||
|
<widget class="QPushButton" name="pushButton_4">
|
||||||
|
<property name="text">
|
||||||
|
<string>Set to Data</string>
|
||||||
|
</property>
|
||||||
|
</widget>
|
||||||
|
</item>
|
||||||
|
<item>
|
||||||
|
<spacer name="horizontalSpacer_20">
|
||||||
|
<property name="orientation">
|
||||||
|
<enum>Qt::Horizontal</enum>
|
||||||
|
</property>
|
||||||
|
<property name="sizeHint" stdset="0">
|
||||||
|
<size>
|
||||||
|
<width>40</width>
|
||||||
|
<height>20</height>
|
||||||
|
</size>
|
||||||
|
</property>
|
||||||
|
</spacer>
|
||||||
|
</item>
|
||||||
|
</layout>
|
||||||
|
</item>
|
||||||
|
<item>
|
||||||
|
<layout class="QFormLayout" name="formLayout_6">
|
||||||
|
<property name="rowWrapPolicy">
|
||||||
|
<enum>QFormLayout::WrapLongRows</enum>
|
||||||
|
</property>
|
||||||
|
<property name="horizontalSpacing">
|
||||||
|
<number>5</number>
|
||||||
|
</property>
|
||||||
|
<property name="verticalSpacing">
|
||||||
|
<number>5</number>
|
||||||
|
</property>
|
||||||
|
<item row="0" column="0">
|
||||||
|
<widget class="QLabel" name="label_47">
|
||||||
|
<property name="text">
|
||||||
|
<string>Locked:</string>
|
||||||
|
</property>
|
||||||
|
</widget>
|
||||||
|
</item>
|
||||||
|
<item row="0" column="1">
|
||||||
|
<widget class="QCheckBox" name="checkBox_11"/>
|
||||||
|
</item>
|
||||||
|
<item row="1" column="0">
|
||||||
|
<widget class="QLabel" name="label_48">
|
||||||
|
<property name="text">
|
||||||
|
<string>Option Key:</string>
|
||||||
|
</property>
|
||||||
|
</widget>
|
||||||
|
</item>
|
||||||
|
<item row="1" column="1">
|
||||||
|
<widget class="QSpinBox" name="spinBox_3"/>
|
||||||
|
</item>
|
||||||
|
<item row="2" column="0">
|
||||||
|
<widget class="QLabel" name="label_49">
|
||||||
|
<property name="text">
|
||||||
|
<string>Soft Modulation:</string>
|
||||||
|
</property>
|
||||||
|
</widget>
|
||||||
|
</item>
|
||||||
|
<item row="2" column="1">
|
||||||
|
<widget class="QComboBox" name="comboBox_4"/>
|
||||||
|
</item>
|
||||||
|
<item row="3" column="0">
|
||||||
|
<widget class="QLabel" name="label_50">
|
||||||
|
<property name="text">
|
||||||
|
<string>Clamp Voltage:</string>
|
||||||
|
</property>
|
||||||
|
</widget>
|
||||||
|
</item>
|
||||||
|
<item row="3" column="1">
|
||||||
|
<widget class="QComboBox" name="comboBox_7"/>
|
||||||
|
</item>
|
||||||
|
<item row="4" column="0">
|
||||||
|
<widget class="QLabel" name="label_51">
|
||||||
|
<property name="text">
|
||||||
|
<string>Modulation Voltage:</string>
|
||||||
|
</property>
|
||||||
|
</widget>
|
||||||
|
</item>
|
||||||
|
<item row="4" column="1">
|
||||||
|
<widget class="QComboBox" name="comboBox_5"/>
|
||||||
|
</item>
|
||||||
|
<item row="5" column="0">
|
||||||
|
<widget class="QLabel" name="label_52">
|
||||||
|
<property name="text">
|
||||||
|
<string>Clock Detection Threshold:</string>
|
||||||
|
</property>
|
||||||
|
</widget>
|
||||||
|
</item>
|
||||||
|
<item row="5" column="1">
|
||||||
|
<widget class="QComboBox" name="comboBox_6"/>
|
||||||
|
</item>
|
||||||
|
<item row="6" column="0">
|
||||||
|
<widget class="QLabel" name="label_53">
|
||||||
|
<property name="text">
|
||||||
|
<string>Gap Detection Threshold:</string>
|
||||||
|
</property>
|
||||||
|
</widget>
|
||||||
|
</item>
|
||||||
|
<item row="6" column="1">
|
||||||
|
<widget class="QComboBox" name="comboBox_8"/>
|
||||||
|
</item>
|
||||||
|
<item row="7" column="0">
|
||||||
|
<widget class="QLabel" name="label_54">
|
||||||
|
<property name="text">
|
||||||
|
<string>Write Dampling:</string>
|
||||||
|
</property>
|
||||||
|
</widget>
|
||||||
|
</item>
|
||||||
|
<item row="8" column="0">
|
||||||
|
<widget class="QLabel" name="label_55">
|
||||||
|
<property name="text">
|
||||||
|
<string>Demod Delay:</string>
|
||||||
|
</property>
|
||||||
|
</widget>
|
||||||
|
</item>
|
||||||
|
<item row="9" column="0">
|
||||||
|
<widget class="QLabel" name="label_56">
|
||||||
|
<property name="text">
|
||||||
|
<string>Downlink Protocol:</string>
|
||||||
|
</property>
|
||||||
|
</widget>
|
||||||
|
</item>
|
||||||
|
<item row="7" column="1">
|
||||||
|
<widget class="QComboBox" name="comboBox_9"/>
|
||||||
|
</item>
|
||||||
|
<item row="8" column="1">
|
||||||
|
<widget class="QComboBox" name="comboBox_10"/>
|
||||||
|
</item>
|
||||||
|
<item row="9" column="1">
|
||||||
|
<widget class="QComboBox" name="comboBox_11"/>
|
||||||
|
</item>
|
||||||
|
</layout>
|
||||||
|
</item>
|
||||||
|
<item>
|
||||||
|
<spacer name="verticalSpacer_11">
|
||||||
|
<property name="orientation">
|
||||||
|
<enum>Qt::Vertical</enum>
|
||||||
|
</property>
|
||||||
|
<property name="sizeHint" stdset="0">
|
||||||
|
<size>
|
||||||
|
<width>20</width>
|
||||||
|
<height>40</height>
|
||||||
|
</size>
|
||||||
|
</property>
|
||||||
|
</spacer>
|
||||||
|
</item>
|
||||||
|
</layout>
|
||||||
|
</widget>
|
||||||
|
<widget class="QWidget" name="verticalLayoutWidget">
|
||||||
|
<property name="geometry">
|
||||||
|
<rect>
|
||||||
|
<x>50</x>
|
||||||
|
<y>150</y>
|
||||||
|
<width>221</width>
|
||||||
|
<height>201</height>
|
||||||
|
</rect>
|
||||||
|
</property>
|
||||||
|
<layout class="QVBoxLayout" name="verticalLayout_19">
|
||||||
|
<item>
|
||||||
|
<widget class="QLabel" name="label_57">
|
||||||
|
<property name="text">
|
||||||
|
<string>Data:</string>
|
||||||
|
</property>
|
||||||
|
</widget>
|
||||||
|
</item>
|
||||||
|
<item>
|
||||||
|
<widget class="QTableWidget" name="T55_dataWidget"/>
|
||||||
|
</item>
|
||||||
|
</layout>
|
||||||
|
</widget>
|
||||||
|
<widget class="QGroupBox" name="groupBox_4">
|
||||||
|
<property name="geometry">
|
||||||
|
<rect>
|
||||||
|
<x>50</x>
|
||||||
|
<y>370</y>
|
||||||
|
<width>194</width>
|
||||||
|
<height>231</height>
|
||||||
|
</rect>
|
||||||
|
</property>
|
||||||
|
<property name="title">
|
||||||
|
<string>T55xx Read Config</string>
|
||||||
|
</property>
|
||||||
|
<layout class="QVBoxLayout" name="verticalLayout_20">
|
||||||
|
<item>
|
||||||
|
<layout class="QFormLayout" name="formLayout_7">
|
||||||
|
<item row="0" column="0">
|
||||||
|
<widget class="QLabel" name="label_58">
|
||||||
|
<property name="text">
|
||||||
|
<string>Modulation:</string>
|
||||||
|
</property>
|
||||||
|
</widget>
|
||||||
|
</item>
|
||||||
|
<item row="1" column="0">
|
||||||
|
<widget class="QLabel" name="label_59">
|
||||||
|
<property name="text">
|
||||||
|
<string>Bit Rate:</string>
|
||||||
|
</property>
|
||||||
|
</widget>
|
||||||
|
</item>
|
||||||
|
<item row="4" column="0">
|
||||||
|
<widget class="QLabel" name="label_60">
|
||||||
|
<property name="text">
|
||||||
|
<string>Seq. Term.</string>
|
||||||
|
</property>
|
||||||
|
</widget>
|
||||||
|
</item>
|
||||||
|
<item row="3" column="0">
|
||||||
|
<widget class="QLabel" name="label_61">
|
||||||
|
<property name="text">
|
||||||
|
<string>Offset:</string>
|
||||||
|
</property>
|
||||||
|
</widget>
|
||||||
|
</item>
|
||||||
|
<item row="2" column="0">
|
||||||
|
<widget class="QLabel" name="label_62">
|
||||||
|
<property name="text">
|
||||||
|
<string>Inverted:</string>
|
||||||
|
</property>
|
||||||
|
</widget>
|
||||||
|
</item>
|
||||||
|
<item row="0" column="1">
|
||||||
|
<widget class="QComboBox" name="comboBox_12"/>
|
||||||
|
</item>
|
||||||
|
<item row="1" column="1">
|
||||||
|
<widget class="QComboBox" name="comboBox_13"/>
|
||||||
|
</item>
|
||||||
|
<item row="2" column="1">
|
||||||
|
<widget class="QCheckBox" name="checkBox_12">
|
||||||
|
<property name="text">
|
||||||
|
<string/>
|
||||||
|
</property>
|
||||||
|
</widget>
|
||||||
|
</item>
|
||||||
|
<item row="3" column="1">
|
||||||
|
<widget class="QSpinBox" name="spinBox_4"/>
|
||||||
|
</item>
|
||||||
|
<item row="4" column="1">
|
||||||
|
<widget class="QCheckBox" name="checkBox_13">
|
||||||
|
<property name="text">
|
||||||
|
<string/>
|
||||||
|
</property>
|
||||||
|
</widget>
|
||||||
|
</item>
|
||||||
|
</layout>
|
||||||
|
</item>
|
||||||
|
<item>
|
||||||
|
<layout class="QHBoxLayout" name="horizontalLayout_28">
|
||||||
|
<item>
|
||||||
|
<widget class="QRadioButton" name="radioButton">
|
||||||
|
<property name="text">
|
||||||
|
<string>T5577</string>
|
||||||
|
</property>
|
||||||
|
</widget>
|
||||||
|
</item>
|
||||||
|
<item>
|
||||||
|
<widget class="QRadioButton" name="radioButton_2">
|
||||||
|
<property name="text">
|
||||||
|
<string>T5555</string>
|
||||||
|
</property>
|
||||||
|
</widget>
|
||||||
|
</item>
|
||||||
|
</layout>
|
||||||
|
</item>
|
||||||
|
<item>
|
||||||
|
<spacer name="verticalSpacer_12">
|
||||||
|
<property name="orientation">
|
||||||
|
<enum>Qt::Vertical</enum>
|
||||||
|
</property>
|
||||||
|
<property name="sizeHint" stdset="0">
|
||||||
|
<size>
|
||||||
|
<width>20</width>
|
||||||
|
<height>40</height>
|
||||||
|
</size>
|
||||||
|
</property>
|
||||||
|
</spacer>
|
||||||
|
</item>
|
||||||
|
</layout>
|
||||||
</widget>
|
</widget>
|
||||||
</widget>
|
</widget>
|
||||||
<widget class="QWidget" name="rawTab">
|
<widget class="QWidget" name="rawTab">
|
||||||
@@ -1959,7 +2613,11 @@ or the communication between a tag and a reader.</string>
|
|||||||
<enum>QLayout::SetMaximumSize</enum>
|
<enum>QLayout::SetMaximumSize</enum>
|
||||||
</property>
|
</property>
|
||||||
<item>
|
<item>
|
||||||
<widget class="QLineEdit" name="Raw_CMDEdit"/>
|
<widget class="QLineEdit" name="Raw_CMDEdit">
|
||||||
|
<property name="clearButtonEnabled">
|
||||||
|
<bool>true</bool>
|
||||||
|
</property>
|
||||||
|
</widget>
|
||||||
</item>
|
</item>
|
||||||
<item>
|
<item>
|
||||||
<widget class="QPushButton" name="Raw_sendCMDButton">
|
<widget class="QPushButton" name="Raw_sendCMDButton">
|
||||||
@@ -1995,7 +2653,7 @@ or the communication between a tag and a reader.</string>
|
|||||||
<item>
|
<item>
|
||||||
<widget class="QLabel" name="label_11">
|
<widget class="QLabel" name="label_11">
|
||||||
<property name="text">
|
<property name="text">
|
||||||
<string>Preload script path:</string>
|
<string>Preload script path(Reconnect to apply):</string>
|
||||||
</property>
|
</property>
|
||||||
</widget>
|
</widget>
|
||||||
</item>
|
</item>
|
||||||
@@ -2009,9 +2667,7 @@ or the communication between a tag and a reader.</string>
|
|||||||
<item>
|
<item>
|
||||||
<widget class="QLabel" name="label_13">
|
<widget class="QLabel" name="label_13">
|
||||||
<property name="text">
|
<property name="text">
|
||||||
<string>Note:
|
<string>If the client requires some enviroment variables, you can make a script file(*.bat on Windows or *.sh on Linux) to configure them, then put the path of the script there.</string>
|
||||||
If the client requires some enviroment variables, you can make a script file(*.bat on Windows or *.sh on Linux) to configure them,
|
|
||||||
then put the path of the script there</string>
|
|
||||||
</property>
|
</property>
|
||||||
<property name="wordWrap">
|
<property name="wordWrap">
|
||||||
<bool>true</bool>
|
<bool>true</bool>
|
||||||
@@ -2028,12 +2684,10 @@ then put the path of the script there</string>
|
|||||||
<item>
|
<item>
|
||||||
<widget class="QLabel" name="label_19">
|
<widget class="QLabel" name="label_19">
|
||||||
<property name="text">
|
<property name="text">
|
||||||
<string>Client working directory:</string>
|
<string>Client working directory(Reconnect to apply):</string>
|
||||||
</property>
|
</property>
|
||||||
</widget>
|
</widget>
|
||||||
</item>
|
</item>
|
||||||
<item>
|
|
||||||
<layout class="QHBoxLayout" name="horizontalLayout_15">
|
|
||||||
<item>
|
<item>
|
||||||
<widget class="QLineEdit" name="Set_Client_workingDirEdit">
|
<widget class="QLineEdit" name="Set_Client_workingDirEdit">
|
||||||
<property name="text">
|
<property name="text">
|
||||||
@@ -2041,20 +2695,10 @@ then put the path of the script there</string>
|
|||||||
</property>
|
</property>
|
||||||
</widget>
|
</widget>
|
||||||
</item>
|
</item>
|
||||||
<item>
|
|
||||||
<widget class="QPushButton" name="Set_Client_saveWorkingDirButton">
|
|
||||||
<property name="text">
|
|
||||||
<string>Save</string>
|
|
||||||
</property>
|
|
||||||
</widget>
|
|
||||||
</item>
|
|
||||||
</layout>
|
|
||||||
</item>
|
|
||||||
<item>
|
<item>
|
||||||
<widget class="QLabel" name="label_20">
|
<widget class="QLabel" name="label_20">
|
||||||
<property name="text">
|
<property name="text">
|
||||||
<string>Note:
|
<string>On Windows, the client working directory should not be identical to the path of GUI, otherwise the client will use the wrong .dll file.</string>
|
||||||
On Windows, the client working directory should not be identical to the path of GUI, otherwise the client will use the wrong .dll file.</string>
|
|
||||||
</property>
|
</property>
|
||||||
<property name="wordWrap">
|
<property name="wordWrap">
|
||||||
<bool>true</bool>
|
<bool>true</bool>
|
||||||
@@ -2071,7 +2715,7 @@ On Windows, the client working directory should not be identical to the path of
|
|||||||
<item>
|
<item>
|
||||||
<widget class="QLabel" name="label_12">
|
<widget class="QLabel" name="label_12">
|
||||||
<property name="text">
|
<property name="text">
|
||||||
<string>Start arguments</string>
|
<string>Start arguments(Reconnect to apply):</string>
|
||||||
</property>
|
</property>
|
||||||
</widget>
|
</widget>
|
||||||
</item>
|
</item>
|
||||||
@@ -2085,10 +2729,7 @@ On Windows, the client working directory should not be identical to the path of
|
|||||||
<item>
|
<item>
|
||||||
<widget class="QLabel" name="label_14">
|
<widget class="QLabel" name="label_14">
|
||||||
<property name="text">
|
<property name="text">
|
||||||
<string>Note:
|
<string>-f is necessary because the GUI need to handle the output in time. In some cases, the arguments should be set to "-p /dev/<port> -f" or "-p <port> -f".</string>
|
||||||
-f is necessary because the GUI need to handle the output in time
|
|
||||||
In some cases the arguments should be set to "-p /dev/<port> -f"
|
|
||||||
or "-p <port> -f"</string>
|
|
||||||
</property>
|
</property>
|
||||||
<property name="wordWrap">
|
<property name="wordWrap">
|
||||||
<bool>true</bool>
|
<bool>true</bool>
|
||||||
@@ -2102,6 +2743,37 @@ or "-p <port> -f"</string>
|
|||||||
</property>
|
</property>
|
||||||
</widget>
|
</widget>
|
||||||
</item>
|
</item>
|
||||||
|
<item>
|
||||||
|
<widget class="QLabel" name="label_63">
|
||||||
|
<property name="text">
|
||||||
|
<string>Config file path(Reconnect to apply):</string>
|
||||||
|
</property>
|
||||||
|
</widget>
|
||||||
|
</item>
|
||||||
|
<item>
|
||||||
|
<widget class="QLineEdit" name="Set_Client_configPathEdit">
|
||||||
|
<property name="text">
|
||||||
|
<string>config.json</string>
|
||||||
|
</property>
|
||||||
|
</widget>
|
||||||
|
</item>
|
||||||
|
<item>
|
||||||
|
<widget class="QLabel" name="label_64">
|
||||||
|
<property name="text">
|
||||||
|
<string>Different clients require different config files. You can change the content of config file if the command format changes.</string>
|
||||||
|
</property>
|
||||||
|
<property name="wordWrap">
|
||||||
|
<bool>true</bool>
|
||||||
|
</property>
|
||||||
|
</widget>
|
||||||
|
</item>
|
||||||
|
<item>
|
||||||
|
<widget class="Line" name="line_8">
|
||||||
|
<property name="orientation">
|
||||||
|
<enum>Qt::Horizontal</enum>
|
||||||
|
</property>
|
||||||
|
</widget>
|
||||||
|
</item>
|
||||||
<item>
|
<item>
|
||||||
<layout class="QHBoxLayout" name="horizontalLayout_16">
|
<layout class="QHBoxLayout" name="horizontalLayout_16">
|
||||||
<item>
|
<item>
|
||||||
@@ -2178,7 +2850,7 @@ or "-p <port> -f"</string>
|
|||||||
</sizepolicy>
|
</sizepolicy>
|
||||||
</property>
|
</property>
|
||||||
<property name="text">
|
<property name="text">
|
||||||
<string>Keep te client active even the PM3 hardware is disconnected.(Experimental)</string>
|
<string>Keep the client active even the PM3 hardware is disconnected.(Experimental)</string>
|
||||||
</property>
|
</property>
|
||||||
<property name="wordWrap">
|
<property name="wordWrap">
|
||||||
<bool>true</bool>
|
<bool>true</bool>
|
||||||
@@ -2257,6 +2929,9 @@ or "-p <port> -f"</string>
|
|||||||
<property name="orientation">
|
<property name="orientation">
|
||||||
<enum>Qt::Horizontal</enum>
|
<enum>Qt::Horizontal</enum>
|
||||||
</property>
|
</property>
|
||||||
|
<property name="sizeType">
|
||||||
|
<enum>QSizePolicy::Minimum</enum>
|
||||||
|
</property>
|
||||||
<property name="sizeHint" stdset="0">
|
<property name="sizeHint" stdset="0">
|
||||||
<size>
|
<size>
|
||||||
<width>0</width>
|
<width>0</width>
|
||||||
|
|||||||
@@ -1,16 +1,17 @@
|
|||||||
#include "mf_attack_hardnesteddialog.h"
|
#include "mf_attack_hardnesteddialog.h"
|
||||||
#include "ui_mf_attack_hardnesteddialog.h"
|
#include "ui_mf_attack_hardnesteddialog.h"
|
||||||
|
|
||||||
MF_Attack_hardnestedDialog::MF_Attack_hardnestedDialog(int blocks, QWidget *parent) :
|
MF_Attack_hardnestedDialog::MF_Attack_hardnestedDialog(int blocks, const QVariantMap& config, QWidget *parent) :
|
||||||
QDialog(parent),
|
QDialog(parent),
|
||||||
ui(new Ui::MF_Attack_hardnestedDialog)
|
ui(new Ui::MF_Attack_hardnestedDialog)
|
||||||
{
|
{
|
||||||
ui->setupUi(this);
|
ui->setupUi(this);
|
||||||
for(int i = 0; i < blocks; i++)
|
for(int i = 0; i < blocks; i++)
|
||||||
{
|
{
|
||||||
ui->knownKeySectorBox->addItem(QString::number(i));
|
ui->knownKeyBlockBox->addItem(QString::number(i));
|
||||||
ui->targetKeySectorBox->addItem(QString::number(i));
|
ui->targetKeyBlockBox->addItem(QString::number(i));
|
||||||
}
|
}
|
||||||
|
this->config = config;
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -21,26 +22,11 @@ MF_Attack_hardnestedDialog::~MF_Attack_hardnestedDialog()
|
|||||||
|
|
||||||
void MF_Attack_hardnestedDialog::on_buttonBox_accepted()
|
void MF_Attack_hardnestedDialog::on_buttonBox_accepted()
|
||||||
{
|
{
|
||||||
if(Util::getClientType() == Util::CLIENTTYPE_OFFICIAL)
|
QString cmd = config["cmd"].toString();
|
||||||
emit sendCMD("hf mf hardnested "
|
cmd.replace("<known key block>", ui->knownKeyBlockBox->currentText());
|
||||||
+ ui->knownKeySectorBox->currentText()
|
cmd.replace("<known key type>", config["known key type"].toMap()[ui->knownKeyTypeBox->currentText()].toString());
|
||||||
+ " "
|
cmd.replace("<known key>", ui->knownKeyBox->text());
|
||||||
+ ui->knownKeyTypeBox->currentText()
|
cmd.replace("<target key block>", ui->targetKeyBlockBox->currentText());
|
||||||
+ " "
|
cmd.replace("<target key type>", config["target key type"].toMap()[ui->targetKeyTypeBox->currentText()].toString());
|
||||||
+ ui->knownKeyBox->text()
|
emit sendCMD(cmd);
|
||||||
+ " "
|
|
||||||
+ ui->targetKeySectorBox->currentText()
|
|
||||||
+ " "
|
|
||||||
+ ui->targetKeyTypeBox->currentText());
|
|
||||||
else if(Util::getClientType() == Util::CLIENTTYPE_ICEMAN) // same format in v4.9237
|
|
||||||
emit sendCMD("hf mf hardnested "
|
|
||||||
+ ui->knownKeySectorBox->currentText()
|
|
||||||
+ " "
|
|
||||||
+ ui->knownKeyTypeBox->currentText()
|
|
||||||
+ " "
|
|
||||||
+ ui->knownKeyBox->text()
|
|
||||||
+ " "
|
|
||||||
+ ui->targetKeySectorBox->currentText()
|
|
||||||
+ " "
|
|
||||||
+ ui->targetKeyTypeBox->currentText());
|
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -14,12 +14,13 @@ class MF_Attack_hardnestedDialog : public QDialog
|
|||||||
Q_OBJECT
|
Q_OBJECT
|
||||||
|
|
||||||
public:
|
public:
|
||||||
explicit MF_Attack_hardnestedDialog(int blocks, QWidget *parent = nullptr);
|
explicit MF_Attack_hardnestedDialog(int blocks, const QVariantMap& config, QWidget *parent = nullptr);
|
||||||
~MF_Attack_hardnestedDialog();
|
~MF_Attack_hardnestedDialog();
|
||||||
|
|
||||||
|
|
||||||
private:
|
private:
|
||||||
Ui::MF_Attack_hardnestedDialog *ui;
|
Ui::MF_Attack_hardnestedDialog *ui;
|
||||||
|
QVariantMap config;
|
||||||
signals:
|
signals:
|
||||||
void sendCMD(const QString& cmd);
|
void sendCMD(const QString& cmd);
|
||||||
private slots:
|
private slots:
|
||||||
|
|||||||
@@ -31,7 +31,7 @@
|
|||||||
</widget>
|
</widget>
|
||||||
</item>
|
</item>
|
||||||
<item>
|
<item>
|
||||||
<widget class="QComboBox" name="knownKeySectorBox">
|
<widget class="QComboBox" name="knownKeyBlockBox">
|
||||||
<property name="minimumSize">
|
<property name="minimumSize">
|
||||||
<size>
|
<size>
|
||||||
<width>60</width>
|
<width>60</width>
|
||||||
@@ -106,7 +106,7 @@
|
|||||||
</widget>
|
</widget>
|
||||||
</item>
|
</item>
|
||||||
<item>
|
<item>
|
||||||
<widget class="QComboBox" name="targetKeySectorBox">
|
<widget class="QComboBox" name="targetKeyBlockBox">
|
||||||
<property name="minimumSize">
|
<property name="minimumSize">
|
||||||
<size>
|
<size>
|
||||||
<width>60</width>
|
<width>60</width>
|
||||||
|
|||||||
@@ -85,15 +85,15 @@ void MF_trailerDecoderDialog::on_blockSizeChanged(int id, bool st)
|
|||||||
{
|
{
|
||||||
if(id == 4)
|
if(id == 4)
|
||||||
{
|
{
|
||||||
ui->dataBlockWidget->verticalHeaderItem(0)->setText("Block0");
|
ui->dataBlockWidget->verticalHeaderItem(0)->setText(tr("Block") + "0");
|
||||||
ui->dataBlockWidget->verticalHeaderItem(1)->setText("Block1");
|
ui->dataBlockWidget->verticalHeaderItem(1)->setText(tr("Block") + "1");
|
||||||
ui->dataBlockWidget->verticalHeaderItem(2)->setText("Block2");
|
ui->dataBlockWidget->verticalHeaderItem(2)->setText(tr("Block") + "2");
|
||||||
}
|
}
|
||||||
else if(id == 16)
|
else if(id == 16)
|
||||||
{
|
{
|
||||||
ui->dataBlockWidget->verticalHeaderItem(0)->setText("Block0~4");
|
ui->dataBlockWidget->verticalHeaderItem(0)->setText(tr("Block") + "0~4");
|
||||||
ui->dataBlockWidget->verticalHeaderItem(1)->setText("Block5~9");
|
ui->dataBlockWidget->verticalHeaderItem(1)->setText(tr("Block") + "5~9");
|
||||||
ui->dataBlockWidget->verticalHeaderItem(2)->setText("Block10~14");
|
ui->dataBlockWidget->verticalHeaderItem(2)->setText(tr("Block") + "10~14");
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
@@ -110,15 +110,15 @@ void MF_trailerDecoderDialog::setTableItem(QTableWidget* widget, int row, int co
|
|||||||
}
|
}
|
||||||
else if(accessType == Mifare::ACC_KEY_A)
|
else if(accessType == Mifare::ACC_KEY_A)
|
||||||
{
|
{
|
||||||
text = "KeyA";
|
text = tr("KeyA");
|
||||||
}
|
}
|
||||||
else if(accessType == Mifare::ACC_KEY_B)
|
else if(accessType == Mifare::ACC_KEY_B)
|
||||||
{
|
{
|
||||||
text = "KeyB";
|
text = tr("KeyB");
|
||||||
}
|
}
|
||||||
else if(accessType == Mifare::ACC_KEY_AB)
|
else if(accessType == Mifare::ACC_KEY_AB)
|
||||||
{
|
{
|
||||||
text = "KeyA+B";
|
text = tr("KeyA+B");
|
||||||
}
|
}
|
||||||
widget->item(row, column)->setText(text);
|
widget->item(row, column)->setText(text);
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
#include "mf_uid_parameterdialog.h"
|
#include "mf_uid_parameterdialog.h"
|
||||||
#include "ui_mf_uid_parameterdialog.h"
|
#include "ui_mf_uid_parameterdialog.h"
|
||||||
|
|
||||||
MF_UID_parameterDialog::MF_UID_parameterDialog(const QString& uid, const QString& atqa, const QString& sak, QWidget *parent) :
|
MF_UID_parameterDialog::MF_UID_parameterDialog(const QString& uid, const QString& atqa, const QString& sak, const QVariantMap& config, QWidget *parent) :
|
||||||
QDialog(parent),
|
QDialog(parent),
|
||||||
ui(new Ui::MF_UID_parameterDialog)
|
ui(new Ui::MF_UID_parameterDialog)
|
||||||
{
|
{
|
||||||
@@ -9,6 +9,7 @@ MF_UID_parameterDialog::MF_UID_parameterDialog(const QString& uid, const QString
|
|||||||
ui->UIDLineEdit->setText(uid);
|
ui->UIDLineEdit->setText(uid);
|
||||||
ui->ATQALineEdit->setText(atqa);
|
ui->ATQALineEdit->setText(atqa);
|
||||||
ui->SAKLineEdit->setText(sak);
|
ui->SAKLineEdit->setText(sak);
|
||||||
|
this->config = config;
|
||||||
}
|
}
|
||||||
|
|
||||||
MF_UID_parameterDialog::~MF_UID_parameterDialog()
|
MF_UID_parameterDialog::~MF_UID_parameterDialog()
|
||||||
@@ -18,18 +19,9 @@ MF_UID_parameterDialog::~MF_UID_parameterDialog()
|
|||||||
|
|
||||||
void MF_UID_parameterDialog::on_buttonBox_accepted()
|
void MF_UID_parameterDialog::on_buttonBox_accepted()
|
||||||
{
|
{
|
||||||
if(Util::getClientType() == Util::CLIENTTYPE_OFFICIAL)
|
QString cmd = config["cmd"].toString();
|
||||||
emit sendCMD("hf mf csetuid "
|
cmd.replace("<uid>", ui->UIDLineEdit->text());
|
||||||
+ ui->UIDLineEdit->text()
|
cmd.replace("<atqa>", ui->ATQALineEdit->text());
|
||||||
+ " "
|
cmd.replace("<sak>", ui->SAKLineEdit->text());
|
||||||
+ ui->ATQALineEdit->text()
|
emit sendCMD(cmd);
|
||||||
+ " "
|
|
||||||
+ ui->SAKLineEdit->text());
|
|
||||||
else if(Util::getClientType() == Util::CLIENTTYPE_ICEMAN) // same format in v4.9237
|
|
||||||
emit sendCMD("hf mf csetuid "
|
|
||||||
+ ui->UIDLineEdit->text()
|
|
||||||
+ " "
|
|
||||||
+ ui->ATQALineEdit->text()
|
|
||||||
+ " "
|
|
||||||
+ ui->SAKLineEdit->text());
|
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -14,11 +14,12 @@ class MF_UID_parameterDialog : public QDialog
|
|||||||
Q_OBJECT
|
Q_OBJECT
|
||||||
|
|
||||||
public:
|
public:
|
||||||
explicit MF_UID_parameterDialog(const QString& uid, const QString& atqa, const QString& sak, QWidget *parent = nullptr);
|
explicit MF_UID_parameterDialog(const QString& uid, const QString& atqa, const QString& sak, const QVariantMap& config, QWidget *parent = nullptr);
|
||||||
~MF_UID_parameterDialog();
|
~MF_UID_parameterDialog();
|
||||||
|
|
||||||
private:
|
private:
|
||||||
Ui::MF_UID_parameterDialog *ui;
|
Ui::MF_UID_parameterDialog *ui;
|
||||||
|
QVariantMap config;
|
||||||
signals:
|
signals:
|
||||||
void sendCMD(const QString& cmd);
|
void sendCMD(const QString& cmd);
|
||||||
private slots:
|
private slots:
|
||||||
|
|||||||