Full Code of WXjzcccc/ForensicsTool for AI

go-version 5ed566613ba1 cached
105 files
360.2 KB
109.5k tokens
387 symbols
1 requests
Download .txt
Showing preview only (405K chars total). Download the full file or copy to clipboard to get everything.
Repository: WXjzcccc/ForensicsTool
Branch: go-version
Commit: 5ed566613ba1
Files: 105
Total size: 360.2 KB

Directory structure:
gitextract_dz6g7xju/

├── .gitignore
├── LICENSE
├── README.md
├── analyzers/
│   ├── database/
│   │   └── decryptDatabaseAnalyzer.go
│   ├── extractor/
│   │   ├── infoExtractAnalyzer.go
│   │   └── tool/
│   │       ├── dbeaverTool.go
│   │       ├── finalshellTool.go
│   │       ├── hawkTool.go
│   │       ├── javaRandom.go
│   │       ├── metamaskTool.go
│   │       ├── mobaTool.go
│   │       ├── navicatTool.go
│   │       └── xshellTool.go
│   ├── passwdCalc/
│   │   └── passwdCalcAnalyzer.go
│   ├── reader/
│   │   ├── fileReader.go
│   │   └── readers/
│   │       ├── leveldbReader.go
│   │       └── mmkvReader.go
│   └── winreg/
│       ├── structs/
│       │   ├── domainAccountF.go
│       │   ├── domainAccountV.go
│       │   ├── nthash.go
│       │   ├── userF.go
│       │   └── userV.go
│       └── winRegAnalyzer.go
├── app.go
├── build/
│   ├── README.md
│   ├── darwin/
│   │   ├── Info.dev.plist
│   │   └── Info.plist
│   └── windows/
│       ├── info.json
│       ├── installer/
│       │   ├── project.nsi
│       │   └── wails_tools.nsh
│       └── wails.exe.manifest
├── frontend/
│   ├── .gitignore
│   ├── README.md
│   ├── components.d.ts
│   ├── env.d.ts
│   ├── index.html
│   ├── package.json
│   ├── package.json.md5
│   ├── pnpm-workspace.yaml
│   ├── src/
│   │   ├── App.vue
│   │   ├── assets/
│   │   │   └── styles/
│   │   │       └── main.css
│   │   ├── components/
│   │   │   ├── AppConfig.vue
│   │   │   ├── AppFooter.vue
│   │   │   ├── AppSidebar.vue
│   │   │   ├── AppTopbar.vue
│   │   │   └── Empty.vue
│   │   ├── composables/
│   │   │   ├── useLayout.js
│   │   │   └── useTableHeight.js
│   │   ├── main.ts
│   │   ├── router/
│   │   │   └── index.ts
│   │   ├── store/
│   │   │   ├── index.ts
│   │   │   └── modules/
│   │   │       └── page.ts
│   │   ├── utils.js
│   │   └── views/
│   │       ├── About.vue
│   │       ├── BruteForce.vue
│   │       ├── DataExtraction.vue
│   │       ├── DatabaseDecrypt.vue
│   │       ├── FileReader.vue
│   │       ├── IPLocation.vue
│   │       ├── KeyCalculation.vue
│   │       ├── RegistryAnalysis.vue
│   │       └── TimestampParser.vue
│   ├── tsconfig.json
│   ├── tsconfig.node.json
│   ├── vite.config.ts
│   └── wailsjs/
│       ├── go/
│       │   ├── cracker/
│       │   │   ├── ForensicsCracker.d.ts
│       │   │   └── ForensicsCracker.js
│       │   ├── database/
│       │   │   ├── DecryptDatabase.d.ts
│       │   │   └── DecryptDatabase.js
│       │   ├── extractor/
│       │   │   ├── InfoExtractor.d.ts
│       │   │   └── InfoExtractor.js
│       │   ├── ip/
│       │   │   ├── IP.d.ts
│       │   │   └── IP.js
│       │   ├── main/
│       │   │   ├── App.d.ts
│       │   │   └── App.js
│       │   ├── models.ts
│       │   ├── passwdCalc/
│       │   │   ├── PasswdCalc.d.ts
│       │   │   └── PasswdCalc.js
│       │   ├── reader/
│       │   │   ├── FileReader.d.ts
│       │   │   └── FileReader.js
│       │   ├── timestamp/
│       │   │   ├── TimeStampParser.d.ts
│       │   │   └── TimeStampParser.js
│       │   └── winreg/
│       │       ├── Reg.d.ts
│       │       └── Reg.js
│       └── runtime/
│           ├── package.json
│           ├── runtime.d.ts
│           └── runtime.js
├── go.mod
├── go.sum
├── main.go
├── scripts/
│   ├── build-macos-arm.sh
│   ├── build-macos-intel.sh
│   ├── build-macos.sh
│   ├── build-windows.sh
│   ├── build.sh
│   └── install-wails-cli.sh
├── tools/
│   ├── cracker/
│   │   ├── airdrop.go
│   │   ├── cracker.go
│   │   └── wxuin.go
│   ├── ip/
│   │   └── cz.go
│   └── timestamp/
│       └── time.go
├── utils/
│   ├── hash.go
│   ├── timestamp.go
│   └── utf16.go
└── wails.json

================================================
FILE CONTENTS
================================================

================================================
FILE: .gitignore
================================================
frontend/node_modules
frontend/dist
build/bin
.idea
*_test.go
logs
*.log
.trae
*.ipdb
AGENTS.md


================================================
FILE: LICENSE
================================================
                    GNU GENERAL PUBLIC LICENSE
                       Version 3, 29 June 2007

 Copyright (C) 2007 Free Software Foundation, Inc. <https://fsf.org/>
 Everyone is permitted to copy and distribute verbatim copies
 of this license document, but changing it is not allowed.

                            Preamble

  The GNU General Public License is a free, copyleft license for
software and other kinds of works.

  The licenses for most software and other practical works are designed
to take away your freedom to share and change the works.  By contrast,
the GNU General Public License is intended to guarantee your freedom to
share and change all versions of a program--to make sure it remains free
software for all its users.  We, the Free Software Foundation, use the
GNU General Public License for most of our software; it applies also to
any other work released this way by its authors.  You can apply it to
your programs, too.

  When we speak of free software, we are referring to freedom, 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
them if you wish), that you receive source code or can get it if you
want it, that you can change the software or use pieces of it in new
free programs, and that you know you can do these things.

  To protect your rights, we need to prevent others from denying you
these rights or asking you to surrender the rights.  Therefore, you have
certain responsibilities if you distribute copies of the software, or if
you modify it: responsibilities to respect the freedom of others.

  For example, if you distribute copies of such a program, whether
gratis or for a fee, you must pass on to the recipients the same
freedoms that you received.  You must make sure that they, too, receive
or can get the source code.  And you must show them these terms so they
know their rights.

  Developers that use the GNU GPL protect your rights with two steps:
(1) assert copyright on the software, and (2) offer you this License
giving you legal permission to copy, distribute and/or modify it.

  For the developers' and authors' protection, the GPL clearly explains
that there is no warranty for this free software.  For both users' and
authors' sake, the GPL requires that modified versions be marked as
changed, so that their problems will not be attributed erroneously to
authors of previous versions.

  Some devices are designed to deny users access to install or run
modified versions of the software inside them, although the manufacturer
can do so.  This is fundamentally incompatible with the aim of
protecting users' freedom to change the software.  The systematic
pattern of such abuse occurs in the area of products for individuals to
use, which is precisely where it is most unacceptable.  Therefore, we
have designed this version of the GPL to prohibit the practice for those
products.  If such problems arise substantially in other domains, we
stand ready to extend this provision to those domains in future versions
of the GPL, as needed to protect the freedom of users.

  Finally, every program is threatened constantly by software patents.
States should not allow patents to restrict development and use of
software on general-purpose computers, but in those that do, we wish to
avoid the special danger that patents applied to a free program could
make it effectively proprietary.  To prevent this, the GPL assures that
patents cannot be used to render the program non-free.

  The precise terms and conditions for copying, distribution and
modification follow.

                       TERMS AND CONDITIONS

  0. Definitions.

  "This License" refers to version 3 of the GNU General Public License.

  "Copyright" also means copyright-like laws that apply to other kinds of
works, such as semiconductor masks.

  "The Program" refers to any copyrightable work licensed under this
License.  Each licensee is addressed as "you".  "Licensees" and
"recipients" may be individuals or organizations.

  To "modify" a work means to copy from or adapt all or part of the work
in a fashion requiring copyright permission, other than the making of an
exact copy.  The resulting work is called a "modified version" of the
earlier work or a work "based on" the earlier work.

  A "covered work" means either the unmodified Program or a work based
on the Program.

  To "propagate" a work means to do anything with it that, without
permission, would make you directly or secondarily liable for
infringement under applicable copyright law, except executing it on a
computer or modifying a private copy.  Propagation includes copying,
distribution (with or without modification), making available to the
public, and in some countries other activities as well.

  To "convey" a work means any kind of propagation that enables other
parties to make or receive copies.  Mere interaction with a user through
a computer network, with no transfer of a copy, is not conveying.

  An interactive user interface displays "Appropriate Legal Notices"
to the extent that it includes a convenient and prominently visible
feature that (1) displays an appropriate copyright notice, and (2)
tells the user that there is no warranty for the work (except to the
extent that warranties are provided), that licensees may convey the
work under this License, and how to view a copy of this License.  If
the interface presents a list of user commands or options, such as a
menu, a prominent item in the list meets this criterion.

  1. Source Code.

  The "source code" for a work means the preferred form of the work
for making modifications to it.  "Object code" means any non-source
form of a work.

  A "Standard Interface" means an interface that either is an official
standard defined by a recognized standards body, or, in the case of
interfaces specified for a particular programming language, one that
is widely used among developers working in that language.

  The "System Libraries" of an executable work include anything, other
than the work as a whole, that (a) is included in the normal form of
packaging a Major Component, but which is not part of that Major
Component, and (b) serves only to enable use of the work with that
Major Component, or to implement a Standard Interface for which an
implementation is available to the public in source code form.  A
"Major Component", in this context, means a major essential component
(kernel, window system, and so on) of the specific operating system
(if any) on which the executable work runs, or a compiler used to
produce the work, or an object code interpreter used to run it.

  The "Corresponding Source" for a work in object code form means all
the source code needed to generate, install, and (for an executable
work) run the object code and to modify the work, including scripts to
control those activities.  However, it does not include the work's
System Libraries, or general-purpose tools or generally available free
programs which are used unmodified in performing those activities but
which are not part of the work.  For example, Corresponding Source
includes interface definition files associated with source files for
the work, and the source code for shared libraries and dynamically
linked subprograms that the work is specifically designed to require,
such as by intimate data communication or control flow between those
subprograms and other parts of the work.

  The Corresponding Source need not include anything that users
can regenerate automatically from other parts of the Corresponding
Source.

  The Corresponding Source for a work in source code form is that
same work.

  2. Basic Permissions.

  All rights granted under this License are granted for the term of
copyright on the Program, and are irrevocable provided the stated
conditions are met.  This License explicitly affirms your unlimited
permission to run the unmodified Program.  The output from running a
covered work is covered by this License only if the output, given its
content, constitutes a covered work.  This License acknowledges your
rights of fair use or other equivalent, as provided by copyright law.

  You may make, run and propagate covered works that you do not
convey, without conditions so long as your license otherwise remains
in force.  You may convey covered works to others for the sole purpose
of having them make modifications exclusively for you, or provide you
with facilities for running those works, provided that you comply with
the terms of this License in conveying all material for which you do
not control copyright.  Those thus making or running the covered works
for you must do so exclusively on your behalf, under your direction
and control, on terms that prohibit them from making any copies of
your copyrighted material outside their relationship with you.

  Conveying under any other circumstances is permitted solely under
the conditions stated below.  Sublicensing is not allowed; section 10
makes it unnecessary.

  3. Protecting Users' Legal Rights From Anti-Circumvention Law.

  No covered work shall be deemed part of an effective technological
measure under any applicable law fulfilling obligations under article
11 of the WIPO copyright treaty adopted on 20 December 1996, or
similar laws prohibiting or restricting circumvention of such
measures.

  When you convey a covered work, you waive any legal power to forbid
circumvention of technological measures to the extent such circumvention
is effected by exercising rights under this License with respect to
the covered work, and you disclaim any intention to limit operation or
modification of the work as a means of enforcing, against the work's
users, your or third parties' legal rights to forbid circumvention of
technological measures.

  4. Conveying Verbatim Copies.

  You may convey verbatim copies of the Program's source code as you
receive it, in any medium, provided that you conspicuously and
appropriately publish on each copy an appropriate copyright notice;
keep intact all notices stating that this License and any
non-permissive terms added in accord with section 7 apply to the code;
keep intact all notices of the absence of any warranty; and give all
recipients a copy of this License along with the Program.

  You may charge any price or no price for each copy that you convey,
and you may offer support or warranty protection for a fee.

  5. Conveying Modified Source Versions.

  You may convey a work based on the Program, or the modifications to
produce it from the Program, in the form of source code under the
terms of section 4, provided that you also meet all of these conditions:

    a) The work must carry prominent notices stating that you modified
    it, and giving a relevant date.

    b) The work must carry prominent notices stating that it is
    released under this License and any conditions added under section
    7.  This requirement modifies the requirement in section 4 to
    "keep intact all notices".

    c) You must license the entire work, as a whole, under this
    License to anyone who comes into possession of a copy.  This
    License will therefore apply, along with any applicable section 7
    additional terms, to the whole of the work, and all its parts,
    regardless of how they are packaged.  This License gives no
    permission to license the work in any other way, but it does not
    invalidate such permission if you have separately received it.

    d) If the work has interactive user interfaces, each must display
    Appropriate Legal Notices; however, if the Program has interactive
    interfaces that do not display Appropriate Legal Notices, your
    work need not make them do so.

  A compilation of a covered work with other separate and independent
works, which are not by their nature extensions of the covered work,
and which are not combined with it such as to form a larger program,
in or on a volume of a storage or distribution medium, is called an
"aggregate" if the compilation and its resulting copyright are not
used to limit the access or legal rights of the compilation's users
beyond what the individual works permit.  Inclusion of a covered work
in an aggregate does not cause this License to apply to the other
parts of the aggregate.

  6. Conveying Non-Source Forms.

  You may convey a covered work in object code form under the terms
of sections 4 and 5, provided that you also convey the
machine-readable Corresponding Source under the terms of this License,
in one of these ways:

    a) Convey the object code in, or embodied in, a physical product
    (including a physical distribution medium), accompanied by the
    Corresponding Source fixed on a durable physical medium
    customarily used for software interchange.

    b) Convey the object code in, or embodied in, a physical product
    (including a physical distribution medium), accompanied by a
    written offer, valid for at least three years and valid for as
    long as you offer spare parts or customer support for that product
    model, to give anyone who possesses the object code either (1) a
    copy of the Corresponding Source for all the software in the
    product that is covered by this License, on a durable physical
    medium customarily used for software interchange, for a price no
    more than your reasonable cost of physically performing this
    conveying of source, or (2) access to copy the
    Corresponding Source from a network server at no charge.

    c) Convey individual copies of the object code with a copy of the
    written offer to provide the Corresponding Source.  This
    alternative is allowed only occasionally and noncommercially, and
    only if you received the object code with such an offer, in accord
    with subsection 6b.

    d) Convey the object code by offering access from a designated
    place (gratis or for a charge), and offer equivalent access to the
    Corresponding Source in the same way through the same place at no
    further charge.  You need not require recipients to copy the
    Corresponding Source along with the object code.  If the place to
    copy the object code is a network server, the Corresponding Source
    may be on a different server (operated by you or a third party)
    that supports equivalent copying facilities, provided you maintain
    clear directions next to the object code saying where to find the
    Corresponding Source.  Regardless of what server hosts the
    Corresponding Source, you remain obligated to ensure that it is
    available for as long as needed to satisfy these requirements.

    e) Convey the object code using peer-to-peer transmission, provided
    you inform other peers where the object code and Corresponding
    Source of the work are being offered to the general public at no
    charge under subsection 6d.

  A separable portion of the object code, whose source code is excluded
from the Corresponding Source as a System Library, need not be
included in conveying the object code work.

  A "User Product" is either (1) a "consumer product", which means any
tangible personal property which is normally used for personal, family,
or household purposes, or (2) anything designed or sold for incorporation
into a dwelling.  In determining whether a product is a consumer product,
doubtful cases shall be resolved in favor of coverage.  For a particular
product received by a particular user, "normally used" refers to a
typical or common use of that class of product, regardless of the status
of the particular user or of the way in which the particular user
actually uses, or expects or is expected to use, the product.  A product
is a consumer product regardless of whether the product has substantial
commercial, industrial or non-consumer uses, unless such uses represent
the only significant mode of use of the product.

  "Installation Information" for a User Product means any methods,
procedures, authorization keys, or other information required to install
and execute modified versions of a covered work in that User Product from
a modified version of its Corresponding Source.  The information must
suffice to ensure that the continued functioning of the modified object
code is in no case prevented or interfered with solely because
modification has been made.

  If you convey an object code work under this section in, or with, or
specifically for use in, a User Product, and the conveying occurs as
part of a transaction in which the right of possession and use of the
User Product is transferred to the recipient in perpetuity or for a
fixed term (regardless of how the transaction is characterized), the
Corresponding Source conveyed under this section must be accompanied
by the Installation Information.  But this requirement does not apply
if neither you nor any third party retains the ability to install
modified object code on the User Product (for example, the work has
been installed in ROM).

  The requirement to provide Installation Information does not include a
requirement to continue to provide support service, warranty, or updates
for a work that has been modified or installed by the recipient, or for
the User Product in which it has been modified or installed.  Access to a
network may be denied when the modification itself materially and
adversely affects the operation of the network or violates the rules and
protocols for communication across the network.

  Corresponding Source conveyed, and Installation Information provided,
in accord with this section must be in a format that is publicly
documented (and with an implementation available to the public in
source code form), and must require no special password or key for
unpacking, reading or copying.

  7. Additional Terms.

  "Additional permissions" are terms that supplement the terms of this
License by making exceptions from one or more of its conditions.
Additional permissions that are applicable to the entire Program shall
be treated as though they were included in this License, to the extent
that they are valid under applicable law.  If additional permissions
apply only to part of the Program, that part may be used separately
under those permissions, but the entire Program remains governed by
this License without regard to the additional permissions.

  When you convey a copy of a covered work, you may at your option
remove any additional permissions from that copy, or from any part of
it.  (Additional permissions may be written to require their own
removal in certain cases when you modify the work.)  You may place
additional permissions on material, added by you to a covered work,
for which you have or can give appropriate copyright permission.

  Notwithstanding any other provision of this License, for material you
add to a covered work, you may (if authorized by the copyright holders of
that material) supplement the terms of this License with terms:

    a) Disclaiming warranty or limiting liability differently from the
    terms of sections 15 and 16 of this License; or

    b) Requiring preservation of specified reasonable legal notices or
    author attributions in that material or in the Appropriate Legal
    Notices displayed by works containing it; or

    c) Prohibiting misrepresentation of the origin of that material, or
    requiring that modified versions of such material be marked in
    reasonable ways as different from the original version; or

    d) Limiting the use for publicity purposes of names of licensors or
    authors of the material; or

    e) Declining to grant rights under trademark law for use of some
    trade names, trademarks, or service marks; or

    f) Requiring indemnification of licensors and authors of that
    material by anyone who conveys the material (or modified versions of
    it) with contractual assumptions of liability to the recipient, for
    any liability that these contractual assumptions directly impose on
    those licensors and authors.

  All other non-permissive additional terms are considered "further
restrictions" within the meaning of section 10.  If the Program as you
received it, or any part of it, contains a notice stating that it is
governed by this License along with a term that is a further
restriction, you may remove that term.  If a license document contains
a further restriction but permits relicensing or conveying under this
License, you may add to a covered work material governed by the terms
of that license document, provided that the further restriction does
not survive such relicensing or conveying.

  If you add terms to a covered work in accord with this section, you
must place, in the relevant source files, a statement of the
additional terms that apply to those files, or a notice indicating
where to find the applicable terms.

  Additional terms, permissive or non-permissive, may be stated in the
form of a separately written license, or stated as exceptions;
the above requirements apply either way.

  8. Termination.

  You may not propagate or modify a covered work except as expressly
provided under this License.  Any attempt otherwise to propagate or
modify it is void, and will automatically terminate your rights under
this License (including any patent licenses granted under the third
paragraph of section 11).

  However, if you cease all violation of this License, then your
license from a particular copyright holder is reinstated (a)
provisionally, unless and until the copyright holder explicitly and
finally terminates your license, and (b) permanently, if the copyright
holder fails to notify you of the violation by some reasonable means
prior to 60 days after the cessation.

  Moreover, your license from a particular copyright holder is
reinstated permanently if the copyright holder notifies you of the
violation by some reasonable means, this is the first time you have
received notice of violation of this License (for any work) from that
copyright holder, and you cure the violation prior to 30 days after
your receipt of the notice.

  Termination of your rights under this section does not terminate the
licenses of parties who have received copies or rights from you under
this License.  If your rights have been terminated and not permanently
reinstated, you do not qualify to receive new licenses for the same
material under section 10.

  9. Acceptance Not Required for Having Copies.

  You are not required to accept this License in order to receive or
run a copy of the Program.  Ancillary propagation of a covered work
occurring solely as a consequence of using peer-to-peer transmission
to receive a copy likewise does not require acceptance.  However,
nothing other than this License grants you permission to propagate or
modify any covered work.  These actions infringe copyright if you do
not accept this License.  Therefore, by modifying or propagating a
covered work, you indicate your acceptance of this License to do so.

  10. Automatic Licensing of Downstream Recipients.

  Each time you convey a covered work, the recipient automatically
receives a license from the original licensors, to run, modify and
propagate that work, subject to this License.  You are not responsible
for enforcing compliance by third parties with this License.

  An "entity transaction" is a transaction transferring control of an
organization, or substantially all assets of one, or subdividing an
organization, or merging organizations.  If propagation of a covered
work results from an entity transaction, each party to that
transaction who receives a copy of the work also receives whatever
licenses to the work the party's predecessor in interest had or could
give under the previous paragraph, plus a right to possession of the
Corresponding Source of the work from the predecessor in interest, if
the predecessor has it or can get it with reasonable efforts.

  You may not impose any further restrictions on the exercise of the
rights granted or affirmed under this License.  For example, you may
not impose a license fee, royalty, or other charge for exercise of
rights granted under this License, and you may not initiate litigation
(including a cross-claim or counterclaim in a lawsuit) alleging that
any patent claim is infringed by making, using, selling, offering for
sale, or importing the Program or any portion of it.

  11. Patents.

  A "contributor" is a copyright holder who authorizes use under this
License of the Program or a work on which the Program is based.  The
work thus licensed is called the contributor's "contributor version".

  A contributor's "essential patent claims" are all patent claims
owned or controlled by the contributor, whether already acquired or
hereafter acquired, that would be infringed by some manner, permitted
by this License, of making, using, or selling its contributor version,
but do not include claims that would be infringed only as a
consequence of further modification of the contributor version.  For
purposes of this definition, "control" includes the right to grant
patent sublicenses in a manner consistent with the requirements of
this License.

  Each contributor grants you a non-exclusive, worldwide, royalty-free
patent license under the contributor's essential patent claims, to
make, use, sell, offer for sale, import and otherwise run, modify and
propagate the contents of its contributor version.

  In the following three paragraphs, a "patent license" is any express
agreement or commitment, however denominated, not to enforce a patent
(such as an express permission to practice a patent or covenant not to
sue for patent infringement).  To "grant" such a patent license to a
party means to make such an agreement or commitment not to enforce a
patent against the party.

  If you convey a covered work, knowingly relying on a patent license,
and the Corresponding Source of the work is not available for anyone
to copy, free of charge and under the terms of this License, through a
publicly available network server or other readily accessible means,
then you must either (1) cause the Corresponding Source to be so
available, or (2) arrange to deprive yourself of the benefit of the
patent license for this particular work, or (3) arrange, in a manner
consistent with the requirements of this License, to extend the patent
license to downstream recipients.  "Knowingly relying" means you have
actual knowledge that, but for the patent license, your conveying the
covered work in a country, or your recipient's use of the covered work
in a country, would infringe one or more identifiable patents in that
country that you have reason to believe are valid.

  If, pursuant to or in connection with a single transaction or
arrangement, you convey, or propagate by procuring conveyance of, a
covered work, and grant a patent license to some of the parties
receiving the covered work authorizing them to use, propagate, modify
or convey a specific copy of the covered work, then the patent license
you grant is automatically extended to all recipients of the covered
work and works based on it.

  A patent license is "discriminatory" if it does not include within
the scope of its coverage, prohibits the exercise of, or is
conditioned on the non-exercise of one or more of the rights that are
specifically granted under this License.  You may not convey a covered
work if you are a party to an arrangement with a third party that is
in the business of distributing software, under which you make payment
to the third party based on the extent of your activity of conveying
the work, and under which the third party grants, to any of the
parties who would receive the covered work from you, a discriminatory
patent license (a) in connection with copies of the covered work
conveyed by you (or copies made from those copies), or (b) primarily
for and in connection with specific products or compilations that
contain the covered work, unless you entered into that arrangement,
or that patent license was granted, prior to 28 March 2007.

  Nothing in this License shall be construed as excluding or limiting
any implied license or other defenses to infringement that may
otherwise be available to you under applicable patent law.

  12. No Surrender of Others' Freedom.

  If 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 convey a
covered work so as to satisfy simultaneously your obligations under this
License and any other pertinent obligations, then as a consequence you may
not convey it at all.  For example, if you agree to terms that obligate you
to collect a royalty for further conveying from those to whom you convey
the Program, the only way you could satisfy both those terms and this
License would be to refrain entirely from conveying the Program.

  13. Use with the GNU Affero General Public License.

  Notwithstanding any other provision of this License, you have
permission to link or combine any covered work with a work licensed
under version 3 of the GNU Affero General Public License into a single
combined work, and to convey the resulting work.  The terms of this
License will continue to apply to the part which is the covered work,
but the special requirements of the GNU Affero General Public License,
section 13, concerning interaction through a network will apply to the
combination as such.

  14. Revised Versions of this License.

  The Free Software Foundation may publish revised and/or new versions of
the GNU 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
Program specifies that a certain numbered version of the GNU General
Public License "or any later version" applies to it, you have the
option of following the terms and conditions either of that numbered
version or of any later version published by the Free Software
Foundation.  If the Program does not specify a version number of the
GNU General Public License, you may choose any version ever published
by the Free Software Foundation.

  If the Program specifies that a proxy can decide which future
versions of the GNU General Public License can be used, that proxy's
public statement of acceptance of a version permanently authorizes you
to choose that version for the Program.

  Later license versions may give you additional or different
permissions.  However, no additional obligations are imposed on any
author or copyright holder as a result of your choosing to follow a
later version.

  15. Disclaimer of Warranty.

  THERE IS NO WARRANTY FOR THE PROGRAM, TO THE EXTENT PERMITTED BY
APPLICABLE LAW.  EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT
HOLDERS AND/OR OTHER PARTIES PROVIDE THE PROGRAM "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 PROGRAM
IS WITH YOU.  SHOULD THE PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF
ALL NECESSARY SERVICING, REPAIR OR CORRECTION.

  16. Limitation of Liability.

  IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING
WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MODIFIES AND/OR CONVEYS
THE PROGRAM 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 PROGRAM (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 PROGRAM TO OPERATE WITH ANY OTHER PROGRAMS),
EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF
SUCH DAMAGES.

  17. Interpretation of Sections 15 and 16.

  If the disclaimer of warranty and limitation of liability provided
above cannot be given local legal effect according to their terms,
reviewing courts shall apply local law that most closely approximates
an absolute waiver of all civil liability in connection with the
Program, unless a warranty or assumption of liability accompanies a
copy of the Program in return for a fee.

                     END OF TERMS AND CONDITIONS

            How to Apply These Terms to Your New Programs

  If you develop a new program, and you want it to be of the greatest
possible use to the public, the best way to achieve this is to make it
free software which everyone can redistribute and change under these terms.

  To do so, attach the following notices to the program.  It is safest
to attach them to the start of each source file to most effectively
state 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 program's name and a brief idea of what it does.>
    Copyright (C) <year>  <name of author>

    This program is free software: you can redistribute it and/or modify
    it under the terms of the GNU General Public License as published by
    the Free Software Foundation, either version 3 of the License, or
    (at your option) any later version.

    This program 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 General Public License for more details.

    You should have received a copy of the GNU General Public License
    along with this program.  If not, see <https://www.gnu.org/licenses/>.

Also add information on how to contact you by electronic and paper mail.

  If the program does terminal interaction, make it output a short
notice like this when it starts in an interactive mode:

    <program>  Copyright (C) <year>  <name of author>
    This program comes with ABSOLUTELY NO WARRANTY; for details type `show w'.
    This is free software, and you are welcome to redistribute it
    under certain conditions; type `show c' for details.

The hypothetical commands `show w' and `show c' should show the appropriate
parts of the General Public License.  Of course, your program's commands
might be different; for a GUI interface, you would use an "about box".

  You should also get your employer (if you work as a programmer) or school,
if any, to sign a "copyright disclaimer" for the program, if necessary.
For more information on this, and how to apply and follow the GNU GPL, see
<https://www.gnu.org/licenses/>.

  The GNU General Public License does not permit incorporating your program
into proprietary programs.  If your program is a subroutine library, you
may consider it more useful to permit linking proprietary applications with
the library.  If this is what you want to do, use the GNU Lesser General
Public License instead of this License.  But first, please read
<https://www.gnu.org/licenses/why-not-lgpl.html>.

================================================
FILE: README.md
================================================
# 说明
这是ForensicsTool的Go版本,使用`Wails V2`进行了重构,使用方式和之前一致,有需要的可以自己编译,`wails build`即可

包含安卓端(SQLite数据库等)、windows端(注册表、远程管理工具等)、时间戳、暴力破解等功能。

![alt text](imgs/image.png)

菜单栏现在可以收缩,小提示现在从右侧弹出

![alt text](imgs/image-1.png)

为了完成这个项目,fork并修改了几个库,用于适配分析
* https://github.com/WXjzcccc/registry
* https://github.com/WXjzcccc/go-sqlcipher
* https://github.com/WXjzcccc/go-mmkv

# 声明

本工具仅用于电子数据取证的学习与研究,请勿用于非法用途,否则后果自负。


================================================
FILE: analyzers/database/decryptDatabaseAnalyzer.go
================================================
package database

import (
	"ForensicsTool/utils"
	"bytes"
	"context"
	"database/sql"
	"encoding/hex"
	"fmt"
	"io"
	"net/url"
	"os"
	"path/filepath"
	"strings"

	_ "github.com/WXjzcccc/go-sqlcipher"
	"github.com/deatil/go-cryptobin/cryptobin/crypto"
)

const (
	EnMicroMsgDecryptPragma = "_pragma_cipher_compatibility=1"
	FTSIndexDecryptPragma   = "_pragma_kdf_iter=64000&_pragma_cipher_kdf_algorithm=PBKDF2_HMAC_SHA1&_pragma_cipher_hmac_algorithm=HMAC_SHA1"
	SQLCipher4Pragma        = ""
	SQLCipher3Pragma        = "_pragma_cipher_page_size=1024&_pragma_kdf_iter=64000&_pragma_cipher_kdf_algorithm=PBKDF2_HMAC_SHA1&_pragma_cipher_hmac_algorithm=HMAC_SHA1"
	WcdbPragma              = "_pragma_cipher_page_size=4096&_pragma_kdf_iter=64000&_pragma_cipher_kdf_algorithm=PBKDF2_HMAC_SHA1&_pragma_cipher_hmac_algorithm=HMAC_SHA1"
	NtqqPragma              = "_pragma_cipher_page_size=4096&_pragma_kdf_iter=4000&_pragma_cipher_kdf_algorithm=PBKDF2_HMAC_SHA512"
	FTSIndexDB              = 0
	SQLCipher4DB            = 1
	SQLCipher3DB            = 2
	WCdbDB                  = 3
)

type DecryptDatabase struct {
	ctx context.Context
}

func NewDecryptDatabase() *DecryptDatabase {
	return &DecryptDatabase{}
}

type DecryptResult struct {
	SavePath string `json:"save_path"`
	Wxid     string `json:"wxid"`
	Err      string `json:"err"`
}

func (d *DecryptDatabase) InitCtx(ctx context.Context) {
	d.ctx = ctx
}

func moveElementToFirst(slice []string, element string) []string {
	idx := 0
	for i, v := range slice {
		if v == element {
			idx = i
			break
		}
	}
	// 创建一个新的切片,长度为原切片长度
	newSlice := make([]string, len(slice))

	// 将目标元素放到新切片的第一个位置
	newSlice[0] = slice[idx]

	copy(newSlice[1:idx+1], slice[0:idx])
	copy(newSlice[1+idx:], slice[idx+1:])

	return newSlice
}

func decryptSql(dbPath string) (string, string) {
	dbName := "a" + strings.Replace(filepath.Base(dbPath), ".", "", -1) //数字开头的变量不被接受
	savePath := dbPath + "_dec.db"
	return fmt.Sprintf("ATTACH DATABASE '%s' AS '%s_dec' KEY '';SELECT sqlcipher_export('%s_dec');DETACH DATABASE '%s_dec';", savePath, dbName, dbName, dbName), savePath
}

func (d *DecryptDatabase) DecryptEnMicroMsg(dbPath, password string) *DecryptResult {
	/*
		@param dbPath	: 数据库路径
		@param password	: 解密密码
		@return		 	: 解密后的数据库路径、wxid、error
	*/
	fileInfo, err := os.Stat(dbPath)
	if err != nil {
		return &DecryptResult{"", "", err.Error()}
	}
	if fileInfo.IsDir() {
		return &DecryptResult{"", "", fmt.Sprintf("%s is not a file", dbPath)}
	}
	pwd := url.QueryEscape(password)
	dbName := fmt.Sprintf("%s?_key=%s&%s", dbPath, pwd, EnMicroMsgDecryptPragma)
	db, err := sql.Open("sqlite3", dbName)
	if err != nil {
		return &DecryptResult{"", "", fmt.Sprintf("打开%s失败:%v", dbPath, err)}
	}
	defer db.Close()
	// 获取wxid
	selectSql := "select value from userinfo where id = 2;"
	cur, err := db.Prepare(selectSql)
	if err != nil {
		return &DecryptResult{"", "", fmt.Sprintf("准备SQL【%s】失败:%v", selectSql, err)}
	}
	var wxid string
	err = cur.QueryRow().Scan(&wxid)
	if err != nil {
		return &DecryptResult{"", "", fmt.Sprintf("读取wxid失败: %v", err)}
	}
	decCmd, savePath := decryptSql(dbPath)
	_, err = db.Exec(decCmd)
	if err != nil {
		return &DecryptResult{"", "", fmt.Sprintf("解密数据库失败:%v", err)}
	}
	return &DecryptResult{savePath, wxid, ""}
}

func (d *DecryptDatabase) decryptNormal(dbPath, password string, dbType int) *DecryptResult {
	/*
		@param dbPath	: 数据库路径
		@param password	: 解密密码
		@return		 	: 解密后的数据库路径、wxid(恒定为空字符串)、error
	*/
	fileInfo, err := os.Stat(dbPath)
	if err != nil {
		return &DecryptResult{"", "", err.Error()}
	}
	if fileInfo.IsDir() {
		return &DecryptResult{"", "", fmt.Sprintf("%s is not a file", dbPath)}
	}
	var dbName string
	pwd := url.QueryEscape(password)
	switch dbType {
	case FTSIndexDB:
		dbName = fmt.Sprintf("%s?_key=%s&%s", dbPath, pwd, FTSIndexDecryptPragma)
	case SQLCipher4DB:
		dbName = fmt.Sprintf("%s?_key=%s", dbPath, pwd)
	case SQLCipher3DB:
		dbName = fmt.Sprintf("%s?_key=%s&%s", dbPath, pwd, SQLCipher3Pragma)
	case WCdbDB:
		dbName = fmt.Sprintf("%s?_key=%s&%s", dbPath, pwd, WcdbPragma)
	default:
		return &DecryptResult{"", "", fmt.Sprintf("不支持的数据库类型:%d", dbType)}
	}
	db, err := sql.Open("sqlite3", dbName)
	if err != nil {
		return &DecryptResult{"", "", fmt.Sprintf("打开%s失败:%v", dbPath, err)}
	}
	defer db.Close()
	decCmd, savePath := decryptSql(dbPath)
	_, err = db.Exec(decCmd)
	if err != nil {
		return &DecryptResult{"", "", fmt.Sprintf("解密数据库失败:%v", err)}
	}
	return &DecryptResult{savePath, "", ""}
}

func (d *DecryptDatabase) DecryptFTSIndexDB(dbPath, password string) *DecryptResult {
	return d.decryptNormal(dbPath, password, FTSIndexDB)
}

func (d *DecryptDatabase) DecryptSQLCipher4DB(dbPath, password string) *DecryptResult {
	return d.decryptNormal(dbPath, password, SQLCipher4DB)
}

func (d *DecryptDatabase) DecryptSQLCipher3DB(dbPath, password string) *DecryptResult {
	return d.decryptNormal(dbPath, password, SQLCipher3DB)
}

func (d *DecryptDatabase) DecryptWCDB(dbPath, password string) *DecryptResult {
	return d.decryptNormal(dbPath, password, WCdbDB)
}

func (d *DecryptDatabase) DecryptNtqqDB(dbPath, password string) *DecryptResult {
	/*
		@param dbPath	: 数据库路径
		@param password	: 解密密码
		@return		 	: 解密后的数据库路径、wxid(恒定为空字符串)、error
	*/
	fileInfo, err := os.Stat(dbPath)
	if err != nil {
		return &DecryptResult{"", "", err.Error()}
	}
	if fileInfo.IsDir() {
		return &DecryptResult{"", "", fmt.Sprintf("%s is not a file", dbPath)}
	}
	pathBak := dbPath + ".bak"
	fr, err := os.OpenFile(dbPath, os.O_RDWR, 0666)
	if err != nil {
		return &DecryptResult{"", "", fmt.Sprintf("打开文件%s失败:%v", dbPath, err)}
	}
	defer fr.Close()
	_, err = os.Stat(pathBak)
	// 读取源文件内容
	data, err := os.ReadFile(dbPath)
	if err != nil {
		return &DecryptResult{"", "", fmt.Sprintf("读取文件%s失败:%v", dbPath, err)}
	}
	if os.IsNotExist(err) {
		// 备份不存在就写备份,否则不再备份,以免原始数据被修改
		fw, err := os.Create(pathBak)
		if err != nil {
			return &DecryptResult{"", "", fmt.Sprintf("创建文件%s失败:%v", pathBak, err)}
		}
		defer fw.Close()
		// 写入备份文件
		_, err = fw.Write(data)
		if err != nil {
			return &DecryptResult{"", "", fmt.Sprintf("写入文件%s失败:%v", pathBak, err)}
		}
	}
	// 提取头部和加密内容
	head := data[:1024]
	encryptedContent := data[1024:]

	// 查找 salt 的起始和结束位置
	saltStart := bytes.Index(head, []byte{0x12, 0x08}) + 2
	if saltStart < 2 {
		return &DecryptResult{"", "", "Salt start not found"}
	}
	saltEnd := bytes.Index(head, []byte{0x1a, 0x07})
	if saltEnd == -1 {
		return &DecryptResult{"", "", "Salt end not found"}
	}

	salt := string(head[saltStart:saltEnd])

	_, err = fr.Seek(0, io.SeekStart)
	if err != nil {
		return &DecryptResult{"", "", fmt.Sprintf("Error seeking in source file:%v", err)}
	}
	_, err = fr.Write(encryptedContent)
	if err != nil {
		return &DecryptResult{"", "", fmt.Sprintf("Error writing in source file:%v", err)}
	}
	key := url.QueryEscape(utils.MD5HashHex(utils.MD5HashHex(password) + salt))
	methods := []string{"HMAC_SHA1", "HMAC_SHA256", "HMAC_SHA512"}
	for _, method := range methods {
		pragma := NtqqPragma + fmt.Sprintf("&_pragma_cipher_hmac_algorithm=%s", method)
		dbName := fmt.Sprintf("%s?_key=%s&%s", dbPath, key, pragma)
		db, err := sql.Open("sqlite3", dbName)
		if err != nil {
			continue
		}
		decCmd, savePath := decryptSql(dbPath)
		_, err = db.Exec(decCmd)
		if err != nil {
			err2 := db.Close()
			if err2 != nil {
				continue
			}
			continue
		}
		err = db.Close()
		if err != nil {
			continue
		}
		return &DecryptResult{savePath, "", ""}
	}
	return &DecryptResult{"", "", "解密数据库失败"}
}

func (d *DecryptDatabase) DecryptAMapDB(dbPath string) *DecryptResult {
	/*
		@param dbPath	: 数据库路径
		@return		 	: 解密后的数据库路径、wxid(恒定为空字符串)、error
	*/
	// 获取文件大小并格式化
	fileInfo, err := os.Stat(dbPath)
	if err != nil {
		return &DecryptResult{"", "", fmt.Sprintf("获取文件%s状态失败:%v", dbPath, err)}
	}
	if fileInfo.IsDir() {
		return &DecryptResult{"", "", fmt.Sprintf("%s is not a file", dbPath)}
	}
	size := fileInfo.Size() / 1024
	uintNum := uint32(size)
	// 创建一个4字节的字节切片
	byteSlice := make([]byte, 4)

	// 将uint32转换为字节切片
	byteSlice[0] = byte(uintNum >> 24)
	byteSlice[1] = byte(uintNum >> 16)
	byteSlice[2] = byte(uintNum >> 8)
	byteSlice[3] = byte(uintNum)

	// 将字节切片转换为hex字符串
	sizeHex := hex.EncodeToString(byteSlice)
	// 固定解密密钥
	key := "a4a11bb9ef4b2f4c"

	// SQLite3固定文件头,16字节
	head := "53514C69746520666F726D6174203300"

	// 输出解密后的文件路径
	outPath := strings.Replace(dbPath, "girf_sync.db", "girf_sync_dec.db", -1)
	data, err := os.ReadFile(dbPath)
	if err != nil {
		return &DecryptResult{"", "", fmt.Sprintf("读取文件%s失败:%v", dbPath, err)}
	}

	// 获取页大小,读写、缓存等信息,原数据明文,非加密,在第3个8字节数据中给出
	prop := hex.EncodeToString(data[16:24])

	// AES解密
	decData := crypto.
		FromBytes(data).
		SetKey(key).
		Decrypt().
		ToBytes()

	// 在第93-96字节存在第25-28字节的备份数据,拿来即可
	magic := hex.EncodeToString(decData[92:96]) + sizeHex

	// 拼出新的32字节文件头
	trueHead, err := hex.DecodeString(head + prop + magic)
	if err != nil {
		return &DecryptResult{"", "", fmt.Sprintf("拼接文件头失败:%v", err)}
	}

	// 写入新文件
	newFileData := append(trueHead, decData[32:]...)
	err = os.WriteFile(outPath, newFileData, 0644)
	if err != nil {
		return &DecryptResult{"", "", fmt.Sprintf("写入文件%s失败:%v", outPath, err)}
	}

	return &DecryptResult{outPath, "", ""}
}

func (d *DecryptDatabase) DecryptDingTalkDB(dbPath, password string) *DecryptResult {
	/*
		@param dbPath	: 数据库路径
		@param password	: 解密密码
		@return		 	: 解密后的数据库路径、wxid(恒定为空字符串)、error
	*/
	fileInfo, err := os.Stat(dbPath)
	if err != nil {
		return &DecryptResult{"", "", err.Error()}
	}
	if fileInfo.IsDir() {
		return &DecryptResult{"", "", fmt.Sprintf("%s is not a file", dbPath)}
	}
	cpus := []string{"armeabi", "armeabi-v7a", "arm64-v8a", "x86", "x86_64", "mips", "mips64"}
	device := strings.Split(password, "/")
	if len(device) != 5 {
		return &DecryptResult{"", "", "密码组成不正确"}
	}
	inCpu := device[1]
	// 将cpus中与device[1]相同的元素位置移到第一个
	newCpus := moveElementToFirst(cpus, inCpu)
	outPath := strings.Replace(dbPath, ".db", "_dec.db", -1)

	// 读取文件内容
	data, err := os.ReadFile(dbPath)
	if err != nil {
		return &DecryptResult{"", "", fmt.Sprintf("读取文件%s失败:%v", dbPath, err)}
	}
	sqliteHead := "53514C69746520666F726D6174203300"
	for _, cpu := range newCpus {
		device[1] = cpu
		newDevice := strings.Join(device, "/")
		key := utils.MD5HashHex(newDevice)[:16]
		decData := crypto.
			FromBytes(data).
			SetKey(key).
			Decrypt().
			ToBytes()
		if hex.EncodeToString(decData[:16]) == strings.ToLower(sqliteHead) {
			err = os.WriteFile(outPath, decData, 0644)
			if err != nil {
				return &DecryptResult{"", "", fmt.Sprintf("写入文件%s失败: %v", outPath, err)}
			}
			return &DecryptResult{outPath, "", ""}
		}
	}
	return &DecryptResult{"", "", "解密数据库失败"}
}

func (d *DecryptDatabase) DecryptSystemDataSQLite(dbPath, password string) *DecryptResult {
	/*
		@param dbPath	: 数据库路径
		@param password	: 解密密码
		@return		 	: 解密后的数据库路径、wxid(恒定为空字符串)、error
	*/
	fileInfo, err := os.Stat(dbPath)
	if err != nil {
		return &DecryptResult{"", "", err.Error()}
	}
	if fileInfo.IsDir() {
		return &DecryptResult{"", "", fmt.Sprintf("%s is not a file", dbPath)}
	}
	file, err := os.Open(dbPath)
	savePath := dbPath + "_dec"
	decFile, err := os.Create(savePath)
	if err != nil {
		return &DecryptResult{"", "", fmt.Sprintf("打开文件%s失败:%v", dbPath, err)}
	}
	defer file.Close()
	defer decFile.Close()
	// 每1024字节进行解密
	buffer := make([]byte, 1024)
	chunkCount := 0
	for {
		// 读取数据到缓冲区
		_, err := file.Read(buffer)
		if err != nil {
			if err != io.EOF {
				return &DecryptResult{"", "", fmt.Sprintf("读取%s失败:%v", dbPath, err)}
			}
			break
		}
		chunkCount++
		key := utils.SHA1Hash(password)[:16]                                                    // 计算密钥,sha1的前16个字节
		_, err = decFile.Write(crypto.FromBytes(buffer).WithKey(key).RC4().Decrypt().ToBytes()) // 解密,写入数据
		if err != nil {
			return &DecryptResult{"", "", fmt.Sprintf("解密失败:%v", err)}
		}
	}
	data, err := os.ReadFile(savePath)
	if err != nil {
		return &DecryptResult{"", "", fmt.Sprintf("打开%s失败:%v", savePath, err)}
	}
	if hex.EncodeToString(data[:16]) != hex.EncodeToString([]byte("SQLite format 3\x00")) { // 校验前16个字节
		return &DecryptResult{"", "", "解密失败,密钥不正确"}
	}
	return &DecryptResult{savePath, "", ""}
}


================================================
FILE: analyzers/extractor/infoExtractAnalyzer.go
================================================
package extractor

import (
	"ForensicsTool/analyzers/extractor/tool"
	"context"
	"fmt"
	"github.com/iancoleman/orderedmap"
)

type InfoExtractor struct {
	ctx context.Context
}

func NewInfoExtractor() *InfoExtractor {
	return &InfoExtractor{}
}

type ExtractResult struct {
	Data []map[string]string `json:"data"`
	Err  string              `json:"err"`
}

type ExtractMapResult struct {
	Data *orderedmap.OrderedMap `json:"data"`
	Err  string                 `json:"err"`
}

func (p *InfoExtractor) InitCtx(ctx context.Context) {
	p.ctx = ctx
}

func (p *InfoExtractor) ExtractXShell(folder, sid string) *ExtractMapResult {
	/*
		@param folder:	配置文件目录
		@param sid:		用户的用户名+sid
		@return:		解析结果
	*/
	info, err := tool.AnalyzeXshell(folder, sid)
	if err != nil {
		return &ExtractMapResult{nil, fmt.Sprintf("解析失败:%v", err)}
	}
	return &ExtractMapResult{info, ""}
}

func (p *InfoExtractor) ExtractNavicat(refPath string) *ExtractMapResult {
	/*
		@param	refPath:	NTUSER.DAT注册表文件路径
		@return:			解析结果
	*/
	info, err := tool.AnalyzeNavicat(refPath)
	if err != nil {
		return &ExtractMapResult{nil, fmt.Sprintf("解析失败:%v", err)}
	}
	return &ExtractMapResult{info, ""}
}

func (p *InfoExtractor) ExtractMobaXterm(filePath, masterPwd string) *ExtractMapResult {
	/*
		@param	filePath:	注册表或配置文件路径
		@param	masterPwd:	主密码
		@return:			解析结果
	*/
	info, err := tool.AnalyzeMobaXterm(filePath, masterPwd)
	if err != nil {
		return &ExtractMapResult{nil, fmt.Sprintf("解析失败:%v", err)}
	}
	return &ExtractMapResult{info, ""}
}

func (p *InfoExtractor) ExtractDbeaver(folder string) *ExtractMapResult {
	/*
		@param	folder:	包含credentials-config.json和data-sources.json的文件夹
		@return:		解析结果
	*/
	info, err := tool.AnalyzeDbeaver(folder)
	if err != nil {
		return &ExtractMapResult{nil, fmt.Sprintf("解析失败:%v", err)}
	}
	return &ExtractMapResult{info, ""}
}

func (p *InfoExtractor) ExtractFinalShell(folder string) *ExtractMapResult {
	/*
		@param	folder:	包含连接信息的文件夹
		@return:		解析结果
	*/
	info, err := tool.AnalyzeFinalShell(folder)
	if err != nil {
		return &ExtractMapResult{nil, fmt.Sprintf("解析失败:%v", err)}
	}
	return &ExtractMapResult{info, ""}
}

func (p *InfoExtractor) ExtractHawk2(filePath, pwd string) *ExtractMapResult {
	/*
		@param	filePath:	Hawk2.xml的文件路径
		@param	pwd:		cipher_key,保存在crypto.KEY_256.xml或crypto.KEY_128.xml中
		@return:			解析结果
	*/
	info, err := tool.AnalyzeHawk2(filePath, pwd)
	if err != nil {
		return &ExtractMapResult{nil, fmt.Sprintf("解析失败:%v", err)}
	}
	return &ExtractMapResult{info, ""}
}

func (p *InfoExtractor) ExtractMetaMask(filePath string) *ExtractMapResult {
	/*
		@param	filePath:	persist-root文件路径
		@return:			解析结果
	*/
	info, err := tool.AnalyzeMetaMask(filePath)
	if err != nil {
		return &ExtractMapResult{nil, fmt.Sprintf("解析失败:%v", err)}
	}
	return &ExtractMapResult{info, ""}
}


================================================
FILE: analyzers/extractor/tool/dbeaverTool.go
================================================
package tool

import (
	"encoding/hex"
	"fmt"
	"os"
	"path/filepath"

	"github.com/deatil/go-cryptobin/cryptobin/crypto"
	"github.com/donnie4w/go-logger/logger"
	"github.com/iancoleman/orderedmap"
	"github.com/tidwall/gjson"
)

const (
	dbeaverDecryptKey = "babb4a9f774ab853c96c2d653dfe544a"
	dbeaverDecryptIV  = "00000000000000000000000000000000"
)

func decryptDbeaver(encFileData []byte) []byte {
	/*
		@param	encFileData	:	credentials-config.json文件的二进制数据
		@return				:	解密后的结果
	*/
	key, err := hex.DecodeString(dbeaverDecryptKey)
	if err != nil {
		return nil
	}
	iv, err := hex.DecodeString(dbeaverDecryptIV)
	if err != nil {
		return nil
	}
	return crypto.FromBytes(encFileData).WithKey(key).WithIv(iv).Aes().CBC().PKCS7Padding().Decrypt().ToBytes()[16:]
}

func AnalyzeDbeaver(folder string) (*orderedmap.OrderedMap, error) {
	result := orderedmap.New()
	result.SetEscapeHTML(false)
	var tmp []*orderedmap.OrderedMap
	var pwdJson gjson.Result
	var conJson gjson.Result
	fileInfo, err := os.Stat(folder)
	if err != nil {
		return nil, err
	}
	if !fileInfo.IsDir() {
		logger.Errorf("%s is not a folder", folder)
		return nil, fmt.Errorf("%s is not a folder", folder)
	}
	err = filepath.Walk(folder, func(path string, info os.FileInfo, err error) error {
		if err != nil {
			return err
		}
		if info.IsDir() {
			return nil
		}
		filename := info.Name()
		if filename == "credentials-config.json" {
			encData, err := os.ReadFile(path)
			if err != nil {
				logger.Errorf("read %s failed: %v", path, err)
				return err
			}
			decData := decryptDbeaver(encData)
			pwdJson = gjson.Parse(string(decData))
		}
		if filename == "data-sources.json" {
			conData, err := os.ReadFile(path)
			if err != nil {
				logger.Errorf("read %s failed: %v", path, err)
				return err
			}
			conJson = gjson.Parse(string(conData))
		}
		return nil
	})
	if err != nil {
		return nil, err
	}
	children := conJson.Get("connections")
	if !children.Exists() {
		logger.Errorf("data-sources.json is empty")
		return nil, fmt.Errorf("data-sources.json is empty")
	}
	children.ForEach(func(key, value gjson.Result) bool {
		info := orderedmap.New()
		info.SetEscapeHTML(false)
		info.Set("数据库类型", value.Get("provider").String())
		info.Set("连接名", value.Get("name").String())
		info.Set("地址", value.Get("configuration").Get("host").String())
		info.Set("端口", value.Get("configuration").Get("port").String())
		info.Set("数据库名", value.Get("configuration").Get("database").String())
		info.Set("账户", pwdJson.Get(key.String()).Get("#connection").Get("user").String())
		info.Set("密码", pwdJson.Get(key.String()).Get("#connection").Get("password").String())
		tmp = append(tmp, info)
		return true
	})
	result.Set("DBeaver连接信息", tmp)
	return result, nil
}


================================================
FILE: analyzers/extractor/tool/finalshellTool.go
================================================
package tool

import (
	"bytes"
	"crypto/md5"
	"encoding/base64"
	"encoding/binary"
	"fmt"
	"os"
	"path/filepath"
	"strings"

	"github.com/deatil/go-cryptobin/cryptobin/crypto"
	"github.com/donnie4w/go-logger/logger"
	"github.com/iancoleman/orderedmap"
	"github.com/tidwall/gjson"
)

func randomKey(head []byte) []byte {
	/*	使用Java的随机算法生成key
		@param	head:	加密数据的前8字节
		@return:		生成的key
	*/
	ks := int64(3680984568597093857) / int64(NewJavaRandom(int64(head[5])).NextInt(127))
	random := NewJavaRandom(ks)
	t := int(head[0])
	for i := 0; i < t; i++ {
		random.NextInt64()
	}
	n := random.NextInt64()
	r2 := NewJavaRandom(n)
	ld := []int64{int64(head[4]), r2.NextInt64(), int64(head[7]), int64(head[3]), r2.NextInt64(), int64(head[1]), random.NextInt64(), int64(head[2])}
	buf := new(bytes.Buffer)
	err := binary.Write(buf, binary.BigEndian, ld)
	if err != nil {
		logger.Errorf("binary.Write failed: %v", err)
		return nil
	}
	keyData := calMd5(buf.Bytes())
	return keyData[:8]
}

func calMd5(data []byte) []byte {
	h := md5.New()
	h.Write(data)
	return h.Sum(nil)
}

func decryptFinalShell(encData string) string {
	/*
		@param	encData:	加密的密文
		@return:			解密结果
	*/
	encBytes, err := base64.StdEncoding.DecodeString(encData)
	if err != nil {
		return ""
	}
	if encData == "" {
		return ""
	}
	return crypto.FromBytes(encBytes[8:]).WithKey(randomKey(encBytes[:8])).Des().ECB().PKCS5Padding().Decrypt().ToString()
}

func AnalyzeFinalShell(folder string) (*orderedmap.OrderedMap, error) {
	/*
		@param	folder:	保存连接配置的文件夹路径
		@return:		解析结果、错误
	*/
	result := orderedmap.New()
	result.SetEscapeHTML(false)
	var tmp []*orderedmap.OrderedMap
	var conJson gjson.Result
	fileInfo, err := os.Stat(folder)
	if err != nil {
		return nil, err
	}
	if !fileInfo.IsDir() {
		return nil, fmt.Errorf("%s is not a folder", folder)
	}
	err = filepath.Walk(folder, func(path string, info os.FileInfo, err error) error {
		if err != nil {
			return err
		}
		if info.IsDir() {
			return nil
		}
		filename := info.Name()
		if strings.HasSuffix(filename, "_connect_config.json") {
			conData, err := os.ReadFile(path)
			if err != nil {
				return err
			}
			conJson = gjson.Parse(string(conData))
			json := orderedmap.New()
			json.SetEscapeHTML(false)
			json.Set("连接名", conJson.Get("name").String())
			json.Set("地址", conJson.Get("host").String())
			json.Set("端口", conJson.Get("port").String())
			json.Set("用户名", conJson.Get("user_name").String())
			json.Set("密码", decryptFinalShell(conJson.Get("password").String()))
			tmp = append(tmp, json)
		} else if strings.HasSuffix(filename, ".json") {
			conData, err := os.ReadFile(path)
			if err != nil {
				return err
			}
			conJson = gjson.Parse(string(conData))
			json := orderedmap.New()
			json.SetEscapeHTML(false)
			json.Set("连接名", strings.Replace(filename, ".json", "", -1))
			json.Set("地址", conJson.Get("host").String())
			json.Set("端口", conJson.Get("port").String())
			json.Set("用户名", conJson.Get("user_name").String())
			json.Set("密码", decryptFinalShell(conJson.Get("password").String()))
			tmp = append(tmp, json)
		}
		return nil
	})
	if err != nil {
		return nil, err
	}
	result.Set("FinalShell连接信息", tmp)
	return result, nil
}


================================================
FILE: analyzers/extractor/tool/hawkTool.go
================================================
package tool

import (
	"encoding/base64"
	"fmt"
	"os"
	"strings"

	"github.com/beevik/etree"
	"github.com/deatil/go-cryptobin/cryptobin/crypto"
	"github.com/donnie4w/go-logger/logger"
	"github.com/iancoleman/orderedmap"
)

func decryptHawk(encData, entity, pwd string) string {
	/*
		@param	encData:	文件中的##0V@后的值
		@param	entity:		密文对应的属性命名
		@param	pwd:		cipher_key,保存在crypto.KEY_256.xml或crypto.KEY_128.xml中
		@return:			解密结果
	*/
	pwdBytes, err := base64.StdEncoding.DecodeString(pwd)
	var data []byte
	if err != nil {
		return ""
	}
	encBytes, err := base64.StdEncoding.DecodeString(encData)
	if err != nil {
		return ""
	}
	iv := encBytes[2:14]
	tag := encBytes[len(encBytes)-16:]
	data = append(data, encBytes[:2][:]...)
	data = append(data, []byte(entity)[:]...)
	encDataBytes := encBytes[14:]
	return crypto.FromBytes(encDataBytes).WithKey(pwdBytes).WithIv(iv).GCMWithTagSize(len(tag), data).Decrypt().ToString()
}

func AnalyzeHawk2(filePath, pwd string) (*orderedmap.OrderedMap, error) {
	/*
		@param	filePath:	Hawk2.xml的文件路径
		@param	pwd:		cipher_key,保存在crypto.KEY_256.xml或crypto.KEY_128.xml中
		@return:			解析结果、错误
	*/
	fileInfo, err := os.Stat(filePath)
	if err != nil {
		return nil, err
	}
	if fileInfo.IsDir() {
		logger.Errorf("%s is not a file", filePath)
		return nil, fmt.Errorf("%s is not a file", filePath)
	}
	result := orderedmap.New()
	result.SetEscapeHTML(false)
	var tmp []*orderedmap.OrderedMap
	doc := etree.NewDocument()
	if err = doc.ReadFromFile(filePath); err != nil {
		return nil, err
	}
	root := doc.Root()
	for _, element := range root.ChildElements() {
		entity := element.SelectAttr("name").Value
		if strings.Contains(element.Text(), "##0V@") {
			info := orderedmap.New()
			info.SetEscapeHTML(false)
			encData := strings.Split(element.Text(), "##0V@")[1]
			info.Set("键", entity)
			info.Set("值", decryptHawk(encData, entity, pwd))
			tmp = append(tmp, info)
		}
	}
	result.Set("Hawk2解析", tmp)
	return result, nil
}


================================================
FILE: analyzers/extractor/tool/javaRandom.go
================================================
package tool

import "github.com/donnie4w/go-logger/logger"

// JavaRandom 模拟Java的Random类
type JavaRandom struct {
	seed int64
}

func NewJavaRandom(seed int64) *JavaRandom {
	return &JavaRandom{seed: (seed ^ 0x5DEECE66D) & ((1 << 48) - 1)}
}

func (r *JavaRandom) next(bits int) int32 {
	r.seed = (r.seed*0x5DEECE66D + 0xB) & ((1 << 48) - 1)
	return int32(r.seed >> (48 - bits))
}

func (r *JavaRandom) NextInt64() int64 {
	return int64(r.next(32))<<32 + int64(r.next(32))
}

func (r *JavaRandom) NextInt(n int) int {
	if n <= 0 {
		logger.Errorf("n must be positive")
		panic("n must be positive")
	}

	// 等同于Java的Random.nextInt(n)实现
	if (n & -n) == n { // n是2的幂
		return int((int64(n) * int64(r.next(31))) >> 31)
	}

	var bits, val int32
	for {
		bits = r.next(31)
		val = bits % int32(n)
		if bits-val+(int32(n)-1) >= 0 {
			break
		}
	}
	return int(val)
}


================================================
FILE: analyzers/extractor/tool/metamaskTool.go
================================================
package tool

import (
	"ForensicsTool/utils"
	"fmt"
	"log"
	"os"
	"strconv"

	"github.com/donnie4w/go-logger/logger"
	"github.com/iancoleman/orderedmap"
	"github.com/tidwall/gjson"
)

func AnalyzeMetaMask(filePath string) (*orderedmap.OrderedMap, error) {
	/*
		@param	filePath:	persist-root文件
		@return:			解析结果、错误
	*/
	fileInfo, err := os.Stat(filePath)
	if err != nil {
		return nil, err
	}
	if fileInfo.IsDir() {
		logger.Errorf("%s is not a file", filePath)
		return nil, fmt.Errorf("%s is not a file", filePath)
	}
	result := orderedmap.New()
	result.SetEscapeHTML(false)
	var walletInfoList []*orderedmap.OrderedMap
	var contactInfoList []*orderedmap.OrderedMap
	var transactionInfoList []*orderedmap.OrderedMap
	var browserHistoryList []*orderedmap.OrderedMap
	data, err := os.ReadFile(filePath)
	if err != nil {
		return nil, err
	}
	json := gjson.ParseBytes(data)
	if json.Get("engine").Exists() {
		engine := json.Get("engine")
		browser := json.Get("browser")
		for _, arr := range engine.Get("backgroundState.AccountTrackerController.accounts").Array() {
			walletInfo := orderedmap.New()
			walletInfo.SetEscapeHTML(false)
			s := engine.Get(fmt.Sprintf("backgroundState.PreferencesController.identities.%s.importTime", arr.String())).Int()
			//t := time.UnixMicro(s)
			//importTime := t.Format("2006-01-02 15:04:05")
			importTime := utils.DefaultTimestampToDatetime(s, "", "")
			balance, err := strconv.ParseInt(engine.Get(fmt.Sprintf("backgroundState.AccountTrackerController.accounts.%s.balance", arr.String())).String(), 16, 64)
			if err != nil {
				log.Println(err)
				continue
			}
			walletInfo.Set("添加时间", importTime)
			walletInfo.Set("钱包名称", engine.Get(fmt.Sprintf("backgroundState.PreferencesController.identities.%s.name", arr)).String())
			walletInfo.Set("钱包地址", arr.String())
			walletInfo.Set("余额(ETH)", strconv.FormatInt(balance/(10^18), 10))
			walletInfoList = append(walletInfoList, walletInfo)
		}
		for _, contactId := range engine.Get("backgroundState.AccountTrackerController.addressBook").Array() {
			for _, contact := range contactId.Get(contactId.String()).Array() {
				contactInfo := orderedmap.New()
				contactInfo.SetEscapeHTML(false)
				contactInfo.Set("账户名", contact.Get("name").String())
				contactInfo.Set("钱包地址", contact.Get("address").String())
				contactInfoList = append(contactInfoList, contactInfo)
			}
		}
		for _, transaction := range engine.Get("backgroundState.TransactionController.transactions").Array() {
			transactionInfo := orderedmap.New()
			transactionInfo.SetEscapeHTML(false)
			s := transaction.Get("time").Int()
			//t := time.UnixMicro(s)
			transactionTime := utils.DefaultTimestampToDatetime(s, "", "")
			value, err := strconv.ParseInt(transaction.Get("txParams.value").String(), 16, 64)
			if err != nil {
				log.Println(err)
				continue
			}
			transactionValue := value / (10 ^ 18)
			transactionInfo.Set("交易时间", transactionTime)
			transactionInfo.Set("发送方", transaction.Get("txParams.from").String())
			transactionInfo.Set("接收方", transaction.Get("txParams.to").String())
			transactionInfo.Set("交易金额(ETH)", strconv.FormatInt(transactionValue, 10))
			transactionInfo.Set("交易哈希", transaction.Get("hash").String())
			transactionInfo.Set("错误", transaction.Get("error").String())
			transactionInfoList = append(transactionInfoList, transactionInfo)
		}
		for _, history := range browser.Get("history").Array() {
			historyInfo := orderedmap.New()
			historyInfo.SetEscapeHTML(false)
			historyInfo.Set("名称", history.Get("name").String())
			historyInfo.Set("URL", history.Get("url").String())
			browserHistoryList = append(browserHistoryList, historyInfo)
		}
		result.Set("钱包信息", walletInfoList)
		result.Set("账户信息", contactInfoList)
		result.Set("交易信息", transactionInfoList)
		result.Set("浏览历史", browserHistoryList)
	}
	return result, nil
}


================================================
FILE: analyzers/extractor/tool/mobaTool.go
================================================
package tool

import (
	"crypto/aes"
	"crypto/sha512"
	"fmt"
	"os"
	"strings"

	"github.com/WXjzcccc/registry"
	"github.com/deatil/go-cryptobin/cryptobin/crypto"
	"github.com/donnie4w/go-logger/logger"
	"github.com/iancoleman/orderedmap"
	"golang.org/x/text/encoding/simplifiedchinese"
)

func decryptMoba(ciphertext, masterPasswd string) string {
	hasher := sha512.New()
	hasher.Write([]byte(masterPasswd))
	pwd := hasher.Sum(nil)[:32]
	iv := crypto.FromHexString(strings.Repeat("00", aes.BlockSize)).WithKey(pwd).Aes().ECB().Encrypt().ToBytes()
	return crypto.FromBase64String(ciphertext).WithKey(pwd).WithIv(iv).Aes().CFB8().Decrypt().ToString()
}

func getEncFromIni(file string) ([]string, []string, error) {
	/*
		@param file	:	MobaXterm.ini配置文件路径
		@return		:	密码列表、凭据列表、错误
	*/
	content, err := os.ReadFile(file)
	if err != nil {
		logger.Errorf("failed to read ini file: %v", err)
		return nil, nil, fmt.Errorf("failed to read ini file: %v", err)
	}

	decoder := simplifiedchinese.GBK.NewDecoder()
	utf8Content, err := decoder.Bytes(content)
	if err != nil {
		logger.Errorf("failed to convert encoding: %v", err)
		return nil, nil, fmt.Errorf("failed to convert encoding: %v", err)
	}

	lines := strings.Split(string(utf8Content), "\n")

	var passwords []string
	var credentials []string

	inPasswords := false
	inCredentials := false

	for _, line := range lines {
		line = strings.TrimSpace(line)
		switch line {
		case "[Passwords]":
			inPasswords = true
			inCredentials = false
			continue
		case "[Credentials]":
			inCredentials = true
			inPasswords = false
			continue
		case "":
			inPasswords = false
			inCredentials = false
			continue
		}
		if inPasswords {
			passwords = append(passwords, line)
		}
		if inCredentials {
			credentials = append(credentials, line)
		}
	}
	return passwords, credentials, nil
}

func getPwdOrCredential(reg *registry.Key, path string) ([]string, error) {
	/*
		@param reg	:	注册表实例
		@param path	:	key路径
		@return		:	提取的数据列表,错误
	*/
	var data []string
	nameKey, err := reg.OpenSubKey(path)
	if err != nil {
		logger.Errorf("未找到保存的凭据或是密码: %v", err)
		return nil, fmt.Errorf("未找到保存的凭据或是密码: %v", err)
	}
	defer nameKey.Close()
	names, err := nameKey.ReadValueNames(-1)
	if err != nil {
		logger.Errorf("failed to read registry key: %v", err)
		return nil, fmt.Errorf("failed to read registry key: %v", err)
	}
	for _, name := range names {
		value, _, err := nameKey.GetStringValue(name)
		if err != nil {
			logger.Errorf("failed to get string value: %v", err)
			continue
		}
		data = append(data, fmt.Sprintf("%s=%s", name, value))
	}
	return data, nil
}

func getEncFromRegistry(file string) ([]string, []string, error) {
	/*
		@param file	:	NTUSER.DAT配置文件路径
		@return		:	密码列表、凭据列表、错误
	*/
	reg, err := registry.Open(file)
	if err != nil {
		logger.Errorf("failed to open registry file: %v", err)
		return nil, nil, fmt.Errorf("failed to open registry file: %v", err)
	}
	defer reg.Close()
	rootKey, err := reg.OpenKey("Software\\Mobatek\\MobaXterm")
	if err != nil {
		logger.Errorf("failed to open registry key: %v", err)
		return nil, nil, fmt.Errorf("failed to open registry key: %v", err)
	}
	defer rootKey.Close()
	passwords, _ := getPwdOrCredential(&rootKey, "P") //这俩的错误不处理
	credentials, _ := getPwdOrCredential(&rootKey, "C")
	return passwords, credentials, nil
}

func AnalyzeMobaXterm(file, masterPasswd string) (*orderedmap.OrderedMap, error) {
	/*
		@param	file:	配置文件或注册表文件
		@return:		解析结果、错误
	*/
	fileInfo, err := os.Stat(file)
	if err != nil {
		return nil, err
	}
	if fileInfo.IsDir() {
		logger.Errorf("%s is not a file", file)
		return nil, fmt.Errorf("%s is not a file", file)
	}
	result := orderedmap.New()
	result.SetEscapeHTML(false)
	var passwords []string
	var credentials []string
	if strings.HasSuffix(file, ".ini") {
		passwords, credentials, err = getEncFromIni(file)
		if err != nil {
			logger.Errorf("failed to get passwords from ini file: %v", err)
			return nil, err
		}
	} else {
		passwords, credentials, err = getEncFromRegistry(file)
		if err != nil {
			logger.Errorf("failed to get passwords from registry file: %v", err)
			return nil, err
		}
	}
	var passwordList []*orderedmap.OrderedMap
	for _, password := range passwords {
		info := orderedmap.New()
		info.SetEscapeHTML(false)
		first := ""
		if strings.Contains(password, ":") {
			firstSp := strings.Split(password, ":")
			first = firstSp[0]
		}
		idx := strings.Index(password, "=")
		server := password[len(first)+1 : idx]
		pwd := decryptMoba(password[idx+1:], masterPasswd)
		info.Set("协议与端口", first)
		info.Set("连接账户与地址", server)
		info.Set("保存的密码", pwd)
		passwordList = append(passwordList, info)
	}
	var credentialList []*orderedmap.OrderedMap
	for _, credential := range credentials {
		info := orderedmap.New()
		info.SetEscapeHTML(false)
		user := ""
		encPwd := ""
		idx := strings.Index(credential, "=")
		server := credential[:idx]
		if strings.Contains(credential[idx+1:], ":") {
			user = strings.Split(credential[idx+1:], ":")[0]
			encPwd = strings.Split(credential[idx+1:], ":")[1]
		}
		pwd := decryptMoba(encPwd, masterPasswd)
		info.Set("凭据名", server)
		info.Set("用户名", user)
		info.Set("保存的密码", pwd)
		credentialList = append(credentialList, info)
	}
	result.Set("密码信息", passwordList)
	result.Set("凭据信息", credentialList)
	return result, nil
}


================================================
FILE: analyzers/extractor/tool/navicatTool.go
================================================
package tool

import (
	"crypto/sha1"
	"encoding/hex"
	"fmt"
	"os"
	"unicode/utf8"

	"github.com/WXjzcccc/registry"
	"github.com/deatil/go-cryptobin/cryptobin/crypto"
	"github.com/donnie4w/go-logger/logger"
	"github.com/iancoleman/orderedmap"
	"golang.org/x/crypto/blowfish"
)

const (
	Navicat11KEY = "3DC5CA39"
	Navicat12KEY = "libcckeylibcckey"
	Navicat12IV  = "libcciv libcciv "
)

// Navicat11Cipher 用于 Navicat 11 版本的解密
type Navicat11Cipher struct {
	key []byte
	iv  []byte
}

func NewNavicat11Cipher(userKey string) (*Navicat11Cipher, error) {
	if userKey == "" {
		userKey = Navicat11KEY
	}

	// 初始化密钥
	hasher := sha1.New()
	hasher.Write([]byte(userKey))
	key := hasher.Sum(nil) // Blowfish 需要 4-56 字节的密钥

	// 初始化 IV
	iv, err := hex.DecodeString("FFFFFFFFFFFFFFFF")
	if err != nil {
		return nil, err
	}
	encryptedIV := crypto.FromBytes(iv).WithKey(key).Blowfish().ECB().Encrypt().ToBytes()

	return &Navicat11Cipher{
		key: key,
		iv:  encryptedIV,
	}, nil
}

func (c *Navicat11Cipher) xorBytes(a, b []byte) []byte {
	result := make([]byte, len(a))
	for i := 0; i < len(a); i++ {
		result[i] = a[i] ^ b[i]
	}
	return result
}

func (c *Navicat11Cipher) Decrypt(data []byte) []byte {
	outData := make([]byte, len(data))
	cv := make([]byte, len(c.iv))
	copy(cv, c.iv)
	blockSize := blowfish.BlockSize
	blocksLen := len(data) / blockSize
	leftLen := len(data) % blockSize
	for i := 0; i < blocksLen; i++ {
		start := i * blockSize
		end := start + blockSize
		temp := data[start:end]
		decrypted := crypto.FromBytes(temp).WithKey(c.key).Blowfish().ECB().Decrypt().ToBytes()
		decrypted = c.xorBytes(decrypted, cv)
		copy(outData[start:end], decrypted)
		for j := 0; j < len(cv); j++ {
			cv[j] ^= data[start+j]
		}
	}
	if leftLen != 0 {
		encryptedCV := crypto.FromBytes(cv).WithKey(c.key).Blowfish().ECB().Encrypt().ToBytes()
		start := blocksLen * blockSize
		temp := data[start:]
		temp = c.xorBytes(temp, encryptedCV[:leftLen])
		copy(outData[start:], temp)
	}

	return outData
}

func (c *Navicat11Cipher) DecryptString(hexStr string) (string, error) {
	data, err := hex.DecodeString(hexStr)
	if err != nil {
		return "", err
	}
	decrypted := c.Decrypt(data)
	return string(decrypted), nil
}

// Navicat12Cipher 用于 Navicat 12+ 版本的解密
type Navicat12Cipher struct {
	aesKey []byte
	aesIV  []byte
}

func NewNavicat12Cipher() *Navicat12Cipher {
	return &Navicat12Cipher{
		aesKey: []byte(Navicat12KEY),
		aesIV:  []byte(Navicat12IV),
	}
}

func (c *Navicat12Cipher) DecryptString(ciphertext string) string {
	return crypto.FromString(ciphertext).WithKey(c.aesKey).WithIv(c.aesIV).Aes().CBC().Decrypt().ToString()
}

// 解密密码封装函数
func decryptNavicat(pwd string) string {
	if pwd == "" {
		return ""
	}

	// 先尝试 Navicat 12+ 解密
	dec12 := NewNavicat12Cipher()
	result := dec12.DecryptString(pwd)
	if utf8.ValidString(result) && result != "" {
		return result
	}
	// 再尝试 Navicat 11 解密
	dec11, err := NewNavicat11Cipher("")
	if err != nil {
		logger.Errorf("failed to create navicat 11 cipher: %v", err)
		return ""
	}
	result, err = dec11.DecryptString(pwd)
	if err == nil {
		return result
	}
	logger.Errorf("failed to decrypt navicat 11 password: %v", err)
	return ""
}

func isValueExist(arr []string, value string) bool {
	valueMap := make(map[string]bool)
	for _, v := range arr {
		valueMap[v] = true
	}
	_, exist := valueMap[value]
	return exist
}

// 获取 Navicat 连接信息
func getNavicatConnections(reg *registry.Registry) (map[string]*registry.Key, error) {

	rootKey, err := reg.OpenKey("Software\\PremiumSoft")
	if err != nil {
		logger.Errorf("failed to open registry key: %v", err)
		return nil, fmt.Errorf("failed to open registry key: %v", err)
	}

	subkeyNames, err := rootKey.ReadSubKeyNames(-1)
	if err != nil {
		logger.Errorf("failed to read subkey names: %v", err)
		return nil, fmt.Errorf("failed to read subkey names: %v", err)
	}

	connections := make(map[string]*registry.Key)
	for _, subkeyName := range subkeyNames {
		subKey, err := rootKey.OpenSubKey(subkeyName)
		if err != nil {
			continue
		}
		names, err := subKey.ReadSubKeyNames(-1)
		if err != nil {
			continue
		}
		if !isValueExist(names, "Servers") {
			continue
		}
		serversKey, err := subKey.OpenSubKey("Servers")
		if err != nil {
			continue
		}

		connections[subkeyName] = &serversKey
	}

	return connections, nil
}

// 获取 MySQL 连接信息
func getNormalDBInfo(serverKeys *registry.Key) (map[string]*orderedmap.OrderedMap, error) {
	info := make(map[string]*orderedmap.OrderedMap)
	connections, err := serverKeys.ReadSubKeyNames(-1)
	if err != nil {
		logger.Errorf("failed to read subkey names: %v", err)
		return nil, fmt.Errorf("failed to read subkey names: %v", err)
	}

	for _, connection := range connections {
		basicInfo := orderedmap.New()

		basicInfo.Set("连接名", connection)
		key, err := serverKeys.OpenSubKey(connection)
		if err != nil {
			logger.Errorf("failed to open subkey: %v", err)
			continue
		}
		if host, _, err := key.GetStringValue("Host"); err == nil {
			basicInfo.Set("地址", host)
		}
		if port, _, err := key.GetIntegerValue("Port"); err == nil {
			basicInfo.Set("端口", fmt.Sprintf("%d", port))
		}
		if username, _, err := key.GetStringValue("UserName"); err == nil {
			basicInfo.Set("用户名", username)
		}
		if pwd, _, err := key.GetStringValue("Pwd"); err == nil {
			basicInfo.Set("密码", decryptNavicat(pwd))
		}
		if path, _, err := key.GetStringValue("QuerySavePath"); err == nil {
			basicInfo.Set("缓存路径", path)
		}
		info[connection] = basicInfo
	}

	return info, nil
}

// 获取 SQLServer 连接信息
func getMSSQLInfo(serverKeys *registry.Key) (map[string]*orderedmap.OrderedMap, error) {
	info := make(map[string]*orderedmap.OrderedMap)
	connections, err := serverKeys.ReadSubKeyNames(-1)
	if err != nil {
		logger.Errorf("failed to read subkey names: %v", err)
		return nil, fmt.Errorf("failed to read subkey names: %v", err)
	}

	for _, connection := range connections {
		basicInfo := orderedmap.New()
		basicInfo.SetEscapeHTML(false)
		basicInfo.Set("连接名", connection)
		key, err := serverKeys.OpenSubKey(connection)
		if err != nil {
			logger.Errorf("failed to open subkey: %v", err)
			continue
		}
		if host, _, err := key.GetStringValue("Host"); err == nil {
			basicInfo.Set("地址", host)
		}
		if port, _, err := key.GetIntegerValue("Port"); err == nil {
			basicInfo.Set("端口", fmt.Sprintf("%d", port))
		}
		if username, _, err := key.GetStringValue("UserName"); err == nil {
			basicInfo.Set("用户名", username)
		}
		if pwd, _, err := key.GetStringValue("Pwd"); err == nil {
			basicInfo.Set("密码", decryptNavicat(pwd))
		}
		if path, _, err := key.GetStringValue("QuerySavePath"); err == nil {
			basicInfo.Set("缓存路径", path)
		}
		if db, _, err := key.GetStringValue("InitialDatabase"); err == nil {
			basicInfo.Set("默认数据库", db)
		}
		if auth, _, err := key.GetStringValue("MSSQLAuthenMode"); err == nil {
			basicInfo.Set("认证模式", auth)
		}
		info[connection] = basicInfo
	}
	return info, nil
}

// 获取SQLite数据
func getSQLiteInfo(serverKeys *registry.Key) (map[string]*orderedmap.OrderedMap, error) {
	info := make(map[string]*orderedmap.OrderedMap)
	connections, err := serverKeys.ReadSubKeyNames(-1)
	if err != nil {
		logger.Errorf("failed to read subkey names: %v", err)
		return nil, fmt.Errorf("failed to read subkey names: %v", err)
	}

	for _, connection := range connections {
		basicInfo := orderedmap.New()
		basicInfo.SetEscapeHTML(false)
		basicInfo.Set("连接名", connection)
		key, err := serverKeys.OpenSubKey(connection)
		if err != nil {
			logger.Errorf("failed to open subkey: %v", err)
			continue
		}
		if name, _, err := key.GetStringValue("DatabaseFileName"); err == nil {
			basicInfo.Set("文件名", name)
		}
		if encrypted, _, err := key.GetIntegerValue("SQLiteEncrypted"); err == nil {
			if encrypted == 1 {
				basicInfo.Set("是否加密", "是")
			} else {
				basicInfo.Set("是否加密", "否")
			}
		}
		if saved, _, err := key.GetStringValue("EncryptionSavePassword"); err == nil {
			if saved == "true" {
				basicInfo.Set("是否保存密码", "是")
			} else {
				basicInfo.Set("是否保存密码", "否")
			}
		}
		if pwd, _, err := key.GetStringValue("EncryptionPassword"); err == nil {
			basicInfo.Set("密码", decryptNavicat(pwd))
		}
		if path, _, err := key.GetStringValue("QuerySavePath"); err == nil {
			basicInfo.Set("缓存路径", path)
		}
		if db, _, err := key.GetStringValue("InitialDatabase"); err == nil {
			basicInfo.Set("默认数据库", db)
		}
		info[connection] = basicInfo
	}
	return info, nil
}

func addRecords(result *orderedmap.OrderedMap, tType, tName string, connections map[string]*registry.Key) error {
	var infoFunc func(serverKeys *registry.Key) (map[string]*orderedmap.OrderedMap, error)
	if keys, ok := connections[tType]; ok {
		switch tType {
		case "Navicat", "NavicatMARIADB", "NavicatMongoDB", "NavicatOra", "NavicatPG":
			infoFunc = getNormalDBInfo
		case "NavicatMSSQL":
			infoFunc = getMSSQLInfo
		case "NavicatSQLite":
			infoFunc = getSQLiteInfo
		}
		info, err := infoFunc(keys)
		if err != nil {
			logger.Errorf("failed to get %s info: %v", tName, err)
			return err
		}
		var records []*orderedmap.OrderedMap
		for _, i := range info {
			records = append(records, i)
		}
		if len(records) > 0 {
			result.Set(tName, records)
		}
	}
	return nil
}

// 分析 Navicat 连接信息
func AnalyzeNavicat(regPath string) (*orderedmap.OrderedMap, error) {
	/*
		@param	refPath:	NTUSER.DAT注册表文件路径
		@return:			解析结果、错误
	*/
	fileInfo, err := os.Stat(regPath)
	if err != nil {
		logger.Errorf("failed to stat file: %v", err)
		return nil, err
	}
	if fileInfo.IsDir() {
		logger.Errorf("%s is not a file", regPath)
		return nil, fmt.Errorf("%s is not a file", regPath)
	}
	reg, err := registry.Open(regPath)
	if err != nil {
		logger.Errorf("failed to open registry file: %v", err)
		return nil, err
	}
	defer reg.Close()
	connections, err := getNavicatConnections(&reg)
	if err != nil {
		return nil, err
	}
	result := orderedmap.New()
	result.SetEscapeHTML(false)
	err = addRecords(result, "Navicat", "MySQL连接信息", connections)
	if err != nil {
		return nil, err
	}
	err = addRecords(result, "NavicatMARIADB", "MariaDB连接信息", connections)
	if err != nil {
		return nil, err
	}
	err = addRecords(result, "NavicatMongoDB", "MongoDB连接信息", connections)
	if err != nil {
		return nil, err
	}
	err = addRecords(result, "NavicatOra", "Oracle连接信息", connections)
	if err != nil {
		return nil, err
	}
	err = addRecords(result, "NavicatPG", "PostgreSQL连接信息", connections)
	if err != nil {
		return nil, err
	}
	err = addRecords(result, "NavicatMSSQL", "SQLServer连接信息", connections)
	if err != nil {
		return nil, err
	}
	err = addRecords(result, "NavicatSQLite", "SQLite连接信息", connections)
	if err != nil {
		return nil, err
	}
	err = reg.Close()
	if err != nil {
		return nil, err
	}
	return result, nil
}


================================================
FILE: analyzers/extractor/tool/xshellTool.go
================================================
package tool

import (
	"bytes"
	"crypto/sha256"
	"encoding/base64"
	"encoding/hex"
	"errors"
	"fmt"
	"os"
	"path/filepath"
	"strings"

	"github.com/deatil/go-cryptobin/cryptobin/crypto"
	"github.com/donnie4w/go-logger/logger"
	"github.com/iancoleman/orderedmap"
	"gopkg.in/ini.v1"
)

func decryptXShellStr(sid, encPwd string) (string, error) {
	/*
		低版本解密密文
		@param sid:用户的SID
		@param encPwd:	密文
		@return 解密后的密码、错误
	*/
	decoded, err := base64.StdEncoding.DecodeString(encPwd)
	if err != nil {
		logger.Errorf("failed to decode base64 string: %v", err)
		return "", err
	}
	if len(decoded) < 32 {
		logger.Errorf("invalid encrypted password length: %d", len(decoded))
		return "", errors.New("invalid encrypted password length")
	}
	data := decoded[:len(decoded)-32]
	checksum := decoded[len(decoded)-32:]

	// 使用 SHA256 生成密钥
	hasher := sha256.New()
	hasher.Write([]byte(sid))
	keyBytes := hasher.Sum(nil)
	// RC4 解密
	decrypted := crypto.FromBytes(data).
		WithKey(keyBytes).
		RC4().
		Decrypt().
		ToBytes()

	// 验证校验和
	hasher = sha256.New()
	hasher.Write(decrypted)
	calculatedChecksum := hasher.Sum(nil)
	if hex.EncodeToString(calculatedChecksum) != hex.EncodeToString(checksum) {
		logger.Errorf("checksum verification failed: expected %s, got %s", hex.EncodeToString(checksum), hex.EncodeToString(calculatedChecksum))
		return "", errors.New("checksum verification failed")
	}

	return string(decrypted), nil
}

// 反转字符串
func reverseString(s string) string {
	runes := []rune(s)
	for i, j := 0, len(runes)-1; i < j; i, j = i+1, j-1 {
		runes[i], runes[j] = runes[j], runes[i]
	}
	return string(runes)
}

func decryptXShellStrNew(sid string, encPwd string) (string, error) {
	/*
		7.1以后解密密文
		@param sid:用户的SID
		@param encPwd:	密文
		@return 解密后的密码、错误
	*/
	decoded, err := base64.StdEncoding.DecodeString(encPwd)
	if err != nil {
		logger.Errorf("failed to decode base64 string: %v", err)
		return "", err
	}

	if len(decoded) < 32 {
		logger.Errorf("invalid encrypted password length: %d", len(decoded))
		return "", errors.New("invalid encrypted password length")
	}

	data := decoded[:len(decoded)-32]
	checksum := decoded[len(decoded)-32:]

	// 处理 SID
	index := strings.Index(sid, "S-1-5")
	if index == -1 {
		logger.Errorf("invalid SID format: %s", sid)
		return "", errors.New("invalid SID format")
	}

	username := sid[:index]
	ssid := sid[index:]
	key := reverseString(reverseString(username) + ssid)

	// 使用 SHA256 生成密钥
	hasher := sha256.New()
	hasher.Write([]byte(key))
	keyBytes := hasher.Sum(nil)

	// RC4 解密
	decrypted := crypto.FromBytes(data).
		WithKey(keyBytes).
		RC4().
		Decrypt().
		ToBytes()
	// 验证校验和
	hasher = sha256.New()
	hasher.Write(decrypted)
	calculatedChecksum := hasher.Sum(nil)

	if hex.EncodeToString(calculatedChecksum) != hex.EncodeToString(checksum) {
		logger.Errorf("checksum verification failed: expected %s, got %s", hex.EncodeToString(checksum), hex.EncodeToString(calculatedChecksum))
		return "", errors.New("checksum verification failed")
	}

	return string(decrypted), nil
}

// 预处理文件
func preDeal(file string) (string, error) {
	data, err := os.ReadFile(file)
	if err != nil {
		logger.Errorf("failed to read file: %v", err)
		return "", err
	}

	// 替换特殊字符
	data = bytes.ReplaceAll(data, []byte{0x00}, []byte{})
	data = bytes.ReplaceAll(data, []byte{0xff}, []byte{})
	data = bytes.ReplaceAll(data, []byte{0xfe}, []byte{})

	dealFile := file + ".deal"
	err = os.WriteFile(dealFile, data, 0644)
	if err != nil {
		logger.Errorf("failed to write file: %v", err)
		return "", err
	}

	return dealFile, nil
}

// 删除临时文件
func delDeal(file string) error {
	return os.Remove(file)
}

// 分析 XShell/XFtp 配置文件
func AnalyzeXshell(folder string, sid string) (*orderedmap.OrderedMap, error) {
	/*
		@param folder:	配置文件目录
		@param sid:		用户的用户名+sid
		@return:		解析结果
	*/
	conns := orderedmap.New()
	conns.SetEscapeHTML(false)
	var xsh []*orderedmap.OrderedMap
	var xft []*orderedmap.OrderedMap
	fileInfo, err := os.Stat(folder)
	if err != nil {
		logger.Errorf("failed to stat folder: %v", err)
		return nil, err
	}
	if !fileInfo.IsDir() {
		logger.Errorf("%s is not a folder", folder)
		return nil, fmt.Errorf("%s is not a folder", folder)
	}
	err = filepath.Walk(folder, func(path string, info os.FileInfo, err error) error {
		if err != nil {
			logger.Errorf("failed to walk file: %v", err)
			return err
		}

		if info.IsDir() {
			return nil
		}

		filename := info.Name()
		if strings.HasSuffix(filename, ".xsh") {
			originFile := path
			dealFile, err := preDeal(originFile)
			if err != nil {
				logger.Errorf("failed to preDeal file: %v", err)
				return err
			}
			defer delDeal(dealFile)

			cfg, err := ini.LoadSources(ini.LoadOptions{
				AllowBooleanKeys: true,
			}, dealFile)
			if err != nil {
				logger.Errorf("failed to load ini file: %v", err)
				return err
			}

			conn := orderedmap.New()
			conn.SetEscapeHTML(false)
			conn.Set("连接名", strings.TrimSuffix(filename, ".xsh"))
			conn.Set("地址", cfg.Section("CONNECTION").Key("Host").String())
			conn.Set("端口", cfg.Section("CONNECTION").Key("Port").String())

			version := cfg.Section("SessionInfo").Key("Version").String()
			encPwd := cfg.Section("CONNECTION:AUTHENTICATION").Key("Password").String()

			var pwd string
			if version != "7.0" && strings.HasPrefix(version, "7.") {
				pwd, err = decryptXShellStrNew(sid, encPwd)
			} else {
				pwd, err = decryptXShellStr(sid, encPwd)
			}

			if err == nil {
				conn.Set("密码", pwd)
			} else {
				conn.Set("密码", "解密失败: "+err.Error())
			}

			conn.Set("描述", cfg.Section("CONNECTION").Key("Description").String())
			xsh = append(xsh, conn)
		}

		if strings.HasSuffix(filename, ".xfp") {
			originFile := path
			dealFile, err := preDeal(originFile)
			if err != nil {
				logger.Errorf("failed to preDeal file: %v", err)
				return err
			}
			defer delDeal(dealFile)

			cfg, err := ini.LoadSources(ini.LoadOptions{
				AllowBooleanKeys: true,
			}, dealFile)
			if err != nil {
				logger.Errorf("failed to load ini file: %v", err)
				return err
			}

			conn := orderedmap.New()
			conn.Set("连接名", strings.TrimSuffix(filename, ".xfp"))
			conn.Set("地址", cfg.Section("Connection").Key("Host").String())
			conn.Set("端口", cfg.Section("Connection").Key("Port").String())

			version := cfg.Section("SessionInfo").Key("Version").String()
			encPwd := cfg.Section("Connection").Key("Password").String()

			var pwd string
			if version != "7.0" && strings.HasPrefix(version, "7.") {
				pwd, err = decryptXShellStrNew(sid, encPwd)
			} else {
				pwd, err = decryptXShellStr(sid, encPwd)
			}

			if err == nil {
				conn.Set("密码", pwd)
			} else {
				conn.Set("密码", "解密失败: "+err.Error())
			}

			conn.Set("描述", cfg.Section("Connection").Key("Description").String())
			xft = append(xft, conn)
		}
		return nil
	})

	if err != nil {
		return nil, err
	}
	conns.Set("XShell", xsh)
	conns.Set("XFtp", xft)

	return conns, nil
}


================================================
FILE: analyzers/passwdCalc/passwdCalcAnalyzer.go
================================================
package passwdCalc

import (
	"ForensicsTool/utils"
	"context"
	"crypto/aes"
	"encoding/binary"
	"encoding/hex"
	"errors"
	"fmt"
	"strconv"
	"strings"

	"github.com/deatil/go-cryptobin/cryptobin/crypto"
)

type PasswdCalc struct {
	ctx context.Context
}

func NewPasswdCalc() *PasswdCalc {
	return &PasswdCalc{}
}

func (p *PasswdCalc) InitCtx(ctx context.Context) {
	p.ctx = ctx
}

func (p *PasswdCalc) startup(ctx context.Context) {
	p.ctx = ctx
}

func unpad(ciphertext []byte) ([]byte, error) {
	length := len(ciphertext)
	if length%aes.BlockSize != 0 {
		return nil, errors.New("ciphertext block size is invalid")
	}
	padding := ciphertext[length-1]
	if int(padding) > length {
		return nil, errors.New("padding is invalid")
	}
	return ciphertext[:length-int(padding)], nil
}

func decryptAES(token string, key, iv []byte) string {
	return crypto.FromBase64String(token).
		Aes().CBC().
		WithKey(key).WithIv(iv).
		Decrypt().ToString()
}

func (p *PasswdCalc) CalWechat(uin, imei string) string {
	/*
		@param uin: 用户id
		@param imei: 手机imei,传入空则默认为1234567890ABCDEF
		@return: 安卓微信EncMicroMsg.db的解密密钥
	*/
	if imei == "" {
		imei = "1234567890ABCDEF"
	}
	pwd := utils.MD5HashHex(imei + uin)[:7]
	return pwd
}

func (p *PasswdCalc) CalWechatIndex(uin, wxid, imei string) string {
	/*
			@param uin: 用户id
			@param imei: 手机imei,传入空则默认为1234567890ABCDEF
		    @param wxid: 微信用户的内部wxid
			@return: 安卓微信EncMicroMsg.db的解密密钥
	*/
	if imei == "" {
		imei = "1234567890ABCDEF"
	}
	atoi, err := strconv.Atoi(uin)
	if err != nil {
		return ""
	}
	if atoi < 0 {
		atoi += 4294967296
	}
	uin = strconv.Itoa(atoi)
	return utils.MD5HashHex(uin + imei + wxid)[:7]
}

func (p *PasswdCalc) CalWildFire(token string) []string {
	/*
		@param token: 野火IM系应用的用户token,在应用目录下shared_prefs/config.xml中的token的值
		@return: data的解密密钥
	*/
	// 新版本密钥
	key, _ := hex.DecodeString("001122334455667778797A7B7C7D7E7F")
	iv := key
	// 旧版本密钥
	key2, _ := hex.DecodeString("7F7E7D7C7B7A79787766554433221100")
	iv2 := key2
	pwd := decryptAES(token, key, iv)
	flag := "使用SQLCipher4进行解密"
	if pwd == "" {
		pwd = decryptAES(token, key2, iv2)
		if pwd == "" {
			return []string{"解密失败", ""}
		}
		flag = "使用SQLCipher3进行解密"
	}
	parts := strings.Split(pwd, "|")
	if len(parts) > 0 {
		pwd = parts[len(parts)-1]
	}
	return []string{pwd, flag}
}

func (p *PasswdCalc) CalMostone(uid string) []string {
	/*
		@param uid: 默往的用户uid,在shared_prefs/im.xml中的userId的值
		@return: 默往数据库msg.db的解密密钥
	*/
	hash := utils.MD5HashHex(uid)
	ret := strings.ToUpper(hash[:6])
	return []string{ret, "使用SQLCipher3进行解密"}
}

func (p *PasswdCalc) CalTiktok(uid string) []string {
	/*
		@param uid: 抖音的用户uid,一般在数据库文件名中就有
		@return: 抖音数据库的解密密钥
	*/
	en := fmt.Sprintf("byte%simwcdb%sdance", uid, uid)
	return []string{en, "使用wcdb进行解密"}
}

func longToBytes(uid int64) []byte {
	bytes := make([]byte, 8)
	binary.BigEndian.PutUint64(bytes, uint64(uid))
	return bytes
}

func (p *PasswdCalc) CalBatChat(uid string) []string {
	/*
		 * @param uid: 用户id,数据库名中的数字
			@return: 蝙蝠聊天数据库的解密密钥
	*/
	long_uid, err := strconv.ParseInt(uid, 10, 64)
	if err != nil {
		return []string{"", "uid不合法,应该是一串数字!"}
	}
	sd := -1756908916
	seed := uint32(sd)
	xxhash32_result := utils.XXHash32(longToBytes(long_uid), seed)
	fmt.Println(xxhash32_result)
	pwd := utils.MD5HashHex(string(rune(xxhash32_result)) + uid)
	return []string{strings.ToUpper(pwd), "使用wcdb进行解密"}
}


================================================
FILE: analyzers/reader/fileReader.go
================================================
package reader

import (
	"ForensicsTool/analyzers/reader/readers"
	"context"

	"github.com/iancoleman/orderedmap"
)

type FileReader struct {
	ctx context.Context
}

func NewFileReader() *FileReader {
	return &FileReader{}
}

type ReadMapResult struct {
	Data *orderedmap.OrderedMap `json:"data"`
	Err  string                 `json:"err"`
}

func (p *FileReader) InitCtx(ctx context.Context) {
	p.ctx = ctx
}

func (p *FileReader) ReadLevelDB(path string) *ReadMapResult {
	result, err := readers.LevelDBReader(path)
	if err != nil {
		return &ReadMapResult{nil, err.Error()}
	}
	return &ReadMapResult{result, ""}
}

func (p *FileReader) ReadMMKV(path, password string) *ReadMapResult {
	result, err := readers.MMKVReader(path, password)
	if err != nil {
		return &ReadMapResult{nil, err.Error()}
	}
	return &ReadMapResult{result, ""}
}


================================================
FILE: analyzers/reader/readers/leveldbReader.go
================================================
package readers

import (
	"fmt"
	"strings"

	"github.com/donnie4w/go-logger/logger"
	"github.com/iancoleman/orderedmap"
	"github.com/syndtr/goleveldb/leveldb"
)

func formatBytes(data []byte) string {
	var builder strings.Builder
	builder.WriteString("b'")
	for _, b := range data {
		if b >= 32 && b <= 126 { // 可打印的 ASCII 字符
			builder.WriteByte(b)
		} else {
			builder.WriteString(fmt.Sprintf("\\x%02x", b)) // 不可打印字符转为 \x 形式
		}
	}
	builder.WriteString("'")
	return builder.String()
}

func LevelDBReader(dbPath string) (*orderedmap.OrderedMap, error) {
	db, err := leveldb.OpenFile(dbPath, nil)
	if err != nil || db == nil {
		logger.Errorf("【leveldb】数据库打开失败:%v", err)
		return nil, err
	}
	iter := db.NewIterator(nil, nil)
	result := orderedmap.New()
	result.SetEscapeHTML(false)
	var tmp []*orderedmap.OrderedMap
	for iter.Next() {
		// Remember that the contents of the returned slice should not be modified, and
		// only valid until the next call to Next.
		key := iter.Key()
		value := iter.Value()
		info := orderedmap.New()
		info.SetEscapeHTML(false)
		info.Set("键", formatBytes(key))
		info.Set("值", formatBytes(value))
		tmp = append(tmp, info)
	}
	iter.Release()
	defer db.Close()
	result.Set("leveldbReader", tmp)
	return result, err
}


================================================
FILE: analyzers/reader/readers/mmkvReader.go
================================================
package readers

import (
	"encoding/hex"
	"errors"
	"os"
	"path/filepath"
	"strings"

	go_mmkv "github.com/WXjzcccc/go-mmkv"
	"github.com/donnie4w/go-logger/logger"
	"github.com/iancoleman/orderedmap"
)

func MMKVReader(path, password string) (*orderedmap.OrderedMap, error) {
	fileInfo, err := os.Stat(path)
	if err != nil {
		if os.IsNotExist(err) {
			logger.Errorf("【mmkvReader】文件不存在")
		} else {
			logger.Errorf("【mmkvReader】文件读取失败")
		}
		return nil, err
	}
	fileMode := fileInfo.Mode()
	dirPath := path
	files := []string{}
	switch {
	case fileMode.IsDir():
		logger.Infof("【mmkvReader】传入的%s是目录", path)
		files = getDirFiles(path)
	case fileMode.IsRegular():
		logger.Infof("【mmkvReader】传入的%s是文件", path)
		dirPath = filepath.Dir(path)
		files = append(files, filepath.Base(path))
	default:
		logger.Errorf("【mmkvReader】文件%s类型错误", path)
		return nil, errors.New("文件类型错误")
	}
	result := orderedmap.New()
	result.SetEscapeHTML(false)
	mr, err := go_mmkv.NewManager(dirPath)
	if err != nil {
		logger.Errorf("【mmkvReader】打开目录%s失败", dirPath)
		return nil, err
	}
	var openErr error
	for _, mmkvFile := range files {
		var tmp []*orderedmap.OrderedMap
		var vault go_mmkv.Vault
		if password == "" {
			vault, openErr = mr.OpenVault(mmkvFile)
		} else {
			vault, openErr = mr.OpenVaultCrypto(mmkvFile, password)
		}
		if openErr != nil {
			logger.Errorf("【mmkvReader】打开文件%s失败:%v", mmkvFile, openErr)
			continue
		}
		for _, key := range vault.Keys() {
			info := orderedmap.New()
			info.SetEscapeHTML(false)
			info.Set("键", key)
			varData, err := vault.GetVarint(key)
			info.Set("VARINT", varData)
			bytesData, err := vault.GetBytes(key)
			if err != nil {
				logger.Errorf("【mmkvReader】获取%s的bytes数据失败:%v", key, err)
				info.Set("BYTES", "")
			} else if len(bytesData) > 0 {
				info.Set("BYTES", hex.EncodeToString(bytesData))
			} else {
				info.Set("BYTES", "")
			}
			stringData, err := vault.GetString(key)
			if err != nil {
				logger.Errorf("【mmkvReader】获取%s的string数据失败:%v", key, err)
				info.Set("STRING", "")
			} else {
				info.Set("STRING", stringData)
			}
			tmp = append(tmp, info)
		}

		result.Set(mmkvFile, tmp)
	}
	return result, openErr
}

func getDirFiles(path string) []string {
	files, err := os.ReadDir(path)
	if err != nil {
		logger.Errorf("【mmkvReader】读取目录%s失败", path)
		return []string{}
	}
	var fileNames []string
	for _, file := range files {
		if strings.HasSuffix(file.Name(), ".crc") {
			fileNames = append(fileNames, strings.ReplaceAll(file.Name(), ".crc", ""))
		}
	}
	return fileNames
}


================================================
FILE: analyzers/winreg/structs/domainAccountF.go
================================================
package structs

import (
	"ForensicsTool/utils"
	"bytes"
	"encoding/binary"
	"fmt"
	"github.com/donnie4w/go-logger/logger"
	"github.com/ghostiam/binstruct"
)

type DomainAccountF struct {
	Revision                 uint32
	_                        uint32
	CreationTime             string `bin:"ParseWindowsFileTimestamp"`
	DomainModifiedCount      uint64
	MaxPwdAge                string `bin:"ParseWindowsFileTimestamp"`
	MinPwdAge                string `bin:"ParseWindowsFileTimestamp"`
	ForceLogOff              string `bin:"ParseWindowsFileTimestamp"`
	LockOutDuration          uint64
	LockOutObservationWindow uint64
	_                        uint64
	NextRid                  uint32
	PwdProperties            uint32
	MinPwdLength             uint16
	PwdHistoryLength         uint16
	LockoutTreshold          uint16
	_                        uint16
	ServerState              uint32
	ServerRole               uint16
	UasCompatibilityReq      uint16
	_                        uint64
	Key0                     interface{} `bin:"ParseSamKeyData"`
}

type SamKeyData struct {
	Revision uint32
	Length   uint32
	Salt     []byte `bin:"len:16"`
	Key      []byte `bin:"len:16"`
	CheckSum []byte `bin:"len:16"`
	Reserved uint64
}

func getSamKeyData(binData []byte) *SamKeyData {
	var samKeyData SamKeyData
	decoder := binstruct.NewDecoder(bytes.NewReader(binData), binary.LittleEndian)
	err := decoder.Decode(&samKeyData)
	if err != nil {
		logger.Error("解析SamKeyData失败:", err)
		return nil
	}
	return &samKeyData
}

type SamKeyDataAes struct {
	Revision       uint32
	Length         uint32
	CheckSumLength uint32
	DataLength     uint32
	Salt           []byte `bin:"len:16"`
	Data           []byte `bin:"len:DataLength"`
}

func getSamKeyDataAes(binData []byte) *SamKeyDataAes {
	var samKeyDataAes SamKeyDataAes
	decoder := binstruct.NewDecoder(bytes.NewReader(binData), binary.LittleEndian)
	err := decoder.Decode(&samKeyDataAes)
	if err != nil {
		logger.Error("解析SamKeyDataAes失败:", err)
		return nil
	}
	return &samKeyDataAes
}

func (*DomainAccountF) ParseWindowsFileTimestamp(r binstruct.Reader) (string, error) {
	ts, err := r.ReadUint64()
	if err != nil {
		logger.Error("读取Windows文件时间戳失败:", err)
		return "", err
	}
	return utils.WindowsFileTimeToDatetime(ts, "", ""), nil
}

func (d *DomainAccountF) ParseSamKeyData(r binstruct.Reader) (interface{}, error) {
	marker, err := r.Peek(1)
	if err != nil {
		logger.Error("读取SamKeyData标记失败:", err)
		return nil, err
	}
	data, err := r.ReadAll()
	if err != nil {
		logger.Error("读取SamKeyData数据失败:", err)
		return nil, err
	}
	switch marker[0] {
	case byte(1):
		return getSamKeyData(data), nil
	case byte(2):
		return getSamKeyDataAes(data), nil
	}
	logger.Error("无效的SamKeyData标记:", marker[0])
	return nil, fmt.Errorf("invalid marker")
}

func GetDomainAccountF(binData []byte) *DomainAccountF {
	var domainAccountF DomainAccountF
	decoder := binstruct.NewDecoder(bytes.NewReader(binData), binary.LittleEndian)
	err := decoder.Decode(&domainAccountF)
	if err != nil {
		logger.Error("解析DomainAccountF失败:", err)
		return nil
	}
	return &domainAccountF
}


================================================
FILE: analyzers/winreg/structs/domainAccountV.go
================================================
package structs

import (
	"bytes"
	"encoding/binary"
	"fmt"
	"github.com/donnie4w/go-logger/logger"
	"github.com/ghostiam/binstruct"
)

type DomainAccountV struct {
	_        []byte `bin:"len:408"`
	DomainID uint32
	SID1     uint32
	SID2     uint32
	SID3     uint32
}

func GetMachineSid(binData []byte) string {
	var domainAccountV DomainAccountV
	decoder := binstruct.NewDecoder(bytes.NewReader(binData), binary.LittleEndian)
	err := decoder.Decode(&domainAccountV)
	if err != nil {
		logger.Error("解析DomainAccountV失败:", err)
		return ""
	}
	return fmt.Sprintf("S-1-5-%v-%v-%v-%v", domainAccountV.DomainID, domainAccountV.SID1, domainAccountV.SID2, domainAccountV.SID3)
}


================================================
FILE: analyzers/winreg/structs/nthash.go
================================================
package structs

import (
	"ForensicsTool/utils"
	"bytes"
	"encoding/hex"
	"github.com/deatil/go-cryptobin/cryptobin/crypto"
)

/*
解密逻辑和结构体详见https://github.com/skelsec/pypykatz
*/

func uint32To4BytesLittleEndian(i uint32) []byte {
	/*
		小端序转换
	*/
	buf := new(bytes.Buffer)
	buf.WriteByte(byte(i))
	buf.WriteByte(byte(i >> 8))
	buf.WriteByte(byte(i >> 16))
	buf.WriteByte(byte(i >> 24))
	return buf.Bytes()
}

func expandDESKey(key []byte) []byte {
	// 确保密钥长度为7字节,不足补0
	if len(key) < 7 {
		padded := make([]byte, 7)
		copy(padded, key)
		key = padded
	} else {
		key = key[:7]
	}

	var result []byte

	// 第一字节
	b := ((key[0] >> 1) & 0x7f) << 1
	result = append(result, b)

	// 第二字节
	b = ((key[0]&0x01)<<6 | (key[1]>>2)&0x3f) << 1
	result = append(result, b)

	// 第三字节
	b = ((key[1]&0x03)<<5 | (key[2]>>3)&0x1f) << 1
	result = append(result, b)

	// 第四字节
	b = ((key[2]&0x07)<<4 | (key[3]>>4)&0x0f) << 1
	result = append(result, b)

	// 第五字节
	b = ((key[3]&0x0f)<<3 | (key[4]>>5)&0x07) << 1
	result = append(result, b)

	// 第六字节
	b = ((key[4]&0x1f)<<2 | (key[5]>>6)&0x03) << 1
	result = append(result, b)

	// 第七字节
	b = ((key[5]&0x3f)<<1 | (key[6]>>7)&0x01) << 1
	result = append(result, b)

	// 第八字节
	b = (key[6] & 0x7f) << 1
	result = append(result, b)

	return result
}

func rid2Key(rid uint32) ([]byte, []byte) {
	key := uint32To4BytesLittleEndian(rid)
	key1 := []byte{key[0], key[1], key[2], key[3], key[0], key[1], key[2]}
	key2 := []byte{key[3], key[0], key[1], key[2], key[3], key[0], key[1]}
	return expandDESKey(key1), expandDESKey(key2)
}

func GetHBootKey(key0 interface{}, bootKey []byte) []byte {
	QWERTY := []byte("!@#$%^&*()qwertyUIOPAzxcvbnmQQQQQQQQQQQQ)(*@&%\x00")
	DIGITS := []byte("0123456789012345678901234567890123456789\x00")
	switch key0.(type) {
	case *SamKeyData:
		key := key0.(*SamKeyData)
		buf := new(bytes.Buffer)
		buf.Write(key.Salt)
		buf.Write(QWERTY)
		buf.Write(bootKey)
		buf.Write(DIGITS)
		rc4Key := utils.MD5Hash(buf.Bytes())
		buf = new(bytes.Buffer)
		buf.Write(key.Key)
		buf.Write(key.CheckSum)
		hashedBootKey := crypto.FromBytes(buf.Bytes()).WithKey(rc4Key).RC4().Decrypt().ToBytes()
		buf = new(bytes.Buffer)
		buf.Write(hashedBootKey[:16])
		buf.Write(DIGITS)
		buf.Write(hashedBootKey[:16])
		buf.Write(QWERTY)
		checksum := utils.MD5Hash(buf.Bytes())
		if hex.EncodeToString(hashedBootKey[16:]) != hex.EncodeToString(checksum) {
			return nil
		}
		return hashedBootKey
	case *SamKeyDataAes:
		key := key0.(*SamKeyDataAes)
		hashedBootKey := new(bytes.Buffer)
		const n = 16
		var blocks [][]byte
		for i := 0; i < len(key.Data); i += n {
			blocks = append(blocks, key.Data[i:i+n])
		}
		for _, block := range blocks {
			hashedBootKey.Write(
				crypto.FromBytes(block).WithKey(bootKey).WithIv(key.Salt).Aes().CBC().NoPadding().Decrypt().ToBytes())
		}
		return hashedBootKey.Bytes()
	}
	return nil
}

const (
	NTHASH    = 0
	LMHASH    = 1
	NTDEFAULT = "31d6cfe0d16ae931b73c59d7e0c089c0"
	LMDEFAULT = "aad3b435b51404eeaad3b435b51404ee"
)

func DecryptHash(hashedBootKey []byte, rid uint32, hash interface{}, hashType int) string {
	NTPASSWORD := []byte("NTPASSWORD\x00")
	LMPASSWORD := []byte("LMPASSWORD\x00")
	var constant []byte
	defaultHash := ""
	var key []byte
	switch hashType {
	case NTHASH:
		constant = NTPASSWORD
		defaultHash = NTDEFAULT
	case LMHASH:
		constant = LMPASSWORD
		defaultHash = LMDEFAULT
	}
	key1, key2 := rid2Key(rid)
	switch hash.(type) {
	case *SAMHash:
		samHash := hash.(*SAMHash)
		if len(samHash.Hash) == 0 {
			return defaultHash
		}
		buf := new(bytes.Buffer)
		buf.Write(hashedBootKey[:16])
		buf.Write(uint32To4BytesLittleEndian(rid))
		buf.Write(constant)
		rc4Key := utils.MD5Hash(buf.Bytes())
		key = crypto.FromBytes(samHash.Hash).WithKey(rc4Key).RC4().Encrypt().ToBytes()
	case *SAMHashAes:
		samHashAes := hash.(*SAMHashAes)
		if len(samHashAes.Data) == 0 {
			return defaultHash
		}
		keyTmp := new(bytes.Buffer)
		const n = 16
		var blocks [][]byte
		for i := 0; i < len(samHashAes.Data); i += n {
			blocks = append(blocks, samHashAes.Data[i:i+n])
		}
		for _, block := range blocks {
			keyTmp.Write(
				crypto.FromBytes(block).WithKey(hashedBootKey[:16]).WithIv(samHashAes.Salt).Aes().NoPadding().CBC().Decrypt().ToBytes())
		}
		key = keyTmp.Bytes()[:16]
	}
	hash1 := crypto.FromBytes(key[:8]).WithKey(key1).Des().NoPadding().Decrypt().ToBytes()
	hash2 := crypto.FromBytes(key[8:]).WithKey(key2).Des().NoPadding().Decrypt().ToBytes()
	return hex.EncodeToString(hash1) + hex.EncodeToString(hash2)
}


================================================
FILE: analyzers/winreg/structs/userF.go
================================================
package structs

import (
	"ForensicsTool/utils"
	"bytes"
	"encoding/binary"
	"github.com/ghostiam/binstruct"
)

// UserF _是暂时不知道含义的字段
type UserF struct {
	_                   []byte `bin:"len:8"`
	LastLoginTime       string `bin:"ParseWindowsFileTimestamp"`
	_                   []byte `bin:"len:8"`
	LastPwdChangeTime   string `bin:"ParseWindowsFileTimestamp"`
	_                   []byte `bin:"len:8"`
	LastFailedLoginTime string `bin:"ParseWindowsFileTimestamp"`
	RID                 uint32
	_                   []byte `bin:"len:4"`
	UserAttribute       uint32
	_                   []byte `bin:"len:4"`
	LogonCount          int16
	InValidLoginCount   int16
	_                   []byte `bin:"len:12"`
}

// ParseWindowsFileTimestamp 会在解码的时候被调用
func (*UserF) ParseWindowsFileTimestamp(r binstruct.Reader) (string, error) {
	ts, err := r.ReadUint64()
	if err != nil {
		return "", err
	}
	return utils.WindowsFileTimeToDatetime(ts, "", ""), nil
}

func GetUserF(binData []byte) *UserF {
	var userF UserF
	decoder := binstruct.NewDecoder(bytes.NewReader(binData), binary.LittleEndian)
	err := decoder.Decode(&userF)
	if err != nil {
		return nil
	}
	return &userF
}


================================================
FILE: analyzers/winreg/structs/userV.go
================================================
package structs

import (
	"ForensicsTool/utils"
	"bytes"
	"encoding/binary"
	"fmt"
	"github.com/ghostiam/binstruct"
	"io"
)

type UserV struct {
	_                    []byte `bin:"len:12"`
	NameOffset           uint32
	NameLength           uint32
	_                    uint32
	FullNameOffset       uint32
	FullNameLength       uint32
	_                    uint32
	CommentOffset        uint32
	CommentLength        uint32
	_                    uint32
	UserCommentOffset    uint32
	UserCommentLength    uint32
	_                    uint32
	_                    []byte `bin:"len:12"`
	HomeDirOffset        uint32
	HomeDirLength        uint32
	_                    uint32
	HomeDirConnectOffset uint32
	HomeDirConnectLength uint32
	_                    uint32
	ScriptPathOffset     uint32
	ScriptPathLength     uint32
	_                    uint32
	ProfilePathOffset    uint32
	ProfilePathLength    uint32
	_                    uint32
	WorkstationsOffset   uint32
	WorkstationsLength   uint32
	_                    uint32
	HoursAllowedOffset   uint32
	HoursAllowedLength   uint32
	_                    uint32
	_                    []byte `bin:"len:12"`
	LMHashOffset         uint32
	LMHashLength         uint32
	_                    uint32
	NTHashOffset         uint32
	NTHashLength         uint32
	_                    uint32
	_                    []byte      `bin:"len:24"`
	Name                 string      `bin:"ParseName"`
	FullName             string      `bin:"ParseFullName"`
	Comment              string      `bin:"ParseComment"`
	UserComment          string      `bin:"ParseUserComment"`
	HomeDir              string      `bin:"ParseHomeDir"`
	HomeDirConnect       string      `bin:"ParseHomeDirConnect"`
	ScriptPath           string      `bin:"ParseScriptPath"`
	ProfilePath          string      `bin:"ParseProfilePath"`
	Workstations         string      `bin:"ParseWorkstations"`
	HoursAllowed         string      `bin:"ParseHoursAllowed"`
	LMHash               interface{} `bin:"ParseLMHash"`
	NTHash               interface{} `bin:"ParseNTHash"`
}

type SAMHash struct {
	PekID    uint16
	Revision uint16
	Hash     []byte `bin:"len:16"`
}

func getSAMHash(binData []byte) *SAMHash {
	var samHash SAMHash
	decoder := binstruct.NewDecoder(bytes.NewReader(binData), binary.LittleEndian)
	err := decoder.Decode(&samHash)
	if err != nil {
		return nil
	}
	return &samHash
}

type SAMHashAes struct {
	PekID      uint16
	Revision   uint16
	DataOffset uint32
	Salt       []byte `bin:"len:16"`
	Data       []byte `bin:"ParseData"`
}

func (s *SAMHashAes) ParseData(r binstruct.Reader) ([]byte, error) {
	binData, err := r.ReadAll()
	if err != nil {
		return nil, err
	}
	return binData, nil
}

func getSAMHashAes(binData []byte) *SAMHashAes {
	var samHashAes SAMHashAes
	decoder := binstruct.NewDecoder(bytes.NewReader(binData), binary.LittleEndian)
	err := decoder.Decode(&samHashAes)
	if err != nil {
		return nil
	}
	return &samHashAes
}

const VOffset = 204 // UserV固定读取前204个字节

func (u *UserV) ParseName(r binstruct.Reader) (string, error) {
	_, err := r.Seek(int64(u.NameOffset+VOffset), io.SeekStart)
	if err != nil {
		return "", err
	}
	binData, err := r.Peek(int(u.NameLength))
	if err != nil {
		return "", err
	}
	return utils.UTF16leBytesToString(binData), nil
}

func (u *UserV) ParseFullName(r binstruct.Reader) (string, error) {
	_, err := r.Seek(int64(u.FullNameOffset+VOffset), io.SeekStart)
	if err != nil {
		return "", err
	}
	binData, err := r.Peek(int(u.FullNameLength))
	if err != nil {
		return "", err
	}
	return utils.UTF16leBytesToString(binData), nil
}

func (u *UserV) ParseComment(r binstruct.Reader) (string, error) {
	_, err := r.Seek(int64(u.CommentOffset+VOffset), io.SeekStart)
	if err != nil {
		return "", err
	}
	binData, err := r.Peek(int(u.CommentLength))
	if err != nil {
		return "", err
	}
	return utils.UTF16leBytesToString(binData), nil
}

func (u *UserV) ParseUserComment(r binstruct.Reader) (string, error) {
	_, err := r.Seek(int64(u.UserCommentOffset+VOffset), io.SeekStart)
	if err != nil {
		return "", err
	}
	binData, err := r.Peek(int(u.UserCommentLength))
	if err != nil {
		return "", err
	}
	return utils.UTF16leBytesToString(binData), nil
}

func (u *UserV) ParseHomeDir(r binstruct.Reader) (string, error) {
	_, err := r.Seek(int64(u.HomeDirOffset+VOffset), io.SeekStart)
	if err != nil {
		return "", err
	}
	binData, err := r.Peek(int(u.HomeDirLength))
	if err != nil {
		return "", err
	}
	return utils.UTF16leBytesToString(binData), nil
}

func (u *UserV) ParseHomeDirConnect(r binstruct.Reader) (string, error) {
	_, err := r.Seek(int64(u.HomeDirConnectOffset+VOffset), io.SeekStart)
	if err != nil {
		return "", err
	}
	binData, err := r.Peek(int(u.HomeDirConnectLength))
	if err != nil {
		return "", err
	}
	return utils.UTF16leBytesToString(binData), nil
}

func (u *UserV) ParseScriptPath(r binstruct.Reader) (string, error) {
	_, err := r.Seek(int64(u.ScriptPathOffset+VOffset), io.SeekStart)
	if err != nil {
		return "", err
	}
	binData, err := r.Peek(int(u.ScriptPathLength))
	if err != nil {
		return "", err
	}
	return utils.UTF16leBytesToString(binData), nil
}

func (u *UserV) ParseProfilePath(r binstruct.Reader) (string, error) {
	_, err := r.Seek(int64(u.ProfilePathOffset+VOffset), io.SeekStart)
	if err != nil {
		return "", err
	}
	binData, err := r.Peek(int(u.ProfilePathLength))
	if err != nil {
		return "", err
	}
	return utils.UTF16leBytesToString(binData), nil
}

func (u *UserV) ParseWorkstations(r binstruct.Reader) (string, error) {
	_, err := r.Seek(int64(u.WorkstationsOffset+VOffset), io.SeekStart)
	if err != nil {
		return "", err
	}
	binData, err := r.Peek(int(u.WorkstationsLength))
	if err != nil {
		return "", err
	}
	return utils.UTF16leBytesToString(binData), nil
}

func (u *UserV) ParseHoursAllowed(r binstruct.Reader) (string, error) {
	_, err := r.Seek(int64(u.HoursAllowedOffset+VOffset), io.SeekStart)
	if err != nil {
		return "", err
	}
	binData, err := r.Peek(int(u.HoursAllowedLength))
	if err != nil {
		return "", err
	}
	return utils.UTF16leBytesToString(binData), nil
}

func (u *UserV) ParseLMHash(r binstruct.Reader) (interface{}, error) {
	_, err := r.Seek(int64(u.NTHashOffset+VOffset), io.SeekStart)
	if err != nil {
		return nil, err
	}
	head, err := r.Peek(1)
	if err != nil {
		return nil, err
	}
	if head[0] == byte(1) {
		if u.LMHashLength == 20 {
			_, err = r.Seek(int64(u.LMHashOffset+VOffset), io.SeekStart)
			if err != nil {
				return nil, err
			}
			binData, err := r.Peek(int(u.LMHashLength))
			if err != nil {
				return nil, err
			}
			return getSAMHash(binData), nil
		}
	} else {
		if u.LMHashLength == 24 {
			_, err = r.Seek(int64(u.LMHashOffset+VOffset), io.SeekStart)
			if err != nil {
				return nil, err
			}
			binData, err := r.Peek(int(u.LMHashLength))
			if err != nil {
				return nil, err
			}
			return getSAMHashAes(binData), nil
		}
	}
	return nil, fmt.Errorf("err lmhash")
}

func (u *UserV) ParseNTHash(r binstruct.Reader) (interface{}, error) {
	_, err := r.Seek(int64(u.NTHashOffset+VOffset), io.SeekStart)
	if err != nil {
		return nil, err
	}
	head, err := r.Peek(1)
	if err != nil {
		return nil, err
	}
	if head[0] == byte(1) {
		if u.NTHashLength == 20 {
			_, err = r.Seek(int64(u.NTHashOffset+VOffset), io.SeekStart)
			if err != nil {
				return nil, err
			}
			binData, err := r.Peek(int(u.NTHashLength))
			if err != nil {
				return nil, err
			}
			return getSAMHash(binData), nil
		}
	} else {
		_, err = r.Seek(int64(u.NTHashOffset+VOffset), io.SeekStart)
		if err != nil {
			return nil, err
		}
		binData, err := r.Peek(int(u.NTHashLength))
		if err != nil {
			return nil, err
		}
		return getSAMHashAes(binData), nil
	}
	return nil, fmt.Errorf("err nthash")
}

func GetUserV(binData []byte) *UserV {
	var userV UserV
	decoder := binstruct.NewDecoder(bytes.NewReader(binData), binary.LittleEndian)
	err := decoder.Decode(&userV)
	if err != nil {
		return nil
	}
	return &userV
}


================================================
FILE: analyzers/winreg/winRegAnalyzer.go
================================================
package winreg

import (
	"ForensicsTool/analyzers/winreg/structs"
	"ForensicsTool/utils"
	"context"
	"encoding/binary"
	"encoding/hex"
	"fmt"
	"os"
	"path/filepath"
	"strconv"
	"strings"

	"github.com/WXjzcccc/registry"
	"github.com/donnie4w/go-logger/logger"
	"github.com/iancoleman/orderedmap"
)

type WinReg struct {
	systemReg   registry.Registry
	samReg      registry.Registry
	softwareReg registry.Registry
	ntRegList   []registry.Registry
}

type Reg struct {
	ctx context.Context
}

func NewReg() *Reg {
	return &Reg{}
}

func (r *Reg) InitCtx(ctx context.Context) {
	r.ctx = ctx
}

func checkSubKeyExist(key registry.Key, keyName string) bool {
	/*
		@param	key:		注册表的键
		@param	keyName:	子键名
		@return:			是否存在
	*/
	names, err := key.ReadSubKeyNames(-1)
	if err != nil {
		logger.Error("读取子键名称失败:", err)
		return false
	}
	for _, name := range names {
		if name == keyName {
			return true
		}
	}
	return false
}

func getStringValue(key registry.Key, valueName string) string {
	result, _, err := key.GetStringValue(valueName)
	if err != nil {
		logger.Error("获取字符串值失败:", err)
		return ""
	}
	return result
}

func getStringsValue(key registry.Key, valueName string) []string {
	result, _, err := key.GetStringsValue(valueName)
	if err != nil || len(result) == 0 {
		logger.Errorf("获取字符串数组值<%s>失败:%v", valueName, err)
		return []string{""}
	}
	return result
}

func getBinaryValue(key registry.Key, valueName string) []byte {
	result, _, err := key.GetBinaryValue(valueName)
	if err != nil {
		logger.Error("获取二进制值失败:", err)
		return nil
	}
	return result
}

func getIntValue(key registry.Key, valueName string) uint64 {
	result, _, err := key.GetIntegerValue(valueName)
	if err != nil {
		logger.Error("获取整数值失败:", err)
		return 0
	}
	return result
}

func timestampByts(timeBytes []byte) string {
	timestamp := binary.LittleEndian.Uint64(timeBytes)
	unixSeconds := int64(timestamp)/1e7 - 11644473600
	//t := time.Unix(unixSeconds, 0)
	//formattedDate := t.Format("2006-01-02 15:04:05")
	formattedDate := utils.DefaultTimestampToDatetime(unixSeconds, "", "")
	return formattedDate
}

func timestamp(ts uint64) string {
	//t := time.Unix(int64(ts), 0)
	//formattedDate := t.Format("2006-01-02 15:04:05")
	formattedDate := utils.DefaultTimestampToDatetime(int64(ts), "", "")
	return formattedDate
}

func byte2mac(macBytes []byte) string {
	var result string
	str := hex.EncodeToString(macBytes)
	for idx, s := range str {
		result = result + string(s)
		if idx%2 == 1 && idx != len(str)-1 {
			result = result + ":"
		}
	}
	return result
}

func (w *WinReg) getBootKey() []byte {
	key, err := w.systemReg.OpenKey(fmt.Sprintf("%s\\Control\\LSA", w.getControlSet()))
	if err != nil {
		logger.Error("打开LSA注册表键失败:", err)
		return nil
	}
	defer key.Close()
	var bootKeyObf []byte
	jd, err := key.OpenSubKey("JD")

	if err != nil {
		logger.Error("打开JD子键失败:", err)
		return nil
	}
	skew, err := key.OpenSubKey("Skew1")
	if err != nil {
		logger.Error("打开Skew1子键失败:", err)
		return nil
	}
	gbg, err := key.OpenSubKey("GBG")
	if err != nil {
		logger.Error("打开GBG子键失败:", err)
		return nil
	}
	data, err := key.OpenSubKey("Data")
	if err != nil {
		logger.Error("打开Data子键失败:", err)
		return nil
	}
	jdClassName, err := hex.DecodeString(jd.GetClassName())
	if err != nil {
		logger.Error("解码JD类名失败:", err)
		return nil
	}
	skewClassName, err := hex.DecodeString(skew.GetClassName())
	if err != nil {
		logger.Error("解码Skew1类名失败:", err)
		return nil
	}
	gbgClassName, err := hex.DecodeString(gbg.GetClassName())
	if err != nil {
		logger.Error("解码GBG类名失败:", err)
		return nil
	}
	dataClassName, err := hex.DecodeString(data.GetClassName())
	if err != nil {
		logger.Error("解码Data类名失败:", err)
		return nil
	}
	bootKeyObf = append(bootKeyObf, jdClassName...)
	bootKeyObf = append(bootKeyObf, skewClassName...)
	bootKeyObf = append(bootKeyObf, gbgClassName...)
	bootKeyObf = append(bootKeyObf, dataClassName...)
	transforms := []int{8, 5, 4, 2, 11, 9, 13, 3, 0, 6, 1, 12, 14, 10, 15, 7}
	var bootKey []byte
	for i := 0; i < len(bootKeyObf); i++ {
		bootKey = append(bootKey, bootKeyObf[transforms[i]:transforms[i]+1]...)
	}
	return bootKey
}

func (w *WinReg) getControlSet() string {
	key, err := w.systemReg.OpenKey("select")
	if err != nil {
		logger.Error("打开select注册表键失败:", err)
		return "ControlSet001"
	}
	defer key.Close()
	set := getIntValue(key, "Current")
	return fmt.Sprintf("ControlSet%03d", set)
}

func (w *WinReg) getTimeZone() string {
	key, err := w.systemReg.OpenKey(fmt.Sprintf("%s\\Control\\TimeZoneInformation", w.getControlSet()))
	if err != nil {
		logger.Error("打开TimeZoneInformation注册表键失败:", err)
		return ""
	}
	defer key.Close()
	timeZoneName := getStringValue(key, "TimeZoneKeyName")
	if timeZoneName == "" {
		return ""
	}
	tKey, err := w.softwareReg.OpenKey(fmt.Sprintf("Microsoft\\Windows NT\\CurrentVersion\\Time Zones\\%s", timeZoneName))
	if err != nil {
		logger.Error("打开时区注册表键失败:", err)
		return ""
	}
	defer tKey.Close()
	timeZoneDisplayName := getStringValue(tKey, "Display")
	return timeZoneDisplayName
}

func (w *WinReg) getComputerName() string {
	systemKey, err := w.systemReg.OpenKey(fmt.Sprintf("%s\\Control\\ComputerName\\ComputerName", w.getControlSet()))
	if err != nil {
		logger.Error("打开ComputerName注册表键失败:", err)
		return ""
	}
	defer systemKey.Close()
	return getStringValue(systemKey, "ComputerName")
}

func (w *WinReg) getLastShutdownTime() string {
	systemKey, err := w.systemReg.OpenKey(fmt.Sprintf("%s\\Control\\Windows", w.getControlSet()))
	if err != nil {
		logger.Error("打开Windows注册表键失败:", err)
		return ""
	}
	defer systemKey.Close()
	hexTime := getBinaryValue(systemKey, "ShutdownTime")
	return timestampByts(hexTime)
}

func (w *WinReg) getLastLoginUser() string {
	softwareKey, err := w.softwareReg.OpenKey("Microsoft\\Windows\\CurrentVersion\\Authentication\\LogonUI")
	if err != nil {
		logger.Error("打开LogonUI注册表键失败:", err)
		return ""
	}
	defer softwareKey.Close()
	return getStringValue(softwareKey, "LastLoggedOnUser")
}

func (w *WinReg) getOrderMap(key, value string) *orderedmap.OrderedMap {
	result := orderedmap.New()
	result.SetEscapeHTML(false)
	result.Set("键", key)
	result.Set("值", value)
	return result
}

func (w *WinReg) getSystemInfo() ([]*orderedmap.OrderedMap, error) {
	/*
		获取系统信息
	*/
	var result []*orderedmap.OrderedMap
	softwareKey, err := w.softwareReg.OpenKey("Microsoft\\Windows NT\\CurrentVersion")
	if err != nil {
		logger.Error("打开CurrentVersion注册表键失败:", err)
		return nil, err
	}
	defer softwareKey.Close()
	result = append(result, w.getOrderMap("Build信息", getStringValue(softwareKey, "BuildLabEx")))
	result = append(result, w.getOrderMap("Build版本", getStringValue(softwareKey, "CurrentBuildNumber")))
	result = append(result, w.getOrderMap("计算机名称", w.getComputerName()))
	result = append(result, w.getOrderMap("版本信息", getStringValue(softwareKey, "EditionID")))
	result = append(result, w.getOrderMap("安装时间(本地时区)", timestamp(getIntValue(softwareKey, "InstallDate"))))
	result = append(result, w.getOrderMap("系统名称", getStringValue(softwareKey, "ProductName")))
	result = append(result, w.getOrderMap("发行ID", getStringValue(softwareKey, "ReleaseId")))
	result = append(result, w.getOrderMap("产品ID", getStringValue(softwareKey, "ProductId")))
	result = append(result, w.getOrderMap("注册所有者", getStringValue(softwareKey, "RegisteredOwner")))
	result = append(result, w.getOrderMap("注册组织", getStringValue(softwareKey, "RegisteredOrganization")))
	result = append(result, w.getOrderMap("注册所有者", getStringValue(softwareKey, "RegisteredOwner")))
	result = append(result, w.getOrderMap("系统时区", w.getTimeZone()))
	result = append(result, w.getOrderMap("最后一次正常关机时间(本地时区)", w.getLastShutdownTime()))
	if checkSubKeyExist(softwareKey, "SoftwareProtectionPlatform") {
		productKey, err := softwareKey.OpenSubKey("SoftwareProtectionPlatform")
		if err != nil {
			logger.Error("打开SoftwareProtectionPlatform子键失败:", err)
			return result, err
		}
		result = append(result, w.getOrderMap("产品密钥备份(非当前密钥)", getStringValue(productKey, "BackupProductKeyDefault")))
	}
	result = append(result, w.getOrderMap("上次登录的用户", w.getLastLoginUser()))
	return result, nil
}

func (w *WinReg) getNetInfo() ([]*orderedmap.OrderedMap, error) {
	/*
		获取网卡信息
	*/
	var result []*orderedmap.OrderedMap
	interfaceKey, err := w.systemReg.OpenKey(fmt.Sprintf("%s\\Services\\Tcpip\\Parameters\\Interfaces", w.getControlSet()))
	if err != nil {
		logger.Error("打开Interfaces注册表键失败:", err)
		return nil, err
	}
	defer interfaceKey.Close()
	interfaceSubKeyNames, err := interfaceKey.ReadSubKeyNames(-1)
	if err != nil {
		logger.Error("读取接口子键名称失败:", err)
		return nil, err
	}
	for _, interfaceSubKeyName := range interfaceSubKeyNames {
		info := orderedmap.New()
		info.SetEscapeHTML(false)
		deviceKey, err := w.systemReg.OpenKey(fmt.Sprintf("%s\\Control\\Network\\{4D36E972-E325-11CE-BFC1-08002BE10318}\\%s\\connection", w.getControlSet(), strings.ToUpper(interfaceSubKeyName)))
		if err != nil {
			logger.Error("打开网络设备注册表键失败:", err)
			info.Set("名称", "")
		} else {
			info.Set("名称", getStringValue(deviceKey, "Name"))
		}
		defer deviceKey.Close()
		macKey, err := w.systemReg.OpenKey(fmt.Sprintf("%s\\Control\\NetworkSetup2\\Interfaces\\%s\\Kernel", w.getControlSet(), strings.ToUpper(interfaceSubKeyName)))
		if err != nil {
			logger.Error("打开MAC地址注册表键失败:", err)
			info.Set("当前MAC地址", "")
			info.Set("物理MAC地址", "")
		} else {
			info.Set("当前MAC地址", byte2mac(getBinaryValue(macKey, "CurrentAddress")))
			info.Set("物理MAC地址", byte2mac(getBinaryValue(macKey, "PermanentAddress")))
		}
		defer macKey.Close()
		interfaceSubKey, err := interfaceKey.OpenSubKey(interfaceSubKeyName)
		if err != nil {
			logger.Error("打开接口子键失败:", err)
			return nil, err
		}
		info.Set("DHCP网络地址", getStringValue(interfaceSubKey, "DhcpIPAddress"))
		info.Set("DHCP网关", getStringsValue(interfaceSubKey, "DhcpDefaultGateway")[0])
		info.Set("DHCP服务地址", getStringValue(interfaceSubKey, "DhcpServer"))
		info.Set("租赁时间", timestamp(getIntValue(interfaceSubKey, "LeaseObtainedTime")))
		info.Set("过期时间", timestamp(getIntValue(interfaceSubKey, "LeaseTerminatesTime")))
		info.Set("IP地址", getStringsValue(interfaceSubKey, "IPAddress")[0])
		info.Set("子网掩码", getStringsValue(interfaceSubKey, "SubnetMask")[0])
		info.Set("网关", getStringsValue(interfaceSubKey, "DefaultGateway")[0])
		result = append(result, info)
	}
	return result, nil
}

func (w *WinReg) getUserInfo() ([]*orderedmap.OrderedMap, error) {
	/*
		获取用户信息
	*/
	var result []*orderedmap.OrderedMap
	domainAccountKey, err := w.samReg.OpenKey("SAM\\Domains\\Account")
	if err != nil {
		logger.Error("打开SAM Domains Account注册表键失败:", err)
		return nil, err
	}
	defer domainAccountKey.Close()
	domainAccountVData := getBinaryValue(domainAccountKey, "V")
	domainAccountFData := getBinaryValue(domainAccountKey, "F")
	t := structs.GetDomainAccountF(domainAccountFData)
	hashedBootKey := structs.GetHBootKey(t.Key0, w.getBootKey())
	machineSid := structs.GetMachineSid(domainAccountVData)
	userAccountKey, err := domainAccountKey.OpenSubKey("Users")
	if err != nil {
		logger.Error("打开Users子键失败:", err)
		return nil, err
	}
	defer userAccountKey.Close()
	userNameKey, err := userAccountKey.OpenSubKey("Names")
	if err != nil {
		logger.Error("打开Names子键失败:", err)
		return nil, err
	}
	defer userNameKey.Close()
	userNames, err := userNameKey.ReadSubKeyNames(-1)
	if err != nil {
		logger.Error("读取用户名失败:", err)
		return nil, err
	}
	for _, userName := range userNames {
		info := orderedmap.New()
		info.SetEscapeHTML(false)
		userKey, err := userNameKey.OpenSubKey(userName)
		if err != nil {
			logger.Error("打开用户子键失败:", err)
			continue
		}
		defer userKey.Close()
		_, valType, err := userKey.GetValue("(default)", []byte{})
		if err != nil {
			logger.Error("获取用户默认值失败:", err)
			continue
		}
		userSid := fmt.Sprintf("%s-%v", machineSid, valType)
		rid := fmt.Sprintf("%08x", valType)
		accountKey, err := userAccountKey.OpenSubKey(rid)
		if err != nil {
			logger.Error("打开用户账户子键失败:", err)
			continue
		}
		accountKey.Close()
		userFData := getBinaryValue(accountKey, "F")
		userVData := getBinaryValue(accountKey, "V")
		userV := structs.GetUserV(userVData)
		userF := structs.GetUserF(userFData)

		info.Set("用户名", userName)
		info.Set("SID", userSid)
		info.Set("密码哈希", structs.DecryptHash(hashedBootKey, userF.RID, userV.NTHash, structs.NTHASH))
		info.Set("上次登录时间", userF.LastLoginTime)
		info.Set("上次密码修改时间", userF.LastPwdChangeTime)
		info.Set("上次登录失败时间", userF.LastFailedLoginTime)
		info.Set("用户属性", strconv.Itoa(int(userF.UserAttribute)))
		info.Set("登录次数", strconv.Itoa(int(userF.LogonCount)))
		info.Set("登录失败次数", strconv.Itoa(int(userF.InValidLoginCount)))
		info.Set("用户全名", userV.FullName)
		info.Set("描述信息", userV.Comment)
		result = append(result, info)
	}
	return result, nil
}

//TODO 默认浏览器,最近访问文档等

func (w *WinReg) getDefaultBrowser() ([]*orderedmap.OrderedMap, error) {
	var result []*orderedmap.OrderedMap
	for idx, nt := range w.ntRegList {
		info := orderedmap.New()
		info.SetEscapeHTML(false)
		rootKey, err := nt.OpenKey("SOFTWARE\\Microsoft\\Windows\\Shell\\Associations\\UrlAssociations\\http\\UserChoice")
		if err != nil {
			logger.Error("打开默认浏览器注册表键失败:", err)
			return nil, err
		}
		defer rootKey.Close()
		browser := getStringValue(rootKey, "ProgId")
		result = append(result, w.getOrderMap(strconv.Itoa(idx), browser))
	}
	return result, nil
}

type RegResult struct {
	Data *orderedmap.OrderedMap `json:"data"`
	Err  string                 `json:"err"`
}

func (r *Reg) AnalyzeWinReg(folder string) *RegResult {
	/*
		@param	folder:	包含了SAM、SYSTEM、SOFTWARE、NTUSER.DAT注册表的文件夹,NTUSER.DAT可以存在多个,只需要后缀名是DAT即可
		@return:		解析结果、错误
	*/
	result := orderedmap.New()
	result.SetEscapeHTML(false)
	var systemReg registry.Registry
	var samReg registry.Registry
	var softwareReg registry.Registry
	var ntRegList []registry.Registry
	fileInfo, err := os.Stat(folder)
	if err != nil {
		logger.Error("检查文件夹状态失败:", err)
		return &RegResult{nil, err.Error()}
	}
	if !fileInfo.IsDir() {
		return &RegResult{nil, fmt.Sprintf("%s is not a folder", folder)}
	}
	err = filepath.Walk(folder, func(path string, info os.FileInfo, err error) error {
		filename := info.Name()
		switch filename {
		case "SYSTEM":
			systemReg, err = registry.Open(path)
		case "SOFTWARE":
			softwareReg, err = registry.Open(path)
			if err != nil {
				logger.Error("打开SOFTWARE注册表文件失败:", err)
				return err
			}
		case "SAM":
			samReg, err = registry.Open(path)
			if err != nil {
				logger.Error("打开SAM注册表文件失败:", err)
				return err
			}
		}
		if strings.HasSuffix(filename, ".DAT") {
			ntReg, err := registry.Open(path)
			if err != nil {
				logger.Error("打开NTUSER.DAT注册表文件失败:", err)
				return err
			}
			ntRegList = append(ntRegList, ntReg)
		}
		return nil
	})
	if err != nil {
		logger.Error("遍历文件夹失败:", err)
		return &RegResult{nil, err.Error()}
	}
	winReg := &WinReg{systemReg, samReg, softwareReg, ntRegList}
	sysInfo, err := winReg.getSystemInfo()
	if err != nil {
		logger.Error("获取系统信息失败:", err)
	} else {
		result.Set("系统信息", sysInfo)
	}
	netInfo, err := winReg.getNetInfo()
	if err != nil {
		logger.Error("获取网卡信息失败:", err)
	} else {
		result.Set("网卡信息", netInfo)
	}
	userInfo, err := winReg.getUserInfo()
	if err != nil {
		logger.Error("获取用户信息失败:", err)
	} else {
		result.Set("用户信息", userInfo)
	}
	defaultBrowser, err := winReg.getDefaultBrowser()
	if err != nil {
		logger.Error("获取默认浏览器信息失败:", err)
	} else {
		result.Set("默认浏览器", defaultBrowser)
	}
	return &RegResult{result, ""}
}


================================================
FILE: app.go
================================================
package main

import (
	"context"
	"fmt"
)

// App struct
type App struct {
	ctx context.Context
}

// NewApp creates a new App application struct
func NewApp() *App {
	return &App{}
}

// startup is called at application startup
func (a *App) startup(ctx context.Context) {
	// Perform your setup here
	a.ctx = ctx
}

// domReady is called after front-end resources have been loaded
func (a App) domReady(ctx context.Context) {
	// Add your action here
}

// beforeClose is called when the application is about to quit,
// either by clicking the window close button or calling runtime.Quit.
// Returning true will cause the application to continue, false will continue shutdown as normal.
func (a *App) beforeClose(ctx context.Context) (prevent bool) {
	return false
}

// shutdown is called at application termination
func (a *App) shutdown(ctx context.Context) {
	// Perform your teardown here
}

// Greet returns a greeting for the given name
func (a *App) Greet(name string) string {
	return fmt.Sprintf("Hello %s, It's show time!", name)
}

func (a *App) GetVersion() string {
	return "v2.6"
}


================================================
FILE: build/README.md
================================================
# Build Directory

The build directory is used to house all the build files and assets for your application. 

The structure is:

* bin - Output directory
* darwin - macOS specific files
* windows - Windows specific files

## Mac

The `darwin` directory holds files specific to Mac builds.
These may be customised and used as part of the build. To return these files to the default state, simply delete them
and
build with `wails build`.

The directory contains the following files:

- `Info.plist` - the main plist file used for Mac builds. It is used when building using `wails build`.
- `Info.dev.plist` - same as the main plist file but used when building using `wails dev`.

## Windows

The `windows` directory contains the manifest and rc files used when building with `wails build`.
These may be customised for your application. To return these files to the default state, simply delete them and
build with `wails build`.

- `icon.ico` - The icon used for the application. This is used when building using `wails build`. If you wish to
  use a different icon, simply replace this file with your own. If it is missing, a new `icon.ico` file
  will be created using the `appicon.png` file in the build directory.
- `installer/*` - The files used to create the Windows installer. These are used when building using `wails build`.
- `info.json` - Application details used for Windows builds. The data here will be used by the Windows installer,
  as well as the application itself (right click the exe -> properties -> details)
- `wails.exe.manifest` - The main application manifest file.

================================================
FILE: build/darwin/Info.dev.plist
================================================
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
    <dict>
        <key>CFBundlePackageType</key>
        <string>APPL</string>
        <key>CFBundleName</key>
        <string>{{.Info.ProductName}}</string>
        <key>CFBundleExecutable</key>
        <string>{{.OutputFilename}}</string>
        <key>CFBundleIdentifier</key>
        <string>com.wails.{{.Name}}</string>
        <key>CFBundleVersion</key>
        <string>{{.Info.ProductVersion}}</string>
        <key>CFBundleGetInfoString</key>
        <string>{{.Info.Comments}}</string>
        <key>CFBundleShortVersionString</key>
        <string>{{.Info.ProductVersion}}</string>
        <key>CFBundleIconFile</key>
        <string>iconfile</string>
        <key>LSMinimumSystemVersion</key>
        <string>10.13.0</string>
        <key>NSHighResolutionCapable</key>
        <string>true</string>
        <key>NSHumanReadableCopyright</key>
        <string>{{.Info.Copyright}}</string>
        {{if .Info.FileAssociations}}
        <key>CFBundleDocumentTypes</key>
        <array>
          {{range .Info.FileAssociations}}
          <dict>
            <key>CFBundleTypeExtensions</key>
            <array>
              <string>{{.Ext}}</string>
            </array>
            <key>CFBundleTypeName</key>
            <string>{{.Name}}</string>
            <key>CFBundleTypeRole</key>
            <string>{{.Role}}</string>
            <key>CFBundleTypeIconFile</key>
            <string>{{.IconName}}</string>
          </dict>
          {{end}}
        </array>
        {{end}}
        {{if .Info.Protocols}}
        <key>CFBundleURLTypes</key>
        <array>
          {{range .Info.Protocols}}
            <dict>
                <key>CFBundleURLName</key>
                <string>com.wails.{{.Scheme}}</string>
                <key>CFBundleURLSchemes</key>
                <array>
                    <string>{{.Scheme}}</string>
                </array>
                <key>CFBundleTypeRole</key>
                <string>{{.Role}}</string>
            </dict>
          {{end}}
        </array>
        {{end}}
        <key>NSAppTransportSecurity</key>
        <dict>
            <key>NSAllowsLocalNetworking</key>
            <true/>
        </dict>
    </dict>
</plist>


================================================
FILE: build/darwin/Info.plist
================================================
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
    <dict>
        <key>CFBundlePackageType</key>
        <string>APPL</string>
        <key>CFBundleName</key>
        <string>{{.Info.ProductName}}</string>
        <key>CFBundleExecutable</key>
        <string>{{.OutputFilename}}</string>
        <key>CFBundleIdentifier</key>
        <string>com.wails.{{.Name}}</string>
        <key>CFBundleVersion</key>
        <string>{{.Info.ProductVersion}}</string>
        <key>CFBundleGetInfoString</key>
        <string>{{.Info.Comments}}</string>
        <key>CFBundleShortVersionString</key>
        <string>{{.Info.ProductVersion}}</string>
        <key>CFBundleIconFile</key>
        <string>iconfile</string>
        <key>LSMinimumSystemVersion</key>
        <string>10.13.0</string>
        <key>NSHighResolutionCapable</key>
        <string>true</string>
        <key>NSHumanReadableCopyright</key>
        <string>{{.Info.Copyright}}</string>
        {{if .Info.FileAssociations}}
        <key>CFBundleDocumentTypes</key>
        <array>
          {{range .Info.FileAssociations}}
          <dict>
            <key>CFBundleTypeExtensions</key>
            <array>
              <string>{{.Ext}}</string>
            </array>
            <key>CFBundleTypeName</key>
            <string>{{.Name}}</string>
            <key>CFBundleTypeRole</key>
            <string>{{.Role}}</string>
            <key>CFBundleTypeIconFile</key>
            <string>{{.IconName}}</string>
          </dict>
          {{end}}
        </array>
        {{end}}
        {{if .Info.Protocols}}
        <key>CFBundleURLTypes</key>
        <array>
          {{range .Info.Protocols}}
            <dict>
                <key>CFBundleURLName</key>
                <string>com.wails.{{.Scheme}}</string>
                <key>CFBundleURLSchemes</key>
                <array>
                    <string>{{.Scheme}}</string>
                </array>
                <key>CFBundleTypeRole</key>
                <string>{{.Role}}</string>
            </dict>
          {{end}}
        </array>
        {{end}}
    </dict>
</plist>


================================================
FILE: build/windows/info.json
================================================
{
	"fixed": {
		"file_version": "{{.Info.ProductVersion}}"
	},
	"info": {
		"0000": {
			"ProductVersion": "{{.Info.ProductVersion}}",
			"CompanyName": "{{.Info.CompanyName}}",
			"FileDescription": "{{.Info.ProductName}}",
			"LegalCopyright": "{{.Info.Copyright}}",
			"ProductName": "{{.Info.ProductName}}",
			"Comments": "{{.Info.Comments}}"
		}
	}
}

================================================
FILE: build/windows/installer/project.nsi
================================================
Unicode true

####
## Please note: Template replacements don't work in this file. They are provided with default defines like
## mentioned underneath.
## If the keyword is not defined, "wails_tools.nsh" will populate them with the values from ProjectInfo.
## If they are defined here, "wails_tools.nsh" will not touch them. This allows to use this project.nsi manually
## from outside of Wails for debugging and development of the installer.
##
## For development first make a wails nsis build to populate the "wails_tools.nsh":
## > wails build --target windows/amd64 --nsis
## Then you can call makensis on this file with specifying the path to your binary:
## For a AMD64 only installer:
## > makensis -DARG_WAILS_AMD64_BINARY=..\..\bin\app.exe
## For a ARM64 only installer:
## > makensis -DARG_WAILS_ARM64_BINARY=..\..\bin\app.exe
## For a installer with both architectures:
## > makensis -DARG_WAILS_AMD64_BINARY=..\..\bin\app-amd64.exe -DARG_WAILS_ARM64_BINARY=..\..\bin\app-arm64.exe
####
## The following information is taken from the ProjectInfo file, but they can be overwritten here.
####
## !define INFO_PROJECTNAME    "MyProject" # Default "{{.Name}}"
## !define INFO_COMPANYNAME    "MyCompany" # Default "{{.Info.CompanyName}}"
## !define INFO_PRODUCTNAME    "MyProduct" # Default "{{.Info.ProductName}}"
## !define INFO_PRODUCTVERSION "1.0.0"     # Default "{{.Info.ProductVersion}}"
## !define INFO_COPYRIGHT      "Copyright" # Default "{{.Info.Copyright}}"
###
## !define PRODUCT_EXECUTABLE  "Application.exe"      # Default "${INFO_PROJECTNAME}.exe"
## !define UNINST_KEY_NAME     "UninstKeyInRegistry"  # Default "${INFO_COMPANYNAME}${INFO_PRODUCTNAME}"
####
## !define REQUEST_EXECUTION_LEVEL "admin"            # Default "admin"  see also https://nsis.sourceforge.io/Docs/Chapter4.html
####
## Include the wails tools
####
!include "wails_tools.nsh"

# The version information for this two must consist of 4 parts
VIProductVersion "${INFO_PRODUCTVERSION}.0"
VIFileVersion    "${INFO_PRODUCTVERSION}.0"

VIAddVersionKey "CompanyName"     "${INFO_COMPANYNAME}"
VIAddVersionKey "FileDescription" "${INFO_PRODUCTNAME} Installer"
VIAddVersionKey "ProductVersion"  "${INFO_PRODUCTVERSION}"
VIAddVersionKey "FileVersion"     "${INFO_PRODUCTVERSION}"
VIAddVersionKey "LegalCopyright"  "${INFO_COPYRIGHT}"
VIAddVersionKey "ProductName"     "${INFO_PRODUCTNAME}"

# Enable HiDPI support. https://nsis.sourceforge.io/Reference/ManifestDPIAware
ManifestDPIAware true

!include "MUI.nsh"

!define MUI_ICON "..\icon.ico"
!define MUI_UNICON "..\icon.ico"
# !define MUI_WELCOMEFINISHPAGE_BITMAP "resources\leftimage.bmp" #Include this to add a bitmap on the left side of the Welcome Page. Must be a size of 164x314
!define MUI_FINISHPAGE_NOAUTOCLOSE # Wait on the INSTFILES page so the user can take a look into the details of the installation steps
!define MUI_ABORTWARNING # This will warn the user if they exit from the installer.

!insertmacro MUI_PAGE_WELCOME # Welcome to the installer page.
# !insertmacro MUI_PAGE_LICENSE "resources\eula.txt" # Adds a EULA page to the installer
!insertmacro MUI_PAGE_DIRECTORY # In which folder install page.
!insertmacro MUI_PAGE_INSTFILES # Installing page.
!insertmacro MUI_PAGE_FINISH # Finished installation page.

!insertmacro MUI_UNPAGE_INSTFILES # Uinstalling page

!insertmacro MUI_LANGUAGE "English" # Set the Language of the installer

## The following two statements can be used to sign the installer and the uninstaller. The path to the binaries are provided in %1
#!uninstfinalize 'signtool --file "%1"'
#!finalize 'signtool --file "%1"'

Name "${INFO_PRODUCTNAME}"
OutFile "..\..\bin\${INFO_PROJECTNAME}-${ARCH}-installer.exe" # Name of the installer's file.
InstallDir "$PROGRAMFILES64\${INFO_COMPANYNAME}\${INFO_PRODUCTNAME}" # Default installing folder ($PROGRAMFILES is Program Files folder).
ShowInstDetails show # This will always show the installation details.

Function .onInit
   !insertmacro wails.checkArchitecture
FunctionEnd

Section
    !insertmacro wails.setShellContext

    !insertmacro wails.webview2runtime

    SetOutPath $INSTDIR

    !insertmacro wails.files

    CreateShortcut "$SMPROGRAMS\${INFO_PRODUCTNAME}.lnk" "$INSTDIR\${PRODUCT_EXECUTABLE}"
    CreateShortCut "$DESKTOP\${INFO_PRODUCTNAME}.lnk" "$INSTDIR\${PRODUCT_EXECUTABLE}"

    !insertmacro wails.associateFiles
    !insertmacro wails.associateCustomProtocols

    !insertmacro wails.writeUninstaller
SectionEnd

Section "uninstall"
    !insertmacro wails.setShellContext

    RMDir /r "$AppData\${PRODUCT_EXECUTABLE}" # Remove the WebView2 DataPath

    RMDir /r $INSTDIR

    Delete "$SMPROGRAMS\${INFO_PRODUCTNAME}.lnk"
    Delete "$DESKTOP\${INFO_PRODUCTNAME}.lnk"

    !insertmacro wails.unassociateFiles
    !insertmacro wails.unassociateCustomProtocols

    !insertmacro wails.deleteUninstaller
SectionEnd


================================================
FILE: build/windows/installer/wails_tools.nsh
================================================
# DO NOT EDIT - Generated automatically by `wails build`

!include "x64.nsh"
!include "WinVer.nsh"
!include "FileFunc.nsh"

!ifndef INFO_PROJECTNAME
    !define INFO_PROJECTNAME "{{.Name}}"
!endif
!ifndef INFO_COMPANYNAME
    !define INFO_COMPANYNAME "{{.Info.CompanyName}}"
!endif
!ifndef INFO_PRODUCTNAME
    !define INFO_PRODUCTNAME "{{.Info.ProductName}}"
!endif
!ifndef INFO_PRODUCTVERSION
    !define INFO_PRODUCTVERSION "{{.Info.ProductVersion}}"
!endif
!ifndef INFO_COPYRIGHT
    !define INFO_COPYRIGHT "{{.Info.Copyright}}"
!endif
!ifndef PRODUCT_EXECUTABLE
    !define PRODUCT_EXECUTABLE "${INFO_PROJECTNAME}.exe"
!endif
!ifndef UNINST_KEY_NAME
    !define UNINST_KEY_NAME "${INFO_COMPANYNAME}${INFO_PRODUCTNAME}"
!endif
!define UNINST_KEY "Software\Microsoft\Windows\CurrentVersion\Uninstall\${UNINST_KEY_NAME}"

!ifndef REQUEST_EXECUTION_LEVEL
    !define REQUEST_EXECUTION_LEVEL "admin"
!endif

RequestExecutionLevel "${REQUEST_EXECUTION_LEVEL}"

!ifdef ARG_WAILS_AMD64_BINARY
    !define SUPPORTS_AMD64
!endif

!ifdef ARG_WAILS_ARM64_BINARY
    !define SUPPORTS_ARM64
!endif

!ifdef SUPPORTS_AMD64
    !ifdef SUPPORTS_ARM64
        !define ARCH "amd64_arm64"
    !else
        !define ARCH "amd64"
    !endif
!else
    !ifdef SUPPORTS_ARM64
        !define ARCH "arm64"
    !else
        !error "Wails: Undefined ARCH, please provide at least one of ARG_WAILS_AMD64_BINARY or ARG_WAILS_ARM64_BINARY"
    !endif
!endif

!macro wails.checkArchitecture
    !ifndef WAILS_WIN10_REQUIRED
        !define WAILS_WIN10_REQUIRED "This product is only supported on Windows 10 (Server 2016) and later."
    !endif

    !ifndef WAILS_ARCHITECTURE_NOT_SUPPORTED
        !define WAILS_ARCHITECTURE_NOT_SUPPORTED "This product can't be installed on the current Windows architecture. Supports: ${ARCH}"
    !endif

    ${If} ${AtLeastWin10}
        !ifdef SUPPORTS_AMD64
            ${if} ${IsNativeAMD64}
                Goto ok
            ${EndIf}
        !endif

        !ifdef SUPPORTS_ARM64
            ${if} ${IsNativeARM64}
                Goto ok
            ${EndIf}
        !endif

        IfSilent silentArch notSilentArch
        silentArch:
            SetErrorLevel 65
            Abort
        notSilentArch:
            MessageBox MB_OK "${WAILS_ARCHITECTURE_NOT_SUPPORTED}"
            Quit
    ${else}
        IfSilent silentWin notSilentWin
        silentWin:
            SetErrorLevel 64
            Abort
        notSilentWin:
            MessageBox MB_OK "${WAILS_WIN10_REQUIRED}"
            Quit
    ${EndIf}

    ok:
!macroend

!macro wails.files
    !ifdef SUPPORTS_AMD64
        ${if} ${IsNativeAMD64}
            File "/oname=${PRODUCT_EXECUTABLE}" "${ARG_WAILS_AMD64_BINARY}"
        ${EndIf}
    !endif

    !ifdef SUPPORTS_ARM64
        ${if} ${IsNativeARM64}
            File "/oname=${PRODUCT_EXECUTABLE}" "${ARG_WAILS_ARM64_BINARY}"
        ${EndIf}
    !endif
!macroend

!macro wails.writeUninstaller
    WriteUninstaller "$INSTDIR\uninstall.exe"

    SetRegView 64
    WriteRegStr HKLM "${UNINST_KEY}" "Publisher" "${INFO_COMPANYNAME}"
    WriteRegStr HKLM "${UNINST_KEY}" "DisplayName" "${INFO_PRODUCTNAME}"
    WriteRegStr HKLM "${UNINST_KEY}" "DisplayVersion" "${INFO_PRODUCTVERSION}"
    WriteRegStr HKLM "${UNINST_KEY}" "DisplayIcon" "$INSTDIR\${PRODUCT_EXECUTABLE}"
    WriteRegStr HKLM "${UNINST_KEY}" "UninstallString" "$\"$INSTDIR\uninstall.exe$\""
    WriteRegStr HKLM "${UNINST_KEY}" "QuietUninstallString" "$\"$INSTDIR\uninstall.exe$\" /S"

    ${GetSize} "$INSTDIR" "/S=0K" $0 $1 $2
    IntFmt $0 "0x%08X" $0
    WriteRegDWORD HKLM "${UNINST_KEY}" "EstimatedSize" "$0"
!macroend

!macro wails.deleteUninstaller
    Delete "$INSTDIR\uninstall.exe"

    SetRegView 64
    DeleteRegKey HKLM "${UNINST_KEY}"
!macroend

!macro wails.setShellContext
    ${If} ${REQUEST_EXECUTION_LEVEL} == "admin"
        SetShellVarContext all
    ${else}
        SetShellVarContext current
    ${EndIf}
!macroend

# Install webview2 by launching the bootstrapper
# See https://docs.microsoft.com/en-us/microsoft-edge/webview2/concepts/distribution#online-only-deployment
!macro wails.webview2runtime
    !ifndef WAILS_INSTALL_WEBVIEW_DETAILPRINT
        !define WAILS_INSTALL_WEBVIEW_DETAILPRINT "Installing: WebView2 Runtime"
    !endif

    SetRegView 64
	# If the admin key exists and is not empty then webview2 is already installed
	ReadRegStr $0 HKLM "SOFTWARE\WOW6432Node\Microsoft\EdgeUpdate\Clients\{F3017226-FE2A-4295-8BDF-00C3A9A7E4C5}" "pv"
    ${If} $0 != ""
        Goto ok
    ${EndIf}

    ${If} ${REQUEST_EXECUTION_LEVEL} == "user"
        # If the installer is run in user level, check the user specific key exists and is not empty then webview2 is already installed
	    ReadRegStr $0 HKCU "Software\Microsoft\EdgeUpdate\Clients\{F3017226-FE2A-4295-8BDF-00C3A9A7E4C5}" "pv"
        ${If} $0 != ""
            Goto ok
        ${EndIf}
     ${EndIf}

	SetDetailsPrint both
    DetailPrint "${WAILS_INSTALL_WEBVIEW_DETAILPRINT}"
    SetDetailsPrint listonly

    InitPluginsDir
    CreateDirectory "$pluginsdir\webview2bootstrapper"
    SetOutPath "$pluginsdir\webview2bootstrapper"
    File "tmp\MicrosoftEdgeWebview2Setup.exe"
    ExecWait '"$pluginsdir\webview2bootstrapper\MicrosoftEdgeWebview2Setup.exe" /silent /install'

    SetDetailsPrint both
    ok:
!macroend

# Copy of APP_ASSOCIATE and APP_UNASSOCIATE macros from here https://gist.github.com/nikku/281d0ef126dbc215dd58bfd5b3a5cd5b
!macro APP_ASSOCIATE EXT FILECLASS DESCRIPTION ICON COMMANDTEXT COMMAND
  ; Backup the previously associated file class
  ReadRegStr $R0 SHELL_CONTEXT "Software\Classes\.${EXT}" ""
  WriteRegStr SHELL_CONTEXT "Software\Classes\.${EXT}" "${FILECLASS}_backup" "$R0"

  WriteRegStr SHELL_CONTEXT "Software\Classes\.${EXT}" "" "${FILECLASS}"

  WriteRegStr SHELL_CONTEXT "Software\Classes\${FILECLASS}" "" `${DESCRIPTION}`
  WriteRegStr SHELL_CONTEXT "Software\Classes\${FILECLASS}\DefaultIcon" "" `${ICON}`
  WriteRegStr SHELL_CONTEXT "Software\Classes\${FILECLASS}\shell" "" "open"
  WriteRegStr SHELL_CONTEXT "Software\Classes\${FILECLASS}\shell\open" "" `${COMMANDTEXT}`
  WriteRegStr SHELL_CONTEXT "Software\Classes\${FILECLASS}\shell\open\command" "" `${COMMAND}`
!macroend

!macro APP_UNASSOCIATE EXT FILECLASS
  ; Backup the previously associated file class
  ReadRegStr $R0 SHELL_CONTEXT "Software\Classes\.${EXT}" `${FILECLASS}_backup`
  WriteRegStr SHELL_CONTEXT "Software\Classes\.${EXT}" "" "$R0"

  DeleteRegKey SHELL_CONTEXT `Software\Classes\${FILECLASS}`
!macroend

!macro wails.associateFiles
    ; Create file associations
    {{range .Info.FileAssociations}}
      !insertmacro APP_ASSOCIATE "{{.Ext}}" "{{.Name}}" "{{.Description}}" "$INSTDIR\{{.IconName}}.ico" "Open with ${INFO_PRODUCTNAME}" "$INSTDIR\${PRODUCT_EXECUTABLE} $\"%1$\""

      File "..\{{.IconName}}.ico"
    {{end}}
!macroend

!macro wails.unassociateFiles
    ; Delete app associations
    {{range .Info.FileAssociations}}
      !insertmacro APP_UNASSOCIATE "{{.Ext}}" "{{.Name}}"

      Delete "$INSTDIR\{{.IconName}}.ico"
    {{end}}
!macroend

!macro CUSTOM_PROTOCOL_ASSOCIATE PROTOCOL DESCRIPTION ICON COMMAND
  DeleteRegKey SHELL_CONTEXT "Software\Classes\${PROTOCOL}"
  WriteRegStr SHELL_CONTEXT "Software\Classes\${PROTOCOL}" "" "${DESCRIPTION}"
  WriteRegStr SHELL_CONTEXT "Software\Classes\${PROTOCOL}" "URL Protocol" ""
  WriteRegStr SHELL_CONTEXT "Software\Classes\${PROTOCOL}\DefaultIcon" "" "${ICON}"
  WriteRegStr SHELL_CONTEXT "Software\Classes\${PROTOCOL}\shell" "" ""
  WriteRegStr SHELL_CONTEXT "Software\Classes\${PROTOCOL}\shell\open" "" ""
  WriteRegStr SHELL_CONTEXT "Software\Classes\${PROTOCOL}\shell\open\command" "" "${COMMAND}"
!macroend

!macro CUSTOM_PROTOCOL_UNASSOCIATE PROTOCOL
  DeleteRegKey SHELL_CONTEXT "Software\Classes\${PROTOCOL}"
!macroend

!macro wails.associateCustomProtocols
    ; Create custom protocols associations
    {{range .Info.Protocols}}
      !insertmacro CUSTOM_PROTOCOL_ASSOCIATE "{{.Scheme}}" "{{.Description}}" "$INSTDIR\${PRODUCT_EXECUTABLE},0" "$INSTDIR\${PRODUCT_EXECUTABLE} $\"%1$\""

    {{end}}
!macroend

!macro wails.unassociateCustomProtocols
    ; Delete app custom protocol associations
    {{range .Info.Protocols}}
      !insertmacro CUSTOM_PROTOCOL_UNASSOCIATE "{{.Scheme}}"
    {{end}}
!macroend


================================================
FILE: build/windows/wails.exe.manifest
================================================
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<assembly manifestVersion="1.0" xmlns="urn:schemas-microsoft-com:asm.v1" xmlns:asmv3="urn:schemas-microsoft-com:asm.v3">
    <assemblyIdentity type="win32" name="com.wails.{{.Name}}" version="{{.Info.ProductVersion}}.0" processorArchitecture="*"/>
    <dependency>
        <dependentAssembly>
            <assemblyIdentity type="win32" name="Microsoft.Windows.Common-Controls" version="6.0.0.0" processorArchitecture="*" publicKeyToken="6595b64144ccf1df" language="*"/>
        </dependentAssembly>
    </dependency>
    <asmv3:application>
        <asmv3:windowsSettings>
            <dpiAware xmlns="http://schemas.microsoft.com/SMI/2005/WindowsSettings">true/pm</dpiAware> <!-- fallback for Windows 7 and 8 -->
            <dpiAwareness xmlns="http://schemas.microsoft.com/SMI/2016/WindowsSettings">permonitorv2,permonitor</dpiAwareness> <!-- falls back to per-monitor if per-monitor v2 is not supported -->
        </asmv3:windowsSettings>
    </asmv3:application>
</assembly>

================================================
FILE: frontend/.gitignore
================================================
# Logs
logs
*.log
npm-debug.log*
yarn-debug.log*
yarn-error.log*
pnpm-debug.log*
lerna-debug.log*

node_modules
.DS_Store
dist
dist-ssr
coverage
*.local

/cypress/videos/
/cypress/screenshots/

# Editor directories and files
.vscode/*
!.vscode/extensions.json
.idea
*.suo
*.ntvs*
*.njsproj
*.sln
*.sw?
.trae


================================================
FILE: frontend/README.md
================================================
# primevue-quickstart-create-vue-ts

This template should help get you started developing with Vue 3 in Vite.

## Recommended IDE Setup

[VSCode](https://code.visualstudio.com/) + [Volar](https://marketplace.visualstudio.com/items?itemName=Vue.volar) (and disable Vetur) + [TypeScript Vue Plugin (Volar)](https://marketplace.visualstudio.com/items?itemName=Vue.vscode-typescript-vue-plugin).

## Type Support for `.vue` Imports in TS

TypeScript cannot handle type information for `.vue` imports by default, so we replace the `tsc` CLI with `vue-tsc` for type checking. In editors, we need [TypeScript Vue Plugin (Volar)](https://marketplace.visualstudio.com/items?itemName=Vue.vscode-typescript-vue-plugin) to make the TypeScript language service aware of `.vue` types.

If the standalone TypeScript plugin doesn't feel fast enough to you, Volar has also implemented a [Take Over Mode](https://github.com/johnsoncodehk/volar/discussions/471#discussioncomment-1361669) that is more performant. You can enable it by the following steps:

1. Disable the built-in TypeScript Extension
    1. Run `Extensions: Show Built-in Extensions` from VSCode's command palette
    2. Find `TypeScript and JavaScript Language Features`, right click and select `Disable (Workspace)`
2. Reload the VSCode window by running `Developer: Reload Window` from the command palette.

## Customize configuration

See [Vite Configuration Reference](https://vitejs.dev/config/).

## Project Setup

```sh
npm install
```

### Compile and Hot-Reload for Development

```sh
npm run dev
```

### Type-Check, Compile and Minify for Production

```sh
npm run build
```


================================================
FILE: frontend/components.d.ts
================================================
/* eslint-disable */
// @ts-nocheck
// Generated by unplugin-vue-components
// Read more: https://github.com/vuejs/core/pull/3399
// biome-ignore lint: disable
export {}

/* prettier-ignore */
declare module 'vue' {
  export interface GlobalComponents {
    AppConfig: typeof import('./src/components/AppConfig.vue')['default']
    AppFooter: typeof import('./src/components/AppFooter.vue')['default']
    AppSidebar: typeof import('./src/components/AppSidebar.vue')['default']
    AppTopbar: typeof import('./src/components/AppTopbar.vue')['default']
    Button: typeof import('primevue/button')['default']
    Card: typeof import('primevue/card')['default']
    Column: typeof import('primevue/column')['default']
    DataTable: typeof import('primevue/datatable')['default']
    Divider: typeof import('primevue/divider')['default']
    Drawer: typeof import('primevue/drawer')['default']
    Empty: typeof import('./src/components/Empty.vue')['default']
    FloatLabel: typeof import('primevue/floatlabel')['default']
    InputText: typeof import('primevue/inputtext')['default']
    Menu: typeof import('primevue/menu')['default']
    Message: typeof import('primevue/message')['default']
    ProgressBar: typeof import('primevue/progressbar')['default']
    ProgressSpinner: typeof import('primevue/progressspinner')['default']
    RouterLink: typeof import('vue-router')['RouterLink']
    RouterView: typeof import('vue-router')['RouterView']
    Tab: typeof import('primevue/tab')['default']
    TabList: typeof import('primevue/tablist')['default']
    TabPanel: typeof import('primevue/tabpanel')['default']
    TabPanels: typeof import('primevue/tabpanels')['default']
    Textarea: typeof import('primevue/textarea')['default']
    Toast: typeof import('primevue/toast')['default']
  }
  export interface GlobalDirectives {
    Ripple: typeof import('primevue/ripple')['default']
    StyleClass: typeof import('primevue/styleclass')['default']
    Tooltip: typeof import('primevue/tooltip')['default']
  }
}


================================================
FILE: frontend/env.d.ts
================================================
/// <reference types="vite/client" />


================================================
FILE: frontend/index.html
================================================
<!DOCTYPE html>
<html lang="en">
    <head>
        <meta charset="UTF-8" />
        <meta name="viewport" content="width=device-width, initial-scale=1.0" />
        <title>ForensicsTool</title>
    </head>
    <body>
        <div id="app"></div>
        <script type="module" src="/src/main.ts"></script>
    </body>
</html>


================================================
FILE: frontend/package.json
================================================
{
    "name": "primevue-quickstart-create-vue-ts",
    "version": "0.0.0",
    "type": "module",
    "scripts": {
        "dev": "vite",
        "build": "run-p type-check build-only",
        "preview": "vite preview",
        "build-only": "vite build",
        "type-check": "vue-tsc --noEmit"
    },
    "dependencies": {
        "@primeuix/themes": "^1.0.0",
        "chart.js": "^4.4.8",
        "echarts": "^6.0.0",
        "pinia": "^3.0.4",
        "primeicons": "^7.0.0",
        "primevue": "^4.3.1",
        "vue": "^3.4.27",
        "vue-router": "^4.6.3"
    },
    "devDependencies": {
        "@primevue/auto-import-resolver": "^4.3.1",
        "@types/node": "^20.14.2",
        "@vitejs/plugin-vue": "^5.0.5",
        "@vue/tsconfig": "^0.5.1",
        "npm-run-all": "^4.1.5",
        "typescript": "^5.4.5",
        "unplugin-vue-components": "^28.4.0",
        "vite": "^5.2.13",
        "vue-tsc": "^2.0.21"
    }
}


================================================
FILE: frontend/package.json.md5
================================================
b9da4125dc6abe1642aa99eb71d943d1

================================================
FILE: frontend/pnpm-workspace.yaml
================================================
ignoredBuiltDependencies:
  - esbuild


================================================
FILE: frontend/src/App.vue
================================================
<script setup>
import AppTopbar from "./components/AppTopbar.vue";
import AppFooter from "./components/AppFooter.vue";
import AppSidebar from "./components/AppSidebar.vue";
import { onMounted, onUnmounted } from 'vue';

// 全局拖放事件处理,阻止浏览器默认行为
const handleGlobalDragOver = (e) => {
  // 阻止默认行为,但不阻止事件冒泡
  e.preventDefault();
};

const handleGlobalDrop = (e) => {
  // 阻止默认行为,但不阻止事件冒泡
  e.preventDefault();
};

// 组件挂载时添加全局事件监听
onMounted(() => {
  document.addEventListener('dragover', handleGlobalDragOver);
  document.addEventListener('drop', handleGlobalDrop);
});

// 组件卸载时移除全局事件监听
onUnmounted(() => {
  document.removeEventListener('dragover', handleGlobalDragOver);
  document.removeEventListener('drop', handleGlobalDrop);
});
</script>

<template>
    <div class="app-layout">
        <AppTopbar />
        <div class="app-body">
            <AppSidebar />
            <div class="app-content">
                <transition name="page-transition" mode="out-in">
                    <router-view />
                </transition>
            </div>
        </div>
        <!-- <AppFooter /> -->
    </div>
</template>

<style>
/* 页面过渡效果样式 */
.page-transition-enter-active,
.page-transition-leave-active {
    transition: all 400ms ease;
}

.page-transition-enter-from {
    transform: scale(0.9);
}

.page-transition-leave-to {
    transform: scale(1.1);
}

.page-transition-enter-active,
.page-transition-leave-active {
    transition: transform 400ms ease, opacity 400ms ease;
}

.page-transition-enter-from,
.page-transition-leave-to {
    opacity: 0;
}

</style>


================================================
FILE: frontend/src/assets/styles/main.css
================================================
@import "primeicons/primeicons.css";

html {
    box-sizing: border-box;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    font-family: "Inter", sans-serif;
    font-optical-sizing: auto;
    font-variation-settings: normal;
    font-weight: 400;
}

/* 全局滚动条样式 */
::-webkit-scrollbar {
    width: 6px;
    height: 6px;
}

::-webkit-scrollbar-track {
    background: transparent;
}

::-webkit-scrollbar-thumb {
    background-color: var(--p-surface-300);
    border-radius: 3px;
    transition: background-color 0.2s;
}

.p-dark ::-webkit-scrollbar-thumb {
    background-color: var(--p-surface-600);
}

::-webkit-scrollbar-thumb:hover {
    background-color: var(--p-surface-400);
}

.p-dark ::-webkit-scrollbar-thumb:hover {
    background-color: var(--p-surface-500);
}

/* 滚动条交点样式 */
::-webkit-scrollbar-corner {
    background: transparent;
}

body {
    background-color: var(--p-surface-50);
    min-height: 100vh;
}

.p-dark body {
    background-color: var(--p-surface-950);
}

.layout-container {
    background-color: var(--p-surface-50);
    color: var(--p-surface-950);
    min-height: 100vh;
    padding: 2rem;
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.p-dark .layout-container {
    background-color: var(--p-surface-950);
    color: var(--p-surface-0);
}

/* 重置HTML和body样式,确保页面不被滚动 */
html, body {
    margin: 0;
    padding: 0;
    height: 100%;
    overflow: hidden;
}

#app {
    height: 100vh;
    overflow: hidden;
}

.app-layout {
    background-color: var(--p-surface-50);
    color: var(--p-surface-950);
    height: 100%;
    display: flex;
    flex-direction: column;
}

.p-dark .app-layout {
    background-color: var(--p-surface-950);
    color: var(--p-surface-0);
}

.app-body {
    flex: 1;
    display: flex;
    overflow: hidden;
    min-height: 0; /* 确保flex子项可以收缩 */
}

.app-content {
    flex: 1;
    overflow-y: hidden;
    background-color: var(--p-surface-50);
    height: 100%;
}

.p-dark .app-content {
    background-color: var(--p-surface-950);
}

/* TopBar样式 */
.topbar {
    background-color: var(--p-surface-200) !important;
    border-bottom: 1px solid var(--p-surface-200);
    z-index: 10;
}

.p-dark .topbar {
    background-color: var(--p-surface-800) !important;
    border-bottom-color: var(--p-surface-700);
}

.topbar-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    max-width: 100%;
}

/* Footer样式 */
.footer {
    background-color: var(--p-surface-0);
    border-top: 1px solid var(--p-surface-200);
    padding: 0.75rem 1.5rem;
    z-index: 10;
}

.p-dark .footer {
    background-color: var(--p-surface-900);
    border-top-color: var(--p-surface-700);
}

.footer-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    max-width: 100%;
}

/* 侧边栏样式调整 */
.sidebar {
    height: 100% !important;
    display: flex;
    flex-direction: column;
}

.layout-grid {
    display: flex;
    flex-direction: column;
    flex: 1;
    max-width: none;
    width: 100%;
    margin: 0 auto;
    gap: 1.5rem;
}

.layout-grid-row {
    display: flex;
    flex-direction: row;
    gap: 1.5rem;
    width: 100%;
}

.layout-card {
    background-color: var(--p-surface-0);
    color: var(--p-surface-950);
    padding: 1.5rem;
    border-radius: 0.5rem;
    border: 1px solid var(--p-surface-200);
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.p-dark .layout-card {
    background-color: var(--p-surface-900);
    color: var(--p-surface-0);
    border-color: var(--p-surface-700);
}

.stats {
    display: grid;
    grid-template-columns: 1fr 1fr 1fr 1fr;
    gap: 1.714rem;
    position: relative;
    z-index: 0;
}

.stats-icon-box {
    flex-shrink: 0;
    background-color: var(--p-primary-100);
    color: var(--p-primary-600);
    border-radius: 0.5rem;
    width: 2rem;
    height: 2rem;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 1px solid var(--p-primary-200);
}

.p-dark .stats-icon-box {
    background-color: color-mix(in srgb, var(--p-primary-400), transparent 80%);
    border-color: color-mix(in srgb, var(--p-primary-400), transparent 70%);
    color: var(--p-primary-200);
}

.stats-header {
    display: flex;
    align-items: flex-start;
    gap: 0.5rem;
    justify-content: space-between;
}

.stats-title {
    font-size: 1.25rem;
    font-weight: 300;
    line-height: 1.25;
    color: var(--p-surface-900);
}

.p-dark .stats-title {
    color: var(--p-surface-0);
}

.stats-content {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
    width: 100%;
}

.stats-value {
    font-size: 1.875rem;
    font-weight: 500;
    line-height: 1.25;
    color: var(--p-surface-900);
}

.p-dark .stats-value {
    color: var(--p-surface-0);
}

.stats-subtitle {
    color: var(--p-surface-600);
    font-size: 0.875rem;
    line-height: 1.25;
}

.p-dark .stats-subtitle {
    color: var(--p-surface-400);
}

.col-item-2 {
    width: 50%;
}

/* 统一的结果卡片样式 */
.result-card {
    background-color: var(--p-surface-0);
    color: var(--p-surface-950);
    border: 1px solid var(--p-surface-200);
    border-radius: 0.5rem;
    padding: 0.5rem;
    margin: 0;
    display: flex;
    flex-direction: column;
    flex: 1;
    overflow: scroll;
    min-height: 0;
}

.p-dark .result-card {
    background-color: var(--p-surface-900);
    color: var(--p-surface-0);
    border-color: var(--p-surface-700);
}

.result-output {
    white-space: pre-wrap;
    font-family: monospace;
    font-size: 0.9rem;
    line-height: 1.5;
    color: var(--p-surface-950);
}

.p-dark .result-output {
    color: var(--p-surface-0);
}

.empty {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    height: 100%;
    padding: 3rem;
    font-size: 1.2rem;
    color: var(--p-surface-600);
}

.p-dark .empty {
    color: var(--p-surface-400);
}

/* 统一的表单卡片样式 */
.form-card {
    background-color: var(--p-surface-0);
    color: var(--p-surface-950);
    border: 1px solid var(--p-surface-200);
    border-radius: 0.5rem;
    padding: 1rem;
    margin: 0;
    box-shadow: 0 1px 3px 0 rgba(0, 0, 0, 0.1), 0 1px 2px 0 rgba(0, 0, 0, 0.06);
}

.p-dark .form-card {
    background-color: var(--p-surface-900);
    color: var(--p-surface-0);
    border-color: var(--p-surface-700);
}

/* 统一的页面容器样式 */
.page-container {
    padding: 1rem;
    display: flex;
    flex-direction: column;
    height: 100%;
    gap: 0.75rem;
    margin: 0;
}

.chart-header {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.chart-title {
    font-size: 1rem;
    font-weight: 500;
    color: var(--p-surface-900);
}

.p-dark .chart-title {
    color: var(--p-surface-0);
}

.chart-content {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    padding: 0.5rem 0;
}
.activity-list {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    padding: 0.5rem 0;
}

.activity-item {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.75rem;
    border: 1px solid var(--p-surface-200);
    border-radius: 0.5rem;
    background-color: var(--p-surface-50);
}

.p-dark .activity-item {
    background-color: var(--p-surface-800);
    border-color: var(--p-surface-700);
}

.activity-icon {
    font-size: 1.125rem !important;
}

.activity-icon.green {
    color: #22c55e;
}

.activity-icon.blue {
    color: #3b82f6;
}

.activity-icon.yellow {
    color: #eab308;
}

.activity-icon.pink {
    color: #ec4899;
}

.activity-content {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
}

.activity-text {
    font-size: 0.875rem;
    font-weight: 500;
}

.activity-time {
    font-size: 0.75rem;
    color: var(--p-surface-600);
}

.p-dark .activity-time {
    color: var(--p-surface-400);
}

.products-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 1rem;
}

@media (max-width: 640px) {
    .products-header {
        flex-direction: column;
        gap: 0.5rem;
    }

    .products-header .search-field {
        width: 100%;
    }
}

.products-title {
    font-size: 1rem;
    font-weight: 500;
    color: var(--p-surface-900);
}

.p-dark .products-title {
    color: var(--p-surface-0);
}

.products-table-container {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    background-color: var(--p-surface-0);
}

.p-dark .products-table-container {
    background-color: var(--p-surface-900);
}

.products-table {
    width: 100%;
    color: var(--p-surface-900);
}

.p-dark .products-table {
    color: var(--p-surface-0);
}

.products-table-mask {
    backdrop-filter: blur(4px) !important;
    background-color: color-mix(in srgb, var(--p-surface-0), transparent 80%) !important;
}

.p-dark .products-table-mask {
    background-color: color-mix(in srgb, var(--p-surface-900), transparent 80%) !important;
}

.products-table-loading {
    color: var(--p-primary-500) !important;
}

.products-search {
    font-size: 0.875rem;
    padding: 0.5rem;
    background-color: var(--p-surface-0);
    color: var(--p-surface-900);
    border: 1px solid var(--p-surface-200);
}

.p-dark .products-search {
    background-color: var(--p-surface-900);
    color: var(--p-surface-0);
    border-color: var(--p-surface-700);
}

@media (min-width: 768px) {
    .products-search {
        width: auto !important;
    }
}

@media (max-width: 767px) {
    .products-search {
        width: 100% !important;
    }
}

@media (max-width: 991px) {
    .stats {
        grid-template-columns: 1fr 1fr;
    }
    .layout-grid-row {
        flex-direction: column;
    }
    .col-item-2 {
        width: 100%;
    }
}

@media (max-width: 480px) {
    .stats {
        grid-template-columns: 1fr;
    }
}

.topbar {
    background-color: var(--p-surface-0);
    padding: 0.15rem;
    /* border-radius: 1rem; */
    max-width: none;
    margin-left: auto;
    margin-right: auto;
    border: 1px solid var(--p-surface-200);
    width: 100%;
}

.p-dark .topbar {
    background-color: var(--p-surface-900);
    border-color: var(--p-surface-700);
}

.topbar-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.topbar-brand {
    display: flex;
    gap: 0.75rem;
    align-items: center;
}

.topbar-brand-text {
    display: none;
}

@media (min-width: 640px) {
    .topbar-brand-text {
        display: flex;
        flex-direction: column;
    }
}

.topbar-title {
    font-size: 1.25rem;
    font-weight: 300;
    color: var(--p-surface-700);
    line-height: 1;
}

.p-dark .topbar-title {
    color: var(--p-surface-100);
}

.topbar-subtitle {
    font-size: 0.875rem;
    font-weight: 500;
    color: var(--p-primary-500);
    line-height: 1.25;
}

.topbar-actions {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.topbar-theme-button {
    width: 2.5rem;
    height: 2.5rem;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 9999px;
    transition: all 0.2s;
    color: var(--p-surface-900);
}

.p-dark .topbar-theme-button {
    color: var(--p-primary-500);
}

.topbar-theme-button:hover {
    background-color: var(--p-surface-100);
}

.p-dark .topbar-theme-button:hover {
    background-color: var(--p-surface-800);
}

.topbar-theme-button.topbar-close-button:hover {
    background-color: #eb050d18 !important;
}

.fill-primary {
    fill: var(--p-primary-500);
}

.p-dark .fill-primary {
    fill: var(--p-primary-400);
}

.fill-surface {
    fill: var(--p-surface-900);
}

.p-dark .fill-surface {
    fill: var(--p-surface-0);
}

.config-panel {
    position: absolute;
    top: 4rem;
    right: 0;
    width: 16rem;
    padding: 1rem;
    background-color: var(--p-surface-0);
    border-radius: 0.375rem;
    box-shadow: 0 10px 15px -3px rgb(0 0 0 / 0.1), 0 4px 6px -4px rgb(0 0 0 / 0.1);
    border: 1px solid var(--p-surface-200);
    transform-origin: top;
    z-index: 50;
}

.p-dark .config-panel {
    background-color: var(--p-surface-900);
    border-color: var(--p-surface-700);
}

.config-section {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.config-label {
    font-size: 0.875rem;
    color: var(--p-surface-600);
    font-weight: 600;
}

.p-dark .config-label {
    color: var(--p-surface-400);
}

.config-colors {
    padding-top: 0.5rem;
    display: flex;
    gap: 0.5rem;
    flex-wrap: wrap;
    justify-content: space-between;
}

.color-button {
    border: none;
    width: 1.25rem;
    height: 1.25rem;
    border-radius: 9999px;
    padding: 0;
    cursor: pointer;
}

.selected {
    --ring-offset-shadow: 0 0 0 var(--ring-offset-width) var(--ring-offset-color);
    --ring-shadow: 0 0 0 calc(var(--ring-width) + var(--ring-offset-width)) var(--ring-color);
    --ring-width: 2px;
    --ring-offset-width: 2px;
    --ring-color: var(--p-primary-500);
    --ring-offset-color: #ffffff;
    box-shadow: var(--ring-offset-shadow), var(--ring-shadow);
}

.hidden {
    display: none;
}

.footer {
    background-color: var(--p-surface-0);
    padding: 1.5rem;
    border-radius: 1rem;
    max-width: none;
    margin-left: auto;
    margin-right: auto;
    border: 1px solid var(--p-surface-200);
    width: 100%;
}

.p-dark .footer {
    background-color: var(--p-surface-900);
    border-color: var(--p-surface-700);
}

.footer-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 0.5rem;
}

@media (max-width: 640px) {
    .footer-container {
        flex-direction: column;
    }
}

.p-select {
    width: 100%;
}

.footer-copyright {
    font-size: 0.875rem;
    color: var(--p-surface-600);
}

.p-dark .footer-copyright {
    color: var(--p-surface-400);
}

.footer-links {
    display: flex;
    gap: 1rem;
}

.footer-link {
    color: var(--p-surface-600);
    font-size: 0.875rem;
    transition: color 0.2s;
}

.p-dark .footer-link {
    color: var(--p-surface-400);
}

.footer-link:hover {
    color: var(--p-primary-500);
}

.footer-icon {
    font-size: 1.25rem;
}

.relative {
    position: relative;
}

.animate-fadeout {
    animation: fadeout 0.15s linear;
}

.animate-scalein {
    animation: scalein 0.15s linear;
}

/* PrimeVue组件焦点状态样式适配 */

/* InputText组件样式 */
.p-inputtext {
    border-color: var(--p-surface-300);
    transition: border-color 0.3s, box-shadow 0.3s;
}

.p-inputtext:enabled:focus {
    border-color: var(--p-primary-500) !important;
    box-shadow: 0 0 0 2px color-mix(in srgb, var(--p-primary-500), transparent 80%);
}

.p-dark .p-inputtext {
    border-color: var(--p-surface-600);
}

.p-dark .p-inputtext:enabled:focus {
    border-color: var(--p-primary-400) !important;
    box-shadow: 0 0 0 2px color-mix(in srgb, var(--p-primary-400), transparent 70%);
}

/* Select/Dropdown组件样式 */
.p-dropdown {
    border-color: var(--p-surface-300);
    transition: border-color 0.3s, box-shadow 0.3s;
}

.p-dropdown:focus {
    outline: none;
    border-color: var(--p-primary-500);
    box-shadow: 0 0 0 2px color-mix(in srgb, var(--p-primary-500), transparent 80%);
}

.p-dark .p-dropdown {
    border-color: var(--p-surface-600);
}

.p-dark .p-dropdown:focus {
    border-color: var(--p-primary-400);
    box-shadow: 0 0 0 2px color-mix(in srgb, var(--p-primary-400), transparent 70%);
}

/* Button组件样式 */
.p-button {
    transition: box-shadow 0.3s;
}

.p-button:focus {
    outline: none;
    box-shadow: 0 0 0 2px color-mix(in srgb, var(--p-primary-500), transparent 80%);
}

.p-dark .p-button:focus {
    box-shadow: 0 0 0 2px color-mix(in srgb, var(--p-primary-400), transparent 70%);
}

/* DataTable组件样式 */
.p-datatable {
    transition: background-color 0.3s;
}

.p-datatable .p-datatable-tbody > tr:focus {
    outline: none;
    background-color: color-mix(in srgb, var(--p-primary-500), transparent 90%);
}

.p-dark .p-datatable .p-datatable-tbody > tr:focus {
    background-color: color-mix(in srgb, var(--p-primary-400), transparent 85%);
}

.p-datatable-tbody > tr > td {
    /* text-overflow: ellipsis !important; */
    max-width: 20vw;
    overflow: scroll !important;
    /* white-space: nowrap !important; */
    word-wrap: break-word !important;
}


/* Tabs组件样式 */
.p-tabs .p-tabs-nav li .p-tabs-nav-link {
    transition: box-shadow 0.3s;
}

.p-tabs .p-tabs-nav li .p-tabs-nav-link:focus {
    outline: none;
    box-shadow: inset 0 -2px 0 var(--p-primary-500);
}

.p-dark .p-tabs .p-tabs-nav li .p-tabs-nav-link:focus {
    box-shadow: inset 0 -2px 0 var(--p-primary-400);
}

.p-tabpanels {
    padding: 0 !important;
}

/* Menu组件样式 */
.p-menuitem-link {
    transition: background-color 0.3s;
}

.p-menuitem-link:focus {
    outline: none;
    background-color: color-mix(in srgb, var(--p-primary-500), transparent 90%);
}

.p-dark .p-menuitem-link:focus {
    background-color: color-mix(in srgb, var(--p-primary-400), transparent 85%);
}

/* InputSwitch组件样式 */
.p-inputswitch {
    transition: box-shadow 0.3s;
}

.p-inputswitch:focus {
    outline: none;
    box-shadow: 0 0 0 2px color-mix(in srgb, var(--p-primary-500), transparent 80%);
}

.p-dark .p-inputswitch:focus {
    box-shadow: 0 0 0 2px color-mix(in srgb, var(--p-primary-400), transparent 70%);
}

/* Calendar组件样式 */
.p-datepicker {
    border-color: var(--p-surface-300);
    transition: border-color 0.3s, box-shadow 0.3s;
}

.p-datepicker:focus {
    outline: none;
    border-color: var(--p-primary-500);
    box-shadow: 0 0 0 2px color-mix(in srgb, var(--p-primary-500), transparent 80%);
}

.p-dark .p-datepicker {
    border-color: var(--p-surface-600);
}

.p-dark .p-datepicker:focus {
    border-color: var(--p-primary-400);
    box-shadow: 0 0 0 2px color-mix(in srgb, var(--p-primary-400), transparent 70%);
}

/* InputNumber组件样式 */
.p-inputnumber {
    border-color: var(--p-surface-300);
    transition: border-color 0.3s, box-shadow 0.3s;
}

.p-inputnumber:focus {
    outline: none;
    border-color: var(--p-primary-500);
    box-shadow: 0 0 0 2px color-mix(in srgb, var(--p-primary-500), transparent 80%);
}

.p-dark .p-inputnumber {
    border-color: var(--p-surface-600);
}

.p-dark .p-inputnumber:focus {
    border-color: var(--p-primary-400);
    box-shadow: 0 0 0 2px color-mix(in srgb, var(--p-primary-400), transparent 70%);
}

.p-select:not(.p-disabled).p-focus {
    border-color: var(--p-primary-600) !important;
}

/* Card组件样式 */
.p-card {
    background-color: var(--p-surface-0);
    color: var(--p-surface-950);
    border: 1px solid var(--p-primary-500) !important;
    transition: border-color 0.3s, box-shadow 0.3s;
}


.p-dark .p-card {
    background-color: var(--p-surface-900);
    color: var(--p-surface-0);
    border-color: var(--p-primary-700) !important;
}


/* FloatLabel组件样式 */
.p-floatlabel-on {
    color: var(--p-surface-600);
}

.p-floatlabel-on:has(input:focus) label {
    color: var(--p-primary-500);
    background-color: rgba(red, green, blue, 1);
}

/* .p-floatlabel-on:has(input[placeholder]) label {
    background-color: transparent !important;
} */

.p-dark .p-floatlabel-on {
    color: var(--p-surface-400);
}

.p-dark .p-floatlabel-on:has(input:focus) label {
    color: var(--p-primary-400);
    background-color: rgba(red, green, blue, 1);
}

.p-floatlabel {
    color: var(--p-surface-600);
}

.p-floatlabel:has(input:focus) label, .p-floatlabel:has(input.p-filled) label {
    color: var(--p-primary-500) !important;
    background-color: rgba(red, green, blue, 1);
}

.p-dark .p-floatlabel {
    color: var(--p-surface-400);
}

.p-dark .p-floatlabel:has(input:focus) label, .p-floatlabel:has(input.p-filled) label {
    color: var(--p-primary-400) !important;
    background-color: rgba(red, green, blue, 1);
}

/* Column组件样式(DataTable内部) */
.p-column {
    transition: background-color 0.3s;
}

.p-column:focus {
    outline: none;
    background-color: color-mix(in srgb, var(--p-primary-500), transparent 90%);
}

.p-dark .p-column:focus {
    background-color: color-mix(in srgb, var(--p-primary-400), transparent 85%);
}

/* TabPanel组件样式 */
.p-tabpanel {
    background-color: var(--p-surface-0);
    color: var(--p-surface-950);
    transition: background-color 0.3s;
}

.p-dark .p-tabpanel {
    background-color: var(--p-surface-900);
    color: var(--p-surface-0);
}


/* Toast组件样式 */
.p-toast {
    background-color: var(--p-surface-0);
    color: var(--p-surface-950);
    /* border: 1px solid var(--p-surface-200); */
}

.p-dark .p-toast {
    background-color: var(--p-surface-900);
    color: var(--p-surface-0);
    border-color: var(--p-surface-700);
}

.p-toast-message {
    background-color: var(--p-surface-0);
    color: var(--p-surface-950);
    border: 1px solid var(--p-surface-200);
}

.p-dark .p-toast-message {
    background-color: var(--p-surface-900);
    color: var(--p-surface-0);
    border-color: var(--p-surface-700);
}

.p-toast-message-success {
    background-color: color-mix(in srgb, var(--p-green-500), transparent 90%);
    border-color: var(--p-green-500);
    color: var(--p-green-700);
}

.p-dark .p-toast-message-success {
    background-color: color-mix(in srgb, var(--p-green-400), transparent 85%);
    border-color: var(--p-green-400);
    color: var(--p-green-300);
}

.p-toast-message-error {
    background-color: color-mix(in srgb, var(--p-red-500), transparent 90%);
    border-color: var(--p-red-500);
    color: var(--p-red-700);
}

.p-dark .p-toast-message-error {
    background-color: color-mix(in srgb, var(--p-red-400), transparent 85%);
    border-color: var(--p-red-400);
    color: var(--p-red-300);
}

.p-toast-message-warn {
    background-color: color-mix(in srgb, var(--p-orange-500), transparent 90%);
    border-color: var(--p-orange-500);
    color: var(--p-orange-700);
}

.p-dark .p-toast-message-warn {
    background-color: color-mix(in srgb, var(--p-orange-400), transparent 85%);
    border-color: var(--p-orange-400);
    color: var(--p-orange-300);
}

.p-toast-message-info {
    background-color: color-mix(in srgb, var(--p-blue-500), transparent 90%);
    border-color: var(--p-blue-500);
    color: var(--p-blue-700);
}

.p-dark .p-toast-message-info {
    background-color: color-mix(in srgb, var(--p-blue-400), transparent 85%);
    border-color: var(--p-blue-400);
    color: var(--p-blue-300);
}

/* 公共表单布局样式 */
.form-layout {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

/* 输入行布局 - 一行两个输入框 */
.input-row {
    display: flex;
    gap: 0.75rem;
    width: 100%;
}

/* 按钮行布局 - 等分宽度 */
.button-row {
    display: flex;
    gap: 0.75rem;
    width: 100%;
    margin-top: 0.5rem;
}

.field {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
}

/* 全宽字段 - 用于下拉选择框 */
.field.full-width,
.field > .full-width {
    width: 100%;
}

/* 半宽字段 - 用于文本输入框 */
.field.half-width {
    flex: 1;
}

.field label {
    margin-bottom: 0.25rem;
    font-weight: 500;
    color: var(--text-color);
}

/* 等宽按钮 */
.button.equal-width {
    flex: 1;
    border-radius: 4px;
}

.p-progressbar.equal-width {
    flex: 1;
    border-radius: 4px;
}

/* 结果输出样式 */
.result-output {
    white-space: pre-wrap;
    font-family: monospace;
    font-size: 0.9rem;
    line-height: 1.5;
    color: var(--p-surface-950);
}

.p-dark .result-output {
    color: var(--p-surface-0);
}

.result-container {
    flex: 1;
    overflow: auto;
    border: 1px solid var(--p-surface-200);
    border-radius: 4px;
    padding: 1rem;
    background-color: var(--p-surface-50);
}

.p-dark .result-container {
    border-color: var(--p-surface-700);
    background-color: var(--p-surface-800);
}

/* 空状态样式 */
.empty {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    height: 100%;
    padding: 3rem;
    font-size: 1.2rem;
    color: var(--p-surface-600);
}

.p-dark .empty {
    color: var(--p-surface-400);
}

/* 公共PrimeVue组件样式调整 */
.p-dropdown {
    width: 100%;
}

.p-inputtext {
    width: 100%;
}

.p-button {
    margin: 0.25rem;
}

.p-datatable {
    font-size: 0.875rem;
}

.p-tabs {
    margin-top: -1.5rem;
    flex: 1;
    display: flex;
    flex-direction: column;
}

.p-tabs .p-tabview-panels {
    flex: 1;
    display: flex;
    flex-direction: column;
}

.p-tabs .p-tabview-panel {
    flex: 1;
    display: flex;
    flex-direction: column;
}

/* 响应式调整 */
@media (max-width: 768px) {
    .form-card {
        padding: 0.5rem;
    }
    
    .input-row {
        flex-direction: column;
    }
    
    .button-row {
        flex-direction: column;
    }
    
    .p-datatable {
        font-size: 0.75rem;
    }
}

/* Tooltip组件样式 */
.p-tooltip {
    color: var(--p-surface-0);
    max-width: 30vw !important;
}

.p-dark .p-tooltip {
    color: var(--p-surface-950);
}

/* 通用焦点状态样式 */
*:focus-visible {
    outline: 2px solid var(--p-primary-500);
    outline-offset: 2px;
}

.p-dark *:focus-visible {
    outline: 2px solid var(--p-primary-400);
}

@keyframes fadeout {
    0% {
        opacity: 1;
    }
    100% {
        opacity: 0;
    }
}

@keyframes scalein {
    0% {
        opacity: 0;
        transform: scaleY(0.8);
        transition: transform 0.12s cubic-bezier(0, 0, 0.2, 1), opacity 0.12s cubic-bezier(0, 0, 0.2, 1);
    }
    100% {
        opacity: 1;
        transform: scaleY(1);
    }
}


.p-progressbar-label {
    color: var(--p-surface-700) !important;
}

.p-dark .p-progressbar-label {
    color: var(--p-surface-300) !important;
}

/* 视图控制区域样式 */
.view-controls {
    display: flex;
    justify-content: space-between;
    align-items: center;
    background-color: var(--surface-card);
    border-top: 1px solid var(--surface-border);
    border-bottom: 1px solid var(--surface-border);
}

/* 视图切换按钮组样式 */
.view-switch-buttons {
    display: flex;
    gap: 0.5rem;
}

/* 折叠按钮样式 */
.collapse-button {
    display: flex;
    justify-content: center;
    align-items: center;
    width: 30px;
    height: 30px;
    cursor: pointer;
    border-radius: 4px;
    transition: all 0.2s ease;
}

.collapse-button:hover {
    background-color: var(--surface-hover);
}

.collapse-button i {
    font-size: 0.8rem;
    color: var(--text-color-secondary);
}

/* 卡片收起状态样式 */
.form-card.collapsed {
    height: 0;
    opacity: 0;
    margin: 0;
    padding: 0;
    border: none;
}

.card-content.collapsed-content {
    max-height: 0;
    opacity: 0;
    overflow: hidden;
    margin: 0;
    padding: 0;
}

/* 按钮行样式 */
.button-item {
    flex: 1;
    min-width: 120px;
}

/* 固定表头宽度样式 */
.fixed-header-table .p-datatable-thead > tr > th {
    position: sticky !important;
    top: 0 !important;
    z-index: 10 !important;
    background-color: var(--surface-card) !important;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1) !important;
    min-width: inherit !important;
    max-width: inherit !important;
    width: inherit !important;
}

.fixed-header-table .p-datatable-tbody > tr > td {
    min-width: inherit !important;
    max-width: inherit !important;
    width: inherit !important;
}

/* 确保表格在滚动时列宽保持一致 */
.fixed-header-table .p-datatable-scrollable-header {
    overflow: hidden !important;
}

.fixed-header-table .p-datatable-scrollable-body {
    overflow: auto !important;
}

/* 防止内容溢出 */
.fixed-header-table .p-datatable-scrollable-body td {
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

================================================
FILE: frontend/src/components/AppConfig.vue
================================================
<script setup>
import { useLayout } from "../composables/useLayout";

const { primaryColors, surfaces, primary, surface, isDarkMode, updateColors } = useLayout();
</script>

<template>
    <div class="config-panel hidden">
        <div class="config-section">
            <div>
                <span class="config-label">主题</span>
                <div class="config-colors">
                    <button
                        v-for="pc of primaryColors"
                        :key="pc.name"
                        type="button"
                        :title="pc.name"
                        :class="['color-button', { selected: primary === pc.name }]"
                        :style="{ backgroundColor: pc.palette['500'] }"
                        @click="updateColors('primary', pc.name)"
                    />
                </div>
            </div>
            <div>
                <span class="config-label">底色</span>
                <div class="config-colors">
                    <button
                        v-for="s of surfaces"
                        :key="s.name"
                        type="button"
                        :title="s.name"
                        :class="[
                            'color-button',
                            {
                                selected: surface
                                    ? surface === s.name
                                    : isDarkMode
                                    ? s.name === 'zinc'
                                    : s.name === 'slate',
                            },
                        ]"
                        :style="{ backgroundColor: s.palette['500'] }"
                        @click="updateColors('surface', s.name)"
                    />
                </div>
            </div>
        </div>
    </div>
</template>


================================================
FILE: frontend/src/components/AppFooter.vue
================================================
<template>
    <div class="footer">
        <div class="footer-container">
            footer
        </div>
    </div>
</template>


================================================
FILE: frontend/src/components/AppSidebar.vue
================================================
<template>
    <div class="sidebar" :class="{ 'sidebar-collapsed': isCollapsed }" style="--wails-draggable: drag;">
        <Menu :model="menuItems" class="sidebar-menu">
            <template #start>
                <div class="sidebar-header">
                    <Button @click="toggleSidebar" class="toggle-button"
                        :icon="isCollapsed ? 'pi pi-bars' : 'pi pi-bars'" text />
                </div>
            </template>

            <template #item="{ item, props }">
                <a v-ripple class="menu-link" v-bind="props.action" @click="navigateTo(item.route)"
                    :class="{ 'active': $route.name === item.name }">
                    <span :class="item.icon" />
                    <span v-if="!isCollapsed">{{ item.label }}</span>
                </a>
            </template>

            <template #end>
                <div class="sidebar-footer" style="--wails-draggable: no-drag;">
                    <Button v-if="!isCollapsed" @click="drawerVisible = true" text> {{ version }} </Button>
                    <Button v-else @click="drawerVisible = true" icon="pi pi-info-circle" text />
                </div>
            </template>
        </Menu>
    </div>
    <Drawer v-model:visible="drawerVisible" header="小Tips" position="right" class="sidebar-tips">
        <Message size="small">
            1.小红书,密码为xhsdev或mmkv文件com.xingin.xhs_preferences中msg_db_password_updated的值,选择sqlcipher3直接解密
        </Message>
        <Message size="small">2.微信的imei,现在可以通过files/KeyInfo.bin获取了,需要解密文件,算法为RC4,密钥为_wEcHAT_</Message>
        <Message size="small">3.MosGram(泡泡),密码为cust_id的md5值,在sp目录的account_config.xml文件中,使用SQLCipher4参数解</Message>
        <Message size="small">4.悟空IM系列的聊天数据库,数据库名为wk_用户ID.db,解密密码即为用户ID,使用SQLCipher4参数解密</Message>
        <Message size="small">5.抖音的aweme_database_数据库,密码为aweme_database_passphrase,使用wcdb参数解密</Message>
    </Drawer>
</template>

<script setup>
import { ref, onMounted, onUnmounted, nextTick } from 'vue';
import { useRouter, useRoute } from 'vue-router';
import { useLayout } from '../composables/useLayout';
import { GetVersion } from "../../wailsjs/go/main/App"

const { isDarkMode, toggleDarkMode } = useLayout();
const router = useRouter();
const route = useRoute();
const isCollapsed = ref(false);
const windowWidth = ref(window.innerWidth);
const version = ref('');
const drawerVisible = ref(false);

// 菜单项数据 - 移除了分组,所有菜单项放在同一层级
const menuItems = ref([
    {
        label: '密钥计算',
        icon: 'pi pi-key',
        command: () => navigateTo('/KeyCalculation'),
        name: 'KeyCalculation'
    },
    {
        label: '数据库解密',
        icon: 'pi pi-lock-open',
        command: () => navigateTo('/DatabaseDecrypt'),
        name: 'DatabaseDecrypt'
    },
    {
        label: '数据提取',
        icon: 'pi pi-database',
        command: () => navigateTo('/DataExtraction'),
        name: 'DataExtraction'
    },
    {
        label: '暴力破解',
        icon: 'pi pi-lock',
        command: () => navigateTo('/BruteForce'),
        name: 'BruteForce'
    },
    {
        label: '注册表分析',
        icon: 'pi pi-microsoft',
        command: () => navigateTo('/RegistryAnalysis'),
        name: 'RegistryAnalysis'
    },
    {
        label: '时间戳转换',
        icon: 'pi pi-clock',
        command: () => navigateTo('/TimestampParser'),
        name: 'TimestampParser'
    },
    {
        label: '文件读取',
        icon: 'pi pi-file-arrow-up',
        command: () => navigateTo('/FileReader'),
        name: 'FileReader'
    },
    {
        label: 'IP归属地查询',
        icon: 'pi pi-globe',
        command: () => navigateTo('/IPLocation'),
        name: 'IPLocation'
    },
    {
        label: '关于',
        icon: 'pi pi-info-circle',
        command: () => navigateTo('/About'),
        name: 'About'
    }
]);

// 切换侧边栏状态
const toggleSidebar = () => {
    isCollapsed.value = !isCollapsed.value;
};

// 导航到指定路由
const navigateTo = (routePath) => {
    if (routePath) {
        router.push(routePath);
    }
};

// 更新窗口宽度
const updateWindowWidth = () => {
    windowWidth.value = window.innerWidth;
    // 根据窗口宽度自动调整侧边栏状态
    if (windowWidth.value < 768) {
        isCollapsed.value = true;
    }
    // 展开状态使用CSS中的相对尺寸(15vw)
};

// 监听窗口大小变化
onMounted(() => {
    updateWindowWidth();
    window.addEventListener('resize', updateWindowWidth);
    nextTick(() => {
        if (GetVersion == undefined) {
            version.value = '1.0.0'
        } else {
            GetVersion().then(res => {
                version.value = res
            })
        }
    })
});

onUnmounted(() => {
    window.removeEventListener('resize', updateWindowWidth);
});
</script>

<style scoped>
.sidebar {
    width: 15vw;
    min-width: 60px;
    max-width: 300px;
    background-color: var(--p-surface-100);
    border-right: 1px solid var(--p-surface-200);
    display: flex;
    flex-direction: column;
    transition: width 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    height: 100vh;
    position: relative;
    will-change: width;
}

.p-dark .sidebar {
    background-color: var(--p-surface-900);
    border-right-color: var(--p-surface-700);
}

.sidebar-collapsed {
    width: 5vw;
}

.sidebar-header {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 1rem;
    border-bottom: 1px solid var(--p-surface-200);
    height: 8vh;
    min-height: 50px;
    max-height: 70px;
}

.p-dark .sidebar-header {
    border-bottom-color: var(--p-surface-700);
}

.toggle-button {
    color: var(--p-surface-600);
}

.p-dark .toggle-button {
    color: var(--p-surface-400);
}

.sidebar-menu {
    width: 100%;
    height: 100%;
    border: none;
    background: transparent;
}

.sidebar-footer {
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    border-top: 1px solid var(--p-surface-200);
}

.p-dark .sidebar-footer {
    border-top-color: var(--p-surface-700);
}

.version-text {
    font-size: 0.75rem;
    color: var(--p-primary-600);
}

.p-dark .version-text {
    color: var(--p-primary-400);
}

.menu-link {
    display: flex;
    align-items: center;
    padding: 0.75rem 1rem;
    color: var(--p-surface-700);
    text-decoration: none;
    transition: background-color 0.2s, color 0.2s;
    border-radius: 0;
    cursor: pointer;
    width: 100%;
    box-sizing: border-box;
    font-size: 0.8rem;
}

.p-dark .menu-link {
    color: var(--p-surface-300);
}

.menu-link:hover {
    background-color: var(--p-surface-200);
    color: var(--p-surface-900);
}

.p-dark .menu-link:hover {
    background-color: var(--p-surface-800);
    color: var(--p-surface-0);
}

.menu-link.active {
    background-color: var(--p-primary-100);
    color: var(--p-primary-700);
    border-right: 3px solid var(--p-primary-500);
}

.p-dark .menu-link.active {
    background-color: color-mix(in srgb, var(--p-primary-400), transparent 80%);
    color: var(--p-primary-300);
}

.p-message {
    margin-top: .5rem;
}

/* 收起状态下的样式调整 */
.sidebar-collapsed .sidebar-header {
    padding: 1rem 0;
}

.sidebar-collapsed .menu-link {
    justify-content: center;
    padding: 0.75rem 0;
}

/* 确保收起状态下菜单项宽度不超过侧边栏宽度 */
.sidebar-collapsed :deep(.p-menu) {
    width: 100%;
    min-width: 100%;
    max-width: 100%;
}

.sidebar-collapsed :deep(.p-menuitem-link) {
    padding: 0;
    display: flex;
    justify-content: center;
    align-items: center;
    width: 100%;
    min-width: 100%;
    max-width: 100%;
    box-sizing: border-box;
}

.sidebar-collapsed :deep(.p-menuitem-content) {
    padding: 0;
    display: flex;
    justify-content: center;
    align-items: center;
    width: 100%;
    min-width: 100%;
    max-width: 100%;
    box-sizing: border-box;
}

.sidebar-collapsed :deep(.p-menuitem) {
    display: flex;
    justify-content: center;
    align-items: center;
    width: 100%;
    min-width: 100%;
    max-width: 100%;
    box-sizing: border-box;
}

.sidebar-collapsed :deep(.p-menuitem-icon) {
    margin: 0;
}

.sidebar-collapsed :deep(.p-menuitem-text) {
    display: none;
}

/* 调整PrimeVue Menu组件的样式 */
:deep(.p-menu) {
    border: none;
    background: transparent;
    width: 100% !important;
    min-width: 100% !important;
    max-width: 100% !important;
    height: 100%;
    display: flex;
    flex-direction: column;
    box-sizing: border-box;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

:deep(.p-menu-list) {
    flex: 1;
    overflow-y: auto;
    width: 100% !important;
    min-width: 100% !important;
    max-width: 100% !important;
    box-sizing: border-box;
}

:deep(.p-menuitem) {
    margin: 0;
    width: 100% !important;
    min-width: 100% !important;
    max-width: 100% !important;
    box-sizing: border-box;
}

:deep(.p-menuitem-content) {
    padding: 0;
    width: 100% !important;
    min-width: 100% !important;
    max-width: 100% !important;
    box-sizing: border-box;
}

:deep(.p-submenu-header) {
    padding: 0;
    width: 100% !important;
    min-width: 100% !important;
    max-width: 100% !import
Download .txt
gitextract_dz6g7xju/

├── .gitignore
├── LICENSE
├── README.md
├── analyzers/
│   ├── database/
│   │   └── decryptDatabaseAnalyzer.go
│   ├── extractor/
│   │   ├── infoExtractAnalyzer.go
│   │   └── tool/
│   │       ├── dbeaverTool.go
│   │       ├── finalshellTool.go
│   │       ├── hawkTool.go
│   │       ├── javaRandom.go
│   │       ├── metamaskTool.go
│   │       ├── mobaTool.go
│   │       ├── navicatTool.go
│   │       └── xshellTool.go
│   ├── passwdCalc/
│   │   └── passwdCalcAnalyzer.go
│   ├── reader/
│   │   ├── fileReader.go
│   │   └── readers/
│   │       ├── leveldbReader.go
│   │       └── mmkvReader.go
│   └── winreg/
│       ├── structs/
│       │   ├── domainAccountF.go
│       │   ├── domainAccountV.go
│       │   ├── nthash.go
│       │   ├── userF.go
│       │   └── userV.go
│       └── winRegAnalyzer.go
├── app.go
├── build/
│   ├── README.md
│   ├── darwin/
│   │   ├── Info.dev.plist
│   │   └── Info.plist
│   └── windows/
│       ├── info.json
│       ├── installer/
│       │   ├── project.nsi
│       │   └── wails_tools.nsh
│       └── wails.exe.manifest
├── frontend/
│   ├── .gitignore
│   ├── README.md
│   ├── components.d.ts
│   ├── env.d.ts
│   ├── index.html
│   ├── package.json
│   ├── package.json.md5
│   ├── pnpm-workspace.yaml
│   ├── src/
│   │   ├── App.vue
│   │   ├── assets/
│   │   │   └── styles/
│   │   │       └── main.css
│   │   ├── components/
│   │   │   ├── AppConfig.vue
│   │   │   ├── AppFooter.vue
│   │   │   ├── AppSidebar.vue
│   │   │   ├── AppTopbar.vue
│   │   │   └── Empty.vue
│   │   ├── composables/
│   │   │   ├── useLayout.js
│   │   │   └── useTableHeight.js
│   │   ├── main.ts
│   │   ├── router/
│   │   │   └── index.ts
│   │   ├── store/
│   │   │   ├── index.ts
│   │   │   └── modules/
│   │   │       └── page.ts
│   │   ├── utils.js
│   │   └── views/
│   │       ├── About.vue
│   │       ├── BruteForce.vue
│   │       ├── DataExtraction.vue
│   │       ├── DatabaseDecrypt.vue
│   │       ├── FileReader.vue
│   │       ├── IPLocation.vue
│   │       ├── KeyCalculation.vue
│   │       ├── RegistryAnalysis.vue
│   │       └── TimestampParser.vue
│   ├── tsconfig.json
│   ├── tsconfig.node.json
│   ├── vite.config.ts
│   └── wailsjs/
│       ├── go/
│       │   ├── cracker/
│       │   │   ├── ForensicsCracker.d.ts
│       │   │   └── ForensicsCracker.js
│       │   ├── database/
│       │   │   ├── DecryptDatabase.d.ts
│       │   │   └── DecryptDatabase.js
│       │   ├── extractor/
│       │   │   ├── InfoExtractor.d.ts
│       │   │   └── InfoExtractor.js
│       │   ├── ip/
│       │   │   ├── IP.d.ts
│       │   │   └── IP.js
│       │   ├── main/
│       │   │   ├── App.d.ts
│       │   │   └── App.js
│       │   ├── models.ts
│       │   ├── passwdCalc/
│       │   │   ├── PasswdCalc.d.ts
│       │   │   └── PasswdCalc.js
│       │   ├── reader/
│       │   │   ├── FileReader.d.ts
│       │   │   └── FileReader.js
│       │   ├── timestamp/
│       │   │   ├── TimeStampParser.d.ts
│       │   │   └── TimeStampParser.js
│       │   └── winreg/
│       │       ├── Reg.d.ts
│       │       └── Reg.js
│       └── runtime/
│           ├── package.json
│           ├── runtime.d.ts
│           └── runtime.js
├── go.mod
├── go.sum
├── main.go
├── scripts/
│   ├── build-macos-arm.sh
│   ├── build-macos-intel.sh
│   ├── build-macos.sh
│   ├── build-windows.sh
│   ├── build.sh
│   └── install-wails-cli.sh
├── tools/
│   ├── cracker/
│   │   ├── airdrop.go
│   │   ├── cracker.go
│   │   └── wxuin.go
│   ├── ip/
│   │   └── cz.go
│   └── timestamp/
│       └── time.go
├── utils/
│   ├── hash.go
│   ├── timestamp.go
│   └── utf16.go
└── wails.json
Download .txt
SYMBOL INDEX (387 symbols across 47 files)

FILE: analyzers/database/decryptDatabaseAnalyzer.go
  constant EnMicroMsgDecryptPragma (line 21) | EnMicroMsgDecryptPragma = "_pragma_cipher_compatibility=1"
  constant FTSIndexDecryptPragma (line 22) | FTSIndexDecryptPragma   = "_pragma_kdf_iter=64000&_pragma_cipher_kdf_alg...
  constant SQLCipher4Pragma (line 23) | SQLCipher4Pragma        = ""
  constant SQLCipher3Pragma (line 24) | SQLCipher3Pragma        = "_pragma_cipher_page_size=1024&_pragma_kdf_ite...
  constant WcdbPragma (line 25) | WcdbPragma              = "_pragma_cipher_page_size=4096&_pragma_kdf_ite...
  constant NtqqPragma (line 26) | NtqqPragma              = "_pragma_cipher_page_size=4096&_pragma_kdf_ite...
  constant FTSIndexDB (line 27) | FTSIndexDB              = 0
  constant SQLCipher4DB (line 28) | SQLCipher4DB            = 1
  constant SQLCipher3DB (line 29) | SQLCipher3DB            = 2
  constant WCdbDB (line 30) | WCdbDB                  = 3
  type DecryptDatabase (line 33) | type DecryptDatabase struct
    method InitCtx (line 47) | func (d *DecryptDatabase) InitCtx(ctx context.Context) {
    method DecryptEnMicroMsg (line 77) | func (d *DecryptDatabase) DecryptEnMicroMsg(dbPath, password string) *...
    method decryptNormal (line 116) | func (d *DecryptDatabase) decryptNormal(dbPath, password string, dbTyp...
    method DecryptFTSIndexDB (line 156) | func (d *DecryptDatabase) DecryptFTSIndexDB(dbPath, password string) *...
    method DecryptSQLCipher4DB (line 160) | func (d *DecryptDatabase) DecryptSQLCipher4DB(dbPath, password string)...
    method DecryptSQLCipher3DB (line 164) | func (d *DecryptDatabase) DecryptSQLCipher3DB(dbPath, password string)...
    method DecryptWCDB (line 168) | func (d *DecryptDatabase) DecryptWCDB(dbPath, password string) *Decryp...
    method DecryptNtqqDB (line 172) | func (d *DecryptDatabase) DecryptNtqqDB(dbPath, password string) *Decr...
    method DecryptAMapDB (line 261) | func (d *DecryptDatabase) DecryptAMapDB(dbPath string) *DecryptResult {
    method DecryptDingTalkDB (line 329) | func (d *DecryptDatabase) DecryptDingTalkDB(dbPath, password string) *...
    method DecryptSystemDataSQLite (line 378) | func (d *DecryptDatabase) DecryptSystemDataSQLite(dbPath, password str...
  function NewDecryptDatabase (line 37) | func NewDecryptDatabase() *DecryptDatabase {
  type DecryptResult (line 41) | type DecryptResult struct
  function moveElementToFirst (line 51) | func moveElementToFirst(slice []string, element string) []string {
  function decryptSql (line 71) | func decryptSql(dbPath string) (string, string) {

FILE: analyzers/extractor/infoExtractAnalyzer.go
  type InfoExtractor (line 10) | type InfoExtractor struct
    method InitCtx (line 28) | func (p *InfoExtractor) InitCtx(ctx context.Context) {
    method ExtractXShell (line 32) | func (p *InfoExtractor) ExtractXShell(folder, sid string) *ExtractMapR...
    method ExtractNavicat (line 45) | func (p *InfoExtractor) ExtractNavicat(refPath string) *ExtractMapResu...
    method ExtractMobaXterm (line 57) | func (p *InfoExtractor) ExtractMobaXterm(filePath, masterPwd string) *...
    method ExtractDbeaver (line 70) | func (p *InfoExtractor) ExtractDbeaver(folder string) *ExtractMapResult {
    method ExtractFinalShell (line 82) | func (p *InfoExtractor) ExtractFinalShell(folder string) *ExtractMapRe...
    method ExtractHawk2 (line 94) | func (p *InfoExtractor) ExtractHawk2(filePath, pwd string) *ExtractMap...
    method ExtractMetaMask (line 107) | func (p *InfoExtractor) ExtractMetaMask(filePath string) *ExtractMapRe...
  function NewInfoExtractor (line 14) | func NewInfoExtractor() *InfoExtractor {
  type ExtractResult (line 18) | type ExtractResult struct
  type ExtractMapResult (line 23) | type ExtractMapResult struct

FILE: analyzers/extractor/tool/dbeaverTool.go
  constant dbeaverDecryptKey (line 16) | dbeaverDecryptKey = "babb4a9f774ab853c96c2d653dfe544a"
  constant dbeaverDecryptIV (line 17) | dbeaverDecryptIV  = "00000000000000000000000000000000"
  function decryptDbeaver (line 20) | func decryptDbeaver(encFileData []byte) []byte {
  function AnalyzeDbeaver (line 36) | func AnalyzeDbeaver(folder string) (*orderedmap.OrderedMap, error) {

FILE: analyzers/extractor/tool/finalshellTool.go
  function randomKey (line 19) | func randomKey(head []byte) []byte {
  function calMd5 (line 43) | func calMd5(data []byte) []byte {
  function decryptFinalShell (line 49) | func decryptFinalShell(encData string) string {
  function AnalyzeFinalShell (line 64) | func AnalyzeFinalShell(folder string) (*orderedmap.OrderedMap, error) {

FILE: analyzers/extractor/tool/hawkTool.go
  function decryptHawk (line 15) | func decryptHawk(encData, entity, pwd string) string {
  function AnalyzeHawk2 (line 39) | func AnalyzeHawk2(filePath, pwd string) (*orderedmap.OrderedMap, error) {

FILE: analyzers/extractor/tool/javaRandom.go
  type JavaRandom (line 6) | type JavaRandom struct
    method next (line 14) | func (r *JavaRandom) next(bits int) int32 {
    method NextInt64 (line 19) | func (r *JavaRandom) NextInt64() int64 {
    method NextInt (line 23) | func (r *JavaRandom) NextInt(n int) int {
  function NewJavaRandom (line 10) | func NewJavaRandom(seed int64) *JavaRandom {

FILE: analyzers/extractor/tool/metamaskTool.go
  function AnalyzeMetaMask (line 15) | func AnalyzeMetaMask(filePath string) (*orderedmap.OrderedMap, error) {

FILE: analyzers/extractor/tool/mobaTool.go
  function decryptMoba (line 17) | func decryptMoba(ciphertext, masterPasswd string) string {
  function getEncFromIni (line 25) | func getEncFromIni(file string) ([]string, []string, error) {
  function getPwdOrCredential (line 77) | func getPwdOrCredential(reg *registry.Key, path string) ([]string, error) {
  function getEncFromRegistry (line 106) | func getEncFromRegistry(file string) ([]string, []string, error) {
  function AnalyzeMobaXterm (line 128) | func AnalyzeMobaXterm(file, masterPasswd string) (*orderedmap.OrderedMap...

FILE: analyzers/extractor/tool/navicatTool.go
  constant Navicat11KEY (line 18) | Navicat11KEY = "3DC5CA39"
  constant Navicat12KEY (line 19) | Navicat12KEY = "libcckeylibcckey"
  constant Navicat12IV (line 20) | Navicat12IV  = "libcciv libcciv "
  type Navicat11Cipher (line 24) | type Navicat11Cipher struct
    method xorBytes (line 52) | func (c *Navicat11Cipher) xorBytes(a, b []byte) []byte {
    method Decrypt (line 60) | func (c *Navicat11Cipher) Decrypt(data []byte) []byte {
    method DecryptString (line 89) | func (c *Navicat11Cipher) DecryptString(hexStr string) (string, error) {
  function NewNavicat11Cipher (line 29) | func NewNavicat11Cipher(userKey string) (*Navicat11Cipher, error) {
  type Navicat12Cipher (line 99) | type Navicat12Cipher struct
    method DecryptString (line 111) | func (c *Navicat12Cipher) DecryptString(ciphertext string) string {
  function NewNavicat12Cipher (line 104) | func NewNavicat12Cipher() *Navicat12Cipher {
  function decryptNavicat (line 116) | func decryptNavicat(pwd string) string {
  function isValueExist (line 141) | func isValueExist(arr []string, value string) bool {
  function getNavicatConnections (line 151) | func getNavicatConnections(reg *registry.Registry) (map[string]*registry...
  function getNormalDBInfo (line 190) | func getNormalDBInfo(serverKeys *registry.Key) (map[string]*orderedmap.O...
  function getMSSQLInfo (line 229) | func getMSSQLInfo(serverKeys *registry.Key) (map[string]*orderedmap.Orde...
  function getSQLiteInfo (line 273) | func getSQLiteInfo(serverKeys *registry.Key) (map[string]*orderedmap.Ord...
  function addRecords (line 321) | func addRecords(result *orderedmap.OrderedMap, tType, tName string, conn...
  function AnalyzeNavicat (line 349) | func AnalyzeNavicat(regPath string) (*orderedmap.OrderedMap, error) {

FILE: analyzers/extractor/tool/xshellTool.go
  function decryptXShellStr (line 20) | func decryptXShellStr(sid, encPwd string) (string, error) {
  function reverseString (line 63) | func reverseString(s string) string {
  function decryptXShellStrNew (line 71) | func decryptXShellStrNew(sid string, encPwd string) (string, error) {
  function preDeal (line 128) | func preDeal(file string) (string, error) {
  function delDeal (line 151) | func delDeal(file string) error {
  function AnalyzeXshell (line 156) | func AnalyzeXshell(folder string, sid string) (*orderedmap.OrderedMap, e...

FILE: analyzers/passwdCalc/passwdCalcAnalyzer.go
  type PasswdCalc (line 17) | type PasswdCalc struct
    method InitCtx (line 25) | func (p *PasswdCalc) InitCtx(ctx context.Context) {
    method startup (line 29) | func (p *PasswdCalc) startup(ctx context.Context) {
    method CalWechat (line 52) | func (p *PasswdCalc) CalWechat(uin, imei string) string {
    method CalWechatIndex (line 65) | func (p *PasswdCalc) CalWechatIndex(uin, wxid, imei string) string {
    method CalWildFire (line 86) | func (p *PasswdCalc) CalWildFire(token string) []string {
    method CalMostone (line 113) | func (p *PasswdCalc) CalMostone(uid string) []string {
    method CalTiktok (line 123) | func (p *PasswdCalc) CalTiktok(uid string) []string {
    method CalBatChat (line 138) | func (p *PasswdCalc) CalBatChat(uid string) []string {
  function NewPasswdCalc (line 21) | func NewPasswdCalc() *PasswdCalc {
  function unpad (line 33) | func unpad(ciphertext []byte) ([]byte, error) {
  function decryptAES (line 45) | func decryptAES(token string, key, iv []byte) string {
  function longToBytes (line 132) | func longToBytes(uid int64) []byte {

FILE: analyzers/reader/fileReader.go
  type FileReader (line 10) | type FileReader struct
    method InitCtx (line 23) | func (p *FileReader) InitCtx(ctx context.Context) {
    method ReadLevelDB (line 27) | func (p *FileReader) ReadLevelDB(path string) *ReadMapResult {
    method ReadMMKV (line 35) | func (p *FileReader) ReadMMKV(path, password string) *ReadMapResult {
  function NewFileReader (line 14) | func NewFileReader() *FileReader {
  type ReadMapResult (line 18) | type ReadMapResult struct

FILE: analyzers/reader/readers/leveldbReader.go
  function formatBytes (line 12) | func formatBytes(data []byte) string {
  function LevelDBReader (line 26) | func LevelDBReader(dbPath string) (*orderedmap.OrderedMap, error) {

FILE: analyzers/reader/readers/mmkvReader.go
  function MMKVReader (line 15) | func MMKVReader(path, password string) (*orderedmap.OrderedMap, error) {
  function getDirFiles (line 90) | func getDirFiles(path string) []string {

FILE: analyzers/winreg/structs/domainAccountF.go
  type DomainAccountF (line 12) | type DomainAccountF struct
    method ParseWindowsFileTimestamp (line 76) | func (*DomainAccountF) ParseWindowsFileTimestamp(r binstruct.Reader) (...
    method ParseSamKeyData (line 85) | func (d *DomainAccountF) ParseSamKeyData(r binstruct.Reader) (interfac...
  type SamKeyData (line 36) | type SamKeyData struct
  function getSamKeyData (line 45) | func getSamKeyData(binData []byte) *SamKeyData {
  type SamKeyDataAes (line 56) | type SamKeyDataAes struct
  function getSamKeyDataAes (line 65) | func getSamKeyDataAes(binData []byte) *SamKeyDataAes {
  function GetDomainAccountF (line 106) | func GetDomainAccountF(binData []byte) *DomainAccountF {

FILE: analyzers/winreg/structs/domainAccountV.go
  type DomainAccountV (line 11) | type DomainAccountV struct
  function GetMachineSid (line 19) | func GetMachineSid(binData []byte) string {

FILE: analyzers/winreg/structs/nthash.go
  function uint32To4BytesLittleEndian (line 14) | func uint32To4BytesLittleEndian(i uint32) []byte {
  function expandDESKey (line 26) | func expandDESKey(key []byte) []byte {
  function rid2Key (line 73) | func rid2Key(rid uint32) ([]byte, []byte) {
  function GetHBootKey (line 80) | func GetHBootKey(key0 interface{}, bootKey []byte) []byte {
  constant NTHASH (line 124) | NTHASH    = 0
  constant LMHASH (line 125) | LMHASH    = 1
  constant NTDEFAULT (line 126) | NTDEFAULT = "31d6cfe0d16ae931b73c59d7e0c089c0"
  constant LMDEFAULT (line 127) | LMDEFAULT = "aad3b435b51404eeaad3b435b51404ee"
  function DecryptHash (line 130) | func DecryptHash(hashedBootKey []byte, rid uint32, hash interface{}, has...

FILE: analyzers/winreg/structs/userF.go
  type UserF (line 11) | type UserF struct
    method ParseWindowsFileTimestamp (line 28) | func (*UserF) ParseWindowsFileTimestamp(r binstruct.Reader) (string, e...
  function GetUserF (line 36) | func GetUserF(binData []byte) *UserF {

FILE: analyzers/winreg/structs/userV.go
  type UserV (line 12) | type UserV struct
    method ParseName (line 111) | func (u *UserV) ParseName(r binstruct.Reader) (string, error) {
    method ParseFullName (line 123) | func (u *UserV) ParseFullName(r binstruct.Reader) (string, error) {
    method ParseComment (line 135) | func (u *UserV) ParseComment(r binstruct.Reader) (string, error) {
    method ParseUserComment (line 147) | func (u *UserV) ParseUserComment(r binstruct.Reader) (string, error) {
    method ParseHomeDir (line 159) | func (u *UserV) ParseHomeDir(r binstruct.Reader) (string, error) {
    method ParseHomeDirConnect (line 171) | func (u *UserV) ParseHomeDirConnect(r binstruct.Reader) (string, error) {
    method ParseScriptPath (line 183) | func (u *UserV) ParseScriptPath(r binstruct.Reader) (string, error) {
    method ParseProfilePath (line 195) | func (u *UserV) ParseProfilePath(r binstruct.Reader) (string, error) {
    method ParseWorkstations (line 207) | func (u *UserV) ParseWorkstations(r binstruct.Reader) (string, error) {
    method ParseHoursAllowed (line 219) | func (u *UserV) ParseHoursAllowed(r binstruct.Reader) (string, error) {
    method ParseLMHash (line 231) | func (u *UserV) ParseLMHash(r binstruct.Reader) (interface{}, error) {
    method ParseNTHash (line 268) | func (u *UserV) ParseNTHash(r binstruct.Reader) (interface{}, error) {
  type SAMHash (line 67) | type SAMHash struct
  function getSAMHash (line 73) | func getSAMHash(binData []byte) *SAMHash {
  type SAMHashAes (line 83) | type SAMHashAes struct
    method ParseData (line 91) | func (s *SAMHashAes) ParseData(r binstruct.Reader) ([]byte, error) {
  function getSAMHashAes (line 99) | func getSAMHashAes(binData []byte) *SAMHashAes {
  constant VOffset (line 109) | VOffset = 204
  function GetUserV (line 303) | func GetUserV(binData []byte) *UserV {

FILE: analyzers/winreg/winRegAnalyzer.go
  type WinReg (line 20) | type WinReg struct
    method getBootKey (line 122) | func (w *WinReg) getBootKey() []byte {
    method getControlSet (line 183) | func (w *WinReg) getControlSet() string {
    method getTimeZone (line 194) | func (w *WinReg) getTimeZone() string {
    method getComputerName (line 215) | func (w *WinReg) getComputerName() string {
    method getLastShutdownTime (line 225) | func (w *WinReg) getLastShutdownTime() string {
    method getLastLoginUser (line 236) | func (w *WinReg) getLastLoginUser() string {
    method getOrderMap (line 246) | func (w *WinReg) getOrderMap(key, value string) *orderedmap.OrderedMap {
    method getSystemInfo (line 254) | func (w *WinReg) getSystemInfo() ([]*orderedmap.OrderedMap, error) {
    method getNetInfo (line 290) | func (w *WinReg) getNetInfo() ([]*orderedmap.OrderedMap, error) {
    method getUserInfo (line 345) | func (w *WinReg) getUserInfo() ([]*orderedmap.OrderedMap, error) {
    method getDefaultBrowser (line 423) | func (w *WinReg) getDefaultBrowser() ([]*orderedmap.OrderedMap, error) {
  type Reg (line 27) | type Reg struct
    method InitCtx (line 35) | func (r *Reg) InitCtx(ctx context.Context) {
    method AnalyzeWinReg (line 445) | func (r *Reg) AnalyzeWinReg(folder string) *RegResult {
  function NewReg (line 31) | func NewReg() *Reg {
  function checkSubKeyExist (line 39) | func checkSubKeyExist(key registry.Key, keyName string) bool {
  function getStringValue (line 58) | func getStringValue(key registry.Key, valueName string) string {
  function getStringsValue (line 67) | func getStringsValue(key registry.Key, valueName string) []string {
  function getBinaryValue (line 76) | func getBinaryValue(key registry.Key, valueName string) []byte {
  function getIntValue (line 85) | func getIntValue(key registry.Key, valueName string) uint64 {
  function timestampByts (line 94) | func timestampByts(timeBytes []byte) string {
  function timestamp (line 103) | func timestamp(ts uint64) string {
  function byte2mac (line 110) | func byte2mac(macBytes []byte) string {
  type RegResult (line 440) | type RegResult struct

FILE: app.go
  type App (line 9) | type App struct
    method startup (line 19) | func (a *App) startup(ctx context.Context) {
    method domReady (line 25) | func (a App) domReady(ctx context.Context) {
    method beforeClose (line 32) | func (a *App) beforeClose(ctx context.Context) (prevent bool) {
    method shutdown (line 37) | func (a *App) shutdown(ctx context.Context) {
    method Greet (line 42) | func (a *App) Greet(name string) string {
    method GetVersion (line 46) | func (a *App) GetVersion() string {
  function NewApp (line 14) | func NewApp() *App {

FILE: frontend/components.d.ts
  type GlobalComponents (line 10) | interface GlobalComponents {
  type GlobalDirectives (line 37) | interface GlobalDirectives {

FILE: frontend/src/composables/useLayout.js
  function useLayout (line 452) | function useLayout() {

FILE: frontend/src/composables/useTableHeight.js
  function useTableHeight (line 10) | function useTableHeight(resultCardRef, tableScrollHeight, offsetHeight =...

FILE: frontend/src/store/modules/page.ts
  type PageDataState (line 3) | interface PageDataState {
  method saveKeyCalculationData (line 28) | saveKeyCalculationData(data: any) {
  method saveDatabaseDecryptData (line 31) | saveDatabaseDecryptData(data: any) {
  method saveDataExtractionData (line 34) | saveDataExtractionData(data: any) {
  method saveRegistryData (line 37) | saveRegistryData(data: any) {
  method saveBruteForceData (line 40) | saveBruteForceData(data: any) {
  method saveTimestampData (line 43) | saveTimestampData(data: any) {
  method saveFileReaderData (line 46) | saveFileReaderData(data: any) {
  method saveIPLocationData (line 49) | saveIPLocationData(data: any) {
  method getBruteForceCrackingState (line 53) | getBruteForceCrackingState(): boolean {
  method updateBruteForceCrackingState (line 57) | updateBruteForceCrackingState(cracking: boolean) {
  method setCardCollapsed (line 64) | setCardCollapsed(collapsed: boolean) {
  method getCardCollapsed (line 68) | getCardCollapsed(): boolean {

FILE: frontend/src/utils.js
  function generateNormalTextOutput (line 9) | function generateNormalTextOutput(text, color = 'black') {
  function generateSuccessTextOutput (line 19) | function generateSuccessTextOutput(label, value) {
  function generateErrorTextOutput (line 28) | function generateErrorTextOutput(text) {
  function generateWarningTextOutput (line 37) | function generateWarningTextOutput(text) {
  function generateInfoTextOutput (line 46) | function generateInfoTextOutput(text) {

FILE: frontend/wailsjs/go/cracker/ForensicsCracker.js
  function CancelCrack (line 5) | function CancelCrack() {
  function CrackAirDrop (line 9) | function CrackAirDrop(arg1, arg2, arg3, arg4, arg5) {
  function CrackWXUin (line 13) | function CrackWXUin(arg1) {
  function GetState (line 17) | function GetState() {
  function InitCtx (line 21) | function InitCtx(arg1) {

FILE: frontend/wailsjs/go/database/DecryptDatabase.js
  function DecryptAMapDB (line 5) | function DecryptAMapDB(arg1) {
  function DecryptDingTalkDB (line 9) | function DecryptDingTalkDB(arg1, arg2) {
  function DecryptEnMicroMsg (line 13) | function DecryptEnMicroMsg(arg1, arg2) {
  function DecryptFTSIndexDB (line 17) | function DecryptFTSIndexDB(arg1, arg2) {
  function DecryptNtqqDB (line 21) | function DecryptNtqqDB(arg1, arg2) {
  function DecryptSQLCipher3DB (line 25) | function DecryptSQLCipher3DB(arg1, arg2) {
  function DecryptSQLCipher4DB (line 29) | function DecryptSQLCipher4DB(arg1, arg2) {
  function DecryptSystemDataSQLite (line 33) | function DecryptSystemDataSQLite(arg1, arg2) {
  function DecryptWCDB (line 37) | function DecryptWCDB(arg1, arg2) {
  function InitCtx (line 41) | function InitCtx(arg1) {

FILE: frontend/wailsjs/go/extractor/InfoExtractor.js
  function ExtractDbeaver (line 5) | function ExtractDbeaver(arg1) {
  function ExtractFinalShell (line 9) | function ExtractFinalShell(arg1) {
  function ExtractHawk2 (line 13) | function ExtractHawk2(arg1, arg2) {
  function ExtractMetaMask (line 17) | function ExtractMetaMask(arg1) {
  function ExtractMobaXterm (line 21) | function ExtractMobaXterm(arg1, arg2) {
  function ExtractNavicat (line 25) | function ExtractNavicat(arg1) {
  function ExtractXShell (line 29) | function ExtractXShell(arg1, arg2) {
  function InitCtx (line 33) | function InitCtx(arg1) {

FILE: frontend/wailsjs/go/ip/IP.js
  function CheckDB (line 5) | function CheckDB() {
  function CheckUpdate (line 9) | function CheckUpdate() {
  function InitCtx (line 13) | function InitCtx(arg1) {
  function LoadDB (line 17) | function LoadDB() {
  function Search (line 21) | function Search(arg1) {
  function SearchAll (line 25) | function SearchAll(arg1) {
  function UpdateDB (line 29) | function UpdateDB() {

FILE: frontend/wailsjs/go/main/App.js
  function GetVersion (line 5) | function GetVersion() {
  function Greet (line 9) | function Greet(arg1) {

FILE: frontend/wailsjs/go/models.ts
  class CrackResult (line 3) | class CrackResult {
    method createFrom (line 8) | static createFrom(source: any = {}) {
    method constructor (line 12) | constructor(source: any = {}) {
  class DecryptResult (line 24) | class DecryptResult {
    method createFrom (line 29) | static createFrom(source: any = {}) {
    method constructor (line 33) | constructor(source: any = {}) {
  class ExtractMapResult (line 45) | class ExtractMapResult {
    method createFrom (line 50) | static createFrom(source: any = {}) {
    method constructor (line 54) | constructor(source: any = {}) {
    method convertValues (line 60) | convertValues(a: any, classs: any, asMap: boolean = false): any {
  class CZIP (line 83) | class CZIP {
    method createFrom (line 94) | static createFrom(source: any = {}) {
    method constructor (line 98) | constructor(source: any = {}) {
  class ReadMapResult (line 116) | class ReadMapResult {
    method createFrom (line 121) | static createFrom(source: any = {}) {
    method constructor (line 125) | constructor(source: any = {}) {
    method convertValues (line 131) | convertValues(a: any, classs: any, asMap: boolean = false): any {
  class RegResult (line 154) | class RegResult {
    method createFrom (line 159) | static createFrom(source: any = {}) {
    method constructor (line 163) | constructor(source: any = {}) {
    method convertValues (line 169) | convertValues(a: any, classs: any, asMap: boolean = false): any {

FILE: frontend/wailsjs/go/passwdCalc/PasswdCalc.js
  function CalBatChat (line 5) | function CalBatChat(arg1) {
  function CalMostone (line 9) | function CalMostone(arg1) {
  function CalTiktok (line 13) | function CalTiktok(arg1) {
  function CalWechat (line 17) | function CalWechat(arg1, arg2) {
  function CalWechatIndex (line 21) | function CalWechatIndex(arg1, arg2, arg3) {
  function CalWildFire (line 25) | function CalWildFire(arg1) {
  function InitCtx (line 29) | function InitCtx(arg1) {

FILE: frontend/wailsjs/go/reader/FileReader.js
  function InitCtx (line 5) | function InitCtx(arg1) {
  function ReadLevelDB (line 9) | function ReadLevelDB(arg1) {
  function ReadMMKV (line 13) | function ReadMMKV(arg1, arg2) {

FILE: frontend/wailsjs/go/timestamp/TimeStampParser.js
  function InitCtx (line 5) | function InitCtx(arg1) {
  function ParseTimeStamp (line 9) | function ParseTimeStamp(arg1, arg2, arg3) {

FILE: frontend/wailsjs/go/winreg/Reg.js
  function AnalyzeWinReg (line 5) | function AnalyzeWinReg(arg1) {
  function InitCtx (line 9) | function InitCtx(arg1) {

FILE: frontend/wailsjs/runtime/runtime.d.ts
  type Position (line 11) | interface Position {
  type Size (line 16) | interface Size {
  type Screen (line 21) | interface Screen {
  type EnvironmentInfo (line 29) | interface EnvironmentInfo {

FILE: frontend/wailsjs/runtime/runtime.js
  function LogPrint (line 11) | function LogPrint(message) {
  function LogTrace (line 15) | function LogTrace(message) {
  function LogDebug (line 19) | function LogDebug(message) {
  function LogInfo (line 23) | function LogInfo(message) {
  function LogWarning (line 27) | function LogWarning(message) {
  function LogError (line 31) | function LogError(message) {
  function LogFatal (line 35) | function LogFatal(message) {
  function EventsOnMultiple (line 39) | function EventsOnMultiple(eventName, callback, maxCallbacks) {
  function EventsOn (line 43) | function EventsOn(eventName, callback) {
  function EventsOff (line 47) | function EventsOff(eventName, ...additionalEventNames) {
  function EventsOnce (line 51) | function EventsOnce(eventName, callback) {
  function EventsEmit (line 55) | function EventsEmit(eventName) {
  function WindowReload (line 60) | function WindowReload() {
  function WindowReloadApp (line 64) | function WindowReloadApp() {
  function WindowSetAlwaysOnTop (line 68) | function WindowSetAlwaysOnTop(b) {
  function WindowSetSystemDefaultTheme (line 72) | function WindowSetSystemDefaultTheme() {
  function WindowSetLightTheme (line 76) | function WindowSetLightTheme() {
  function WindowSetDarkTheme (line 80) | function WindowSetDarkTheme() {
  function WindowCenter (line 84) | function WindowCenter() {
  function WindowSetTitle (line 88) | function WindowSetTitle(title) {
  function WindowFullscreen (line 92) | function WindowFullscreen() {
  function WindowUnfullscreen (line 96) | function WindowUnfullscreen() {
  function WindowIsFullscreen (line 100) | function WindowIsFullscreen() {
  function WindowGetSize (line 104) | function WindowGetSize() {
  function WindowSetSize (line 108) | function WindowSetSize(width, height) {
  function WindowSetMaxSize (line 112) | function WindowSetMaxSize(width, height) {
  function WindowSetMinSize (line 116) | function WindowSetMinSize(width, height) {
  function WindowSetPosition (line 120) | function WindowSetPosition(x, y) {
  function WindowGetPosition (line 124) | function WindowGetPosition() {
  function WindowHide (line 128) | function WindowHide() {
  function WindowShow (line 132) | function WindowShow() {
  function WindowMaximise (line 136) | function WindowMaximise() {
  function WindowToggleMaximise (line 140) | function WindowToggleMaximise() {
  function WindowUnmaximise (line 144) | function WindowUnmaximise() {
  function WindowIsMaximised (line 148) | function WindowIsMaximised() {
  function WindowMinimise (line 152) | function WindowMinimise() {
  function WindowUnminimise (line 156) | function WindowUnminimise() {
  function WindowSetBackgroundColour (line 160) | function WindowSetBackgroundColour(R, G, B, A) {
  function ScreenGetAll (line 164) | function ScreenGetAll() {
  function WindowIsMinimised (line 168) | function WindowIsMinimised() {
  function WindowIsNormal (line 172) | function WindowIsNormal() {
  function BrowserOpenURL (line 176) | function BrowserOpenURL(url) {
  function Environment (line 180) | function Environment() {
  function Quit (line 184) | function Quit() {
  function Hide (line 188) | function Hide() {
  function Show (line 192) | function Show() {
  function ClipboardGetText (line 196) | function ClipboardGetText() {
  function ClipboardSetText (line 200) | function ClipboardSetText(text) {
  function OnFileDrop (line 221) | function OnFileDrop(callback, useDropTarget) {
  function OnFileDropOff (line 228) | function OnFileDropOff() {
  function CanResolveFilePaths (line 232) | function CanResolveFilePaths() {
  function ResolveFilePaths (line 236) | function ResolveFilePaths(files) {

FILE: main.go
  function main (line 26) | func main() {

FILE: tools/cracker/airdrop.go
  function getHeadAndTail (line 19) | func getHeadAndTail(phone string) (string, string) {
  method crackPhone (line 24) | func (f *ForensicsCracker) crackPhone(region, mac, head, tail string, le...
  method CrackAirDrop (line 50) | func (f *ForensicsCracker) CrackAirDrop(head, tail, region string, macs ...

FILE: tools/cracker/cracker.go
  type ForensicsCracker (line 13) | type ForensicsCracker struct
    method InitCtx (line 46) | func (f *ForensicsCracker) InitCtx(ctx context.Context) {
    method CancelCrack (line 50) | func (f *ForensicsCracker) CancelCrack() {
    method GetState (line 58) | func (f *ForensicsCracker) GetState() string {
    method sendProgress (line 63) | func (f *ForensicsCracker) sendProgress() {
    method sendState (line 67) | func (f *ForensicsCracker) sendState() {
    method sendEvent (line 72) | func (f *ForensicsCracker) sendEvent() {
  type CrackResult (line 22) | type CrackResult struct
  constant ProgressEvent (line 29) | ProgressEvent = "ForensicsTool::BruteForce::Progress"
  constant StateEvent (line 30) | StateEvent    = "ForensicsTool::BruteForce::State"
  function NewForensicsCracker (line 42) | func NewForensicsCracker() *ForensicsCracker {

FILE: tools/cracker/wxuin.go
  function getHash (line 12) | func getHash(text string) string {
  method crackUin (line 16) | func (f *ForensicsCracker) crackUin(target []string, start int, end int,...
  method CrackWXUin (line 50) | func (f *ForensicsCracker) CrackWXUin(target []string) *CrackResult {

FILE: tools/ip/cz.go
  type CZIP (line 17) | type CZIP struct
  type IP (line 29) | type IP struct
    method InitCtx (line 53) | func (i *IP) InitCtx(ctx context.Context) {
    method LoadDB (line 58) | func (i *IP) LoadDB() error {
    method CheckUpdate (line 72) | func (i *IP) CheckUpdate() bool {
    method UpdateDB (line 116) | func (i *IP) UpdateDB() error {
    method CheckDB (line 148) | func (i *IP) CheckDB() error {
    method Search (line 165) | func (i *IP) Search(ip string) *CZIP {
    method SearchAll (line 188) | func (i *IP) SearchAll(ips []string) map[string]*CZIP {
  constant tag_api (line 37) | tag_api = "https://api.github.com/repos/nmgliangwei/qqwry.ipdb/tags"
  constant db_url (line 40) | db_url = "https://raw.gitmirror.com/nmgliangwei/qqwry.ipdb/main/qqwry.ipdb"
  constant db_release_url (line 41) | db_release_url = "https://github.com/nmgliangwei/qqwry.ipdb/releases/dow...
  constant IPNewVersionEvent (line 43) | IPNewVersionEvent    = "ForensicsTool::IP::NewVersion"
  constant IPUpdateStartEvent (line 44) | IPUpdateStartEvent   = "ForensicsTool::IP::UpdateStart"
  constant IPUpdateSuccessEvent (line 45) | IPUpdateSuccessEvent = "ForensicsTool::IP::UpdateSuccess"
  constant IPUpdateErrorEvent (line 46) | IPUpdateErrorEvent   = "ForensicsTool::IP::UpdateError"
  function NewIP (line 49) | func NewIP() *IP {

FILE: tools/timestamp/time.go
  type TimeStampParser (line 11) | type TimeStampParser struct
    method InitCtx (line 19) | func (p *TimeStampParser) InitCtx(ctx context.Context) {
    method ParseTimeStamp (line 23) | func (p *TimeStampParser) ParseTimeStamp(timeStamp, oriZone, newZone s...
  function NewTimeStampParser (line 15) | func NewTimeStampParser() *TimeStampParser {

FILE: utils/hash.go
  type HashType (line 13) | type HashType
  constant MD5 (line 16) | MD5 HashType = iota
  constant SHA1 (line 17) | SHA1
  constant SHA256 (line 18) | SHA256
  function Hash (line 24) | func Hash(data interface{}, hashType HashType) []byte {
  function HashHex (line 52) | func HashHex(data interface{}, hashType HashType) string {
  function MD5Hash (line 60) | func MD5Hash(data interface{}) []byte {
  function MD5HashHex (line 65) | func MD5HashHex(data interface{}) string {
  function SHA1Hash (line 70) | func SHA1Hash(data interface{}) []byte {
  function SHA1HashHex (line 75) | func SHA1HashHex(data interface{}) string {
  function SHA256Hash (line 80) | func SHA256Hash(data interface{}) []byte {
  function SHA256HashHex (line 85) | func SHA256HashHex(data interface{}) string {
  function XXHash32 (line 89) | func XXHash32(data []byte, seed uint32) uint32 {

FILE: utils/timestamp.go
  function timestampToDatetime (line 12) | func timestampToDatetime(convertedTime time.Time, originTimezone, target...
  function IosTimestampToDatetime (line 35) | func IosTimestampToDatetime(timestamp float64, originTimezone, targetTim...
  function DefaultTimestampToDatetime (line 54) | func DefaultTimestampToDatetime(timestamp int64, originTimezone, targetT...
  function ChromeTimestampToDatetime (line 85) | func ChromeTimestampToDatetime(timestamp int64, originTimezone, targetTi...
  function WindowsFileTimeToDatetime (line 104) | func WindowsFileTimeToDatetime(timestamp uint64, originTimezone, targetT...
  function NineTimestampToDatetime (line 130) | func NineTimestampToDatetime(timestamp int64, originTimezone, targetTime...
  function AppleTimestampToDatetime (line 142) | func AppleTimestampToDatetime(timestamp float64, originTimezone, targetT...

FILE: utils/utf16.go
  function UTF16leBytesToString (line 8) | func UTF16leBytesToString(leBytes []byte) string {
Condensed preview — 105 files, each showing path, character count, and a content snippet. Download the .json file or copy for the full structured content (417K chars).
[
  {
    "path": ".gitignore",
    "chars": 96,
    "preview": "frontend/node_modules\nfrontend/dist\nbuild/bin\n.idea\n*_test.go\nlogs\n*.log\n.trae\n*.ipdb\nAGENTS.md\n"
  },
  {
    "path": "LICENSE",
    "chars": 35148,
    "preview": "                    GNU GENERAL PUBLIC LICENSE\n                       Version 3, 29 June 2007\n\n Copyright (C) 2007 Free "
  },
  {
    "path": "README.md",
    "chars": 409,
    "preview": "# 说明\n这是ForensicsTool的Go版本,使用`Wails V2`进行了重构,使用方式和之前一致,有需要的可以自己编译,`wails build`即可\n\n包含安卓端(SQLite数据库等)、windows端(注册表、远程管理工具等"
  },
  {
    "path": "analyzers/database/decryptDatabaseAnalyzer.go",
    "chars": 12190,
    "preview": "package database\n\nimport (\n\t\"ForensicsTool/utils\"\n\t\"bytes\"\n\t\"context\"\n\t\"database/sql\"\n\t\"encoding/hex\"\n\t\"fmt\"\n\t\"io\"\n\t\"net"
  },
  {
    "path": "analyzers/extractor/infoExtractAnalyzer.go",
    "chars": 2811,
    "preview": "package extractor\n\nimport (\n\t\"ForensicsTool/analyzers/extractor/tool\"\n\t\"context\"\n\t\"fmt\"\n\t\"github.com/iancoleman/orderedm"
  },
  {
    "path": "analyzers/extractor/tool/dbeaverTool.go",
    "chars": 2734,
    "preview": "package tool\n\nimport (\n\t\"encoding/hex\"\n\t\"fmt\"\n\t\"os\"\n\t\"path/filepath\"\n\n\t\"github.com/deatil/go-cryptobin/cryptobin/crypto\""
  },
  {
    "path": "analyzers/extractor/tool/finalshellTool.go",
    "chars": 3183,
    "preview": "package tool\n\nimport (\n\t\"bytes\"\n\t\"crypto/md5\"\n\t\"encoding/base64\"\n\t\"encoding/binary\"\n\t\"fmt\"\n\t\"os\"\n\t\"path/filepath\"\n\t\"stri"
  },
  {
    "path": "analyzers/extractor/tool/hawkTool.go",
    "chars": 1956,
    "preview": "package tool\n\nimport (\n\t\"encoding/base64\"\n\t\"fmt\"\n\t\"os\"\n\t\"strings\"\n\n\t\"github.com/beevik/etree\"\n\t\"github.com/deatil/go-cry"
  },
  {
    "path": "analyzers/extractor/tool/javaRandom.go",
    "chars": 861,
    "preview": "package tool\n\nimport \"github.com/donnie4w/go-logger/logger\"\n\n// JavaRandom 模拟Java的Random类\ntype JavaRandom struct {\n\tseed"
  },
  {
    "path": "analyzers/extractor/tool/metamaskTool.go",
    "chars": 3839,
    "preview": "package tool\n\nimport (\n\t\"ForensicsTool/utils\"\n\t\"fmt\"\n\t\"log\"\n\t\"os\"\n\t\"strconv\"\n\n\t\"github.com/donnie4w/go-logger/logger\"\n\t\""
  },
  {
    "path": "analyzers/extractor/tool/mobaTool.go",
    "chars": 5318,
    "preview": "package tool\n\nimport (\n\t\"crypto/aes\"\n\t\"crypto/sha512\"\n\t\"fmt\"\n\t\"os\"\n\t\"strings\"\n\n\t\"github.com/WXjzcccc/registry\"\n\t\"github."
  },
  {
    "path": "analyzers/extractor/tool/navicatTool.go",
    "chars": 10721,
    "preview": "package tool\n\nimport (\n\t\"crypto/sha1\"\n\t\"encoding/hex\"\n\t\"fmt\"\n\t\"os\"\n\t\"unicode/utf8\"\n\n\t\"github.com/WXjzcccc/registry\"\n\t\"gi"
  },
  {
    "path": "analyzers/extractor/tool/xshellTool.go",
    "chars": 6899,
    "preview": "package tool\n\nimport (\n\t\"bytes\"\n\t\"crypto/sha256\"\n\t\"encoding/base64\"\n\t\"encoding/hex\"\n\t\"errors\"\n\t\"fmt\"\n\t\"os\"\n\t\"path/filepa"
  },
  {
    "path": "analyzers/passwdCalc/passwdCalcAnalyzer.go",
    "chars": 3372,
    "preview": "package passwdCalc\n\nimport (\n\t\"ForensicsTool/utils\"\n\t\"context\"\n\t\"crypto/aes\"\n\t\"encoding/binary\"\n\t\"encoding/hex\"\n\t\"errors"
  },
  {
    "path": "analyzers/reader/fileReader.go",
    "chars": 838,
    "preview": "package reader\n\nimport (\n\t\"ForensicsTool/analyzers/reader/readers\"\n\t\"context\"\n\n\t\"github.com/iancoleman/orderedmap\"\n)\n\nty"
  },
  {
    "path": "analyzers/reader/readers/leveldbReader.go",
    "chars": 1256,
    "preview": "package readers\n\nimport (\n\t\"fmt\"\n\t\"strings\"\n\n\t\"github.com/donnie4w/go-logger/logger\"\n\t\"github.com/iancoleman/orderedmap\""
  },
  {
    "path": "analyzers/reader/readers/mmkvReader.go",
    "chars": 2542,
    "preview": "package readers\n\nimport (\n\t\"encoding/hex\"\n\t\"errors\"\n\t\"os\"\n\t\"path/filepath\"\n\t\"strings\"\n\n\tgo_mmkv \"github.com/WXjzcccc/go-"
  },
  {
    "path": "analyzers/winreg/structs/domainAccountF.go",
    "chars": 3101,
    "preview": "package structs\n\nimport (\n\t\"ForensicsTool/utils\"\n\t\"bytes\"\n\t\"encoding/binary\"\n\t\"fmt\"\n\t\"github.com/donnie4w/go-logger/logg"
  },
  {
    "path": "analyzers/winreg/structs/domainAccountV.go",
    "chars": 675,
    "preview": "package structs\n\nimport (\n\t\"bytes\"\n\t\"encoding/binary\"\n\t\"fmt\"\n\t\"github.com/donnie4w/go-logger/logger\"\n\t\"github.com/ghosti"
  },
  {
    "path": "analyzers/winreg/structs/nthash.go",
    "chars": 4499,
    "preview": "package structs\n\nimport (\n\t\"ForensicsTool/utils\"\n\t\"bytes\"\n\t\"encoding/hex\"\n\t\"github.com/deatil/go-cryptobin/cryptobin/cry"
  },
  {
    "path": "analyzers/winreg/structs/userF.go",
    "chars": 1166,
    "preview": "package structs\n\nimport (\n\t\"ForensicsTool/utils\"\n\t\"bytes\"\n\t\"encoding/binary\"\n\t\"github.com/ghostiam/binstruct\"\n)\n\n// User"
  },
  {
    "path": "analyzers/winreg/structs/userV.go",
    "chars": 7964,
    "preview": "package structs\n\nimport (\n\t\"ForensicsTool/utils\"\n\t\"bytes\"\n\t\"encoding/binary\"\n\t\"fmt\"\n\t\"github.com/ghostiam/binstruct\"\n\t\"i"
  },
  {
    "path": "analyzers/winreg/winRegAnalyzer.go",
    "chars": 15495,
    "preview": "package winreg\n\nimport (\n\t\"ForensicsTool/analyzers/winreg/structs\"\n\t\"ForensicsTool/utils\"\n\t\"context\"\n\t\"encoding/binary\"\n"
  },
  {
    "path": "app.go",
    "chars": 1100,
    "preview": "package main\n\nimport (\n\t\"context\"\n\t\"fmt\"\n)\n\n// App struct\ntype App struct {\n\tctx context.Context\n}\n\n// NewApp creates a "
  },
  {
    "path": "build/README.md",
    "chars": 1591,
    "preview": "# Build Directory\n\nThe build directory is used to house all the build files and assets for your application. \n\nThe struc"
  },
  {
    "path": "build/darwin/Info.dev.plist",
    "chars": 2318,
    "preview": "<!DOCTYPE plist PUBLIC \"-//Apple//DTD PLIST 1.0//EN\" \"http://www.apple.com/DTDs/PropertyList-1.0.dtd\">\n<plist version=\"1"
  },
  {
    "path": "build/darwin/Info.plist",
    "chars": 2178,
    "preview": "<!DOCTYPE plist PUBLIC \"-//Apple//DTD PLIST 1.0//EN\" \"http://www.apple.com/DTDs/PropertyList-1.0.dtd\">\n<plist version=\"1"
  },
  {
    "path": "build/windows/info.json",
    "chars": 356,
    "preview": "{\n\t\"fixed\": {\n\t\t\"file_version\": \"{{.Info.ProductVersion}}\"\n\t},\n\t\"info\": {\n\t\t\"0000\": {\n\t\t\t\"ProductVersion\": \"{{.Info.Prod"
  },
  {
    "path": "build/windows/installer/project.nsi",
    "chars": 4862,
    "preview": "Unicode true\n\n####\n## Please note: Template replacements don't work in this file. They are provided with default defines"
  },
  {
    "path": "build/windows/installer/wails_tools.nsh",
    "chars": 8294,
    "preview": "# DO NOT EDIT - Generated automatically by `wails build`\n\n!include \"x64.nsh\"\n!include \"WinVer.nsh\"\n!include \"FileFunc.ns"
  },
  {
    "path": "build/windows/wails.exe.manifest",
    "chars": 1036,
    "preview": "<?xml version=\"1.0\" encoding=\"UTF-8\" standalone=\"yes\"?>\n<assembly manifestVersion=\"1.0\" xmlns=\"urn:schemas-microsoft-com"
  },
  {
    "path": "frontend/.gitignore",
    "chars": 308,
    "preview": "# Logs\nlogs\n*.log\nnpm-debug.log*\nyarn-debug.log*\nyarn-error.log*\npnpm-debug.log*\nlerna-debug.log*\n\nnode_modules\n.DS_Stor"
  },
  {
    "path": "frontend/README.md",
    "chars": 1635,
    "preview": "# primevue-quickstart-create-vue-ts\n\nThis template should help get you started developing with Vue 3 in Vite.\n\n## Recomm"
  },
  {
    "path": "frontend/components.d.ts",
    "chars": 2020,
    "preview": "/* eslint-disable */\n// @ts-nocheck\n// Generated by unplugin-vue-components\n// Read more: https://github.com/vuejs/core/"
  },
  {
    "path": "frontend/env.d.ts",
    "chars": 38,
    "preview": "/// <reference types=\"vite/client\" />\n"
  },
  {
    "path": "frontend/index.html",
    "chars": 326,
    "preview": "<!DOCTYPE html>\n<html lang=\"en\">\n    <head>\n        <meta charset=\"UTF-8\" />\n        <meta name=\"viewport\" content=\"widt"
  },
  {
    "path": "frontend/package.json",
    "chars": 938,
    "preview": "{\n    \"name\": \"primevue-quickstart-create-vue-ts\",\n    \"version\": \"0.0.0\",\n    \"type\": \"module\",\n    \"scripts\": {\n      "
  },
  {
    "path": "frontend/package.json.md5",
    "chars": 32,
    "preview": "b9da4125dc6abe1642aa99eb71d943d1"
  },
  {
    "path": "frontend/pnpm-workspace.yaml",
    "chars": 38,
    "preview": "ignoredBuiltDependencies:\n  - esbuild\n"
  },
  {
    "path": "frontend/src/App.vue",
    "chars": 1569,
    "preview": "<script setup>\nimport AppTopbar from \"./components/AppTopbar.vue\";\nimport AppFooter from \"./components/AppFooter.vue\";\ni"
  },
  {
    "path": "frontend/src/assets/styles/main.css",
    "chars": 27288,
    "preview": "@import \"primeicons/primeicons.css\";\n\nhtml {\n    box-sizing: border-box;\n    -webkit-font-smoothing: antialiased;\n    -m"
  },
  {
    "path": "frontend/src/components/AppConfig.vue",
    "chars": 1841,
    "preview": "<script setup>\nimport { useLayout } from \"../composables/useLayout\";\n\nconst { primaryColors, surfaces, primary, surface,"
  },
  {
    "path": "frontend/src/components/AppFooter.vue",
    "chars": 132,
    "preview": "<template>\n    <div class=\"footer\">\n        <div class=\"footer-container\">\n            footer\n        </div>\n    </div>\n"
  },
  {
    "path": "frontend/src/components/AppSidebar.vue",
    "chars": 9256,
    "preview": "<template>\n    <div class=\"sidebar\" :class=\"{ 'sidebar-collapsed': isCollapsed }\" style=\"--wails-draggable: drag;\">\n    "
  },
  {
    "path": "frontend/src/components/AppTopbar.vue",
    "chars": 3392,
    "preview": "<script setup>\nimport { ref } from 'vue';\nimport { useLayout } from \"../composables/useLayout\";\nimport AppConfig from \"."
  },
  {
    "path": "frontend/src/components/Empty.vue",
    "chars": 1221,
    "preview": "<template>\n  <div class=\"empty-container\">\n    <div class=\"empty-icon\">\n      <i class=\"pi pi-inbox\"></i>\n    </div>\n   "
  },
  {
    "path": "frontend/src/composables/useLayout.js",
    "chars": 9164,
    "preview": "import { updatePrimaryPalette, updateSurfacePalette } from \"@primeuix/themes\";\nimport { computed, ref, watchEffect } fro"
  },
  {
    "path": "frontend/src/composables/useTableHeight.js",
    "chars": 1056,
    "preview": "import { ref, nextTick } from 'vue'\n\n/**\n * 计算表格的动态高度\n * @param {Ref<HTMLElement>} resultCardRef - 结果卡片的引用\n * @param {Re"
  },
  {
    "path": "frontend/src/main.ts",
    "chars": 623,
    "preview": "import \"./assets/styles/main.css\";\n\nimport { createApp } from \"vue\";\nimport PrimeVue from \"primevue/config\";\nimport Aura"
  },
  {
    "path": "frontend/src/router/index.ts",
    "chars": 1823,
    "preview": "import { createRouter, createWebHistory } from 'vue-router';\n\n// @ts-ignore\nimport KeyCalculation from '../views/KeyCalc"
  },
  {
    "path": "frontend/src/store/index.ts",
    "chars": 122,
    "preview": "import { createPinia } from 'pinia';\n\nconst store = createPinia();\n\nexport default store;\n\nexport * from './modules/page"
  },
  {
    "path": "frontend/src/store/modules/page.ts",
    "chars": 1902,
    "preview": "import { defineStore } from 'pinia';\n\ninterface PageDataState {\n  keyCalculationStore: any | null;\n  databaseDecryptStor"
  },
  {
    "path": "frontend/src/utils.js",
    "chars": 1079,
    "preview": "// 工具函数集合\n\n/**\n * 生成普通文本输出\n * @param {string} text - 文本内容\n * @param {string} color - 文本颜色\n * @returns {string} 带样式的HTML字"
  },
  {
    "path": "frontend/src/views/About.vue",
    "chars": 1719,
    "preview": "<template>\n  <div class=\"page-container\">\n    <Card class=\"result-card\">\n      <template #title>关于</template>\n      <tem"
  },
  {
    "path": "frontend/src/views/BruteForce.vue",
    "chars": 7137,
    "preview": "<template>\n  <div class=\"page-container\">\n    <Card class=\"form-card\">\n      <template #content>\n      <form class=\"form"
  },
  {
    "path": "frontend/src/views/DataExtraction.vue",
    "chars": 10543,
    "preview": "<template>\n  <div class=\"page-container\">\n    <Card class=\"form-card\">\n      <template #content>\n      <form class=\"form"
  },
  {
    "path": "frontend/src/views/DatabaseDecrypt.vue",
    "chars": 8165,
    "preview": "<template>\n  <div class=\"page-container\">\n    <Card class=\"form-card\">\n      <template #content>\n      <form class=\"form"
  },
  {
    "path": "frontend/src/views/FileReader.vue",
    "chars": 10252,
    "preview": "<template>\n    <div class=\"page-container\">\n        <Card class=\"form-card\">\n            <template #content>\n           "
  },
  {
    "path": "frontend/src/views/IPLocation.vue",
    "chars": 21108,
    "preview": "<template>\n  <div class=\"page-container\">\n    <!-- 输入卡片,支持抽屉式收起 -->\n    <Card class=\"form-card\" :class=\"{ 'collapsed': i"
  },
  {
    "path": "frontend/src/views/KeyCalculation.vue",
    "chars": 11559,
    "preview": "<template>\n    <div class=\"page-container\">\n        <Card class=\"form-card\">\n            <template #content>\n           "
  },
  {
    "path": "frontend/src/views/RegistryAnalysis.vue",
    "chars": 7660,
    "preview": "<template>\n  <div class=\"page-container\">\n    <Card class=\"form-card\">\n      <template #content>\n      <form class=\"form"
  },
  {
    "path": "frontend/src/views/TimestampParser.vue",
    "chars": 4136,
    "preview": "<template>\n  <div class=\"page-container\">\n    <Card class=\"form-card\">\n      <template #content>\n      <form class=\"form"
  },
  {
    "path": "frontend/tsconfig.json",
    "chars": 720,
    "preview": "{\n    \"compilerOptions\": {\n        \"target\": \"ES2020\",\n        \"useDefineForClassFields\": true,\n        \"module\": \"ESNex"
  },
  {
    "path": "frontend/tsconfig.node.json",
    "chars": 263,
    "preview": "{\n    \"compilerOptions\": {\n        \"composite\": true,\n        \"skipLibCheck\": true,\n        \"module\": \"ESNext\",\n        "
  },
  {
    "path": "frontend/vite.config.ts",
    "chars": 538,
    "preview": "import { defineConfig } from \"vite\";\nimport vue from \"@vitejs/plugin-vue\";\nimport Components from \"unplugin-vue-componen"
  },
  {
    "path": "frontend/wailsjs/go/cracker/ForensicsCracker.d.ts",
    "chars": 541,
    "preview": "// Cynhyrchwyd y ffeil hon yn awtomatig. PEIDIWCH Â MODIWL\n// This file is automatically generated. DO NOT EDIT\nimport {"
  },
  {
    "path": "frontend/wailsjs/go/cracker/ForensicsCracker.js",
    "chars": 713,
    "preview": "// @ts-check\n// Cynhyrchwyd y ffeil hon yn awtomatig. PEIDIWCH Â MODIWL\n// This file is automatically generated. DO NOT "
  },
  {
    "path": "frontend/wailsjs/go/database/DecryptDatabase.d.ts",
    "chars": 1066,
    "preview": "// Cynhyrchwyd y ffeil hon yn awtomatig. PEIDIWCH Â MODIWL\n// This file is automatically generated. DO NOT EDIT\nimport {"
  },
  {
    "path": "frontend/wailsjs/go/database/DecryptDatabase.js",
    "chars": 1453,
    "preview": "// @ts-check\n// Cynhyrchwyd y ffeil hon yn awtomatig. PEIDIWCH Â MODIWL\n// This file is automatically generated. DO NOT "
  },
  {
    "path": "frontend/wailsjs/go/extractor/InfoExtractor.d.ts",
    "chars": 859,
    "preview": "// Cynhyrchwyd y ffeil hon yn awtomatig. PEIDIWCH Â MODIWL\n// This file is automatically generated. DO NOT EDIT\nimport {"
  },
  {
    "path": "frontend/wailsjs/go/extractor/InfoExtractor.js",
    "chars": 1105,
    "preview": "// @ts-check\n// Cynhyrchwyd y ffeil hon yn awtomatig. PEIDIWCH Â MODIWL\n// This file is automatically generated. DO NOT "
  },
  {
    "path": "frontend/wailsjs/go/ip/IP.d.ts",
    "chars": 550,
    "preview": "// Cynhyrchwyd y ffeil hon yn awtomatig. PEIDIWCH Â MODIWL\n// This file is automatically generated. DO NOT EDIT\nimport {"
  },
  {
    "path": "frontend/wailsjs/go/ip/IP.js",
    "chars": 712,
    "preview": "// @ts-check\n// Cynhyrchwyd y ffeil hon yn awtomatig. PEIDIWCH Â MODIWL\n// This file is automatically generated. DO NOT "
  },
  {
    "path": "frontend/wailsjs/go/main/App.d.ts",
    "chars": 212,
    "preview": "// Cynhyrchwyd y ffeil hon yn awtomatig. PEIDIWCH Â MODIWL\n// This file is automatically generated. DO NOT EDIT\n\nexport "
  },
  {
    "path": "frontend/wailsjs/go/main/App.js",
    "chars": 299,
    "preview": "// @ts-check\n// Cynhyrchwyd y ffeil hon yn awtomatig. PEIDIWCH Â MODIWL\n// This file is automatically generated. DO NOT "
  },
  {
    "path": "frontend/wailsjs/go/models.ts",
    "chars": 4649,
    "preview": "export namespace cracker {\n\t\n\texport class CrackResult {\n\t    result: string;\n\t    time: string;\n\t    error: string;\n\t\n\t"
  },
  {
    "path": "frontend/wailsjs/go/passwdCalc/PasswdCalc.d.ts",
    "chars": 624,
    "preview": "// Cynhyrchwyd y ffeil hon yn awtomatig. PEIDIWCH Â MODIWL\n// This file is automatically generated. DO NOT EDIT\nimport {"
  },
  {
    "path": "frontend/wailsjs/go/passwdCalc/PasswdCalc.js",
    "chars": 924,
    "preview": "// @ts-check\n// Cynhyrchwyd y ffeil hon yn awtomatig. PEIDIWCH Â MODIWL\n// This file is automatically generated. DO NOT "
  },
  {
    "path": "frontend/wailsjs/go/reader/FileReader.d.ts",
    "chars": 398,
    "preview": "// Cynhyrchwyd y ffeil hon yn awtomatig. PEIDIWCH Â MODIWL\n// This file is automatically generated. DO NOT EDIT\nimport {"
  },
  {
    "path": "frontend/wailsjs/go/reader/FileReader.js",
    "chars": 444,
    "preview": "// @ts-check\n// Cynhyrchwyd y ffeil hon yn awtomatig. PEIDIWCH Â MODIWL\n// This file is automatically generated. DO NOT "
  },
  {
    "path": "frontend/wailsjs/go/timestamp/TimeStampParser.d.ts",
    "chars": 295,
    "preview": "// Cynhyrchwyd y ffeil hon yn awtomatig. PEIDIWCH Â MODIWL\n// This file is automatically generated. DO NOT EDIT\nimport {"
  },
  {
    "path": "frontend/wailsjs/go/timestamp/TimeStampParser.js",
    "chars": 377,
    "preview": "// @ts-check\n// Cynhyrchwyd y ffeil hon yn awtomatig. PEIDIWCH Â MODIWL\n// This file is automatically generated. DO NOT "
  },
  {
    "path": "frontend/wailsjs/go/winreg/Reg.d.ts",
    "chars": 314,
    "preview": "// Cynhyrchwyd y ffeil hon yn awtomatig. PEIDIWCH Â MODIWL\n// This file is automatically generated. DO NOT EDIT\nimport {"
  },
  {
    "path": "frontend/wailsjs/go/winreg/Reg.js",
    "chars": 321,
    "preview": "// @ts-check\n// Cynhyrchwyd y ffeil hon yn awtomatig. PEIDIWCH Â MODIWL\n// This file is automatically generated. DO NOT "
  },
  {
    "path": "frontend/wailsjs/runtime/package.json",
    "chars": 538,
    "preview": "{\n  \"name\": \"@wailsapp/runtime\",\n  \"version\": \"2.0.0\",\n  \"description\": \"Wails Javascript runtime library\",\n  \"main\": \"r"
  },
  {
    "path": "frontend/wailsjs/runtime/runtime.d.ts",
    "chars": 11115,
    "preview": "/*\n _       __      _ __\n| |     / /___ _(_) /____\n| | /| / / __ `/ / / ___/\n| |/ |/ / /_/ / / (__  )\n|__/|__/\\__,_/_/_/"
  },
  {
    "path": "frontend/wailsjs/runtime/runtime.js",
    "chars": 5539,
    "preview": "/*\n _       __      _ __\n| |     / /___ _(_) /____\n| | /| / / __ `/ / / ___/\n| |/ |/ / /_/ / / (__  )\n|__/|__/\\__,_/_/_/"
  },
  {
    "path": "go.mod",
    "chars": 2195,
    "preview": "module ForensicsTool\n\ngo 1.25\n\nrequire (\n\tgithub.com/OneOfOne/xxhash v1.2.8\n\tgithub.com/WXjzcccc/go-mmkv v0.0.1\n\tgithub."
  },
  {
    "path": "go.sum",
    "chars": 12316,
    "preview": "github.com/OneOfOne/xxhash v1.2.8 h1:31czK/TI9sNkxIKfaUfGlU47BAxQ0ztGgd9vPyqimf8=\ngithub.com/OneOfOne/xxhash v1.2.8/go.m"
  },
  {
    "path": "main.go",
    "chars": 2015,
    "preview": "package main\n\nimport (\n\t\"ForensicsTool/analyzers/database\"\n\t\"ForensicsTool/analyzers/extractor\"\n\t\"ForensicsTool/analyzer"
  },
  {
    "path": "scripts/build-macos-arm.sh",
    "chars": 194,
    "preview": "#! /bin/bash\n\necho -e \"Start running the script...\"\ncd ../\n\necho -e \"Start building the app for macos platform...\"\nwails"
  },
  {
    "path": "scripts/build-macos-intel.sh",
    "chars": 188,
    "preview": "#! /bin/bash\n\necho -e \"Start running the script...\"\ncd ../\n\necho -e \"Start building the app for macos platform...\"\nwails"
  },
  {
    "path": "scripts/build-macos.sh",
    "chars": 198,
    "preview": "#! /bin/bash\n\necho -e \"Start running the script...\"\ncd ../\n\necho -e \"Start building the app for macos platform...\"\nwails"
  },
  {
    "path": "scripts/build-windows.sh",
    "chars": 197,
    "preview": "#! /bin/bash\n\necho -e \"Start running the script...\"\ncd ../\n\necho -e \"Start building the app for windows platform...\"\nwai"
  },
  {
    "path": "scripts/build.sh",
    "chars": 151,
    "preview": "#! /bin/bash\n\necho -e \"Start running the script...\"\ncd ../\n\necho -e \"Start building the app...\"\nwails build --clean\n\nech"
  },
  {
    "path": "scripts/install-wails-cli.sh",
    "chars": 282,
    "preview": "#! /bin/bash\n\necho -e \"Start running the script...\"\ncd ../\n\necho -e \"Current Go version: \\c\"\ngo version\n\necho -e \"Instal"
  },
  {
    "path": "tools/cracker/airdrop.go",
    "chars": 2619,
    "preview": "package cracker\n\nimport (\n\t\"ForensicsTool/utils\"\n\t\"context\"\n\t\"fmt\"\n\t\"math\"\n\t\"runtime\"\n\t\"strconv\"\n\t\"sync\"\n\t\"time\"\n)\n\nvar "
  },
  {
    "path": "tools/cracker/cracker.go",
    "chars": 1666,
    "preview": "package cracker\n\nimport (\n\t\"context\"\n\t\"fmt\"\n\t\"time\"\n\n\t\"github.com/wailsapp/wails/v2/pkg/runtime\"\n)\n\n// 助记词顺序恢复是单独的,就不放进来"
  },
  {
    "path": "tools/cracker/wxuin.go",
    "chars": 1997,
    "preview": "package cracker\n\nimport (\n\t\"ForensicsTool/utils\"\n\t\"context\"\n\t\"fmt\"\n\t\"runtime\"\n\t\"sync\"\n\t\"time\"\n)\n\nfunc getHash(text strin"
  },
  {
    "path": "tools/ip/cz.go",
    "chars": 5075,
    "preview": "package ip\n\nimport (\n\t\"context\"\n\t\"encoding/json\"\n\t\"fmt\"\n\t\"io\"\n\t\"net/http\"\n\t\"os\"\n\t\"sync\"\n\t\"time\"\n\n\t\"github.com/donnie4w/g"
  },
  {
    "path": "tools/timestamp/time.go",
    "chars": 1385,
    "preview": "package timestamp\n\nimport (\n\t\"ForensicsTool/utils\"\n\t\"context\"\n\t\"fmt\"\n\t\"log\"\n\t\"strconv\"\n)\n\ntype TimeStampParser struct {\n"
  },
  {
    "path": "utils/hash.go",
    "chars": 1567,
    "preview": "package utils\n\nimport (\n\t\"crypto/md5\"\n\t\"crypto/sha1\"\n\t\"crypto/sha256\"\n\t\"encoding/hex\"\n\n\t\"github.com/OneOfOne/xxhash\"\n)\n\n"
  },
  {
    "path": "utils/timestamp.go",
    "chars": 4625,
    "preview": "package utils\n\nimport (\n\t\"fmt\"\n\t\"strconv\"\n\t\"strings\"\n\t\"time\"\n\t_ \"time/tzdata\"\n)\n\n// timestampToDatetime 将时间转换为指定时区的格式化字符"
  },
  {
    "path": "utils/utf16.go",
    "chars": 345,
    "preview": "package utils\n\nimport (\n\t\"encoding/binary\"\n\t\"unicode/utf16\"\n)\n\nfunc UTF16leBytesToString(leBytes []byte) string {\n\tif le"
  },
  {
    "path": "wails.json",
    "chars": 372,
    "preview": "{\n  \"$schema\": \"https://wails.io/schemas/config.v2.json\",\n  \"name\": \"ForensicsTool\",\n  \"outputfilename\": \"ForensicsTool\""
  }
]

About this extraction

This page contains the full source code of the WXjzcccc/ForensicsTool GitHub repository, extracted and formatted as plain text for AI agents and large language models (LLMs). The extraction includes 105 files (360.2 KB), approximately 109.5k tokens, and a symbol index with 387 extracted functions, classes, methods, constants, and types. Use this with OpenClaw, Claude, ChatGPT, Cursor, Windsurf, or any other AI tool that accepts text input. You can copy the full output to your clipboard or download it as a .txt file.

Extracted by GitExtract — free GitHub repo to text converter for AI. Built by Nikandr Surkov.

Copied to clipboard!