[
  {
    "path": ".gitignore",
    "content": "frontend/node_modules\nfrontend/dist\nbuild/bin\n.idea\n*_test.go\nlogs\n*.log\n.trae\n*.ipdb\nAGENTS.md\n"
  },
  {
    "path": "LICENSE",
    "content": "                    GNU GENERAL PUBLIC LICENSE\n                       Version 3, 29 June 2007\n\n Copyright (C) 2007 Free Software Foundation, Inc. <https://fsf.org/>\n Everyone is permitted to copy and distribute verbatim copies\n of this license document, but changing it is not allowed.\n\n                            Preamble\n\n  The GNU General Public License is a free, copyleft license for\nsoftware and other kinds of works.\n\n  The licenses for most software and other practical works are designed\nto take away your freedom to share and change the works.  By contrast,\nthe GNU General Public License is intended to guarantee your freedom to\nshare and change all versions of a program--to make sure it remains free\nsoftware for all its users.  We, the Free Software Foundation, use the\nGNU General Public License for most of our software; it applies also to\nany other work released this way by its authors.  You can apply it to\nyour programs, too.\n\n  When we speak of free software, we are referring to freedom, not\nprice.  Our General Public Licenses are designed to make sure that you\nhave the freedom to distribute copies of free software (and charge for\nthem if you wish), that you receive source code or can get it if you\nwant it, that you can change the software or use pieces of it in new\nfree programs, and that you know you can do these things.\n\n  To protect your rights, we need to prevent others from denying you\nthese rights or asking you to surrender the rights.  Therefore, you have\ncertain responsibilities if you distribute copies of the software, or if\nyou modify it: responsibilities to respect the freedom of others.\n\n  For example, if you distribute copies of such a program, whether\ngratis or for a fee, you must pass on to the recipients the same\nfreedoms that you received.  You must make sure that they, too, receive\nor can get the source code.  And you must show them these terms so they\nknow their rights.\n\n  Developers that use the GNU GPL protect your rights with two steps:\n(1) assert copyright on the software, and (2) offer you this License\ngiving you legal permission to copy, distribute and/or modify it.\n\n  For the developers' and authors' protection, the GPL clearly explains\nthat there is no warranty for this free software.  For both users' and\nauthors' sake, the GPL requires that modified versions be marked as\nchanged, so that their problems will not be attributed erroneously to\nauthors of previous versions.\n\n  Some devices are designed to deny users access to install or run\nmodified versions of the software inside them, although the manufacturer\ncan do so.  This is fundamentally incompatible with the aim of\nprotecting users' freedom to change the software.  The systematic\npattern of such abuse occurs in the area of products for individuals to\nuse, which is precisely where it is most unacceptable.  Therefore, we\nhave designed this version of the GPL to prohibit the practice for those\nproducts.  If such problems arise substantially in other domains, we\nstand ready to extend this provision to those domains in future versions\nof the GPL, as needed to protect the freedom of users.\n\n  Finally, every program is threatened constantly by software patents.\nStates should not allow patents to restrict development and use of\nsoftware on general-purpose computers, but in those that do, we wish to\navoid the special danger that patents applied to a free program could\nmake it effectively proprietary.  To prevent this, the GPL assures that\npatents cannot be used to render the program non-free.\n\n  The precise terms and conditions for copying, distribution and\nmodification follow.\n\n                       TERMS AND CONDITIONS\n\n  0. Definitions.\n\n  \"This License\" refers to version 3 of the GNU General Public License.\n\n  \"Copyright\" also means copyright-like laws that apply to other kinds of\nworks, such as semiconductor masks.\n\n  \"The Program\" refers to any copyrightable work licensed under this\nLicense.  Each licensee is addressed as \"you\".  \"Licensees\" and\n\"recipients\" may be individuals or organizations.\n\n  To \"modify\" a work means to copy from or adapt all or part of the work\nin a fashion requiring copyright permission, other than the making of an\nexact copy.  The resulting work is called a \"modified version\" of the\nearlier work or a work \"based on\" the earlier work.\n\n  A \"covered work\" means either the unmodified Program or a work based\non the Program.\n\n  To \"propagate\" a work means to do anything with it that, without\npermission, would make you directly or secondarily liable for\ninfringement under applicable copyright law, except executing it on a\ncomputer or modifying a private copy.  Propagation includes copying,\ndistribution (with or without modification), making available to the\npublic, and in some countries other activities as well.\n\n  To \"convey\" a work means any kind of propagation that enables other\nparties to make or receive copies.  Mere interaction with a user through\na computer network, with no transfer of a copy, is not conveying.\n\n  An interactive user interface displays \"Appropriate Legal Notices\"\nto the extent that it includes a convenient and prominently visible\nfeature that (1) displays an appropriate copyright notice, and (2)\ntells the user that there is no warranty for the work (except to the\nextent that warranties are provided), that licensees may convey the\nwork under this License, and how to view a copy of this License.  If\nthe interface presents a list of user commands or options, such as a\nmenu, a prominent item in the list meets this criterion.\n\n  1. Source Code.\n\n  The \"source code\" for a work means the preferred form of the work\nfor making modifications to it.  \"Object code\" means any non-source\nform of a work.\n\n  A \"Standard Interface\" means an interface that either is an official\nstandard defined by a recognized standards body, or, in the case of\ninterfaces specified for a particular programming language, one that\nis widely used among developers working in that language.\n\n  The \"System Libraries\" of an executable work include anything, other\nthan the work as a whole, that (a) is included in the normal form of\npackaging a Major Component, but which is not part of that Major\nComponent, and (b) serves only to enable use of the work with that\nMajor Component, or to implement a Standard Interface for which an\nimplementation is available to the public in source code form.  A\n\"Major Component\", in this context, means a major essential component\n(kernel, window system, and so on) of the specific operating system\n(if any) on which the executable work runs, or a compiler used to\nproduce the work, or an object code interpreter used to run it.\n\n  The \"Corresponding Source\" for a work in object code form means all\nthe source code needed to generate, install, and (for an executable\nwork) run the object code and to modify the work, including scripts to\ncontrol those activities.  However, it does not include the work's\nSystem Libraries, or general-purpose tools or generally available free\nprograms which are used unmodified in performing those activities but\nwhich are not part of the work.  For example, Corresponding Source\nincludes interface definition files associated with source files for\nthe work, and the source code for shared libraries and dynamically\nlinked subprograms that the work is specifically designed to require,\nsuch as by intimate data communication or control flow between those\nsubprograms and other parts of the work.\n\n  The Corresponding Source need not include anything that users\ncan regenerate automatically from other parts of the Corresponding\nSource.\n\n  The Corresponding Source for a work in source code form is that\nsame work.\n\n  2. Basic Permissions.\n\n  All rights granted under this License are granted for the term of\ncopyright on the Program, and are irrevocable provided the stated\nconditions are met.  This License explicitly affirms your unlimited\npermission to run the unmodified Program.  The output from running a\ncovered work is covered by this License only if the output, given its\ncontent, constitutes a covered work.  This License acknowledges your\nrights of fair use or other equivalent, as provided by copyright law.\n\n  You may make, run and propagate covered works that you do not\nconvey, without conditions so long as your license otherwise remains\nin force.  You may convey covered works to others for the sole purpose\nof having them make modifications exclusively for you, or provide you\nwith facilities for running those works, provided that you comply with\nthe terms of this License in conveying all material for which you do\nnot control copyright.  Those thus making or running the covered works\nfor you must do so exclusively on your behalf, under your direction\nand control, on terms that prohibit them from making any copies of\nyour copyrighted material outside their relationship with you.\n\n  Conveying under any other circumstances is permitted solely under\nthe conditions stated below.  Sublicensing is not allowed; section 10\nmakes it unnecessary.\n\n  3. Protecting Users' Legal Rights From Anti-Circumvention Law.\n\n  No covered work shall be deemed part of an effective technological\nmeasure under any applicable law fulfilling obligations under article\n11 of the WIPO copyright treaty adopted on 20 December 1996, or\nsimilar laws prohibiting or restricting circumvention of such\nmeasures.\n\n  When you convey a covered work, you waive any legal power to forbid\ncircumvention of technological measures to the extent such circumvention\nis effected by exercising rights under this License with respect to\nthe covered work, and you disclaim any intention to limit operation or\nmodification of the work as a means of enforcing, against the work's\nusers, your or third parties' legal rights to forbid circumvention of\ntechnological measures.\n\n  4. Conveying Verbatim Copies.\n\n  You may convey verbatim copies of the Program's source code as you\nreceive it, in any medium, provided that you conspicuously and\nappropriately publish on each copy an appropriate copyright notice;\nkeep intact all notices stating that this License and any\nnon-permissive terms added in accord with section 7 apply to the code;\nkeep intact all notices of the absence of any warranty; and give all\nrecipients a copy of this License along with the Program.\n\n  You may charge any price or no price for each copy that you convey,\nand you may offer support or warranty protection for a fee.\n\n  5. Conveying Modified Source Versions.\n\n  You may convey a work based on the Program, or the modifications to\nproduce it from the Program, in the form of source code under the\nterms of section 4, provided that you also meet all of these conditions:\n\n    a) The work must carry prominent notices stating that you modified\n    it, and giving a relevant date.\n\n    b) The work must carry prominent notices stating that it is\n    released under this License and any conditions added under section\n    7.  This requirement modifies the requirement in section 4 to\n    \"keep intact all notices\".\n\n    c) You must license the entire work, as a whole, under this\n    License to anyone who comes into possession of a copy.  This\n    License will therefore apply, along with any applicable section 7\n    additional terms, to the whole of the work, and all its parts,\n    regardless of how they are packaged.  This License gives no\n    permission to license the work in any other way, but it does not\n    invalidate such permission if you have separately received it.\n\n    d) If the work has interactive user interfaces, each must display\n    Appropriate Legal Notices; however, if the Program has interactive\n    interfaces that do not display Appropriate Legal Notices, your\n    work need not make them do so.\n\n  A compilation of a covered work with other separate and independent\nworks, which are not by their nature extensions of the covered work,\nand which are not combined with it such as to form a larger program,\nin or on a volume of a storage or distribution medium, is called an\n\"aggregate\" if the compilation and its resulting copyright are not\nused to limit the access or legal rights of the compilation's users\nbeyond what the individual works permit.  Inclusion of a covered work\nin an aggregate does not cause this License to apply to the other\nparts of the aggregate.\n\n  6. Conveying Non-Source Forms.\n\n  You may convey a covered work in object code form under the terms\nof sections 4 and 5, provided that you also convey the\nmachine-readable Corresponding Source under the terms of this License,\nin one of these ways:\n\n    a) Convey the object code in, or embodied in, a physical product\n    (including a physical distribution medium), accompanied by the\n    Corresponding Source fixed on a durable physical medium\n    customarily used for software interchange.\n\n    b) Convey the object code in, or embodied in, a physical product\n    (including a physical distribution medium), accompanied by a\n    written offer, valid for at least three years and valid for as\n    long as you offer spare parts or customer support for that product\n    model, to give anyone who possesses the object code either (1) a\n    copy of the Corresponding Source for all the software in the\n    product that is covered by this License, on a durable physical\n    medium customarily used for software interchange, for a price no\n    more than your reasonable cost of physically performing this\n    conveying of source, or (2) access to copy the\n    Corresponding Source from a network server at no charge.\n\n    c) Convey individual copies of the object code with a copy of the\n    written offer to provide the Corresponding Source.  This\n    alternative is allowed only occasionally and noncommercially, and\n    only if you received the object code with such an offer, in accord\n    with subsection 6b.\n\n    d) Convey the object code by offering access from a designated\n    place (gratis or for a charge), and offer equivalent access to the\n    Corresponding Source in the same way through the same place at no\n    further charge.  You need not require recipients to copy the\n    Corresponding Source along with the object code.  If the place to\n    copy the object code is a network server, the Corresponding Source\n    may be on a different server (operated by you or a third party)\n    that supports equivalent copying facilities, provided you maintain\n    clear directions next to the object code saying where to find the\n    Corresponding Source.  Regardless of what server hosts the\n    Corresponding Source, you remain obligated to ensure that it is\n    available for as long as needed to satisfy these requirements.\n\n    e) Convey the object code using peer-to-peer transmission, provided\n    you inform other peers where the object code and Corresponding\n    Source of the work are being offered to the general public at no\n    charge under subsection 6d.\n\n  A separable portion of the object code, whose source code is excluded\nfrom the Corresponding Source as a System Library, need not be\nincluded in conveying the object code work.\n\n  A \"User Product\" is either (1) a \"consumer product\", which means any\ntangible personal property which is normally used for personal, family,\nor household purposes, or (2) anything designed or sold for incorporation\ninto a dwelling.  In determining whether a product is a consumer product,\ndoubtful cases shall be resolved in favor of coverage.  For a particular\nproduct received by a particular user, \"normally used\" refers to a\ntypical or common use of that class of product, regardless of the status\nof the particular user or of the way in which the particular user\nactually uses, or expects or is expected to use, the product.  A product\nis a consumer product regardless of whether the product has substantial\ncommercial, industrial or non-consumer uses, unless such uses represent\nthe only significant mode of use of the product.\n\n  \"Installation Information\" for a User Product means any methods,\nprocedures, authorization keys, or other information required to install\nand execute modified versions of a covered work in that User Product from\na modified version of its Corresponding Source.  The information must\nsuffice to ensure that the continued functioning of the modified object\ncode is in no case prevented or interfered with solely because\nmodification has been made.\n\n  If you convey an object code work under this section in, or with, or\nspecifically for use in, a User Product, and the conveying occurs as\npart of a transaction in which the right of possession and use of the\nUser Product is transferred to the recipient in perpetuity or for a\nfixed term (regardless of how the transaction is characterized), the\nCorresponding Source conveyed under this section must be accompanied\nby the Installation Information.  But this requirement does not apply\nif neither you nor any third party retains the ability to install\nmodified object code on the User Product (for example, the work has\nbeen installed in ROM).\n\n  The requirement to provide Installation Information does not include a\nrequirement to continue to provide support service, warranty, or updates\nfor a work that has been modified or installed by the recipient, or for\nthe User Product in which it has been modified or installed.  Access to a\nnetwork may be denied when the modification itself materially and\nadversely affects the operation of the network or violates the rules and\nprotocols for communication across the network.\n\n  Corresponding Source conveyed, and Installation Information provided,\nin accord with this section must be in a format that is publicly\ndocumented (and with an implementation available to the public in\nsource code form), and must require no special password or key for\nunpacking, reading or copying.\n\n  7. Additional Terms.\n\n  \"Additional permissions\" are terms that supplement the terms of this\nLicense by making exceptions from one or more of its conditions.\nAdditional permissions that are applicable to the entire Program shall\nbe treated as though they were included in this License, to the extent\nthat they are valid under applicable law.  If additional permissions\napply only to part of the Program, that part may be used separately\nunder those permissions, but the entire Program remains governed by\nthis License without regard to the additional permissions.\n\n  When you convey a copy of a covered work, you may at your option\nremove any additional permissions from that copy, or from any part of\nit.  (Additional permissions may be written to require their own\nremoval in certain cases when you modify the work.)  You may place\nadditional permissions on material, added by you to a covered work,\nfor which you have or can give appropriate copyright permission.\n\n  Notwithstanding any other provision of this License, for material you\nadd to a covered work, you may (if authorized by the copyright holders of\nthat material) supplement the terms of this License with terms:\n\n    a) Disclaiming warranty or limiting liability differently from the\n    terms of sections 15 and 16 of this License; or\n\n    b) Requiring preservation of specified reasonable legal notices or\n    author attributions in that material or in the Appropriate Legal\n    Notices displayed by works containing it; or\n\n    c) Prohibiting misrepresentation of the origin of that material, or\n    requiring that modified versions of such material be marked in\n    reasonable ways as different from the original version; or\n\n    d) Limiting the use for publicity purposes of names of licensors or\n    authors of the material; or\n\n    e) Declining to grant rights under trademark law for use of some\n    trade names, trademarks, or service marks; or\n\n    f) Requiring indemnification of licensors and authors of that\n    material by anyone who conveys the material (or modified versions of\n    it) with contractual assumptions of liability to the recipient, for\n    any liability that these contractual assumptions directly impose on\n    those licensors and authors.\n\n  All other non-permissive additional terms are considered \"further\nrestrictions\" within the meaning of section 10.  If the Program as you\nreceived it, or any part of it, contains a notice stating that it is\ngoverned by this License along with a term that is a further\nrestriction, you may remove that term.  If a license document contains\na further restriction but permits relicensing or conveying under this\nLicense, you may add to a covered work material governed by the terms\nof that license document, provided that the further restriction does\nnot survive such relicensing or conveying.\n\n  If you add terms to a covered work in accord with this section, you\nmust place, in the relevant source files, a statement of the\nadditional terms that apply to those files, or a notice indicating\nwhere to find the applicable terms.\n\n  Additional terms, permissive or non-permissive, may be stated in the\nform of a separately written license, or stated as exceptions;\nthe above requirements apply either way.\n\n  8. Termination.\n\n  You may not propagate or modify a covered work except as expressly\nprovided under this License.  Any attempt otherwise to propagate or\nmodify it is void, and will automatically terminate your rights under\nthis License (including any patent licenses granted under the third\nparagraph of section 11).\n\n  However, if you cease all violation of this License, then your\nlicense from a particular copyright holder is reinstated (a)\nprovisionally, unless and until the copyright holder explicitly and\nfinally terminates your license, and (b) permanently, if the copyright\nholder fails to notify you of the violation by some reasonable means\nprior to 60 days after the cessation.\n\n  Moreover, your license from a particular copyright holder is\nreinstated permanently if the copyright holder notifies you of the\nviolation by some reasonable means, this is the first time you have\nreceived notice of violation of this License (for any work) from that\ncopyright holder, and you cure the violation prior to 30 days after\nyour receipt of the notice.\n\n  Termination of your rights under this section does not terminate the\nlicenses of parties who have received copies or rights from you under\nthis License.  If your rights have been terminated and not permanently\nreinstated, you do not qualify to receive new licenses for the same\nmaterial under section 10.\n\n  9. Acceptance Not Required for Having Copies.\n\n  You are not required to accept this License in order to receive or\nrun a copy of the Program.  Ancillary propagation of a covered work\noccurring solely as a consequence of using peer-to-peer transmission\nto receive a copy likewise does not require acceptance.  However,\nnothing other than this License grants you permission to propagate or\nmodify any covered work.  These actions infringe copyright if you do\nnot accept this License.  Therefore, by modifying or propagating a\ncovered work, you indicate your acceptance of this License to do so.\n\n  10. Automatic Licensing of Downstream Recipients.\n\n  Each time you convey a covered work, the recipient automatically\nreceives a license from the original licensors, to run, modify and\npropagate that work, subject to this License.  You are not responsible\nfor enforcing compliance by third parties with this License.\n\n  An \"entity transaction\" is a transaction transferring control of an\norganization, or substantially all assets of one, or subdividing an\norganization, or merging organizations.  If propagation of a covered\nwork results from an entity transaction, each party to that\ntransaction who receives a copy of the work also receives whatever\nlicenses to the work the party's predecessor in interest had or could\ngive under the previous paragraph, plus a right to possession of the\nCorresponding Source of the work from the predecessor in interest, if\nthe predecessor has it or can get it with reasonable efforts.\n\n  You may not impose any further restrictions on the exercise of the\nrights granted or affirmed under this License.  For example, you may\nnot impose a license fee, royalty, or other charge for exercise of\nrights granted under this License, and you may not initiate litigation\n(including a cross-claim or counterclaim in a lawsuit) alleging that\nany patent claim is infringed by making, using, selling, offering for\nsale, or importing the Program or any portion of it.\n\n  11. Patents.\n\n  A \"contributor\" is a copyright holder who authorizes use under this\nLicense of the Program or a work on which the Program is based.  The\nwork thus licensed is called the contributor's \"contributor version\".\n\n  A contributor's \"essential patent claims\" are all patent claims\nowned or controlled by the contributor, whether already acquired or\nhereafter acquired, that would be infringed by some manner, permitted\nby this License, of making, using, or selling its contributor version,\nbut do not include claims that would be infringed only as a\nconsequence of further modification of the contributor version.  For\npurposes of this definition, \"control\" includes the right to grant\npatent sublicenses in a manner consistent with the requirements of\nthis License.\n\n  Each contributor grants you a non-exclusive, worldwide, royalty-free\npatent license under the contributor's essential patent claims, to\nmake, use, sell, offer for sale, import and otherwise run, modify and\npropagate the contents of its contributor version.\n\n  In the following three paragraphs, a \"patent license\" is any express\nagreement or commitment, however denominated, not to enforce a patent\n(such as an express permission to practice a patent or covenant not to\nsue for patent infringement).  To \"grant\" such a patent license to a\nparty means to make such an agreement or commitment not to enforce a\npatent against the party.\n\n  If you convey a covered work, knowingly relying on a patent license,\nand the Corresponding Source of the work is not available for anyone\nto copy, free of charge and under the terms of this License, through a\npublicly available network server or other readily accessible means,\nthen you must either (1) cause the Corresponding Source to be so\navailable, or (2) arrange to deprive yourself of the benefit of the\npatent license for this particular work, or (3) arrange, in a manner\nconsistent with the requirements of this License, to extend the patent\nlicense to downstream recipients.  \"Knowingly relying\" means you have\nactual knowledge that, but for the patent license, your conveying the\ncovered work in a country, or your recipient's use of the covered work\nin a country, would infringe one or more identifiable patents in that\ncountry that you have reason to believe are valid.\n\n  If, pursuant to or in connection with a single transaction or\narrangement, you convey, or propagate by procuring conveyance of, a\ncovered work, and grant a patent license to some of the parties\nreceiving the covered work authorizing them to use, propagate, modify\nor convey a specific copy of the covered work, then the patent license\nyou grant is automatically extended to all recipients of the covered\nwork and works based on it.\n\n  A patent license is \"discriminatory\" if it does not include within\nthe scope of its coverage, prohibits the exercise of, or is\nconditioned on the non-exercise of one or more of the rights that are\nspecifically granted under this License.  You may not convey a covered\nwork if you are a party to an arrangement with a third party that is\nin the business of distributing software, under which you make payment\nto the third party based on the extent of your activity of conveying\nthe work, and under which the third party grants, to any of the\nparties who would receive the covered work from you, a discriminatory\npatent license (a) in connection with copies of the covered work\nconveyed by you (or copies made from those copies), or (b) primarily\nfor and in connection with specific products or compilations that\ncontain the covered work, unless you entered into that arrangement,\nor that patent license was granted, prior to 28 March 2007.\n\n  Nothing in this License shall be construed as excluding or limiting\nany implied license or other defenses to infringement that may\notherwise be available to you under applicable patent law.\n\n  12. No Surrender of Others' Freedom.\n\n  If conditions are imposed on you (whether by court order, agreement or\notherwise) that contradict the conditions of this License, they do not\nexcuse you from the conditions of this License.  If you cannot convey a\ncovered work so as to satisfy simultaneously your obligations under this\nLicense and any other pertinent obligations, then as a consequence you may\nnot convey it at all.  For example, if you agree to terms that obligate you\nto collect a royalty for further conveying from those to whom you convey\nthe Program, the only way you could satisfy both those terms and this\nLicense would be to refrain entirely from conveying the Program.\n\n  13. Use with the GNU Affero General Public License.\n\n  Notwithstanding any other provision of this License, you have\npermission to link or combine any covered work with a work licensed\nunder version 3 of the GNU Affero General Public License into a single\ncombined work, and to convey the resulting work.  The terms of this\nLicense will continue to apply to the part which is the covered work,\nbut the special requirements of the GNU Affero General Public License,\nsection 13, concerning interaction through a network will apply to the\ncombination as such.\n\n  14. Revised Versions of this License.\n\n  The Free Software Foundation may publish revised and/or new versions of\nthe GNU General Public License from time to time.  Such new versions will\nbe similar in spirit to the present version, but may differ in detail to\naddress new problems or concerns.\n\n  Each version is given a distinguishing version number.  If the\nProgram specifies that a certain numbered version of the GNU General\nPublic License \"or any later version\" applies to it, you have the\noption of following the terms and conditions either of that numbered\nversion or of any later version published by the Free Software\nFoundation.  If the Program does not specify a version number of the\nGNU General Public License, you may choose any version ever published\nby the Free Software Foundation.\n\n  If the Program specifies that a proxy can decide which future\nversions of the GNU General Public License can be used, that proxy's\npublic statement of acceptance of a version permanently authorizes you\nto choose that version for the Program.\n\n  Later license versions may give you additional or different\npermissions.  However, no additional obligations are imposed on any\nauthor or copyright holder as a result of your choosing to follow a\nlater version.\n\n  15. Disclaimer of Warranty.\n\n  THERE IS NO WARRANTY FOR THE PROGRAM, TO THE EXTENT PERMITTED BY\nAPPLICABLE LAW.  EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT\nHOLDERS AND/OR OTHER PARTIES PROVIDE THE PROGRAM \"AS IS\" WITHOUT WARRANTY\nOF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO,\nTHE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR\nPURPOSE.  THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE PROGRAM\nIS WITH YOU.  SHOULD THE PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF\nALL NECESSARY SERVICING, REPAIR OR CORRECTION.\n\n  16. Limitation of Liability.\n\n  IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING\nWILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MODIFIES AND/OR CONVEYS\nTHE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, INCLUDING ANY\nGENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING OUT OF THE\nUSE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED TO LOSS OF\nDATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD\nPARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER PROGRAMS),\nEVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF\nSUCH DAMAGES.\n\n  17. Interpretation of Sections 15 and 16.\n\n  If the disclaimer of warranty and limitation of liability provided\nabove cannot be given local legal effect according to their terms,\nreviewing courts shall apply local law that most closely approximates\nan absolute waiver of all civil liability in connection with the\nProgram, unless a warranty or assumption of liability accompanies a\ncopy of the Program in return for a fee.\n\n                     END OF TERMS AND CONDITIONS\n\n            How to Apply These Terms to Your New Programs\n\n  If you develop a new program, and you want it to be of the greatest\npossible use to the public, the best way to achieve this is to make it\nfree software which everyone can redistribute and change under these terms.\n\n  To do so, attach the following notices to the program.  It is safest\nto attach them to the start of each source file to most effectively\nstate the exclusion of warranty; and each file should have at least\nthe \"copyright\" line and a pointer to where the full notice is found.\n\n    <one line to give the program's name and a brief idea of what it does.>\n    Copyright (C) <year>  <name of author>\n\n    This program is free software: you can redistribute it and/or modify\n    it under the terms of the GNU General Public License as published by\n    the Free Software Foundation, either version 3 of the License, or\n    (at your option) any later version.\n\n    This program is distributed in the hope that it will be useful,\n    but WITHOUT ANY WARRANTY; without even the implied warranty of\n    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the\n    GNU General Public License for more details.\n\n    You should have received a copy of the GNU General Public License\n    along with this program.  If not, see <https://www.gnu.org/licenses/>.\n\nAlso add information on how to contact you by electronic and paper mail.\n\n  If the program does terminal interaction, make it output a short\nnotice like this when it starts in an interactive mode:\n\n    <program>  Copyright (C) <year>  <name of author>\n    This program comes with ABSOLUTELY NO WARRANTY; for details type `show w'.\n    This is free software, and you are welcome to redistribute it\n    under certain conditions; type `show c' for details.\n\nThe hypothetical commands `show w' and `show c' should show the appropriate\nparts of the General Public License.  Of course, your program's commands\nmight be different; for a GUI interface, you would use an \"about box\".\n\n  You should also get your employer (if you work as a programmer) or school,\nif any, to sign a \"copyright disclaimer\" for the program, if necessary.\nFor more information on this, and how to apply and follow the GNU GPL, see\n<https://www.gnu.org/licenses/>.\n\n  The GNU General Public License does not permit incorporating your program\ninto proprietary programs.  If your program is a subroutine library, you\nmay consider it more useful to permit linking proprietary applications with\nthe library.  If this is what you want to do, use the GNU Lesser General\nPublic License instead of this License.  But first, please read\n<https://www.gnu.org/licenses/why-not-lgpl.html>."
  },
  {
    "path": "README.md",
    "content": "# 说明\n这是ForensicsTool的Go版本，使用`Wails V2`进行了重构，使用方式和之前一致，有需要的可以自己编译，`wails build`即可\n\n包含安卓端（SQLite数据库等）、windows端（注册表、远程管理工具等）、时间戳、暴力破解等功能。\n\n![alt text](imgs/image.png)\n\n菜单栏现在可以收缩，小提示现在从右侧弹出\n\n![alt text](imgs/image-1.png)\n\n为了完成这个项目，fork并修改了几个库，用于适配分析\n* https://github.com/WXjzcccc/registry\n* https://github.com/WXjzcccc/go-sqlcipher\n* https://github.com/WXjzcccc/go-mmkv\n\n# 声明\n\n本工具仅用于电子数据取证的学习与研究，请勿用于非法用途，否则后果自负。\n"
  },
  {
    "path": "analyzers/database/decryptDatabaseAnalyzer.go",
    "content": "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/url\"\n\t\"os\"\n\t\"path/filepath\"\n\t\"strings\"\n\n\t_ \"github.com/WXjzcccc/go-sqlcipher\"\n\t\"github.com/deatil/go-cryptobin/cryptobin/crypto\"\n)\n\nconst (\n\tEnMicroMsgDecryptPragma = \"_pragma_cipher_compatibility=1\"\n\tFTSIndexDecryptPragma   = \"_pragma_kdf_iter=64000&_pragma_cipher_kdf_algorithm=PBKDF2_HMAC_SHA1&_pragma_cipher_hmac_algorithm=HMAC_SHA1\"\n\tSQLCipher4Pragma        = \"\"\n\tSQLCipher3Pragma        = \"_pragma_cipher_page_size=1024&_pragma_kdf_iter=64000&_pragma_cipher_kdf_algorithm=PBKDF2_HMAC_SHA1&_pragma_cipher_hmac_algorithm=HMAC_SHA1\"\n\tWcdbPragma              = \"_pragma_cipher_page_size=4096&_pragma_kdf_iter=64000&_pragma_cipher_kdf_algorithm=PBKDF2_HMAC_SHA1&_pragma_cipher_hmac_algorithm=HMAC_SHA1\"\n\tNtqqPragma              = \"_pragma_cipher_page_size=4096&_pragma_kdf_iter=4000&_pragma_cipher_kdf_algorithm=PBKDF2_HMAC_SHA512\"\n\tFTSIndexDB              = 0\n\tSQLCipher4DB            = 1\n\tSQLCipher3DB            = 2\n\tWCdbDB                  = 3\n)\n\ntype DecryptDatabase struct {\n\tctx context.Context\n}\n\nfunc NewDecryptDatabase() *DecryptDatabase {\n\treturn &DecryptDatabase{}\n}\n\ntype DecryptResult struct {\n\tSavePath string `json:\"save_path\"`\n\tWxid     string `json:\"wxid\"`\n\tErr      string `json:\"err\"`\n}\n\nfunc (d *DecryptDatabase) InitCtx(ctx context.Context) {\n\td.ctx = ctx\n}\n\nfunc moveElementToFirst(slice []string, element string) []string {\n\tidx := 0\n\tfor i, v := range slice {\n\t\tif v == element {\n\t\t\tidx = i\n\t\t\tbreak\n\t\t}\n\t}\n\t// 创建一个新的切片，长度为原切片长度\n\tnewSlice := make([]string, len(slice))\n\n\t// 将目标元素放到新切片的第一个位置\n\tnewSlice[0] = slice[idx]\n\n\tcopy(newSlice[1:idx+1], slice[0:idx])\n\tcopy(newSlice[1+idx:], slice[idx+1:])\n\n\treturn newSlice\n}\n\nfunc decryptSql(dbPath string) (string, string) {\n\tdbName := \"a\" + strings.Replace(filepath.Base(dbPath), \".\", \"\", -1) //数字开头的变量不被接受\n\tsavePath := dbPath + \"_dec.db\"\n\treturn fmt.Sprintf(\"ATTACH DATABASE '%s' AS '%s_dec' KEY '';SELECT sqlcipher_export('%s_dec');DETACH DATABASE '%s_dec';\", savePath, dbName, dbName, dbName), savePath\n}\n\nfunc (d *DecryptDatabase) DecryptEnMicroMsg(dbPath, password string) *DecryptResult {\n\t/*\n\t\t@param dbPath\t: 数据库路径\n\t\t@param password\t: 解密密码\n\t\t@return\t\t \t: 解密后的数据库路径、wxid、error\n\t*/\n\tfileInfo, err := os.Stat(dbPath)\n\tif err != nil {\n\t\treturn &DecryptResult{\"\", \"\", err.Error()}\n\t}\n\tif fileInfo.IsDir() {\n\t\treturn &DecryptResult{\"\", \"\", fmt.Sprintf(\"%s is not a file\", dbPath)}\n\t}\n\tpwd := url.QueryEscape(password)\n\tdbName := fmt.Sprintf(\"%s?_key=%s&%s\", dbPath, pwd, EnMicroMsgDecryptPragma)\n\tdb, err := sql.Open(\"sqlite3\", dbName)\n\tif err != nil {\n\t\treturn &DecryptResult{\"\", \"\", fmt.Sprintf(\"打开%s失败：%v\", dbPath, err)}\n\t}\n\tdefer db.Close()\n\t// 获取wxid\n\tselectSql := \"select value from userinfo where id = 2;\"\n\tcur, err := db.Prepare(selectSql)\n\tif err != nil {\n\t\treturn &DecryptResult{\"\", \"\", fmt.Sprintf(\"准备SQL【%s】失败：%v\", selectSql, err)}\n\t}\n\tvar wxid string\n\terr = cur.QueryRow().Scan(&wxid)\n\tif err != nil {\n\t\treturn &DecryptResult{\"\", \"\", fmt.Sprintf(\"读取wxid失败: %v\", err)}\n\t}\n\tdecCmd, savePath := decryptSql(dbPath)\n\t_, err = db.Exec(decCmd)\n\tif err != nil {\n\t\treturn &DecryptResult{\"\", \"\", fmt.Sprintf(\"解密数据库失败：%v\", err)}\n\t}\n\treturn &DecryptResult{savePath, wxid, \"\"}\n}\n\nfunc (d *DecryptDatabase) decryptNormal(dbPath, password string, dbType int) *DecryptResult {\n\t/*\n\t\t@param dbPath\t: 数据库路径\n\t\t@param password\t: 解密密码\n\t\t@return\t\t \t: 解密后的数据库路径、wxid（恒定为空字符串）、error\n\t*/\n\tfileInfo, err := os.Stat(dbPath)\n\tif err != nil {\n\t\treturn &DecryptResult{\"\", \"\", err.Error()}\n\t}\n\tif fileInfo.IsDir() {\n\t\treturn &DecryptResult{\"\", \"\", fmt.Sprintf(\"%s is not a file\", dbPath)}\n\t}\n\tvar dbName string\n\tpwd := url.QueryEscape(password)\n\tswitch dbType {\n\tcase FTSIndexDB:\n\t\tdbName = fmt.Sprintf(\"%s?_key=%s&%s\", dbPath, pwd, FTSIndexDecryptPragma)\n\tcase SQLCipher4DB:\n\t\tdbName = fmt.Sprintf(\"%s?_key=%s\", dbPath, pwd)\n\tcase SQLCipher3DB:\n\t\tdbName = fmt.Sprintf(\"%s?_key=%s&%s\", dbPath, pwd, SQLCipher3Pragma)\n\tcase WCdbDB:\n\t\tdbName = fmt.Sprintf(\"%s?_key=%s&%s\", dbPath, pwd, WcdbPragma)\n\tdefault:\n\t\treturn &DecryptResult{\"\", \"\", fmt.Sprintf(\"不支持的数据库类型：%d\", dbType)}\n\t}\n\tdb, err := sql.Open(\"sqlite3\", dbName)\n\tif err != nil {\n\t\treturn &DecryptResult{\"\", \"\", fmt.Sprintf(\"打开%s失败：%v\", dbPath, err)}\n\t}\n\tdefer db.Close()\n\tdecCmd, savePath := decryptSql(dbPath)\n\t_, err = db.Exec(decCmd)\n\tif err != nil {\n\t\treturn &DecryptResult{\"\", \"\", fmt.Sprintf(\"解密数据库失败：%v\", err)}\n\t}\n\treturn &DecryptResult{savePath, \"\", \"\"}\n}\n\nfunc (d *DecryptDatabase) DecryptFTSIndexDB(dbPath, password string) *DecryptResult {\n\treturn d.decryptNormal(dbPath, password, FTSIndexDB)\n}\n\nfunc (d *DecryptDatabase) DecryptSQLCipher4DB(dbPath, password string) *DecryptResult {\n\treturn d.decryptNormal(dbPath, password, SQLCipher4DB)\n}\n\nfunc (d *DecryptDatabase) DecryptSQLCipher3DB(dbPath, password string) *DecryptResult {\n\treturn d.decryptNormal(dbPath, password, SQLCipher3DB)\n}\n\nfunc (d *DecryptDatabase) DecryptWCDB(dbPath, password string) *DecryptResult {\n\treturn d.decryptNormal(dbPath, password, WCdbDB)\n}\n\nfunc (d *DecryptDatabase) DecryptNtqqDB(dbPath, password string) *DecryptResult {\n\t/*\n\t\t@param dbPath\t: 数据库路径\n\t\t@param password\t: 解密密码\n\t\t@return\t\t \t: 解密后的数据库路径、wxid（恒定为空字符串）、error\n\t*/\n\tfileInfo, err := os.Stat(dbPath)\n\tif err != nil {\n\t\treturn &DecryptResult{\"\", \"\", err.Error()}\n\t}\n\tif fileInfo.IsDir() {\n\t\treturn &DecryptResult{\"\", \"\", fmt.Sprintf(\"%s is not a file\", dbPath)}\n\t}\n\tpathBak := dbPath + \".bak\"\n\tfr, err := os.OpenFile(dbPath, os.O_RDWR, 0666)\n\tif err != nil {\n\t\treturn &DecryptResult{\"\", \"\", fmt.Sprintf(\"打开文件%s失败：%v\", dbPath, err)}\n\t}\n\tdefer fr.Close()\n\t_, err = os.Stat(pathBak)\n\t// 读取源文件内容\n\tdata, err := os.ReadFile(dbPath)\n\tif err != nil {\n\t\treturn &DecryptResult{\"\", \"\", fmt.Sprintf(\"读取文件%s失败：%v\", dbPath, err)}\n\t}\n\tif os.IsNotExist(err) {\n\t\t// 备份不存在就写备份，否则不再备份，以免原始数据被修改\n\t\tfw, err := os.Create(pathBak)\n\t\tif err != nil {\n\t\t\treturn &DecryptResult{\"\", \"\", fmt.Sprintf(\"创建文件%s失败：%v\", pathBak, err)}\n\t\t}\n\t\tdefer fw.Close()\n\t\t// 写入备份文件\n\t\t_, err = fw.Write(data)\n\t\tif err != nil {\n\t\t\treturn &DecryptResult{\"\", \"\", fmt.Sprintf(\"写入文件%s失败：%v\", pathBak, err)}\n\t\t}\n\t}\n\t// 提取头部和加密内容\n\thead := data[:1024]\n\tencryptedContent := data[1024:]\n\n\t// 查找 salt 的起始和结束位置\n\tsaltStart := bytes.Index(head, []byte{0x12, 0x08}) + 2\n\tif saltStart < 2 {\n\t\treturn &DecryptResult{\"\", \"\", \"Salt start not found\"}\n\t}\n\tsaltEnd := bytes.Index(head, []byte{0x1a, 0x07})\n\tif saltEnd == -1 {\n\t\treturn &DecryptResult{\"\", \"\", \"Salt end not found\"}\n\t}\n\n\tsalt := string(head[saltStart:saltEnd])\n\n\t_, err = fr.Seek(0, io.SeekStart)\n\tif err != nil {\n\t\treturn &DecryptResult{\"\", \"\", fmt.Sprintf(\"Error seeking in source file:%v\", err)}\n\t}\n\t_, err = fr.Write(encryptedContent)\n\tif err != nil {\n\t\treturn &DecryptResult{\"\", \"\", fmt.Sprintf(\"Error writing in source file:%v\", err)}\n\t}\n\tkey := url.QueryEscape(utils.MD5HashHex(utils.MD5HashHex(password) + salt))\n\tmethods := []string{\"HMAC_SHA1\", \"HMAC_SHA256\", \"HMAC_SHA512\"}\n\tfor _, method := range methods {\n\t\tpragma := NtqqPragma + fmt.Sprintf(\"&_pragma_cipher_hmac_algorithm=%s\", method)\n\t\tdbName := fmt.Sprintf(\"%s?_key=%s&%s\", dbPath, key, pragma)\n\t\tdb, err := sql.Open(\"sqlite3\", dbName)\n\t\tif err != nil {\n\t\t\tcontinue\n\t\t}\n\t\tdecCmd, savePath := decryptSql(dbPath)\n\t\t_, err = db.Exec(decCmd)\n\t\tif err != nil {\n\t\t\terr2 := db.Close()\n\t\t\tif err2 != nil {\n\t\t\t\tcontinue\n\t\t\t}\n\t\t\tcontinue\n\t\t}\n\t\terr = db.Close()\n\t\tif err != nil {\n\t\t\tcontinue\n\t\t}\n\t\treturn &DecryptResult{savePath, \"\", \"\"}\n\t}\n\treturn &DecryptResult{\"\", \"\", \"解密数据库失败\"}\n}\n\nfunc (d *DecryptDatabase) DecryptAMapDB(dbPath string) *DecryptResult {\n\t/*\n\t\t@param dbPath\t: 数据库路径\n\t\t@return\t\t \t: 解密后的数据库路径、wxid（恒定为空字符串）、error\n\t*/\n\t// 获取文件大小并格式化\n\tfileInfo, err := os.Stat(dbPath)\n\tif err != nil {\n\t\treturn &DecryptResult{\"\", \"\", fmt.Sprintf(\"获取文件%s状态失败：%v\", dbPath, err)}\n\t}\n\tif fileInfo.IsDir() {\n\t\treturn &DecryptResult{\"\", \"\", fmt.Sprintf(\"%s is not a file\", dbPath)}\n\t}\n\tsize := fileInfo.Size() / 1024\n\tuintNum := uint32(size)\n\t// 创建一个4字节的字节切片\n\tbyteSlice := make([]byte, 4)\n\n\t// 将uint32转换为字节切片\n\tbyteSlice[0] = byte(uintNum >> 24)\n\tbyteSlice[1] = byte(uintNum >> 16)\n\tbyteSlice[2] = byte(uintNum >> 8)\n\tbyteSlice[3] = byte(uintNum)\n\n\t// 将字节切片转换为hex字符串\n\tsizeHex := hex.EncodeToString(byteSlice)\n\t// 固定解密密钥\n\tkey := \"a4a11bb9ef4b2f4c\"\n\n\t// SQLite3固定文件头，16字节\n\thead := \"53514C69746520666F726D6174203300\"\n\n\t// 输出解密后的文件路径\n\toutPath := strings.Replace(dbPath, \"girf_sync.db\", \"girf_sync_dec.db\", -1)\n\tdata, err := os.ReadFile(dbPath)\n\tif err != nil {\n\t\treturn &DecryptResult{\"\", \"\", fmt.Sprintf(\"读取文件%s失败：%v\", dbPath, err)}\n\t}\n\n\t// 获取页大小，读写、缓存等信息，原数据明文，非加密，在第3个8字节数据中给出\n\tprop := hex.EncodeToString(data[16:24])\n\n\t// AES解密\n\tdecData := crypto.\n\t\tFromBytes(data).\n\t\tSetKey(key).\n\t\tDecrypt().\n\t\tToBytes()\n\n\t// 在第93-96字节存在第25-28字节的备份数据，拿来即可\n\tmagic := hex.EncodeToString(decData[92:96]) + sizeHex\n\n\t// 拼出新的32字节文件头\n\ttrueHead, err := hex.DecodeString(head + prop + magic)\n\tif err != nil {\n\t\treturn &DecryptResult{\"\", \"\", fmt.Sprintf(\"拼接文件头失败：%v\", err)}\n\t}\n\n\t// 写入新文件\n\tnewFileData := append(trueHead, decData[32:]...)\n\terr = os.WriteFile(outPath, newFileData, 0644)\n\tif err != nil {\n\t\treturn &DecryptResult{\"\", \"\", fmt.Sprintf(\"写入文件%s失败：%v\", outPath, err)}\n\t}\n\n\treturn &DecryptResult{outPath, \"\", \"\"}\n}\n\nfunc (d *DecryptDatabase) DecryptDingTalkDB(dbPath, password string) *DecryptResult {\n\t/*\n\t\t@param dbPath\t: 数据库路径\n\t\t@param password\t: 解密密码\n\t\t@return\t\t \t: 解密后的数据库路径、wxid（恒定为空字符串）、error\n\t*/\n\tfileInfo, err := os.Stat(dbPath)\n\tif err != nil {\n\t\treturn &DecryptResult{\"\", \"\", err.Error()}\n\t}\n\tif fileInfo.IsDir() {\n\t\treturn &DecryptResult{\"\", \"\", fmt.Sprintf(\"%s is not a file\", dbPath)}\n\t}\n\tcpus := []string{\"armeabi\", \"armeabi-v7a\", \"arm64-v8a\", \"x86\", \"x86_64\", \"mips\", \"mips64\"}\n\tdevice := strings.Split(password, \"/\")\n\tif len(device) != 5 {\n\t\treturn &DecryptResult{\"\", \"\", \"密码组成不正确\"}\n\t}\n\tinCpu := device[1]\n\t// 将cpus中与device[1]相同的元素位置移到第一个\n\tnewCpus := moveElementToFirst(cpus, inCpu)\n\toutPath := strings.Replace(dbPath, \".db\", \"_dec.db\", -1)\n\n\t// 读取文件内容\n\tdata, err := os.ReadFile(dbPath)\n\tif err != nil {\n\t\treturn &DecryptResult{\"\", \"\", fmt.Sprintf(\"读取文件%s失败：%v\", dbPath, err)}\n\t}\n\tsqliteHead := \"53514C69746520666F726D6174203300\"\n\tfor _, cpu := range newCpus {\n\t\tdevice[1] = cpu\n\t\tnewDevice := strings.Join(device, \"/\")\n\t\tkey := utils.MD5HashHex(newDevice)[:16]\n\t\tdecData := crypto.\n\t\t\tFromBytes(data).\n\t\t\tSetKey(key).\n\t\t\tDecrypt().\n\t\t\tToBytes()\n\t\tif hex.EncodeToString(decData[:16]) == strings.ToLower(sqliteHead) {\n\t\t\terr = os.WriteFile(outPath, decData, 0644)\n\t\t\tif err != nil {\n\t\t\t\treturn &DecryptResult{\"\", \"\", fmt.Sprintf(\"写入文件%s失败: %v\", outPath, err)}\n\t\t\t}\n\t\t\treturn &DecryptResult{outPath, \"\", \"\"}\n\t\t}\n\t}\n\treturn &DecryptResult{\"\", \"\", \"解密数据库失败\"}\n}\n\nfunc (d *DecryptDatabase) DecryptSystemDataSQLite(dbPath, password string) *DecryptResult {\n\t/*\n\t\t@param dbPath\t: 数据库路径\n\t\t@param password\t: 解密密码\n\t\t@return\t\t \t: 解密后的数据库路径、wxid（恒定为空字符串）、error\n\t*/\n\tfileInfo, err := os.Stat(dbPath)\n\tif err != nil {\n\t\treturn &DecryptResult{\"\", \"\", err.Error()}\n\t}\n\tif fileInfo.IsDir() {\n\t\treturn &DecryptResult{\"\", \"\", fmt.Sprintf(\"%s is not a file\", dbPath)}\n\t}\n\tfile, err := os.Open(dbPath)\n\tsavePath := dbPath + \"_dec\"\n\tdecFile, err := os.Create(savePath)\n\tif err != nil {\n\t\treturn &DecryptResult{\"\", \"\", fmt.Sprintf(\"打开文件%s失败：%v\", dbPath, err)}\n\t}\n\tdefer file.Close()\n\tdefer decFile.Close()\n\t// 每1024字节进行解密\n\tbuffer := make([]byte, 1024)\n\tchunkCount := 0\n\tfor {\n\t\t// 读取数据到缓冲区\n\t\t_, err := file.Read(buffer)\n\t\tif err != nil {\n\t\t\tif err != io.EOF {\n\t\t\t\treturn &DecryptResult{\"\", \"\", fmt.Sprintf(\"读取%s失败：%v\", dbPath, err)}\n\t\t\t}\n\t\t\tbreak\n\t\t}\n\t\tchunkCount++\n\t\tkey := utils.SHA1Hash(password)[:16]                                                    // 计算密钥，sha1的前16个字节\n\t\t_, err = decFile.Write(crypto.FromBytes(buffer).WithKey(key).RC4().Decrypt().ToBytes()) // 解密，写入数据\n\t\tif err != nil {\n\t\t\treturn &DecryptResult{\"\", \"\", fmt.Sprintf(\"解密失败：%v\", err)}\n\t\t}\n\t}\n\tdata, err := os.ReadFile(savePath)\n\tif err != nil {\n\t\treturn &DecryptResult{\"\", \"\", fmt.Sprintf(\"打开%s失败：%v\", savePath, err)}\n\t}\n\tif hex.EncodeToString(data[:16]) != hex.EncodeToString([]byte(\"SQLite format 3\\x00\")) { // 校验前16个字节\n\t\treturn &DecryptResult{\"\", \"\", \"解密失败，密钥不正确\"}\n\t}\n\treturn &DecryptResult{savePath, \"\", \"\"}\n}\n"
  },
  {
    "path": "analyzers/extractor/infoExtractAnalyzer.go",
    "content": "package extractor\n\nimport (\n\t\"ForensicsTool/analyzers/extractor/tool\"\n\t\"context\"\n\t\"fmt\"\n\t\"github.com/iancoleman/orderedmap\"\n)\n\ntype InfoExtractor struct {\n\tctx context.Context\n}\n\nfunc NewInfoExtractor() *InfoExtractor {\n\treturn &InfoExtractor{}\n}\n\ntype ExtractResult struct {\n\tData []map[string]string `json:\"data\"`\n\tErr  string              `json:\"err\"`\n}\n\ntype ExtractMapResult struct {\n\tData *orderedmap.OrderedMap `json:\"data\"`\n\tErr  string                 `json:\"err\"`\n}\n\nfunc (p *InfoExtractor) InitCtx(ctx context.Context) {\n\tp.ctx = ctx\n}\n\nfunc (p *InfoExtractor) ExtractXShell(folder, sid string) *ExtractMapResult {\n\t/*\n\t\t@param folder:\t配置文件目录\n\t\t@param sid:\t\t用户的用户名+sid\n\t\t@return:\t\t解析结果\n\t*/\n\tinfo, err := tool.AnalyzeXshell(folder, sid)\n\tif err != nil {\n\t\treturn &ExtractMapResult{nil, fmt.Sprintf(\"解析失败：%v\", err)}\n\t}\n\treturn &ExtractMapResult{info, \"\"}\n}\n\nfunc (p *InfoExtractor) ExtractNavicat(refPath string) *ExtractMapResult {\n\t/*\n\t\t@param\trefPath:\tNTUSER.DAT注册表文件路径\n\t\t@return:\t\t\t解析结果\n\t*/\n\tinfo, err := tool.AnalyzeNavicat(refPath)\n\tif err != nil {\n\t\treturn &ExtractMapResult{nil, fmt.Sprintf(\"解析失败：%v\", err)}\n\t}\n\treturn &ExtractMapResult{info, \"\"}\n}\n\nfunc (p *InfoExtractor) ExtractMobaXterm(filePath, masterPwd string) *ExtractMapResult {\n\t/*\n\t\t@param\tfilePath:\t注册表或配置文件路径\n\t\t@param\tmasterPwd:\t主密码\n\t\t@return:\t\t\t解析结果\n\t*/\n\tinfo, err := tool.AnalyzeMobaXterm(filePath, masterPwd)\n\tif err != nil {\n\t\treturn &ExtractMapResult{nil, fmt.Sprintf(\"解析失败：%v\", err)}\n\t}\n\treturn &ExtractMapResult{info, \"\"}\n}\n\nfunc (p *InfoExtractor) ExtractDbeaver(folder string) *ExtractMapResult {\n\t/*\n\t\t@param\tfolder:\t包含credentials-config.json和data-sources.json的文件夹\n\t\t@return:\t\t解析结果\n\t*/\n\tinfo, err := tool.AnalyzeDbeaver(folder)\n\tif err != nil {\n\t\treturn &ExtractMapResult{nil, fmt.Sprintf(\"解析失败：%v\", err)}\n\t}\n\treturn &ExtractMapResult{info, \"\"}\n}\n\nfunc (p *InfoExtractor) ExtractFinalShell(folder string) *ExtractMapResult {\n\t/*\n\t\t@param\tfolder:\t包含连接信息的文件夹\n\t\t@return:\t\t解析结果\n\t*/\n\tinfo, err := tool.AnalyzeFinalShell(folder)\n\tif err != nil {\n\t\treturn &ExtractMapResult{nil, fmt.Sprintf(\"解析失败：%v\", err)}\n\t}\n\treturn &ExtractMapResult{info, \"\"}\n}\n\nfunc (p *InfoExtractor) ExtractHawk2(filePath, pwd string) *ExtractMapResult {\n\t/*\n\t\t@param\tfilePath:\tHawk2.xml的文件路径\n\t\t@param\tpwd:\t\tcipher_key，保存在crypto.KEY_256.xml或crypto.KEY_128.xml中\n\t\t@return:\t\t\t解析结果\n\t*/\n\tinfo, err := tool.AnalyzeHawk2(filePath, pwd)\n\tif err != nil {\n\t\treturn &ExtractMapResult{nil, fmt.Sprintf(\"解析失败：%v\", err)}\n\t}\n\treturn &ExtractMapResult{info, \"\"}\n}\n\nfunc (p *InfoExtractor) ExtractMetaMask(filePath string) *ExtractMapResult {\n\t/*\n\t\t@param\tfilePath:\tpersist-root文件路径\n\t\t@return:\t\t\t解析结果\n\t*/\n\tinfo, err := tool.AnalyzeMetaMask(filePath)\n\tif err != nil {\n\t\treturn &ExtractMapResult{nil, fmt.Sprintf(\"解析失败：%v\", err)}\n\t}\n\treturn &ExtractMapResult{info, \"\"}\n}\n"
  },
  {
    "path": "analyzers/extractor/tool/dbeaverTool.go",
    "content": "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\"\n\t\"github.com/donnie4w/go-logger/logger\"\n\t\"github.com/iancoleman/orderedmap\"\n\t\"github.com/tidwall/gjson\"\n)\n\nconst (\n\tdbeaverDecryptKey = \"babb4a9f774ab853c96c2d653dfe544a\"\n\tdbeaverDecryptIV  = \"00000000000000000000000000000000\"\n)\n\nfunc decryptDbeaver(encFileData []byte) []byte {\n\t/*\n\t\t@param\tencFileData\t:\tcredentials-config.json文件的二进制数据\n\t\t@return\t\t\t\t:\t解密后的结果\n\t*/\n\tkey, err := hex.DecodeString(dbeaverDecryptKey)\n\tif err != nil {\n\t\treturn nil\n\t}\n\tiv, err := hex.DecodeString(dbeaverDecryptIV)\n\tif err != nil {\n\t\treturn nil\n\t}\n\treturn crypto.FromBytes(encFileData).WithKey(key).WithIv(iv).Aes().CBC().PKCS7Padding().Decrypt().ToBytes()[16:]\n}\n\nfunc AnalyzeDbeaver(folder string) (*orderedmap.OrderedMap, error) {\n\tresult := orderedmap.New()\n\tresult.SetEscapeHTML(false)\n\tvar tmp []*orderedmap.OrderedMap\n\tvar pwdJson gjson.Result\n\tvar conJson gjson.Result\n\tfileInfo, err := os.Stat(folder)\n\tif err != nil {\n\t\treturn nil, err\n\t}\n\tif !fileInfo.IsDir() {\n\t\tlogger.Errorf(\"%s is not a folder\", folder)\n\t\treturn nil, fmt.Errorf(\"%s is not a folder\", folder)\n\t}\n\terr = filepath.Walk(folder, func(path string, info os.FileInfo, err error) error {\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\t\tif info.IsDir() {\n\t\t\treturn nil\n\t\t}\n\t\tfilename := info.Name()\n\t\tif filename == \"credentials-config.json\" {\n\t\t\tencData, err := os.ReadFile(path)\n\t\t\tif err != nil {\n\t\t\t\tlogger.Errorf(\"read %s failed: %v\", path, err)\n\t\t\t\treturn err\n\t\t\t}\n\t\t\tdecData := decryptDbeaver(encData)\n\t\t\tpwdJson = gjson.Parse(string(decData))\n\t\t}\n\t\tif filename == \"data-sources.json\" {\n\t\t\tconData, err := os.ReadFile(path)\n\t\t\tif err != nil {\n\t\t\t\tlogger.Errorf(\"read %s failed: %v\", path, err)\n\t\t\t\treturn err\n\t\t\t}\n\t\t\tconJson = gjson.Parse(string(conData))\n\t\t}\n\t\treturn nil\n\t})\n\tif err != nil {\n\t\treturn nil, err\n\t}\n\tchildren := conJson.Get(\"connections\")\n\tif !children.Exists() {\n\t\tlogger.Errorf(\"data-sources.json is empty\")\n\t\treturn nil, fmt.Errorf(\"data-sources.json is empty\")\n\t}\n\tchildren.ForEach(func(key, value gjson.Result) bool {\n\t\tinfo := orderedmap.New()\n\t\tinfo.SetEscapeHTML(false)\n\t\tinfo.Set(\"数据库类型\", value.Get(\"provider\").String())\n\t\tinfo.Set(\"连接名\", value.Get(\"name\").String())\n\t\tinfo.Set(\"地址\", value.Get(\"configuration\").Get(\"host\").String())\n\t\tinfo.Set(\"端口\", value.Get(\"configuration\").Get(\"port\").String())\n\t\tinfo.Set(\"数据库名\", value.Get(\"configuration\").Get(\"database\").String())\n\t\tinfo.Set(\"账户\", pwdJson.Get(key.String()).Get(\"#connection\").Get(\"user\").String())\n\t\tinfo.Set(\"密码\", pwdJson.Get(key.String()).Get(\"#connection\").Get(\"password\").String())\n\t\ttmp = append(tmp, info)\n\t\treturn true\n\t})\n\tresult.Set(\"DBeaver连接信息\", tmp)\n\treturn result, nil\n}\n"
  },
  {
    "path": "analyzers/extractor/tool/finalshellTool.go",
    "content": "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\"strings\"\n\n\t\"github.com/deatil/go-cryptobin/cryptobin/crypto\"\n\t\"github.com/donnie4w/go-logger/logger\"\n\t\"github.com/iancoleman/orderedmap\"\n\t\"github.com/tidwall/gjson\"\n)\n\nfunc randomKey(head []byte) []byte {\n\t/*\t使用Java的随机算法生成key\n\t\t@param\thead:\t加密数据的前8字节\n\t\t@return:\t\t生成的key\n\t*/\n\tks := int64(3680984568597093857) / int64(NewJavaRandom(int64(head[5])).NextInt(127))\n\trandom := NewJavaRandom(ks)\n\tt := int(head[0])\n\tfor i := 0; i < t; i++ {\n\t\trandom.NextInt64()\n\t}\n\tn := random.NextInt64()\n\tr2 := NewJavaRandom(n)\n\tld := []int64{int64(head[4]), r2.NextInt64(), int64(head[7]), int64(head[3]), r2.NextInt64(), int64(head[1]), random.NextInt64(), int64(head[2])}\n\tbuf := new(bytes.Buffer)\n\terr := binary.Write(buf, binary.BigEndian, ld)\n\tif err != nil {\n\t\tlogger.Errorf(\"binary.Write failed: %v\", err)\n\t\treturn nil\n\t}\n\tkeyData := calMd5(buf.Bytes())\n\treturn keyData[:8]\n}\n\nfunc calMd5(data []byte) []byte {\n\th := md5.New()\n\th.Write(data)\n\treturn h.Sum(nil)\n}\n\nfunc decryptFinalShell(encData string) string {\n\t/*\n\t\t@param\tencData:\t加密的密文\n\t\t@return:\t\t\t解密结果\n\t*/\n\tencBytes, err := base64.StdEncoding.DecodeString(encData)\n\tif err != nil {\n\t\treturn \"\"\n\t}\n\tif encData == \"\" {\n\t\treturn \"\"\n\t}\n\treturn crypto.FromBytes(encBytes[8:]).WithKey(randomKey(encBytes[:8])).Des().ECB().PKCS5Padding().Decrypt().ToString()\n}\n\nfunc AnalyzeFinalShell(folder string) (*orderedmap.OrderedMap, error) {\n\t/*\n\t\t@param\tfolder:\t保存连接配置的文件夹路径\n\t\t@return:\t\t解析结果、错误\n\t*/\n\tresult := orderedmap.New()\n\tresult.SetEscapeHTML(false)\n\tvar tmp []*orderedmap.OrderedMap\n\tvar conJson gjson.Result\n\tfileInfo, err := os.Stat(folder)\n\tif err != nil {\n\t\treturn nil, err\n\t}\n\tif !fileInfo.IsDir() {\n\t\treturn nil, fmt.Errorf(\"%s is not a folder\", folder)\n\t}\n\terr = filepath.Walk(folder, func(path string, info os.FileInfo, err error) error {\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\t\tif info.IsDir() {\n\t\t\treturn nil\n\t\t}\n\t\tfilename := info.Name()\n\t\tif strings.HasSuffix(filename, \"_connect_config.json\") {\n\t\t\tconData, err := os.ReadFile(path)\n\t\t\tif err != nil {\n\t\t\t\treturn err\n\t\t\t}\n\t\t\tconJson = gjson.Parse(string(conData))\n\t\t\tjson := orderedmap.New()\n\t\t\tjson.SetEscapeHTML(false)\n\t\t\tjson.Set(\"连接名\", conJson.Get(\"name\").String())\n\t\t\tjson.Set(\"地址\", conJson.Get(\"host\").String())\n\t\t\tjson.Set(\"端口\", conJson.Get(\"port\").String())\n\t\t\tjson.Set(\"用户名\", conJson.Get(\"user_name\").String())\n\t\t\tjson.Set(\"密码\", decryptFinalShell(conJson.Get(\"password\").String()))\n\t\t\ttmp = append(tmp, json)\n\t\t} else if strings.HasSuffix(filename, \".json\") {\n\t\t\tconData, err := os.ReadFile(path)\n\t\t\tif err != nil {\n\t\t\t\treturn err\n\t\t\t}\n\t\t\tconJson = gjson.Parse(string(conData))\n\t\t\tjson := orderedmap.New()\n\t\t\tjson.SetEscapeHTML(false)\n\t\t\tjson.Set(\"连接名\", strings.Replace(filename, \".json\", \"\", -1))\n\t\t\tjson.Set(\"地址\", conJson.Get(\"host\").String())\n\t\t\tjson.Set(\"端口\", conJson.Get(\"port\").String())\n\t\t\tjson.Set(\"用户名\", conJson.Get(\"user_name\").String())\n\t\t\tjson.Set(\"密码\", decryptFinalShell(conJson.Get(\"password\").String()))\n\t\t\ttmp = append(tmp, json)\n\t\t}\n\t\treturn nil\n\t})\n\tif err != nil {\n\t\treturn nil, err\n\t}\n\tresult.Set(\"FinalShell连接信息\", tmp)\n\treturn result, nil\n}\n"
  },
  {
    "path": "analyzers/extractor/tool/hawkTool.go",
    "content": "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-cryptobin/cryptobin/crypto\"\n\t\"github.com/donnie4w/go-logger/logger\"\n\t\"github.com/iancoleman/orderedmap\"\n)\n\nfunc decryptHawk(encData, entity, pwd string) string {\n\t/*\n\t\t@param\tencData:\t文件中的##0V@后的值\n\t\t@param\tentity:\t\t密文对应的属性命名\n\t\t@param\tpwd:\t\tcipher_key，保存在crypto.KEY_256.xml或crypto.KEY_128.xml中\n\t\t@return:\t\t\t解密结果\n\t*/\n\tpwdBytes, err := base64.StdEncoding.DecodeString(pwd)\n\tvar data []byte\n\tif err != nil {\n\t\treturn \"\"\n\t}\n\tencBytes, err := base64.StdEncoding.DecodeString(encData)\n\tif err != nil {\n\t\treturn \"\"\n\t}\n\tiv := encBytes[2:14]\n\ttag := encBytes[len(encBytes)-16:]\n\tdata = append(data, encBytes[:2][:]...)\n\tdata = append(data, []byte(entity)[:]...)\n\tencDataBytes := encBytes[14:]\n\treturn crypto.FromBytes(encDataBytes).WithKey(pwdBytes).WithIv(iv).GCMWithTagSize(len(tag), data).Decrypt().ToString()\n}\n\nfunc AnalyzeHawk2(filePath, pwd string) (*orderedmap.OrderedMap, error) {\n\t/*\n\t\t@param\tfilePath:\tHawk2.xml的文件路径\n\t\t@param\tpwd:\t\tcipher_key，保存在crypto.KEY_256.xml或crypto.KEY_128.xml中\n\t\t@return:\t\t\t解析结果、错误\n\t*/\n\tfileInfo, err := os.Stat(filePath)\n\tif err != nil {\n\t\treturn nil, err\n\t}\n\tif fileInfo.IsDir() {\n\t\tlogger.Errorf(\"%s is not a file\", filePath)\n\t\treturn nil, fmt.Errorf(\"%s is not a file\", filePath)\n\t}\n\tresult := orderedmap.New()\n\tresult.SetEscapeHTML(false)\n\tvar tmp []*orderedmap.OrderedMap\n\tdoc := etree.NewDocument()\n\tif err = doc.ReadFromFile(filePath); err != nil {\n\t\treturn nil, err\n\t}\n\troot := doc.Root()\n\tfor _, element := range root.ChildElements() {\n\t\tentity := element.SelectAttr(\"name\").Value\n\t\tif strings.Contains(element.Text(), \"##0V@\") {\n\t\t\tinfo := orderedmap.New()\n\t\t\tinfo.SetEscapeHTML(false)\n\t\t\tencData := strings.Split(element.Text(), \"##0V@\")[1]\n\t\t\tinfo.Set(\"键\", entity)\n\t\t\tinfo.Set(\"值\", decryptHawk(encData, entity, pwd))\n\t\t\ttmp = append(tmp, info)\n\t\t}\n\t}\n\tresult.Set(\"Hawk2解析\", tmp)\n\treturn result, nil\n}\n"
  },
  {
    "path": "analyzers/extractor/tool/javaRandom.go",
    "content": "package tool\n\nimport \"github.com/donnie4w/go-logger/logger\"\n\n// JavaRandom 模拟Java的Random类\ntype JavaRandom struct {\n\tseed int64\n}\n\nfunc NewJavaRandom(seed int64) *JavaRandom {\n\treturn &JavaRandom{seed: (seed ^ 0x5DEECE66D) & ((1 << 48) - 1)}\n}\n\nfunc (r *JavaRandom) next(bits int) int32 {\n\tr.seed = (r.seed*0x5DEECE66D + 0xB) & ((1 << 48) - 1)\n\treturn int32(r.seed >> (48 - bits))\n}\n\nfunc (r *JavaRandom) NextInt64() int64 {\n\treturn int64(r.next(32))<<32 + int64(r.next(32))\n}\n\nfunc (r *JavaRandom) NextInt(n int) int {\n\tif n <= 0 {\n\t\tlogger.Errorf(\"n must be positive\")\n\t\tpanic(\"n must be positive\")\n\t}\n\n\t// 等同于Java的Random.nextInt(n)实现\n\tif (n & -n) == n { // n是2的幂\n\t\treturn int((int64(n) * int64(r.next(31))) >> 31)\n\t}\n\n\tvar bits, val int32\n\tfor {\n\t\tbits = r.next(31)\n\t\tval = bits % int32(n)\n\t\tif bits-val+(int32(n)-1) >= 0 {\n\t\t\tbreak\n\t\t}\n\t}\n\treturn int(val)\n}\n"
  },
  {
    "path": "analyzers/extractor/tool/metamaskTool.go",
    "content": "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\"github.com/iancoleman/orderedmap\"\n\t\"github.com/tidwall/gjson\"\n)\n\nfunc AnalyzeMetaMask(filePath string) (*orderedmap.OrderedMap, error) {\n\t/*\n\t\t@param\tfilePath:\tpersist-root文件\n\t\t@return:\t\t\t解析结果、错误\n\t*/\n\tfileInfo, err := os.Stat(filePath)\n\tif err != nil {\n\t\treturn nil, err\n\t}\n\tif fileInfo.IsDir() {\n\t\tlogger.Errorf(\"%s is not a file\", filePath)\n\t\treturn nil, fmt.Errorf(\"%s is not a file\", filePath)\n\t}\n\tresult := orderedmap.New()\n\tresult.SetEscapeHTML(false)\n\tvar walletInfoList []*orderedmap.OrderedMap\n\tvar contactInfoList []*orderedmap.OrderedMap\n\tvar transactionInfoList []*orderedmap.OrderedMap\n\tvar browserHistoryList []*orderedmap.OrderedMap\n\tdata, err := os.ReadFile(filePath)\n\tif err != nil {\n\t\treturn nil, err\n\t}\n\tjson := gjson.ParseBytes(data)\n\tif json.Get(\"engine\").Exists() {\n\t\tengine := json.Get(\"engine\")\n\t\tbrowser := json.Get(\"browser\")\n\t\tfor _, arr := range engine.Get(\"backgroundState.AccountTrackerController.accounts\").Array() {\n\t\t\twalletInfo := orderedmap.New()\n\t\t\twalletInfo.SetEscapeHTML(false)\n\t\t\ts := engine.Get(fmt.Sprintf(\"backgroundState.PreferencesController.identities.%s.importTime\", arr.String())).Int()\n\t\t\t//t := time.UnixMicro(s)\n\t\t\t//importTime := t.Format(\"2006-01-02 15:04:05\")\n\t\t\timportTime := utils.DefaultTimestampToDatetime(s, \"\", \"\")\n\t\t\tbalance, err := strconv.ParseInt(engine.Get(fmt.Sprintf(\"backgroundState.AccountTrackerController.accounts.%s.balance\", arr.String())).String(), 16, 64)\n\t\t\tif err != nil {\n\t\t\t\tlog.Println(err)\n\t\t\t\tcontinue\n\t\t\t}\n\t\t\twalletInfo.Set(\"添加时间\", importTime)\n\t\t\twalletInfo.Set(\"钱包名称\", engine.Get(fmt.Sprintf(\"backgroundState.PreferencesController.identities.%s.name\", arr)).String())\n\t\t\twalletInfo.Set(\"钱包地址\", arr.String())\n\t\t\twalletInfo.Set(\"余额（ETH）\", strconv.FormatInt(balance/(10^18), 10))\n\t\t\twalletInfoList = append(walletInfoList, walletInfo)\n\t\t}\n\t\tfor _, contactId := range engine.Get(\"backgroundState.AccountTrackerController.addressBook\").Array() {\n\t\t\tfor _, contact := range contactId.Get(contactId.String()).Array() {\n\t\t\t\tcontactInfo := orderedmap.New()\n\t\t\t\tcontactInfo.SetEscapeHTML(false)\n\t\t\t\tcontactInfo.Set(\"账户名\", contact.Get(\"name\").String())\n\t\t\t\tcontactInfo.Set(\"钱包地址\", contact.Get(\"address\").String())\n\t\t\t\tcontactInfoList = append(contactInfoList, contactInfo)\n\t\t\t}\n\t\t}\n\t\tfor _, transaction := range engine.Get(\"backgroundState.TransactionController.transactions\").Array() {\n\t\t\ttransactionInfo := orderedmap.New()\n\t\t\ttransactionInfo.SetEscapeHTML(false)\n\t\t\ts := transaction.Get(\"time\").Int()\n\t\t\t//t := time.UnixMicro(s)\n\t\t\ttransactionTime := utils.DefaultTimestampToDatetime(s, \"\", \"\")\n\t\t\tvalue, err := strconv.ParseInt(transaction.Get(\"txParams.value\").String(), 16, 64)\n\t\t\tif err != nil {\n\t\t\t\tlog.Println(err)\n\t\t\t\tcontinue\n\t\t\t}\n\t\t\ttransactionValue := value / (10 ^ 18)\n\t\t\ttransactionInfo.Set(\"交易时间\", transactionTime)\n\t\t\ttransactionInfo.Set(\"发送方\", transaction.Get(\"txParams.from\").String())\n\t\t\ttransactionInfo.Set(\"接收方\", transaction.Get(\"txParams.to\").String())\n\t\t\ttransactionInfo.Set(\"交易金额（ETH）\", strconv.FormatInt(transactionValue, 10))\n\t\t\ttransactionInfo.Set(\"交易哈希\", transaction.Get(\"hash\").String())\n\t\t\ttransactionInfo.Set(\"错误\", transaction.Get(\"error\").String())\n\t\t\ttransactionInfoList = append(transactionInfoList, transactionInfo)\n\t\t}\n\t\tfor _, history := range browser.Get(\"history\").Array() {\n\t\t\thistoryInfo := orderedmap.New()\n\t\t\thistoryInfo.SetEscapeHTML(false)\n\t\t\thistoryInfo.Set(\"名称\", history.Get(\"name\").String())\n\t\t\thistoryInfo.Set(\"URL\", history.Get(\"url\").String())\n\t\t\tbrowserHistoryList = append(browserHistoryList, historyInfo)\n\t\t}\n\t\tresult.Set(\"钱包信息\", walletInfoList)\n\t\tresult.Set(\"账户信息\", contactInfoList)\n\t\tresult.Set(\"交易信息\", transactionInfoList)\n\t\tresult.Set(\"浏览历史\", browserHistoryList)\n\t}\n\treturn result, nil\n}\n"
  },
  {
    "path": "analyzers/extractor/tool/mobaTool.go",
    "content": "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.com/deatil/go-cryptobin/cryptobin/crypto\"\n\t\"github.com/donnie4w/go-logger/logger\"\n\t\"github.com/iancoleman/orderedmap\"\n\t\"golang.org/x/text/encoding/simplifiedchinese\"\n)\n\nfunc decryptMoba(ciphertext, masterPasswd string) string {\n\thasher := sha512.New()\n\thasher.Write([]byte(masterPasswd))\n\tpwd := hasher.Sum(nil)[:32]\n\tiv := crypto.FromHexString(strings.Repeat(\"00\", aes.BlockSize)).WithKey(pwd).Aes().ECB().Encrypt().ToBytes()\n\treturn crypto.FromBase64String(ciphertext).WithKey(pwd).WithIv(iv).Aes().CFB8().Decrypt().ToString()\n}\n\nfunc getEncFromIni(file string) ([]string, []string, error) {\n\t/*\n\t\t@param file\t:\tMobaXterm.ini配置文件路径\n\t\t@return\t\t:\t密码列表、凭据列表、错误\n\t*/\n\tcontent, err := os.ReadFile(file)\n\tif err != nil {\n\t\tlogger.Errorf(\"failed to read ini file: %v\", err)\n\t\treturn nil, nil, fmt.Errorf(\"failed to read ini file: %v\", err)\n\t}\n\n\tdecoder := simplifiedchinese.GBK.NewDecoder()\n\tutf8Content, err := decoder.Bytes(content)\n\tif err != nil {\n\t\tlogger.Errorf(\"failed to convert encoding: %v\", err)\n\t\treturn nil, nil, fmt.Errorf(\"failed to convert encoding: %v\", err)\n\t}\n\n\tlines := strings.Split(string(utf8Content), \"\\n\")\n\n\tvar passwords []string\n\tvar credentials []string\n\n\tinPasswords := false\n\tinCredentials := false\n\n\tfor _, line := range lines {\n\t\tline = strings.TrimSpace(line)\n\t\tswitch line {\n\t\tcase \"[Passwords]\":\n\t\t\tinPasswords = true\n\t\t\tinCredentials = false\n\t\t\tcontinue\n\t\tcase \"[Credentials]\":\n\t\t\tinCredentials = true\n\t\t\tinPasswords = false\n\t\t\tcontinue\n\t\tcase \"\":\n\t\t\tinPasswords = false\n\t\t\tinCredentials = false\n\t\t\tcontinue\n\t\t}\n\t\tif inPasswords {\n\t\t\tpasswords = append(passwords, line)\n\t\t}\n\t\tif inCredentials {\n\t\t\tcredentials = append(credentials, line)\n\t\t}\n\t}\n\treturn passwords, credentials, nil\n}\n\nfunc getPwdOrCredential(reg *registry.Key, path string) ([]string, error) {\n\t/*\n\t\t@param reg\t:\t注册表实例\n\t\t@param path\t:\tkey路径\n\t\t@return\t\t:\t提取的数据列表，错误\n\t*/\n\tvar data []string\n\tnameKey, err := reg.OpenSubKey(path)\n\tif err != nil {\n\t\tlogger.Errorf(\"未找到保存的凭据或是密码: %v\", err)\n\t\treturn nil, fmt.Errorf(\"未找到保存的凭据或是密码: %v\", err)\n\t}\n\tdefer nameKey.Close()\n\tnames, err := nameKey.ReadValueNames(-1)\n\tif err != nil {\n\t\tlogger.Errorf(\"failed to read registry key: %v\", err)\n\t\treturn nil, fmt.Errorf(\"failed to read registry key: %v\", err)\n\t}\n\tfor _, name := range names {\n\t\tvalue, _, err := nameKey.GetStringValue(name)\n\t\tif err != nil {\n\t\t\tlogger.Errorf(\"failed to get string value: %v\", err)\n\t\t\tcontinue\n\t\t}\n\t\tdata = append(data, fmt.Sprintf(\"%s=%s\", name, value))\n\t}\n\treturn data, nil\n}\n\nfunc getEncFromRegistry(file string) ([]string, []string, error) {\n\t/*\n\t\t@param file\t:\tNTUSER.DAT配置文件路径\n\t\t@return\t\t:\t密码列表、凭据列表、错误\n\t*/\n\treg, err := registry.Open(file)\n\tif err != nil {\n\t\tlogger.Errorf(\"failed to open registry file: %v\", err)\n\t\treturn nil, nil, fmt.Errorf(\"failed to open registry file: %v\", err)\n\t}\n\tdefer reg.Close()\n\trootKey, err := reg.OpenKey(\"Software\\\\Mobatek\\\\MobaXterm\")\n\tif err != nil {\n\t\tlogger.Errorf(\"failed to open registry key: %v\", err)\n\t\treturn nil, nil, fmt.Errorf(\"failed to open registry key: %v\", err)\n\t}\n\tdefer rootKey.Close()\n\tpasswords, _ := getPwdOrCredential(&rootKey, \"P\") //这俩的错误不处理\n\tcredentials, _ := getPwdOrCredential(&rootKey, \"C\")\n\treturn passwords, credentials, nil\n}\n\nfunc AnalyzeMobaXterm(file, masterPasswd string) (*orderedmap.OrderedMap, error) {\n\t/*\n\t\t@param\tfile:\t配置文件或注册表文件\n\t\t@return:\t\t解析结果、错误\n\t*/\n\tfileInfo, err := os.Stat(file)\n\tif err != nil {\n\t\treturn nil, err\n\t}\n\tif fileInfo.IsDir() {\n\t\tlogger.Errorf(\"%s is not a file\", file)\n\t\treturn nil, fmt.Errorf(\"%s is not a file\", file)\n\t}\n\tresult := orderedmap.New()\n\tresult.SetEscapeHTML(false)\n\tvar passwords []string\n\tvar credentials []string\n\tif strings.HasSuffix(file, \".ini\") {\n\t\tpasswords, credentials, err = getEncFromIni(file)\n\t\tif err != nil {\n\t\t\tlogger.Errorf(\"failed to get passwords from ini file: %v\", err)\n\t\t\treturn nil, err\n\t\t}\n\t} else {\n\t\tpasswords, credentials, err = getEncFromRegistry(file)\n\t\tif err != nil {\n\t\t\tlogger.Errorf(\"failed to get passwords from registry file: %v\", err)\n\t\t\treturn nil, err\n\t\t}\n\t}\n\tvar passwordList []*orderedmap.OrderedMap\n\tfor _, password := range passwords {\n\t\tinfo := orderedmap.New()\n\t\tinfo.SetEscapeHTML(false)\n\t\tfirst := \"\"\n\t\tif strings.Contains(password, \":\") {\n\t\t\tfirstSp := strings.Split(password, \":\")\n\t\t\tfirst = firstSp[0]\n\t\t}\n\t\tidx := strings.Index(password, \"=\")\n\t\tserver := password[len(first)+1 : idx]\n\t\tpwd := decryptMoba(password[idx+1:], masterPasswd)\n\t\tinfo.Set(\"协议与端口\", first)\n\t\tinfo.Set(\"连接账户与地址\", server)\n\t\tinfo.Set(\"保存的密码\", pwd)\n\t\tpasswordList = append(passwordList, info)\n\t}\n\tvar credentialList []*orderedmap.OrderedMap\n\tfor _, credential := range credentials {\n\t\tinfo := orderedmap.New()\n\t\tinfo.SetEscapeHTML(false)\n\t\tuser := \"\"\n\t\tencPwd := \"\"\n\t\tidx := strings.Index(credential, \"=\")\n\t\tserver := credential[:idx]\n\t\tif strings.Contains(credential[idx+1:], \":\") {\n\t\t\tuser = strings.Split(credential[idx+1:], \":\")[0]\n\t\t\tencPwd = strings.Split(credential[idx+1:], \":\")[1]\n\t\t}\n\t\tpwd := decryptMoba(encPwd, masterPasswd)\n\t\tinfo.Set(\"凭据名\", server)\n\t\tinfo.Set(\"用户名\", user)\n\t\tinfo.Set(\"保存的密码\", pwd)\n\t\tcredentialList = append(credentialList, info)\n\t}\n\tresult.Set(\"密码信息\", passwordList)\n\tresult.Set(\"凭据信息\", credentialList)\n\treturn result, nil\n}\n"
  },
  {
    "path": "analyzers/extractor/tool/navicatTool.go",
    "content": "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\"github.com/deatil/go-cryptobin/cryptobin/crypto\"\n\t\"github.com/donnie4w/go-logger/logger\"\n\t\"github.com/iancoleman/orderedmap\"\n\t\"golang.org/x/crypto/blowfish\"\n)\n\nconst (\n\tNavicat11KEY = \"3DC5CA39\"\n\tNavicat12KEY = \"libcckeylibcckey\"\n\tNavicat12IV  = \"libcciv libcciv \"\n)\n\n// Navicat11Cipher 用于 Navicat 11 版本的解密\ntype Navicat11Cipher struct {\n\tkey []byte\n\tiv  []byte\n}\n\nfunc NewNavicat11Cipher(userKey string) (*Navicat11Cipher, error) {\n\tif userKey == \"\" {\n\t\tuserKey = Navicat11KEY\n\t}\n\n\t// 初始化密钥\n\thasher := sha1.New()\n\thasher.Write([]byte(userKey))\n\tkey := hasher.Sum(nil) // Blowfish 需要 4-56 字节的密钥\n\n\t// 初始化 IV\n\tiv, err := hex.DecodeString(\"FFFFFFFFFFFFFFFF\")\n\tif err != nil {\n\t\treturn nil, err\n\t}\n\tencryptedIV := crypto.FromBytes(iv).WithKey(key).Blowfish().ECB().Encrypt().ToBytes()\n\n\treturn &Navicat11Cipher{\n\t\tkey: key,\n\t\tiv:  encryptedIV,\n\t}, nil\n}\n\nfunc (c *Navicat11Cipher) xorBytes(a, b []byte) []byte {\n\tresult := make([]byte, len(a))\n\tfor i := 0; i < len(a); i++ {\n\t\tresult[i] = a[i] ^ b[i]\n\t}\n\treturn result\n}\n\nfunc (c *Navicat11Cipher) Decrypt(data []byte) []byte {\n\toutData := make([]byte, len(data))\n\tcv := make([]byte, len(c.iv))\n\tcopy(cv, c.iv)\n\tblockSize := blowfish.BlockSize\n\tblocksLen := len(data) / blockSize\n\tleftLen := len(data) % blockSize\n\tfor i := 0; i < blocksLen; i++ {\n\t\tstart := i * blockSize\n\t\tend := start + blockSize\n\t\ttemp := data[start:end]\n\t\tdecrypted := crypto.FromBytes(temp).WithKey(c.key).Blowfish().ECB().Decrypt().ToBytes()\n\t\tdecrypted = c.xorBytes(decrypted, cv)\n\t\tcopy(outData[start:end], decrypted)\n\t\tfor j := 0; j < len(cv); j++ {\n\t\t\tcv[j] ^= data[start+j]\n\t\t}\n\t}\n\tif leftLen != 0 {\n\t\tencryptedCV := crypto.FromBytes(cv).WithKey(c.key).Blowfish().ECB().Encrypt().ToBytes()\n\t\tstart := blocksLen * blockSize\n\t\ttemp := data[start:]\n\t\ttemp = c.xorBytes(temp, encryptedCV[:leftLen])\n\t\tcopy(outData[start:], temp)\n\t}\n\n\treturn outData\n}\n\nfunc (c *Navicat11Cipher) DecryptString(hexStr string) (string, error) {\n\tdata, err := hex.DecodeString(hexStr)\n\tif err != nil {\n\t\treturn \"\", err\n\t}\n\tdecrypted := c.Decrypt(data)\n\treturn string(decrypted), nil\n}\n\n// Navicat12Cipher 用于 Navicat 12+ 版本的解密\ntype Navicat12Cipher struct {\n\taesKey []byte\n\taesIV  []byte\n}\n\nfunc NewNavicat12Cipher() *Navicat12Cipher {\n\treturn &Navicat12Cipher{\n\t\taesKey: []byte(Navicat12KEY),\n\t\taesIV:  []byte(Navicat12IV),\n\t}\n}\n\nfunc (c *Navicat12Cipher) DecryptString(ciphertext string) string {\n\treturn crypto.FromString(ciphertext).WithKey(c.aesKey).WithIv(c.aesIV).Aes().CBC().Decrypt().ToString()\n}\n\n// 解密密码封装函数\nfunc decryptNavicat(pwd string) string {\n\tif pwd == \"\" {\n\t\treturn \"\"\n\t}\n\n\t// 先尝试 Navicat 12+ 解密\n\tdec12 := NewNavicat12Cipher()\n\tresult := dec12.DecryptString(pwd)\n\tif utf8.ValidString(result) && result != \"\" {\n\t\treturn result\n\t}\n\t// 再尝试 Navicat 11 解密\n\tdec11, err := NewNavicat11Cipher(\"\")\n\tif err != nil {\n\t\tlogger.Errorf(\"failed to create navicat 11 cipher: %v\", err)\n\t\treturn \"\"\n\t}\n\tresult, err = dec11.DecryptString(pwd)\n\tif err == nil {\n\t\treturn result\n\t}\n\tlogger.Errorf(\"failed to decrypt navicat 11 password: %v\", err)\n\treturn \"\"\n}\n\nfunc isValueExist(arr []string, value string) bool {\n\tvalueMap := make(map[string]bool)\n\tfor _, v := range arr {\n\t\tvalueMap[v] = true\n\t}\n\t_, exist := valueMap[value]\n\treturn exist\n}\n\n// 获取 Navicat 连接信息\nfunc getNavicatConnections(reg *registry.Registry) (map[string]*registry.Key, error) {\n\n\trootKey, err := reg.OpenKey(\"Software\\\\PremiumSoft\")\n\tif err != nil {\n\t\tlogger.Errorf(\"failed to open registry key: %v\", err)\n\t\treturn nil, fmt.Errorf(\"failed to open registry key: %v\", err)\n\t}\n\n\tsubkeyNames, err := rootKey.ReadSubKeyNames(-1)\n\tif err != nil {\n\t\tlogger.Errorf(\"failed to read subkey names: %v\", err)\n\t\treturn nil, fmt.Errorf(\"failed to read subkey names: %v\", err)\n\t}\n\n\tconnections := make(map[string]*registry.Key)\n\tfor _, subkeyName := range subkeyNames {\n\t\tsubKey, err := rootKey.OpenSubKey(subkeyName)\n\t\tif err != nil {\n\t\t\tcontinue\n\t\t}\n\t\tnames, err := subKey.ReadSubKeyNames(-1)\n\t\tif err != nil {\n\t\t\tcontinue\n\t\t}\n\t\tif !isValueExist(names, \"Servers\") {\n\t\t\tcontinue\n\t\t}\n\t\tserversKey, err := subKey.OpenSubKey(\"Servers\")\n\t\tif err != nil {\n\t\t\tcontinue\n\t\t}\n\n\t\tconnections[subkeyName] = &serversKey\n\t}\n\n\treturn connections, nil\n}\n\n// 获取 MySQL 连接信息\nfunc getNormalDBInfo(serverKeys *registry.Key) (map[string]*orderedmap.OrderedMap, error) {\n\tinfo := make(map[string]*orderedmap.OrderedMap)\n\tconnections, err := serverKeys.ReadSubKeyNames(-1)\n\tif err != nil {\n\t\tlogger.Errorf(\"failed to read subkey names: %v\", err)\n\t\treturn nil, fmt.Errorf(\"failed to read subkey names: %v\", err)\n\t}\n\n\tfor _, connection := range connections {\n\t\tbasicInfo := orderedmap.New()\n\n\t\tbasicInfo.Set(\"连接名\", connection)\n\t\tkey, err := serverKeys.OpenSubKey(connection)\n\t\tif err != nil {\n\t\t\tlogger.Errorf(\"failed to open subkey: %v\", err)\n\t\t\tcontinue\n\t\t}\n\t\tif host, _, err := key.GetStringValue(\"Host\"); err == nil {\n\t\t\tbasicInfo.Set(\"地址\", host)\n\t\t}\n\t\tif port, _, err := key.GetIntegerValue(\"Port\"); err == nil {\n\t\t\tbasicInfo.Set(\"端口\", fmt.Sprintf(\"%d\", port))\n\t\t}\n\t\tif username, _, err := key.GetStringValue(\"UserName\"); err == nil {\n\t\t\tbasicInfo.Set(\"用户名\", username)\n\t\t}\n\t\tif pwd, _, err := key.GetStringValue(\"Pwd\"); err == nil {\n\t\t\tbasicInfo.Set(\"密码\", decryptNavicat(pwd))\n\t\t}\n\t\tif path, _, err := key.GetStringValue(\"QuerySavePath\"); err == nil {\n\t\t\tbasicInfo.Set(\"缓存路径\", path)\n\t\t}\n\t\tinfo[connection] = basicInfo\n\t}\n\n\treturn info, nil\n}\n\n// 获取 SQLServer 连接信息\nfunc getMSSQLInfo(serverKeys *registry.Key) (map[string]*orderedmap.OrderedMap, error) {\n\tinfo := make(map[string]*orderedmap.OrderedMap)\n\tconnections, err := serverKeys.ReadSubKeyNames(-1)\n\tif err != nil {\n\t\tlogger.Errorf(\"failed to read subkey names: %v\", err)\n\t\treturn nil, fmt.Errorf(\"failed to read subkey names: %v\", err)\n\t}\n\n\tfor _, connection := range connections {\n\t\tbasicInfo := orderedmap.New()\n\t\tbasicInfo.SetEscapeHTML(false)\n\t\tbasicInfo.Set(\"连接名\", connection)\n\t\tkey, err := serverKeys.OpenSubKey(connection)\n\t\tif err != nil {\n\t\t\tlogger.Errorf(\"failed to open subkey: %v\", err)\n\t\t\tcontinue\n\t\t}\n\t\tif host, _, err := key.GetStringValue(\"Host\"); err == nil {\n\t\t\tbasicInfo.Set(\"地址\", host)\n\t\t}\n\t\tif port, _, err := key.GetIntegerValue(\"Port\"); err == nil {\n\t\t\tbasicInfo.Set(\"端口\", fmt.Sprintf(\"%d\", port))\n\t\t}\n\t\tif username, _, err := key.GetStringValue(\"UserName\"); err == nil {\n\t\t\tbasicInfo.Set(\"用户名\", username)\n\t\t}\n\t\tif pwd, _, err := key.GetStringValue(\"Pwd\"); err == nil {\n\t\t\tbasicInfo.Set(\"密码\", decryptNavicat(pwd))\n\t\t}\n\t\tif path, _, err := key.GetStringValue(\"QuerySavePath\"); err == nil {\n\t\t\tbasicInfo.Set(\"缓存路径\", path)\n\t\t}\n\t\tif db, _, err := key.GetStringValue(\"InitialDatabase\"); err == nil {\n\t\t\tbasicInfo.Set(\"默认数据库\", db)\n\t\t}\n\t\tif auth, _, err := key.GetStringValue(\"MSSQLAuthenMode\"); err == nil {\n\t\t\tbasicInfo.Set(\"认证模式\", auth)\n\t\t}\n\t\tinfo[connection] = basicInfo\n\t}\n\treturn info, nil\n}\n\n// 获取SQLite数据\nfunc getSQLiteInfo(serverKeys *registry.Key) (map[string]*orderedmap.OrderedMap, error) {\n\tinfo := make(map[string]*orderedmap.OrderedMap)\n\tconnections, err := serverKeys.ReadSubKeyNames(-1)\n\tif err != nil {\n\t\tlogger.Errorf(\"failed to read subkey names: %v\", err)\n\t\treturn nil, fmt.Errorf(\"failed to read subkey names: %v\", err)\n\t}\n\n\tfor _, connection := range connections {\n\t\tbasicInfo := orderedmap.New()\n\t\tbasicInfo.SetEscapeHTML(false)\n\t\tbasicInfo.Set(\"连接名\", connection)\n\t\tkey, err := serverKeys.OpenSubKey(connection)\n\t\tif err != nil {\n\t\t\tlogger.Errorf(\"failed to open subkey: %v\", err)\n\t\t\tcontinue\n\t\t}\n\t\tif name, _, err := key.GetStringValue(\"DatabaseFileName\"); err == nil {\n\t\t\tbasicInfo.Set(\"文件名\", name)\n\t\t}\n\t\tif encrypted, _, err := key.GetIntegerValue(\"SQLiteEncrypted\"); err == nil {\n\t\t\tif encrypted == 1 {\n\t\t\t\tbasicInfo.Set(\"是否加密\", \"是\")\n\t\t\t} else {\n\t\t\t\tbasicInfo.Set(\"是否加密\", \"否\")\n\t\t\t}\n\t\t}\n\t\tif saved, _, err := key.GetStringValue(\"EncryptionSavePassword\"); err == nil {\n\t\t\tif saved == \"true\" {\n\t\t\t\tbasicInfo.Set(\"是否保存密码\", \"是\")\n\t\t\t} else {\n\t\t\t\tbasicInfo.Set(\"是否保存密码\", \"否\")\n\t\t\t}\n\t\t}\n\t\tif pwd, _, err := key.GetStringValue(\"EncryptionPassword\"); err == nil {\n\t\t\tbasicInfo.Set(\"密码\", decryptNavicat(pwd))\n\t\t}\n\t\tif path, _, err := key.GetStringValue(\"QuerySavePath\"); err == nil {\n\t\t\tbasicInfo.Set(\"缓存路径\", path)\n\t\t}\n\t\tif db, _, err := key.GetStringValue(\"InitialDatabase\"); err == nil {\n\t\t\tbasicInfo.Set(\"默认数据库\", db)\n\t\t}\n\t\tinfo[connection] = basicInfo\n\t}\n\treturn info, nil\n}\n\nfunc addRecords(result *orderedmap.OrderedMap, tType, tName string, connections map[string]*registry.Key) error {\n\tvar infoFunc func(serverKeys *registry.Key) (map[string]*orderedmap.OrderedMap, error)\n\tif keys, ok := connections[tType]; ok {\n\t\tswitch tType {\n\t\tcase \"Navicat\", \"NavicatMARIADB\", \"NavicatMongoDB\", \"NavicatOra\", \"NavicatPG\":\n\t\t\tinfoFunc = getNormalDBInfo\n\t\tcase \"NavicatMSSQL\":\n\t\t\tinfoFunc = getMSSQLInfo\n\t\tcase \"NavicatSQLite\":\n\t\t\tinfoFunc = getSQLiteInfo\n\t\t}\n\t\tinfo, err := infoFunc(keys)\n\t\tif err != nil {\n\t\t\tlogger.Errorf(\"failed to get %s info: %v\", tName, err)\n\t\t\treturn err\n\t\t}\n\t\tvar records []*orderedmap.OrderedMap\n\t\tfor _, i := range info {\n\t\t\trecords = append(records, i)\n\t\t}\n\t\tif len(records) > 0 {\n\t\t\tresult.Set(tName, records)\n\t\t}\n\t}\n\treturn nil\n}\n\n// 分析 Navicat 连接信息\nfunc AnalyzeNavicat(regPath string) (*orderedmap.OrderedMap, error) {\n\t/*\n\t\t@param\trefPath:\tNTUSER.DAT注册表文件路径\n\t\t@return:\t\t\t解析结果、错误\n\t*/\n\tfileInfo, err := os.Stat(regPath)\n\tif err != nil {\n\t\tlogger.Errorf(\"failed to stat file: %v\", err)\n\t\treturn nil, err\n\t}\n\tif fileInfo.IsDir() {\n\t\tlogger.Errorf(\"%s is not a file\", regPath)\n\t\treturn nil, fmt.Errorf(\"%s is not a file\", regPath)\n\t}\n\treg, err := registry.Open(regPath)\n\tif err != nil {\n\t\tlogger.Errorf(\"failed to open registry file: %v\", err)\n\t\treturn nil, err\n\t}\n\tdefer reg.Close()\n\tconnections, err := getNavicatConnections(&reg)\n\tif err != nil {\n\t\treturn nil, err\n\t}\n\tresult := orderedmap.New()\n\tresult.SetEscapeHTML(false)\n\terr = addRecords(result, \"Navicat\", \"MySQL连接信息\", connections)\n\tif err != nil {\n\t\treturn nil, err\n\t}\n\terr = addRecords(result, \"NavicatMARIADB\", \"MariaDB连接信息\", connections)\n\tif err != nil {\n\t\treturn nil, err\n\t}\n\terr = addRecords(result, \"NavicatMongoDB\", \"MongoDB连接信息\", connections)\n\tif err != nil {\n\t\treturn nil, err\n\t}\n\terr = addRecords(result, \"NavicatOra\", \"Oracle连接信息\", connections)\n\tif err != nil {\n\t\treturn nil, err\n\t}\n\terr = addRecords(result, \"NavicatPG\", \"PostgreSQL连接信息\", connections)\n\tif err != nil {\n\t\treturn nil, err\n\t}\n\terr = addRecords(result, \"NavicatMSSQL\", \"SQLServer连接信息\", connections)\n\tif err != nil {\n\t\treturn nil, err\n\t}\n\terr = addRecords(result, \"NavicatSQLite\", \"SQLite连接信息\", connections)\n\tif err != nil {\n\t\treturn nil, err\n\t}\n\terr = reg.Close()\n\tif err != nil {\n\t\treturn nil, err\n\t}\n\treturn result, nil\n}\n"
  },
  {
    "path": "analyzers/extractor/tool/xshellTool.go",
    "content": "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/filepath\"\n\t\"strings\"\n\n\t\"github.com/deatil/go-cryptobin/cryptobin/crypto\"\n\t\"github.com/donnie4w/go-logger/logger\"\n\t\"github.com/iancoleman/orderedmap\"\n\t\"gopkg.in/ini.v1\"\n)\n\nfunc decryptXShellStr(sid, encPwd string) (string, error) {\n\t/*\n\t\t低版本解密密文\n\t\t@param sid:用户的SID\n\t\t@param encPwd:\t密文\n\t\t@return 解密后的密码、错误\n\t*/\n\tdecoded, err := base64.StdEncoding.DecodeString(encPwd)\n\tif err != nil {\n\t\tlogger.Errorf(\"failed to decode base64 string: %v\", err)\n\t\treturn \"\", err\n\t}\n\tif len(decoded) < 32 {\n\t\tlogger.Errorf(\"invalid encrypted password length: %d\", len(decoded))\n\t\treturn \"\", errors.New(\"invalid encrypted password length\")\n\t}\n\tdata := decoded[:len(decoded)-32]\n\tchecksum := decoded[len(decoded)-32:]\n\n\t// 使用 SHA256 生成密钥\n\thasher := sha256.New()\n\thasher.Write([]byte(sid))\n\tkeyBytes := hasher.Sum(nil)\n\t// RC4 解密\n\tdecrypted := crypto.FromBytes(data).\n\t\tWithKey(keyBytes).\n\t\tRC4().\n\t\tDecrypt().\n\t\tToBytes()\n\n\t// 验证校验和\n\thasher = sha256.New()\n\thasher.Write(decrypted)\n\tcalculatedChecksum := hasher.Sum(nil)\n\tif hex.EncodeToString(calculatedChecksum) != hex.EncodeToString(checksum) {\n\t\tlogger.Errorf(\"checksum verification failed: expected %s, got %s\", hex.EncodeToString(checksum), hex.EncodeToString(calculatedChecksum))\n\t\treturn \"\", errors.New(\"checksum verification failed\")\n\t}\n\n\treturn string(decrypted), nil\n}\n\n// 反转字符串\nfunc reverseString(s string) string {\n\trunes := []rune(s)\n\tfor i, j := 0, len(runes)-1; i < j; i, j = i+1, j-1 {\n\t\trunes[i], runes[j] = runes[j], runes[i]\n\t}\n\treturn string(runes)\n}\n\nfunc decryptXShellStrNew(sid string, encPwd string) (string, error) {\n\t/*\n\t\t7.1以后解密密文\n\t\t@param sid:用户的SID\n\t\t@param encPwd:\t密文\n\t\t@return 解密后的密码、错误\n\t*/\n\tdecoded, err := base64.StdEncoding.DecodeString(encPwd)\n\tif err != nil {\n\t\tlogger.Errorf(\"failed to decode base64 string: %v\", err)\n\t\treturn \"\", err\n\t}\n\n\tif len(decoded) < 32 {\n\t\tlogger.Errorf(\"invalid encrypted password length: %d\", len(decoded))\n\t\treturn \"\", errors.New(\"invalid encrypted password length\")\n\t}\n\n\tdata := decoded[:len(decoded)-32]\n\tchecksum := decoded[len(decoded)-32:]\n\n\t// 处理 SID\n\tindex := strings.Index(sid, \"S-1-5\")\n\tif index == -1 {\n\t\tlogger.Errorf(\"invalid SID format: %s\", sid)\n\t\treturn \"\", errors.New(\"invalid SID format\")\n\t}\n\n\tusername := sid[:index]\n\tssid := sid[index:]\n\tkey := reverseString(reverseString(username) + ssid)\n\n\t// 使用 SHA256 生成密钥\n\thasher := sha256.New()\n\thasher.Write([]byte(key))\n\tkeyBytes := hasher.Sum(nil)\n\n\t// RC4 解密\n\tdecrypted := crypto.FromBytes(data).\n\t\tWithKey(keyBytes).\n\t\tRC4().\n\t\tDecrypt().\n\t\tToBytes()\n\t// 验证校验和\n\thasher = sha256.New()\n\thasher.Write(decrypted)\n\tcalculatedChecksum := hasher.Sum(nil)\n\n\tif hex.EncodeToString(calculatedChecksum) != hex.EncodeToString(checksum) {\n\t\tlogger.Errorf(\"checksum verification failed: expected %s, got %s\", hex.EncodeToString(checksum), hex.EncodeToString(calculatedChecksum))\n\t\treturn \"\", errors.New(\"checksum verification failed\")\n\t}\n\n\treturn string(decrypted), nil\n}\n\n// 预处理文件\nfunc preDeal(file string) (string, error) {\n\tdata, err := os.ReadFile(file)\n\tif err != nil {\n\t\tlogger.Errorf(\"failed to read file: %v\", err)\n\t\treturn \"\", err\n\t}\n\n\t// 替换特殊字符\n\tdata = bytes.ReplaceAll(data, []byte{0x00}, []byte{})\n\tdata = bytes.ReplaceAll(data, []byte{0xff}, []byte{})\n\tdata = bytes.ReplaceAll(data, []byte{0xfe}, []byte{})\n\n\tdealFile := file + \".deal\"\n\terr = os.WriteFile(dealFile, data, 0644)\n\tif err != nil {\n\t\tlogger.Errorf(\"failed to write file: %v\", err)\n\t\treturn \"\", err\n\t}\n\n\treturn dealFile, nil\n}\n\n// 删除临时文件\nfunc delDeal(file string) error {\n\treturn os.Remove(file)\n}\n\n// 分析 XShell/XFtp 配置文件\nfunc AnalyzeXshell(folder string, sid string) (*orderedmap.OrderedMap, error) {\n\t/*\n\t\t@param folder:\t配置文件目录\n\t\t@param sid:\t\t用户的用户名+sid\n\t\t@return:\t\t解析结果\n\t*/\n\tconns := orderedmap.New()\n\tconns.SetEscapeHTML(false)\n\tvar xsh []*orderedmap.OrderedMap\n\tvar xft []*orderedmap.OrderedMap\n\tfileInfo, err := os.Stat(folder)\n\tif err != nil {\n\t\tlogger.Errorf(\"failed to stat folder: %v\", err)\n\t\treturn nil, err\n\t}\n\tif !fileInfo.IsDir() {\n\t\tlogger.Errorf(\"%s is not a folder\", folder)\n\t\treturn nil, fmt.Errorf(\"%s is not a folder\", folder)\n\t}\n\terr = filepath.Walk(folder, func(path string, info os.FileInfo, err error) error {\n\t\tif err != nil {\n\t\t\tlogger.Errorf(\"failed to walk file: %v\", err)\n\t\t\treturn err\n\t\t}\n\n\t\tif info.IsDir() {\n\t\t\treturn nil\n\t\t}\n\n\t\tfilename := info.Name()\n\t\tif strings.HasSuffix(filename, \".xsh\") {\n\t\t\toriginFile := path\n\t\t\tdealFile, err := preDeal(originFile)\n\t\t\tif err != nil {\n\t\t\t\tlogger.Errorf(\"failed to preDeal file: %v\", err)\n\t\t\t\treturn err\n\t\t\t}\n\t\t\tdefer delDeal(dealFile)\n\n\t\t\tcfg, err := ini.LoadSources(ini.LoadOptions{\n\t\t\t\tAllowBooleanKeys: true,\n\t\t\t}, dealFile)\n\t\t\tif err != nil {\n\t\t\t\tlogger.Errorf(\"failed to load ini file: %v\", err)\n\t\t\t\treturn err\n\t\t\t}\n\n\t\t\tconn := orderedmap.New()\n\t\t\tconn.SetEscapeHTML(false)\n\t\t\tconn.Set(\"连接名\", strings.TrimSuffix(filename, \".xsh\"))\n\t\t\tconn.Set(\"地址\", cfg.Section(\"CONNECTION\").Key(\"Host\").String())\n\t\t\tconn.Set(\"端口\", cfg.Section(\"CONNECTION\").Key(\"Port\").String())\n\n\t\t\tversion := cfg.Section(\"SessionInfo\").Key(\"Version\").String()\n\t\t\tencPwd := cfg.Section(\"CONNECTION:AUTHENTICATION\").Key(\"Password\").String()\n\n\t\t\tvar pwd string\n\t\t\tif version != \"7.0\" && strings.HasPrefix(version, \"7.\") {\n\t\t\t\tpwd, err = decryptXShellStrNew(sid, encPwd)\n\t\t\t} else {\n\t\t\t\tpwd, err = decryptXShellStr(sid, encPwd)\n\t\t\t}\n\n\t\t\tif err == nil {\n\t\t\t\tconn.Set(\"密码\", pwd)\n\t\t\t} else {\n\t\t\t\tconn.Set(\"密码\", \"解密失败: \"+err.Error())\n\t\t\t}\n\n\t\t\tconn.Set(\"描述\", cfg.Section(\"CONNECTION\").Key(\"Description\").String())\n\t\t\txsh = append(xsh, conn)\n\t\t}\n\n\t\tif strings.HasSuffix(filename, \".xfp\") {\n\t\t\toriginFile := path\n\t\t\tdealFile, err := preDeal(originFile)\n\t\t\tif err != nil {\n\t\t\t\tlogger.Errorf(\"failed to preDeal file: %v\", err)\n\t\t\t\treturn err\n\t\t\t}\n\t\t\tdefer delDeal(dealFile)\n\n\t\t\tcfg, err := ini.LoadSources(ini.LoadOptions{\n\t\t\t\tAllowBooleanKeys: true,\n\t\t\t}, dealFile)\n\t\t\tif err != nil {\n\t\t\t\tlogger.Errorf(\"failed to load ini file: %v\", err)\n\t\t\t\treturn err\n\t\t\t}\n\n\t\t\tconn := orderedmap.New()\n\t\t\tconn.Set(\"连接名\", strings.TrimSuffix(filename, \".xfp\"))\n\t\t\tconn.Set(\"地址\", cfg.Section(\"Connection\").Key(\"Host\").String())\n\t\t\tconn.Set(\"端口\", cfg.Section(\"Connection\").Key(\"Port\").String())\n\n\t\t\tversion := cfg.Section(\"SessionInfo\").Key(\"Version\").String()\n\t\t\tencPwd := cfg.Section(\"Connection\").Key(\"Password\").String()\n\n\t\t\tvar pwd string\n\t\t\tif version != \"7.0\" && strings.HasPrefix(version, \"7.\") {\n\t\t\t\tpwd, err = decryptXShellStrNew(sid, encPwd)\n\t\t\t} else {\n\t\t\t\tpwd, err = decryptXShellStr(sid, encPwd)\n\t\t\t}\n\n\t\t\tif err == nil {\n\t\t\t\tconn.Set(\"密码\", pwd)\n\t\t\t} else {\n\t\t\t\tconn.Set(\"密码\", \"解密失败: \"+err.Error())\n\t\t\t}\n\n\t\t\tconn.Set(\"描述\", cfg.Section(\"Connection\").Key(\"Description\").String())\n\t\t\txft = append(xft, conn)\n\t\t}\n\t\treturn nil\n\t})\n\n\tif err != nil {\n\t\treturn nil, err\n\t}\n\tconns.Set(\"XShell\", xsh)\n\tconns.Set(\"XFtp\", xft)\n\n\treturn conns, nil\n}\n"
  },
  {
    "path": "analyzers/passwdCalc/passwdCalcAnalyzer.go",
    "content": "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\"\n\t\"fmt\"\n\t\"strconv\"\n\t\"strings\"\n\n\t\"github.com/deatil/go-cryptobin/cryptobin/crypto\"\n)\n\ntype PasswdCalc struct {\n\tctx context.Context\n}\n\nfunc NewPasswdCalc() *PasswdCalc {\n\treturn &PasswdCalc{}\n}\n\nfunc (p *PasswdCalc) InitCtx(ctx context.Context) {\n\tp.ctx = ctx\n}\n\nfunc (p *PasswdCalc) startup(ctx context.Context) {\n\tp.ctx = ctx\n}\n\nfunc unpad(ciphertext []byte) ([]byte, error) {\n\tlength := len(ciphertext)\n\tif length%aes.BlockSize != 0 {\n\t\treturn nil, errors.New(\"ciphertext block size is invalid\")\n\t}\n\tpadding := ciphertext[length-1]\n\tif int(padding) > length {\n\t\treturn nil, errors.New(\"padding is invalid\")\n\t}\n\treturn ciphertext[:length-int(padding)], nil\n}\n\nfunc decryptAES(token string, key, iv []byte) string {\n\treturn crypto.FromBase64String(token).\n\t\tAes().CBC().\n\t\tWithKey(key).WithIv(iv).\n\t\tDecrypt().ToString()\n}\n\nfunc (p *PasswdCalc) CalWechat(uin, imei string) string {\n\t/*\n\t\t@param uin: 用户id\n\t\t@param imei: 手机imei，传入空则默认为1234567890ABCDEF\n\t\t@return: 安卓微信EncMicroMsg.db的解密密钥\n\t*/\n\tif imei == \"\" {\n\t\timei = \"1234567890ABCDEF\"\n\t}\n\tpwd := utils.MD5HashHex(imei + uin)[:7]\n\treturn pwd\n}\n\nfunc (p *PasswdCalc) CalWechatIndex(uin, wxid, imei string) string {\n\t/*\n\t\t\t@param uin: 用户id\n\t\t\t@param imei: 手机imei，传入空则默认为1234567890ABCDEF\n\t\t    @param wxid: 微信用户的内部wxid\n\t\t\t@return: 安卓微信EncMicroMsg.db的解密密钥\n\t*/\n\tif imei == \"\" {\n\t\timei = \"1234567890ABCDEF\"\n\t}\n\tatoi, err := strconv.Atoi(uin)\n\tif err != nil {\n\t\treturn \"\"\n\t}\n\tif atoi < 0 {\n\t\tatoi += 4294967296\n\t}\n\tuin = strconv.Itoa(atoi)\n\treturn utils.MD5HashHex(uin + imei + wxid)[:7]\n}\n\nfunc (p *PasswdCalc) CalWildFire(token string) []string {\n\t/*\n\t\t@param token: 野火IM系应用的用户token，在应用目录下shared_prefs/config.xml中的token的值\n\t\t@return: data的解密密钥\n\t*/\n\t// 新版本密钥\n\tkey, _ := hex.DecodeString(\"001122334455667778797A7B7C7D7E7F\")\n\tiv := key\n\t// 旧版本密钥\n\tkey2, _ := hex.DecodeString(\"7F7E7D7C7B7A79787766554433221100\")\n\tiv2 := key2\n\tpwd := decryptAES(token, key, iv)\n\tflag := \"使用SQLCipher4进行解密\"\n\tif pwd == \"\" {\n\t\tpwd = decryptAES(token, key2, iv2)\n\t\tif pwd == \"\" {\n\t\t\treturn []string{\"解密失败\", \"\"}\n\t\t}\n\t\tflag = \"使用SQLCipher3进行解密\"\n\t}\n\tparts := strings.Split(pwd, \"|\")\n\tif len(parts) > 0 {\n\t\tpwd = parts[len(parts)-1]\n\t}\n\treturn []string{pwd, flag}\n}\n\nfunc (p *PasswdCalc) CalMostone(uid string) []string {\n\t/*\n\t\t@param uid: 默往的用户uid，在shared_prefs/im.xml中的userId的值\n\t\t@return: 默往数据库msg.db的解密密钥\n\t*/\n\thash := utils.MD5HashHex(uid)\n\tret := strings.ToUpper(hash[:6])\n\treturn []string{ret, \"使用SQLCipher3进行解密\"}\n}\n\nfunc (p *PasswdCalc) CalTiktok(uid string) []string {\n\t/*\n\t\t@param uid: 抖音的用户uid，一般在数据库文件名中就有\n\t\t@return: 抖音数据库的解密密钥\n\t*/\n\ten := fmt.Sprintf(\"byte%simwcdb%sdance\", uid, uid)\n\treturn []string{en, \"使用wcdb进行解密\"}\n}\n\nfunc longToBytes(uid int64) []byte {\n\tbytes := make([]byte, 8)\n\tbinary.BigEndian.PutUint64(bytes, uint64(uid))\n\treturn bytes\n}\n\nfunc (p *PasswdCalc) CalBatChat(uid string) []string {\n\t/*\n\t\t * @param uid: 用户id，数据库名中的数字\n\t\t\t@return: 蝙蝠聊天数据库的解密密钥\n\t*/\n\tlong_uid, err := strconv.ParseInt(uid, 10, 64)\n\tif err != nil {\n\t\treturn []string{\"\", \"uid不合法，应该是一串数字！\"}\n\t}\n\tsd := -1756908916\n\tseed := uint32(sd)\n\txxhash32_result := utils.XXHash32(longToBytes(long_uid), seed)\n\tfmt.Println(xxhash32_result)\n\tpwd := utils.MD5HashHex(string(rune(xxhash32_result)) + uid)\n\treturn []string{strings.ToUpper(pwd), \"使用wcdb进行解密\"}\n}\n"
  },
  {
    "path": "analyzers/reader/fileReader.go",
    "content": "package reader\n\nimport (\n\t\"ForensicsTool/analyzers/reader/readers\"\n\t\"context\"\n\n\t\"github.com/iancoleman/orderedmap\"\n)\n\ntype FileReader struct {\n\tctx context.Context\n}\n\nfunc NewFileReader() *FileReader {\n\treturn &FileReader{}\n}\n\ntype ReadMapResult struct {\n\tData *orderedmap.OrderedMap `json:\"data\"`\n\tErr  string                 `json:\"err\"`\n}\n\nfunc (p *FileReader) InitCtx(ctx context.Context) {\n\tp.ctx = ctx\n}\n\nfunc (p *FileReader) ReadLevelDB(path string) *ReadMapResult {\n\tresult, err := readers.LevelDBReader(path)\n\tif err != nil {\n\t\treturn &ReadMapResult{nil, err.Error()}\n\t}\n\treturn &ReadMapResult{result, \"\"}\n}\n\nfunc (p *FileReader) ReadMMKV(path, password string) *ReadMapResult {\n\tresult, err := readers.MMKVReader(path, password)\n\tif err != nil {\n\t\treturn &ReadMapResult{nil, err.Error()}\n\t}\n\treturn &ReadMapResult{result, \"\"}\n}\n"
  },
  {
    "path": "analyzers/reader/readers/leveldbReader.go",
    "content": "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\"\n\t\"github.com/syndtr/goleveldb/leveldb\"\n)\n\nfunc formatBytes(data []byte) string {\n\tvar builder strings.Builder\n\tbuilder.WriteString(\"b'\")\n\tfor _, b := range data {\n\t\tif b >= 32 && b <= 126 { // 可打印的 ASCII 字符\n\t\t\tbuilder.WriteByte(b)\n\t\t} else {\n\t\t\tbuilder.WriteString(fmt.Sprintf(\"\\\\x%02x\", b)) // 不可打印字符转为 \\x 形式\n\t\t}\n\t}\n\tbuilder.WriteString(\"'\")\n\treturn builder.String()\n}\n\nfunc LevelDBReader(dbPath string) (*orderedmap.OrderedMap, error) {\n\tdb, err := leveldb.OpenFile(dbPath, nil)\n\tif err != nil || db == nil {\n\t\tlogger.Errorf(\"【leveldb】数据库打开失败:%v\", err)\n\t\treturn nil, err\n\t}\n\titer := db.NewIterator(nil, nil)\n\tresult := orderedmap.New()\n\tresult.SetEscapeHTML(false)\n\tvar tmp []*orderedmap.OrderedMap\n\tfor iter.Next() {\n\t\t// Remember that the contents of the returned slice should not be modified, and\n\t\t// only valid until the next call to Next.\n\t\tkey := iter.Key()\n\t\tvalue := iter.Value()\n\t\tinfo := orderedmap.New()\n\t\tinfo.SetEscapeHTML(false)\n\t\tinfo.Set(\"键\", formatBytes(key))\n\t\tinfo.Set(\"值\", formatBytes(value))\n\t\ttmp = append(tmp, info)\n\t}\n\titer.Release()\n\tdefer db.Close()\n\tresult.Set(\"leveldbReader\", tmp)\n\treturn result, err\n}\n"
  },
  {
    "path": "analyzers/reader/readers/mmkvReader.go",
    "content": "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-mmkv\"\n\t\"github.com/donnie4w/go-logger/logger\"\n\t\"github.com/iancoleman/orderedmap\"\n)\n\nfunc MMKVReader(path, password string) (*orderedmap.OrderedMap, error) {\n\tfileInfo, err := os.Stat(path)\n\tif err != nil {\n\t\tif os.IsNotExist(err) {\n\t\t\tlogger.Errorf(\"【mmkvReader】文件不存在\")\n\t\t} else {\n\t\t\tlogger.Errorf(\"【mmkvReader】文件读取失败\")\n\t\t}\n\t\treturn nil, err\n\t}\n\tfileMode := fileInfo.Mode()\n\tdirPath := path\n\tfiles := []string{}\n\tswitch {\n\tcase fileMode.IsDir():\n\t\tlogger.Infof(\"【mmkvReader】传入的%s是目录\", path)\n\t\tfiles = getDirFiles(path)\n\tcase fileMode.IsRegular():\n\t\tlogger.Infof(\"【mmkvReader】传入的%s是文件\", path)\n\t\tdirPath = filepath.Dir(path)\n\t\tfiles = append(files, filepath.Base(path))\n\tdefault:\n\t\tlogger.Errorf(\"【mmkvReader】文件%s类型错误\", path)\n\t\treturn nil, errors.New(\"文件类型错误\")\n\t}\n\tresult := orderedmap.New()\n\tresult.SetEscapeHTML(false)\n\tmr, err := go_mmkv.NewManager(dirPath)\n\tif err != nil {\n\t\tlogger.Errorf(\"【mmkvReader】打开目录%s失败\", dirPath)\n\t\treturn nil, err\n\t}\n\tvar openErr error\n\tfor _, mmkvFile := range files {\n\t\tvar tmp []*orderedmap.OrderedMap\n\t\tvar vault go_mmkv.Vault\n\t\tif password == \"\" {\n\t\t\tvault, openErr = mr.OpenVault(mmkvFile)\n\t\t} else {\n\t\t\tvault, openErr = mr.OpenVaultCrypto(mmkvFile, password)\n\t\t}\n\t\tif openErr != nil {\n\t\t\tlogger.Errorf(\"【mmkvReader】打开文件%s失败：%v\", mmkvFile, openErr)\n\t\t\tcontinue\n\t\t}\n\t\tfor _, key := range vault.Keys() {\n\t\t\tinfo := orderedmap.New()\n\t\t\tinfo.SetEscapeHTML(false)\n\t\t\tinfo.Set(\"键\", key)\n\t\t\tvarData, err := vault.GetVarint(key)\n\t\t\tinfo.Set(\"VARINT\", varData)\n\t\t\tbytesData, err := vault.GetBytes(key)\n\t\t\tif err != nil {\n\t\t\t\tlogger.Errorf(\"【mmkvReader】获取%s的bytes数据失败：%v\", key, err)\n\t\t\t\tinfo.Set(\"BYTES\", \"\")\n\t\t\t} else if len(bytesData) > 0 {\n\t\t\t\tinfo.Set(\"BYTES\", hex.EncodeToString(bytesData))\n\t\t\t} else {\n\t\t\t\tinfo.Set(\"BYTES\", \"\")\n\t\t\t}\n\t\t\tstringData, err := vault.GetString(key)\n\t\t\tif err != nil {\n\t\t\t\tlogger.Errorf(\"【mmkvReader】获取%s的string数据失败：%v\", key, err)\n\t\t\t\tinfo.Set(\"STRING\", \"\")\n\t\t\t} else {\n\t\t\t\tinfo.Set(\"STRING\", stringData)\n\t\t\t}\n\t\t\ttmp = append(tmp, info)\n\t\t}\n\n\t\tresult.Set(mmkvFile, tmp)\n\t}\n\treturn result, openErr\n}\n\nfunc getDirFiles(path string) []string {\n\tfiles, err := os.ReadDir(path)\n\tif err != nil {\n\t\tlogger.Errorf(\"【mmkvReader】读取目录%s失败\", path)\n\t\treturn []string{}\n\t}\n\tvar fileNames []string\n\tfor _, file := range files {\n\t\tif strings.HasSuffix(file.Name(), \".crc\") {\n\t\t\tfileNames = append(fileNames, strings.ReplaceAll(file.Name(), \".crc\", \"\"))\n\t\t}\n\t}\n\treturn fileNames\n}\n"
  },
  {
    "path": "analyzers/winreg/structs/domainAccountF.go",
    "content": "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/logger\"\n\t\"github.com/ghostiam/binstruct\"\n)\n\ntype DomainAccountF struct {\n\tRevision                 uint32\n\t_                        uint32\n\tCreationTime             string `bin:\"ParseWindowsFileTimestamp\"`\n\tDomainModifiedCount      uint64\n\tMaxPwdAge                string `bin:\"ParseWindowsFileTimestamp\"`\n\tMinPwdAge                string `bin:\"ParseWindowsFileTimestamp\"`\n\tForceLogOff              string `bin:\"ParseWindowsFileTimestamp\"`\n\tLockOutDuration          uint64\n\tLockOutObservationWindow uint64\n\t_                        uint64\n\tNextRid                  uint32\n\tPwdProperties            uint32\n\tMinPwdLength             uint16\n\tPwdHistoryLength         uint16\n\tLockoutTreshold          uint16\n\t_                        uint16\n\tServerState              uint32\n\tServerRole               uint16\n\tUasCompatibilityReq      uint16\n\t_                        uint64\n\tKey0                     interface{} `bin:\"ParseSamKeyData\"`\n}\n\ntype SamKeyData struct {\n\tRevision uint32\n\tLength   uint32\n\tSalt     []byte `bin:\"len:16\"`\n\tKey      []byte `bin:\"len:16\"`\n\tCheckSum []byte `bin:\"len:16\"`\n\tReserved uint64\n}\n\nfunc getSamKeyData(binData []byte) *SamKeyData {\n\tvar samKeyData SamKeyData\n\tdecoder := binstruct.NewDecoder(bytes.NewReader(binData), binary.LittleEndian)\n\terr := decoder.Decode(&samKeyData)\n\tif err != nil {\n\t\tlogger.Error(\"解析SamKeyData失败:\", err)\n\t\treturn nil\n\t}\n\treturn &samKeyData\n}\n\ntype SamKeyDataAes struct {\n\tRevision       uint32\n\tLength         uint32\n\tCheckSumLength uint32\n\tDataLength     uint32\n\tSalt           []byte `bin:\"len:16\"`\n\tData           []byte `bin:\"len:DataLength\"`\n}\n\nfunc getSamKeyDataAes(binData []byte) *SamKeyDataAes {\n\tvar samKeyDataAes SamKeyDataAes\n\tdecoder := binstruct.NewDecoder(bytes.NewReader(binData), binary.LittleEndian)\n\terr := decoder.Decode(&samKeyDataAes)\n\tif err != nil {\n\t\tlogger.Error(\"解析SamKeyDataAes失败:\", err)\n\t\treturn nil\n\t}\n\treturn &samKeyDataAes\n}\n\nfunc (*DomainAccountF) ParseWindowsFileTimestamp(r binstruct.Reader) (string, error) {\n\tts, err := r.ReadUint64()\n\tif err != nil {\n\t\tlogger.Error(\"读取Windows文件时间戳失败:\", err)\n\t\treturn \"\", err\n\t}\n\treturn utils.WindowsFileTimeToDatetime(ts, \"\", \"\"), nil\n}\n\nfunc (d *DomainAccountF) ParseSamKeyData(r binstruct.Reader) (interface{}, error) {\n\tmarker, err := r.Peek(1)\n\tif err != nil {\n\t\tlogger.Error(\"读取SamKeyData标记失败:\", err)\n\t\treturn nil, err\n\t}\n\tdata, err := r.ReadAll()\n\tif err != nil {\n\t\tlogger.Error(\"读取SamKeyData数据失败:\", err)\n\t\treturn nil, err\n\t}\n\tswitch marker[0] {\n\tcase byte(1):\n\t\treturn getSamKeyData(data), nil\n\tcase byte(2):\n\t\treturn getSamKeyDataAes(data), nil\n\t}\n\tlogger.Error(\"无效的SamKeyData标记:\", marker[0])\n\treturn nil, fmt.Errorf(\"invalid marker\")\n}\n\nfunc GetDomainAccountF(binData []byte) *DomainAccountF {\n\tvar domainAccountF DomainAccountF\n\tdecoder := binstruct.NewDecoder(bytes.NewReader(binData), binary.LittleEndian)\n\terr := decoder.Decode(&domainAccountF)\n\tif err != nil {\n\t\tlogger.Error(\"解析DomainAccountF失败:\", err)\n\t\treturn nil\n\t}\n\treturn &domainAccountF\n}\n"
  },
  {
    "path": "analyzers/winreg/structs/domainAccountV.go",
    "content": "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/ghostiam/binstruct\"\n)\n\ntype DomainAccountV struct {\n\t_        []byte `bin:\"len:408\"`\n\tDomainID uint32\n\tSID1     uint32\n\tSID2     uint32\n\tSID3     uint32\n}\n\nfunc GetMachineSid(binData []byte) string {\n\tvar domainAccountV DomainAccountV\n\tdecoder := binstruct.NewDecoder(bytes.NewReader(binData), binary.LittleEndian)\n\terr := decoder.Decode(&domainAccountV)\n\tif err != nil {\n\t\tlogger.Error(\"解析DomainAccountV失败:\", err)\n\t\treturn \"\"\n\t}\n\treturn fmt.Sprintf(\"S-1-5-%v-%v-%v-%v\", domainAccountV.DomainID, domainAccountV.SID1, domainAccountV.SID2, domainAccountV.SID3)\n}\n"
  },
  {
    "path": "analyzers/winreg/structs/nthash.go",
    "content": "package structs\n\nimport (\n\t\"ForensicsTool/utils\"\n\t\"bytes\"\n\t\"encoding/hex\"\n\t\"github.com/deatil/go-cryptobin/cryptobin/crypto\"\n)\n\n/*\n解密逻辑和结构体详见https://github.com/skelsec/pypykatz\n*/\n\nfunc uint32To4BytesLittleEndian(i uint32) []byte {\n\t/*\n\t\t小端序转换\n\t*/\n\tbuf := new(bytes.Buffer)\n\tbuf.WriteByte(byte(i))\n\tbuf.WriteByte(byte(i >> 8))\n\tbuf.WriteByte(byte(i >> 16))\n\tbuf.WriteByte(byte(i >> 24))\n\treturn buf.Bytes()\n}\n\nfunc expandDESKey(key []byte) []byte {\n\t// 确保密钥长度为7字节，不足补0\n\tif len(key) < 7 {\n\t\tpadded := make([]byte, 7)\n\t\tcopy(padded, key)\n\t\tkey = padded\n\t} else {\n\t\tkey = key[:7]\n\t}\n\n\tvar result []byte\n\n\t// 第一字节\n\tb := ((key[0] >> 1) & 0x7f) << 1\n\tresult = append(result, b)\n\n\t// 第二字节\n\tb = ((key[0]&0x01)<<6 | (key[1]>>2)&0x3f) << 1\n\tresult = append(result, b)\n\n\t// 第三字节\n\tb = ((key[1]&0x03)<<5 | (key[2]>>3)&0x1f) << 1\n\tresult = append(result, b)\n\n\t// 第四字节\n\tb = ((key[2]&0x07)<<4 | (key[3]>>4)&0x0f) << 1\n\tresult = append(result, b)\n\n\t// 第五字节\n\tb = ((key[3]&0x0f)<<3 | (key[4]>>5)&0x07) << 1\n\tresult = append(result, b)\n\n\t// 第六字节\n\tb = ((key[4]&0x1f)<<2 | (key[5]>>6)&0x03) << 1\n\tresult = append(result, b)\n\n\t// 第七字节\n\tb = ((key[5]&0x3f)<<1 | (key[6]>>7)&0x01) << 1\n\tresult = append(result, b)\n\n\t// 第八字节\n\tb = (key[6] & 0x7f) << 1\n\tresult = append(result, b)\n\n\treturn result\n}\n\nfunc rid2Key(rid uint32) ([]byte, []byte) {\n\tkey := uint32To4BytesLittleEndian(rid)\n\tkey1 := []byte{key[0], key[1], key[2], key[3], key[0], key[1], key[2]}\n\tkey2 := []byte{key[3], key[0], key[1], key[2], key[3], key[0], key[1]}\n\treturn expandDESKey(key1), expandDESKey(key2)\n}\n\nfunc GetHBootKey(key0 interface{}, bootKey []byte) []byte {\n\tQWERTY := []byte(\"!@#$%^&*()qwertyUIOPAzxcvbnmQQQQQQQQQQQQ)(*@&%\\x00\")\n\tDIGITS := []byte(\"0123456789012345678901234567890123456789\\x00\")\n\tswitch key0.(type) {\n\tcase *SamKeyData:\n\t\tkey := key0.(*SamKeyData)\n\t\tbuf := new(bytes.Buffer)\n\t\tbuf.Write(key.Salt)\n\t\tbuf.Write(QWERTY)\n\t\tbuf.Write(bootKey)\n\t\tbuf.Write(DIGITS)\n\t\trc4Key := utils.MD5Hash(buf.Bytes())\n\t\tbuf = new(bytes.Buffer)\n\t\tbuf.Write(key.Key)\n\t\tbuf.Write(key.CheckSum)\n\t\thashedBootKey := crypto.FromBytes(buf.Bytes()).WithKey(rc4Key).RC4().Decrypt().ToBytes()\n\t\tbuf = new(bytes.Buffer)\n\t\tbuf.Write(hashedBootKey[:16])\n\t\tbuf.Write(DIGITS)\n\t\tbuf.Write(hashedBootKey[:16])\n\t\tbuf.Write(QWERTY)\n\t\tchecksum := utils.MD5Hash(buf.Bytes())\n\t\tif hex.EncodeToString(hashedBootKey[16:]) != hex.EncodeToString(checksum) {\n\t\t\treturn nil\n\t\t}\n\t\treturn hashedBootKey\n\tcase *SamKeyDataAes:\n\t\tkey := key0.(*SamKeyDataAes)\n\t\thashedBootKey := new(bytes.Buffer)\n\t\tconst n = 16\n\t\tvar blocks [][]byte\n\t\tfor i := 0; i < len(key.Data); i += n {\n\t\t\tblocks = append(blocks, key.Data[i:i+n])\n\t\t}\n\t\tfor _, block := range blocks {\n\t\t\thashedBootKey.Write(\n\t\t\t\tcrypto.FromBytes(block).WithKey(bootKey).WithIv(key.Salt).Aes().CBC().NoPadding().Decrypt().ToBytes())\n\t\t}\n\t\treturn hashedBootKey.Bytes()\n\t}\n\treturn nil\n}\n\nconst (\n\tNTHASH    = 0\n\tLMHASH    = 1\n\tNTDEFAULT = \"31d6cfe0d16ae931b73c59d7e0c089c0\"\n\tLMDEFAULT = \"aad3b435b51404eeaad3b435b51404ee\"\n)\n\nfunc DecryptHash(hashedBootKey []byte, rid uint32, hash interface{}, hashType int) string {\n\tNTPASSWORD := []byte(\"NTPASSWORD\\x00\")\n\tLMPASSWORD := []byte(\"LMPASSWORD\\x00\")\n\tvar constant []byte\n\tdefaultHash := \"\"\n\tvar key []byte\n\tswitch hashType {\n\tcase NTHASH:\n\t\tconstant = NTPASSWORD\n\t\tdefaultHash = NTDEFAULT\n\tcase LMHASH:\n\t\tconstant = LMPASSWORD\n\t\tdefaultHash = LMDEFAULT\n\t}\n\tkey1, key2 := rid2Key(rid)\n\tswitch hash.(type) {\n\tcase *SAMHash:\n\t\tsamHash := hash.(*SAMHash)\n\t\tif len(samHash.Hash) == 0 {\n\t\t\treturn defaultHash\n\t\t}\n\t\tbuf := new(bytes.Buffer)\n\t\tbuf.Write(hashedBootKey[:16])\n\t\tbuf.Write(uint32To4BytesLittleEndian(rid))\n\t\tbuf.Write(constant)\n\t\trc4Key := utils.MD5Hash(buf.Bytes())\n\t\tkey = crypto.FromBytes(samHash.Hash).WithKey(rc4Key).RC4().Encrypt().ToBytes()\n\tcase *SAMHashAes:\n\t\tsamHashAes := hash.(*SAMHashAes)\n\t\tif len(samHashAes.Data) == 0 {\n\t\t\treturn defaultHash\n\t\t}\n\t\tkeyTmp := new(bytes.Buffer)\n\t\tconst n = 16\n\t\tvar blocks [][]byte\n\t\tfor i := 0; i < len(samHashAes.Data); i += n {\n\t\t\tblocks = append(blocks, samHashAes.Data[i:i+n])\n\t\t}\n\t\tfor _, block := range blocks {\n\t\t\tkeyTmp.Write(\n\t\t\t\tcrypto.FromBytes(block).WithKey(hashedBootKey[:16]).WithIv(samHashAes.Salt).Aes().NoPadding().CBC().Decrypt().ToBytes())\n\t\t}\n\t\tkey = keyTmp.Bytes()[:16]\n\t}\n\thash1 := crypto.FromBytes(key[:8]).WithKey(key1).Des().NoPadding().Decrypt().ToBytes()\n\thash2 := crypto.FromBytes(key[8:]).WithKey(key2).Des().NoPadding().Decrypt().ToBytes()\n\treturn hex.EncodeToString(hash1) + hex.EncodeToString(hash2)\n}\n"
  },
  {
    "path": "analyzers/winreg/structs/userF.go",
    "content": "package structs\n\nimport (\n\t\"ForensicsTool/utils\"\n\t\"bytes\"\n\t\"encoding/binary\"\n\t\"github.com/ghostiam/binstruct\"\n)\n\n// UserF _是暂时不知道含义的字段\ntype UserF struct {\n\t_                   []byte `bin:\"len:8\"`\n\tLastLoginTime       string `bin:\"ParseWindowsFileTimestamp\"`\n\t_                   []byte `bin:\"len:8\"`\n\tLastPwdChangeTime   string `bin:\"ParseWindowsFileTimestamp\"`\n\t_                   []byte `bin:\"len:8\"`\n\tLastFailedLoginTime string `bin:\"ParseWindowsFileTimestamp\"`\n\tRID                 uint32\n\t_                   []byte `bin:\"len:4\"`\n\tUserAttribute       uint32\n\t_                   []byte `bin:\"len:4\"`\n\tLogonCount          int16\n\tInValidLoginCount   int16\n\t_                   []byte `bin:\"len:12\"`\n}\n\n// ParseWindowsFileTimestamp 会在解码的时候被调用\nfunc (*UserF) ParseWindowsFileTimestamp(r binstruct.Reader) (string, error) {\n\tts, err := r.ReadUint64()\n\tif err != nil {\n\t\treturn \"\", err\n\t}\n\treturn utils.WindowsFileTimeToDatetime(ts, \"\", \"\"), nil\n}\n\nfunc GetUserF(binData []byte) *UserF {\n\tvar userF UserF\n\tdecoder := binstruct.NewDecoder(bytes.NewReader(binData), binary.LittleEndian)\n\terr := decoder.Decode(&userF)\n\tif err != nil {\n\t\treturn nil\n\t}\n\treturn &userF\n}\n"
  },
  {
    "path": "analyzers/winreg/structs/userV.go",
    "content": "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\"io\"\n)\n\ntype UserV struct {\n\t_                    []byte `bin:\"len:12\"`\n\tNameOffset           uint32\n\tNameLength           uint32\n\t_                    uint32\n\tFullNameOffset       uint32\n\tFullNameLength       uint32\n\t_                    uint32\n\tCommentOffset        uint32\n\tCommentLength        uint32\n\t_                    uint32\n\tUserCommentOffset    uint32\n\tUserCommentLength    uint32\n\t_                    uint32\n\t_                    []byte `bin:\"len:12\"`\n\tHomeDirOffset        uint32\n\tHomeDirLength        uint32\n\t_                    uint32\n\tHomeDirConnectOffset uint32\n\tHomeDirConnectLength uint32\n\t_                    uint32\n\tScriptPathOffset     uint32\n\tScriptPathLength     uint32\n\t_                    uint32\n\tProfilePathOffset    uint32\n\tProfilePathLength    uint32\n\t_                    uint32\n\tWorkstationsOffset   uint32\n\tWorkstationsLength   uint32\n\t_                    uint32\n\tHoursAllowedOffset   uint32\n\tHoursAllowedLength   uint32\n\t_                    uint32\n\t_                    []byte `bin:\"len:12\"`\n\tLMHashOffset         uint32\n\tLMHashLength         uint32\n\t_                    uint32\n\tNTHashOffset         uint32\n\tNTHashLength         uint32\n\t_                    uint32\n\t_                    []byte      `bin:\"len:24\"`\n\tName                 string      `bin:\"ParseName\"`\n\tFullName             string      `bin:\"ParseFullName\"`\n\tComment              string      `bin:\"ParseComment\"`\n\tUserComment          string      `bin:\"ParseUserComment\"`\n\tHomeDir              string      `bin:\"ParseHomeDir\"`\n\tHomeDirConnect       string      `bin:\"ParseHomeDirConnect\"`\n\tScriptPath           string      `bin:\"ParseScriptPath\"`\n\tProfilePath          string      `bin:\"ParseProfilePath\"`\n\tWorkstations         string      `bin:\"ParseWorkstations\"`\n\tHoursAllowed         string      `bin:\"ParseHoursAllowed\"`\n\tLMHash               interface{} `bin:\"ParseLMHash\"`\n\tNTHash               interface{} `bin:\"ParseNTHash\"`\n}\n\ntype SAMHash struct {\n\tPekID    uint16\n\tRevision uint16\n\tHash     []byte `bin:\"len:16\"`\n}\n\nfunc getSAMHash(binData []byte) *SAMHash {\n\tvar samHash SAMHash\n\tdecoder := binstruct.NewDecoder(bytes.NewReader(binData), binary.LittleEndian)\n\terr := decoder.Decode(&samHash)\n\tif err != nil {\n\t\treturn nil\n\t}\n\treturn &samHash\n}\n\ntype SAMHashAes struct {\n\tPekID      uint16\n\tRevision   uint16\n\tDataOffset uint32\n\tSalt       []byte `bin:\"len:16\"`\n\tData       []byte `bin:\"ParseData\"`\n}\n\nfunc (s *SAMHashAes) ParseData(r binstruct.Reader) ([]byte, error) {\n\tbinData, err := r.ReadAll()\n\tif err != nil {\n\t\treturn nil, err\n\t}\n\treturn binData, nil\n}\n\nfunc getSAMHashAes(binData []byte) *SAMHashAes {\n\tvar samHashAes SAMHashAes\n\tdecoder := binstruct.NewDecoder(bytes.NewReader(binData), binary.LittleEndian)\n\terr := decoder.Decode(&samHashAes)\n\tif err != nil {\n\t\treturn nil\n\t}\n\treturn &samHashAes\n}\n\nconst VOffset = 204 // UserV固定读取前204个字节\n\nfunc (u *UserV) ParseName(r binstruct.Reader) (string, error) {\n\t_, err := r.Seek(int64(u.NameOffset+VOffset), io.SeekStart)\n\tif err != nil {\n\t\treturn \"\", err\n\t}\n\tbinData, err := r.Peek(int(u.NameLength))\n\tif err != nil {\n\t\treturn \"\", err\n\t}\n\treturn utils.UTF16leBytesToString(binData), nil\n}\n\nfunc (u *UserV) ParseFullName(r binstruct.Reader) (string, error) {\n\t_, err := r.Seek(int64(u.FullNameOffset+VOffset), io.SeekStart)\n\tif err != nil {\n\t\treturn \"\", err\n\t}\n\tbinData, err := r.Peek(int(u.FullNameLength))\n\tif err != nil {\n\t\treturn \"\", err\n\t}\n\treturn utils.UTF16leBytesToString(binData), nil\n}\n\nfunc (u *UserV) ParseComment(r binstruct.Reader) (string, error) {\n\t_, err := r.Seek(int64(u.CommentOffset+VOffset), io.SeekStart)\n\tif err != nil {\n\t\treturn \"\", err\n\t}\n\tbinData, err := r.Peek(int(u.CommentLength))\n\tif err != nil {\n\t\treturn \"\", err\n\t}\n\treturn utils.UTF16leBytesToString(binData), nil\n}\n\nfunc (u *UserV) ParseUserComment(r binstruct.Reader) (string, error) {\n\t_, err := r.Seek(int64(u.UserCommentOffset+VOffset), io.SeekStart)\n\tif err != nil {\n\t\treturn \"\", err\n\t}\n\tbinData, err := r.Peek(int(u.UserCommentLength))\n\tif err != nil {\n\t\treturn \"\", err\n\t}\n\treturn utils.UTF16leBytesToString(binData), nil\n}\n\nfunc (u *UserV) ParseHomeDir(r binstruct.Reader) (string, error) {\n\t_, err := r.Seek(int64(u.HomeDirOffset+VOffset), io.SeekStart)\n\tif err != nil {\n\t\treturn \"\", err\n\t}\n\tbinData, err := r.Peek(int(u.HomeDirLength))\n\tif err != nil {\n\t\treturn \"\", err\n\t}\n\treturn utils.UTF16leBytesToString(binData), nil\n}\n\nfunc (u *UserV) ParseHomeDirConnect(r binstruct.Reader) (string, error) {\n\t_, err := r.Seek(int64(u.HomeDirConnectOffset+VOffset), io.SeekStart)\n\tif err != nil {\n\t\treturn \"\", err\n\t}\n\tbinData, err := r.Peek(int(u.HomeDirConnectLength))\n\tif err != nil {\n\t\treturn \"\", err\n\t}\n\treturn utils.UTF16leBytesToString(binData), nil\n}\n\nfunc (u *UserV) ParseScriptPath(r binstruct.Reader) (string, error) {\n\t_, err := r.Seek(int64(u.ScriptPathOffset+VOffset), io.SeekStart)\n\tif err != nil {\n\t\treturn \"\", err\n\t}\n\tbinData, err := r.Peek(int(u.ScriptPathLength))\n\tif err != nil {\n\t\treturn \"\", err\n\t}\n\treturn utils.UTF16leBytesToString(binData), nil\n}\n\nfunc (u *UserV) ParseProfilePath(r binstruct.Reader) (string, error) {\n\t_, err := r.Seek(int64(u.ProfilePathOffset+VOffset), io.SeekStart)\n\tif err != nil {\n\t\treturn \"\", err\n\t}\n\tbinData, err := r.Peek(int(u.ProfilePathLength))\n\tif err != nil {\n\t\treturn \"\", err\n\t}\n\treturn utils.UTF16leBytesToString(binData), nil\n}\n\nfunc (u *UserV) ParseWorkstations(r binstruct.Reader) (string, error) {\n\t_, err := r.Seek(int64(u.WorkstationsOffset+VOffset), io.SeekStart)\n\tif err != nil {\n\t\treturn \"\", err\n\t}\n\tbinData, err := r.Peek(int(u.WorkstationsLength))\n\tif err != nil {\n\t\treturn \"\", err\n\t}\n\treturn utils.UTF16leBytesToString(binData), nil\n}\n\nfunc (u *UserV) ParseHoursAllowed(r binstruct.Reader) (string, error) {\n\t_, err := r.Seek(int64(u.HoursAllowedOffset+VOffset), io.SeekStart)\n\tif err != nil {\n\t\treturn \"\", err\n\t}\n\tbinData, err := r.Peek(int(u.HoursAllowedLength))\n\tif err != nil {\n\t\treturn \"\", err\n\t}\n\treturn utils.UTF16leBytesToString(binData), nil\n}\n\nfunc (u *UserV) ParseLMHash(r binstruct.Reader) (interface{}, error) {\n\t_, err := r.Seek(int64(u.NTHashOffset+VOffset), io.SeekStart)\n\tif err != nil {\n\t\treturn nil, err\n\t}\n\thead, err := r.Peek(1)\n\tif err != nil {\n\t\treturn nil, err\n\t}\n\tif head[0] == byte(1) {\n\t\tif u.LMHashLength == 20 {\n\t\t\t_, err = r.Seek(int64(u.LMHashOffset+VOffset), io.SeekStart)\n\t\t\tif err != nil {\n\t\t\t\treturn nil, err\n\t\t\t}\n\t\t\tbinData, err := r.Peek(int(u.LMHashLength))\n\t\t\tif err != nil {\n\t\t\t\treturn nil, err\n\t\t\t}\n\t\t\treturn getSAMHash(binData), nil\n\t\t}\n\t} else {\n\t\tif u.LMHashLength == 24 {\n\t\t\t_, err = r.Seek(int64(u.LMHashOffset+VOffset), io.SeekStart)\n\t\t\tif err != nil {\n\t\t\t\treturn nil, err\n\t\t\t}\n\t\t\tbinData, err := r.Peek(int(u.LMHashLength))\n\t\t\tif err != nil {\n\t\t\t\treturn nil, err\n\t\t\t}\n\t\t\treturn getSAMHashAes(binData), nil\n\t\t}\n\t}\n\treturn nil, fmt.Errorf(\"err lmhash\")\n}\n\nfunc (u *UserV) ParseNTHash(r binstruct.Reader) (interface{}, error) {\n\t_, err := r.Seek(int64(u.NTHashOffset+VOffset), io.SeekStart)\n\tif err != nil {\n\t\treturn nil, err\n\t}\n\thead, err := r.Peek(1)\n\tif err != nil {\n\t\treturn nil, err\n\t}\n\tif head[0] == byte(1) {\n\t\tif u.NTHashLength == 20 {\n\t\t\t_, err = r.Seek(int64(u.NTHashOffset+VOffset), io.SeekStart)\n\t\t\tif err != nil {\n\t\t\t\treturn nil, err\n\t\t\t}\n\t\t\tbinData, err := r.Peek(int(u.NTHashLength))\n\t\t\tif err != nil {\n\t\t\t\treturn nil, err\n\t\t\t}\n\t\t\treturn getSAMHash(binData), nil\n\t\t}\n\t} else {\n\t\t_, err = r.Seek(int64(u.NTHashOffset+VOffset), io.SeekStart)\n\t\tif err != nil {\n\t\t\treturn nil, err\n\t\t}\n\t\tbinData, err := r.Peek(int(u.NTHashLength))\n\t\tif err != nil {\n\t\t\treturn nil, err\n\t\t}\n\t\treturn getSAMHashAes(binData), nil\n\t}\n\treturn nil, fmt.Errorf(\"err nthash\")\n}\n\nfunc GetUserV(binData []byte) *UserV {\n\tvar userV UserV\n\tdecoder := binstruct.NewDecoder(bytes.NewReader(binData), binary.LittleEndian)\n\terr := decoder.Decode(&userV)\n\tif err != nil {\n\t\treturn nil\n\t}\n\treturn &userV\n}\n"
  },
  {
    "path": "analyzers/winreg/winRegAnalyzer.go",
    "content": "package winreg\n\nimport (\n\t\"ForensicsTool/analyzers/winreg/structs\"\n\t\"ForensicsTool/utils\"\n\t\"context\"\n\t\"encoding/binary\"\n\t\"encoding/hex\"\n\t\"fmt\"\n\t\"os\"\n\t\"path/filepath\"\n\t\"strconv\"\n\t\"strings\"\n\n\t\"github.com/WXjzcccc/registry\"\n\t\"github.com/donnie4w/go-logger/logger\"\n\t\"github.com/iancoleman/orderedmap\"\n)\n\ntype WinReg struct {\n\tsystemReg   registry.Registry\n\tsamReg      registry.Registry\n\tsoftwareReg registry.Registry\n\tntRegList   []registry.Registry\n}\n\ntype Reg struct {\n\tctx context.Context\n}\n\nfunc NewReg() *Reg {\n\treturn &Reg{}\n}\n\nfunc (r *Reg) InitCtx(ctx context.Context) {\n\tr.ctx = ctx\n}\n\nfunc checkSubKeyExist(key registry.Key, keyName string) bool {\n\t/*\n\t\t@param\tkey:\t\t注册表的键\n\t\t@param\tkeyName:\t子键名\n\t\t@return:\t\t\t是否存在\n\t*/\n\tnames, err := key.ReadSubKeyNames(-1)\n\tif err != nil {\n\t\tlogger.Error(\"读取子键名称失败:\", err)\n\t\treturn false\n\t}\n\tfor _, name := range names {\n\t\tif name == keyName {\n\t\t\treturn true\n\t\t}\n\t}\n\treturn false\n}\n\nfunc getStringValue(key registry.Key, valueName string) string {\n\tresult, _, err := key.GetStringValue(valueName)\n\tif err != nil {\n\t\tlogger.Error(\"获取字符串值失败:\", err)\n\t\treturn \"\"\n\t}\n\treturn result\n}\n\nfunc getStringsValue(key registry.Key, valueName string) []string {\n\tresult, _, err := key.GetStringsValue(valueName)\n\tif err != nil || len(result) == 0 {\n\t\tlogger.Errorf(\"获取字符串数组值<%s>失败:%v\", valueName, err)\n\t\treturn []string{\"\"}\n\t}\n\treturn result\n}\n\nfunc getBinaryValue(key registry.Key, valueName string) []byte {\n\tresult, _, err := key.GetBinaryValue(valueName)\n\tif err != nil {\n\t\tlogger.Error(\"获取二进制值失败:\", err)\n\t\treturn nil\n\t}\n\treturn result\n}\n\nfunc getIntValue(key registry.Key, valueName string) uint64 {\n\tresult, _, err := key.GetIntegerValue(valueName)\n\tif err != nil {\n\t\tlogger.Error(\"获取整数值失败:\", err)\n\t\treturn 0\n\t}\n\treturn result\n}\n\nfunc timestampByts(timeBytes []byte) string {\n\ttimestamp := binary.LittleEndian.Uint64(timeBytes)\n\tunixSeconds := int64(timestamp)/1e7 - 11644473600\n\t//t := time.Unix(unixSeconds, 0)\n\t//formattedDate := t.Format(\"2006-01-02 15:04:05\")\n\tformattedDate := utils.DefaultTimestampToDatetime(unixSeconds, \"\", \"\")\n\treturn formattedDate\n}\n\nfunc timestamp(ts uint64) string {\n\t//t := time.Unix(int64(ts), 0)\n\t//formattedDate := t.Format(\"2006-01-02 15:04:05\")\n\tformattedDate := utils.DefaultTimestampToDatetime(int64(ts), \"\", \"\")\n\treturn formattedDate\n}\n\nfunc byte2mac(macBytes []byte) string {\n\tvar result string\n\tstr := hex.EncodeToString(macBytes)\n\tfor idx, s := range str {\n\t\tresult = result + string(s)\n\t\tif idx%2 == 1 && idx != len(str)-1 {\n\t\t\tresult = result + \":\"\n\t\t}\n\t}\n\treturn result\n}\n\nfunc (w *WinReg) getBootKey() []byte {\n\tkey, err := w.systemReg.OpenKey(fmt.Sprintf(\"%s\\\\Control\\\\LSA\", w.getControlSet()))\n\tif err != nil {\n\t\tlogger.Error(\"打开LSA注册表键失败:\", err)\n\t\treturn nil\n\t}\n\tdefer key.Close()\n\tvar bootKeyObf []byte\n\tjd, err := key.OpenSubKey(\"JD\")\n\n\tif err != nil {\n\t\tlogger.Error(\"打开JD子键失败:\", err)\n\t\treturn nil\n\t}\n\tskew, err := key.OpenSubKey(\"Skew1\")\n\tif err != nil {\n\t\tlogger.Error(\"打开Skew1子键失败:\", err)\n\t\treturn nil\n\t}\n\tgbg, err := key.OpenSubKey(\"GBG\")\n\tif err != nil {\n\t\tlogger.Error(\"打开GBG子键失败:\", err)\n\t\treturn nil\n\t}\n\tdata, err := key.OpenSubKey(\"Data\")\n\tif err != nil {\n\t\tlogger.Error(\"打开Data子键失败:\", err)\n\t\treturn nil\n\t}\n\tjdClassName, err := hex.DecodeString(jd.GetClassName())\n\tif err != nil {\n\t\tlogger.Error(\"解码JD类名失败:\", err)\n\t\treturn nil\n\t}\n\tskewClassName, err := hex.DecodeString(skew.GetClassName())\n\tif err != nil {\n\t\tlogger.Error(\"解码Skew1类名失败:\", err)\n\t\treturn nil\n\t}\n\tgbgClassName, err := hex.DecodeString(gbg.GetClassName())\n\tif err != nil {\n\t\tlogger.Error(\"解码GBG类名失败:\", err)\n\t\treturn nil\n\t}\n\tdataClassName, err := hex.DecodeString(data.GetClassName())\n\tif err != nil {\n\t\tlogger.Error(\"解码Data类名失败:\", err)\n\t\treturn nil\n\t}\n\tbootKeyObf = append(bootKeyObf, jdClassName...)\n\tbootKeyObf = append(bootKeyObf, skewClassName...)\n\tbootKeyObf = append(bootKeyObf, gbgClassName...)\n\tbootKeyObf = append(bootKeyObf, dataClassName...)\n\ttransforms := []int{8, 5, 4, 2, 11, 9, 13, 3, 0, 6, 1, 12, 14, 10, 15, 7}\n\tvar bootKey []byte\n\tfor i := 0; i < len(bootKeyObf); i++ {\n\t\tbootKey = append(bootKey, bootKeyObf[transforms[i]:transforms[i]+1]...)\n\t}\n\treturn bootKey\n}\n\nfunc (w *WinReg) getControlSet() string {\n\tkey, err := w.systemReg.OpenKey(\"select\")\n\tif err != nil {\n\t\tlogger.Error(\"打开select注册表键失败:\", err)\n\t\treturn \"ControlSet001\"\n\t}\n\tdefer key.Close()\n\tset := getIntValue(key, \"Current\")\n\treturn fmt.Sprintf(\"ControlSet%03d\", set)\n}\n\nfunc (w *WinReg) getTimeZone() string {\n\tkey, err := w.systemReg.OpenKey(fmt.Sprintf(\"%s\\\\Control\\\\TimeZoneInformation\", w.getControlSet()))\n\tif err != nil {\n\t\tlogger.Error(\"打开TimeZoneInformation注册表键失败:\", err)\n\t\treturn \"\"\n\t}\n\tdefer key.Close()\n\ttimeZoneName := getStringValue(key, \"TimeZoneKeyName\")\n\tif timeZoneName == \"\" {\n\t\treturn \"\"\n\t}\n\ttKey, err := w.softwareReg.OpenKey(fmt.Sprintf(\"Microsoft\\\\Windows NT\\\\CurrentVersion\\\\Time Zones\\\\%s\", timeZoneName))\n\tif err != nil {\n\t\tlogger.Error(\"打开时区注册表键失败:\", err)\n\t\treturn \"\"\n\t}\n\tdefer tKey.Close()\n\ttimeZoneDisplayName := getStringValue(tKey, \"Display\")\n\treturn timeZoneDisplayName\n}\n\nfunc (w *WinReg) getComputerName() string {\n\tsystemKey, err := w.systemReg.OpenKey(fmt.Sprintf(\"%s\\\\Control\\\\ComputerName\\\\ComputerName\", w.getControlSet()))\n\tif err != nil {\n\t\tlogger.Error(\"打开ComputerName注册表键失败:\", err)\n\t\treturn \"\"\n\t}\n\tdefer systemKey.Close()\n\treturn getStringValue(systemKey, \"ComputerName\")\n}\n\nfunc (w *WinReg) getLastShutdownTime() string {\n\tsystemKey, err := w.systemReg.OpenKey(fmt.Sprintf(\"%s\\\\Control\\\\Windows\", w.getControlSet()))\n\tif err != nil {\n\t\tlogger.Error(\"打开Windows注册表键失败:\", err)\n\t\treturn \"\"\n\t}\n\tdefer systemKey.Close()\n\thexTime := getBinaryValue(systemKey, \"ShutdownTime\")\n\treturn timestampByts(hexTime)\n}\n\nfunc (w *WinReg) getLastLoginUser() string {\n\tsoftwareKey, err := w.softwareReg.OpenKey(\"Microsoft\\\\Windows\\\\CurrentVersion\\\\Authentication\\\\LogonUI\")\n\tif err != nil {\n\t\tlogger.Error(\"打开LogonUI注册表键失败:\", err)\n\t\treturn \"\"\n\t}\n\tdefer softwareKey.Close()\n\treturn getStringValue(softwareKey, \"LastLoggedOnUser\")\n}\n\nfunc (w *WinReg) getOrderMap(key, value string) *orderedmap.OrderedMap {\n\tresult := orderedmap.New()\n\tresult.SetEscapeHTML(false)\n\tresult.Set(\"键\", key)\n\tresult.Set(\"值\", value)\n\treturn result\n}\n\nfunc (w *WinReg) getSystemInfo() ([]*orderedmap.OrderedMap, error) {\n\t/*\n\t\t获取系统信息\n\t*/\n\tvar result []*orderedmap.OrderedMap\n\tsoftwareKey, err := w.softwareReg.OpenKey(\"Microsoft\\\\Windows NT\\\\CurrentVersion\")\n\tif err != nil {\n\t\tlogger.Error(\"打开CurrentVersion注册表键失败:\", err)\n\t\treturn nil, err\n\t}\n\tdefer softwareKey.Close()\n\tresult = append(result, w.getOrderMap(\"Build信息\", getStringValue(softwareKey, \"BuildLabEx\")))\n\tresult = append(result, w.getOrderMap(\"Build版本\", getStringValue(softwareKey, \"CurrentBuildNumber\")))\n\tresult = append(result, w.getOrderMap(\"计算机名称\", w.getComputerName()))\n\tresult = append(result, w.getOrderMap(\"版本信息\", getStringValue(softwareKey, \"EditionID\")))\n\tresult = append(result, w.getOrderMap(\"安装时间(本地时区)\", timestamp(getIntValue(softwareKey, \"InstallDate\"))))\n\tresult = append(result, w.getOrderMap(\"系统名称\", getStringValue(softwareKey, \"ProductName\")))\n\tresult = append(result, w.getOrderMap(\"发行ID\", getStringValue(softwareKey, \"ReleaseId\")))\n\tresult = append(result, w.getOrderMap(\"产品ID\", getStringValue(softwareKey, \"ProductId\")))\n\tresult = append(result, w.getOrderMap(\"注册所有者\", getStringValue(softwareKey, \"RegisteredOwner\")))\n\tresult = append(result, w.getOrderMap(\"注册组织\", getStringValue(softwareKey, \"RegisteredOrganization\")))\n\tresult = append(result, w.getOrderMap(\"注册所有者\", getStringValue(softwareKey, \"RegisteredOwner\")))\n\tresult = append(result, w.getOrderMap(\"系统时区\", w.getTimeZone()))\n\tresult = append(result, w.getOrderMap(\"最后一次正常关机时间(本地时区)\", w.getLastShutdownTime()))\n\tif checkSubKeyExist(softwareKey, \"SoftwareProtectionPlatform\") {\n\t\tproductKey, err := softwareKey.OpenSubKey(\"SoftwareProtectionPlatform\")\n\t\tif err != nil {\n\t\t\tlogger.Error(\"打开SoftwareProtectionPlatform子键失败:\", err)\n\t\t\treturn result, err\n\t\t}\n\t\tresult = append(result, w.getOrderMap(\"产品密钥备份(非当前密钥)\", getStringValue(productKey, \"BackupProductKeyDefault\")))\n\t}\n\tresult = append(result, w.getOrderMap(\"上次登录的用户\", w.getLastLoginUser()))\n\treturn result, nil\n}\n\nfunc (w *WinReg) getNetInfo() ([]*orderedmap.OrderedMap, error) {\n\t/*\n\t\t获取网卡信息\n\t*/\n\tvar result []*orderedmap.OrderedMap\n\tinterfaceKey, err := w.systemReg.OpenKey(fmt.Sprintf(\"%s\\\\Services\\\\Tcpip\\\\Parameters\\\\Interfaces\", w.getControlSet()))\n\tif err != nil {\n\t\tlogger.Error(\"打开Interfaces注册表键失败:\", err)\n\t\treturn nil, err\n\t}\n\tdefer interfaceKey.Close()\n\tinterfaceSubKeyNames, err := interfaceKey.ReadSubKeyNames(-1)\n\tif err != nil {\n\t\tlogger.Error(\"读取接口子键名称失败:\", err)\n\t\treturn nil, err\n\t}\n\tfor _, interfaceSubKeyName := range interfaceSubKeyNames {\n\t\tinfo := orderedmap.New()\n\t\tinfo.SetEscapeHTML(false)\n\t\tdeviceKey, err := w.systemReg.OpenKey(fmt.Sprintf(\"%s\\\\Control\\\\Network\\\\{4D36E972-E325-11CE-BFC1-08002BE10318}\\\\%s\\\\connection\", w.getControlSet(), strings.ToUpper(interfaceSubKeyName)))\n\t\tif err != nil {\n\t\t\tlogger.Error(\"打开网络设备注册表键失败:\", err)\n\t\t\tinfo.Set(\"名称\", \"\")\n\t\t} else {\n\t\t\tinfo.Set(\"名称\", getStringValue(deviceKey, \"Name\"))\n\t\t}\n\t\tdefer deviceKey.Close()\n\t\tmacKey, err := w.systemReg.OpenKey(fmt.Sprintf(\"%s\\\\Control\\\\NetworkSetup2\\\\Interfaces\\\\%s\\\\Kernel\", w.getControlSet(), strings.ToUpper(interfaceSubKeyName)))\n\t\tif err != nil {\n\t\t\tlogger.Error(\"打开MAC地址注册表键失败:\", err)\n\t\t\tinfo.Set(\"当前MAC地址\", \"\")\n\t\t\tinfo.Set(\"物理MAC地址\", \"\")\n\t\t} else {\n\t\t\tinfo.Set(\"当前MAC地址\", byte2mac(getBinaryValue(macKey, \"CurrentAddress\")))\n\t\t\tinfo.Set(\"物理MAC地址\", byte2mac(getBinaryValue(macKey, \"PermanentAddress\")))\n\t\t}\n\t\tdefer macKey.Close()\n\t\tinterfaceSubKey, err := interfaceKey.OpenSubKey(interfaceSubKeyName)\n\t\tif err != nil {\n\t\t\tlogger.Error(\"打开接口子键失败:\", err)\n\t\t\treturn nil, err\n\t\t}\n\t\tinfo.Set(\"DHCP网络地址\", getStringValue(interfaceSubKey, \"DhcpIPAddress\"))\n\t\tinfo.Set(\"DHCP网关\", getStringsValue(interfaceSubKey, \"DhcpDefaultGateway\")[0])\n\t\tinfo.Set(\"DHCP服务地址\", getStringValue(interfaceSubKey, \"DhcpServer\"))\n\t\tinfo.Set(\"租赁时间\", timestamp(getIntValue(interfaceSubKey, \"LeaseObtainedTime\")))\n\t\tinfo.Set(\"过期时间\", timestamp(getIntValue(interfaceSubKey, \"LeaseTerminatesTime\")))\n\t\tinfo.Set(\"IP地址\", getStringsValue(interfaceSubKey, \"IPAddress\")[0])\n\t\tinfo.Set(\"子网掩码\", getStringsValue(interfaceSubKey, \"SubnetMask\")[0])\n\t\tinfo.Set(\"网关\", getStringsValue(interfaceSubKey, \"DefaultGateway\")[0])\n\t\tresult = append(result, info)\n\t}\n\treturn result, nil\n}\n\nfunc (w *WinReg) getUserInfo() ([]*orderedmap.OrderedMap, error) {\n\t/*\n\t\t获取用户信息\n\t*/\n\tvar result []*orderedmap.OrderedMap\n\tdomainAccountKey, err := w.samReg.OpenKey(\"SAM\\\\Domains\\\\Account\")\n\tif err != nil {\n\t\tlogger.Error(\"打开SAM Domains Account注册表键失败:\", err)\n\t\treturn nil, err\n\t}\n\tdefer domainAccountKey.Close()\n\tdomainAccountVData := getBinaryValue(domainAccountKey, \"V\")\n\tdomainAccountFData := getBinaryValue(domainAccountKey, \"F\")\n\tt := structs.GetDomainAccountF(domainAccountFData)\n\thashedBootKey := structs.GetHBootKey(t.Key0, w.getBootKey())\n\tmachineSid := structs.GetMachineSid(domainAccountVData)\n\tuserAccountKey, err := domainAccountKey.OpenSubKey(\"Users\")\n\tif err != nil {\n\t\tlogger.Error(\"打开Users子键失败:\", err)\n\t\treturn nil, err\n\t}\n\tdefer userAccountKey.Close()\n\tuserNameKey, err := userAccountKey.OpenSubKey(\"Names\")\n\tif err != nil {\n\t\tlogger.Error(\"打开Names子键失败:\", err)\n\t\treturn nil, err\n\t}\n\tdefer userNameKey.Close()\n\tuserNames, err := userNameKey.ReadSubKeyNames(-1)\n\tif err != nil {\n\t\tlogger.Error(\"读取用户名失败:\", err)\n\t\treturn nil, err\n\t}\n\tfor _, userName := range userNames {\n\t\tinfo := orderedmap.New()\n\t\tinfo.SetEscapeHTML(false)\n\t\tuserKey, err := userNameKey.OpenSubKey(userName)\n\t\tif err != nil {\n\t\t\tlogger.Error(\"打开用户子键失败:\", err)\n\t\t\tcontinue\n\t\t}\n\t\tdefer userKey.Close()\n\t\t_, valType, err := userKey.GetValue(\"(default)\", []byte{})\n\t\tif err != nil {\n\t\t\tlogger.Error(\"获取用户默认值失败:\", err)\n\t\t\tcontinue\n\t\t}\n\t\tuserSid := fmt.Sprintf(\"%s-%v\", machineSid, valType)\n\t\trid := fmt.Sprintf(\"%08x\", valType)\n\t\taccountKey, err := userAccountKey.OpenSubKey(rid)\n\t\tif err != nil {\n\t\t\tlogger.Error(\"打开用户账户子键失败:\", err)\n\t\t\tcontinue\n\t\t}\n\t\taccountKey.Close()\n\t\tuserFData := getBinaryValue(accountKey, \"F\")\n\t\tuserVData := getBinaryValue(accountKey, \"V\")\n\t\tuserV := structs.GetUserV(userVData)\n\t\tuserF := structs.GetUserF(userFData)\n\n\t\tinfo.Set(\"用户名\", userName)\n\t\tinfo.Set(\"SID\", userSid)\n\t\tinfo.Set(\"密码哈希\", structs.DecryptHash(hashedBootKey, userF.RID, userV.NTHash, structs.NTHASH))\n\t\tinfo.Set(\"上次登录时间\", userF.LastLoginTime)\n\t\tinfo.Set(\"上次密码修改时间\", userF.LastPwdChangeTime)\n\t\tinfo.Set(\"上次登录失败时间\", userF.LastFailedLoginTime)\n\t\tinfo.Set(\"用户属性\", strconv.Itoa(int(userF.UserAttribute)))\n\t\tinfo.Set(\"登录次数\", strconv.Itoa(int(userF.LogonCount)))\n\t\tinfo.Set(\"登录失败次数\", strconv.Itoa(int(userF.InValidLoginCount)))\n\t\tinfo.Set(\"用户全名\", userV.FullName)\n\t\tinfo.Set(\"描述信息\", userV.Comment)\n\t\tresult = append(result, info)\n\t}\n\treturn result, nil\n}\n\n//TODO 默认浏览器，最近访问文档等\n\nfunc (w *WinReg) getDefaultBrowser() ([]*orderedmap.OrderedMap, error) {\n\tvar result []*orderedmap.OrderedMap\n\tfor idx, nt := range w.ntRegList {\n\t\tinfo := orderedmap.New()\n\t\tinfo.SetEscapeHTML(false)\n\t\trootKey, err := nt.OpenKey(\"SOFTWARE\\\\Microsoft\\\\Windows\\\\Shell\\\\Associations\\\\UrlAssociations\\\\http\\\\UserChoice\")\n\t\tif err != nil {\n\t\t\tlogger.Error(\"打开默认浏览器注册表键失败:\", err)\n\t\t\treturn nil, err\n\t\t}\n\t\tdefer rootKey.Close()\n\t\tbrowser := getStringValue(rootKey, \"ProgId\")\n\t\tresult = append(result, w.getOrderMap(strconv.Itoa(idx), browser))\n\t}\n\treturn result, nil\n}\n\ntype RegResult struct {\n\tData *orderedmap.OrderedMap `json:\"data\"`\n\tErr  string                 `json:\"err\"`\n}\n\nfunc (r *Reg) AnalyzeWinReg(folder string) *RegResult {\n\t/*\n\t\t@param\tfolder:\t包含了SAM、SYSTEM、SOFTWARE、NTUSER.DAT注册表的文件夹，NTUSER.DAT可以存在多个，只需要后缀名是DAT即可\n\t\t@return:\t\t解析结果、错误\n\t*/\n\tresult := orderedmap.New()\n\tresult.SetEscapeHTML(false)\n\tvar systemReg registry.Registry\n\tvar samReg registry.Registry\n\tvar softwareReg registry.Registry\n\tvar ntRegList []registry.Registry\n\tfileInfo, err := os.Stat(folder)\n\tif err != nil {\n\t\tlogger.Error(\"检查文件夹状态失败:\", err)\n\t\treturn &RegResult{nil, err.Error()}\n\t}\n\tif !fileInfo.IsDir() {\n\t\treturn &RegResult{nil, fmt.Sprintf(\"%s is not a folder\", folder)}\n\t}\n\terr = filepath.Walk(folder, func(path string, info os.FileInfo, err error) error {\n\t\tfilename := info.Name()\n\t\tswitch filename {\n\t\tcase \"SYSTEM\":\n\t\t\tsystemReg, err = registry.Open(path)\n\t\tcase \"SOFTWARE\":\n\t\t\tsoftwareReg, err = registry.Open(path)\n\t\t\tif err != nil {\n\t\t\t\tlogger.Error(\"打开SOFTWARE注册表文件失败:\", err)\n\t\t\t\treturn err\n\t\t\t}\n\t\tcase \"SAM\":\n\t\t\tsamReg, err = registry.Open(path)\n\t\t\tif err != nil {\n\t\t\t\tlogger.Error(\"打开SAM注册表文件失败:\", err)\n\t\t\t\treturn err\n\t\t\t}\n\t\t}\n\t\tif strings.HasSuffix(filename, \".DAT\") {\n\t\t\tntReg, err := registry.Open(path)\n\t\t\tif err != nil {\n\t\t\t\tlogger.Error(\"打开NTUSER.DAT注册表文件失败:\", err)\n\t\t\t\treturn err\n\t\t\t}\n\t\t\tntRegList = append(ntRegList, ntReg)\n\t\t}\n\t\treturn nil\n\t})\n\tif err != nil {\n\t\tlogger.Error(\"遍历文件夹失败:\", err)\n\t\treturn &RegResult{nil, err.Error()}\n\t}\n\twinReg := &WinReg{systemReg, samReg, softwareReg, ntRegList}\n\tsysInfo, err := winReg.getSystemInfo()\n\tif err != nil {\n\t\tlogger.Error(\"获取系统信息失败:\", err)\n\t} else {\n\t\tresult.Set(\"系统信息\", sysInfo)\n\t}\n\tnetInfo, err := winReg.getNetInfo()\n\tif err != nil {\n\t\tlogger.Error(\"获取网卡信息失败:\", err)\n\t} else {\n\t\tresult.Set(\"网卡信息\", netInfo)\n\t}\n\tuserInfo, err := winReg.getUserInfo()\n\tif err != nil {\n\t\tlogger.Error(\"获取用户信息失败:\", err)\n\t} else {\n\t\tresult.Set(\"用户信息\", userInfo)\n\t}\n\tdefaultBrowser, err := winReg.getDefaultBrowser()\n\tif err != nil {\n\t\tlogger.Error(\"获取默认浏览器信息失败:\", err)\n\t} else {\n\t\tresult.Set(\"默认浏览器\", defaultBrowser)\n\t}\n\treturn &RegResult{result, \"\"}\n}\n"
  },
  {
    "path": "app.go",
    "content": "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 new App application struct\nfunc NewApp() *App {\n\treturn &App{}\n}\n\n// startup is called at application startup\nfunc (a *App) startup(ctx context.Context) {\n\t// Perform your setup here\n\ta.ctx = ctx\n}\n\n// domReady is called after front-end resources have been loaded\nfunc (a App) domReady(ctx context.Context) {\n\t// Add your action here\n}\n\n// beforeClose is called when the application is about to quit,\n// either by clicking the window close button or calling runtime.Quit.\n// Returning true will cause the application to continue, false will continue shutdown as normal.\nfunc (a *App) beforeClose(ctx context.Context) (prevent bool) {\n\treturn false\n}\n\n// shutdown is called at application termination\nfunc (a *App) shutdown(ctx context.Context) {\n\t// Perform your teardown here\n}\n\n// Greet returns a greeting for the given name\nfunc (a *App) Greet(name string) string {\n\treturn fmt.Sprintf(\"Hello %s, It's show time!\", name)\n}\n\nfunc (a *App) GetVersion() string {\n\treturn \"v2.6\"\n}\n"
  },
  {
    "path": "build/README.md",
    "content": "# Build Directory\n\nThe build directory is used to house all the build files and assets for your application. \n\nThe structure is:\n\n* bin - Output directory\n* darwin - macOS specific files\n* windows - Windows specific files\n\n## Mac\n\nThe `darwin` directory holds files specific to Mac builds.\nThese may be customised and used as part of the build. To return these files to the default state, simply delete them\nand\nbuild with `wails build`.\n\nThe directory contains the following files:\n\n- `Info.plist` - the main plist file used for Mac builds. It is used when building using `wails build`.\n- `Info.dev.plist` - same as the main plist file but used when building using `wails dev`.\n\n## Windows\n\nThe `windows` directory contains the manifest and rc files used when building with `wails build`.\nThese may be customised for your application. To return these files to the default state, simply delete them and\nbuild with `wails build`.\n\n- `icon.ico` - The icon used for the application. This is used when building using `wails build`. If you wish to\n  use a different icon, simply replace this file with your own. If it is missing, a new `icon.ico` file\n  will be created using the `appicon.png` file in the build directory.\n- `installer/*` - The files used to create the Windows installer. These are used when building using `wails build`.\n- `info.json` - Application details used for Windows builds. The data here will be used by the Windows installer,\n  as well as the application itself (right click the exe -> properties -> details)\n- `wails.exe.manifest` - The main application manifest file."
  },
  {
    "path": "build/darwin/Info.dev.plist",
    "content": "<!DOCTYPE plist PUBLIC \"-//Apple//DTD PLIST 1.0//EN\" \"http://www.apple.com/DTDs/PropertyList-1.0.dtd\">\n<plist version=\"1.0\">\n    <dict>\n        <key>CFBundlePackageType</key>\n        <string>APPL</string>\n        <key>CFBundleName</key>\n        <string>{{.Info.ProductName}}</string>\n        <key>CFBundleExecutable</key>\n        <string>{{.OutputFilename}}</string>\n        <key>CFBundleIdentifier</key>\n        <string>com.wails.{{.Name}}</string>\n        <key>CFBundleVersion</key>\n        <string>{{.Info.ProductVersion}}</string>\n        <key>CFBundleGetInfoString</key>\n        <string>{{.Info.Comments}}</string>\n        <key>CFBundleShortVersionString</key>\n        <string>{{.Info.ProductVersion}}</string>\n        <key>CFBundleIconFile</key>\n        <string>iconfile</string>\n        <key>LSMinimumSystemVersion</key>\n        <string>10.13.0</string>\n        <key>NSHighResolutionCapable</key>\n        <string>true</string>\n        <key>NSHumanReadableCopyright</key>\n        <string>{{.Info.Copyright}}</string>\n        {{if .Info.FileAssociations}}\n        <key>CFBundleDocumentTypes</key>\n        <array>\n          {{range .Info.FileAssociations}}\n          <dict>\n            <key>CFBundleTypeExtensions</key>\n            <array>\n              <string>{{.Ext}}</string>\n            </array>\n            <key>CFBundleTypeName</key>\n            <string>{{.Name}}</string>\n            <key>CFBundleTypeRole</key>\n            <string>{{.Role}}</string>\n            <key>CFBundleTypeIconFile</key>\n            <string>{{.IconName}}</string>\n          </dict>\n          {{end}}\n        </array>\n        {{end}}\n        {{if .Info.Protocols}}\n        <key>CFBundleURLTypes</key>\n        <array>\n          {{range .Info.Protocols}}\n            <dict>\n                <key>CFBundleURLName</key>\n                <string>com.wails.{{.Scheme}}</string>\n                <key>CFBundleURLSchemes</key>\n                <array>\n                    <string>{{.Scheme}}</string>\n                </array>\n                <key>CFBundleTypeRole</key>\n                <string>{{.Role}}</string>\n            </dict>\n          {{end}}\n        </array>\n        {{end}}\n        <key>NSAppTransportSecurity</key>\n        <dict>\n            <key>NSAllowsLocalNetworking</key>\n            <true/>\n        </dict>\n    </dict>\n</plist>\n"
  },
  {
    "path": "build/darwin/Info.plist",
    "content": "<!DOCTYPE plist PUBLIC \"-//Apple//DTD PLIST 1.0//EN\" \"http://www.apple.com/DTDs/PropertyList-1.0.dtd\">\n<plist version=\"1.0\">\n    <dict>\n        <key>CFBundlePackageType</key>\n        <string>APPL</string>\n        <key>CFBundleName</key>\n        <string>{{.Info.ProductName}}</string>\n        <key>CFBundleExecutable</key>\n        <string>{{.OutputFilename}}</string>\n        <key>CFBundleIdentifier</key>\n        <string>com.wails.{{.Name}}</string>\n        <key>CFBundleVersion</key>\n        <string>{{.Info.ProductVersion}}</string>\n        <key>CFBundleGetInfoString</key>\n        <string>{{.Info.Comments}}</string>\n        <key>CFBundleShortVersionString</key>\n        <string>{{.Info.ProductVersion}}</string>\n        <key>CFBundleIconFile</key>\n        <string>iconfile</string>\n        <key>LSMinimumSystemVersion</key>\n        <string>10.13.0</string>\n        <key>NSHighResolutionCapable</key>\n        <string>true</string>\n        <key>NSHumanReadableCopyright</key>\n        <string>{{.Info.Copyright}}</string>\n        {{if .Info.FileAssociations}}\n        <key>CFBundleDocumentTypes</key>\n        <array>\n          {{range .Info.FileAssociations}}\n          <dict>\n            <key>CFBundleTypeExtensions</key>\n            <array>\n              <string>{{.Ext}}</string>\n            </array>\n            <key>CFBundleTypeName</key>\n            <string>{{.Name}}</string>\n            <key>CFBundleTypeRole</key>\n            <string>{{.Role}}</string>\n            <key>CFBundleTypeIconFile</key>\n            <string>{{.IconName}}</string>\n          </dict>\n          {{end}}\n        </array>\n        {{end}}\n        {{if .Info.Protocols}}\n        <key>CFBundleURLTypes</key>\n        <array>\n          {{range .Info.Protocols}}\n            <dict>\n                <key>CFBundleURLName</key>\n                <string>com.wails.{{.Scheme}}</string>\n                <key>CFBundleURLSchemes</key>\n                <array>\n                    <string>{{.Scheme}}</string>\n                </array>\n                <key>CFBundleTypeRole</key>\n                <string>{{.Role}}</string>\n            </dict>\n          {{end}}\n        </array>\n        {{end}}\n    </dict>\n</plist>\n"
  },
  {
    "path": "build/windows/info.json",
    "content": "{\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.ProductVersion}}\",\n\t\t\t\"CompanyName\": \"{{.Info.CompanyName}}\",\n\t\t\t\"FileDescription\": \"{{.Info.ProductName}}\",\n\t\t\t\"LegalCopyright\": \"{{.Info.Copyright}}\",\n\t\t\t\"ProductName\": \"{{.Info.ProductName}}\",\n\t\t\t\"Comments\": \"{{.Info.Comments}}\"\n\t\t}\n\t}\n}"
  },
  {
    "path": "build/windows/installer/project.nsi",
    "content": "Unicode true\n\n####\n## Please note: Template replacements don't work in this file. They are provided with default defines like\n## mentioned underneath.\n## If the keyword is not defined, \"wails_tools.nsh\" will populate them with the values from ProjectInfo.\n## If they are defined here, \"wails_tools.nsh\" will not touch them. This allows to use this project.nsi manually\n## from outside of Wails for debugging and development of the installer.\n##\n## For development first make a wails nsis build to populate the \"wails_tools.nsh\":\n## > wails build --target windows/amd64 --nsis\n## Then you can call makensis on this file with specifying the path to your binary:\n## For a AMD64 only installer:\n## > makensis -DARG_WAILS_AMD64_BINARY=..\\..\\bin\\app.exe\n## For a ARM64 only installer:\n## > makensis -DARG_WAILS_ARM64_BINARY=..\\..\\bin\\app.exe\n## For a installer with both architectures:\n## > makensis -DARG_WAILS_AMD64_BINARY=..\\..\\bin\\app-amd64.exe -DARG_WAILS_ARM64_BINARY=..\\..\\bin\\app-arm64.exe\n####\n## The following information is taken from the ProjectInfo file, but they can be overwritten here.\n####\n## !define INFO_PROJECTNAME    \"MyProject\" # Default \"{{.Name}}\"\n## !define INFO_COMPANYNAME    \"MyCompany\" # Default \"{{.Info.CompanyName}}\"\n## !define INFO_PRODUCTNAME    \"MyProduct\" # Default \"{{.Info.ProductName}}\"\n## !define INFO_PRODUCTVERSION \"1.0.0\"     # Default \"{{.Info.ProductVersion}}\"\n## !define INFO_COPYRIGHT      \"Copyright\" # Default \"{{.Info.Copyright}}\"\n###\n## !define PRODUCT_EXECUTABLE  \"Application.exe\"      # Default \"${INFO_PROJECTNAME}.exe\"\n## !define UNINST_KEY_NAME     \"UninstKeyInRegistry\"  # Default \"${INFO_COMPANYNAME}${INFO_PRODUCTNAME}\"\n####\n## !define REQUEST_EXECUTION_LEVEL \"admin\"            # Default \"admin\"  see also https://nsis.sourceforge.io/Docs/Chapter4.html\n####\n## Include the wails tools\n####\n!include \"wails_tools.nsh\"\n\n# The version information for this two must consist of 4 parts\nVIProductVersion \"${INFO_PRODUCTVERSION}.0\"\nVIFileVersion    \"${INFO_PRODUCTVERSION}.0\"\n\nVIAddVersionKey \"CompanyName\"     \"${INFO_COMPANYNAME}\"\nVIAddVersionKey \"FileDescription\" \"${INFO_PRODUCTNAME} Installer\"\nVIAddVersionKey \"ProductVersion\"  \"${INFO_PRODUCTVERSION}\"\nVIAddVersionKey \"FileVersion\"     \"${INFO_PRODUCTVERSION}\"\nVIAddVersionKey \"LegalCopyright\"  \"${INFO_COPYRIGHT}\"\nVIAddVersionKey \"ProductName\"     \"${INFO_PRODUCTNAME}\"\n\n# Enable HiDPI support. https://nsis.sourceforge.io/Reference/ManifestDPIAware\nManifestDPIAware true\n\n!include \"MUI.nsh\"\n\n!define MUI_ICON \"..\\icon.ico\"\n!define MUI_UNICON \"..\\icon.ico\"\n# !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\n!define MUI_FINISHPAGE_NOAUTOCLOSE # Wait on the INSTFILES page so the user can take a look into the details of the installation steps\n!define MUI_ABORTWARNING # This will warn the user if they exit from the installer.\n\n!insertmacro MUI_PAGE_WELCOME # Welcome to the installer page.\n# !insertmacro MUI_PAGE_LICENSE \"resources\\eula.txt\" # Adds a EULA page to the installer\n!insertmacro MUI_PAGE_DIRECTORY # In which folder install page.\n!insertmacro MUI_PAGE_INSTFILES # Installing page.\n!insertmacro MUI_PAGE_FINISH # Finished installation page.\n\n!insertmacro MUI_UNPAGE_INSTFILES # Uinstalling page\n\n!insertmacro MUI_LANGUAGE \"English\" # Set the Language of the installer\n\n## The following two statements can be used to sign the installer and the uninstaller. The path to the binaries are provided in %1\n#!uninstfinalize 'signtool --file \"%1\"'\n#!finalize 'signtool --file \"%1\"'\n\nName \"${INFO_PRODUCTNAME}\"\nOutFile \"..\\..\\bin\\${INFO_PROJECTNAME}-${ARCH}-installer.exe\" # Name of the installer's file.\nInstallDir \"$PROGRAMFILES64\\${INFO_COMPANYNAME}\\${INFO_PRODUCTNAME}\" # Default installing folder ($PROGRAMFILES is Program Files folder).\nShowInstDetails show # This will always show the installation details.\n\nFunction .onInit\n   !insertmacro wails.checkArchitecture\nFunctionEnd\n\nSection\n    !insertmacro wails.setShellContext\n\n    !insertmacro wails.webview2runtime\n\n    SetOutPath $INSTDIR\n\n    !insertmacro wails.files\n\n    CreateShortcut \"$SMPROGRAMS\\${INFO_PRODUCTNAME}.lnk\" \"$INSTDIR\\${PRODUCT_EXECUTABLE}\"\n    CreateShortCut \"$DESKTOP\\${INFO_PRODUCTNAME}.lnk\" \"$INSTDIR\\${PRODUCT_EXECUTABLE}\"\n\n    !insertmacro wails.associateFiles\n    !insertmacro wails.associateCustomProtocols\n\n    !insertmacro wails.writeUninstaller\nSectionEnd\n\nSection \"uninstall\"\n    !insertmacro wails.setShellContext\n\n    RMDir /r \"$AppData\\${PRODUCT_EXECUTABLE}\" # Remove the WebView2 DataPath\n\n    RMDir /r $INSTDIR\n\n    Delete \"$SMPROGRAMS\\${INFO_PRODUCTNAME}.lnk\"\n    Delete \"$DESKTOP\\${INFO_PRODUCTNAME}.lnk\"\n\n    !insertmacro wails.unassociateFiles\n    !insertmacro wails.unassociateCustomProtocols\n\n    !insertmacro wails.deleteUninstaller\nSectionEnd\n"
  },
  {
    "path": "build/windows/installer/wails_tools.nsh",
    "content": "# DO NOT EDIT - Generated automatically by `wails build`\n\n!include \"x64.nsh\"\n!include \"WinVer.nsh\"\n!include \"FileFunc.nsh\"\n\n!ifndef INFO_PROJECTNAME\n    !define INFO_PROJECTNAME \"{{.Name}}\"\n!endif\n!ifndef INFO_COMPANYNAME\n    !define INFO_COMPANYNAME \"{{.Info.CompanyName}}\"\n!endif\n!ifndef INFO_PRODUCTNAME\n    !define INFO_PRODUCTNAME \"{{.Info.ProductName}}\"\n!endif\n!ifndef INFO_PRODUCTVERSION\n    !define INFO_PRODUCTVERSION \"{{.Info.ProductVersion}}\"\n!endif\n!ifndef INFO_COPYRIGHT\n    !define INFO_COPYRIGHT \"{{.Info.Copyright}}\"\n!endif\n!ifndef PRODUCT_EXECUTABLE\n    !define PRODUCT_EXECUTABLE \"${INFO_PROJECTNAME}.exe\"\n!endif\n!ifndef UNINST_KEY_NAME\n    !define UNINST_KEY_NAME \"${INFO_COMPANYNAME}${INFO_PRODUCTNAME}\"\n!endif\n!define UNINST_KEY \"Software\\Microsoft\\Windows\\CurrentVersion\\Uninstall\\${UNINST_KEY_NAME}\"\n\n!ifndef REQUEST_EXECUTION_LEVEL\n    !define REQUEST_EXECUTION_LEVEL \"admin\"\n!endif\n\nRequestExecutionLevel \"${REQUEST_EXECUTION_LEVEL}\"\n\n!ifdef ARG_WAILS_AMD64_BINARY\n    !define SUPPORTS_AMD64\n!endif\n\n!ifdef ARG_WAILS_ARM64_BINARY\n    !define SUPPORTS_ARM64\n!endif\n\n!ifdef SUPPORTS_AMD64\n    !ifdef SUPPORTS_ARM64\n        !define ARCH \"amd64_arm64\"\n    !else\n        !define ARCH \"amd64\"\n    !endif\n!else\n    !ifdef SUPPORTS_ARM64\n        !define ARCH \"arm64\"\n    !else\n        !error \"Wails: Undefined ARCH, please provide at least one of ARG_WAILS_AMD64_BINARY or ARG_WAILS_ARM64_BINARY\"\n    !endif\n!endif\n\n!macro wails.checkArchitecture\n    !ifndef WAILS_WIN10_REQUIRED\n        !define WAILS_WIN10_REQUIRED \"This product is only supported on Windows 10 (Server 2016) and later.\"\n    !endif\n\n    !ifndef WAILS_ARCHITECTURE_NOT_SUPPORTED\n        !define WAILS_ARCHITECTURE_NOT_SUPPORTED \"This product can't be installed on the current Windows architecture. Supports: ${ARCH}\"\n    !endif\n\n    ${If} ${AtLeastWin10}\n        !ifdef SUPPORTS_AMD64\n            ${if} ${IsNativeAMD64}\n                Goto ok\n            ${EndIf}\n        !endif\n\n        !ifdef SUPPORTS_ARM64\n            ${if} ${IsNativeARM64}\n                Goto ok\n            ${EndIf}\n        !endif\n\n        IfSilent silentArch notSilentArch\n        silentArch:\n            SetErrorLevel 65\n            Abort\n        notSilentArch:\n            MessageBox MB_OK \"${WAILS_ARCHITECTURE_NOT_SUPPORTED}\"\n            Quit\n    ${else}\n        IfSilent silentWin notSilentWin\n        silentWin:\n            SetErrorLevel 64\n            Abort\n        notSilentWin:\n            MessageBox MB_OK \"${WAILS_WIN10_REQUIRED}\"\n            Quit\n    ${EndIf}\n\n    ok:\n!macroend\n\n!macro wails.files\n    !ifdef SUPPORTS_AMD64\n        ${if} ${IsNativeAMD64}\n            File \"/oname=${PRODUCT_EXECUTABLE}\" \"${ARG_WAILS_AMD64_BINARY}\"\n        ${EndIf}\n    !endif\n\n    !ifdef SUPPORTS_ARM64\n        ${if} ${IsNativeARM64}\n            File \"/oname=${PRODUCT_EXECUTABLE}\" \"${ARG_WAILS_ARM64_BINARY}\"\n        ${EndIf}\n    !endif\n!macroend\n\n!macro wails.writeUninstaller\n    WriteUninstaller \"$INSTDIR\\uninstall.exe\"\n\n    SetRegView 64\n    WriteRegStr HKLM \"${UNINST_KEY}\" \"Publisher\" \"${INFO_COMPANYNAME}\"\n    WriteRegStr HKLM \"${UNINST_KEY}\" \"DisplayName\" \"${INFO_PRODUCTNAME}\"\n    WriteRegStr HKLM \"${UNINST_KEY}\" \"DisplayVersion\" \"${INFO_PRODUCTVERSION}\"\n    WriteRegStr HKLM \"${UNINST_KEY}\" \"DisplayIcon\" \"$INSTDIR\\${PRODUCT_EXECUTABLE}\"\n    WriteRegStr HKLM \"${UNINST_KEY}\" \"UninstallString\" \"$\\\"$INSTDIR\\uninstall.exe$\\\"\"\n    WriteRegStr HKLM \"${UNINST_KEY}\" \"QuietUninstallString\" \"$\\\"$INSTDIR\\uninstall.exe$\\\" /S\"\n\n    ${GetSize} \"$INSTDIR\" \"/S=0K\" $0 $1 $2\n    IntFmt $0 \"0x%08X\" $0\n    WriteRegDWORD HKLM \"${UNINST_KEY}\" \"EstimatedSize\" \"$0\"\n!macroend\n\n!macro wails.deleteUninstaller\n    Delete \"$INSTDIR\\uninstall.exe\"\n\n    SetRegView 64\n    DeleteRegKey HKLM \"${UNINST_KEY}\"\n!macroend\n\n!macro wails.setShellContext\n    ${If} ${REQUEST_EXECUTION_LEVEL} == \"admin\"\n        SetShellVarContext all\n    ${else}\n        SetShellVarContext current\n    ${EndIf}\n!macroend\n\n# Install webview2 by launching the bootstrapper\n# See https://docs.microsoft.com/en-us/microsoft-edge/webview2/concepts/distribution#online-only-deployment\n!macro wails.webview2runtime\n    !ifndef WAILS_INSTALL_WEBVIEW_DETAILPRINT\n        !define WAILS_INSTALL_WEBVIEW_DETAILPRINT \"Installing: WebView2 Runtime\"\n    !endif\n\n    SetRegView 64\n\t# If the admin key exists and is not empty then webview2 is already installed\n\tReadRegStr $0 HKLM \"SOFTWARE\\WOW6432Node\\Microsoft\\EdgeUpdate\\Clients\\{F3017226-FE2A-4295-8BDF-00C3A9A7E4C5}\" \"pv\"\n    ${If} $0 != \"\"\n        Goto ok\n    ${EndIf}\n\n    ${If} ${REQUEST_EXECUTION_LEVEL} == \"user\"\n        # If the installer is run in user level, check the user specific key exists and is not empty then webview2 is already installed\n\t    ReadRegStr $0 HKCU \"Software\\Microsoft\\EdgeUpdate\\Clients\\{F3017226-FE2A-4295-8BDF-00C3A9A7E4C5}\" \"pv\"\n        ${If} $0 != \"\"\n            Goto ok\n        ${EndIf}\n     ${EndIf}\n\n\tSetDetailsPrint both\n    DetailPrint \"${WAILS_INSTALL_WEBVIEW_DETAILPRINT}\"\n    SetDetailsPrint listonly\n\n    InitPluginsDir\n    CreateDirectory \"$pluginsdir\\webview2bootstrapper\"\n    SetOutPath \"$pluginsdir\\webview2bootstrapper\"\n    File \"tmp\\MicrosoftEdgeWebview2Setup.exe\"\n    ExecWait '\"$pluginsdir\\webview2bootstrapper\\MicrosoftEdgeWebview2Setup.exe\" /silent /install'\n\n    SetDetailsPrint both\n    ok:\n!macroend\n\n# Copy of APP_ASSOCIATE and APP_UNASSOCIATE macros from here https://gist.github.com/nikku/281d0ef126dbc215dd58bfd5b3a5cd5b\n!macro APP_ASSOCIATE EXT FILECLASS DESCRIPTION ICON COMMANDTEXT COMMAND\n  ; Backup the previously associated file class\n  ReadRegStr $R0 SHELL_CONTEXT \"Software\\Classes\\.${EXT}\" \"\"\n  WriteRegStr SHELL_CONTEXT \"Software\\Classes\\.${EXT}\" \"${FILECLASS}_backup\" \"$R0\"\n\n  WriteRegStr SHELL_CONTEXT \"Software\\Classes\\.${EXT}\" \"\" \"${FILECLASS}\"\n\n  WriteRegStr SHELL_CONTEXT \"Software\\Classes\\${FILECLASS}\" \"\" `${DESCRIPTION}`\n  WriteRegStr SHELL_CONTEXT \"Software\\Classes\\${FILECLASS}\\DefaultIcon\" \"\" `${ICON}`\n  WriteRegStr SHELL_CONTEXT \"Software\\Classes\\${FILECLASS}\\shell\" \"\" \"open\"\n  WriteRegStr SHELL_CONTEXT \"Software\\Classes\\${FILECLASS}\\shell\\open\" \"\" `${COMMANDTEXT}`\n  WriteRegStr SHELL_CONTEXT \"Software\\Classes\\${FILECLASS}\\shell\\open\\command\" \"\" `${COMMAND}`\n!macroend\n\n!macro APP_UNASSOCIATE EXT FILECLASS\n  ; Backup the previously associated file class\n  ReadRegStr $R0 SHELL_CONTEXT \"Software\\Classes\\.${EXT}\" `${FILECLASS}_backup`\n  WriteRegStr SHELL_CONTEXT \"Software\\Classes\\.${EXT}\" \"\" \"$R0\"\n\n  DeleteRegKey SHELL_CONTEXT `Software\\Classes\\${FILECLASS}`\n!macroend\n\n!macro wails.associateFiles\n    ; Create file associations\n    {{range .Info.FileAssociations}}\n      !insertmacro APP_ASSOCIATE \"{{.Ext}}\" \"{{.Name}}\" \"{{.Description}}\" \"$INSTDIR\\{{.IconName}}.ico\" \"Open with ${INFO_PRODUCTNAME}\" \"$INSTDIR\\${PRODUCT_EXECUTABLE} $\\\"%1$\\\"\"\n\n      File \"..\\{{.IconName}}.ico\"\n    {{end}}\n!macroend\n\n!macro wails.unassociateFiles\n    ; Delete app associations\n    {{range .Info.FileAssociations}}\n      !insertmacro APP_UNASSOCIATE \"{{.Ext}}\" \"{{.Name}}\"\n\n      Delete \"$INSTDIR\\{{.IconName}}.ico\"\n    {{end}}\n!macroend\n\n!macro CUSTOM_PROTOCOL_ASSOCIATE PROTOCOL DESCRIPTION ICON COMMAND\n  DeleteRegKey SHELL_CONTEXT \"Software\\Classes\\${PROTOCOL}\"\n  WriteRegStr SHELL_CONTEXT \"Software\\Classes\\${PROTOCOL}\" \"\" \"${DESCRIPTION}\"\n  WriteRegStr SHELL_CONTEXT \"Software\\Classes\\${PROTOCOL}\" \"URL Protocol\" \"\"\n  WriteRegStr SHELL_CONTEXT \"Software\\Classes\\${PROTOCOL}\\DefaultIcon\" \"\" \"${ICON}\"\n  WriteRegStr SHELL_CONTEXT \"Software\\Classes\\${PROTOCOL}\\shell\" \"\" \"\"\n  WriteRegStr SHELL_CONTEXT \"Software\\Classes\\${PROTOCOL}\\shell\\open\" \"\" \"\"\n  WriteRegStr SHELL_CONTEXT \"Software\\Classes\\${PROTOCOL}\\shell\\open\\command\" \"\" \"${COMMAND}\"\n!macroend\n\n!macro CUSTOM_PROTOCOL_UNASSOCIATE PROTOCOL\n  DeleteRegKey SHELL_CONTEXT \"Software\\Classes\\${PROTOCOL}\"\n!macroend\n\n!macro wails.associateCustomProtocols\n    ; Create custom protocols associations\n    {{range .Info.Protocols}}\n      !insertmacro CUSTOM_PROTOCOL_ASSOCIATE \"{{.Scheme}}\" \"{{.Description}}\" \"$INSTDIR\\${PRODUCT_EXECUTABLE},0\" \"$INSTDIR\\${PRODUCT_EXECUTABLE} $\\\"%1$\\\"\"\n\n    {{end}}\n!macroend\n\n!macro wails.unassociateCustomProtocols\n    ; Delete app custom protocol associations\n    {{range .Info.Protocols}}\n      !insertmacro CUSTOM_PROTOCOL_UNASSOCIATE \"{{.Scheme}}\"\n    {{end}}\n!macroend\n"
  },
  {
    "path": "build/windows/wails.exe.manifest",
    "content": "<?xml version=\"1.0\" encoding=\"UTF-8\" standalone=\"yes\"?>\n<assembly manifestVersion=\"1.0\" xmlns=\"urn:schemas-microsoft-com:asm.v1\" xmlns:asmv3=\"urn:schemas-microsoft-com:asm.v3\">\n    <assemblyIdentity type=\"win32\" name=\"com.wails.{{.Name}}\" version=\"{{.Info.ProductVersion}}.0\" processorArchitecture=\"*\"/>\n    <dependency>\n        <dependentAssembly>\n            <assemblyIdentity type=\"win32\" name=\"Microsoft.Windows.Common-Controls\" version=\"6.0.0.0\" processorArchitecture=\"*\" publicKeyToken=\"6595b64144ccf1df\" language=\"*\"/>\n        </dependentAssembly>\n    </dependency>\n    <asmv3:application>\n        <asmv3:windowsSettings>\n            <dpiAware xmlns=\"http://schemas.microsoft.com/SMI/2005/WindowsSettings\">true/pm</dpiAware> <!-- fallback for Windows 7 and 8 -->\n            <dpiAwareness xmlns=\"http://schemas.microsoft.com/SMI/2016/WindowsSettings\">permonitorv2,permonitor</dpiAwareness> <!-- falls back to per-monitor if per-monitor v2 is not supported -->\n        </asmv3:windowsSettings>\n    </asmv3:application>\n</assembly>"
  },
  {
    "path": "frontend/.gitignore",
    "content": "# Logs\nlogs\n*.log\nnpm-debug.log*\nyarn-debug.log*\nyarn-error.log*\npnpm-debug.log*\nlerna-debug.log*\n\nnode_modules\n.DS_Store\ndist\ndist-ssr\ncoverage\n*.local\n\n/cypress/videos/\n/cypress/screenshots/\n\n# Editor directories and files\n.vscode/*\n!.vscode/extensions.json\n.idea\n*.suo\n*.ntvs*\n*.njsproj\n*.sln\n*.sw?\n.trae\n"
  },
  {
    "path": "frontend/README.md",
    "content": "# primevue-quickstart-create-vue-ts\n\nThis template should help get you started developing with Vue 3 in Vite.\n\n## Recommended IDE Setup\n\n[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).\n\n## Type Support for `.vue` Imports in TS\n\nTypeScript 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.\n\nIf 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:\n\n1. Disable the built-in TypeScript Extension\n    1. Run `Extensions: Show Built-in Extensions` from VSCode's command palette\n    2. Find `TypeScript and JavaScript Language Features`, right click and select `Disable (Workspace)`\n2. Reload the VSCode window by running `Developer: Reload Window` from the command palette.\n\n## Customize configuration\n\nSee [Vite Configuration Reference](https://vitejs.dev/config/).\n\n## Project Setup\n\n```sh\nnpm install\n```\n\n### Compile and Hot-Reload for Development\n\n```sh\nnpm run dev\n```\n\n### Type-Check, Compile and Minify for Production\n\n```sh\nnpm run build\n```\n"
  },
  {
    "path": "frontend/components.d.ts",
    "content": "/* eslint-disable */\n// @ts-nocheck\n// Generated by unplugin-vue-components\n// Read more: https://github.com/vuejs/core/pull/3399\n// biome-ignore lint: disable\nexport {}\n\n/* prettier-ignore */\ndeclare module 'vue' {\n  export interface GlobalComponents {\n    AppConfig: typeof import('./src/components/AppConfig.vue')['default']\n    AppFooter: typeof import('./src/components/AppFooter.vue')['default']\n    AppSidebar: typeof import('./src/components/AppSidebar.vue')['default']\n    AppTopbar: typeof import('./src/components/AppTopbar.vue')['default']\n    Button: typeof import('primevue/button')['default']\n    Card: typeof import('primevue/card')['default']\n    Column: typeof import('primevue/column')['default']\n    DataTable: typeof import('primevue/datatable')['default']\n    Divider: typeof import('primevue/divider')['default']\n    Drawer: typeof import('primevue/drawer')['default']\n    Empty: typeof import('./src/components/Empty.vue')['default']\n    FloatLabel: typeof import('primevue/floatlabel')['default']\n    InputText: typeof import('primevue/inputtext')['default']\n    Menu: typeof import('primevue/menu')['default']\n    Message: typeof import('primevue/message')['default']\n    ProgressBar: typeof import('primevue/progressbar')['default']\n    ProgressSpinner: typeof import('primevue/progressspinner')['default']\n    RouterLink: typeof import('vue-router')['RouterLink']\n    RouterView: typeof import('vue-router')['RouterView']\n    Tab: typeof import('primevue/tab')['default']\n    TabList: typeof import('primevue/tablist')['default']\n    TabPanel: typeof import('primevue/tabpanel')['default']\n    TabPanels: typeof import('primevue/tabpanels')['default']\n    Textarea: typeof import('primevue/textarea')['default']\n    Toast: typeof import('primevue/toast')['default']\n  }\n  export interface GlobalDirectives {\n    Ripple: typeof import('primevue/ripple')['default']\n    StyleClass: typeof import('primevue/styleclass')['default']\n    Tooltip: typeof import('primevue/tooltip')['default']\n  }\n}\n"
  },
  {
    "path": "frontend/env.d.ts",
    "content": "/// <reference types=\"vite/client\" />\n"
  },
  {
    "path": "frontend/index.html",
    "content": "<!DOCTYPE html>\n<html lang=\"en\">\n    <head>\n        <meta charset=\"UTF-8\" />\n        <meta name=\"viewport\" content=\"width=device-width, initial-scale=1.0\" />\n        <title>ForensicsTool</title>\n    </head>\n    <body>\n        <div id=\"app\"></div>\n        <script type=\"module\" src=\"/src/main.ts\"></script>\n    </body>\n</html>\n"
  },
  {
    "path": "frontend/package.json",
    "content": "{\n    \"name\": \"primevue-quickstart-create-vue-ts\",\n    \"version\": \"0.0.0\",\n    \"type\": \"module\",\n    \"scripts\": {\n        \"dev\": \"vite\",\n        \"build\": \"run-p type-check build-only\",\n        \"preview\": \"vite preview\",\n        \"build-only\": \"vite build\",\n        \"type-check\": \"vue-tsc --noEmit\"\n    },\n    \"dependencies\": {\n        \"@primeuix/themes\": \"^1.0.0\",\n        \"chart.js\": \"^4.4.8\",\n        \"echarts\": \"^6.0.0\",\n        \"pinia\": \"^3.0.4\",\n        \"primeicons\": \"^7.0.0\",\n        \"primevue\": \"^4.3.1\",\n        \"vue\": \"^3.4.27\",\n        \"vue-router\": \"^4.6.3\"\n    },\n    \"devDependencies\": {\n        \"@primevue/auto-import-resolver\": \"^4.3.1\",\n        \"@types/node\": \"^20.14.2\",\n        \"@vitejs/plugin-vue\": \"^5.0.5\",\n        \"@vue/tsconfig\": \"^0.5.1\",\n        \"npm-run-all\": \"^4.1.5\",\n        \"typescript\": \"^5.4.5\",\n        \"unplugin-vue-components\": \"^28.4.0\",\n        \"vite\": \"^5.2.13\",\n        \"vue-tsc\": \"^2.0.21\"\n    }\n}\n"
  },
  {
    "path": "frontend/package.json.md5",
    "content": "b9da4125dc6abe1642aa99eb71d943d1"
  },
  {
    "path": "frontend/pnpm-workspace.yaml",
    "content": "ignoredBuiltDependencies:\n  - esbuild\n"
  },
  {
    "path": "frontend/src/App.vue",
    "content": "<script setup>\nimport AppTopbar from \"./components/AppTopbar.vue\";\nimport AppFooter from \"./components/AppFooter.vue\";\nimport AppSidebar from \"./components/AppSidebar.vue\";\nimport { onMounted, onUnmounted } from 'vue';\n\n// 全局拖放事件处理，阻止浏览器默认行为\nconst handleGlobalDragOver = (e) => {\n  // 阻止默认行为，但不阻止事件冒泡\n  e.preventDefault();\n};\n\nconst handleGlobalDrop = (e) => {\n  // 阻止默认行为，但不阻止事件冒泡\n  e.preventDefault();\n};\n\n// 组件挂载时添加全局事件监听\nonMounted(() => {\n  document.addEventListener('dragover', handleGlobalDragOver);\n  document.addEventListener('drop', handleGlobalDrop);\n});\n\n// 组件卸载时移除全局事件监听\nonUnmounted(() => {\n  document.removeEventListener('dragover', handleGlobalDragOver);\n  document.removeEventListener('drop', handleGlobalDrop);\n});\n</script>\n\n<template>\n    <div class=\"app-layout\">\n        <AppTopbar />\n        <div class=\"app-body\">\n            <AppSidebar />\n            <div class=\"app-content\">\n                <transition name=\"page-transition\" mode=\"out-in\">\n                    <router-view />\n                </transition>\n            </div>\n        </div>\n        <!-- <AppFooter /> -->\n    </div>\n</template>\n\n<style>\n/* 页面过渡效果样式 */\n.page-transition-enter-active,\n.page-transition-leave-active {\n    transition: all 400ms ease;\n}\n\n.page-transition-enter-from {\n    transform: scale(0.9);\n}\n\n.page-transition-leave-to {\n    transform: scale(1.1);\n}\n\n.page-transition-enter-active,\n.page-transition-leave-active {\n    transition: transform 400ms ease, opacity 400ms ease;\n}\n\n.page-transition-enter-from,\n.page-transition-leave-to {\n    opacity: 0;\n}\n\n</style>\n"
  },
  {
    "path": "frontend/src/assets/styles/main.css",
    "content": "@import \"primeicons/primeicons.css\";\n\nhtml {\n    box-sizing: border-box;\n    -webkit-font-smoothing: antialiased;\n    -moz-osx-font-smoothing: grayscale;\n    font-family: \"Inter\", sans-serif;\n    font-optical-sizing: auto;\n    font-variation-settings: normal;\n    font-weight: 400;\n}\n\n/* 全局滚动条样式 */\n::-webkit-scrollbar {\n    width: 6px;\n    height: 6px;\n}\n\n::-webkit-scrollbar-track {\n    background: transparent;\n}\n\n::-webkit-scrollbar-thumb {\n    background-color: var(--p-surface-300);\n    border-radius: 3px;\n    transition: background-color 0.2s;\n}\n\n.p-dark ::-webkit-scrollbar-thumb {\n    background-color: var(--p-surface-600);\n}\n\n::-webkit-scrollbar-thumb:hover {\n    background-color: var(--p-surface-400);\n}\n\n.p-dark ::-webkit-scrollbar-thumb:hover {\n    background-color: var(--p-surface-500);\n}\n\n/* 滚动条交点样式 */\n::-webkit-scrollbar-corner {\n    background: transparent;\n}\n\nbody {\n    background-color: var(--p-surface-50);\n    min-height: 100vh;\n}\n\n.p-dark body {\n    background-color: var(--p-surface-950);\n}\n\n.layout-container {\n    background-color: var(--p-surface-50);\n    color: var(--p-surface-950);\n    min-height: 100vh;\n    padding: 2rem;\n    display: flex;\n    flex-direction: column;\n    gap: 1.5rem;\n}\n\n.p-dark .layout-container {\n    background-color: var(--p-surface-950);\n    color: var(--p-surface-0);\n}\n\n/* 重置HTML和body样式，确保页面不被滚动 */\nhtml, body {\n    margin: 0;\n    padding: 0;\n    height: 100%;\n    overflow: hidden;\n}\n\n#app {\n    height: 100vh;\n    overflow: hidden;\n}\n\n.app-layout {\n    background-color: var(--p-surface-50);\n    color: var(--p-surface-950);\n    height: 100%;\n    display: flex;\n    flex-direction: column;\n}\n\n.p-dark .app-layout {\n    background-color: var(--p-surface-950);\n    color: var(--p-surface-0);\n}\n\n.app-body {\n    flex: 1;\n    display: flex;\n    overflow: hidden;\n    min-height: 0; /* 确保flex子项可以收缩 */\n}\n\n.app-content {\n    flex: 1;\n    overflow-y: hidden;\n    background-color: var(--p-surface-50);\n    height: 100%;\n}\n\n.p-dark .app-content {\n    background-color: var(--p-surface-950);\n}\n\n/* TopBar样式 */\n.topbar {\n    background-color: var(--p-surface-200) !important;\n    border-bottom: 1px solid var(--p-surface-200);\n    z-index: 10;\n}\n\n.p-dark .topbar {\n    background-color: var(--p-surface-800) !important;\n    border-bottom-color: var(--p-surface-700);\n}\n\n.topbar-container {\n    display: flex;\n    justify-content: space-between;\n    align-items: center;\n    max-width: 100%;\n}\n\n/* Footer样式 */\n.footer {\n    background-color: var(--p-surface-0);\n    border-top: 1px solid var(--p-surface-200);\n    padding: 0.75rem 1.5rem;\n    z-index: 10;\n}\n\n.p-dark .footer {\n    background-color: var(--p-surface-900);\n    border-top-color: var(--p-surface-700);\n}\n\n.footer-container {\n    display: flex;\n    justify-content: space-between;\n    align-items: center;\n    max-width: 100%;\n}\n\n/* 侧边栏样式调整 */\n.sidebar {\n    height: 100% !important;\n    display: flex;\n    flex-direction: column;\n}\n\n.layout-grid {\n    display: flex;\n    flex-direction: column;\n    flex: 1;\n    max-width: none;\n    width: 100%;\n    margin: 0 auto;\n    gap: 1.5rem;\n}\n\n.layout-grid-row {\n    display: flex;\n    flex-direction: row;\n    gap: 1.5rem;\n    width: 100%;\n}\n\n.layout-card {\n    background-color: var(--p-surface-0);\n    color: var(--p-surface-950);\n    padding: 1.5rem;\n    border-radius: 0.5rem;\n    border: 1px solid var(--p-surface-200);\n    display: flex;\n    flex-direction: column;\n    gap: 0.5rem;\n}\n\n.p-dark .layout-card {\n    background-color: var(--p-surface-900);\n    color: var(--p-surface-0);\n    border-color: var(--p-surface-700);\n}\n\n.stats {\n    display: grid;\n    grid-template-columns: 1fr 1fr 1fr 1fr;\n    gap: 1.714rem;\n    position: relative;\n    z-index: 0;\n}\n\n.stats-icon-box {\n    flex-shrink: 0;\n    background-color: var(--p-primary-100);\n    color: var(--p-primary-600);\n    border-radius: 0.5rem;\n    width: 2rem;\n    height: 2rem;\n    display: flex;\n    align-items: center;\n    justify-content: center;\n    border: 1px solid var(--p-primary-200);\n}\n\n.p-dark .stats-icon-box {\n    background-color: color-mix(in srgb, var(--p-primary-400), transparent 80%);\n    border-color: color-mix(in srgb, var(--p-primary-400), transparent 70%);\n    color: var(--p-primary-200);\n}\n\n.stats-header {\n    display: flex;\n    align-items: flex-start;\n    gap: 0.5rem;\n    justify-content: space-between;\n}\n\n.stats-title {\n    font-size: 1.25rem;\n    font-weight: 300;\n    line-height: 1.25;\n    color: var(--p-surface-900);\n}\n\n.p-dark .stats-title {\n    color: var(--p-surface-0);\n}\n\n.stats-content {\n    display: flex;\n    flex-direction: column;\n    gap: 0.25rem;\n    width: 100%;\n}\n\n.stats-value {\n    font-size: 1.875rem;\n    font-weight: 500;\n    line-height: 1.25;\n    color: var(--p-surface-900);\n}\n\n.p-dark .stats-value {\n    color: var(--p-surface-0);\n}\n\n.stats-subtitle {\n    color: var(--p-surface-600);\n    font-size: 0.875rem;\n    line-height: 1.25;\n}\n\n.p-dark .stats-subtitle {\n    color: var(--p-surface-400);\n}\n\n.col-item-2 {\n    width: 50%;\n}\n\n/* 统一的结果卡片样式 */\n.result-card {\n    background-color: var(--p-surface-0);\n    color: var(--p-surface-950);\n    border: 1px solid var(--p-surface-200);\n    border-radius: 0.5rem;\n    padding: 0.5rem;\n    margin: 0;\n    display: flex;\n    flex-direction: column;\n    flex: 1;\n    overflow: scroll;\n    min-height: 0;\n}\n\n.p-dark .result-card {\n    background-color: var(--p-surface-900);\n    color: var(--p-surface-0);\n    border-color: var(--p-surface-700);\n}\n\n.result-output {\n    white-space: pre-wrap;\n    font-family: monospace;\n    font-size: 0.9rem;\n    line-height: 1.5;\n    color: var(--p-surface-950);\n}\n\n.p-dark .result-output {\n    color: var(--p-surface-0);\n}\n\n.empty {\n    display: flex;\n    flex-direction: column;\n    align-items: center;\n    justify-content: center;\n    height: 100%;\n    padding: 3rem;\n    font-size: 1.2rem;\n    color: var(--p-surface-600);\n}\n\n.p-dark .empty {\n    color: var(--p-surface-400);\n}\n\n/* 统一的表单卡片样式 */\n.form-card {\n    background-color: var(--p-surface-0);\n    color: var(--p-surface-950);\n    border: 1px solid var(--p-surface-200);\n    border-radius: 0.5rem;\n    padding: 1rem;\n    margin: 0;\n    box-shadow: 0 1px 3px 0 rgba(0, 0, 0, 0.1), 0 1px 2px 0 rgba(0, 0, 0, 0.06);\n}\n\n.p-dark .form-card {\n    background-color: var(--p-surface-900);\n    color: var(--p-surface-0);\n    border-color: var(--p-surface-700);\n}\n\n/* 统一的页面容器样式 */\n.page-container {\n    padding: 1rem;\n    display: flex;\n    flex-direction: column;\n    height: 100%;\n    gap: 0.75rem;\n    margin: 0;\n}\n\n.chart-header {\n    display: flex;\n    flex-direction: column;\n    gap: 1rem;\n}\n\n.chart-title {\n    font-size: 1rem;\n    font-weight: 500;\n    color: var(--p-surface-900);\n}\n\n.p-dark .chart-title {\n    color: var(--p-surface-0);\n}\n\n.chart-content {\n    display: flex;\n    flex-direction: column;\n    gap: 0.75rem;\n    padding: 0.5rem 0;\n}\n.activity-list {\n    display: flex;\n    flex-direction: column;\n    gap: 0.75rem;\n    padding: 0.5rem 0;\n}\n\n.activity-item {\n    display: flex;\n    align-items: center;\n    gap: 0.75rem;\n    padding: 0.75rem;\n    border: 1px solid var(--p-surface-200);\n    border-radius: 0.5rem;\n    background-color: var(--p-surface-50);\n}\n\n.p-dark .activity-item {\n    background-color: var(--p-surface-800);\n    border-color: var(--p-surface-700);\n}\n\n.activity-icon {\n    font-size: 1.125rem !important;\n}\n\n.activity-icon.green {\n    color: #22c55e;\n}\n\n.activity-icon.blue {\n    color: #3b82f6;\n}\n\n.activity-icon.yellow {\n    color: #eab308;\n}\n\n.activity-icon.pink {\n    color: #ec4899;\n}\n\n.activity-content {\n    display: flex;\n    flex-direction: column;\n    gap: 0.25rem;\n}\n\n.activity-text {\n    font-size: 0.875rem;\n    font-weight: 500;\n}\n\n.activity-time {\n    font-size: 0.75rem;\n    color: var(--p-surface-600);\n}\n\n.p-dark .activity-time {\n    color: var(--p-surface-400);\n}\n\n.products-header {\n    display: flex;\n    align-items: center;\n    justify-content: space-between;\n    margin-bottom: 1rem;\n}\n\n@media (max-width: 640px) {\n    .products-header {\n        flex-direction: column;\n        gap: 0.5rem;\n    }\n\n    .products-header .search-field {\n        width: 100%;\n    }\n}\n\n.products-title {\n    font-size: 1rem;\n    font-weight: 500;\n    color: var(--p-surface-900);\n}\n\n.p-dark .products-title {\n    color: var(--p-surface-0);\n}\n\n.products-table-container {\n    display: flex;\n    flex-direction: column;\n    gap: 0.5rem;\n    background-color: var(--p-surface-0);\n}\n\n.p-dark .products-table-container {\n    background-color: var(--p-surface-900);\n}\n\n.products-table {\n    width: 100%;\n    color: var(--p-surface-900);\n}\n\n.p-dark .products-table {\n    color: var(--p-surface-0);\n}\n\n.products-table-mask {\n    backdrop-filter: blur(4px) !important;\n    background-color: color-mix(in srgb, var(--p-surface-0), transparent 80%) !important;\n}\n\n.p-dark .products-table-mask {\n    background-color: color-mix(in srgb, var(--p-surface-900), transparent 80%) !important;\n}\n\n.products-table-loading {\n    color: var(--p-primary-500) !important;\n}\n\n.products-search {\n    font-size: 0.875rem;\n    padding: 0.5rem;\n    background-color: var(--p-surface-0);\n    color: var(--p-surface-900);\n    border: 1px solid var(--p-surface-200);\n}\n\n.p-dark .products-search {\n    background-color: var(--p-surface-900);\n    color: var(--p-surface-0);\n    border-color: var(--p-surface-700);\n}\n\n@media (min-width: 768px) {\n    .products-search {\n        width: auto !important;\n    }\n}\n\n@media (max-width: 767px) {\n    .products-search {\n        width: 100% !important;\n    }\n}\n\n@media (max-width: 991px) {\n    .stats {\n        grid-template-columns: 1fr 1fr;\n    }\n    .layout-grid-row {\n        flex-direction: column;\n    }\n    .col-item-2 {\n        width: 100%;\n    }\n}\n\n@media (max-width: 480px) {\n    .stats {\n        grid-template-columns: 1fr;\n    }\n}\n\n.topbar {\n    background-color: var(--p-surface-0);\n    padding: 0.15rem;\n    /* border-radius: 1rem; */\n    max-width: none;\n    margin-left: auto;\n    margin-right: auto;\n    border: 1px solid var(--p-surface-200);\n    width: 100%;\n}\n\n.p-dark .topbar {\n    background-color: var(--p-surface-900);\n    border-color: var(--p-surface-700);\n}\n\n.topbar-container {\n    display: flex;\n    justify-content: space-between;\n    align-items: center;\n}\n\n.topbar-brand {\n    display: flex;\n    gap: 0.75rem;\n    align-items: center;\n}\n\n.topbar-brand-text {\n    display: none;\n}\n\n@media (min-width: 640px) {\n    .topbar-brand-text {\n        display: flex;\n        flex-direction: column;\n    }\n}\n\n.topbar-title {\n    font-size: 1.25rem;\n    font-weight: 300;\n    color: var(--p-surface-700);\n    line-height: 1;\n}\n\n.p-dark .topbar-title {\n    color: var(--p-surface-100);\n}\n\n.topbar-subtitle {\n    font-size: 0.875rem;\n    font-weight: 500;\n    color: var(--p-primary-500);\n    line-height: 1.25;\n}\n\n.topbar-actions {\n    display: flex;\n    align-items: center;\n    gap: 0.5rem;\n}\n\n.topbar-theme-button {\n    width: 2.5rem;\n    height: 2.5rem;\n    display: flex;\n    align-items: center;\n    justify-content: center;\n    border-radius: 9999px;\n    transition: all 0.2s;\n    color: var(--p-surface-900);\n}\n\n.p-dark .topbar-theme-button {\n    color: var(--p-primary-500);\n}\n\n.topbar-theme-button:hover {\n    background-color: var(--p-surface-100);\n}\n\n.p-dark .topbar-theme-button:hover {\n    background-color: var(--p-surface-800);\n}\n\n.topbar-theme-button.topbar-close-button:hover {\n    background-color: #eb050d18 !important;\n}\n\n.fill-primary {\n    fill: var(--p-primary-500);\n}\n\n.p-dark .fill-primary {\n    fill: var(--p-primary-400);\n}\n\n.fill-surface {\n    fill: var(--p-surface-900);\n}\n\n.p-dark .fill-surface {\n    fill: var(--p-surface-0);\n}\n\n.config-panel {\n    position: absolute;\n    top: 4rem;\n    right: 0;\n    width: 16rem;\n    padding: 1rem;\n    background-color: var(--p-surface-0);\n    border-radius: 0.375rem;\n    box-shadow: 0 10px 15px -3px rgb(0 0 0 / 0.1), 0 4px 6px -4px rgb(0 0 0 / 0.1);\n    border: 1px solid var(--p-surface-200);\n    transform-origin: top;\n    z-index: 50;\n}\n\n.p-dark .config-panel {\n    background-color: var(--p-surface-900);\n    border-color: var(--p-surface-700);\n}\n\n.config-section {\n    display: flex;\n    flex-direction: column;\n    gap: 1rem;\n}\n\n.config-label {\n    font-size: 0.875rem;\n    color: var(--p-surface-600);\n    font-weight: 600;\n}\n\n.p-dark .config-label {\n    color: var(--p-surface-400);\n}\n\n.config-colors {\n    padding-top: 0.5rem;\n    display: flex;\n    gap: 0.5rem;\n    flex-wrap: wrap;\n    justify-content: space-between;\n}\n\n.color-button {\n    border: none;\n    width: 1.25rem;\n    height: 1.25rem;\n    border-radius: 9999px;\n    padding: 0;\n    cursor: pointer;\n}\n\n.selected {\n    --ring-offset-shadow: 0 0 0 var(--ring-offset-width) var(--ring-offset-color);\n    --ring-shadow: 0 0 0 calc(var(--ring-width) + var(--ring-offset-width)) var(--ring-color);\n    --ring-width: 2px;\n    --ring-offset-width: 2px;\n    --ring-color: var(--p-primary-500);\n    --ring-offset-color: #ffffff;\n    box-shadow: var(--ring-offset-shadow), var(--ring-shadow);\n}\n\n.hidden {\n    display: none;\n}\n\n.footer {\n    background-color: var(--p-surface-0);\n    padding: 1.5rem;\n    border-radius: 1rem;\n    max-width: none;\n    margin-left: auto;\n    margin-right: auto;\n    border: 1px solid var(--p-surface-200);\n    width: 100%;\n}\n\n.p-dark .footer {\n    background-color: var(--p-surface-900);\n    border-color: var(--p-surface-700);\n}\n\n.footer-container {\n    display: flex;\n    justify-content: space-between;\n    align-items: center;\n    gap: 0.5rem;\n}\n\n@media (max-width: 640px) {\n    .footer-container {\n        flex-direction: column;\n    }\n}\n\n.p-select {\n    width: 100%;\n}\n\n.footer-copyright {\n    font-size: 0.875rem;\n    color: var(--p-surface-600);\n}\n\n.p-dark .footer-copyright {\n    color: var(--p-surface-400);\n}\n\n.footer-links {\n    display: flex;\n    gap: 1rem;\n}\n\n.footer-link {\n    color: var(--p-surface-600);\n    font-size: 0.875rem;\n    transition: color 0.2s;\n}\n\n.p-dark .footer-link {\n    color: var(--p-surface-400);\n}\n\n.footer-link:hover {\n    color: var(--p-primary-500);\n}\n\n.footer-icon {\n    font-size: 1.25rem;\n}\n\n.relative {\n    position: relative;\n}\n\n.animate-fadeout {\n    animation: fadeout 0.15s linear;\n}\n\n.animate-scalein {\n    animation: scalein 0.15s linear;\n}\n\n/* PrimeVue组件焦点状态样式适配 */\n\n/* InputText组件样式 */\n.p-inputtext {\n    border-color: var(--p-surface-300);\n    transition: border-color 0.3s, box-shadow 0.3s;\n}\n\n.p-inputtext:enabled:focus {\n    border-color: var(--p-primary-500) !important;\n    box-shadow: 0 0 0 2px color-mix(in srgb, var(--p-primary-500), transparent 80%);\n}\n\n.p-dark .p-inputtext {\n    border-color: var(--p-surface-600);\n}\n\n.p-dark .p-inputtext:enabled:focus {\n    border-color: var(--p-primary-400) !important;\n    box-shadow: 0 0 0 2px color-mix(in srgb, var(--p-primary-400), transparent 70%);\n}\n\n/* Select/Dropdown组件样式 */\n.p-dropdown {\n    border-color: var(--p-surface-300);\n    transition: border-color 0.3s, box-shadow 0.3s;\n}\n\n.p-dropdown:focus {\n    outline: none;\n    border-color: var(--p-primary-500);\n    box-shadow: 0 0 0 2px color-mix(in srgb, var(--p-primary-500), transparent 80%);\n}\n\n.p-dark .p-dropdown {\n    border-color: var(--p-surface-600);\n}\n\n.p-dark .p-dropdown:focus {\n    border-color: var(--p-primary-400);\n    box-shadow: 0 0 0 2px color-mix(in srgb, var(--p-primary-400), transparent 70%);\n}\n\n/* Button组件样式 */\n.p-button {\n    transition: box-shadow 0.3s;\n}\n\n.p-button:focus {\n    outline: none;\n    box-shadow: 0 0 0 2px color-mix(in srgb, var(--p-primary-500), transparent 80%);\n}\n\n.p-dark .p-button:focus {\n    box-shadow: 0 0 0 2px color-mix(in srgb, var(--p-primary-400), transparent 70%);\n}\n\n/* DataTable组件样式 */\n.p-datatable {\n    transition: background-color 0.3s;\n}\n\n.p-datatable .p-datatable-tbody > tr:focus {\n    outline: none;\n    background-color: color-mix(in srgb, var(--p-primary-500), transparent 90%);\n}\n\n.p-dark .p-datatable .p-datatable-tbody > tr:focus {\n    background-color: color-mix(in srgb, var(--p-primary-400), transparent 85%);\n}\n\n.p-datatable-tbody > tr > td {\n    /* text-overflow: ellipsis !important; */\n    max-width: 20vw;\n    overflow: scroll !important;\n    /* white-space: nowrap !important; */\n    word-wrap: break-word !important;\n}\n\n\n/* Tabs组件样式 */\n.p-tabs .p-tabs-nav li .p-tabs-nav-link {\n    transition: box-shadow 0.3s;\n}\n\n.p-tabs .p-tabs-nav li .p-tabs-nav-link:focus {\n    outline: none;\n    box-shadow: inset 0 -2px 0 var(--p-primary-500);\n}\n\n.p-dark .p-tabs .p-tabs-nav li .p-tabs-nav-link:focus {\n    box-shadow: inset 0 -2px 0 var(--p-primary-400);\n}\n\n.p-tabpanels {\n    padding: 0 !important;\n}\n\n/* Menu组件样式 */\n.p-menuitem-link {\n    transition: background-color 0.3s;\n}\n\n.p-menuitem-link:focus {\n    outline: none;\n    background-color: color-mix(in srgb, var(--p-primary-500), transparent 90%);\n}\n\n.p-dark .p-menuitem-link:focus {\n    background-color: color-mix(in srgb, var(--p-primary-400), transparent 85%);\n}\n\n/* InputSwitch组件样式 */\n.p-inputswitch {\n    transition: box-shadow 0.3s;\n}\n\n.p-inputswitch:focus {\n    outline: none;\n    box-shadow: 0 0 0 2px color-mix(in srgb, var(--p-primary-500), transparent 80%);\n}\n\n.p-dark .p-inputswitch:focus {\n    box-shadow: 0 0 0 2px color-mix(in srgb, var(--p-primary-400), transparent 70%);\n}\n\n/* Calendar组件样式 */\n.p-datepicker {\n    border-color: var(--p-surface-300);\n    transition: border-color 0.3s, box-shadow 0.3s;\n}\n\n.p-datepicker:focus {\n    outline: none;\n    border-color: var(--p-primary-500);\n    box-shadow: 0 0 0 2px color-mix(in srgb, var(--p-primary-500), transparent 80%);\n}\n\n.p-dark .p-datepicker {\n    border-color: var(--p-surface-600);\n}\n\n.p-dark .p-datepicker:focus {\n    border-color: var(--p-primary-400);\n    box-shadow: 0 0 0 2px color-mix(in srgb, var(--p-primary-400), transparent 70%);\n}\n\n/* InputNumber组件样式 */\n.p-inputnumber {\n    border-color: var(--p-surface-300);\n    transition: border-color 0.3s, box-shadow 0.3s;\n}\n\n.p-inputnumber:focus {\n    outline: none;\n    border-color: var(--p-primary-500);\n    box-shadow: 0 0 0 2px color-mix(in srgb, var(--p-primary-500), transparent 80%);\n}\n\n.p-dark .p-inputnumber {\n    border-color: var(--p-surface-600);\n}\n\n.p-dark .p-inputnumber:focus {\n    border-color: var(--p-primary-400);\n    box-shadow: 0 0 0 2px color-mix(in srgb, var(--p-primary-400), transparent 70%);\n}\n\n.p-select:not(.p-disabled).p-focus {\n    border-color: var(--p-primary-600) !important;\n}\n\n/* Card组件样式 */\n.p-card {\n    background-color: var(--p-surface-0);\n    color: var(--p-surface-950);\n    border: 1px solid var(--p-primary-500) !important;\n    transition: border-color 0.3s, box-shadow 0.3s;\n}\n\n\n.p-dark .p-card {\n    background-color: var(--p-surface-900);\n    color: var(--p-surface-0);\n    border-color: var(--p-primary-700) !important;\n}\n\n\n/* FloatLabel组件样式 */\n.p-floatlabel-on {\n    color: var(--p-surface-600);\n}\n\n.p-floatlabel-on:has(input:focus) label {\n    color: var(--p-primary-500);\n    background-color: rgba(red, green, blue, 1);\n}\n\n/* .p-floatlabel-on:has(input[placeholder]) label {\n    background-color: transparent !important;\n} */\n\n.p-dark .p-floatlabel-on {\n    color: var(--p-surface-400);\n}\n\n.p-dark .p-floatlabel-on:has(input:focus) label {\n    color: var(--p-primary-400);\n    background-color: rgba(red, green, blue, 1);\n}\n\n.p-floatlabel {\n    color: var(--p-surface-600);\n}\n\n.p-floatlabel:has(input:focus) label, .p-floatlabel:has(input.p-filled) label {\n    color: var(--p-primary-500) !important;\n    background-color: rgba(red, green, blue, 1);\n}\n\n.p-dark .p-floatlabel {\n    color: var(--p-surface-400);\n}\n\n.p-dark .p-floatlabel:has(input:focus) label, .p-floatlabel:has(input.p-filled) label {\n    color: var(--p-primary-400) !important;\n    background-color: rgba(red, green, blue, 1);\n}\n\n/* Column组件样式（DataTable内部） */\n.p-column {\n    transition: background-color 0.3s;\n}\n\n.p-column:focus {\n    outline: none;\n    background-color: color-mix(in srgb, var(--p-primary-500), transparent 90%);\n}\n\n.p-dark .p-column:focus {\n    background-color: color-mix(in srgb, var(--p-primary-400), transparent 85%);\n}\n\n/* TabPanel组件样式 */\n.p-tabpanel {\n    background-color: var(--p-surface-0);\n    color: var(--p-surface-950);\n    transition: background-color 0.3s;\n}\n\n.p-dark .p-tabpanel {\n    background-color: var(--p-surface-900);\n    color: var(--p-surface-0);\n}\n\n\n/* Toast组件样式 */\n.p-toast {\n    background-color: var(--p-surface-0);\n    color: var(--p-surface-950);\n    /* border: 1px solid var(--p-surface-200); */\n}\n\n.p-dark .p-toast {\n    background-color: var(--p-surface-900);\n    color: var(--p-surface-0);\n    border-color: var(--p-surface-700);\n}\n\n.p-toast-message {\n    background-color: var(--p-surface-0);\n    color: var(--p-surface-950);\n    border: 1px solid var(--p-surface-200);\n}\n\n.p-dark .p-toast-message {\n    background-color: var(--p-surface-900);\n    color: var(--p-surface-0);\n    border-color: var(--p-surface-700);\n}\n\n.p-toast-message-success {\n    background-color: color-mix(in srgb, var(--p-green-500), transparent 90%);\n    border-color: var(--p-green-500);\n    color: var(--p-green-700);\n}\n\n.p-dark .p-toast-message-success {\n    background-color: color-mix(in srgb, var(--p-green-400), transparent 85%);\n    border-color: var(--p-green-400);\n    color: var(--p-green-300);\n}\n\n.p-toast-message-error {\n    background-color: color-mix(in srgb, var(--p-red-500), transparent 90%);\n    border-color: var(--p-red-500);\n    color: var(--p-red-700);\n}\n\n.p-dark .p-toast-message-error {\n    background-color: color-mix(in srgb, var(--p-red-400), transparent 85%);\n    border-color: var(--p-red-400);\n    color: var(--p-red-300);\n}\n\n.p-toast-message-warn {\n    background-color: color-mix(in srgb, var(--p-orange-500), transparent 90%);\n    border-color: var(--p-orange-500);\n    color: var(--p-orange-700);\n}\n\n.p-dark .p-toast-message-warn {\n    background-color: color-mix(in srgb, var(--p-orange-400), transparent 85%);\n    border-color: var(--p-orange-400);\n    color: var(--p-orange-300);\n}\n\n.p-toast-message-info {\n    background-color: color-mix(in srgb, var(--p-blue-500), transparent 90%);\n    border-color: var(--p-blue-500);\n    color: var(--p-blue-700);\n}\n\n.p-dark .p-toast-message-info {\n    background-color: color-mix(in srgb, var(--p-blue-400), transparent 85%);\n    border-color: var(--p-blue-400);\n    color: var(--p-blue-300);\n}\n\n/* 公共表单布局样式 */\n.form-layout {\n    display: flex;\n    flex-direction: column;\n    gap: 0.75rem;\n}\n\n/* 输入行布局 - 一行两个输入框 */\n.input-row {\n    display: flex;\n    gap: 0.75rem;\n    width: 100%;\n}\n\n/* 按钮行布局 - 等分宽度 */\n.button-row {\n    display: flex;\n    gap: 0.75rem;\n    width: 100%;\n    margin-top: 0.5rem;\n}\n\n.field {\n    display: flex;\n    flex-direction: column;\n    gap: 0.25rem;\n}\n\n/* 全宽字段 - 用于下拉选择框 */\n.field.full-width,\n.field > .full-width {\n    width: 100%;\n}\n\n/* 半宽字段 - 用于文本输入框 */\n.field.half-width {\n    flex: 1;\n}\n\n.field label {\n    margin-bottom: 0.25rem;\n    font-weight: 500;\n    color: var(--text-color);\n}\n\n/* 等宽按钮 */\n.button.equal-width {\n    flex: 1;\n    border-radius: 4px;\n}\n\n.p-progressbar.equal-width {\n    flex: 1;\n    border-radius: 4px;\n}\n\n/* 结果输出样式 */\n.result-output {\n    white-space: pre-wrap;\n    font-family: monospace;\n    font-size: 0.9rem;\n    line-height: 1.5;\n    color: var(--p-surface-950);\n}\n\n.p-dark .result-output {\n    color: var(--p-surface-0);\n}\n\n.result-container {\n    flex: 1;\n    overflow: auto;\n    border: 1px solid var(--p-surface-200);\n    border-radius: 4px;\n    padding: 1rem;\n    background-color: var(--p-surface-50);\n}\n\n.p-dark .result-container {\n    border-color: var(--p-surface-700);\n    background-color: var(--p-surface-800);\n}\n\n/* 空状态样式 */\n.empty {\n    display: flex;\n    flex-direction: column;\n    align-items: center;\n    justify-content: center;\n    height: 100%;\n    padding: 3rem;\n    font-size: 1.2rem;\n    color: var(--p-surface-600);\n}\n\n.p-dark .empty {\n    color: var(--p-surface-400);\n}\n\n/* 公共PrimeVue组件样式调整 */\n.p-dropdown {\n    width: 100%;\n}\n\n.p-inputtext {\n    width: 100%;\n}\n\n.p-button {\n    margin: 0.25rem;\n}\n\n.p-datatable {\n    font-size: 0.875rem;\n}\n\n.p-tabs {\n    margin-top: -1.5rem;\n    flex: 1;\n    display: flex;\n    flex-direction: column;\n}\n\n.p-tabs .p-tabview-panels {\n    flex: 1;\n    display: flex;\n    flex-direction: column;\n}\n\n.p-tabs .p-tabview-panel {\n    flex: 1;\n    display: flex;\n    flex-direction: column;\n}\n\n/* 响应式调整 */\n@media (max-width: 768px) {\n    .form-card {\n        padding: 0.5rem;\n    }\n    \n    .input-row {\n        flex-direction: column;\n    }\n    \n    .button-row {\n        flex-direction: column;\n    }\n    \n    .p-datatable {\n        font-size: 0.75rem;\n    }\n}\n\n/* Tooltip组件样式 */\n.p-tooltip {\n    color: var(--p-surface-0);\n    max-width: 30vw !important;\n}\n\n.p-dark .p-tooltip {\n    color: var(--p-surface-950);\n}\n\n/* 通用焦点状态样式 */\n*:focus-visible {\n    outline: 2px solid var(--p-primary-500);\n    outline-offset: 2px;\n}\n\n.p-dark *:focus-visible {\n    outline: 2px solid var(--p-primary-400);\n}\n\n@keyframes fadeout {\n    0% {\n        opacity: 1;\n    }\n    100% {\n        opacity: 0;\n    }\n}\n\n@keyframes scalein {\n    0% {\n        opacity: 0;\n        transform: scaleY(0.8);\n        transition: transform 0.12s cubic-bezier(0, 0, 0.2, 1), opacity 0.12s cubic-bezier(0, 0, 0.2, 1);\n    }\n    100% {\n        opacity: 1;\n        transform: scaleY(1);\n    }\n}\n\n\n.p-progressbar-label {\n    color: var(--p-surface-700) !important;\n}\n\n.p-dark .p-progressbar-label {\n    color: var(--p-surface-300) !important;\n}\n\n/* 视图控制区域样式 */\n.view-controls {\n    display: flex;\n    justify-content: space-between;\n    align-items: center;\n    background-color: var(--surface-card);\n    border-top: 1px solid var(--surface-border);\n    border-bottom: 1px solid var(--surface-border);\n}\n\n/* 视图切换按钮组样式 */\n.view-switch-buttons {\n    display: flex;\n    gap: 0.5rem;\n}\n\n/* 折叠按钮样式 */\n.collapse-button {\n    display: flex;\n    justify-content: center;\n    align-items: center;\n    width: 30px;\n    height: 30px;\n    cursor: pointer;\n    border-radius: 4px;\n    transition: all 0.2s ease;\n}\n\n.collapse-button:hover {\n    background-color: var(--surface-hover);\n}\n\n.collapse-button i {\n    font-size: 0.8rem;\n    color: var(--text-color-secondary);\n}\n\n/* 卡片收起状态样式 */\n.form-card.collapsed {\n    height: 0;\n    opacity: 0;\n    margin: 0;\n    padding: 0;\n    border: none;\n}\n\n.card-content.collapsed-content {\n    max-height: 0;\n    opacity: 0;\n    overflow: hidden;\n    margin: 0;\n    padding: 0;\n}\n\n/* 按钮行样式 */\n.button-item {\n    flex: 1;\n    min-width: 120px;\n}\n\n/* 固定表头宽度样式 */\n.fixed-header-table .p-datatable-thead > tr > th {\n    position: sticky !important;\n    top: 0 !important;\n    z-index: 10 !important;\n    background-color: var(--surface-card) !important;\n    box-shadow: 0 2px 4px rgba(0,0,0,0.1) !important;\n    min-width: inherit !important;\n    max-width: inherit !important;\n    width: inherit !important;\n}\n\n.fixed-header-table .p-datatable-tbody > tr > td {\n    min-width: inherit !important;\n    max-width: inherit !important;\n    width: inherit !important;\n}\n\n/* 确保表格在滚动时列宽保持一致 */\n.fixed-header-table .p-datatable-scrollable-header {\n    overflow: hidden !important;\n}\n\n.fixed-header-table .p-datatable-scrollable-body {\n    overflow: auto !important;\n}\n\n/* 防止内容溢出 */\n.fixed-header-table .p-datatable-scrollable-body td {\n    white-space: nowrap;\n    overflow: hidden;\n    text-overflow: ellipsis;\n}"
  },
  {
    "path": "frontend/src/components/AppConfig.vue",
    "content": "<script setup>\nimport { useLayout } from \"../composables/useLayout\";\n\nconst { primaryColors, surfaces, primary, surface, isDarkMode, updateColors } = useLayout();\n</script>\n\n<template>\n    <div class=\"config-panel hidden\">\n        <div class=\"config-section\">\n            <div>\n                <span class=\"config-label\">主题</span>\n                <div class=\"config-colors\">\n                    <button\n                        v-for=\"pc of primaryColors\"\n                        :key=\"pc.name\"\n                        type=\"button\"\n                        :title=\"pc.name\"\n                        :class=\"['color-button', { selected: primary === pc.name }]\"\n                        :style=\"{ backgroundColor: pc.palette['500'] }\"\n                        @click=\"updateColors('primary', pc.name)\"\n                    />\n                </div>\n            </div>\n            <div>\n                <span class=\"config-label\">底色</span>\n                <div class=\"config-colors\">\n                    <button\n                        v-for=\"s of surfaces\"\n                        :key=\"s.name\"\n                        type=\"button\"\n                        :title=\"s.name\"\n                        :class=\"[\n                            'color-button',\n                            {\n                                selected: surface\n                                    ? surface === s.name\n                                    : isDarkMode\n                                    ? s.name === 'zinc'\n                                    : s.name === 'slate',\n                            },\n                        ]\"\n                        :style=\"{ backgroundColor: s.palette['500'] }\"\n                        @click=\"updateColors('surface', s.name)\"\n                    />\n                </div>\n            </div>\n        </div>\n    </div>\n</template>\n"
  },
  {
    "path": "frontend/src/components/AppFooter.vue",
    "content": "<template>\n    <div class=\"footer\">\n        <div class=\"footer-container\">\n            footer\n        </div>\n    </div>\n</template>\n"
  },
  {
    "path": "frontend/src/components/AppSidebar.vue",
    "content": "<template>\n    <div class=\"sidebar\" :class=\"{ 'sidebar-collapsed': isCollapsed }\" style=\"--wails-draggable: drag;\">\n        <Menu :model=\"menuItems\" class=\"sidebar-menu\">\n            <template #start>\n                <div class=\"sidebar-header\">\n                    <Button @click=\"toggleSidebar\" class=\"toggle-button\"\n                        :icon=\"isCollapsed ? 'pi pi-bars' : 'pi pi-bars'\" text />\n                </div>\n            </template>\n\n            <template #item=\"{ item, props }\">\n                <a v-ripple class=\"menu-link\" v-bind=\"props.action\" @click=\"navigateTo(item.route)\"\n                    :class=\"{ 'active': $route.name === item.name }\">\n                    <span :class=\"item.icon\" />\n                    <span v-if=\"!isCollapsed\">{{ item.label }}</span>\n                </a>\n            </template>\n\n            <template #end>\n                <div class=\"sidebar-footer\" style=\"--wails-draggable: no-drag;\">\n                    <Button v-if=\"!isCollapsed\" @click=\"drawerVisible = true\" text> {{ version }} </Button>\n                    <Button v-else @click=\"drawerVisible = true\" icon=\"pi pi-info-circle\" text />\n                </div>\n            </template>\n        </Menu>\n    </div>\n    <Drawer v-model:visible=\"drawerVisible\" header=\"小Tips\" position=\"right\" class=\"sidebar-tips\">\n        <Message size=\"small\">\n            1.小红书，密码为xhsdev或mmkv文件com.xingin.xhs_preferences中msg_db_password_updated的值，选择sqlcipher3直接解密\n        </Message>\n        <Message size=\"small\">2.微信的imei，现在可以通过files/KeyInfo.bin获取了，需要解密文件，算法为RC4，密钥为_wEcHAT_</Message>\n        <Message size=\"small\">3.MosGram(泡泡)，密码为cust_id的md5值，在sp目录的account_config.xml文件中，使用SQLCipher4参数解</Message>\n        <Message size=\"small\">4.悟空IM系列的聊天数据库，数据库名为wk_用户ID.db，解密密码即为用户ID，使用SQLCipher4参数解密</Message>\n        <Message size=\"small\">5.抖音的aweme_database_数据库，密码为aweme_database_passphrase，使用wcdb参数解密</Message>\n    </Drawer>\n</template>\n\n<script setup>\nimport { ref, onMounted, onUnmounted, nextTick } from 'vue';\nimport { useRouter, useRoute } from 'vue-router';\nimport { useLayout } from '../composables/useLayout';\nimport { GetVersion } from \"../../wailsjs/go/main/App\"\n\nconst { isDarkMode, toggleDarkMode } = useLayout();\nconst router = useRouter();\nconst route = useRoute();\nconst isCollapsed = ref(false);\nconst windowWidth = ref(window.innerWidth);\nconst version = ref('');\nconst drawerVisible = ref(false);\n\n// 菜单项数据 - 移除了分组，所有菜单项放在同一层级\nconst menuItems = ref([\n    {\n        label: '密钥计算',\n        icon: 'pi pi-key',\n        command: () => navigateTo('/KeyCalculation'),\n        name: 'KeyCalculation'\n    },\n    {\n        label: '数据库解密',\n        icon: 'pi pi-lock-open',\n        command: () => navigateTo('/DatabaseDecrypt'),\n        name: 'DatabaseDecrypt'\n    },\n    {\n        label: '数据提取',\n        icon: 'pi pi-database',\n        command: () => navigateTo('/DataExtraction'),\n        name: 'DataExtraction'\n    },\n    {\n        label: '暴力破解',\n        icon: 'pi pi-lock',\n        command: () => navigateTo('/BruteForce'),\n        name: 'BruteForce'\n    },\n    {\n        label: '注册表分析',\n        icon: 'pi pi-microsoft',\n        command: () => navigateTo('/RegistryAnalysis'),\n        name: 'RegistryAnalysis'\n    },\n    {\n        label: '时间戳转换',\n        icon: 'pi pi-clock',\n        command: () => navigateTo('/TimestampParser'),\n        name: 'TimestampParser'\n    },\n    {\n        label: '文件读取',\n        icon: 'pi pi-file-arrow-up',\n        command: () => navigateTo('/FileReader'),\n        name: 'FileReader'\n    },\n    {\n        label: 'IP归属地查询',\n        icon: 'pi pi-globe',\n        command: () => navigateTo('/IPLocation'),\n        name: 'IPLocation'\n    },\n    {\n        label: '关于',\n        icon: 'pi pi-info-circle',\n        command: () => navigateTo('/About'),\n        name: 'About'\n    }\n]);\n\n// 切换侧边栏状态\nconst toggleSidebar = () => {\n    isCollapsed.value = !isCollapsed.value;\n};\n\n// 导航到指定路由\nconst navigateTo = (routePath) => {\n    if (routePath) {\n        router.push(routePath);\n    }\n};\n\n// 更新窗口宽度\nconst updateWindowWidth = () => {\n    windowWidth.value = window.innerWidth;\n    // 根据窗口宽度自动调整侧边栏状态\n    if (windowWidth.value < 768) {\n        isCollapsed.value = true;\n    }\n    // 展开状态使用CSS中的相对尺寸（15vw）\n};\n\n// 监听窗口大小变化\nonMounted(() => {\n    updateWindowWidth();\n    window.addEventListener('resize', updateWindowWidth);\n    nextTick(() => {\n        if (GetVersion == undefined) {\n            version.value = '1.0.0'\n        } else {\n            GetVersion().then(res => {\n                version.value = res\n            })\n        }\n    })\n});\n\nonUnmounted(() => {\n    window.removeEventListener('resize', updateWindowWidth);\n});\n</script>\n\n<style scoped>\n.sidebar {\n    width: 15vw;\n    min-width: 60px;\n    max-width: 300px;\n    background-color: var(--p-surface-100);\n    border-right: 1px solid var(--p-surface-200);\n    display: flex;\n    flex-direction: column;\n    transition: width 0.3s cubic-bezier(0.4, 0, 0.2, 1);\n    height: 100vh;\n    position: relative;\n    will-change: width;\n}\n\n.p-dark .sidebar {\n    background-color: var(--p-surface-900);\n    border-right-color: var(--p-surface-700);\n}\n\n.sidebar-collapsed {\n    width: 5vw;\n}\n\n.sidebar-header {\n    display: flex;\n    align-items: center;\n    justify-content: center;\n    padding: 1rem;\n    border-bottom: 1px solid var(--p-surface-200);\n    height: 8vh;\n    min-height: 50px;\n    max-height: 70px;\n}\n\n.p-dark .sidebar-header {\n    border-bottom-color: var(--p-surface-700);\n}\n\n.toggle-button {\n    color: var(--p-surface-600);\n}\n\n.p-dark .toggle-button {\n    color: var(--p-surface-400);\n}\n\n.sidebar-menu {\n    width: 100%;\n    height: 100%;\n    border: none;\n    background: transparent;\n}\n\n.sidebar-footer {\n    display: flex;\n    align-items: center;\n    justify-content: center;\n    text-align: center;\n    border-top: 1px solid var(--p-surface-200);\n}\n\n.p-dark .sidebar-footer {\n    border-top-color: var(--p-surface-700);\n}\n\n.version-text {\n    font-size: 0.75rem;\n    color: var(--p-primary-600);\n}\n\n.p-dark .version-text {\n    color: var(--p-primary-400);\n}\n\n.menu-link {\n    display: flex;\n    align-items: center;\n    padding: 0.75rem 1rem;\n    color: var(--p-surface-700);\n    text-decoration: none;\n    transition: background-color 0.2s, color 0.2s;\n    border-radius: 0;\n    cursor: pointer;\n    width: 100%;\n    box-sizing: border-box;\n    font-size: 0.8rem;\n}\n\n.p-dark .menu-link {\n    color: var(--p-surface-300);\n}\n\n.menu-link:hover {\n    background-color: var(--p-surface-200);\n    color: var(--p-surface-900);\n}\n\n.p-dark .menu-link:hover {\n    background-color: var(--p-surface-800);\n    color: var(--p-surface-0);\n}\n\n.menu-link.active {\n    background-color: var(--p-primary-100);\n    color: var(--p-primary-700);\n    border-right: 3px solid var(--p-primary-500);\n}\n\n.p-dark .menu-link.active {\n    background-color: color-mix(in srgb, var(--p-primary-400), transparent 80%);\n    color: var(--p-primary-300);\n}\n\n.p-message {\n    margin-top: .5rem;\n}\n\n/* 收起状态下的样式调整 */\n.sidebar-collapsed .sidebar-header {\n    padding: 1rem 0;\n}\n\n.sidebar-collapsed .menu-link {\n    justify-content: center;\n    padding: 0.75rem 0;\n}\n\n/* 确保收起状态下菜单项宽度不超过侧边栏宽度 */\n.sidebar-collapsed :deep(.p-menu) {\n    width: 100%;\n    min-width: 100%;\n    max-width: 100%;\n}\n\n.sidebar-collapsed :deep(.p-menuitem-link) {\n    padding: 0;\n    display: flex;\n    justify-content: center;\n    align-items: center;\n    width: 100%;\n    min-width: 100%;\n    max-width: 100%;\n    box-sizing: border-box;\n}\n\n.sidebar-collapsed :deep(.p-menuitem-content) {\n    padding: 0;\n    display: flex;\n    justify-content: center;\n    align-items: center;\n    width: 100%;\n    min-width: 100%;\n    max-width: 100%;\n    box-sizing: border-box;\n}\n\n.sidebar-collapsed :deep(.p-menuitem) {\n    display: flex;\n    justify-content: center;\n    align-items: center;\n    width: 100%;\n    min-width: 100%;\n    max-width: 100%;\n    box-sizing: border-box;\n}\n\n.sidebar-collapsed :deep(.p-menuitem-icon) {\n    margin: 0;\n}\n\n.sidebar-collapsed :deep(.p-menuitem-text) {\n    display: none;\n}\n\n/* 调整PrimeVue Menu组件的样式 */\n:deep(.p-menu) {\n    border: none;\n    background: transparent;\n    width: 100% !important;\n    min-width: 100% !important;\n    max-width: 100% !important;\n    height: 100%;\n    display: flex;\n    flex-direction: column;\n    box-sizing: border-box;\n    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);\n}\n\n:deep(.p-menu-list) {\n    flex: 1;\n    overflow-y: auto;\n    width: 100% !important;\n    min-width: 100% !important;\n    max-width: 100% !important;\n    box-sizing: border-box;\n}\n\n:deep(.p-menuitem) {\n    margin: 0;\n    width: 100% !important;\n    min-width: 100% !important;\n    max-width: 100% !important;\n    box-sizing: border-box;\n}\n\n:deep(.p-menuitem-content) {\n    padding: 0;\n    width: 100% !important;\n    min-width: 100% !important;\n    max-width: 100% !important;\n    box-sizing: border-box;\n}\n\n:deep(.p-submenu-header) {\n    padding: 0;\n    width: 100% !important;\n    min-width: 100% !important;\n    max-width: 100% !important;\n    box-sizing: border-box;\n}\n\n:deep(.p-menuitem-link) {\n    padding: 0;\n    width: 100% !important;\n    min-width: 100% !important;\n    max-width: 100% !important;\n    box-sizing: border-box;\n    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);\n}\n</style>"
  },
  {
    "path": "frontend/src/components/AppTopbar.vue",
    "content": "<script setup>\nimport { ref } from 'vue';\nimport { useLayout } from \"../composables/useLayout\";\nimport AppConfig from \"./AppConfig.vue\";\n\nconst { isDarkMode, toggleDarkMode } = useLayout();\nconst isMaximized = ref(false);\nconst isWailsEnvironment = ref(false);\n\n// 检查是否在Wails环境中\nif (typeof window !== 'undefined' && window.runtime) {\n  isWailsEnvironment.value = true;\n  \n  // 导入Wails运行时函数\n  import(\"../../wailsjs/runtime/runtime\").then(runtime => {\n    const { WindowMinimise, WindowToggleMaximise, Quit } = runtime;\n    \n    // 最小化窗口\n    window.minimizeWindow = () => {\n      WindowMinimise();\n    };\n\n    window.quitApplication = () => {\n      Quit();\n    };\n    \n    // 最大化/还原窗口 - 使用WindowToggleMaximise函数\n    window.toggleMaximizeWindow = () => {\n      WindowToggleMaximise();\n      // 切换后更新状态\n      isMaximized.value = !isMaximized.value;\n    };\n  });\n}\n\n// 非Wails环境下的空函数\nconst minimizeWindow = () => {\n  if (isWailsEnvironment.value && window.minimizeWindow) {\n    window.minimizeWindow();\n  } else {\n    console.log(\"最小化功能仅在Wails环境中可用\");\n  }\n};\n\nconst toggleMaximizeWindow = () => {\n  if (isWailsEnvironment.value && window.toggleMaximizeWindow) {\n    window.toggleMaximizeWindow();\n  } else {\n    console.log(\"最大化功能仅在Wails环境中可用\");\n  }\n};\n\n// 关闭窗口（暂时空着）\nconst closeWindow = () => {\n  window.quitApplication();\n};\n</script>\n\n<template>\n    <div class=\"topbar\" style=\"--wails-draggable: drag;\">\n        <div class=\"topbar-container\">\n            <div class=\"topbar-brand\">\n                <span class=\"topbar-brand-text\" style=\"--wails-draggable: no-drag;\">\n                    <span class=\"topbar-title\">ForensicsTool</span>\n                    <span class=\"topbar-subtitle\">by WXjzc</span>\n                </span>\n            </div>\n            <div class=\"topbar-actions\">\n                <Button type=\"button\" class=\"topbar-theme-button\" @click=\"toggleDarkMode\" text rounded>\n                    <i :class=\"['pi ', 'pi ', { 'pi-moon': isDarkMode, 'pi-sun': !isDarkMode }]\" />\n                </Button>\n                <div class=\"relative\">\n                    <Button\n                        v-styleclass=\"{\n                            selector: '@next',\n                            enterFromClass: 'hidden',\n                            enterActiveClass: 'animate-scalein',\n                            leaveToClass: 'hidden',\n                            leaveActiveClass: 'animate-fadeout',\n                            hideOnOutsideClick: true,\n                        }\"\n                        icon=\"pi pi-palette\"\n                        text\n                        rounded\n                        aria-label=\"Settings\"\n                    />\n                    <AppConfig />\n\n                </div>\n                <Button type=\"button\" class=\"topbar-theme-button\" @click=\"minimizeWindow\" icon=\"pi pi-minus\" text rounded />\n                    <Button type=\"button\" class=\"topbar-theme-button\" @click=\"toggleMaximizeWindow\" text rounded>\n                        <i :class=\"['pi', isMaximized ? 'pi-window-minimize' : 'pi-window-maximize']\" />\n                    </Button>\n                    <Button type=\"button\" class=\"topbar-theme-button topbar-close-button\" icon=\"pi pi-times\" @click=\"closeWindow\" text rounded >\n                        <i class=\"pi pi-times\" style=\"color: red;\"/>\n                    </Button>\n            </div>\n        </div>\n    </div>\n</template>\n\n"
  },
  {
    "path": "frontend/src/components/Empty.vue",
    "content": "<template>\n  <div class=\"empty-container\">\n    <div class=\"empty-icon\">\n      <i class=\"pi pi-inbox\"></i>\n    </div>\n    <div class=\"empty-description\">\n      {{ description }}\n    </div>\n    <div v-if=\"action\" class=\"empty-action\">\n      <Button :label=\"actionText\" @click=\"handleAction\" />\n    </div>\n  </div>\n</template>\n\n<script setup>\nimport { defineProps, defineEmits } from 'vue';\n\nconst props = defineProps({\n  description: {\n    type: String,\n    default: '暂无数据'\n  },\n  action: {\n    type: Boolean,\n    default: false\n  },\n  actionText: {\n    type: String,\n    default: '操作'\n  }\n});\n\nconst emit = defineEmits(['action']);\n\nconst handleAction = () => {\n  emit('action');\n};\n</script>\n\n<style scoped>\n.empty-container {\n  display: flex;\n  flex-direction: column;\n  align-items: center;\n  justify-content: center;\n  padding: 2rem 1rem;\n  text-align: center;\n  min-height: 200px;\n  color: var(--p-surface-500);\n}\n\n.empty-icon {\n  font-size: 3rem;\n  margin-bottom: 1rem;\n  opacity: 0.6;\n}\n\n.empty-description {\n  font-size: 1rem;\n  margin-bottom: 1rem;\n}\n\n.empty-action {\n  margin-top: 1rem;\n}\n\n/* 暗色主题适配 */\n.p-dark .empty-container {\n  color: var(--p-surface-400);\n}\n\n.p-dark .empty-icon {\n  opacity: 0.5;\n}\n</style>"
  },
  {
    "path": "frontend/src/composables/useLayout.js",
    "content": "import { updatePrimaryPalette, updateSurfacePalette } from \"@primeuix/themes\";\nimport { computed, ref, watchEffect } from \"vue\";\n\n// 从localStorage读取配置或使用默认值\nconst getStoredConfig = () => {\n  try {\n    const stored = localStorage.getItem('forensics-tool-theme');\n    if (stored) {\n      return JSON.parse(stored);\n    }\n  } catch (e) {\n    console.error('Failed to parse theme config from localStorage:', e);\n  }\n  \n  // 默认配置\n  return {\n    primary: \"emerald\",\n    surface: \"slate\",\n    darkMode: true\n  };\n};\n\n// 保存配置到localStorage\nconst saveConfigToStorage = (config) => {\n  try {\n    localStorage.setItem('forensics-tool-theme', JSON.stringify(config));\n  } catch (e) {\n    console.error('Failed to save theme config to localStorage:', e);\n  }\n};\n\nconst appState = ref(getStoredConfig());\n\n// 监听配置变化并保存到localStorage\nwatchEffect(() => {\n  saveConfigToStorage(appState.value);\n});\n\nconst primaryColors = ref([\n\t{\n\t\tname: 'noir', palette: {\n\t\t\t50: \"{zinc.50}\",\n\t\t\t100: \"{zinc.100}\",\n\t\t\t200: \"{zinc.200}\",\n\t\t\t300: \"{zinc.300}\",\n\t\t\t400: \"{zinc.400}\",\n\t\t\t500: \"{zinc.500}\",\n\t\t\t600: \"{zinc.600}\",\n\t\t\t700: \"{zinc.700}\",\n\t\t\t800: \"{zinc.800}\",\n\t\t\t900: \"{zinc.900}\",\n\t\t\t950: \"{zinc.950}\"\n\t\t},\n\t},\n\t{\n\t\tname: \"emerald\",\n\t\tpalette: {\n\t\t\t50: \"#ecfdf5\",\n\t\t\t100: \"#d1fae5\",\n\t\t\t200: \"#a7f3d0\",\n\t\t\t300: \"#6ee7b7\",\n\t\t\t400: \"#34d399\",\n\t\t\t500: \"#10b981\",\n\t\t\t600: \"#059669\",\n\t\t\t700: \"#047857\",\n\t\t\t800: \"#065f46\",\n\t\t\t900: \"#064e3b\",\n\t\t\t950: \"#022c22\"\n\t\t}\n\t},\n\t{\n\t\tname: \"green\",\n\t\tpalette: {\n\t\t\t50: \"#f0fdf4\",\n\t\t\t100: \"#dcfce7\",\n\t\t\t200: \"#bbf7d0\",\n\t\t\t300: \"#86efac\",\n\t\t\t400: \"#4ade80\",\n\t\t\t500: \"#22c55e\",\n\t\t\t600: \"#16a34a\",\n\t\t\t700: \"#15803d\",\n\t\t\t800: \"#166534\",\n\t\t\t900: \"#14532d\",\n\t\t\t950: \"#052e16\"\n\t\t}\n\t},\n\t{\n\t\tname: \"lime\",\n\t\tpalette: {\n\t\t\t50: \"#f7fee7\",\n\t\t\t100: \"#ecfccb\",\n\t\t\t200: \"#d9f99d\",\n\t\t\t300: \"#bef264\",\n\t\t\t400: \"#a3e635\",\n\t\t\t500: \"#84cc16\",\n\t\t\t600: \"#65a30d\",\n\t\t\t700: \"#4d7c0f\",\n\t\t\t800: \"#3f6212\",\n\t\t\t900: \"#365314\",\n\t\t\t950: \"#1a2e05\"\n\t\t}\n\t},\n\t{\n\t\tname: \"orange\",\n\t\tpalette: {\n\t\t\t50: \"#fff7ed\",\n\t\t\t100: \"#ffedd5\",\n\t\t\t200: \"#fed7aa\",\n\t\t\t300: \"#fdba74\",\n\t\t\t400: \"#fb923c\",\n\t\t\t500: \"#f97316\",\n\t\t\t600: \"#ea580c\",\n\t\t\t700: \"#c2410c\",\n\t\t\t800: \"#9a3412\",\n\t\t\t900: \"#7c2d12\",\n\t\t\t950: \"#431407\"\n\t\t}\n\t},\n\t{\n\t\tname: \"amber\",\n\t\tpalette: {\n\t\t\t50: \"#fffbeb\",\n\t\t\t100: \"#fef3c7\",\n\t\t\t200: \"#fde68a\",\n\t\t\t300: \"#fcd34d\",\n\t\t\t400: \"#fbbf24\",\n\t\t\t500: \"#f59e0b\",\n\t\t\t600: \"#d97706\",\n\t\t\t700: \"#b45309\",\n\t\t\t800: \"#92400e\",\n\t\t\t900: \"#78350f\",\n\t\t\t950: \"#451a03\"\n\t\t}\n\t},\n\t{\n\t\tname: \"yellow\",\n\t\tpalette: {\n\t\t\t50: \"#fefce8\",\n\t\t\t100: \"#fef9c3\",\n\t\t\t200: \"#fef08a\",\n\t\t\t300: \"#fde047\",\n\t\t\t400: \"#facc15\",\n\t\t\t500: \"#eab308\",\n\t\t\t600: \"#ca8a04\",\n\t\t\t700: \"#a16207\",\n\t\t\t800: \"#854d0e\",\n\t\t\t900: \"#713f12\",\n\t\t\t950: \"#422006\"\n\t\t}\n\t},\n\t{\n\t\tname: \"teal\",\n\t\tpalette: {\n\t\t\t50: \"#f0fdfa\",\n\t\t\t100: \"#ccfbf1\",\n\t\t\t200: \"#99f6e4\",\n\t\t\t300: \"#5eead4\",\n\t\t\t400: \"#2dd4bf\",\n\t\t\t500: \"#14b8a6\",\n\t\t\t600: \"#0d9488\",\n\t\t\t700: \"#0f766e\",\n\t\t\t800: \"#115e59\",\n\t\t\t900: \"#134e4a\",\n\t\t\t950: \"#042f2e\"\n\t\t}\n\t},\n\t{\n\t\tname: \"cyan\",\n\t\tpalette: {\n\t\t\t50: \"#ecfeff\",\n\t\t\t100: \"#cffafe\",\n\t\t\t200: \"#a5f3fc\",\n\t\t\t300: \"#67e8f9\",\n\t\t\t400: \"#22d3ee\",\n\t\t\t500: \"#06b6d4\",\n\t\t\t600: \"#0891b2\",\n\t\t\t700: \"#0e7490\",\n\t\t\t800: \"#155e75\",\n\t\t\t900: \"#164e63\",\n\t\t\t950: \"#083344\"\n\t\t}\n\t},\n\t{\n\t\tname: \"sky\",\n\t\tpalette: {\n\t\t\t50: \"#f0f9ff\",\n\t\t\t100: \"#e0f2fe\",\n\t\t\t200: \"#bae6fd\",\n\t\t\t300: \"#7dd3fc\",\n\t\t\t400: \"#38bdf8\",\n\t\t\t500: \"#0ea5e9\",\n\t\t\t600: \"#0284c7\",\n\t\t\t700: \"#0369a1\",\n\t\t\t800: \"#075985\",\n\t\t\t900: \"#0c4a6e\",\n\t\t\t950: \"#082f49\"\n\t\t}\n\t},\n\t{\n\t\tname: \"blue\",\n\t\tpalette: {\n\t\t\t50: \"#eff6ff\",\n\t\t\t100: \"#dbeafe\",\n\t\t\t200: \"#bfdbfe\",\n\t\t\t300: \"#93c5fd\",\n\t\t\t400: \"#60a5fa\",\n\t\t\t500: \"#3b82f6\",\n\t\t\t600: \"#2563eb\",\n\t\t\t700: \"#1d4ed8\",\n\t\t\t800: \"#1e40af\",\n\t\t\t900: \"#1e3a8a\",\n\t\t\t950: \"#172554\"\n\t\t}\n\t},\n\t{\n\t\tname: \"indigo\",\n\t\tpalette: {\n\t\t\t50: \"#eef2ff\",\n\t\t\t100: \"#e0e7ff\",\n\t\t\t200: \"#c7d2fe\",\n\t\t\t300: \"#a5b4fc\",\n\t\t\t400: \"#818cf8\",\n\t\t\t500: \"#6366f1\",\n\t\t\t600: \"#4f46e5\",\n\t\t\t700: \"#4338ca\",\n\t\t\t800: \"#3730a3\",\n\t\t\t900: \"#312e81\",\n\t\t\t950: \"#1e1b4b\"\n\t\t}\n\t},\n\t{\n\t\tname: \"violet\",\n\t\tpalette: {\n\t\t\t50: \"#f5f3ff\",\n\t\t\t100: \"#ede9fe\",\n\t\t\t200: \"#ddd6fe\",\n\t\t\t300: \"#c4b5fd\",\n\t\t\t400: \"#a78bfa\",\n\t\t\t500: \"#8b5cf6\",\n\t\t\t600: \"#7c3aed\",\n\t\t\t700: \"#6d28d9\",\n\t\t\t800: \"#5b21b6\",\n\t\t\t900: \"#4c1d95\",\n\t\t\t950: \"#2e1065\"\n\t\t}\n\t},\n\t{\n\t\tname: \"purple\",\n\t\tpalette: {\n\t\t\t50: \"#faf5ff\",\n\t\t\t100: \"#f3e8ff\",\n\t\t\t200: \"#e9d5ff\",\n\t\t\t300: \"#d8b4fe\",\n\t\t\t400: \"#c084fc\",\n\t\t\t500: \"#a855f7\",\n\t\t\t600: \"#9333ea\",\n\t\t\t700: \"#7e22ce\",\n\t\t\t800: \"#6b21a8\",\n\t\t\t900: \"#581c87\",\n\t\t\t950: \"#3b0764\"\n\t\t}\n\t},\n\t{\n\t\tname: \"fuchsia\",\n\t\tpalette: {\n\t\t\t50: \"#fdf4ff\",\n\t\t\t100: \"#fae8ff\",\n\t\t\t200: \"#f5d0fe\",\n\t\t\t300: \"#f0abfc\",\n\t\t\t400: \"#e879f9\",\n\t\t\t500: \"#d946ef\",\n\t\t\t600: \"#c026d3\",\n\t\t\t700: \"#a21caf\",\n\t\t\t800: \"#86198f\",\n\t\t\t900: \"#701a75\",\n\t\t\t950: \"#4a044e\"\n\t\t}\n\t},\n\t{\n\t\tname: \"pink\",\n\t\tpalette: {\n\t\t\t50: \"#fdf2f8\",\n\t\t\t100: \"#fce7f3\",\n\t\t\t200: \"#fbcfe8\",\n\t\t\t300: \"#f9a8d4\",\n\t\t\t400: \"#f472b6\",\n\t\t\t500: \"#ec4899\",\n\t\t\t600: \"#db2777\",\n\t\t\t700: \"#be185d\",\n\t\t\t800: \"#9d174d\",\n\t\t\t900: \"#831843\",\n\t\t\t950: \"#500724\"\n\t\t}\n\t},\n\t{\n\t\tname: \"rose\",\n\t\tpalette: {\n\t\t\t50: \"#fff1f2\",\n\t\t\t100: \"#ffe4e6\",\n\t\t\t200: \"#fecdd3\",\n\t\t\t300: \"#fda4af\",\n\t\t\t400: \"#fb7185\",\n\t\t\t500: \"#f43f5e\",\n\t\t\t600: \"#e11d48\",\n\t\t\t700: \"#be123c\",\n\t\t\t800: \"#9f1239\",\n\t\t\t900: \"#881337\",\n\t\t\t950: \"#4c0519\"\n\t\t}\n\t}\n]);\n\nconst surfaces = ref([\n\t{\n\t\tname: \"slate\",\n\t\tpalette: {\n\t\t\t0: \"#ffffff\",\n\t\t\t50: \"#f8fafc\",\n\t\t\t100: \"#f1f5f9\",\n\t\t\t200: \"#e2e8f0\",\n\t\t\t300: \"#cbd5e1\",\n\t\t\t400: \"#94a3b8\",\n\t\t\t500: \"#64748b\",\n\t\t\t600: \"#475569\",\n\t\t\t700: \"#334155\",\n\t\t\t800: \"#1e293b\",\n\t\t\t900: \"#0f172a\",\n\t\t\t950: \"#020617\"\n\t\t}\n\t},\n\t{\n\t\tname: \"gray\",\n\t\tpalette: {\n\t\t\t0: \"#ffffff\",\n\t\t\t50: \"#f9fafb\",\n\t\t\t100: \"#f3f4f6\",\n\t\t\t200: \"#e5e7eb\",\n\t\t\t300: \"#d1d5db\",\n\t\t\t400: \"#9ca3af\",\n\t\t\t500: \"#6b7280\",\n\t\t\t600: \"#4b5563\",\n\t\t\t700: \"#374151\",\n\t\t\t800: \"#1f2937\",\n\t\t\t900: \"#111827\",\n\t\t\t950: \"#030712\"\n\t\t}\n\t},\n\t{\n\t\tname: \"zinc\",\n\t\tpalette: {\n\t\t\t0: \"#ffffff\",\n\t\t\t50: \"#fafafa\",\n\t\t\t100: \"#f4f4f5\",\n\t\t\t200: \"#e4e4e7\",\n\t\t\t300: \"#d4d4d8\",\n\t\t\t400: \"#a1a1aa\",\n\t\t\t500: \"#71717a\",\n\t\t\t600: \"#52525b\",\n\t\t\t700: \"#3f3f46\",\n\t\t\t800: \"#27272a\",\n\t\t\t900: \"#18181b\",\n\t\t\t950: \"#09090b\"\n\t\t}\n\t},\n\t{\n\t\tname: \"neutral\",\n\t\tpalette: {\n\t\t\t0: \"#ffffff\",\n\t\t\t50: \"#fafafa\",\n\t\t\t100: \"#f5f5f5\",\n\t\t\t200: \"#e5e5e5\",\n\t\t\t300: \"#d4d4d4\",\n\t\t\t400: \"#a3a3a3\",\n\t\t\t500: \"#737373\",\n\t\t\t600: \"#525252\",\n\t\t\t700: \"#404040\",\n\t\t\t800: \"#262626\",\n\t\t\t900: \"#171717\",\n\t\t\t950: \"#0a0a0a\"\n\t\t}\n\t},\n\t{\n\t\tname: \"stone\",\n\t\tpalette: {\n\t\t\t0: \"#ffffff\",\n\t\t\t50: \"#fafaf9\",\n\t\t\t100: \"#f5f5f4\",\n\t\t\t200: \"#e7e5e4\",\n\t\t\t300: \"#d6d3d1\",\n\t\t\t400: \"#a8a29e\",\n\t\t\t500: \"#78716c\",\n\t\t\t600: \"#57534e\",\n\t\t\t700: \"#44403c\",\n\t\t\t800: \"#292524\",\n\t\t\t900: \"#1c1917\",\n\t\t\t950: \"#0c0a09\"\n\t\t}\n\t},\n\t{\n\t\tname: \"soho\",\n\t\tpalette: {\n\t\t\t0: \"#ffffff\",\n\t\t\t50: \"#f4f4f4\",\n\t\t\t100: \"#e8e9e9\",\n\t\t\t200: \"#d2d2d4\",\n\t\t\t300: \"#bbbcbe\",\n\t\t\t400: \"#a5a5a9\",\n\t\t\t500: \"#8e8f93\",\n\t\t\t600: \"#77787d\",\n\t\t\t700: \"#616268\",\n\t\t\t800: \"#4a4b52\",\n\t\t\t900: \"#34343d\",\n\t\t\t950: \"#1d1e27\"\n\t\t}\n\t},\n\t{\n\t\tname: \"viva\",\n\t\tpalette: {\n\t\t\t0: \"#ffffff\",\n\t\t\t50: \"#f3f3f3\",\n\t\t\t100: \"#e7e7e8\",\n\t\t\t200: \"#cfd0d0\",\n\t\t\t300: \"#b7b8b9\",\n\t\t\t400: \"#9fa1a1\",\n\t\t\t500: \"#87898a\",\n\t\t\t600: \"#6e7173\",\n\t\t\t700: \"#565a5b\",\n\t\t\t800: \"#3e4244\",\n\t\t\t900: \"#262b2c\",\n\t\t\t950: \"#0e1315\"\n\t\t}\n\t},\n\t{\n\t\tname: \"ocean\",\n\t\tpalette: {\n\t\t\t0: \"#ffffff\",\n\t\t\t50: \"#fbfcfc\",\n\t\t\t100: \"#F7F9F8\",\n\t\t\t200: \"#EFF3F2\",\n\t\t\t300: \"#DADEDD\",\n\t\t\t400: \"#B1B7B6\",\n\t\t\t500: \"#828787\",\n\t\t\t600: \"#5F7274\",\n\t\t\t700: \"#415B61\",\n\t\t\t800: \"#29444E\",\n\t\t\t900: \"#183240\",\n\t\t\t950: \"#0c1920\"\n\t\t}\n\t}\n]);\n\nexport function useLayout() {\n\tfunction setPrimary(value) {\n\t\tappState.value.primary = value;\n\t}\n\n\tfunction setSurface(value) {\n\t\tappState.value.surface = value;\n\t}\n\n\tfunction setDarkMode(value) {\n\t\tappState.value.darkMode = value;\n\t\tif (value) {\n\t\t\tdocument.documentElement.classList.add(\"p-dark\");\n\t\t} else {\n\t\t\tdocument.documentElement.classList.remove(\"p-dark\");\n\t\t}\n\t}\n\n\tfunction toggleDarkMode() {\n\t\tappState.value.darkMode = !appState.value.darkMode;\n\t\tdocument.documentElement.classList.toggle(\"p-dark\");\n\t}\n\n\tfunction updateColors(type, colorName) {\n\t\tif (type === \"primary\") {\n\t\t\tsetPrimary(colorName);\n\t\t\tconst color = primaryColors.value.find((c) => c.name === colorName);\n\t\t\tupdatePrimaryPalette(color.palette);\n\t\t} else if (type === \"surface\") {\n\t\t\tsetSurface(colorName);\n\t\t\tconst surfaceColor = surfaces.value.find((s) => s.name === colorName);\n\t\t\tupdateSurfacePalette(surfaceColor.palette);\n\t\t}\n\t}\n\n\tconst isDarkMode = computed(() => appState.value.darkMode);\n\tconst primary = computed(() => appState.value.primary);\n\tconst surface = computed(() => appState.value.surface);\n\n\t// 初始化时应用保存的主题设置\n\tconst initTheme = () => {\n\t\t// 应用暗黑模式设置\n\t\tif (appState.value.darkMode) {\n\t\t\tdocument.documentElement.classList.add(\"p-dark\");\n\t\t} else {\n\t\t\tdocument.documentElement.classList.remove(\"p-dark\");\n\t\t}\n\t\t\n\t\t// 应用主色调\n\t\tconst primaryColor = primaryColors.value.find((c) => c.name === appState.value.primary);\n\t\tif (primaryColor) {\n\t\t\tupdatePrimaryPalette(primaryColor.palette);\n\t\t}\n\t\t\n\t\t// 应用表面色调\n\t\tconst surfaceColor = surfaces.value.find((s) => s.name === appState.value.surface);\n\t\tif (surfaceColor) {\n\t\t\tupdateSurfacePalette(surfaceColor.palette);\n\t\t}\n\t};\n\n\t// 初始化主题\n\tinitTheme();\n\n\treturn {\n\t\tprimaryColors,\n\t\tsurfaces,\n\t\tisDarkMode,\n\t\tprimary,\n\t\tsurface,\n\t\ttoggleDarkMode,\n\t\tsetDarkMode,\n\t\tsetPrimary,\n\t\tsetSurface,\n\t\tupdateColors,\n\t\tinitTheme\n\t};\n}\n"
  },
  {
    "path": "frontend/src/composables/useTableHeight.js",
    "content": "import { ref, nextTick } from 'vue'\n\n/**\n * 计算表格的动态高度\n * @param {Ref<HTMLElement>} resultCardRef - 结果卡片的引用\n * @param {Ref<string>} tableScrollHeight - 表格滚动高度的响应式引用\n * @param {number} offsetHeight - 额外偏移高度，默认为120px\n * @param {number} minHeight - 最小高度，默认为200px\n */\nexport function useTableHeight(resultCardRef, tableScrollHeight, offsetHeight = 120, minHeight = 200) {\n  /**\n   * 计算表格高度\n   */\n  const calculateTableHeight = () => {\n    if (resultCardRef.value) {\n      // 获取结果卡片的高度\n      const cardHeight = resultCardRef.value.$el.offsetHeight\n      // 计算表格高度（卡片高度减去其他元素的高度，如标题、按钮等）\n      const calculatedHeight = cardHeight - offsetHeight\n      \n      // 设置最小高度\n      const finalHeight = Math.max(calculatedHeight, minHeight)\n      \n      // 将像素值转换为vh单位\n      const vhValue = (finalHeight / window.innerHeight) * 100\n      tableScrollHeight.value = `${vhValue+4}vh`\n    }\n  }\n\n  /**\n   * 窗口大小变化处理函数\n   */\n  const handleResize = () => {\n    nextTick(() => {\n      calculateTableHeight()\n    })\n  }\n\n  return {\n    calculateTableHeight,\n    handleResize\n  }\n}"
  },
  {
    "path": "frontend/src/main.ts",
    "content": "import \"./assets/styles/main.css\";\n\nimport { createApp } from \"vue\";\nimport PrimeVue from \"primevue/config\";\nimport Aura from \"@primeuix/themes/aura\";\nimport router from \"./router\";\n// @ts-ignore\nimport App from \"./App.vue\";\nimport ToastService from 'primevue/toastservice';\nimport Tooltip from 'primevue/tooltip';\nimport store from \"./store\";\n\nconst app = createApp(App);\n\napp.use(PrimeVue, {\n    theme: {\n        preset: Aura,\n        options: {\n            darkModeSelector: \".p-dark\",\n        },\n    },\n});\napp.use(ToastService);\napp.use(store);\napp.use(router);\n\napp.directive('tooltip', Tooltip);\n\napp.mount(\"#app\");\n"
  },
  {
    "path": "frontend/src/router/index.ts",
    "content": "import { createRouter, createWebHistory } from 'vue-router';\n\n// @ts-ignore\nimport KeyCalculation from '../views/KeyCalculation.vue';\n// @ts-ignore\nimport DatabaseDecrypt from '../views/DatabaseDecrypt.vue';\n// @ts-ignore\nimport DataExtraction from '../views/DataExtraction.vue';\n// @ts-ignore\nimport RegistryAnalysis from '../views/RegistryAnalysis.vue';\n// @ts-ignore\nimport TimestampParser from '../views/TimestampParser.vue';\n// @ts-ignore\nimport BruteForce from '../views/BruteForce.vue';\n// @ts-ignore\nimport FileReader from '../views/FileReader.vue';\n// @ts-ignore\nimport About from '../views/About.vue';\n// @ts-ignore\nimport IPLocation from '../views/IPLocation.vue';\n\nconst routes = [\n    {\n        path: '/',\n        redirect: '/KeyCalculation'\n    },\n    {\n        path: '/KeyCalculation',\n        name: 'KeyCalculation',\n        component: KeyCalculation\n    },\n    {\n        path: '/DatabaseDecrypt',\n        name: 'DatabaseDecrypt',\n        component: DatabaseDecrypt\n    },\n    {\n        path: '/DataExtraction',\n        name: 'DataExtraction',\n        component: DataExtraction\n    },\n    {\n        path: '/RegistryAnalysis',\n        name: 'RegistryAnalysis',\n        component: RegistryAnalysis\n    },\n    {\n        path: '/TimestampParser',\n        name: 'TimestampParser',\n        component: TimestampParser\n    },\n    {\n        path: '/BruteForce',\n        name: 'BruteForce',\n        component: BruteForce\n    },\n    {\n        path: '/FileReader',\n        name: 'FileReader',\n        component: FileReader\n    },\n    {\n        path: '/IPLocation',\n        name: 'IPLocation',\n        component: IPLocation\n    },\n    {\n        path: '/About',\n        name: 'About',\n        component: About\n    }\n];\n\nconst router = createRouter({\n    history: createWebHistory(),\n    routes\n});\n\nexport default router;"
  },
  {
    "path": "frontend/src/store/index.ts",
    "content": "import { createPinia } from 'pinia';\n\nconst store = createPinia();\n\nexport default store;\n\nexport * from './modules/page';"
  },
  {
    "path": "frontend/src/store/modules/page.ts",
    "content": "import { defineStore } from 'pinia';\n\ninterface PageDataState {\n  keyCalculationStore: any | null;\n  databaseDecryptStore: any | null;\n  dataExtractionStore: any | null;\n  registryStore: any | null;\n  bruteForceStore: any | null;\n  timestampStore: any | null;\n  fileReaderStore: any | null;\n  ipLocationStore: any | null;\n  isCardCollapsed: boolean | null;\n}\n\nexport const usePageDataStore = defineStore('pageData', {\n  state: (): PageDataState => ({\n    keyCalculationStore: null,\n    databaseDecryptStore: null,\n    dataExtractionStore: null,\n    registryStore: null,\n    bruteForceStore: null,\n    timestampStore: null,\n    fileReaderStore: null,\n    ipLocationStore: null,\n    isCardCollapsed: null,\n  }),\n  actions: {\n    saveKeyCalculationData(data: any) {\n      this.keyCalculationStore = data;\n    },\n    saveDatabaseDecryptData(data: any) {\n      this.databaseDecryptStore = data;\n    },\n    saveDataExtractionData(data: any) {\n      this.dataExtractionStore = data;\n    },\n    saveRegistryData(data: any) {\n      this.registryStore = data;\n    },\n    saveBruteForceData(data: any) {\n      this.bruteForceStore = data;\n    },\n    saveTimestampData(data: any) {\n      this.timestampStore = data;\n    },\n    saveFileReaderData(data: any) {\n      this.fileReaderStore = data;\n    },\n    saveIPLocationData(data: any) {\n      this.ipLocationStore = data;\n    },\n    // 获取爆破状态\n    getBruteForceCrackingState(): boolean {\n      return this.bruteForceStore?.cracking || false;\n    },\n    // 更新爆破状态\n    updateBruteForceCrackingState(cracking: boolean) {\n      if (!this.bruteForceStore) {\n        this.bruteForceStore = {};\n      }\n      this.bruteForceStore.cracking = cracking;\n    },\n    // 设置卡片折叠状态\n    setCardCollapsed(collapsed: boolean) {\n      this.isCardCollapsed = collapsed;\n    },\n    // 获取卡片折叠状态\n    getCardCollapsed(): boolean {\n      return this.isCardCollapsed || false;\n    }\n  },\n});"
  },
  {
    "path": "frontend/src/utils.js",
    "content": "// 工具函数集合\n\n/**\n * 生成普通文本输出\n * @param {string} text - 文本内容\n * @param {string} color - 文本颜色\n * @returns {string} 带样式的HTML字符串\n */\nexport function generateNormalTextOutput(text, color = 'black') {\n  return `<span style=\"color: ${color}\">${text}</span><br>`;\n}\n\n/**\n * 生成成功文本输出\n * @param {string} label - 标签文本\n * @param {string} value - 值文本\n * @returns {string} 带样式的HTML字符串\n */\nexport function generateSuccessTextOutput(label, value) {\n  return `<span style=\"color: green\">${label}: ${value}</span><br>`;\n}\n\n/**\n * 生成错误文本输出\n * @param {string} text - 文本内容\n * @returns {string} 带样式的HTML字符串\n */\nexport function generateErrorTextOutput(text) {\n  return `<span style=\"color: red\">${text}</span><br>`;\n}\n\n/**\n * 生成警告文本输出\n * @param {string} text - 文本内容\n * @returns {string} 带样式的HTML字符串\n */\nexport function generateWarningTextOutput(text) {\n  return `<span style=\"color: orange\">${text}</span><br>`;\n}\n\n/**\n * 生成信息文本输出\n * @param {string} text - 文本内容\n * @returns {string} 带样式的HTML字符串\n */\nexport function generateInfoTextOutput(text) {\n  return `<span style=\"color: blue\">${text}</span><br>`;\n}"
  },
  {
    "path": "frontend/src/views/About.vue",
    "content": "<template>\n  <div class=\"page-container\">\n    <Card class=\"result-card\">\n      <template #title>关于</template>\n      <template #content>\n      \n      <div class=\"space-vertical\">\n        <h4>关于软件</h4>\n        <ul class=\"list\">\n          <li>个人用于学习电子取证、提升效率的小软件。</li>\n          <li>\n            <span><i class=\"pi pi-github\"></i>开源地址: \n              <a href=\"https://github.com/WXjzcccc/ForensicsTool\" target=\"_blank\" class=\"link\">https://github.com/WXjzcccc/ForensicsTool</a>\n            </span>\n          </li>\n        </ul>\n      </div>\n      <Divider />\n      <div class=\"space-vertical\">\n        <h4>贡献者</h4>\n        <ul class=\"list\">\n          <li>\n            <span>[1]WXjzc,\n              <i class=\"pi pi-github\"></i>\n              <a href=\"https://github.com/WXjzcccc\" target=\"_blank\" class=\"link\">https://github.com/WXjzcccc</a>\n            </span>\n          </li>\n          <li>\n            <span>[2]b3nguang,\n              <i class=\"pi pi-github\"></i>\n              <a href=\"https://github.com/b3nguang\" target=\"_blank\" class=\"link\">https://github.com/b3nguang</a>\n            </span>\n          </li>\n        </ul>\n      </div>\n      <Divider />\n      </template>\n    </Card>\n  </div>\n</template>\n\n<script setup>\n</script>\n\n<style scoped>\n.space-vertical {\n  display: flex;\n  flex-direction: column;\n  gap: 1rem;\n  margin-bottom: 1.5rem;\n}\n\n.list {\n  list-style-type: none;\n  padding: 0;\n  margin: 0;\n}\n\n.list li {\n  padding: 0.5rem 0;\n  border-bottom: 1px solid var(--surface-border);\n}\n\n.list li:last-child {\n  border-bottom: none;\n}\n\n.link {\n  color: var(--primary-color);\n  text-decoration: underline;\n}\n\n.link:hover {\n  color: var(--primary-color-text);\n}\n\n.pi-github {\n  margin-right: 0.5rem;\n}\n</style>"
  },
  {
    "path": "frontend/src/views/BruteForce.vue",
    "content": "<template>\n  <div class=\"page-container\">\n    <Card class=\"form-card\">\n      <template #content>\n      <form class=\"form-layout\">\n        <div class=\"field full-width\">\n          <FloatLabel class=\"field full-width\" variant=\"over\">\n              <label for=\"task\">选择任务</label>\n          <Select \n            id=\"task\"\n            v-model=\"form.selected\" \n            :options=\"options\" \n            optionLabel=\"label\" \n            optionValue=\"value\"\n            placeholder=\"请选择任务\"\n            v-tooltip.top=\"'选择要执行的数据提取任务类型'\"\n          />\n          </FloatLabel>\n        </div>\n        \n        <div v-for=\"(fieldGroup, index) in inputFields\" :key=\"index\" class=\"input-row\">\n          <div v-for=\"field in fieldGroup\" :key=\"field.name\" class=\"field half-width\">\n            <FloatLabel variant=\"on\">\n              <InputText \n                v-if=\"field.type === 'input'\"\n                v-tooltip.top=\"brutePlace[field.name]\"\n                aria-autocomplete=\"none\"\n                :id=\"field.name\"\n                v-model=\"form[field.name]\" \n                :placeholder=\"brutePlace[field.name]\"\n              />\n              <label :for=\"field.name\">{{ field.label }}</label>\n            </FloatLabel>\n          </div>\n        </div>\n      </form>\n      <div class=\"button-row\">\n        <Button class=\"button equal-width\" @click=\"handleBruteForce\" :disabled=\"cracking\">\n          <i class=\"pi pi-cog\"></i>\n          爆破\n        </Button>\n        <Button class=\"button equal-width\" severity=\"danger\" @click=\"handleCancel\" :disabled=\"!cracking\">\n          <i class=\"pi pi-stop-circle\"></i>\n          停止\n        </Button>\n        <Button class=\"button equal-width\" severity=\"secondary\" @click=\"handleClear\">\n          <i class=\"pi pi-trash\"></i>\n          清空输出\n        </Button>\n      </div>\n      </template>\n\n    </Card>\n    <Card class=\"result-card\">\n      <template #content>\n      <div v-if=\"resultText === ''\" class=\"empty\">\n        <Empty />\n      </div>\n        <div class=\"result-output\" v-html=\"resultText\"/>\n      </template>\n    </Card>\n    <ProgressBar v-if=\"cracking\" :value=\"progressValue\" style=\"height: 1vh\" />\n  </div>\n  <Toast position=\"bottom-right\"/>\n</template>\n\n<script setup>\nimport {ref, watch, onMounted, computed} from 'vue'\nimport {useToast} from 'primevue/usetoast'\nimport {generateNormalTextOutput, generateSuccessTextOutput} from \"@/utils.js\";\nimport {usePageDataStore} from \"@/store\";\nimport {CancelCrack, CrackAirDrop, CrackWXUin} from \"../../wailsjs/go/cracker/ForensicsCracker.js\";\nimport { Select } from 'primevue';\nimport Empty from '@/components/Empty.vue';\nimport { EventsOn } from '../../wailsjs/runtime/runtime.js';\n\nconst toast = useToast()\nconst store = usePageDataStore()\nconst brutePlace = {\n  target:\"目标列表，以,分隔\",\n  region:\"AirDrop要爆破的区号，如86、85、1\",\n  mac:\"AirDrop要爆破的号段，以,进行分隔，如139,138\",\n  length:\"AirDrop要爆破的手机号长度（除去区号和号段）\",\n}\n// 任务配置对象，定义每个任务需要的输入字段\nconst taskConfigs = {\n  \"1\": {\n    fields: [\n      { name: \"target\", label: \"爆破目标\", type: \"input\" },\n      { name: \"region\", label: \"区号\", type: \"input\" },\n      { name: \"mac\", label: \"号段\", type: \"input\" },\n      { name: \"length\", label: \"长度\", type: \"input\" }\n    ]\n  },\n  \"2\": {\n    fields: [\n      { name: \"target\", label: \"爆破目标\", type: \"input\" }\n    ]\n  }\n}\n\nconst form = ref(store.bruteForceStore?.formData || {\n  selected:\"\",\n  target:\"\",\n  mac:\"\",\n  region:\"\",\n  length:\"\",\n})\nconst progressValue = ref(store.bruteForceStore?.progressValue || 0)\n\n// 计算当前任务配置\nconst currentTaskConfig = computed(() => {\n  return taskConfigs[form.value.selected] || { fields: [] }\n})\n\n// 计算输入字段，每两个一组\nconst inputFields = computed(() => {\n  const fields = currentTaskConfig.value.fields\n  const groups = []\n  for (let i = 0; i < fields.length; i += 2) {\n    groups.push(fields.slice(i, i + 2))\n  }\n  return groups\n})\nconst resultText = ref(store.bruteForceStore?.resultData || \"\")\nconst options = ref([\n  {label:\"AirDrop手机号爆破\",value:\"1\"},\n  {label:\"微信UIN爆破\",value:\"2\"},\n])\nconst cracking = ref(store.getBruteForceCrackingState())\n\nEventsOn(\"ForensicsTool::BruteForce::State\",(data)=>{\n  resultText.value += generateNormalTextOutput(data.replace(\"\\n\",\"<br>\"),\"#1937e5\")\n})\n\nEventsOn(\"ForensicsTool::BruteForce::Progress\",(current,totalCount)=>{\n  progressValue.value = Math.round(current/totalCount*100*100)/100\n})\n\nwatch([form,resultText],()=>{\n  store.saveBruteForceData({\n    formData:form.value,\n    resultData:resultText.value,\n    cracking: cracking.value,\n    progressValue: progressValue.value\n  })\n})\n\n// 监听cracking状态变化，更新store\nwatch(cracking, (newValue) => {\n  store.updateBruteForceCrackingState(newValue)\n})\n\nconst handleBruteForce = () => {\n  progressValue.value = 0\n  const currentConfig = currentTaskConfig.value\n  const params = {}\n  \n  // 根据当前任务配置构建参数\n  currentConfig.fields.forEach(field => {\n    params[field.name] = form.value[field.name]\n  })\n  \n  switch (form.value.selected) {\n    case \"1\":{\n      let head = \"\"\n      let tail = \"\"\n      let macs = []\n      if (params.target !== \"\" && params.target.indexOf(\",\") !== -1){\n        let tmp = params.target.split(\",\")\n        if(tmp.length !== 2){\n          toast.add({ severity: 'error', summary: '错误', detail: 'AirDrop必须提供首位各5尾的哈希值', life: 5000 })\n          return\n        }\n        head = tmp[0]\n        tail = tmp[1]\n      }\n\n      if (params.mac !== \"\"){\n        if(params.mac.indexOf(\",\") !== -1){\n          macs = params.mac.split(\",\")\n        }else{\n          macs.push(params.mac)\n        }\n      }\n      handleState()\n      CrackAirDrop(head,tail,params.region,macs,parseInt(params.length)).then((result)=>{\n        handleResult(result)\n      })\n      break;\n    }\n    case \"2\":{\n      let para = []\n      if (params.target !== \"\"){\n        if (params.target.indexOf(\",\") !== -1){\n          para.push(params.target)\n        }else{\n          para = params.target.split(\",\")\n        }\n      }\n      handleState()\n      CrackWXUin(para).then((result)=>{\n        handleResult(result)\n      })\n      break;\n    }\n  }\n}\n\nconst handleClear = () => {\n  resultText.value = \"\"\n  toast.add({ severity: 'info', summary: '信息', detail: '已清空输出', life: 3000 })\n}\n\nconst handleCancel = () => {\n  CancelCrack().then(()=>{\n    progressValue.value = 0\n    resultText.value += generateNormalTextOutput(`已手动取消`,\"red\")\n    toast.add({ severity: 'warn', summary: '警告', detail: '已手动取消', life: 3000 })\n    cracking.value = false\n  })\n}\n\nfunction handleResult(result){\n  resultText.value += generateSuccessTextOutput(\"爆破结束\",result.result)\n  resultText.value += generateNormalTextOutput(`耗时：${result.time}`,\"#df9b26\")\n  resultText.value += generateNormalTextOutput(`错误：${result.error}`,\"red\")\n  cracking.value = false\n  toast.add({ severity: 'success', summary: '成功', detail: '爆破完成', life: 3000 })\n}\n\nfunction handleState(){\n  cracking.value = true\n  resultText.value += generateNormalTextOutput(`开始爆破`,\"#ee5310\")\n  toast.add({ severity: 'info', summary: '信息', detail: '开始爆破', life: 3000 })\n}\n\nwatch(resultText, () => {\n  const card = document.querySelector('.result-card');\n  if (card) {\n    void card.offsetHeight;\n    card.scrollTop = card.scrollHeight;\n  }\n});\n\n</script>\n\n<style scoped>\n</style>"
  },
  {
    "path": "frontend/src/views/DataExtraction.vue",
    "content": "<template>\n  <div class=\"page-container\">\n    <Card class=\"form-card\">\n      <template #content>\n      <form class=\"form-layout\">\n        <div class=\"field full-width\">\n          <FloatLabel class=\"field full-width\" variant=\"over\">\n              <label for=\"selected\">选择任务</label>\n            <Select \n              id=\"selected\"\n              v-model=\"form.selected\" \n              :options=\"options\" \n              optionLabel=\"label\" \n              optionValue=\"value\"\n              placeholder=\"请选择任务\"\n              v-tooltip.top=\"'选择要执行的数据提取任务类型'\"\n            />\n          </FloatLabel>\n        </div>\n        <div v-for=\"(fieldGroup, index) in inputFields\" :key=\"index\" class=\"input-row\">\n          <div v-for=\"field in fieldGroup\" :key=\"field.name\" class=\"field half-width\">\n            <FloatLabel variant=\"on\">\n              <InputText \n                v-if=\"field.type === 'input'\"\n                :id=\"field.name\"\n                v-model=\"form[field.name]\" \n                :placeholder=\"field.name === 'file' ? '请拖入文件或目录' : '解密密码'\"\n                aria-autocomplete=\"none\"\n                @drop.prevent=\"field.name === 'file' ? null : null\"\n                @dragover.prevent=\"field.name === 'file' ? null : null\"\n                v-tooltip.top=\"field.name === 'file' ? '拖入要提取数据的文件或目录路径' : '输入解密所需的密码（某些任务需要）'\"\n              />\n              <label :for=\"field.name\">{{ field.label }}</label>\n            </FloatLabel>\n          </div>\n        </div>\n      </form>\n        <div class=\"button-row\">\n          <Button \n            label=\"解析\" \n            icon=\"pi pi-search\" \n            @click=\"handleExtract\"\n            class=\"button equal-width\"\n          />\n          <Button \n            label=\"清空输出\" \n            icon=\"pi pi-trash\" \n            @click=\"handleClear\"\n            severity=\"secondary\"\n            class=\"button equal-width\"\n          />\n        </div>\n      </template>\n    </Card>\n    <Card class=\"result-card\" ref=\"resultCardRef\" :loading=\"loading\">\n      <template #content>\n      <div v-if=\"Object.keys(tableData).length === 0\" class=\"empty\">\n        <Empty />\n      </div>\n      <Tabs v-if=\"Object.keys(tableData).length !== 0\" :value=\"getActiveTabIndex\" @tab-change=\"handleTabChange\">\n        <TabList>\n          <Tab v-for=\"(tab,index) in tabs\" :key=\"tab.label\" :value=\"index\">{{ tab.label }}</Tab>\n        </TabList>\n        <TabPanels>\n        <TabPanel v-for=\"(tab,index) in tabs\" :key=\"tab.label\" :value=\"index\">\n          <DataTable\n            :value=\"tableData[tab.value]\"\n            :columns=\"columns[tab.value]\"\n            dataKey=\"id\"\n            stripedRows\n            removableSort\n            scrollable\n            :scrollHeight=\"tableScrollHeight\"\n            :virtualScrollerOptions=\"{ itemSize: 46 }\"\n            :reorderableColumns=\"true\"\n            @column-reorder=\"onColumnReorder\"\n            class=\"p-datatable-sm\"\n          >\n            <Column v-for=\"col in columns[tab.value]\" :key=\"col.colKey\" :field=\"col.colKey\" :header=\"col.title\" :sortable=\"true\">\n              <template #body=\"{ data, field }\">\n                <span @click=\"handleCellClick(data[field])\">{{ data[field] }}</span>\n              </template>\n            </Column>\n            <template #empty>\n              <Empty />\n            </template>\n          </DataTable>\n        </TabPanel>\n        </TabPanels>\n      </Tabs>\n      </template>\n    </Card>\n    <Toast position=\"bottom-right\"/>\n  </div>\n</template>\n\n<script setup>\nimport { ref, computed, onMounted, onUnmounted, nextTick } from 'vue'\nimport { useToast } from 'primevue/usetoast'\nimport { usePageDataStore } from \"@/store\"\nimport { watch } from \"vue\"\nimport { ClipboardSetText, OnFileDrop, OnFileDropOff } from \"../../wailsjs/runtime/runtime.js\"\nimport {\n  ExtractDbeaver,\n  ExtractFinalShell, ExtractHawk2, ExtractMetaMask,\n  ExtractMobaXterm,\n  ExtractNavicat, ExtractXShell\n} from \"../../wailsjs/go/extractor/InfoExtractor.js\"\nimport FloatLabel from 'primevue/floatlabel'\nimport Select from 'primevue/select'\nimport Tabs from 'primevue/tabs'\nimport Empty from '@/components/Empty.vue'\nimport { useTableHeight } from '@/composables/useTableHeight.js'\n\n// 任务配置对象，定义每个任务需要的输入字段\nconst taskConfigs = {\n  \"1\": {\n    fields: [\n      { name: \"file\", label: \"文件/目录\", type: \"input\" }\n    ]\n  },\n  \"2\": {\n    fields: [\n      { name: \"file\", label: \"文件/目录\", type: \"input\" },\n      { name: \"password\", label: \"密码\", type: \"input\" }\n    ]\n  },\n  \"3\": {\n    fields: [\n      { name: \"file\", label: \"文件/目录\", type: \"input\" }\n    ]\n  },\n  \"4\": {\n    fields: [\n      { name: \"file\", label: \"文件/目录\", type: \"input\" }\n    ]\n  },\n  \"5\": {\n    fields: [\n      { name: \"file\", label: \"文件/目录\", type: \"input\" },\n      { name: \"password\", label: \"密码\", type: \"input\" }\n    ]\n  },\n  \"6\": {\n    fields: [\n      { name: \"file\", label: \"文件/目录\", type: \"input\" },\n      { name: \"password\", label: \"密码\", type: \"input\" }\n    ]\n  },\n  \"7\": {\n    fields: [\n      { name: \"file\", label: \"文件/目录\", type: \"input\" }\n    ]\n  }\n}\n\nconst toast = useToast()\nconst store = usePageDataStore()\nconst form = ref(store.dataExtractionStore?.formData || {\n  selected: '',\n  file: '',\n  password: '',\n})\n// 计算当前任务配置\nconst currentTaskConfig = computed(() => {\n  return taskConfigs[form.value.selected] || { fields: [] }\n})\n\n// 计算输入字段，每两个一组\nconst inputFields = computed(() => {\n  const fields = currentTaskConfig.value.fields\n  const groups = []\n  for (let i = 0; i < fields.length; i += 2) {\n    groups.push(fields.slice(i, i + 2))\n  }\n  return groups\n})\n\nconst tableData = ref(store.dataExtractionStore?.tableData || {})\nconst tabs = ref(store.dataExtractionStore?.tabsData || [])\nconst activeTab = ref(store.dataExtractionStore?.tabData || '')\nconst columns = ref(store.dataExtractionStore?.columnsData || {})\n\n// 动态计算DataTable的scrollHeight\nconst tableScrollHeight = ref('60vh')\nconst resultCardRef = ref(null)\n\n// 使用公共的表格高度计算函数\nconst { calculateTableHeight, handleResize } = useTableHeight(resultCardRef, tableScrollHeight)\n\n// 组件挂载后设置监听\nonMounted(() => {\n  window.addEventListener('resize', handleResize)\n  // 初始计算\n  nextTick(() => {\n    calculateTableHeight()\n  })\n})\n\n// 组件卸载时移除监听\nonUnmounted(() => {\n  window.removeEventListener('resize', handleResize)\n  // 清理文件拖放监听器\n  OnFileDropOff()\n})\n\n// 计算属性，用于获取当前活动标签的索引\nconst getActiveTabIndex = computed(() => {\n  const index = tabs.value.findIndex(tab => tab.value === activeTab.value)\n  return index >= 0 ? index : 0\n})\n\nwatch([form, tableData, tabs, activeTab], () => {\n  store.saveDataExtractionData({\n    formData: form.value,\n    tableData: tableData.value,\n    tabsData: tabs.value,\n    tabData: activeTab.value,\n    columnsData: columns.value\n  })\n})\n\nconst options = ref([\n  { label: \"Navicat连接信息提取，指定文件为用户注册表文件NTUSER.DAT\", value: \"1\" },\n  { label: \"MobaXterm连接信息解密，指定文件为用户注册表文件NTUSER.DAT并给出主密码\", value: \"2\" },\n  { label: \"Dbeaver连接信息解密，指定文件为data-sources.json的父目录\", value: \"3\" },\n  { label: \"FinalShell连接信息解密，指定文件为conn文件夹\", value: \"4\" },\n  { label: \"XShell、XFtp连接信息解密，指定文件为session文件夹并给出密码（用户名+sid）\", value: \"5\" },\n  { label: \"Hawk2.xml数据解密，给出密码（crypto.KEY_128(256).xml中的base64值）\", value: \"6\" },\n  { label: \"MetaMask解析，指定文件为persis-root\", value: \"7\" },\n])\n\nconst loading = ref(false)\n\nconst handleExtract = () => {\n  loading.value = true\n  const currentConfig = currentTaskConfig.value\n  const params = {}\n  \n  // 根据当前任务配置构建参数\n  currentConfig.fields.forEach(field => {\n    params[field.name] = form.value[field.name]\n  })\n  \n  let file = params.file\n  let password = params.password\n  let func = null\n  if (file === \"\" || file === undefined || file === null) {\n    toast.add({ severity: 'error', summary: '错误', detail: '文件参数异常！', life: 3000 })\n    loading.value = false\n    return\n  }\n  switch (form.value.selected) {\n    case \"1\":\n      func = ExtractNavicat\n      break\n    case \"2\":\n      func = ExtractMobaXterm\n      break\n    case \"3\":\n      func = ExtractDbeaver\n      break\n    case \"4\":\n      func = ExtractFinalShell\n      break\n    case \"5\":\n      func = ExtractXShell\n      break\n    case \"6\":\n      func = ExtractHawk2\n      break\n    case \"7\":\n      func = ExtractMetaMask\n      break\n  }\n  if (form.value.selected === \"2\" ||\n      form.value.selected === \"5\" ||\n      form.value.selected === \"6\") {\n    if (password === \"\" || password === undefined || password === null) {\n      toast.add({ severity: 'error', summary: '错误', detail: '密码参数异常！', life: 3000 })\n      loading.value = false\n      return\n    }\n    func(file, password).then((result) => {\n      try {\n        if (result.err !== \"\") {\n          toast.add({ severity: 'error', summary: '错误', detail: result.err, life: 3000 })\n        } else {\n          handleResult(result)\n        }\n      } finally {\n        loading.value = false\n      }\n    })\n  } else {\n    func(file).then((result) => {\n      try {\n        if (result.err !== \"\") {\n          toast.add({ severity: 'error', summary: '错误', detail: result.err, life: 3000 })\n        } else {\n          handleResult(result)\n        }\n      } finally {\n        loading.value = false\n      }\n    })\n  }\n}\n\nfunction handleResult(result) {\n  columns.value = {}\n  tabs.value = []\n  tableData.value = {}\n  let idx = 0\n  for (let tab in result.data) {\n    if (idx === 0) {\n      activeTab.value = tab\n      idx++\n    }\n    tabs.value.push({\n      value: tab, label: tab\n    })\n    if (result.data[tab] == null) {\n        toast.add({ severity: 'warn', summary: '提示', detail: tab + '无数据', life: 3000 })\n      continue\n    }\n    let inf = result.data[tab][0]\n    tableData.value[tab] = {}\n    columns.value[tab] = []\n    tableData.value[tab] = result.data[tab]\n    for (let key in inf) {\n      columns.value[tab].push({\n        colKey: key, title: key, ellipsis: true, width: \"15vw\"\n      })\n    }\n  }\n  \n  // 数据加载完成后重新计算表格高度\n  nextTick(() => {\n    calculateTableHeight()\n  })\n}\n\nconst handleClear = () => {\n  tableData.value = {}\n  tabs.value = []\n  activeTab.value = \"\"\n  columns.value = {}\n}\n\nconst handleTabChange = (event) => {\n  activeTab.value = tabs.value[event.index].value\n}\n\nconst handleCellClick = (value) => {\n  // 复制单元格内容\n  ClipboardSetText(value).then((ok) => {\n    if (ok) {\n      toast.add({ severity: 'success', summary: '成功', detail: '已复制到剪贴板', life: 2000 })\n    }\n  })\n}\n\nonMounted(() => {\n  OnFileDrop((x, y, paths) => {\n    if (paths.length > 0) {\n      form.value.file = paths[0]\n      toast.add({ severity: 'success', summary: '成功', detail: '文件已添加', life: 3000 })\n    }\n  }, false)\n})\n\nconst onColumnReorder = (event) => {\n  columns.value[activeTab.value] = event.columns\n}\n</script>\n\n<style scoped>\n</style>"
  },
  {
    "path": "frontend/src/views/DatabaseDecrypt.vue",
    "content": "<template>\n  <div class=\"page-container\">\n    <Card class=\"form-card\">\n      <template #content>\n      <form class=\"form-layout\">\n        <div class=\"field full-width\">\n          <FloatLabel class=\"field full-width\" variant=\"over\">\n              <label for=\"selected\">选择任务</label>\n            <Select \n              id=\"selected\"\n              v-model=\"form.selected\" \n              :options=\"options\" \n              optionLabel=\"label\" \n              optionValue=\"value\"\n              placeholder=\"请选择任务\"\n              v-tooltip.top=\"'选择要解密的数据库类型'\"\n            />\n          </FloatLabel>\n        </div>\n        <div v-for=\"(fieldGroup, index) in inputFields\" :key=\"index\" class=\"input-row\">\n          <div v-for=\"field in fieldGroup\" :key=\"field.name\" class=\"field half-width\">\n            <FloatLabel variant=\"on\">\n              <InputText \n                v-if=\"field.type === 'input'\"\n                :id=\"field.name\"\n                v-model=\"form[field.name]\" \n                :placeholder=\"field.name === 'file' ? '请拖入文件或目录' : '解密密码'\"\n                aria-autocomplete=\"none\"\n                @drop.prevent=\"field.name === 'file' ? null : null\"\n                v-tooltip.top=\"field.name === 'file' ? '拖入要解密的数据库文件路径' : '输入解密数据库所需的密码（某些数据库需要）'\"\n              />\n              <label :for=\"field.name\">{{ field.label }}</label>\n            </FloatLabel>\n          </div>\n        </div>\n      </form>\n      <div class=\"button-row\">\n        <Button class=\"button equal-width\" @click=\"handleDecrypt\">\n          <i class=\"pi pi-lock-open\"></i>\n          解密\n        </Button>\n        <Button class=\"button equal-width\" severity=\"secondary\" @click=\"handleClear\">\n          <i class=\"pi pi-trash\"></i>\n          清空输出\n        </Button>\n      </div>\n      </template>\n    </Card>\n    <Card class=\"result-card\">\n      <template #content>\n      <div class=\"empty\" v-if=\"resultText===''\">\n        <Empty />\n      </div>\n        <div class=\"result-output\" v-html=\"resultText\"/>\n      </template>\n    </Card>\n    <Toast position=\"bottom-right\"/>\n  </div>\n</template>\n\n<script setup>\nimport { ref, watch, onMounted, onUnmounted, computed } from 'vue'\nimport { useToast } from 'primevue/usetoast'\nimport {\n  DecryptAMapDB,\n  DecryptDingTalkDB,\n  DecryptEnMicroMsg,\n  DecryptFTSIndexDB, DecryptNtqqDB, DecryptSQLCipher3DB, DecryptSQLCipher4DB, DecryptSystemDataSQLite, DecryptWCDB\n} from \"../../wailsjs/go/database/DecryptDatabase.js\";\nimport {generateNormalTextOutput, generateSuccessTextOutput} from \"@/utils.js\";\nimport { OnFileDrop, OnFileDropOff } from \"../../wailsjs/runtime/runtime.js\";\nimport {usePageDataStore} from \"@/store\";\nimport FloatLabel from 'primevue/floatlabel'\nimport Select from 'primevue/select'\nimport Empty from '@/components/Empty.vue'\n\n// 任务配置对象，定义每个任务需要的输入字段\nconst taskConfigs = {\n  \"1\": {\n    fields: [\n      { name: \"file\", label: \"文件/目录\", type: \"input\" },\n      { name: \"password\", label: \"密码\", type: \"input\" }\n    ]\n  },\n  \"2\": {\n    fields: [\n      { name: \"file\", label: \"文件/目录\", type: \"input\" },\n      { name: \"password\", label: \"密码\", type: \"input\" }\n    ]\n  },\n  \"3\": {\n    fields: [\n      { name: \"file\", label: \"文件/目录\", type: \"input\" }\n    ]\n  },\n  \"4\": {\n    fields: [\n      { name: \"file\", label: \"文件/目录\", type: \"input\" },\n      { name: \"password\", label: \"密码\", type: \"input\" }\n    ]\n  },\n  \"5\": {\n    fields: [\n      { name: \"file\", label: \"文件/目录\", type: \"input\" },\n      { name: \"password\", label: \"密码\", type: \"input\" }\n    ]\n  },\n  \"6\": {\n    fields: [\n      { name: \"file\", label: \"文件/目录\", type: \"input\" },\n      { name: \"password\", label: \"密码\", type: \"input\" }\n    ]\n  },\n  \"7\": {\n    fields: [\n      { name: \"file\", label: \"文件/目录\", type: \"input\" },\n      { name: \"password\", label: \"密码\", type: \"input\" }\n    ]\n  },\n  \"8\": {\n    fields: [\n      { name: \"file\", label: \"文件/目录\", type: \"input\" },\n      { name: \"password\", label: \"密码\", type: \"input\" }\n    ]\n  },\n  \"9\": {\n    fields: [\n      { name: \"file\", label: \"文件/目录\", type: \"input\" },\n      { name: \"password\", label: \"密码\", type: \"input\" }\n    ]\n  }\n}\n\nconst toast = useToast()\nconst store = usePageDataStore()\nconst form = ref(store.databaseDecryptStore?.formData || {\n  selected:\"\",\n  password:\"\",\n  file:\"\",\n})\n// 计算当前任务配置\nconst currentTaskConfig = computed(() => {\n  return taskConfigs[form.value.selected] || { fields: [] }\n})\n\n// 计算输入字段，每两个一组\nconst inputFields = computed(() => {\n  const fields = currentTaskConfig.value.fields\n  const groups = []\n  for (let i = 0; i < fields.length; i += 2) {\n    groups.push(fields.slice(i, i + 2))\n  }\n  return groups\n})\n\nconst resultText = ref(store.databaseDecryptStore?.resultData || \"\")\nconst options = ref([\n  {label:\"微信的EnMicroMsg.db\",value:\"1\"},\n  {label:\"微信的FTS5IndexMicroMsg_encrypt.db\",value:\"2\"},\n  {label:\"高德的girf_sync.db\",value:\"3\"},\n  {label:\"钉钉的数据库，密码如HUAWEI P40/armeabi-v7a/P40/qcom/HUAWEIP40\",value:\"4\"},\n  {label:\"SQLCipher4加密的数据库\",value:\"5\"},\n  {label:\"SQLCipher3加密的数据库\",value:\"6\"},\n  {label:\"wcdb加密的数据库\",value:\"7\"},\n  {label:\"ntqq数据库解密\",value:\"8\"},\n  {label:\"System.Data.SQLite库加密的数据库\",value:\"9\"},\n])\n\nwatch([form,resultText],()=>{\n  store.saveDatabaseDecryptData({\n    formData:form.value,\n    resultData:resultText.value\n  })\n})\n\nconst handleClear = () => {\n  resultText.value = \"\"\n  toast.add({ severity: 'info', summary: '提示', detail: '已清空输出', life: 3000 })\n}\n\nconst handleDecrypt = () => {\n  const currentConfig = taskConfigs[form.value.selected]\n  if (!currentConfig) {\n    toast.add({ severity: 'warn', summary: '警告', detail: '请选择一个解密任务', life: 3000 })\n    return\n  }\n\n  // 动态构建参数对象\n  const params = {}\n  currentConfig.fields.forEach(field => {\n    params[field.name] = form.value[field.name]\n  })\n\n  // 从动态参数中获取file和password\n  const { file, password } = params\n\n  if (!file) {\n    toast.add({ severity: 'warn', summary: '警告', detail: '请输入文件/目录', life: 3000 })\n    return\n  }\n\n  var func\n  \n  switch (form.value.selected) {\n    case \"1\":{\n      func = DecryptEnMicroMsg;\n      break;\n    }\n    case \"2\":{\n      func = DecryptFTSIndexDB;\n      break;\n    }\n    case \"3\":{\n      func = DecryptAMapDB;\n      break;\n    }\n    case \"4\":{\n      func = DecryptDingTalkDB;\n      break;\n    }\n    case \"5\":{\n      func = DecryptSQLCipher4DB;\n      break;\n    }\n    case \"6\":{\n      func = DecryptSQLCipher3DB;\n      break;\n    }\n    case \"7\":{\n      func = DecryptWCDB;\n      break;\n    }\n    case \"8\":{\n      func = DecryptNtqqDB;\n      break;\n    }\n    case \"9\":{\n      func = DecryptSystemDataSQLite;\n      break;\n    }\n    default:\n      toast.add({ severity: 'warn', summary: '警告', detail: '请选择一个解密任务', life: 3000 })\n      return\n  }\n  \n  toast.add({ severity: 'info', summary: '提示', detail: '开始解密...', life: 3000 })\n  \n  if (form.value.selected === \"3\") {\n    func(file).then((result)=>{\n      if (result.err !== \"\") {\n        resultText.value += generateNormalTextOutput(result.err,\"red\")\n        toast.add({ severity: 'error', summary: '错误', detail: '解密失败', life: 3000 })\n      }else{\n        resultText.value += generateSuccessTextOutput(\"解密成功，解密后的数据库已保存至\",result.save_path)\n        toast.add({ severity: 'success', summary: '成功', detail: '解密完成', life: 3000 })\n      }\n    })\n  }else{\n    func(file,password).then((result)=>{\n      if (result.err !== \"\") {\n        resultText.value += generateNormalTextOutput(result.err,\"red\")\n        toast.add({ severity: 'error', summary: '错误', detail: '解密失败', life: 3000 })\n      }else{\n        resultText.value += generateSuccessTextOutput(\"解密成功，解密后的数据库已保存至\",result.save_path)\n        if (form.value.selected === \"1\") {\n          resultText.value += generateSuccessTextOutput(\"成功提取微信ID：\",result.wxid)\n        }\n        toast.add({ severity: 'success', summary: '成功', detail: '解密完成', life: 3000 })\n      }\n    })\n  }\n}\n\nonMounted(() => {\n  OnFileDrop((x, y, paths) => {\n    if (paths.length > 0) {\n      form.value.file = paths[0]\n      toast.add({ severity: 'success', summary: '成功', detail: '文件已添加', life: 3000 })\n    }\n  }, false)\n})\n\nwatch(resultText, () => {\n  const card = document.querySelector('.result-card');\n  if (card) {\n    card.scrollTop = card.scrollHeight;\n  }\n});\n\n// 组件卸载时清理文件拖放监听器\nonUnmounted(() => {\n  OnFileDropOff()\n})\n</script>\n\n<style scoped>\n</style>"
  },
  {
    "path": "frontend/src/views/FileReader.vue",
    "content": "<template>\n    <div class=\"page-container\">\n        <Card class=\"form-card\">\n            <template #content>\n                <form class=\"form-layout\">\n                    <div class=\"field full-width\">\n                        <FloatLabel class=\"field full-width\" variant=\"over\">\n                            <label for=\"selected\">选择任务</label>\n                            <Select id=\"selected\" v-model=\"form.selected\" :options=\"options\" optionLabel=\"label\"\n                                optionValue=\"value\" placeholder=\"请选择任务\" v-tooltip.top=\"'选择要执行的数据提取任务类型'\" />\n                        </FloatLabel>\n                    </div>\n\n                    <div v-for=\"(fieldGroup, index) in inputFields\" :key=\"index\" class=\"input-row\">\n                        <div v-for=\"field in fieldGroup\" :key=\"field.name\" class=\"field half-width\">\n                            <FloatLabel variant=\"on\">\n                                <InputText v-if=\"field.type === 'input'\" :id=\"field.name\" v-model=\"form[field.name]\"\n                                    :placeholder=\"field.name === 'file' ? '请拖入文件或目录' : '解密密码'\" aria-autocomplete=\"none\"\n                                    @drop.prevent=\"field.name === 'file' ? null : null\"\n                                    @dragover.prevent=\"field.name === 'file' ? null : null\"\n                                    v-tooltip.top=\"field.name === 'file' ? '拖入要提取数据的文件或目录路径' : '输入解密所需的密码（某些任务需要）'\" />\n                                <label :for=\"field.name\">{{ field.label }}</label>\n                            </FloatLabel>\n                        </div>\n                    </div>\n                </form>\n                <div class=\"button-row\">\n                    <Button label=\"解析\" icon=\"pi pi-search\" @click=\"handleExtract\" class=\"button equal-width\" />\n                    <Button label=\"清空输出\" icon=\"pi pi-trash\" @click=\"handleClear\" severity=\"secondary\"\n                        class=\"button equal-width\" />\n                </div>\n            </template>\n        </Card>\n        <Card class=\"result-card\" ref=\"resultCardRef\" :loading=\"loading\">\n            <template #content>\n                <div v-if=\"Object.keys(tableData).length === 0\" class=\"empty\">\n                    <Empty />\n                </div>\n                <Tabs v-if=\"Object.keys(tableData).length !== 0\" :value=\"getActiveTabIndex\"\n                    @tab-change=\"handleTabChange\">\n                    <TabList>\n                        <Tab v-for=\"(tab, index) in tabs\" :key=\"tab.label\" :value=\"index\">{{ tab.label }}</Tab>\n                    </TabList>\n                    <TabPanels>\n                        <TabPanel v-for=\"(tab, index) in tabs\" :key=\"tab.label\" :value=\"index\">\n                            <DataTable :value=\"tableData[tab.value]\" :columns=\"columns[tab.value]\" dataKey=\"id\"\n                                stripedRows removableSort scrollable :scrollHeight=\"tableScrollHeight\"\n                                :virtualScrollerOptions=\"{ itemSize: 46 }\" :reorderableColumns=\"true\"\n                                @column-reorder=\"onColumnReorder\" class=\"p-datatable-sm\">\n                                <Column v-for=\"col in columns[tab.value]\" :key=\"col.colKey\" :field=\"col.colKey\"\n                                    :header=\"col.title\" :sortable=\"true\">\n                                    <template #body=\"{ data, field }\">\n                                        <span @click=\"handleCellClick(data[field])\">{{ data[field] }}</span>\n                                    </template>\n                                </Column>\n                                <template #empty>\n                                    <Empty />\n                                </template>\n                            </DataTable>\n                        </TabPanel>\n                    </TabPanels>\n                </Tabs>\n            </template>\n        </Card>\n        <Toast position=\"bottom-right\" />\n    </div>\n</template>\n\n<script setup>\nimport { ref, computed, onMounted, onUnmounted, nextTick } from 'vue'\nimport { useToast } from 'primevue/usetoast'\nimport { usePageDataStore } from \"@/store\"\nimport { watch } from \"vue\"\nimport { ClipboardSetText, OnFileDrop, OnFileDropOff } from \"../../wailsjs/runtime/runtime.js\"\nimport { ReadLevelDB, ReadMMKV } from \"../../wailsjs/go/reader/FileReader.js\"\nimport FloatLabel from 'primevue/floatlabel'\nimport Select from 'primevue/select'\nimport Tabs from 'primevue/tabs'\nimport Empty from '@/components/Empty.vue'\nimport { useTableHeight } from '@/composables/useTableHeight.js'\n\n// 任务配置对象，定义每个任务需要的输入字段\nconst taskConfigs = {\n    \"1\": {\n        fields: [\n            { name: \"file\", label: \"文件/目录\", type: \"input\" }\n        ]\n    },\n    \"2\": {\n        fields: [\n            { name: \"file\", label: \"文件/目录\", type: \"input\" },\n            { name: \"password\", label: \"密码\", type: \"input\" }\n        ]\n    }\n}\n\nconst toast = useToast()\nconst store = usePageDataStore()\nconst form = ref(store.fileReaderStore?.formData || {\n    selected: '',\n    file: '',\n    password: '',\n})\n// 计算当前任务配置\nconst currentTaskConfig = computed(() => {\n    return taskConfigs[form.value.selected] || { fields: [] }\n})\n\n// 计算输入字段，每两个一组\nconst inputFields = computed(() => {\n    const fields = currentTaskConfig.value.fields\n    const groups = []\n    for (let i = 0; i < fields.length; i += 2) {\n        groups.push(fields.slice(i, i + 2))\n    }\n    return groups\n})\n\nconst tableData = ref(store.fileReaderStore?.tableData || {})\nconst tabs = ref(store.fileReaderStore?.tabsData || [])\nconst activeTab = ref(store.fileReaderStore?.tabData || '')\nconst columns = ref(store.fileReaderStore?.columnsData || {})\n\n// 动态计算DataTable的scrollHeight\nconst tableScrollHeight = ref('60vh')\nconst resultCardRef = ref(null)\n\n// 使用公共的表格高度计算函数\nconst { calculateTableHeight, handleResize } = useTableHeight(resultCardRef, tableScrollHeight)\n\n// 组件挂载后设置监听\nonMounted(() => {\n    window.addEventListener('resize', handleResize)\n    // 初始计算\n    nextTick(() => {\n        calculateTableHeight()\n    })\n})\n\n// 组件卸载时移除监听\nonUnmounted(() => {\n    window.removeEventListener('resize', handleResize)\n    // 清理文件拖放监听器\n    OnFileDropOff()\n})\n\n// 计算属性，用于获取当前活动标签的索引\nconst getActiveTabIndex = computed(() => {\n    const index = tabs.value.findIndex(tab => tab.value === activeTab.value)\n    return index >= 0 ? index : 0\n})\n\nwatch([form, tableData, tabs, activeTab], () => {\n    store.saveFileReaderData({\n        formData: form.value,\n        tableData: tableData.value,\n        tabsData: tabs.value,\n        tabData: activeTab.value,\n        columnsData: columns.value\n    })\n})\n\nconst options = ref([\n    { label: \"leveldb读取，指定文件夹为leveldb数据库文件夹\", value: \"1\" },\n    { label: \"mmkv读取，指定文件mmkv数据文件或mmkv目录，单文件时支持输入密码解密加密数据\", value: \"2\" },\n])\n\nconst loading = ref(false)\n\nconst handleExtract = () => {\n    loading.value = true\n\n    const currentConfig = taskConfigs[form.value.selected]\n    if (!currentConfig) {\n        toast.add({ severity: 'error', summary: '错误', detail: '请选择一个任务', life: 3000 })\n        loading.value = false\n        return\n    }\n\n    // 动态构建参数对象\n    const params = {}\n    currentConfig.fields.forEach(field => {\n        params[field.name] = form.value[field.name]\n    })\n\n    // 从动态参数中获取file和password\n    const { file, password } = params\n\n    if (file === \"\" || file === undefined || file === null) {\n        toast.add({ severity: 'error', summary: '错误', detail: '文件参数异常！', life: 3000 })\n        loading.value = false\n        return\n    }\n\n    let func = null\n    switch (form.value.selected) {\n        case \"1\":\n            func = ReadLevelDB\n            break\n        case \"2\":\n            func = ReadMMKV\n            break\n    }\n\n    if (form.value.selected === \"2\") {\n        if (password === undefined || password === null) {\n            password = \"\"\n        }\n        func(file, password).then((result) => {\n            console.log(result)\n            try {\n                if (result.err !== \"\") {\n                    toast.add({ severity: 'error', summary: '错误', detail: result.err, life: 3000 })\n                } else {\n                    handleResult(result)\n                }\n            } finally {\n                loading.value = false\n            }\n        })\n    } else {\n        func(file).then((result) => {\n            try {\n                if (result.err !== \"\") {\n                    toast.add({ severity: 'error', summary: '错误', detail: result.err, life: 3000 })\n                } else {\n                    handleResult(result)\n                }\n            } finally {\n                loading.value = false\n            }\n        })\n    }\n}\n\nfunction handleResult(result) {\n    columns.value = {}\n    tabs.value = []\n    tableData.value = {}\n    let idx = 0\n    for (let tab in result.data) {\n        if (idx === 0) {\n            activeTab.value = tab\n            idx++\n        }\n        tabs.value.push({\n            value: tab, label: tab\n        })\n        if (result.data[tab] == null) {\n            toast.add({ severity: 'warn', summary: '提示', detail: tab + '无数据', life: 3000 })\n            continue\n        }\n        let inf = result.data[tab][0]\n        tableData.value[tab] = {}\n        columns.value[tab] = []\n        tableData.value[tab] = result.data[tab]\n        for (let key in inf) {\n            columns.value[tab].push({\n                colKey: key, title: key, ellipsis: true, width: \"15vw\"\n            })\n        }\n    }\n\n    // 数据加载完成后重新计算表格高度\n    nextTick(() => {\n        calculateTableHeight()\n    })\n}\n\nconst handleClear = () => {\n    tableData.value = {}\n    tabs.value = []\n    activeTab.value = \"\"\n    columns.value = {}\n}\n\nconst handleTabChange = (event) => {\n    activeTab.value = tabs.value[event.index].value\n}\n\nconst handleCellClick = (value) => {\n    // 复制单元格内容\n    ClipboardSetText(value).then((ok) => {\n        if (ok) {\n            toast.add({ severity: 'success', summary: '成功', detail: '已复制到剪贴板', life: 2000 })\n        }\n    })\n}\n\nonMounted(() => {\n    OnFileDrop((x, y, paths) => {\n        if (paths.length > 0) {\n            form.value.file = paths[0]\n            toast.add({ severity: 'success', summary: '成功', detail: '文件已添加', life: 3000 })\n        }\n    }, false)\n})\n\nconst onColumnReorder = (event) => {\n    columns.value[activeTab.value] = event.columns\n}\n</script>\n\n<style scoped></style>"
  },
  {
    "path": "frontend/src/views/IPLocation.vue",
    "content": "<template>\n  <div class=\"page-container\">\n    <!-- 输入卡片，支持抽屉式收起 -->\n    <Card class=\"form-card\" :class=\"{ 'collapsed': isCardCollapsed }\">\n      <template #content>\n        <!-- 卡片内容区域 -->\n        <div class=\"card-content\" :class=\"{ 'collapsed-content': isCardCollapsed }\">\n          <!-- 批量IP输入区域 -->\n          <div class=\"mb-3\">\n            <FloatLabel variant=\"on\">\n              <Textarea \n                id=\"batch-ips\"\n                v-model=\"batchIPs\" \n                rows=\"5\" \n                class=\"w-full\"\n                fluid\n              />\n              <label for=\"batch-ips\">批量查询 (每行一个IP，数据来源纯真IP数据库)</label>\n            </FloatLabel>\n          </div>\n\n          <!-- 数据库操作和查询按钮行 -->\n          <div class=\"button-row mb-4\">\n            <Button \n              label=\"检查数据库\" \n              icon=\"pi pi-database\" \n              @click=\"checkDatabase\" \n              :loading=\"loading.checkDB\"\n              size=\"small\"\n              class=\"button-item\"\n            />\n            <Button \n              label=\"更新数据库\" \n              icon=\"pi pi-refresh\" \n              @click=\"updateDatabase\" \n              :loading=\"loading.updateDB\"\n              severity=\"secondary\"\n              size=\"small\"\n              class=\"button-item\"\n            />\n            <Button \n              label=\"批量查询\" \n              icon=\"pi pi-search\" \n              @click=\"searchBatchIPs\"\n              :loading=\"loading.searchBatch\"\n              :disabled=\"!batchIPs || !dbLoaded\"\n              size=\"small\"\n              severity=\"primary\"\n              class=\"button-item\"\n            />\n          </div>\n        </div>\n      </template>\n    </Card>\n\n    <!-- 视图切换和折叠按钮组 -->\n    <div class=\"view-controls\">\n      <!-- 视图切换按钮组 -->\n      <div class=\"view-switch-buttons\">\n        <Button \n          label=\"表格视图\" \n          icon=\"pi pi-table\" \n          :severity=\"viewMode === 'table' ? 'primary' : 'secondary'\"\n          @click=\"viewMode = 'table'\"\n          size=\"small\"\n        />\n        <Button \n          label=\"地图视图\" \n          icon=\"pi pi-map\" \n          :severity=\"viewMode === 'map' ? 'primary' : 'secondary'\"\n          @click=\"viewMode = 'map'\"\n          size=\"small\"\n        />\n      </div>\n      \n      <!-- 折叠按钮 -->\n      <div class=\"collapse-button\" @click=\"toggleCardCollapse\">\n        <i :class=\"isCardCollapsed ? 'pi pi-chevron-down' : 'pi pi-chevron-up'\"></i>\n      </div>\n    </div>\n\n    <!-- 结果卡片 -->\n    <Card class=\"result-card\" ref=\"resultCardRef\">\n      <template #content>\n        <div v-if=\"searchResults.length === 0\" class=\"empty\">\n          <Empty />\n        </div>\n\n        <!-- 表格视图 -->\n        <div v-if=\"viewMode === 'table' && searchResults.length > 0\" class=\"mb-4\">\n          <DataTable \n            :value=\"searchResults\" \n            responsiveLayout=\"scroll\"\n            :loading=\"loading.search || loading.searchBatch\"\n            class=\"p-datatable-sm fixed-header-table\"\n            scrollable\n            :scrollHeight=\"tableScrollHeight\"\n            :virtualScrollerOptions=\"{ itemSize: 46 }\"\n            :columnResizeMode=\"'fit'\"\n            :resizableColumns=\"true\"\n            :frozenWidth=\"tableFrozenWidth\"\n          >\n            <Column field=\"ip\" header=\"IP地址\" :style=\"{ width: '150px' }\">\n              <template #body=\"{ data, field }\">\n                <span @click=\"handleCellClick(data[field])\" class=\"cursor-pointer\">{{ data[field] }}</span>\n              </template>\n            </Column>\n            <Column field=\"country_name\" header=\"国家\" :style=\"{ width: '120px' }\">\n              <template #body=\"{ data, field }\">\n                <span @click=\"handleCellClick(data[field])\" class=\"cursor-pointer\">{{ data[field] }}</span>\n              </template>\n            </Column>\n            <Column field=\"region_name\" header=\"省份/地区\" :style=\"{ width: '150px' }\">\n              <template #body=\"{ data, field }\">\n                <span @click=\"handleCellClick(data[field])\" class=\"cursor-pointer\">{{ data[field] }}</span>\n              </template>\n            </Column>\n            <Column field=\"city_name\" header=\"城市\" :style=\"{ width: '150px' }\">\n              <template #body=\"{ data, field }\">\n                <span @click=\"handleCellClick(data[field])\" class=\"cursor-pointer\">{{ data[field] }}</span>\n              </template>\n            </Column>\n            <Column field=\"district_name\" header=\"区县\" :style=\"{ width: '120px' }\">\n              <template #body=\"{ data, field }\">\n                <span @click=\"handleCellClick(data[field])\" class=\"cursor-pointer\">{{ data[field] }}</span>\n              </template>\n            </Column>\n            <Column field=\"isp_domain\" header=\"运营商\" :style=\"{ width: '200px' }\">\n              <template #body=\"{ data, field }\">\n                <span @click=\"handleCellClick(data[field])\" class=\"cursor-pointer\">{{ data[field] }}</span>\n              </template>\n            </Column>\n          </DataTable>\n        </div>\n\n        <!-- 地图视图 -->\n        <div v-if=\"viewMode === 'map' && searchResults.length > 0\" class=\"map-container\">\n          <!-- 地图加载动画 -->\n          <div v-if=\"mapLoading\" class=\"map-loading-overlay\">\n            <ProgressSpinner style=\"width: 50px; height: 50px\" strokeWidth=\"8\" />\n            <div class=\"mt-3\">正在加载地图数据...</div>\n          </div>\n          <div ref=\"mapChart\" class=\"map-chart\"></div>\n        </div>\n      </template>\n    </Card>\n    <Toast position=\"bottom-right\"/>\n  </div>\n</template>\n\n<script setup>\nimport { ref, onMounted, onUnmounted, nextTick, watch } from 'vue';\nimport { useToast } from 'primevue/usetoast';\nimport * as echarts from 'echarts';\nimport { CheckDB, LoadDB, CheckUpdate, UpdateDB, Search, SearchAll } from '../../wailsjs/go/ip/IP';\nimport { usePageDataStore } from \"@/store\";\nimport FloatLabel from 'primevue/floatlabel';\nimport Empty from '@/components/Empty.vue';\nimport { useTableHeight } from '@/composables/useTableHeight.js';\nimport { ClipboardSetText } from \"../../wailsjs/runtime/runtime.js\";\nimport { useLayout } from '@/composables/useLayout';\n\n// 状态变量\nconst toast = useToast();\nconst store = usePageDataStore();\nconst { isDarkMode, primary } = useLayout(); // 获取主题状态\nconst batchIPs = ref(store.ipLocationStore?.formData?.batchIPs || '');\nconst dbLoaded = ref(store.ipLocationStore?.dbLoaded || false);\nconst dbUpdateAvailable = ref(store.ipLocationStore?.dbUpdateAvailable || false);\nconst searchResults = ref(store.ipLocationStore?.searchResults || []);\nconst viewMode = ref(store.ipLocationStore?.viewMode || 'table'); // table, map\nconst mapChart = ref(null);\nconst chartInstance = ref(null);\nconst resultCardRef = ref(null);\n// 从store中获取卡片折叠状态\nconst isCardCollapsed = ref(store.ipLocationStore?.isCardCollapsed || false);\nconst mapLoading = ref(false); // 地图加载状态\nconst mapInitialized = ref(false); // 地图是否已初始化\n\n// 动态计算DataTable的scrollHeight\nconst tableScrollHeight = ref('60vh');\nconst tableFrozenWidth = ref('740px'); // 表格冻结宽度，确保所有列宽之和\n\n// 使用公共的表格高度计算函数\nconst { calculateTableHeight, handleResize } = useTableHeight(resultCardRef, tableScrollHeight);\n\n// 组件挂载后设置监听\nonMounted(() => {\n  window.addEventListener('resize', handleResize);\n  // 初始计算\n  nextTick(() => {\n    calculateTableHeight();\n  });\n  // 初始化数据库状态\n  checkDatabase();\n});\n\n// 组件卸载时移除监听\nonUnmounted(() => {\n  window.removeEventListener('resize', handleResize);\n});\n\n// 加载状态\nconst loading = ref({\n  checkDB: false,\n  loadDB: false,\n  updateDB: false,\n  search: false,\n  searchBatch: false\n});\n\n// 显示消息\nconst showMessage = (severity, summary, detail) => {\n  toast.add({ severity, summary, detail, life: 3000 });\n};\n\n// 切换卡片收起状态\nconst toggleCardCollapse = () => {\n  isCardCollapsed.value = !isCardCollapsed.value;\n  // 折叠状态变化后重新计算表格高度\n  nextTick(() => {\n    calculateTableHeight();\n  });\n};\n\n// 保存数据到store\nwatch([batchIPs, dbLoaded, dbUpdateAvailable, searchResults, viewMode, isCardCollapsed], () => {\n  store.saveIPLocationData({\n    formData: {\n      batchIPs: batchIPs.value\n    },\n    dbLoaded: dbLoaded.value,\n    dbUpdateAvailable: dbUpdateAvailable.value,\n    searchResults: searchResults.value,\n    viewMode: viewMode.value,\n    isCardCollapsed: isCardCollapsed.value\n  });\n});\n\n// 检查数据库状态\nconst checkDatabase = () => {\n  loading.value.checkDB = true;\n  CheckDB()\n    .then(() => {\n      dbLoaded.value = true;\n      showMessage('success', '成功', '数据库已加载');\n      \n      // 先加载数据库，然后检查是否有更新\n      return LoadDB();\n    })\n    .then(() => {\n      return CheckUpdate();\n    })\n    .then((hasUpdate) => {\n      if (hasUpdate) {\n        dbUpdateAvailable.value = true;\n        showMessage('info', '提示', '数据库有新版本可用，请点击更新按钮下载');\n      } else {\n        showMessage('info', '提示', '数据库已是最新版本');\n      }\n    })\n    .catch((error) => {\n      dbLoaded.value = false;\n      showMessage('error', '错误', `数据库检查失败: ${error}`);\n      // 检查数据库失败时，直接检查更新\n      return CheckUpdate();\n    })\n    .then((hasUpdate) => {\n      // 如果是catch分支过来的，这里会检查是否有更新\n      if (hasUpdate !== undefined) {\n        if (hasUpdate) {\n          dbUpdateAvailable.value = true;\n          showMessage('info', '提示', '数据库有新版本可用，请点击更新按钮下载');\n        } else {\n          showMessage('info', '提示', '数据库检查失败，但无可用更新');\n        }\n      }\n    })\n    .catch((error) => {\n      showMessage('error', '错误', `检查更新失败: ${error}`);\n    })\n    .finally(() => {\n      loading.value.checkDB = false;\n    });\n};\n\n// 加载数据库\nconst loadDatabase = () => {\n  loading.value.loadDB = true;\n  LoadDB()\n    .then(() => {\n      dbLoaded.value = true;\n      showMessage('success', '成功', '数据库加载成功');\n    })\n    .catch((error) => {\n      showMessage('error', '错误', `数据库加载失败: ${error}`);\n    })\n    .finally(() => {\n      loading.value.loadDB = false;\n    });\n};\n\n// 更新数据库\nconst updateDatabase = () => {\n  loading.value.updateDB = true;\n  // 直接执行更新，然后重新加载\n  UpdateDB()\n    .then(() => {\n      // 更新后需要重新加载\n      return LoadDB();\n    })\n    .then(() => {\n      dbUpdateAvailable.value = false;\n      dbLoaded.value = true;\n      showMessage('success', '成功', '数据库更新成功');\n    })\n    .catch((error) => {\n      showMessage('error', '错误', `数据库更新失败: ${error}`);\n    })\n    .finally(() => {\n      loading.value.updateDB = false;\n    });\n};\n\n// 搜索批量IP\nconst searchBatchIPs = () => {\n  if (!batchIPs.value.trim()) {\n    showMessage('warn', '警告', '请输入IP地址');\n    return;\n  }\n  \n  if (!dbLoaded.value) {\n    showMessage('warn', '警告', '请先加载数据库');\n    return;\n  }\n\n  const ipList = batchIPs.value\n    .split('\\n')\n    .map(ip => ip.trim())\n    .filter(ip => ip);\n    \n  if (ipList.length === 0) {\n    showMessage('warn', '警告', '请输入有效的IP地址');\n    return;\n  }\n\n  loading.value.searchBatch = true;\n  SearchAll(ipList)\n    .then((results) => {\n      // 转换结果为数组格式\n      const formattedResults = Object.entries(results).map(([ip, data]) => ({\n        ip,\n        ...data\n      }));\n      \n      searchResults.value = formattedResults;\n      showMessage('success', '成功', `成功查询 ${formattedResults.length} 个IP地址`);\n      \n      // 查询成功后自动收起输入卡片\n      if (!isCardCollapsed.value) {\n        isCardCollapsed.value = true;\n        // 折叠后重新计算表格高度\n        nextTick(() => {\n          calculateTableHeight();\n        });\n      }\n    })\n    .catch((error) => {\n      showMessage('error', '错误', `批量查询失败: ${error}`);\n    })\n    .finally(() => {\n      loading.value.searchBatch = false;\n    });\n};\n\n// 初始化地图\nconst initMap = () => {\n  if (!mapChart.value || mapInitialized.value) return;\n  \n  // 销毁已存在的图表实例\n  if (chartInstance.value) {\n    chartInstance.value.dispose();\n  }\n  \n  chartInstance.value = echarts.init(mapChart.value);\n  \n  // 显示加载动画\n  mapLoading.value = true;\n  \n  // 加载地图数据\n  fetch('https://geo.datav.aliyun.com/areas_v3/bound/100000_full_city.json')\n    .then((response) => response.json())\n    .then((mapData) => {\n      // 注册地图数据\n      echarts.registerMap('china', mapData);\n      \n      // 根据主题设置颜色\n      const isDark = isDarkMode.value;\n      const primaryColor = primary.value;\n      \n      // 定义主题颜色\n      const getThemeColors = () => {\n        if (isDark) {\n          // 深色主题颜色\n          return {\n            bgColors: ['#1e3a8a', '#1e40af', '#2563eb', '#3b82f6', '#60a5fa'],\n            textColor: '#e5e7eb',\n            titleColor: '#f3f4f6',\n            graphicColor: '#9ca3af'\n          };\n        } else {\n          // 浅色主题颜色\n          return {\n            bgColors: ['#e0f2fe', '#bae6fd', '#7dd3fc', '#38bdf8', '#0ea5e9'],\n            textColor: '#374151',\n            titleColor: '#111827',\n            graphicColor: '#6b7280'\n          };\n        }\n      };\n      \n      const themeColors = getThemeColors();\n      \n      // 设置初始地图选项\n      const option = {\n        backgroundColor: 'transparent',\n        title: {\n          text: 'IP归属地分布',\n          left: 'center',\n          textStyle: {\n            color: themeColors.titleColor\n          }\n        },\n        tooltip: {\n          trigger: 'item',\n          formatter: function(params) {\n            // 如果值为0或undefined，不显示\n            if (!params.value || params.value === 0) {\n              return `${params.name}: 暂无数据`;\n            }\n            return `${params.name}: ${params.value} 个IP`;\n          },\n          backgroundColor: isDark ? 'rgba(31, 41, 55, 0.9)' : 'rgba(255, 255, 255, 0.9)',\n          borderColor: isDark ? 'rgba(75, 85, 99, 0.5)' : 'rgba(229, 231, 235, 0.5)',\n          textStyle: {\n            color: themeColors.textColor\n          }\n        },\n        visualMap: {\n          min: 0,\n          max: 10,\n          left: 'left',\n          top: 'bottom',\n          text: ['高', '低'],\n          calculable: true,\n          textStyle: {\n            color: themeColors.textColor\n          },\n          inRange: {\n            color: themeColors.bgColors\n          },\n          handleStyle: {\n            color: isDark ? '#4b5563' : '#d1d5db'\n          }\n        },\n        graphic: {\n          type: 'text',\n          right: 10,\n          bottom: 10,\n          style: {\n            text: '地图数据来源：阿里DataV平台',\n            fontSize: 12,\n            fill: themeColors.graphicColor\n          }\n        },\n        series: [\n          {\n            name: 'IP数量',\n            type: 'map',\n            map: 'china',\n            roam: true,\n            emphasis: {\n              label: {\n                show: true,\n                color: themeColors.textColor\n              },\n              itemStyle: {\n                areaColor: isDark ? '#374151' : '#f3f4f6'\n              }\n            },\n            select: {\n              label: {\n                color: themeColors.textColor\n              },\n              itemStyle: {\n                areaColor: isDark ? '#4b5563' : '#e5e7eb'\n              }\n            },\n            itemStyle: {\n              areaColor: isDark ? '#1f2937' : '#f9fafb',\n              borderColor: isDark ? '#374151' : '#d1d5db'\n            },\n            data: [],\n            // 存储地图区域数据，用于后续匹配\n            mapData: mapData.features.map(feature => ({\n              name: feature.properties.name,\n              adcode: feature.properties.adcode,\n              level: feature.properties.level\n            }))\n          }\n        ]\n      };\n      \n      chartInstance.value.setOption(option);\n      mapInitialized.value = true;\n      \n      // 如果已有搜索结果，更新地图数据\n      if (searchResults.value.length > 0) {\n        updateMapData();\n      }\n    })\n    .catch((error) => {\n      console.error('地图数据加载失败:', error);\n      showMessage('error', '错误', '地图数据加载失败');\n    })\n    .finally(() => {\n      mapLoading.value = false;\n    });\n};\n\n// 更新地图数据\nconst updateMapData = () => {\n  if (!chartInstance.value || !searchResults.value.length) return;\n  \n  // 统计各城市/区县的IP数量\n  const cityStats = {};\n  // 中国的直辖市列表\n  const municipalities = ['北京市', '天津市', '上海市', '重庆市'];\n  // 直辖市简称列表\n  const municipalityShortNames = ['北京', '天津', '上海', '重庆'];\n  \n  searchResults.value.forEach(item => {\n    if (item.city_name) {\n      // 处理直辖市情况\n      let targetCity = null;\n      \n      // 检查是否是直辖市（全称或简称）\n      const isMunicipality = municipalities.includes(item.region_name) || \n                             municipalityShortNames.includes(item.region_name);\n      \n      if (isMunicipality) {\n        // 如果是直辖市，优先使用city_name（区县）\n        // 因为地图数据中直辖市区域只显示区县\n        targetCity = item.district_name;\n      } else if (item.city_name && item.city_name !== item.region_name) {\n        // 如果city_name和region_name不同，可能是直辖市的区县\n        // 检查region_name是否是直辖市\n        const regionIsMunicipality = municipalities.includes(item.region_name) || \n                                    municipalityShortNames.includes(item.region_name);\n        \n        if (regionIsMunicipality) {\n          // 如果region_name是直辖市，则使用city_name（区县）\n          targetCity = item.district_name;\n        } else {\n          // 否则使用city_name\n          targetCity = item.city_name;\n        }\n      } else {\n        // 其他情况使用city_name\n        targetCity = item.city_name;\n      }\n      \n      // 统计到目标城市/区县\n      if (targetCity) {\n        cityStats[targetCity] = (cityStats[targetCity] || 0) + 1;\n      }\n    }\n  });\n  \n  // 获取地图中的所有区域名称\n  const mapOption = chartInstance.value.getOption();\n  const mapRegions = mapOption.series[0].mapData || [];\n  const regionNames = mapRegions.map(region => region.name);\n  \n  // 创建城市名称映射表，处理可能的名称差异\n  const cityMapping = {};\n  // 直辖市名称映射表 - 这里不需要将区县映射到直辖市\n  // 因为地图数据中直辖市区域只显示区县\n  \n  // 尝试匹配城市名称\n  Object.keys(cityStats).forEach(cityName => {\n    // 直接匹配\n    if (regionNames.includes(cityName)) {\n      cityMapping[cityName] = cityName;\n    } else {\n      // 尝试模糊匹配\n      const matchedRegion = regionNames.find(region => \n        region.includes(cityName) || cityName.includes(region)\n      );\n      if (matchedRegion) {\n        cityMapping[cityName] = matchedRegion;\n      } else {\n        // 如果没有匹配，使用原始名称\n        cityMapping[cityName] = cityName;\n      }\n    }\n  });\n  \n  // 转换为ECharts数据格式，使用映射后的名称\n  const mapData = Object.entries(cityStats).map(([name, value]) => ({\n    name: cityMapping[name] || name,\n    value: value || 0  // 确保值不为undefined或NaN\n  }));\n  \n  // 过滤掉值为0的数据项，避免在地图上显示\"暂无数据\"\n  const filteredMapData = mapData.filter(item => item.value > 0);\n  \n  console.log('城市统计数据:', cityStats);\n  console.log('地图区域名称:', regionNames);\n  console.log('城市名称映射:', cityMapping);\n  console.log('地图数据:', filteredMapData);\n  \n  // 更新地图\n  chartInstance.value.setOption({\n    series: [\n      {\n        data: filteredMapData\n      }\n    ],\n    visualMap: {\n      max: Math.max(...filteredMapData.map(item => item.value), 10)\n    }\n  });\n  \n  // 保存地图区域数据到全局变量，以便后续使用\n  if (!window.mapRegions) {\n    window.mapRegions = mapRegions;\n  }\n};\n\n// 监听搜索结果变化，更新地图\nwatch(searchResults, () => {\n  if (viewMode.value === 'map') {\n    nextTick(() => {\n      updateMapData();\n    });\n  }\n});\n\n// 监听主题变化，重新初始化地图\nwatch([isDarkMode, primary], () => {\n  if (viewMode.value === 'map' && mapInitialized.value) {\n    // 保存当前地图数据\n    const currentOption = chartInstance.value.getOption();\n    const currentData = currentOption.series[0].data;\n    \n    // 重新初始化地图\n    mapInitialized.value = false;\n    initMap();\n    \n    // 等待地图初始化完成后恢复数据\n    nextTick(() => {\n      setTimeout(() => {\n        if (chartInstance.value && currentData.length > 0) {\n          chartInstance.value.setOption({\n            series: [{\n              data: currentData\n            }]\n          });\n        }\n      }, 500);\n    });\n  }\n});\n\n// 监听窗口大小变化，在地图视图下重新计算高度\nwatch(() => tableScrollHeight.value, () => {\n  if (viewMode.value === 'map' && chartInstance.value) {\n    // 延迟执行，确保DOM已更新\n    setTimeout(() => {\n      chartInstance.value.resize();\n    }, 100);\n  }\n});\n\n// 处理单元格点击事件\nconst handleCellClick = (value) => {\n  // 复制单元格内容\n  ClipboardSetText(value).then((ok) => {\n    if (ok) {\n      toast.add({ severity: 'success', summary: '成功', detail: '已复制到剪贴板', life: 2000 });\n    }\n  });\n};\n\n// 监听视图模式变化\nwatch(viewMode, (newMode, oldMode) => {\n  // 如果从表格视图切换到地图视图，初始化地图\n  if (newMode === 'map' && oldMode === 'table') {\n    nextTick(() => {\n      if (!mapInitialized.value) {\n        initMap();\n      } else if (chartInstance.value) {\n        updateMapData();\n      }\n      // 切换到地图视图后重新计算地图高度\n      calculateTableHeight();\n    });\n  }\n  // 如果从地图视图切换到表格视图，销毁地图实例以释放资源\n  else if (oldMode === 'map' && newMode === 'table') {\n    nextTick(() => {\n      if (chartInstance.value) {\n        chartInstance.value.dispose();\n        chartInstance.value = null;\n        mapInitialized.value = false;\n      }\n      // 切换到表格视图后重新计算表格高度\n      calculateTableHeight();\n    });\n  }\n});\n</script>\n\n<style scoped>\n/* 地图容器样式 */\n.map-container {\n  width: 100%;\n  height: v-bind(tableScrollHeight);\n  position: relative;\n}\n\n.map-chart {\n  width: 100%;\n  height: 100%;\n}\n\n.map-loading-overlay {\n  position: absolute;\n  top: 0;\n  left: 0;\n  width: 100%;\n  height: 100%;\n  display: flex;\n  flex-direction: column;\n  justify-content: center;\n  align-items: center;\n  background-color: rgba(255, 255, 255, 0.8);\n  z-index: 10;\n}\n\n.p-dark .map-loading-overlay {\n  background-color: rgba(0, 0, 0, 0.7);\n}\n\n/* 卡片过渡效果 */\n.form-card {\n  transition: all 0.3s ease;\n  overflow: hidden;\n  margin-bottom: 0;\n}\n\n.card-content {\n  transition: all 0.3s ease;\n}\n\n/* 响应式设计 */\n@media (max-width: 768px) {\n  .button-row {\n    flex-direction: column;\n  }\n  \n  .button-item {\n    width: 100%;\n  }\n}\n</style>"
  },
  {
    "path": "frontend/src/views/KeyCalculation.vue",
    "content": "<template>\n    <div class=\"page-container\">\n        <Card class=\"form-card\">\n            <template #content>\n                <form class=\"form-layout\">\n                    <div class=\"field full-width\">\n                        <FloatLabel class=\"field full-width\" variant=\"over\">\n                            <label for=\"task\">选择任务</label>\n                            <Select\n                                id=\"task\"\n                                v-model=\"form.selected\"\n                                :options=\"options\"\n                                optionLabel=\"label\"\n                                optionValue=\"value\"\n                                placeholder=\"请选择任务\"\n                                v-tooltip.top=\"'选择要计算的密钥类型'\"\n                            />\n                        </FloatLabel>\n                    </div>\n\n                    <!-- 动态生成的输入字段 -->\n                    <div\n                        v-for=\"(row, rowIndex) in inputFields\"\n                        :key=\"rowIndex\"\n                        class=\"input-row\"\n                    >\n                        <div\n                            v-for=\"field in row\"\n                            :key=\"field.name\"\n                            class=\"field\"\n                            :class=\"\n                                row.length === 1 ? 'full-width' : 'half-width'\n                            \"\n                        >\n                            <!-- 根据字段类型渲染不同的组件 -->\n                            <div\n                                v-if=\"field.type === 'checkbox'\"\n                                class=\"flex align-items-center mt-3\"\n                            >\n                                <Checkbox\n                                    :id=\"field.name\"\n                                    v-model=\"form[field.name]\"\n                                    :binary=\"true\"\n                                />\n                                <label :for=\"field.name\" class=\"ml-2\">{{\n                                    field.label\n                                }}</label>\n                            </div>\n\n                            <FloatLabel v-else variant=\"on\">\n                                <InputText\n                                    v-if=\"field.type === 'input'\"\n                                    :id=\"field.name\"\n                                    v-model=\"form[field.name]\"\n                                    aria-autocomplete=\"none\"\n                                    :placeholder=\"calPlace[field.name]\"\n                                    v-tooltip.top=\"calPlace[field.name]\"\n                                />\n\n                                <!-- 下拉选择框 -->\n                                <Dropdown\n                                    v-else-if=\"field.type === 'dropdown'\"\n                                    :id=\"field.name\"\n                                    v-model=\"form[field.name]\"\n                                    :options=\"field.options\"\n                                    optionLabel=\"label\"\n                                    optionValue=\"value\"\n                                    class=\"w-full\"\n                                />\n\n                                <!-- 数字输入框 -->\n                                <InputNumber\n                                    v-else-if=\"field.type === 'number'\"\n                                    :id=\"field.name\"\n                                    v-model=\"form[field.name]\"\n                                    class=\"w-full\"\n                                />\n\n                                <!-- 日期选择器 -->\n                                <Calendar\n                                    v-else-if=\"field.type === 'calendar'\"\n                                    :id=\"field.name\"\n                                    v-model=\"form[field.name]\"\n                                    class=\"w-full\"\n                                />\n\n                                <label :for=\"field.name\">{{\n                                    field.label\n                                }}</label>\n                            </FloatLabel>\n                        </div>\n                    </div>\n                </form>\n\n                <div class=\"button-row\">\n                    <Button class=\"button equal-width\" @click=\"handleCalculate\">\n                        <i class=\"pi pi-calculator\"></i>\n                        计算\n                    </Button>\n                    <Button\n                        class=\"button equal-width\"\n                        severity=\"secondary\"\n                        @click=\"handleClear\"\n                    >\n                        <i class=\"pi pi-trash\"></i>\n                        清空输出\n                    </Button>\n                </div>\n            </template>\n        </Card>\n        <Card class=\"result-card\">\n            <template #content>\n                <div v-if=\"resultText === ''\" class=\"empty\">\n                    <Empty />\n                </div>\n                <div class=\"result-output\" v-html=\"resultText\" />\n            </template>\n        </Card>\n    </div>\n</template>\n\n<script setup>\nimport { ref, computed, watch } from \"vue\";\nimport {\n    CalMostone,\n    CalTiktok,\n    CalWechat,\n    CalWechatIndex,\n    CalWildFire,\n    CalBatChat,\n} from \"../../wailsjs/go/passwdCalc/PasswdCalc.js\";\nimport {\n    generateNormalTextOutput,\n    generateSuccessTextOutput,\n} from \"@/utils.js\";\nimport { usePageDataStore } from \"@/store\";\nimport FloatLabel from \"primevue/floatlabel\";\nimport Select from \"primevue/select\";\nimport InputText from \"primevue/inputtext\";\nimport InputNumber from \"primevue/inputnumber\";\nimport Checkbox from \"primevue/checkbox\";\nimport Calendar from \"primevue/calendar\";\nimport Button from \"primevue/button\";\nimport Dropdown from \"primevue/dropdown\";\nimport Empty from \"@/components/Empty.vue\";\n\n// 任务配置对象，定义每个任务需要的输入字段\nconst taskConfigs = {\n    1: {\n        // 微信的EnMicroMsg.db\n        fields: [\n            { name: \"uin\", label: \"微信uin\", type: \"input\" },\n            { name: \"imei\", label: \"imei\", type: \"input\" },\n        ],\n    },\n    2: {\n        // 微信的FTS5IndexMicroMsg_encrypt.db\n        fields: [\n            { name: \"uin\", label: \"微信uin\", type: \"input\" },\n            { name: \"wxid\", label: \"wxid\", type: \"input\" },\n            { name: \"imei\", label: \"imei\", type: \"input\" },\n        ],\n    },\n    3: {\n        // 野火IM系应用的data\n        fields: [{ name: \"token\", label: \"token\", type: \"input\" }],\n    },\n    4: {\n        // 默往APP的msg.db\n        fields: [{ name: \"uid\", label: \"uid\", type: \"input\" }],\n    },\n    5: {\n        // 抖音的聊天数据库\n        fields: [{ name: \"uid\", label: \"uid\", type: \"input\" }],\n    },\n    6: {\n        fields: [{ name: \"uid\", label: \"uid\", type: \"input\" }],\n    },\n};\nconst calPlace = {\n    uin: \"微信用户的uin，可能是负值，在shared_prefs/auth_info_key_prefs.xml文件中_auth_uin的值\",\n    imei: \"微信获取到的IMEI或MEID，在shared_prefs/DENGTA_META.xml文件中IMEI_DENGTA的值，在高版本中通常是1234567890ABCDEF，可以为空\",\n    wxid: \"数据库所属的wxid，一般情况下在解密EnMicroMsg.db的时候会一并提取，若无需要，请从shared_prefs/com.tencent.mm_preferences.xml中提取login_weixin_username的值\",\n    token: \"野火IM系应用的用户token，shared_prefs/config.xml的token的值\",\n    uid: \"默往（通常在shared_prefs/im.xml中的userId的值）、抖音（数据库文件名中的id）计算密钥需要的内容、QQ（msf_mmkv_file中QQ号对应的uid）、蝙蝠（数据库名中的数字）\",\n};\nconst store = usePageDataStore();\nconst form = ref(\n    store.keyCalculationStore?.formData || {\n        selected: \"\",\n        uin: \"\",\n        imei: \"\",\n        wxid: \"\",\n        token: \"\",\n        uid: \"\",\n    },\n);\nconst resultText = ref(store.keyCalculationStore?.resultData || \"\");\nconst options = ref([\n    { label: \"微信的EnMicroMsg.db\", value: \"1\" },\n    { label: \"微信的FTS5IndexMicroMsg_encrypt.db\", value: \"2\" },\n    { label: \"野火IM系应用的data\", value: \"3\" },\n    { label: \"默往APP的msg.db\", value: \"4\" },\n    { label: \"抖音的聊天数据库\", value: \"5\" },\n    { label: \"蝙蝠的聊天数据库\", value: \"6\" },\n]);\n\n// 根据选择的任务获取当前任务的配置\nconst currentTaskConfig = computed(() => {\n    return taskConfigs[form.value.selected] || { fields: [] };\n});\n\n// 动态生成输入字段数组，每行最多两个字段\nconst inputFields = computed(() => {\n    const fields = currentTaskConfig.value.fields || [];\n    const result = [];\n\n    for (let i = 0; i < fields.length; i += 2) {\n        result.push(fields.slice(i, i + 2));\n    }\n\n    return result;\n});\n\nwatch([form, resultText], () => {\n    store.saveKeyCalculationData({\n        formData: form.value,\n        resultData: resultText.value,\n    });\n});\n\nconst handleCalculate = () => {\n    // 从form中获取当前任务需要的字段值\n    const currentFields = currentTaskConfig.value.fields;\n    const params = {};\n\n    // 只获取当前任务需要的字段值\n    currentFields.forEach((field) => {\n        params[field.name] = form.value[field.name];\n    });\n\n    switch (form.value.selected) {\n        case \"1\": {\n            CalWechat(params.uin, params.imei).then((result) => {\n                resultText.value += generateSuccessTextOutput(\n                    \"成功获取到安卓微信EnMicroMsg.db数据库密钥\",\n                    result,\n                );\n            });\n            break;\n        }\n        case \"2\": {\n            CalWechatIndex(params.uin, params.wxid, params.imei).then(\n                (result) => {\n                    if (result !== \"\") {\n                        resultText.value += generateSuccessTextOutput(\n                            \"成功获取到安卓微信FTS5IndexMicroMsg_encrypt.db数据库密钥\",\n                            result,\n                        );\n                    } else {\n                        resultText.value += generateNormalTextOutput(\n                            \"计算失败，请确认参数\",\n                            \"red\",\n                        );\n                    }\n                },\n            );\n            break;\n        }\n        case \"3\": {\n            CalWildFire(params.token).then((result) => {\n                resultText.value += generateSuccessTextOutput(\n                    \"成功获取到野火IM数据库密钥\",\n                    result[0],\n                );\n                resultText.value += generateNormalTextOutput(\n                    result[1],\n                    \"green\",\n                );\n            });\n            break;\n        }\n        case \"4\": {\n            CalMostone(params.uid).then((result) => {\n                resultText.value += generateSuccessTextOutput(\n                    \"成功获取到默往msg.db数据库密钥\",\n                    result[0],\n                );\n                resultText.value += generateNormalTextOutput(\n                    result[1],\n                    \"green\",\n                );\n            });\n            break;\n        }\n        case \"5\": {\n            CalTiktok(params.uid).then((result) => {\n                resultText.value += generateSuccessTextOutput(\n                    \"成功获取到抖音聊天数据库密钥\",\n                    result[0],\n                );\n                resultText.value += generateNormalTextOutput(\n                    result[1],\n                    \"green\",\n                );\n            });\n            break;\n        }\n        case \"6\": {\n            CalBatChat(params.uid).then((result) => {\n                resultText.value += generateSuccessTextOutput(\n                    \"成功获取到蝙蝠聊天数据库密钥\",\n                    result[0],\n                );\n                resultText.value += generateNormalTextOutput(\n                    result[1],\n                    \"green\",\n                );\n            });\n            break;\n        }\n    }\n};\n\nconst handleClear = () => {\n    resultText.value = \"\";\n};\n\nwatch(resultText, () => {\n    const card = document.querySelector(\".result-card\");\n    if (card) {\n        void card.offsetHeight;\n        card.scrollTop = card.scrollHeight;\n    }\n});\n</script>\n<style scoped></style>\n"
  },
  {
    "path": "frontend/src/views/RegistryAnalysis.vue",
    "content": "<template>\n  <div class=\"page-container\">\n    <Card class=\"form-card\">\n      <template #content>\n      <form class=\"form-layout\">\n        <div v-for=\"(fieldGroup, index) in inputFields\" :key=\"index\" class=\"input-row\">\n          <div v-for=\"field in fieldGroup\" :key=\"field.name\" class=\"field half-width\">\n            <FloatLabel variant=\"on\">\n              <InputText \n                v-if=\"field.type === 'input'\"\n                :id=\"field.name\"\n                v-model=\"form[field.name]\" \n                aria-autocomplete=\"none\"\n                placeholder=\"请拖入目录，目录包含SYSTEM、SAM、SOFRWARE和用户注册表文件\" \n                @drop.prevent\n                @dragover.prevent\n                v-tooltip.top=\"'请拖入目录，目录包含SYSTEM、SAM、SOFRWARE和用户注册表文件'\"\n              />\n              <label :for=\"field.name\">{{ field.label }}</label>\n            </FloatLabel>\n          </div>\n        </div>\n      </form>\n      <div class=\"button-row\">\n        <Button class=\"button equal-width\" @click=\"handleExtract\">\n          <i class=\"pi pi-search\"></i>\n          解析\n        </Button>\n        <Button class=\"button equal-width\" severity=\"secondary\" @click=\"handleClear\">\n          <i class=\"pi pi-trash\"></i>\n          清空输出\n        </Button>\n      </div>\n      </template>\n    </Card>\n    <Card class=\"result-card\" ref=\"resultCardRef\">\n      <template #content>\n      <div v-if=\"Object.keys(tableData).length === 0\" class=\"empty\">\n        <Empty />\n      </div>\n      <Tabs v-if=\"Object.keys(tableData).length !== 0\" :value=\"getActiveTabIndex\" @tab-change=\"handleTabChange\">\n        <TabList>\n          <Tab v-for=\"(tab,index) in tabs\" :key=\"tab.label\" :value=\"index\">{{ tab.label }}</Tab>\n        </TabList>\n        <TabPanels>\n        <TabPanel v-for=\"(tab,index) in tabs\" :key=\"tab.value\" :value=\"index\">\n          <DataTable\n            :value=\"tableData[tab.value]\"\n            :columns=\"columns[tab.value]\"\n            dataKey=\"id\"\n            stripedRows\n            removableSort\n            :resizableColumns=\"true\"\n            columnResizeMode=\"fit\"\n            scrollable\n            :scrollHeight=\"tableScrollHeight\"\n            @column-reorder=\"onColumnReorder\"\n            :reorderableColumns=\"true\"\n          >\n            <Column v-for=\"col in columns[tab.value]\" :key=\"col.colKey\" :field=\"col.colKey\" :header=\"col.title\" :sortable=\"true\">\n              <template #body=\"{ data, field }\">\n                <span @click=\"handleCellClick(data[field])\">{{ data[field] }}</span>\n              </template>\n            </Column>\n            <template #empty>\n              <Empty />\n            </template>\n          </DataTable>\n        </TabPanel>\n        </TabPanels>\n      </Tabs>\n      </template>\n    </Card>\n    <Toast position=\"bottom-right\"/>\n  </div>\n</template>\n\n<script setup>\nimport { ref, computed, onMounted, onUnmounted, nextTick } from 'vue'\nimport { useToast } from 'primevue/usetoast'\nimport { usePageDataStore } from \"@/store\"\nimport { watch } from \"vue\"\nimport { ClipboardSetText, OnFileDrop, OnFileDropOff } from \"../../wailsjs/runtime/runtime.js\"\nimport {\n  ExtractDbeaver, \n  ExtractFinalShell, ExtractHawk2, ExtractMetaMask,\n  ExtractMobaXterm,\n  ExtractNavicat, ExtractXShell\n} from \"../../wailsjs/go/extractor/InfoExtractor.js\"\nimport { AnalyzeWinReg } from \"../../wailsjs/go/winreg/Reg.js\"\nimport FloatLabel from 'primevue/floatlabel'\nimport Tabs from 'primevue/tabs'\nimport Empty from '@/components/Empty.vue'\nimport { useTableHeight } from '@/composables/useTableHeight.js'\n\n// 任务配置对象，定义每个任务需要的输入字段\nconst taskConfigs = {\n  \"1\": {\n    fields: [\n      { name: \"file\", label: \"文件夹\", type: \"input\" }\n    ]\n  }\n}\n\nconst toast = useToast()\nconst store = usePageDataStore()\nconst form = ref(store.registryStore?.formData || {\n  file: '',\n})\n// 计算当前任务配置\nconst currentTaskConfig = computed(() => {\n  return taskConfigs[\"1\"] || { fields: [] }\n})\n\n// 计算输入字段，每两个一组\nconst inputFields = computed(() => {\n  const fields = currentTaskConfig.value.fields\n  const groups = []\n  for (let i = 0; i < fields.length; i += 2) {\n    groups.push(fields.slice(i, i + 2))\n  }\n  return groups\n})\n\nconst tableData = ref(store.registryStore?.tableData || {})\nconst tabs = ref(store.registryStore?.tabsData || [])\nconst activeTab = ref(store.registryStore?.tabData || '')\nconst columns = ref(store.registryStore?.columnsData || {})\n\n// 动态计算DataTable的scrollHeight\nconst tableScrollHeight = ref('54vh')\nconst resultCardRef = ref(null)\n\n// 使用公共的表格高度计算函数\nconst { calculateTableHeight, handleResize } = useTableHeight(resultCardRef, tableScrollHeight)\n\n// 计算属性，用于获取当前活动标签的索引\nconst getActiveTabIndex = computed(() => {\n  const index = tabs.value.findIndex(tab => tab.value === activeTab.value)\n  return index >= 0 ? index : 0\n})\n\n// 组件挂载后设置监听\nonMounted(() => {\n  window.addEventListener('resize', handleResize)\n  // 初始计算\n  nextTick(() => {\n    calculateTableHeight()\n  })\n  \n})\n\n// 组件卸载时移除监听\nonUnmounted(() => {\n  window.removeEventListener('resize', handleResize)\n  // 清理文件拖放监听器\n  OnFileDropOff()\n})\n\nwatch([form, tableData, tabs, activeTab], () => {\n  store.saveRegistryData({\n    formData: form.value,\n    tableData: tableData.value,\n    tabsData: tabs.value,\n    tabData: activeTab.value,\n    columnsData: columns.value\n  })\n})\n\nconst loading = ref(false)\n\nconst handleExtract = () => {\n  loading.value = true\n  \n  const currentConfig = taskConfigs[\"1\"]\n  if (!currentConfig) {\n    toast.add({ severity: 'error', summary: '错误', detail: '配置错误', life: 3000 })\n    loading.value = false\n    return\n  }\n\n  // 动态构建参数对象\n  const params = {}\n  currentConfig.fields.forEach(field => {\n    params[field.name] = form.value[field.name]\n  })\n\n  // 从动态参数中获取file\n  const { file } = params\n\n  if (file === \"\" || file === undefined || file === null) {\n    toast.add({ severity: 'error', summary: '错误', detail: '参数错误！', life: 3000 })\n    loading.value = false\n    return\n  }\n  \n  AnalyzeWinReg(file).then((result) => {\n    try {\n      if (result.err !== \"\") {\n        toast.add({ severity: 'error', summary: '错误', detail: result.err, life: 3000 })\n      } else {\n        handleResult(result)\n      }\n    } finally {\n      loading.value = false\n    }\n  })\n}\n\nconst handleResult = (result) => {\n  columns.value = {}\n  tabs.value = []\n  tableData.value = {}\n  let idx = 0\n  for (let tab in result.data) {\n    if (idx === 0) {\n      activeTab.value = tab\n      idx++\n    }\n    tabs.value.push({\n      value: tab, label: tab\n    })\n    if (result.data[tab] == null) {\n        toast.add({ severity: 'warn', summary: '提示', detail: tab + '无数据', life: 3000 })\n      continue\n    }\n    let inf = result.data[tab][0]\n    tableData.value[tab] = {}\n    columns.value[tab] = []\n    tableData.value[tab] = result.data[tab]\n    for (let key in inf) {\n      columns.value[tab].push({\n        colKey: key, title: key, ellipsis: true, width: \"15vw\"\n      })\n    }\n  }\n  \n  // 数据加载完成后重新计算表格高度\n  nextTick(() => {\n    calculateTableHeight()\n  })\n}\n\nconst handleClear = () => {\n  tableData.value = {}\n  tabs.value = []\n  activeTab.value = \"\"\n  columns.value = {}\n}\n\nconst handleTabChange = (event) => {\n  activeTab.value = tabs.value[event.index].value\n}\n\n//TODO 实现复制，现在有问题\nconst handleCellClick = (value) => {\n  // 复制单元格内容\n  ClipboardSetText(value).then((ok) => {\n    if (ok) {\n      toast.add({ severity: 'success', summary: '成功', detail: '已复制到剪贴板', life: 2000 })\n    }\n  })\n}\n\nonMounted(() => {\n  OnFileDrop((x, y, paths) => {\n    if (paths.length > 0) {\n      form.value.file = paths[0]\n      toast.add({ severity: 'success', summary: '成功', detail: '文件已添加', life: 3000 })\n    }\n  }, false)\n})\n\nconst onColumnReorder = (event) => {\n  columns.value[activeTab.value] = event.columns\n}\n</script>\n\n<style scoped>\n</style>"
  },
  {
    "path": "frontend/src/views/TimestampParser.vue",
    "content": "<template>\n  <div class=\"page-container\">\n    <Card class=\"form-card\">\n      <template #content>\n      <form class=\"form-layout\">\n        <div v-for=\"(fieldGroup, index) in inputFields\" :key=\"index\" class=\"input-row\">\n          <div v-for=\"field in fieldGroup\" :key=\"field.name\" class=\"field half-width\">\n            <FloatLabel v-if=\"field.type === 'select'\" class=\"field full-width\" variant=\"over\">\n              <label :for=\"field.name\">{{ field.label }}</label>\n              <Select \n                :id=\"field.name\"\n                v-model=\"form[field.name]\" \n                :options=\"options\" \n                optionLabel=\"label\" \n                optionValue=\"value\"\n                :placeholder=\"field.name === 'selectedOld' ? '请选择时区' : '请选择时区'\"\n                v-tooltip.top=\"field.name === 'selectedOld' ? '选择原始时间戳所在的时区' : '选择要转换到的目标时区'\"\n              />\n            </FloatLabel>\n            <FloatLabel v-else-if=\"field.type === 'input'\" variant=\"on\">\n              <InputText \n                :id=\"field.name\"\n                v-model=\"form[field.name]\" \n                aria-autocomplete=\"none\"\n                placeholder=\"请输入时间戳\"\n                v-tooltip.top=\"'输入要转换的时间戳，支持Unix时间戳'\"\n              />\n              <label :for=\"field.name\">{{ field.label }}</label>\n            </FloatLabel>\n          </div>\n        </div>\n      </form>\n        <div class=\"button-row\">\n          <Button class=\"button equal-width\" @click=\"handleTrans\">\n            <i class=\"pi pi-history\"></i>\n            转换\n          </Button>\n          <Button class=\"button equal-width\" severity=\"secondary\" @click=\"handleClear\">\n            <i class=\"pi pi-trash\"></i>\n            清空输出\n          </Button>\n        </div>\n      </template>\n    </Card>\n    <Card class=\"result-card\">\n      <template #content>\n      <div v-if=\"resultText === ''\" class=\"empty\">\n        <Empty />\n      </div>\n        <div class=\"result-output\" v-html=\"resultText\"/>\n      </template>\n    </Card>\n  </div>\n</template>\n\n<script setup>\nimport { ref, computed } from 'vue'\nimport { usePageDataStore } from \"@/store\"\nimport { watch } from \"vue\"\nimport { ParseTimeStamp } from \"../../wailsjs/go/timestamp/TimeStampParser.js\"\nimport FloatLabel from 'primevue/floatlabel'\nimport Select from 'primevue/select'\nimport Empty from '@/components/Empty.vue'\n\n// 任务配置对象，定义每个任务需要的输入字段\nconst taskConfigs = {\n  \"1\": {\n    fields: [\n      { name: \"selectedOld\", label: \"原始时区\", type: \"select\" },\n      { name: \"selectedNew\", label: \"目标时区\", type: \"select\" },\n      { name: \"ts\", label: \"时间戳\", type: \"input\" }\n    ]\n  }\n}\n\nconst store = usePageDataStore()\nconst form = ref(store.timestampStore?.formData || {\n  selectedOld: \"UTC\",\n  selectedNew: \"Asia/Shanghai\",\n  ts: \"\"\n})\n// 计算当前任务配置\nconst currentTaskConfig = computed(() => {\n  return taskConfigs[\"1\"] || { fields: [] }\n})\n\n// 计算输入字段，每两个一组\nconst inputFields = computed(() => {\n  const fields = currentTaskConfig.value.fields\n  const groups = []\n  for (let i = 0; i < fields.length; i += 2) {\n    groups.push(fields.slice(i, i + 2))\n  }\n  return groups\n})\n\nconst resultText = ref(store.timestampStore?.resultData || \"\")\nconst timezones = Intl.supportedValuesOf('timeZone')\ntimezones.push('UTC')\nconst options = ref(timezones.map((item, index) => ({\n  label: item,\n  value: item\n})))\n\nwatch([form, resultText], () => {\n  store.saveTimestampData({\n    formData: form.value,\n    resultData: resultText.value\n  })\n})\n\nconst handleTrans = () => {\n  const currentConfig = taskConfigs[\"1\"]\n  if (!currentConfig) {\n    return\n  }\n\n  // 动态构建参数对象\n  const params = {}\n  currentConfig.fields.forEach(field => {\n    params[field.name] = form.value[field.name]\n  })\n\n  // 从动态参数中获取selectedOld、selectedNew和ts\n  const { selectedOld, selectedNew, ts } = params\n\n  ParseTimeStamp(ts, selectedOld, selectedNew).then((result) => {\n    resultText.value += result.replaceAll(\"\\n\", \"<br>\")\n  })\n}\n\nconst handleClear = () => {\n  resultText.value = \"\"\n}\n\nwatch(resultText, () => {\n  const card = document.querySelector('.result-card');\n  if (card) {\n    void card.offsetHeight;\n    card.scrollTop = card.scrollHeight;\n  }\n});\n</script>\n\n<style scoped>\n</style>"
  },
  {
    "path": "frontend/tsconfig.json",
    "content": "{\n    \"compilerOptions\": {\n        \"target\": \"ES2020\",\n        \"useDefineForClassFields\": true,\n        \"module\": \"ESNext\",\n        \"lib\": [\"ES2020\", \"DOM\", \"DOM.Iterable\"],\n        \"skipLibCheck\": true,\n\n        /* Bundler mode */\n        \"moduleResolution\": \"bundler\",\n        \"allowImportingTsExtensions\": true,\n        \"resolveJsonModule\": true,\n        \"isolatedModules\": true,\n        \"noEmit\": true,\n        \"jsx\": \"preserve\",\n\n        /* Linting */\n        \"strict\": true,\n        \"noUnusedLocals\": true,\n        \"noUnusedParameters\": true,\n        \"noFallthroughCasesInSwitch\": true\n    },\n    \"include\": [\"src/**/*.ts\", \"src/**/*.tsx\", \"src/**/*.vue\"],\n    \"references\": [{ \"path\": \"./tsconfig.node.json\" }]\n}\n"
  },
  {
    "path": "frontend/tsconfig.node.json",
    "content": "{\n    \"compilerOptions\": {\n        \"composite\": true,\n        \"skipLibCheck\": true,\n        \"module\": \"ESNext\",\n        \"moduleResolution\": \"bundler\",\n        \"allowSyntheticDefaultImports\": true,\n        \"strict\": true\n    },\n    \"include\": [\"vite.config.ts\"]\n}\n"
  },
  {
    "path": "frontend/vite.config.ts",
    "content": "import { defineConfig } from \"vite\";\nimport vue from \"@vitejs/plugin-vue\";\nimport Components from \"unplugin-vue-components/vite\";\nimport { PrimeVueResolver } from \"@primevue/auto-import-resolver\";\nimport { fileURLToPath, URL } from 'node:url';\n\n// https://vitejs.dev/config/\nexport default defineConfig({\n    plugins: [\n        vue(),\n        Components({\n            resolvers: [PrimeVueResolver()],\n        }),\n    ],\n    resolve: {\n        alias: {\n            '@': fileURLToPath(new URL('./src', import.meta.url))\n        }\n    }\n});\n"
  },
  {
    "path": "frontend/wailsjs/go/cracker/ForensicsCracker.d.ts",
    "content": "// Cynhyrchwyd y ffeil hon yn awtomatig. PEIDIWCH Â MODIWL\n// This file is automatically generated. DO NOT EDIT\nimport {cracker} from '../models';\nimport {context} from '../models';\n\nexport function CancelCrack():Promise<void>;\n\nexport function CrackAirDrop(arg1:string,arg2:string,arg3:string,arg4:Array<string>,arg5:number):Promise<cracker.CrackResult>;\n\nexport function CrackWXUin(arg1:Array<string>):Promise<cracker.CrackResult>;\n\nexport function GetState():Promise<string>;\n\nexport function InitCtx(arg1:context.Context):Promise<void>;\n"
  },
  {
    "path": "frontend/wailsjs/go/cracker/ForensicsCracker.js",
    "content": "// @ts-check\n// Cynhyrchwyd y ffeil hon yn awtomatig. PEIDIWCH Â MODIWL\n// This file is automatically generated. DO NOT EDIT\n\nexport function CancelCrack() {\n  return window['go']['cracker']['ForensicsCracker']['CancelCrack']();\n}\n\nexport function CrackAirDrop(arg1, arg2, arg3, arg4, arg5) {\n  return window['go']['cracker']['ForensicsCracker']['CrackAirDrop'](arg1, arg2, arg3, arg4, arg5);\n}\n\nexport function CrackWXUin(arg1) {\n  return window['go']['cracker']['ForensicsCracker']['CrackWXUin'](arg1);\n}\n\nexport function GetState() {\n  return window['go']['cracker']['ForensicsCracker']['GetState']();\n}\n\nexport function InitCtx(arg1) {\n  return window['go']['cracker']['ForensicsCracker']['InitCtx'](arg1);\n}\n"
  },
  {
    "path": "frontend/wailsjs/go/database/DecryptDatabase.d.ts",
    "content": "// Cynhyrchwyd y ffeil hon yn awtomatig. PEIDIWCH Â MODIWL\n// This file is automatically generated. DO NOT EDIT\nimport {database} from '../models';\nimport {context} from '../models';\n\nexport function DecryptAMapDB(arg1:string):Promise<database.DecryptResult>;\n\nexport function DecryptDingTalkDB(arg1:string,arg2:string):Promise<database.DecryptResult>;\n\nexport function DecryptEnMicroMsg(arg1:string,arg2:string):Promise<database.DecryptResult>;\n\nexport function DecryptFTSIndexDB(arg1:string,arg2:string):Promise<database.DecryptResult>;\n\nexport function DecryptNtqqDB(arg1:string,arg2:string):Promise<database.DecryptResult>;\n\nexport function DecryptSQLCipher3DB(arg1:string,arg2:string):Promise<database.DecryptResult>;\n\nexport function DecryptSQLCipher4DB(arg1:string,arg2:string):Promise<database.DecryptResult>;\n\nexport function DecryptSystemDataSQLite(arg1:string,arg2:string):Promise<database.DecryptResult>;\n\nexport function DecryptWCDB(arg1:string,arg2:string):Promise<database.DecryptResult>;\n\nexport function InitCtx(arg1:context.Context):Promise<void>;\n"
  },
  {
    "path": "frontend/wailsjs/go/database/DecryptDatabase.js",
    "content": "// @ts-check\n// Cynhyrchwyd y ffeil hon yn awtomatig. PEIDIWCH Â MODIWL\n// This file is automatically generated. DO NOT EDIT\n\nexport function DecryptAMapDB(arg1) {\n  return window['go']['database']['DecryptDatabase']['DecryptAMapDB'](arg1);\n}\n\nexport function DecryptDingTalkDB(arg1, arg2) {\n  return window['go']['database']['DecryptDatabase']['DecryptDingTalkDB'](arg1, arg2);\n}\n\nexport function DecryptEnMicroMsg(arg1, arg2) {\n  return window['go']['database']['DecryptDatabase']['DecryptEnMicroMsg'](arg1, arg2);\n}\n\nexport function DecryptFTSIndexDB(arg1, arg2) {\n  return window['go']['database']['DecryptDatabase']['DecryptFTSIndexDB'](arg1, arg2);\n}\n\nexport function DecryptNtqqDB(arg1, arg2) {\n  return window['go']['database']['DecryptDatabase']['DecryptNtqqDB'](arg1, arg2);\n}\n\nexport function DecryptSQLCipher3DB(arg1, arg2) {\n  return window['go']['database']['DecryptDatabase']['DecryptSQLCipher3DB'](arg1, arg2);\n}\n\nexport function DecryptSQLCipher4DB(arg1, arg2) {\n  return window['go']['database']['DecryptDatabase']['DecryptSQLCipher4DB'](arg1, arg2);\n}\n\nexport function DecryptSystemDataSQLite(arg1, arg2) {\n  return window['go']['database']['DecryptDatabase']['DecryptSystemDataSQLite'](arg1, arg2);\n}\n\nexport function DecryptWCDB(arg1, arg2) {\n  return window['go']['database']['DecryptDatabase']['DecryptWCDB'](arg1, arg2);\n}\n\nexport function InitCtx(arg1) {\n  return window['go']['database']['DecryptDatabase']['InitCtx'](arg1);\n}\n"
  },
  {
    "path": "frontend/wailsjs/go/extractor/InfoExtractor.d.ts",
    "content": "// Cynhyrchwyd y ffeil hon yn awtomatig. PEIDIWCH Â MODIWL\n// This file is automatically generated. DO NOT EDIT\nimport {extractor} from '../models';\nimport {context} from '../models';\n\nexport function ExtractDbeaver(arg1:string):Promise<extractor.ExtractMapResult>;\n\nexport function ExtractFinalShell(arg1:string):Promise<extractor.ExtractMapResult>;\n\nexport function ExtractHawk2(arg1:string,arg2:string):Promise<extractor.ExtractMapResult>;\n\nexport function ExtractMetaMask(arg1:string):Promise<extractor.ExtractMapResult>;\n\nexport function ExtractMobaXterm(arg1:string,arg2:string):Promise<extractor.ExtractMapResult>;\n\nexport function ExtractNavicat(arg1:string):Promise<extractor.ExtractMapResult>;\n\nexport function ExtractXShell(arg1:string,arg2:string):Promise<extractor.ExtractMapResult>;\n\nexport function InitCtx(arg1:context.Context):Promise<void>;\n"
  },
  {
    "path": "frontend/wailsjs/go/extractor/InfoExtractor.js",
    "content": "// @ts-check\n// Cynhyrchwyd y ffeil hon yn awtomatig. PEIDIWCH Â MODIWL\n// This file is automatically generated. DO NOT EDIT\n\nexport function ExtractDbeaver(arg1) {\n  return window['go']['extractor']['InfoExtractor']['ExtractDbeaver'](arg1);\n}\n\nexport function ExtractFinalShell(arg1) {\n  return window['go']['extractor']['InfoExtractor']['ExtractFinalShell'](arg1);\n}\n\nexport function ExtractHawk2(arg1, arg2) {\n  return window['go']['extractor']['InfoExtractor']['ExtractHawk2'](arg1, arg2);\n}\n\nexport function ExtractMetaMask(arg1) {\n  return window['go']['extractor']['InfoExtractor']['ExtractMetaMask'](arg1);\n}\n\nexport function ExtractMobaXterm(arg1, arg2) {\n  return window['go']['extractor']['InfoExtractor']['ExtractMobaXterm'](arg1, arg2);\n}\n\nexport function ExtractNavicat(arg1) {\n  return window['go']['extractor']['InfoExtractor']['ExtractNavicat'](arg1);\n}\n\nexport function ExtractXShell(arg1, arg2) {\n  return window['go']['extractor']['InfoExtractor']['ExtractXShell'](arg1, arg2);\n}\n\nexport function InitCtx(arg1) {\n  return window['go']['extractor']['InfoExtractor']['InitCtx'](arg1);\n}\n"
  },
  {
    "path": "frontend/wailsjs/go/ip/IP.d.ts",
    "content": "// Cynhyrchwyd y ffeil hon yn awtomatig. PEIDIWCH Â MODIWL\n// This file is automatically generated. DO NOT EDIT\nimport {context} from '../models';\nimport {ip} from '../models';\n\nexport function CheckDB():Promise<void>;\n\nexport function CheckUpdate():Promise<boolean>;\n\nexport function InitCtx(arg1:context.Context):Promise<void>;\n\nexport function LoadDB():Promise<void>;\n\nexport function Search(arg1:string):Promise<ip.CZIP>;\n\nexport function SearchAll(arg1:Array<string>):Promise<Record<string, ip.CZIP>>;\n\nexport function UpdateDB():Promise<void>;\n"
  },
  {
    "path": "frontend/wailsjs/go/ip/IP.js",
    "content": "// @ts-check\n// Cynhyrchwyd y ffeil hon yn awtomatig. PEIDIWCH Â MODIWL\n// This file is automatically generated. DO NOT EDIT\n\nexport function CheckDB() {\n  return window['go']['ip']['IP']['CheckDB']();\n}\n\nexport function CheckUpdate() {\n  return window['go']['ip']['IP']['CheckUpdate']();\n}\n\nexport function InitCtx(arg1) {\n  return window['go']['ip']['IP']['InitCtx'](arg1);\n}\n\nexport function LoadDB() {\n  return window['go']['ip']['IP']['LoadDB']();\n}\n\nexport function Search(arg1) {\n  return window['go']['ip']['IP']['Search'](arg1);\n}\n\nexport function SearchAll(arg1) {\n  return window['go']['ip']['IP']['SearchAll'](arg1);\n}\n\nexport function UpdateDB() {\n  return window['go']['ip']['IP']['UpdateDB']();\n}\n"
  },
  {
    "path": "frontend/wailsjs/go/main/App.d.ts",
    "content": "// Cynhyrchwyd y ffeil hon yn awtomatig. PEIDIWCH Â MODIWL\n// This file is automatically generated. DO NOT EDIT\n\nexport function GetVersion():Promise<string>;\n\nexport function Greet(arg1:string):Promise<string>;\n"
  },
  {
    "path": "frontend/wailsjs/go/main/App.js",
    "content": "// @ts-check\n// Cynhyrchwyd y ffeil hon yn awtomatig. PEIDIWCH Â MODIWL\n// This file is automatically generated. DO NOT EDIT\n\nexport function GetVersion() {\n  return window['go']['main']['App']['GetVersion']();\n}\n\nexport function Greet(arg1) {\n  return window['go']['main']['App']['Greet'](arg1);\n}\n"
  },
  {
    "path": "frontend/wailsjs/go/models.ts",
    "content": "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    static createFrom(source: any = {}) {\n\t        return new CrackResult(source);\n\t    }\n\t\n\t    constructor(source: any = {}) {\n\t        if ('string' === typeof source) source = JSON.parse(source);\n\t        this.result = source[\"result\"];\n\t        this.time = source[\"time\"];\n\t        this.error = source[\"error\"];\n\t    }\n\t}\n\n}\n\nexport namespace database {\n\t\n\texport class DecryptResult {\n\t    save_path: string;\n\t    wxid: string;\n\t    err: string;\n\t\n\t    static createFrom(source: any = {}) {\n\t        return new DecryptResult(source);\n\t    }\n\t\n\t    constructor(source: any = {}) {\n\t        if ('string' === typeof source) source = JSON.parse(source);\n\t        this.save_path = source[\"save_path\"];\n\t        this.wxid = source[\"wxid\"];\n\t        this.err = source[\"err\"];\n\t    }\n\t}\n\n}\n\nexport namespace extractor {\n\t\n\texport class ExtractMapResult {\n\t    // Go type: orderedmap\n\t    data?: any;\n\t    err: string;\n\t\n\t    static createFrom(source: any = {}) {\n\t        return new ExtractMapResult(source);\n\t    }\n\t\n\t    constructor(source: any = {}) {\n\t        if ('string' === typeof source) source = JSON.parse(source);\n\t        this.data = this.convertValues(source[\"data\"], null);\n\t        this.err = source[\"err\"];\n\t    }\n\t\n\t\tconvertValues(a: any, classs: any, asMap: boolean = false): any {\n\t\t    if (!a) {\n\t\t        return a;\n\t\t    }\n\t\t    if (a.slice && a.map) {\n\t\t        return (a as any[]).map(elem => this.convertValues(elem, classs));\n\t\t    } else if (\"object\" === typeof a) {\n\t\t        if (asMap) {\n\t\t            for (const key of Object.keys(a)) {\n\t\t                a[key] = new classs(a[key]);\n\t\t            }\n\t\t            return a;\n\t\t        }\n\t\t        return new classs(a);\n\t\t    }\n\t\t    return a;\n\t\t}\n\t}\n\n}\n\nexport namespace ip {\n\t\n\texport class CZIP {\n\t    city_name: string;\n\t    continent_code: string;\n\t    country_code: string;\n\t    country_name: string;\n\t    district_name: string;\n\t    isp_domain: string;\n\t    owner_domain: string;\n\t    region_name: string;\n\t    error: string;\n\t\n\t    static createFrom(source: any = {}) {\n\t        return new CZIP(source);\n\t    }\n\t\n\t    constructor(source: any = {}) {\n\t        if ('string' === typeof source) source = JSON.parse(source);\n\t        this.city_name = source[\"city_name\"];\n\t        this.continent_code = source[\"continent_code\"];\n\t        this.country_code = source[\"country_code\"];\n\t        this.country_name = source[\"country_name\"];\n\t        this.district_name = source[\"district_name\"];\n\t        this.isp_domain = source[\"isp_domain\"];\n\t        this.owner_domain = source[\"owner_domain\"];\n\t        this.region_name = source[\"region_name\"];\n\t        this.error = source[\"error\"];\n\t    }\n\t}\n\n}\n\nexport namespace reader {\n\t\n\texport class ReadMapResult {\n\t    // Go type: orderedmap\n\t    data?: any;\n\t    err: string;\n\t\n\t    static createFrom(source: any = {}) {\n\t        return new ReadMapResult(source);\n\t    }\n\t\n\t    constructor(source: any = {}) {\n\t        if ('string' === typeof source) source = JSON.parse(source);\n\t        this.data = this.convertValues(source[\"data\"], null);\n\t        this.err = source[\"err\"];\n\t    }\n\t\n\t\tconvertValues(a: any, classs: any, asMap: boolean = false): any {\n\t\t    if (!a) {\n\t\t        return a;\n\t\t    }\n\t\t    if (a.slice && a.map) {\n\t\t        return (a as any[]).map(elem => this.convertValues(elem, classs));\n\t\t    } else if (\"object\" === typeof a) {\n\t\t        if (asMap) {\n\t\t            for (const key of Object.keys(a)) {\n\t\t                a[key] = new classs(a[key]);\n\t\t            }\n\t\t            return a;\n\t\t        }\n\t\t        return new classs(a);\n\t\t    }\n\t\t    return a;\n\t\t}\n\t}\n\n}\n\nexport namespace winreg {\n\t\n\texport class RegResult {\n\t    // Go type: orderedmap\n\t    data?: any;\n\t    err: string;\n\t\n\t    static createFrom(source: any = {}) {\n\t        return new RegResult(source);\n\t    }\n\t\n\t    constructor(source: any = {}) {\n\t        if ('string' === typeof source) source = JSON.parse(source);\n\t        this.data = this.convertValues(source[\"data\"], null);\n\t        this.err = source[\"err\"];\n\t    }\n\t\n\t\tconvertValues(a: any, classs: any, asMap: boolean = false): any {\n\t\t    if (!a) {\n\t\t        return a;\n\t\t    }\n\t\t    if (a.slice && a.map) {\n\t\t        return (a as any[]).map(elem => this.convertValues(elem, classs));\n\t\t    } else if (\"object\" === typeof a) {\n\t\t        if (asMap) {\n\t\t            for (const key of Object.keys(a)) {\n\t\t                a[key] = new classs(a[key]);\n\t\t            }\n\t\t            return a;\n\t\t        }\n\t\t        return new classs(a);\n\t\t    }\n\t\t    return a;\n\t\t}\n\t}\n\n}\n\n"
  },
  {
    "path": "frontend/wailsjs/go/passwdCalc/PasswdCalc.d.ts",
    "content": "// Cynhyrchwyd y ffeil hon yn awtomatig. PEIDIWCH Â MODIWL\n// This file is automatically generated. DO NOT EDIT\nimport {context} from '../models';\n\nexport function CalBatChat(arg1:string):Promise<Array<string>>;\n\nexport function CalMostone(arg1:string):Promise<Array<string>>;\n\nexport function CalTiktok(arg1:string):Promise<Array<string>>;\n\nexport function CalWechat(arg1:string,arg2:string):Promise<string>;\n\nexport function CalWechatIndex(arg1:string,arg2:string,arg3:string):Promise<string>;\n\nexport function CalWildFire(arg1:string):Promise<Array<string>>;\n\nexport function InitCtx(arg1:context.Context):Promise<void>;\n"
  },
  {
    "path": "frontend/wailsjs/go/passwdCalc/PasswdCalc.js",
    "content": "// @ts-check\n// Cynhyrchwyd y ffeil hon yn awtomatig. PEIDIWCH Â MODIWL\n// This file is automatically generated. DO NOT EDIT\n\nexport function CalBatChat(arg1) {\n  return window['go']['passwdCalc']['PasswdCalc']['CalBatChat'](arg1);\n}\n\nexport function CalMostone(arg1) {\n  return window['go']['passwdCalc']['PasswdCalc']['CalMostone'](arg1);\n}\n\nexport function CalTiktok(arg1) {\n  return window['go']['passwdCalc']['PasswdCalc']['CalTiktok'](arg1);\n}\n\nexport function CalWechat(arg1, arg2) {\n  return window['go']['passwdCalc']['PasswdCalc']['CalWechat'](arg1, arg2);\n}\n\nexport function CalWechatIndex(arg1, arg2, arg3) {\n  return window['go']['passwdCalc']['PasswdCalc']['CalWechatIndex'](arg1, arg2, arg3);\n}\n\nexport function CalWildFire(arg1) {\n  return window['go']['passwdCalc']['PasswdCalc']['CalWildFire'](arg1);\n}\n\nexport function InitCtx(arg1) {\n  return window['go']['passwdCalc']['PasswdCalc']['InitCtx'](arg1);\n}\n"
  },
  {
    "path": "frontend/wailsjs/go/reader/FileReader.d.ts",
    "content": "// Cynhyrchwyd y ffeil hon yn awtomatig. PEIDIWCH Â MODIWL\n// This file is automatically generated. DO NOT EDIT\nimport {context} from '../models';\nimport {reader} from '../models';\n\nexport function InitCtx(arg1:context.Context):Promise<void>;\n\nexport function ReadLevelDB(arg1:string):Promise<reader.ReadMapResult>;\n\nexport function ReadMMKV(arg1:string,arg2:string):Promise<reader.ReadMapResult>;\n"
  },
  {
    "path": "frontend/wailsjs/go/reader/FileReader.js",
    "content": "// @ts-check\n// Cynhyrchwyd y ffeil hon yn awtomatig. PEIDIWCH Â MODIWL\n// This file is automatically generated. DO NOT EDIT\n\nexport function InitCtx(arg1) {\n  return window['go']['reader']['FileReader']['InitCtx'](arg1);\n}\n\nexport function ReadLevelDB(arg1) {\n  return window['go']['reader']['FileReader']['ReadLevelDB'](arg1);\n}\n\nexport function ReadMMKV(arg1, arg2) {\n  return window['go']['reader']['FileReader']['ReadMMKV'](arg1, arg2);\n}\n"
  },
  {
    "path": "frontend/wailsjs/go/timestamp/TimeStampParser.d.ts",
    "content": "// Cynhyrchwyd y ffeil hon yn awtomatig. PEIDIWCH Â MODIWL\n// This file is automatically generated. DO NOT EDIT\nimport {context} from '../models';\n\nexport function InitCtx(arg1:context.Context):Promise<void>;\n\nexport function ParseTimeStamp(arg1:string,arg2:string,arg3:string):Promise<string>;\n"
  },
  {
    "path": "frontend/wailsjs/go/timestamp/TimeStampParser.js",
    "content": "// @ts-check\n// Cynhyrchwyd y ffeil hon yn awtomatig. PEIDIWCH Â MODIWL\n// This file is automatically generated. DO NOT EDIT\n\nexport function InitCtx(arg1) {\n  return window['go']['timestamp']['TimeStampParser']['InitCtx'](arg1);\n}\n\nexport function ParseTimeStamp(arg1, arg2, arg3) {\n  return window['go']['timestamp']['TimeStampParser']['ParseTimeStamp'](arg1, arg2, arg3);\n}\n"
  },
  {
    "path": "frontend/wailsjs/go/winreg/Reg.d.ts",
    "content": "// Cynhyrchwyd y ffeil hon yn awtomatig. PEIDIWCH Â MODIWL\n// This file is automatically generated. DO NOT EDIT\nimport {winreg} from '../models';\nimport {context} from '../models';\n\nexport function AnalyzeWinReg(arg1:string):Promise<winreg.RegResult>;\n\nexport function InitCtx(arg1:context.Context):Promise<void>;\n"
  },
  {
    "path": "frontend/wailsjs/go/winreg/Reg.js",
    "content": "// @ts-check\n// Cynhyrchwyd y ffeil hon yn awtomatig. PEIDIWCH Â MODIWL\n// This file is automatically generated. DO NOT EDIT\n\nexport function AnalyzeWinReg(arg1) {\n  return window['go']['winreg']['Reg']['AnalyzeWinReg'](arg1);\n}\n\nexport function InitCtx(arg1) {\n  return window['go']['winreg']['Reg']['InitCtx'](arg1);\n}\n"
  },
  {
    "path": "frontend/wailsjs/runtime/package.json",
    "content": "{\n  \"name\": \"@wailsapp/runtime\",\n  \"version\": \"2.0.0\",\n  \"description\": \"Wails Javascript runtime library\",\n  \"main\": \"runtime.js\",\n  \"types\": \"runtime.d.ts\",\n  \"scripts\": {\n  },\n  \"repository\": {\n    \"type\": \"git\",\n    \"url\": \"git+https://github.com/wailsapp/wails.git\"\n  },\n  \"keywords\": [\n    \"Wails\",\n    \"Javascript\",\n    \"Go\"\n  ],\n  \"author\": \"Lea Anthony <lea.anthony@gmail.com>\",\n  \"license\": \"MIT\",\n  \"bugs\": {\n    \"url\": \"https://github.com/wailsapp/wails/issues\"\n  },\n  \"homepage\": \"https://github.com/wailsapp/wails#readme\"\n}\n"
  },
  {
    "path": "frontend/wailsjs/runtime/runtime.d.ts",
    "content": "/*\n _       __      _ __\n| |     / /___ _(_) /____\n| | /| / / __ `/ / / ___/\n| |/ |/ / /_/ / / (__  )\n|__/|__/\\__,_/_/_/____/\nThe electron alternative for Go\n(c) Lea Anthony 2019-present\n*/\n\nexport interface Position {\n    x: number;\n    y: number;\n}\n\nexport interface Size {\n    w: number;\n    h: number;\n}\n\nexport interface Screen {\n    isCurrent: boolean;\n    isPrimary: boolean;\n    width : number\n    height : number\n}\n\n// Environment information such as platform, buildtype, ...\nexport interface EnvironmentInfo {\n    buildType: string;\n    platform: string;\n    arch: string;\n}\n\n// [EventsEmit](https://wails.io/docs/reference/runtime/events#eventsemit)\n// emits the given event. Optional data may be passed with the event.\n// This will trigger any event listeners.\nexport function EventsEmit(eventName: string, ...data: any): void;\n\n// [EventsOn](https://wails.io/docs/reference/runtime/events#eventson) sets up a listener for the given event name.\nexport function EventsOn(eventName: string, callback: (...data: any) => void): () => void;\n\n// [EventsOnMultiple](https://wails.io/docs/reference/runtime/events#eventsonmultiple)\n// sets up a listener for the given event name, but will only trigger a given number times.\nexport function EventsOnMultiple(eventName: string, callback: (...data: any) => void, maxCallbacks: number): () => void;\n\n// [EventsOnce](https://wails.io/docs/reference/runtime/events#eventsonce)\n// sets up a listener for the given event name, but will only trigger once.\nexport function EventsOnce(eventName: string, callback: (...data: any) => void): () => void;\n\n// [EventsOff](https://wails.io/docs/reference/runtime/events#eventsoff)\n// unregisters the listener for the given event name.\nexport function EventsOff(eventName: string, ...additionalEventNames: string[]): void;\n\n// [EventsOffAll](https://wails.io/docs/reference/runtime/events#eventsoffall)\n// unregisters all listeners.\nexport function EventsOffAll(): void;\n\n// [LogPrint](https://wails.io/docs/reference/runtime/log#logprint)\n// logs the given message as a raw message\nexport function LogPrint(message: string): void;\n\n// [LogTrace](https://wails.io/docs/reference/runtime/log#logtrace)\n// logs the given message at the `trace` log level.\nexport function LogTrace(message: string): void;\n\n// [LogDebug](https://wails.io/docs/reference/runtime/log#logdebug)\n// logs the given message at the `debug` log level.\nexport function LogDebug(message: string): void;\n\n// [LogError](https://wails.io/docs/reference/runtime/log#logerror)\n// logs the given message at the `error` log level.\nexport function LogError(message: string): void;\n\n// [LogFatal](https://wails.io/docs/reference/runtime/log#logfatal)\n// logs the given message at the `fatal` log level.\n// The application will quit after calling this method.\nexport function LogFatal(message: string): void;\n\n// [LogInfo](https://wails.io/docs/reference/runtime/log#loginfo)\n// logs the given message at the `info` log level.\nexport function LogInfo(message: string): void;\n\n// [LogWarning](https://wails.io/docs/reference/runtime/log#logwarning)\n// logs the given message at the `warning` log level.\nexport function LogWarning(message: string): void;\n\n// [WindowReload](https://wails.io/docs/reference/runtime/window#windowreload)\n// Forces a reload by the main application as well as connected browsers.\nexport function WindowReload(): void;\n\n// [WindowReloadApp](https://wails.io/docs/reference/runtime/window#windowreloadapp)\n// Reloads the application frontend.\nexport function WindowReloadApp(): void;\n\n// [WindowSetAlwaysOnTop](https://wails.io/docs/reference/runtime/window#windowsetalwaysontop)\n// Sets the window AlwaysOnTop or not on top.\nexport function WindowSetAlwaysOnTop(b: boolean): void;\n\n// [WindowSetSystemDefaultTheme](https://wails.io/docs/next/reference/runtime/window#windowsetsystemdefaulttheme)\n// *Windows only*\n// Sets window theme to system default (dark/light).\nexport function WindowSetSystemDefaultTheme(): void;\n\n// [WindowSetLightTheme](https://wails.io/docs/next/reference/runtime/window#windowsetlighttheme)\n// *Windows only*\n// Sets window to light theme.\nexport function WindowSetLightTheme(): void;\n\n// [WindowSetDarkTheme](https://wails.io/docs/next/reference/runtime/window#windowsetdarktheme)\n// *Windows only*\n// Sets window to dark theme.\nexport function WindowSetDarkTheme(): void;\n\n// [WindowCenter](https://wails.io/docs/reference/runtime/window#windowcenter)\n// Centers the window on the monitor the window is currently on.\nexport function WindowCenter(): void;\n\n// [WindowSetTitle](https://wails.io/docs/reference/runtime/window#windowsettitle)\n// Sets the text in the window title bar.\nexport function WindowSetTitle(title: string): void;\n\n// [WindowFullscreen](https://wails.io/docs/reference/runtime/window#windowfullscreen)\n// Makes the window full screen.\nexport function WindowFullscreen(): void;\n\n// [WindowUnfullscreen](https://wails.io/docs/reference/runtime/window#windowunfullscreen)\n// Restores the previous window dimensions and position prior to full screen.\nexport function WindowUnfullscreen(): void;\n\n// [WindowIsFullscreen](https://wails.io/docs/reference/runtime/window#windowisfullscreen)\n// Returns the state of the window, i.e. whether the window is in full screen mode or not.\nexport function WindowIsFullscreen(): Promise<boolean>;\n\n// [WindowSetSize](https://wails.io/docs/reference/runtime/window#windowsetsize)\n// Sets the width and height of the window.\nexport function WindowSetSize(width: number, height: number): void;\n\n// [WindowGetSize](https://wails.io/docs/reference/runtime/window#windowgetsize)\n// Gets the width and height of the window.\nexport function WindowGetSize(): Promise<Size>;\n\n// [WindowSetMaxSize](https://wails.io/docs/reference/runtime/window#windowsetmaxsize)\n// Sets the maximum window size. Will resize the window if the window is currently larger than the given dimensions.\n// Setting a size of 0,0 will disable this constraint.\nexport function WindowSetMaxSize(width: number, height: number): void;\n\n// [WindowSetMinSize](https://wails.io/docs/reference/runtime/window#windowsetminsize)\n// Sets the minimum window size. Will resize the window if the window is currently smaller than the given dimensions.\n// Setting a size of 0,0 will disable this constraint.\nexport function WindowSetMinSize(width: number, height: number): void;\n\n// [WindowSetPosition](https://wails.io/docs/reference/runtime/window#windowsetposition)\n// Sets the window position relative to the monitor the window is currently on.\nexport function WindowSetPosition(x: number, y: number): void;\n\n// [WindowGetPosition](https://wails.io/docs/reference/runtime/window#windowgetposition)\n// Gets the window position relative to the monitor the window is currently on.\nexport function WindowGetPosition(): Promise<Position>;\n\n// [WindowHide](https://wails.io/docs/reference/runtime/window#windowhide)\n// Hides the window.\nexport function WindowHide(): void;\n\n// [WindowShow](https://wails.io/docs/reference/runtime/window#windowshow)\n// Shows the window, if it is currently hidden.\nexport function WindowShow(): void;\n\n// [WindowMaximise](https://wails.io/docs/reference/runtime/window#windowmaximise)\n// Maximises the window to fill the screen.\nexport function WindowMaximise(): void;\n\n// [WindowToggleMaximise](https://wails.io/docs/reference/runtime/window#windowtogglemaximise)\n// Toggles between Maximised and UnMaximised.\nexport function WindowToggleMaximise(): void;\n\n// [WindowUnmaximise](https://wails.io/docs/reference/runtime/window#windowunmaximise)\n// Restores the window to the dimensions and position prior to maximising.\nexport function WindowUnmaximise(): void;\n\n// [WindowIsMaximised](https://wails.io/docs/reference/runtime/window#windowismaximised)\n// Returns the state of the window, i.e. whether the window is maximised or not.\nexport function WindowIsMaximised(): Promise<boolean>;\n\n// [WindowMinimise](https://wails.io/docs/reference/runtime/window#windowminimise)\n// Minimises the window.\nexport function WindowMinimise(): void;\n\n// [WindowUnminimise](https://wails.io/docs/reference/runtime/window#windowunminimise)\n// Restores the window to the dimensions and position prior to minimising.\nexport function WindowUnminimise(): void;\n\n// [WindowIsMinimised](https://wails.io/docs/reference/runtime/window#windowisminimised)\n// Returns the state of the window, i.e. whether the window is minimised or not.\nexport function WindowIsMinimised(): Promise<boolean>;\n\n// [WindowIsNormal](https://wails.io/docs/reference/runtime/window#windowisnormal)\n// Returns the state of the window, i.e. whether the window is normal or not.\nexport function WindowIsNormal(): Promise<boolean>;\n\n// [WindowSetBackgroundColour](https://wails.io/docs/reference/runtime/window#windowsetbackgroundcolour)\n// Sets the background colour of the window to the given RGBA colour definition. This colour will show through for all transparent pixels.\nexport function WindowSetBackgroundColour(R: number, G: number, B: number, A: number): void;\n\n// [ScreenGetAll](https://wails.io/docs/reference/runtime/window#screengetall)\n// Gets the all screens. Call this anew each time you want to refresh data from the underlying windowing system.\nexport function ScreenGetAll(): Promise<Screen[]>;\n\n// [BrowserOpenURL](https://wails.io/docs/reference/runtime/browser#browseropenurl)\n// Opens the given URL in the system browser.\nexport function BrowserOpenURL(url: string): void;\n\n// [Environment](https://wails.io/docs/reference/runtime/intro#environment)\n// Returns information about the environment\nexport function Environment(): Promise<EnvironmentInfo>;\n\n// [Quit](https://wails.io/docs/reference/runtime/intro#quit)\n// Quits the application.\nexport function Quit(): void;\n\n// [Hide](https://wails.io/docs/reference/runtime/intro#hide)\n// Hides the application.\nexport function Hide(): void;\n\n// [Show](https://wails.io/docs/reference/runtime/intro#show)\n// Shows the application.\nexport function Show(): void;\n\n// [ClipboardGetText](https://wails.io/docs/reference/runtime/clipboard#clipboardgettext)\n// Returns the current text stored on clipboard\nexport function ClipboardGetText(): Promise<string>;\n\n// [ClipboardSetText](https://wails.io/docs/reference/runtime/clipboard#clipboardsettext)\n// Sets a text on the clipboard\nexport function ClipboardSetText(text: string): Promise<boolean>;\n\n// [OnFileDrop](https://wails.io/docs/reference/runtime/draganddrop#onfiledrop)\n// OnFileDrop listens to drag and drop events and calls the callback with the coordinates of the drop and an array of path strings.\nexport function OnFileDrop(callback: (x: number, y: number ,paths: string[]) => void, useDropTarget: boolean) :void\n\n// [OnFileDropOff](https://wails.io/docs/reference/runtime/draganddrop#dragandddropoff)\n// OnFileDropOff removes the drag and drop listeners and handlers.\nexport function OnFileDropOff() :void\n\n// Check if the file path resolver is available\nexport function CanResolveFilePaths(): boolean;\n\n// Resolves file paths for an array of files\nexport function ResolveFilePaths(files: File[]): void"
  },
  {
    "path": "frontend/wailsjs/runtime/runtime.js",
    "content": "/*\n _       __      _ __\n| |     / /___ _(_) /____\n| | /| / / __ `/ / / ___/\n| |/ |/ / /_/ / / (__  )\n|__/|__/\\__,_/_/_/____/\nThe electron alternative for Go\n(c) Lea Anthony 2019-present\n*/\n\nexport function LogPrint(message) {\n    window.runtime.LogPrint(message);\n}\n\nexport function LogTrace(message) {\n    window.runtime.LogTrace(message);\n}\n\nexport function LogDebug(message) {\n    window.runtime.LogDebug(message);\n}\n\nexport function LogInfo(message) {\n    window.runtime.LogInfo(message);\n}\n\nexport function LogWarning(message) {\n    window.runtime.LogWarning(message);\n}\n\nexport function LogError(message) {\n    window.runtime.LogError(message);\n}\n\nexport function LogFatal(message) {\n    window.runtime.LogFatal(message);\n}\n\nexport function EventsOnMultiple(eventName, callback, maxCallbacks) {\n    return window.runtime.EventsOnMultiple(eventName, callback, maxCallbacks);\n}\n\nexport function EventsOn(eventName, callback) {\n    return EventsOnMultiple(eventName, callback, -1);\n}\n\nexport function EventsOff(eventName, ...additionalEventNames) {\n    return window.runtime.EventsOff(eventName, ...additionalEventNames);\n}\n\nexport function EventsOnce(eventName, callback) {\n    return EventsOnMultiple(eventName, callback, 1);\n}\n\nexport function EventsEmit(eventName) {\n    let args = [eventName].slice.call(arguments);\n    return window.runtime.EventsEmit.apply(null, args);\n}\n\nexport function WindowReload() {\n    window.runtime.WindowReload();\n}\n\nexport function WindowReloadApp() {\n    window.runtime.WindowReloadApp();\n}\n\nexport function WindowSetAlwaysOnTop(b) {\n    window.runtime.WindowSetAlwaysOnTop(b);\n}\n\nexport function WindowSetSystemDefaultTheme() {\n    window.runtime.WindowSetSystemDefaultTheme();\n}\n\nexport function WindowSetLightTheme() {\n    window.runtime.WindowSetLightTheme();\n}\n\nexport function WindowSetDarkTheme() {\n    window.runtime.WindowSetDarkTheme();\n}\n\nexport function WindowCenter() {\n    window.runtime.WindowCenter();\n}\n\nexport function WindowSetTitle(title) {\n    window.runtime.WindowSetTitle(title);\n}\n\nexport function WindowFullscreen() {\n    window.runtime.WindowFullscreen();\n}\n\nexport function WindowUnfullscreen() {\n    window.runtime.WindowUnfullscreen();\n}\n\nexport function WindowIsFullscreen() {\n    return window.runtime.WindowIsFullscreen();\n}\n\nexport function WindowGetSize() {\n    return window.runtime.WindowGetSize();\n}\n\nexport function WindowSetSize(width, height) {\n    window.runtime.WindowSetSize(width, height);\n}\n\nexport function WindowSetMaxSize(width, height) {\n    window.runtime.WindowSetMaxSize(width, height);\n}\n\nexport function WindowSetMinSize(width, height) {\n    window.runtime.WindowSetMinSize(width, height);\n}\n\nexport function WindowSetPosition(x, y) {\n    window.runtime.WindowSetPosition(x, y);\n}\n\nexport function WindowGetPosition() {\n    return window.runtime.WindowGetPosition();\n}\n\nexport function WindowHide() {\n    window.runtime.WindowHide();\n}\n\nexport function WindowShow() {\n    window.runtime.WindowShow();\n}\n\nexport function WindowMaximise() {\n    window.runtime.WindowMaximise();\n}\n\nexport function WindowToggleMaximise() {\n    window.runtime.WindowToggleMaximise();\n}\n\nexport function WindowUnmaximise() {\n    window.runtime.WindowUnmaximise();\n}\n\nexport function WindowIsMaximised() {\n    return window.runtime.WindowIsMaximised();\n}\n\nexport function WindowMinimise() {\n    window.runtime.WindowMinimise();\n}\n\nexport function WindowUnminimise() {\n    window.runtime.WindowUnminimise();\n}\n\nexport function WindowSetBackgroundColour(R, G, B, A) {\n    window.runtime.WindowSetBackgroundColour(R, G, B, A);\n}\n\nexport function ScreenGetAll() {\n    return window.runtime.ScreenGetAll();\n}\n\nexport function WindowIsMinimised() {\n    return window.runtime.WindowIsMinimised();\n}\n\nexport function WindowIsNormal() {\n    return window.runtime.WindowIsNormal();\n}\n\nexport function BrowserOpenURL(url) {\n    window.runtime.BrowserOpenURL(url);\n}\n\nexport function Environment() {\n    return window.runtime.Environment();\n}\n\nexport function Quit() {\n    window.runtime.Quit();\n}\n\nexport function Hide() {\n    window.runtime.Hide();\n}\n\nexport function Show() {\n    window.runtime.Show();\n}\n\nexport function ClipboardGetText() {\n    return window.runtime.ClipboardGetText();\n}\n\nexport function ClipboardSetText(text) {\n    return window.runtime.ClipboardSetText(text);\n}\n\n/**\n * Callback for OnFileDrop returns a slice of file path strings when a drop is finished.\n *\n * @export\n * @callback OnFileDropCallback\n * @param {number} x - x coordinate of the drop\n * @param {number} y - y coordinate of the drop\n * @param {string[]} paths - A list of file paths.\n */\n\n/**\n * OnFileDrop listens to drag and drop events and calls the callback with the coordinates of the drop and an array of path strings.\n *\n * @export\n * @param {OnFileDropCallback} callback - Callback for OnFileDrop returns a slice of file path strings when a drop is finished.\n * @param {boolean} [useDropTarget=true] - Only call the callback when the drop finished on an element that has the drop target style. (--wails-drop-target)\n */\nexport function OnFileDrop(callback, useDropTarget) {\n    return window.runtime.OnFileDrop(callback, useDropTarget);\n}\n\n/**\n * OnFileDropOff removes the drag and drop listeners and handlers.\n */\nexport function OnFileDropOff() {\n    return window.runtime.OnFileDropOff();\n}\n\nexport function CanResolveFilePaths() {\n    return window.runtime.CanResolveFilePaths();\n}\n\nexport function ResolveFilePaths(files) {\n    return window.runtime.ResolveFilePaths(files);\n}"
  },
  {
    "path": "go.mod",
    "content": "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.com/WXjzcccc/go-sqlcipher v0.1.1\n\tgithub.com/WXjzcccc/registry v0.1.3\n\tgithub.com/beevik/etree v1.5.1\n\tgithub.com/deatil/go-cryptobin v1.1.1005\n\tgithub.com/donnie4w/go-logger v0.28.0\n\tgithub.com/ghostiam/binstruct v1.4.0\n\tgithub.com/iancoleman/orderedmap v0.3.0\n\tgithub.com/ipipdotnet/ipdb-go v1.3.3\n\tgithub.com/syndtr/goleveldb v1.0.0\n\tgithub.com/tidwall/gjson v1.14.2\n\tgithub.com/wailsapp/wails/v2 v2.10.2\n\tgolang.org/x/crypto v0.41.0\n\tgolang.org/x/text v0.28.0\n\tgopkg.in/ini.v1 v1.67.0\n)\n\nrequire (\n\tgithub.com/bep/debounce v1.2.1 // indirect\n\tgithub.com/donnie4w/gofer v0.1.8 // indirect\n\tgithub.com/go-ole/go-ole v1.3.0 // indirect\n\tgithub.com/godbus/dbus/v5 v5.1.0 // indirect\n\tgithub.com/golang/snappy v0.0.4 // indirect\n\tgithub.com/google/btree v1.1.3 // indirect\n\tgithub.com/google/uuid v1.6.0 // indirect\n\tgithub.com/gorilla/websocket v1.5.3 // indirect\n\tgithub.com/jchv/go-winloader v0.0.0-20250406163304-c1995be93bd1 // indirect\n\tgithub.com/labstack/echo/v4 v4.13.4 // indirect\n\tgithub.com/labstack/gommon v0.4.2 // indirect\n\tgithub.com/leaanthony/go-ansi-parser v1.6.1 // indirect\n\tgithub.com/leaanthony/gosod v1.0.4 // indirect\n\tgithub.com/leaanthony/slicer v1.6.0 // indirect\n\tgithub.com/leaanthony/u v1.1.1 // indirect\n\tgithub.com/mattn/go-colorable v0.1.14 // indirect\n\tgithub.com/mattn/go-isatty v0.0.20 // indirect\n\tgithub.com/pkg/browser v0.0.0-20240102092130-5ac0b6a4141c // indirect\n\tgithub.com/pkg/errors v0.9.1 // indirect\n\tgithub.com/rivo/uniseg v0.4.7 // indirect\n\tgithub.com/samber/lo v1.51.0 // indirect\n\tgithub.com/tidwall/match v1.1.1 // indirect\n\tgithub.com/tidwall/pretty v1.2.0 // indirect\n\tgithub.com/tkrajina/go-reflector v0.5.8 // indirect\n\tgithub.com/valyala/bytebufferpool v1.0.0 // indirect\n\tgithub.com/valyala/fasttemplate v1.2.2 // indirect\n\tgithub.com/wailsapp/go-webview2 v1.0.21 // indirect\n\tgithub.com/wailsapp/mimetype v1.4.1 // indirect\n\tgolang.org/x/exp v0.0.0-20240909161429-701f63a606c0 // indirect\n\tgolang.org/x/net v0.42.0 // indirect\n\tgolang.org/x/sys v0.35.0 // indirect\n\tgoogle.golang.org/protobuf v1.33.0 // indirect\n)\n"
  },
  {
    "path": "go.sum",
    "content": "github.com/OneOfOne/xxhash v1.2.8 h1:31czK/TI9sNkxIKfaUfGlU47BAxQ0ztGgd9vPyqimf8=\ngithub.com/OneOfOne/xxhash v1.2.8/go.mod h1:eZbhyaAYD41SGSSsnmcpxVoRiQ/MPUTjUdIIOT9Um7Q=\ngithub.com/WXjzcccc/go-mmkv v0.0.1 h1:Hs+dxhAERU5ftx74ouLUPljRf3Y3tk9C8tF0VLhjP58=\ngithub.com/WXjzcccc/go-mmkv v0.0.1/go.mod h1:Hgt/AtukRIGI8Zrd5ORrtlur4BbfJ8vReaDJLjDDbT0=\ngithub.com/WXjzcccc/go-sqlcipher v0.1.1 h1:ZlBgzaTjlebNEflcZVSFPQZFzejlBN/FYu9i9pzJPm0=\ngithub.com/WXjzcccc/go-sqlcipher v0.1.1/go.mod h1:FUAXRy+bkyWrm98zZuJf/zBAFaRkisrr16jz6h0adKo=\ngithub.com/WXjzcccc/registry v0.1.3 h1:qALW6UoKhvSxjIgUnoycho+x3aECTLMyw60KvYlBFIY=\ngithub.com/WXjzcccc/registry v0.1.3/go.mod h1:Cld2HC9lHhVyInjAeRcgx/rEpNy00bAhyNi59YTyxdI=\ngithub.com/beevik/etree v1.5.1 h1:TC3zyxYp+81wAmbsi8SWUpZCurbxa6S8RITYRSkNRwo=\ngithub.com/beevik/etree v1.5.1/go.mod h1:gPNJNaBGVZ9AwsidazFZyygnd+0pAU38N4D+WemwKNs=\ngithub.com/bep/debounce v1.2.1 h1:v67fRdBA9UQu2NhLFXrSg0Brw7CexQekrBwDMM8bzeY=\ngithub.com/bep/debounce v1.2.1/go.mod h1:H8yggRPQKLUhUoqrJC1bO2xNya7vanpDl7xR3ISbCJ0=\ngithub.com/davecgh/go-spew v1.1.1 h1:vj9j/u1bqnvCEfJOwUhtlOARqs3+rkHYY13jYWTU97c=\ngithub.com/davecgh/go-spew v1.1.1/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38=\ngithub.com/deatil/go-cryptobin v1.1.1005 h1:mzYXXDUnbTrCnPIeZTvjrnp7Bkbh2G1SlYM2UIWhpHM=\ngithub.com/deatil/go-cryptobin v1.1.1005/go.mod h1:x+/+SzyfbxliY2y0Fwe+OoLU0DEt9kWs6OMiwghcfJ0=\ngithub.com/donnie4w/go-logger v0.28.0 h1:8VJxhNIQh1RBLiUJRHf39A/MewTJonWV5CqCk7U0zqg=\ngithub.com/donnie4w/go-logger v0.28.0/go.mod h1:4V6Hm2QT2ALDypwibyKaWEiY2nuvmavr69zIJDQ0PdM=\ngithub.com/donnie4w/gofer v0.1.8 h1:b9JNNH16lbKLTJDSe0jhOdDdCqRb5ZjYYmoDcNc0lzo=\ngithub.com/donnie4w/gofer v0.1.8/go.mod h1:ZxNRFqXhhIbb8CCVkf1BVGlTkowIqh2UjZ+yiWtAqAA=\ngithub.com/fsnotify/fsnotify v1.4.7/go.mod h1:jwhsz4b93w/PPRr/qN1Yymfu8t87LnFCMoQvtojpjFo=\ngithub.com/ghostiam/binstruct v1.4.0 h1:nWa+SXeq/Ec2kJoaj+YRbFhfq2qATLrNVznUAPNxPy4=\ngithub.com/ghostiam/binstruct v1.4.0/go.mod h1:28KUoYi10LDpiQyPTbGsPz0wOrsUga6jY7Wnsej9NhQ=\ngithub.com/go-ole/go-ole v1.3.0 h1:Dt6ye7+vXGIKZ7Xtk4s6/xVdGDQynvom7xCFEdWr6uE=\ngithub.com/go-ole/go-ole v1.3.0/go.mod h1:5LS6F96DhAwUc7C+1HLexzMXY1xGRSryjyPPKW6zv78=\ngithub.com/godbus/dbus/v5 v5.1.0 h1:4KLkAxT3aOY8Li4FRJe/KvhoNFFxo0m6fNuFUO8QJUk=\ngithub.com/godbus/dbus/v5 v5.1.0/go.mod h1:xhWf0FNVPg57R7Z0UbKHbJfkEywrmjJnf7w5xrFpKfA=\ngithub.com/golang/protobuf v1.2.0/go.mod h1:6lQm79b+lXiMfvg/cZm0SGofjICqVBUtrP5yJMmIC1U=\ngithub.com/golang/snappy v0.0.0-20180518054509-2e65f85255db/go.mod h1:/XxbfmMg8lxefKM7IXC3fBNl/7bRcc72aCRzEWrmP2Q=\ngithub.com/golang/snappy v0.0.4 h1:yAGX7huGHXlcLOEtBnF4w7FQwA26wojNCwOYAEhLjQM=\ngithub.com/golang/snappy v0.0.4/go.mod h1:/XxbfmMg8lxefKM7IXC3fBNl/7bRcc72aCRzEWrmP2Q=\ngithub.com/google/btree v1.1.3 h1:CVpQJjYgC4VbzxeGVHfvZrv1ctoYCAI8vbl07Fcxlyg=\ngithub.com/google/btree v1.1.3/go.mod h1:qOPhT0dTNdNzV6Z/lhRX0YXUafgPLFUh+gZMl761Gm4=\ngithub.com/google/uuid v1.6.0 h1:NIvaJDMOsjHA8n1jAhLSgzrAzy1Hgr+hNrb57e+94F0=\ngithub.com/google/uuid v1.6.0/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+yHo=\ngithub.com/gorilla/websocket v1.5.3 h1:saDtZ6Pbx/0u+bgYQ3q96pZgCzfhKXGPqt7kZ72aNNg=\ngithub.com/gorilla/websocket v1.5.3/go.mod h1:YR8l580nyteQvAITg2hZ9XVh4b55+EU/adAjf1fMHhE=\ngithub.com/hpcloud/tail v1.0.0 h1:nfCOvKYfkgYP8hkirhJocXT2+zOD8yUNjXaWfTlyFKI=\ngithub.com/hpcloud/tail v1.0.0/go.mod h1:ab1qPbhIpdTxEkNHXyeSf5vhxWSCs/tWer42PpOxQnU=\ngithub.com/iancoleman/orderedmap v0.3.0 h1:5cbR2grmZR/DiVt+VJopEhtVs9YGInGIxAoMJn+Ichc=\ngithub.com/iancoleman/orderedmap v0.3.0/go.mod h1:XuLcCUkdL5owUCQeF2Ue9uuw1EptkJDkXXS7VoV7XGE=\ngithub.com/ipipdotnet/ipdb-go v1.3.3 h1:GLSAW9ypLUd6EF9QNK2Uhxew9Jzs4XMJ9gOZEFnJm7U=\ngithub.com/ipipdotnet/ipdb-go v1.3.3/go.mod h1:yZ+8puwe3R37a/3qRftXo40nZVQbxYDLqls9o5foexs=\ngithub.com/jchv/go-winloader v0.0.0-20250406163304-c1995be93bd1 h1:njuLRcjAuMKr7kI3D85AXWkw6/+v9PwtV6M6o11sWHQ=\ngithub.com/jchv/go-winloader v0.0.0-20250406163304-c1995be93bd1/go.mod h1:alcuEEnZsY1WQsagKhZDsoPCRoOijYqhZvPwLG0kzVs=\ngithub.com/labstack/echo/v4 v4.13.4 h1:oTZZW+T3s9gAu5L8vmzihV7/lkXGZuITzTQkTEhcXEA=\ngithub.com/labstack/echo/v4 v4.13.4/go.mod h1:g63b33BZ5vZzcIUF8AtRH40DrTlXnx4UMC8rBdndmjQ=\ngithub.com/labstack/gommon v0.4.2 h1:F8qTUNXgG1+6WQmqoUWnz8WiEU60mXVVw0P4ht1WRA0=\ngithub.com/labstack/gommon v0.4.2/go.mod h1:QlUFxVM+SNXhDL/Z7YhocGIBYOiwB0mXm1+1bAPHPyU=\ngithub.com/leaanthony/debme v1.2.1 h1:9Tgwf+kjcrbMQ4WnPcEIUcQuIZYqdWftzZkBr+i/oOc=\ngithub.com/leaanthony/debme v1.2.1/go.mod h1:3V+sCm5tYAgQymvSOfYQ5Xx2JCr+OXiD9Jkw3otUjiA=\ngithub.com/leaanthony/go-ansi-parser v1.6.1 h1:xd8bzARK3dErqkPFtoF9F3/HgN8UQk0ed1YDKpEz01A=\ngithub.com/leaanthony/go-ansi-parser v1.6.1/go.mod h1:+vva/2y4alzVmmIEpk9QDhA7vLC5zKDTRwfZGOp3IWU=\ngithub.com/leaanthony/gosod v1.0.4 h1:YLAbVyd591MRffDgxUOU1NwLhT9T1/YiwjKZpkNFeaI=\ngithub.com/leaanthony/gosod v1.0.4/go.mod h1:GKuIL0zzPj3O1SdWQOdgURSuhkF+Urizzxh26t9f1cw=\ngithub.com/leaanthony/slicer v1.6.0 h1:1RFP5uiPJvT93TAHi+ipd3NACobkW53yUiBqZheE/Js=\ngithub.com/leaanthony/slicer v1.6.0/go.mod h1:o/Iz29g7LN0GqH3aMjWAe90381nyZlDNquK+mtH2Fj8=\ngithub.com/leaanthony/u v1.1.1 h1:TUFjwDGlNX+WuwVEzDqQwC2lOv0P4uhTQw7CMFdiK7M=\ngithub.com/leaanthony/u v1.1.1/go.mod h1:9+o6hejoRljvZ3BzdYlVL0JYCwtnAsVuN9pVTQcaRfI=\ngithub.com/matryer/is v1.4.0/go.mod h1:8I/i5uYgLzgsgEloJE1U6xx5HkBQpAZvepWuujKwMRU=\ngithub.com/matryer/is v1.4.1 h1:55ehd8zaGABKLXQUe2awZ99BD/PTc2ls+KV/dXphgEQ=\ngithub.com/matryer/is v1.4.1/go.mod h1:8I/i5uYgLzgsgEloJE1U6xx5HkBQpAZvepWuujKwMRU=\ngithub.com/mattn/go-colorable v0.1.14 h1:9A9LHSqF/7dyVVX6g0U9cwm9pG3kP9gSzcuIPHPsaIE=\ngithub.com/mattn/go-colorable v0.1.14/go.mod h1:6LmQG8QLFO4G5z1gPvYEzlUgJ2wF+stgPZH1UqBm1s8=\ngithub.com/mattn/go-isatty v0.0.20 h1:xfD0iDuEKnDkl03q4limB+vH+GxLEtL/jb4xVJSWWEY=\ngithub.com/mattn/go-isatty v0.0.20/go.mod h1:W+V8PltTTMOvKvAeJH7IuucS94S2C6jfK/D7dTCTo3Y=\ngithub.com/onsi/ginkgo v1.6.0/go.mod h1:lLunBs/Ym6LB5Z9jYTR76FiuTmxDTDusOGeTQH+WWjE=\ngithub.com/onsi/ginkgo v1.7.0 h1:WSHQ+IS43OoUrWtD1/bbclrwK8TTH5hzp+umCiuxHgs=\ngithub.com/onsi/ginkgo v1.7.0/go.mod h1:lLunBs/Ym6LB5Z9jYTR76FiuTmxDTDusOGeTQH+WWjE=\ngithub.com/onsi/gomega v1.4.3 h1:RE1xgDvH7imwFD45h+u2SgIfERHlS2yNG4DObb5BSKU=\ngithub.com/onsi/gomega v1.4.3/go.mod h1:ex+gbHU/CVuBBDIJjb2X0qEXbFg53c61hWP/1CpauHY=\ngithub.com/pkg/browser v0.0.0-20240102092130-5ac0b6a4141c h1:+mdjkGKdHQG3305AYmdv1U2eRNDiU2ErMBj1gwrq8eQ=\ngithub.com/pkg/browser v0.0.0-20240102092130-5ac0b6a4141c/go.mod h1:7rwL4CYBLnjLxUqIJNnCWiEdr3bn6IUYi15bNlnbCCU=\ngithub.com/pkg/errors v0.9.1 h1:FEBLx1zS214owpjy7qsBeixbURkuhQAwrK5UwLGTwt4=\ngithub.com/pkg/errors v0.9.1/go.mod h1:bwawxfHBFNV+L2hUp1rHADufV3IMtnDRdf1r5NINEl0=\ngithub.com/pmezard/go-difflib v1.0.0 h1:4DBwDE0NGyQoBHbLQYPwSUPoCMWR5BEzIk/f1lZbAQM=\ngithub.com/pmezard/go-difflib v1.0.0/go.mod h1:iKH77koFhYxTK1pcRnkKkqfTogsbg7gZNVY4sRDYZ/4=\ngithub.com/rivo/uniseg v0.2.0/go.mod h1:J6wj4VEh+S6ZtnVlnTBMWIodfgj8LQOQFoIToxlJtxc=\ngithub.com/rivo/uniseg v0.4.7 h1:WUdvkW8uEhrYfLC4ZzdpI2ztxP1I582+49Oc5Mq64VQ=\ngithub.com/rivo/uniseg v0.4.7/go.mod h1:FN3SvrM+Zdj16jyLfmOkMNblXMcoc8DfTHruCPUcx88=\ngithub.com/samber/lo v1.51.0 h1:kysRYLbHy/MB7kQZf5DSN50JHmMsNEdeY24VzJFu7wI=\ngithub.com/samber/lo v1.51.0/go.mod h1:4+MXEGsJzbKGaUEQFKBq2xtfuznW9oz/WrgyzMzRoM0=\ngithub.com/stretchr/testify v1.10.0 h1:Xv5erBjTwe/5IxqUQTdXv5kgmIvbHo3QQyRwhJsOfJA=\ngithub.com/stretchr/testify v1.10.0/go.mod h1:r2ic/lqez/lEtzL7wO/rwa5dbSLXVDPFyf8C91i36aY=\ngithub.com/syndtr/goleveldb v1.0.0 h1:fBdIW9lB4Iz0n9khmH8w27SJ3QEJ7+IgjPEwGSZiFdE=\ngithub.com/syndtr/goleveldb v1.0.0/go.mod h1:ZVVdQEZoIme9iO1Ch2Jdy24qqXrMMOU6lpPAyBWyWuQ=\ngithub.com/tidwall/gjson v1.14.2 h1:6BBkirS0rAHjumnjHF6qgy5d2YAJ1TLIaFE2lzfOLqo=\ngithub.com/tidwall/gjson v1.14.2/go.mod h1:/wbyibRr2FHMks5tjHJ5F8dMZh3AcwJEMf5vlfC0lxk=\ngithub.com/tidwall/match v1.1.1 h1:+Ho715JplO36QYgwN9PGYNhgZvoUSc9X2c80KVTi+GA=\ngithub.com/tidwall/match v1.1.1/go.mod h1:eRSPERbgtNPcGhD8UCthc6PmLEQXEWd3PRB5JTxsfmM=\ngithub.com/tidwall/pretty v1.2.0 h1:RWIZEg2iJ8/g6fDDYzMpobmaoGh5OLl4AXtGUGPcqCs=\ngithub.com/tidwall/pretty v1.2.0/go.mod h1:ITEVvHYasfjBbM0u2Pg8T2nJnzm8xPwvNhhsoaGGjNU=\ngithub.com/tkrajina/go-reflector v0.5.8 h1:yPADHrwmUbMq4RGEyaOUpz2H90sRsETNVpjzo3DLVQQ=\ngithub.com/tkrajina/go-reflector v0.5.8/go.mod h1:ECbqLgccecY5kPmPmXg1MrHW585yMcDkVl6IvJe64T4=\ngithub.com/valyala/bytebufferpool v1.0.0 h1:GqA5TC/0021Y/b9FG4Oi9Mr3q7XYx6KllzawFIhcdPw=\ngithub.com/valyala/bytebufferpool v1.0.0/go.mod h1:6bBcMArwyJ5K/AmCkWv1jt77kVWyCJ6HpOuEn7z0Csc=\ngithub.com/valyala/fasttemplate v1.2.2 h1:lxLXG0uE3Qnshl9QyaK6XJxMXlQZELvChBOCmQD0Loo=\ngithub.com/valyala/fasttemplate v1.2.2/go.mod h1:KHLXt3tVN2HBp8eijSv/kGJopbvo7S+qRAEEKiv+SiQ=\ngithub.com/wailsapp/go-webview2 v1.0.21 h1:k3dtoZU4KCoN/AEIbWiPln3P2661GtA2oEgA2Pb+maA=\ngithub.com/wailsapp/go-webview2 v1.0.21/go.mod h1:qJmWAmAmaniuKGZPWwne+uor3AHMB5PFhqiK0Bbj8kc=\ngithub.com/wailsapp/mimetype v1.4.1 h1:pQN9ycO7uo4vsUUuPeHEYoUkLVkaRntMnHJxVwYhwHs=\ngithub.com/wailsapp/mimetype v1.4.1/go.mod h1:9aV5k31bBOv5z6u+QP8TltzvNGJPmNJD4XlAL3U+j3o=\ngithub.com/wailsapp/wails/v2 v2.10.2 h1:29U+c5PI4K4hbx8yFbFvwpCuvqK9VgNv8WGobIlKlXk=\ngithub.com/wailsapp/wails/v2 v2.10.2/go.mod h1:XuN4IUOPpzBrHUkEd7sCU5ln4T/p1wQedfxP7fKik+4=\ngolang.org/x/crypto v0.41.0 h1:WKYxWedPGCTVVl5+WHSSrOBT0O8lx32+zxmHxijgXp4=\ngolang.org/x/crypto v0.41.0/go.mod h1:pO5AFd7FA68rFak7rOAGVuygIISepHftHnr8dr6+sUc=\ngolang.org/x/exp v0.0.0-20240909161429-701f63a606c0 h1:e66Fs6Z+fZTbFBAxKfP3PALWBtpfqks2bwGcexMxgtk=\ngolang.org/x/exp v0.0.0-20240909161429-701f63a606c0/go.mod h1:2TbTHSBQa924w8M6Xs1QcRcFwyucIwBGpK1p2f1YFFY=\ngolang.org/x/net v0.0.0-20180906233101-161cd47e91fd/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4=\ngolang.org/x/net v0.0.0-20210505024714-0287a6fb4125/go.mod h1:9nx3DQGgdP8bBQD5qxJ1jj9UTztislL4KSBs9R2vV5Y=\ngolang.org/x/net v0.42.0 h1:jzkYrhi3YQWD6MLBJcsklgQsoAcw89EcZbJw8Z614hs=\ngolang.org/x/net v0.42.0/go.mod h1:FF1RA5d3u7nAYA4z2TkclSCKh68eSXtiFwcWQpPXdt8=\ngolang.org/x/sync v0.0.0-20180314180146-1d60e4601c6f/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM=\ngolang.org/x/sys v0.0.0-20180909124046-d0be0721c37e/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY=\ngolang.org/x/sys v0.0.0-20200810151505-1b9f1253b3ed/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=\ngolang.org/x/sys v0.0.0-20201119102817-f84b799fce68/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=\ngolang.org/x/sys v0.0.0-20210423082822-04245dca01da/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=\ngolang.org/x/sys v0.1.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=\ngolang.org/x/sys v0.6.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=\ngolang.org/x/sys v0.35.0 h1:vz1N37gP5bs89s7He8XuIYXpyY0+QlsKmzipCbUtyxI=\ngolang.org/x/sys v0.35.0/go.mod h1:BJP2sWEmIv4KK5OTEluFJCKSidICx8ciO85XgH3Ak8k=\ngolang.org/x/term v0.0.0-20201126162022-7de9c90e9dd1/go.mod h1:bj7SfCRtBDWHUb9snDiAeCFNEtKQo2Wmx5Cou7ajbmo=\ngolang.org/x/text v0.3.0/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ=\ngolang.org/x/text v0.3.6/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ=\ngolang.org/x/text v0.28.0 h1:rhazDwis8INMIwQ4tpjLDzUhx6RlXqZNPEM0huQojng=\ngolang.org/x/text v0.28.0/go.mod h1:U8nCwOR8jO/marOQ0QbDiOngZVEBB7MAiitBuMjXiNU=\ngolang.org/x/tools v0.0.0-20180917221912-90fa682c2a6e/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ=\ngoogle.golang.org/protobuf v1.33.0 h1:uNO2rsAINq/JlFpSdYEKIZ0uKD/R9cpdv0T+yoGwGmI=\ngoogle.golang.org/protobuf v1.33.0/go.mod h1:c6P6GXX6sHbq/GpV6MGZEdwhWPcYBgnhAHhKbcUYpos=\ngopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0=\ngopkg.in/fsnotify.v1 v1.4.7 h1:xOHLXZwVvI9hhs+cLKq5+I5onOuwQLhQwiu63xxlHs4=\ngopkg.in/fsnotify.v1 v1.4.7/go.mod h1:Tz8NjZHkW78fSQdbUxIjBTcgA1z1m8ZHf0WmKUhAMys=\ngopkg.in/ini.v1 v1.67.0 h1:Dgnx+6+nfE+IfzjUEISNeydPJh9AXNNsWbGP9KzCsOA=\ngopkg.in/ini.v1 v1.67.0/go.mod h1:pNLf8WUiyNEtQjuu5G5vTm06TEv9tsIgeAvK8hOrP4k=\ngopkg.in/tomb.v1 v1.0.0-20141024135613-dd632973f1e7 h1:uRGJdciOHaEIrze2W8Q3AKkepLTh2hOroT7a+7czfdQ=\ngopkg.in/tomb.v1 v1.0.0-20141024135613-dd632973f1e7/go.mod h1:dt/ZhP58zS4L8KSrWDmTeBkI65Dw0HsyUHuEVlX15mw=\ngopkg.in/yaml.v2 v2.2.1 h1:mUhvW9EsL+naU5Q3cakzfE91YhliOondGd6ZrsDBHQE=\ngopkg.in/yaml.v2 v2.2.1/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI=\ngopkg.in/yaml.v3 v3.0.1 h1:fxVm/GzAzEWqLHuvctI91KS9hhNmmWOoWu0XTYJS7CA=\ngopkg.in/yaml.v3 v3.0.1/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM=\n"
  },
  {
    "path": "main.go",
    "content": "package main\n\nimport (\n\t\"ForensicsTool/analyzers/database\"\n\t\"ForensicsTool/analyzers/extractor\"\n\t\"ForensicsTool/analyzers/passwdCalc\"\n\t\"ForensicsTool/analyzers/reader\"\n\t\"ForensicsTool/analyzers/winreg\"\n\t\"ForensicsTool/tools/cracker\"\n\t\"ForensicsTool/tools/ip\"\n\t\"ForensicsTool/tools/timestamp\"\n\t\"context\"\n\t\"embed\"\n\n\t\"github.com/donnie4w/go-logger/logger\"\n\t\"github.com/wailsapp/wails/v2/pkg/options/windows\"\n\n\t\"github.com/wailsapp/wails/v2\"\n\t\"github.com/wailsapp/wails/v2/pkg/options\"\n\t\"github.com/wailsapp/wails/v2/pkg/options/assetserver\"\n)\n\n//go:embed all:frontend/dist\nvar assets embed.FS\n\nfunc main() {\n\tlogger.SetFormat(logger.FORMAT_LEVELFLAG | logger.FORMAT_DATE | logger.FORMAT_TIME | logger.FORMAT_FUNC | logger.FORMAT_RELATIVEFILENAME)\n\tlogger.SetRollingFileLoop(\"./logs\", \"app.log\", 10, logger.MB, 10)\n\t// Create an instance of the app structure\n\tapp := NewApp()\n\tdecDb := database.NewDecryptDatabase()\n\tpasswdCal := passwdCalc.NewPasswdCalc()\n\tinfoExtract := extractor.NewInfoExtractor()\n\treg := winreg.NewReg()\n\tcrack := cracker.NewForensicsCracker()\n\ttp := timestamp.NewTimeStampParser()\n\treader := reader.NewFileReader()\n\tczip := ip.NewIP()\n\t// Create application with options\n\terr := wails.Run(&options.App{\n\t\tTitle:  \"ForensicsTool\",\n\t\tWidth:  1024,\n\t\tHeight: 768,\n\t\tAssetServer: &assetserver.Options{\n\t\t\tAssets: assets,\n\t\t},\n\t\tFrameless:        true,\n\t\tDragAndDrop:      &options.DragAndDrop{DisableWebViewDrop: false, EnableFileDrop: true},\n\t\tBackgroundColour: &options.RGBA{R: 27, G: 38, B: 54, A: 1},\n\t\tWindows:          &windows.Options{IsZoomControlEnabled: false},\n\t\tOnStartup: func(ctx context.Context) {\n\t\t\tapp.startup(ctx)\n\t\t\tdecDb.InitCtx(ctx)\n\t\t\tpasswdCal.InitCtx(ctx)\n\t\t\tinfoExtract.InitCtx(ctx)\n\t\t\treg.InitCtx(ctx)\n\t\t\tcrack.InitCtx(ctx)\n\t\t\ttp.InitCtx(ctx)\n\t\t\treader.InitCtx(ctx)\n\t\t\tczip.InitCtx(ctx)\n\t\t},\n\t\tBind: []interface{}{\n\t\t\tapp,\n\t\t\tdecDb,\n\t\t\tpasswdCal,\n\t\t\tinfoExtract,\n\t\t\treg,\n\t\t\tcrack,\n\t\t\ttp,\n\t\t\treader,\n\t\t\tczip,\n\t\t},\n\t})\n\n\tif err != nil {\n\t\tprintln(\"Error:\", err.Error())\n\t}\n}\n"
  },
  {
    "path": "scripts/build-macos-arm.sh",
    "content": "#! /bin/bash\n\necho -e \"Start running the script...\"\ncd ../\n\necho -e \"Start building the app for macos platform...\"\nwails build --clean --platform darwin/arm64\n\necho -e \"End running the script!\"\n"
  },
  {
    "path": "scripts/build-macos-intel.sh",
    "content": "#! /bin/bash\n\necho -e \"Start running the script...\"\ncd ../\n\necho -e \"Start building the app for macos platform...\"\nwails build --clean --platform darwin\n\necho -e \"End running the script!\"\n"
  },
  {
    "path": "scripts/build-macos.sh",
    "content": "#! /bin/bash\n\necho -e \"Start running the script...\"\ncd ../\n\necho -e \"Start building the app for macos platform...\"\nwails build --clean --platform darwin/universal\n\necho -e \"End running the script!\"\n"
  },
  {
    "path": "scripts/build-windows.sh",
    "content": "#! /bin/bash\n\necho -e \"Start running the script...\"\ncd ../\n\necho -e \"Start building the app for windows platform...\"\nwails build --clean --platform windows/amd64\n\necho -e \"End running the script!\"\n"
  },
  {
    "path": "scripts/build.sh",
    "content": "#! /bin/bash\n\necho -e \"Start running the script...\"\ncd ../\n\necho -e \"Start building the app...\"\nwails build --clean\n\necho -e \"End running the script!\"\n"
  },
  {
    "path": "scripts/install-wails-cli.sh",
    "content": "#! /bin/bash\n\necho -e \"Start running the script...\"\ncd ../\n\necho -e \"Current Go version: \\c\"\ngo version\n\necho -e \"Install the Wails command line tool...\"\ngo install github.com/wailsapp/wails/v2/cmd/wails@latest\n\necho -e \"Successful installation!\"\n\necho -e \"End running the script!\"\n"
  },
  {
    "path": "tools/cracker/airdrop.go",
    "content": "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 macsDefault = []string{\"130\", \"131\", \"132\", \"133\", \"135\", \"136\", \"137\", \"138\", \"139\", \"140\", \"141\", \"144\", \"145\", \"146\", \"147\", \"148\",\n\t\"149\", \"150\", \"151\", \"152\", \"153\", \"155\", \"156\", \"157\", \"158\", \"159\", \"166\", \"167\", \"171\", \"172\", \"173\", \"174\",\n\t\"175\", \"176\", \"177\", \"178\", \"180\", \"181\", \"182\", \"183\", \"184\", \"185\", \"186\", \"187\", \"188\", \"189\", \"190\", \"191\",\n\t\"192\", \"193\", \"195\", \"196\", \"197\", \"198\", \"199\"}\n\nfunc getHeadAndTail(phone string) (string, string) {\n\thash := utils.SHA256HashHex(phone)\n\treturn hash[:5], hash[len(hash)-5:]\n}\n\nfunc (f *ForensicsCracker) crackPhone(region, mac, head, tail string, length int, c chan string, ctx context.Context, wg *sync.WaitGroup) {\n\tdefer wg.Done()\n\tfor i := range int64(math.Pow(10, float64(length))) {\n\t\tCrackState = fmt.Sprintf(\"爆破号段:%s\\n\", mac)\n\t\tselect {\n\t\tcase <-ctx.Done():\n\t\t\truntime.Goexit()\n\t\tdefault:\n\t\t\tfmtStr := \"%s%s%0\" + strconv.Itoa(length) + \"d\"\n\t\t\tphone := fmt.Sprintf(fmtStr, region, mac, i)\n\t\t\thashHead, hashTail := getHeadAndTail(phone)\n\t\t\tCurrent++\n\t\t\tf.sendEvent()\n\t\t\tif hashHead == head && hashTail == tail {\n\t\t\t\tc <- fmt.Sprintf(\"[√]已找到匹配的手机号：%s\\n\", phone)\n\t\t\t}\n\t\t}\n\t}\n\tc <- fmt.Sprintf(\"[+]%s开头的手机号爆破结束\\n\", mac)\n\tDoneCount += 1\n\tif DoneCount == Counts {\n\t\t// 避免爆破完成后阻塞，虽然阻塞也没什么关系，后面没有逻辑就是了\n\t\tclose(c)\n\t}\n}\n\nfunc (f *ForensicsCracker) CrackAirDrop(head, tail, region string, macs []string, length int) *CrackResult {\n\t/*\n\t\t@param\thead:\t前5位哈希值\n\t\t@param\ttail:\t后5位哈希值\n\t\t@param\tregion:\t区号，默认86\n\t\t@param\tmacs:\t号段\n\t\t@param\tlength:\t除区号和号段后的号码长度，默认8\n\t*/\n\tf.startTime = time.Now()\n\tf.crackCtx, f.crackCancel = context.WithCancel(context.Background())\n\tdefer f.crackCancel()\n\tf.crackResult = &CrackResult{}\n\tc := make(chan string, 1)\n\tif region == \"\" {\n\t\tregion = \"86\"\n\t}\n\tif len(macs) == 0 {\n\t\tmacs = macsDefault\n\t}\n\tif length == 0 {\n\t\tlength = 8\n\t}\n\tCurrent = 0\n\tTotalCount = len(macs) * int(math.Pow10(length))\n\tFrequency = TotalCount / 100\n\tvar wg sync.WaitGroup\n\tgo func() {\n\t\tfor i := range c {\n\t\t\tf.crackResult.Result += i + \"\\n\"\n\t\t\tCrackState = f.crackResult.Result\n\t\t\tf.crackResult.Time = time.Since(f.startTime).String()\n\t\t\tf.crackResult.Error = \"\"\n\t\t\tf.sendState()\n\t\t}\n\t\tf.crackCancel()\n\t\truntime.Goexit()\n\t}()\n\tfor _, mac := range macs {\n\t\twg.Add(1)\n\t\tgo f.crackPhone(region, mac, head, tail, length, c, f.crackCtx, &wg)\n\t}\n\twg.Wait()\n\tCurrent = TotalCount\n\tf.sendProgress()\n\tif f.crackResult.Result == \"\" {\n\t\tf.crackResult.Time = time.Since(f.startTime).String()\n\t\tf.crackResult.Error = \"未成功爆破\"\n\t}\n\treturn f.crackResult\n}\n"
  },
  {
    "path": "tools/cracker/cracker.go",
    "content": "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// 助记词顺序恢复是单独的，就不放进来了\n\ntype ForensicsCracker struct {\n\tctx         context.Context\n\tstartTime   time.Time\n\tendTime     time.Time\n\tcrackCancel context.CancelFunc\n\tcrackCtx    context.Context\n\tcrackResult *CrackResult\n}\n\ntype CrackResult struct {\n\tResult string `json:\"result\"`\n\tTime   string `json:\"time\"`\n\tError  string `json:\"error\"`\n}\n\nconst (\n\tProgressEvent = \"ForensicsTool::BruteForce::Progress\"\n\tStateEvent    = \"ForensicsTool::BruteForce::State\"\n)\n\nvar CrackState string\nvar CalCount int = 0\nvar DoneCount int = 0\nvar Counts int = 0\n\nvar TotalCount int = 0\nvar Current int = 0\nvar Frequency int = 10_000\n\nfunc NewForensicsCracker() *ForensicsCracker {\n\treturn &ForensicsCracker{}\n}\n\nfunc (f *ForensicsCracker) InitCtx(ctx context.Context) {\n\tf.ctx = ctx\n}\n\nfunc (f *ForensicsCracker) CancelCrack() {\n\t/*\n\t\t取消任务\n\t*/\n\tf.crackCancel()\n\tf.endTime = time.Now()\n}\n\nfunc (f *ForensicsCracker) GetState() string {\n\treturn fmt.Sprintf(\"状态：%s\\n耗时：%v\\n信息：{\\n\\t结果：%v\\n\\t耗时：%v\\n\\t错误：%v\\n}\",\n\t\tCrackState, time.Since(f.startTime), f.crackResult.Result, f.crackResult.Time, f.crackResult.Error)\n}\n\nfunc (f *ForensicsCracker) sendProgress() {\n\tgo runtime.EventsEmit(f.ctx, ProgressEvent, Current, TotalCount)\n}\n\nfunc (f *ForensicsCracker) sendState() {\n\tgo runtime.EventsEmit(f.ctx, StateEvent, fmt.Sprintf(\"状态：%s\\n耗时：%v\\n信息：{\\n\\t结果：%v\\n\\t耗时：%v\\n\\t错误：%v\\n}\",\n\t\tCrackState, time.Since(f.startTime), f.crackResult.Result, f.crackResult.Time, f.crackResult.Error))\n}\n\nfunc (f *ForensicsCracker) sendEvent() {\n\tif Current%Frequency == 0 {\n\t\tf.sendState()\n\t\tf.sendProgress()\n\t}\n}\n"
  },
  {
    "path": "tools/cracker/wxuin.go",
    "content": "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 string) string {\n\treturn utils.MD5HashHex(\"mm\" + text)\n}\n\nfunc (f *ForensicsCracker) crackUin(target []string, start int, end int, c chan string, ctx context.Context, wg *sync.WaitGroup) {\n\tdefer wg.Done()\n\tfor i := start; i <= end; i++ {\n\t\tCrackState = fmt.Sprintf(\"爆破范围:%d-%d\\n\", start, end)\n\t\tselect {\n\t\tcase <-ctx.Done():\n\t\t\truntime.Goexit()\n\t\tdefault:\n\t\t\t_hash := getHash(fmt.Sprintf(\"%d\", i))\n\t\t\tCurrent++\n\t\t\tf.sendEvent()\n\t\t\tfor _, v := range target {\n\t\t\t\tif _hash == v {\n\t\t\t\t\tc <- fmt.Sprintf(\"[√]<%s>找到了UIN: %d\\t\", _hash, i)\n\t\t\t\t\tDoneCount++\n\t\t\t\t\tif DoneCount == len(target) {\n\t\t\t\t\t\tCurrent = TotalCount\n\t\t\t\t\t\tf.sendProgress()\n\t\t\t\t\t\tc <- \"[+]全部爆破完成\\n\"\n\t\t\t\t\t\tclose(c)\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t}\n\t// 完成一个区域的爆破\n\tCalCount++\n\tif CalCount == Counts {\n\t\tc <- \"[+]爆破结束\\n\"\n\t\tclose(c)\n\t}\n}\n\nfunc (f *ForensicsCracker) CrackWXUin(target []string) *CrackResult {\n\t/*\n\t\t@param target:\t用户数据库所在目录，是一个md5哈希值\n\t*/\n\tf.startTime = time.Now()\n\tf.crackCtx, f.crackCancel = context.WithCancel(context.Background())\n\tdefer f.crackCancel()\n\tf.crackResult = &CrackResult{}\n\tc := make(chan string, 1)\n\tvar wg sync.WaitGroup\n\tgo func() {\n\t\tfor i := range c {\n\t\t\tf.crackResult.Result += i + \"\\n\"\n\t\t\tCrackState = f.crackResult.Result\n\t\t\tf.crackResult.Time = time.Since(f.startTime).String()\n\t\t\tf.crackResult.Error = \"\"\n\t\t\tf.sendState()\n\t\t}\n\t\tf.crackCancel()\n\t\truntime.Goexit()\n\t}()\n\tTotalCount = 4_294_967_296\n\tCurrent = 0\n\tFrequency = TotalCount / 1_000\n\n\tfor i := -2147483648; i <= 2147483647; i += 100000000 {\n\t\twg.Add(1)\n\t\tif i+99999999 < 2147483647 {\n\t\t\tgo f.crackUin(target, i, i+99999999, c, f.crackCtx, &wg)\n\t\t} else {\n\t\t\tgo f.crackUin(target, i, 2147483647, c, f.crackCtx, &wg)\n\t\t}\n\t\tCounts++\n\t}\n\twg.Wait()\n\tCurrent = TotalCount\n\tf.sendProgress()\n\tif f.crackResult.Result == \"\" {\n\t\tf.crackResult.Time = time.Since(f.startTime).String()\n\t\tf.crackResult.Error = \"未成功爆破\"\n\t}\n\treturn f.crackResult\n}\n"
  },
  {
    "path": "tools/ip/cz.go",
    "content": "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/go-logger/logger\"\n\t\"github.com/ipipdotnet/ipdb-go\"\n)\n\ntype CZIP struct {\n\tCityName      string `json:\"city_name\"`\n\tContinentCode string `json:\"continent_code\"`\n\tCountryCode   string `json:\"country_code\"`\n\tCountryName   string `json:\"country_name\"`\n\tDistrictName  string `json:\"district_name\"`\n\tISPDomain     string `json:\"isp_domain\"`\n\tOwnerDomain   string `json:\"owner_domain\"`\n\tRegionName    string `json:\"region_name\"`\n\tError         string `json:\"error\"`\n}\n\ntype IP struct {\n\tctx        context.Context\n\tdbPath     string\n\tdb         *ipdb.City\n\tversion    string\n\tnewVersion string\n}\n\nconst tag_api = \"https://api.github.com/repos/nmgliangwei/qqwry.ipdb/tags\"\n\n// db_url gitmirror有时候会抽风没法访问（即使架了梯子）\nconst db_url = \"https://raw.gitmirror.com/nmgliangwei/qqwry.ipdb/main/qqwry.ipdb\"\nconst db_release_url = \"https://github.com/nmgliangwei/qqwry.ipdb/releases/download/%s/qqwry.ipdb\"\nconst (\n\tIPNewVersionEvent    = \"ForensicsTool::IP::NewVersion\"\n\tIPUpdateStartEvent   = \"ForensicsTool::IP::UpdateStart\"\n\tIPUpdateSuccessEvent = \"ForensicsTool::IP::UpdateSuccess\"\n\tIPUpdateErrorEvent   = \"ForensicsTool::IP::UpdateError\"\n)\n\nfunc NewIP() *IP {\n\treturn &IP{dbPath: \"qqwry.ipdb\", newVersion: \"2025-11-19\"}\n}\n\nfunc (i *IP) InitCtx(ctx context.Context) {\n\ti.ctx = ctx\n}\n\n// LoadDB 加载IP库，失败返回错误\nfunc (i *IP) LoadDB() error {\n\tdb, err := ipdb.NewCity(i.dbPath)\n\tif err != nil {\n\t\tlogger.Errorf(\"【IP】加载纯真IP库<%s>失败：%v\", i.dbPath, err)\n\t\treturn err\n\t}\n\n\ti.db = db\n\ti.version = i.db.BuildTime().Format(\"2006-01-02\")\n\tlogger.Debugf(\"【IP】当前纯真IP库版本<%s>\", i.version)\n\treturn nil\n}\n\n// CheckUpdate 检查IP库是否有更新\nfunc (i *IP) CheckUpdate() bool {\n\treq, _ := http.NewRequest(\"GET\", tag_api, nil)\n\tclient := &http.Client{Timeout: 5 * time.Second}\n\tresp, err := client.Do(req)\n\tif err != nil {\n\t\tlogger.Error(\"【IP】查询tag失败\")\n\t\treturn false\n\t}\n\tif resp.StatusCode != http.StatusOK {\n\t\tlogger.Errorf(\"【IP】服务器返回错误: %s\", resp.Status)\n\t\treturn false\n\t}\n\tdefer resp.Body.Close()\n\tvar tags []struct {\n\t\tName string `json:\"name\"`\n\t}\n\n\tif err := json.NewDecoder(resp.Body).Decode(&tags); err != nil {\n\t\treturn false\n\t}\n\n\tif len(tags) == 0 {\n\t\tlogger.Error(\"【IP】获取tag失败\")\n\t\treturn false\n\t}\n\ttag := tags[0].Name\n\n\tif tag != i.version {\n\t\tlogger.Infof(\"【IP】纯真IP库存在新版本：%s\", tag)\n\t\t// runtime.EventsEmit(i.ctx, IPUpdateEvent, tag)\n\t\ti.newVersion = tag\n\t\treturn true\n\t}\n\n\tif i.version == \"\" {\n\t\tlogger.Info(\"【IP】无本地纯真IP库\")\n\t\ti.newVersion = tag\n\t\treturn true\n\t}\n\n\treturn false\n}\n\n// UpdateDB 更新IP库，失败返回错误\nfunc (i *IP) UpdateDB() error {\n\t// runtime.EventsEmit(i.ctx, IPUpdateStartEvent, \"开始下载\")\n\tresp, err := http.Get(fmt.Sprintf(db_release_url, i.newVersion))\n\tif err != nil {\n\t\tlogger.Error(\"【IP】下载纯真IP库失败\")\n\t\t// runtime.EventsEmit(i.ctx, IPUpdateErrorEvent, \"下载失败\")\n\t\treturn err\n\t}\n\tdefer resp.Body.Close()\n\tif resp.StatusCode != http.StatusOK {\n\t\tlogger.Errorf(\"【IP】服务器返回错误: %s\", resp.Status)\n\t\t// runtime.EventsEmit(i.ctx, IPUpdateErrorEvent, fmt.Sprintf(\"服务器返回错误: %s\", resp.Status))\n\t\treturn fmt.Errorf(\"服务器返回错误: %s\", resp.Status)\n\t}\n\tfile, err := os.Create(i.dbPath) //下载到软件根目录\n\tif err != nil {\n\t\tlogger.Errorf(\"【IP】创建文件失败：%v\", err)\n\t\t// runtime.EventsEmit(i.ctx, IPUpdateErrorEvent, fmt.Sprintf(\"【IP】创建文件失败：%v\", err))\n\t\treturn err\n\t}\n\tdefer file.Close()\n\tif _, err := io.Copy(file, resp.Body); err != nil {\n\t\tlogger.Errorf(\"【IP】写入文件失败：%v\", err)\n\t\t// runtime.EventsEmit(i.ctx, IPUpdateErrorEvent, fmt.Sprintf(\"【IP】创建文件失败：%v\", err))\n\t\treturn err\n\t}\n\tlogger.Info(\"【IP】纯真IP库下载成功\")\n\t// runtime.EventsEmit(i.ctx, IPUpdateSuccessEvent, \"下载成功\")\n\treturn nil\n}\n\n// CheckDB 检查纯真IP库是否可用\nfunc (i *IP) CheckDB() error {\n\tfile, err := os.Stat(i.dbPath)\n\tif err != nil {\n\t\tlogger.Errorf(\"【IP】检查纯真IP库<%s>失败：%v\", i.dbPath, err)\n\t\treturn err\n\t}\n\tif file.IsDir() {\n\t\tlogger.Errorf(\"【IP】纯真IP库<%s>不是文件\", i.dbPath)\n\t\treturn err\n\t}\n\tif file.Size() == 0 {\n\t\tlogger.Errorf(\"【IP】纯真IP库<%s>为空\", i.dbPath)\n\t\treturn err\n\t}\n\treturn nil\n}\n\nfunc (i *IP) Search(ip string) *CZIP {\n\tif i.db == nil {\n\t\tlogger.Error(\"【IP】数据库未初始化\")\n\t\treturn &CZIP{Error: \"数据库未初始化\"}\n\t}\n\tipMap, err := i.db.FindMap(ip, \"CN\")\n\tif err != nil {\n\t\tlogger.Errorf(\"【IP】查询纯真IP库失败：%v\", err)\n\t\treturn &CZIP{Error: err.Error()}\n\t}\n\tczip := &CZIP{\n\t\tCityName:      ipMap[\"city_name\"],\n\t\tContinentCode: ipMap[\"continent_code\"],\n\t\tCountryCode:   ipMap[\"country_code\"],\n\t\tCountryName:   ipMap[\"country_name\"],\n\t\tRegionName:    ipMap[\"region_name\"],\n\t\tISPDomain:     ipMap[\"isp_domain\"],\n\t\tDistrictName:  ipMap[\"district_name\"],\n\t\tOwnerDomain:   ipMap[\"owner_domain\"],\n\t}\n\treturn czip\n}\n\nfunc (i *IP) SearchAll(ips []string) map[string]*CZIP {\n\tresults := make(map[string]*CZIP)\n\tvar wg sync.WaitGroup\n\tvar mu sync.Mutex\n\tmaxConcurrent := 10\n\tsemaphore := make(chan struct{}, maxConcurrent)\n\n\tfor _, ip := range ips {\n\t\twg.Add(1)\n\t\tgo func(ipAddr string) {\n\t\t\tdefer wg.Done()\n\t\t\tsemaphore <- struct{}{}\n\t\t\tdefer func() { <-semaphore }()\n\t\t\tresult := i.Search(ipAddr)\n\t\t\tmu.Lock()\n\t\t\tresults[ip] = result\n\t\t\tmu.Unlock()\n\t\t}(ip)\n\t}\n\twg.Wait()\n\treturn results\n}\n"
  },
  {
    "path": "tools/timestamp/time.go",
    "content": "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\tctx context.Context\n}\n\nfunc NewTimeStampParser() *TimeStampParser {\n\treturn &TimeStampParser{}\n}\n\nfunc (p *TimeStampParser) InitCtx(ctx context.Context) {\n\tp.ctx = ctx\n}\n\nfunc (p *TimeStampParser) ParseTimeStamp(timeStamp, oriZone, newZone string) string {\n\tlog.Println(\"timeStamp\", timeStamp)\n\tlog.Println(\"oriZone\", oriZone)\n\tlog.Println(\"newZone\", newZone)\n\tresult := \"\"\n\tfloatTs, err := strconv.ParseFloat(timeStamp, 64)\n\tif err != nil {\n\t\tfloatTs = 0\n\t}\n\ti64Ts, err := strconv.ParseInt(timeStamp, 10, 64)\n\tif err != nil {\n\t\ti64Ts = 0\n\t}\n\tlog.Println(\"floatTs\", floatTs)\n\tlog.Println(\"i64Ts\", i64Ts)\n\tresult += fmt.Sprintf(\"iOS数据库中的时间戳：%s \\n\", utils.IosTimestampToDatetime(floatTs, oriZone, newZone))\n\tresult += fmt.Sprintf(\"AppleAbsoluteTime：%s \\n\", utils.AppleTimestampToDatetime(floatTs, oriZone, newZone))\n\tresult += fmt.Sprintf(\"18位时间戳：%s \\n\", utils.NineTimestampToDatetime(i64Ts, oriZone, newZone))\n\tresult += fmt.Sprintf(\"Chrome/Webkit：%s \\n\", utils.ChromeTimestampToDatetime(i64Ts, oriZone, newZone))\n\tresult += fmt.Sprintf(\"WindowsFileTime：%s \\n\", utils.WindowsFileTimeToDatetime(uint64(i64Ts), oriZone, newZone))\n\tresult += fmt.Sprintf(\"UNIX时间戳：%s \\n\", utils.DefaultTimestampToDatetime(i64Ts, oriZone, newZone))\n\tlog.Println(result)\n\treturn result\n}\n"
  },
  {
    "path": "utils/hash.go",
    "content": "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// HashType 定义哈希算法类型\ntype HashType int\n\nconst (\n\tMD5 HashType = iota\n\tSHA1\n\tSHA256\n)\n\n// Hash 计算输入数据的哈希值\n// 输入可以是字符串或字节数组\n// 返回字节数组\nfunc Hash(data interface{}, hashType HashType) []byte {\n\tvar input []byte\n\n\tswitch v := data.(type) {\n\tcase string:\n\t\tinput = []byte(v)\n\tcase []byte:\n\t\tinput = v\n\tdefault:\n\t\treturn nil\n\t}\n\n\tswitch hashType {\n\tcase MD5:\n\t\th := md5.Sum(input)\n\t\treturn h[:]\n\tcase SHA1:\n\t\th := sha1.Sum(input)\n\t\treturn h[:]\n\tcase SHA256:\n\t\th := sha256.Sum256(input)\n\t\treturn h[:]\n\tdefault:\n\t\treturn nil\n\t}\n}\n\n// HashHex 计算输入数据的哈希值并返回16进制字符串\nfunc HashHex(data interface{}, hashType HashType) string {\n\thashBytes := Hash(data, hashType)\n\treturn hex.EncodeToString(hashBytes)\n}\n\n// 以下是特定算法的快捷函数\n\n// MD5Hash 计算MD5哈希值\nfunc MD5Hash(data interface{}) []byte {\n\treturn Hash(data, MD5)\n}\n\n// MD5HashHex 计算MD5哈希值并返回16进制字符串\nfunc MD5HashHex(data interface{}) string {\n\treturn HashHex(data, MD5)\n}\n\n// SHA1Hash 计算SHA1哈希值\nfunc SHA1Hash(data interface{}) []byte {\n\treturn Hash(data, SHA1)\n}\n\n// SHA1HashHex 计算SHA1哈希值并返回16进制字符串\nfunc SHA1HashHex(data interface{}) string {\n\treturn HashHex(data, SHA1)\n}\n\n// SHA256Hash 计算SHA256哈希值\nfunc SHA256Hash(data interface{}) []byte {\n\treturn Hash(data, SHA256)\n}\n\n// SHA256HashHex 计算SHA256哈希值并返回16进制字符串\nfunc SHA256HashHex(data interface{}) string {\n\treturn HashHex(data, SHA256)\n}\n\nfunc XXHash32(data []byte, seed uint32) uint32 {\n\txxhash32 := xxhash.NewS32(seed)\n\txxhash32.Write(data)\n\treturn xxhash32.Sum32()\n}\n"
  },
  {
    "path": "utils/timestamp.go",
    "content": "package utils\n\nimport (\n\t\"fmt\"\n\t\"strconv\"\n\t\"strings\"\n\t\"time\"\n\t_ \"time/tzdata\"\n)\n\n// timestampToDatetime 将时间转换为指定时区的格式化字符串\nfunc timestampToDatetime(convertedTime time.Time, originTimezone, targetTimezone string) (string, error) {\n\t// 加载原始时区\n\toriginLoc, err := time.LoadLocation(originTimezone)\n\tif err != nil {\n\t\treturn \"\", err\n\t}\n\n\t// 加载目标时区\n\ttargetLoc, err := time.LoadLocation(targetTimezone)\n\tif err != nil {\n\t\treturn \"\", err\n\t}\n\n\t// 将时间转换为原始时区\n\tconvertedTime = convertedTime.In(originLoc)\n\t// 转换为目标时区\n\tconvertedTimeInTarget := convertedTime.In(targetLoc)\n\t// 格式化时间\n\tdateStr := convertedTimeInTarget.Format(\"2006-01-02 15:04:05\")\n\treturn dateStr, nil\n}\n\n// IosTimestampToDatetime 转换iOS时间戳(从2001-01-01开始的秒数)\nfunc IosTimestampToDatetime(timestamp float64, originTimezone, targetTimezone string) string {\n\tif originTimezone == \"\" {\n\t\toriginTimezone = \"UTC\"\n\t}\n\tif targetTimezone == \"\" {\n\t\ttargetTimezone = \"Asia/Shanghai\"\n\t}\n\tbaseTime := time.Date(2001, 1, 1, 0, 0, 0, 0, time.UTC)\n\tduration := time.Duration(timestamp * float64(time.Second))\n\tconvertedTime := baseTime.Add(duration)\n\n\tresult, err := timestampToDatetime(convertedTime, originTimezone, targetTimezone)\n\tif err != nil {\n\t\treturn err.Error()\n\t}\n\treturn result\n}\n\n// DefaultTimestampToDatetime 根据时间戳长度自动判断单位并转换\nfunc DefaultTimestampToDatetime(timestamp int64, originTimezone, targetTimezone string) string {\n\tif originTimezone == \"\" {\n\t\toriginTimezone = \"UTC\"\n\t}\n\tif targetTimezone == \"\" {\n\t\ttargetTimezone = \"Asia/Shanghai\"\n\t}\n\ttStr := strconv.FormatInt(timestamp, 10)\n\ttLength := len(tStr)\n\n\tvar dt time.Time\n\n\tswitch {\n\tcase tLength == 13: // 毫秒\n\t\tdt = time.Unix(timestamp/1000, (timestamp%1000)*int64(time.Millisecond))\n\tcase tLength == 16: // 微秒\n\t\tdt = time.Unix(timestamp/1000000, (timestamp%1000000)*int64(time.Microsecond))\n\tcase tLength == 19: // 纳秒\n\t\tdt = time.Unix(timestamp/1000000000, timestamp%1000000000)\n\tdefault: // 秒\n\t\tdt = time.Unix(timestamp, 0)\n\t}\n\n\tresult, err := timestampToDatetime(dt, originTimezone, targetTimezone)\n\tif err != nil {\n\t\treturn err.Error()\n\t}\n\treturn result\n}\n\n// ChromeTimestampToDatetime 转换Chrome时间戳(从1601-01-01开始的微秒数)\nfunc ChromeTimestampToDatetime(timestamp int64, originTimezone, targetTimezone string) string {\n\tif originTimezone == \"\" {\n\t\toriginTimezone = \"UTC\"\n\t}\n\tif targetTimezone == \"\" {\n\t\ttargetTimezone = \"Asia/Shanghai\"\n\t}\n\tbaseTime := time.Date(1601, 1, 1, 0, 0, 0, 0, time.UTC)\n\tduration := time.Duration(timestamp) * time.Microsecond\n\tconvertedTime := baseTime.Add(duration)\n\n\tresult, err := timestampToDatetime(convertedTime, originTimezone, targetTimezone)\n\tif err != nil {\n\t\treturn err.Error()\n\t}\n\treturn result\n}\n\n// WindowsFileTimeToDatetime 转换Windows文件时间(从1601-01-01开始的100纳秒间隔)\nfunc WindowsFileTimeToDatetime(timestamp uint64, originTimezone, targetTimezone string) string {\n\tif originTimezone == \"\" {\n\t\toriginTimezone = \"UTC\"\n\t}\n\tif targetTimezone == \"\" {\n\t\ttargetTimezone = \"Asia/Shanghai\"\n\t}\n\tbaseTime := time.Date(1601, 1, 1, 0, 0, 0, 0, time.UTC)\n\tduration := time.Duration(timestamp/10) * time.Microsecond\n\tconvertedTime := baseTime\n\tif duration < 0 { //偏移过大，导致溢出变成负值，处理溢出\n\t\tmaxDuration := 1<<63 - 1\n\t\tminDuration := -1 << 63\n\t\tconvertedTime = convertedTime.Add(time.Duration(maxDuration))\n\t\tconvertedTime = convertedTime.Add(duration - time.Duration(minDuration))\n\t} else {\n\t\tconvertedTime = convertedTime.Add(duration)\n\t}\n\tresult, err := timestampToDatetime(convertedTime, originTimezone, targetTimezone)\n\tif err != nil {\n\t\treturn err.Error()\n\t}\n\treturn result\n}\n\n// NineTimestampToDatetime 转换特殊的9位时间戳\nfunc NineTimestampToDatetime(timestamp int64, originTimezone, targetTimezone string) string {\n\tif originTimezone == \"\" {\n\t\toriginTimezone = \"UTC\"\n\t}\n\tif targetTimezone == \"\" {\n\t\ttargetTimezone = \"Asia/Shanghai\"\n\t}\n\tnine := timestamp - 621355968000000000\n\treturn DefaultTimestampToDatetime(nine/10000, originTimezone, targetTimezone)\n}\n\n// AppleTimestampToDatetime 转换Apple时间戳\nfunc AppleTimestampToDatetime(timestamp float64, originTimezone, targetTimezone string) string {\n\tif originTimezone == \"\" {\n\t\toriginTimezone = \"UTC\"\n\t}\n\tif targetTimezone == \"\" {\n\t\ttargetTimezone = \"Asia/Shanghai\"\n\t}\n\ttimestampStr := fmt.Sprintf(\"%.20f\", timestamp)\n\tparts := strings.Split(timestampStr, \".\")\n\tif len(parts) < 1 {\n\t\treturn \"\"\n\t}\n\n\tsecondsStr := parts[0]\n\tif len(secondsStr) < 9 {\n\t\treturn \"\"\n\t}\n\n\tseconds, err := strconv.ParseInt(secondsStr[:9], 10, 64)\n\tif err != nil {\n\t\treturn \"\"\n\t}\n\n\tseconds += 978307200 // 从2001-01-01到1970-01-01的秒数\n\tdt := time.Unix(seconds, 0)\n\n\tresult, err := timestampToDatetime(dt, originTimezone, targetTimezone)\n\tif err != nil {\n\t\treturn err.Error()\n\t}\n\treturn result\n}\n"
  },
  {
    "path": "utils/utf16.go",
    "content": "package utils\n\nimport (\n\t\"encoding/binary\"\n\t\"unicode/utf16\"\n)\n\nfunc UTF16leBytesToString(leBytes []byte) string {\n\tif len(leBytes)%2 != 0 {\n\t\treturn \"\"\n\t}\n\n\tutf16Data := make([]uint16, len(leBytes)/2)\n\tfor i := 0; i < len(utf16Data); i++ {\n\t\tutf16Data[i] = binary.LittleEndian.Uint16(leBytes[i*2:])\n\t}\n\n\treturn string(utf16.Decode(utf16Data))\n}\n"
  },
  {
    "path": "wails.json",
    "content": "{\n  \"$schema\": \"https://wails.io/schemas/config.v2.json\",\n  \"name\": \"ForensicsTool\",\n  \"outputfilename\": \"ForensicsTool\",\n  \"frontend:install\": \"pnpm install\",\n  \"frontend:build\": \"pnpm run build\",\n  \"frontend:dev:watcher\": \"pnpm run dev\",\n  \"frontend:dev:serverUrl\": \"http://localhost:5173\",\n  \"author\": {\n    \"name\": \"WXjzcccc\",\n    \"email\": \"wxjzcroot@gmail.com\"\n  }\n}\n"
  }
]