diff --git a/.directory b/.directory new file mode 100644 index 00000000..cb15c4c3 --- /dev/null +++ b/.directory @@ -0,0 +1,2 @@ +[Desktop Entry] +Icon=/home/vainlystrain/Pictures/VailynIcon111v.png diff --git a/.github/ISSUE_TEMPLATE/bug_report.md b/.github/ISSUE_TEMPLATE/bug_report.md new file mode 100644 index 00000000..f0cbedd3 --- /dev/null +++ b/.github/ISSUE_TEMPLATE/bug_report.md @@ -0,0 +1,35 @@ +--- +name: Bug report +about: Create a report to help us improve +title: '' +labels: bug +assignees: '' + +--- + +**Describe the bug** +A clear and concise description of what the bug is. + +**To Reproduce** +Steps to reproduce the behavior: +1. Go to '...' +2. Click on '....' +3. Scroll down to '....' +4. See error + +**Expected behavior** +A clear and concise description of what you expected to happen. + +**Actual behavior** +A clear and concise description of what happened instead. If applicable, paste logs & error output here. + +**Screenshots** +If applicable, add screenshots to help explain your problem. + +**Specs (please complete the following information):** + - OS: [e.g. Kali Linux] + - Python Version [e.g. 3.8.6] + - TIDoS Version [e.g. 2.0] + +**Additional context** +Add any other context about the problem here. diff --git a/.github/ISSUE_TEMPLATE/feature_request.md b/.github/ISSUE_TEMPLATE/feature_request.md new file mode 100644 index 00000000..e301d68c --- /dev/null +++ b/.github/ISSUE_TEMPLATE/feature_request.md @@ -0,0 +1,20 @@ +--- +name: Feature request +about: Suggest an idea for this project +title: '' +labels: feature request +assignees: '' + +--- + +**Is your feature request related to a problem? Please describe.** +A clear and concise description of what the problem is. Ex. I'm always frustrated when [...] + +**Describe the solution you'd like** +A clear and concise description of what you want to happen. + +**Describe alternatives you've considered** +A clear and concise description of any alternative solutions or features you've considered. + +**Additional context** +Add any other context or screenshots about the feature request here. diff --git a/.travis.yml b/.travis.yml index b6543e9f..573fe6ae 100644 --- a/.travis.yml +++ b/.travis.yml @@ -2,24 +2,21 @@ group: travis_latest language: python cache: pip matrix: - #allow_failures: - # - python: 3.7 include: - - python: 2.7 - #- python: 3.4 - #- python: 3.5 - #- python: 3.6 - # - python: 3.7 - # dist: xenial # required for Python 3.7 (travis-ci/travis-ci#9069) - # sudo: required # required for Python 3.7 (travis-ci/travis-ci#9069) + - python: 3.7 + dist: xenial # required for Python 3.7 (travis-ci/travis-ci#9069) + sudo: required # required for Python 3.7 (travis-ci/travis-ci#9069) + - python: 3.8 + dist: xenial # required for Python 3.7 (travis-ci/travis-ci#9069) + sudo: required # required for Python 3.7 (travis-ci/travis-ci#9069) install: # - pip install -r requirements.txt - pip install flake8 before_script: # stop the build if there are Python syntax errors or undefined names - - flake8 . --count --exclude=./lib --select=E901,E999,F821,F822,F823 --show-source --statistics + - flake8 . --count --exclude=./core/lib --select=E901,E999,F821,F822,F823 --show-source --statistics # exit-zero treats all errors as warnings. The GitHub editor is 127 chars wide - - flake8 . --count --exclude=./lib --exit-zero --max-complexity=10 --max-line-length=127 --statistics + - flake8 . --count --exclude=./core/lib --exit-zero --max-complexity=10 --max-line-length=127 --statistics --quiet script: - true # add other tests here notifications: diff --git a/CHANGELOG b/CHANGELOG deleted file mode 100644 index f2f42af1..00000000 --- a/CHANGELOG +++ /dev/null @@ -1,196 +0,0 @@ - - =============================== - T I D o S F R A M E W O R K - =============================== - - ============ - Changelog: - ============ - - * v0.1.0 - - Just an init to this repository. A long way to go. - - Changelog: - This release features: - - - fl00d - A UDP Flooder (basic). - - gsearch - A google searching facility via console. - - info - A module that displays info about your network. - - webex - A module for determining website status. - - * v0.1.1 - - Small improvements in code. Added a new module. - - Changelog: - This release features a new module. - - - piweb - For pinging websites. - - Separate bug fixes. - - * v0.1.2 - - Added some serious bug fixes occurring at setup.py. That was real quick. - - Changelog: - - This feature includes just some small bug fixes. - - Addition of setup.py file. - - * v1.0.0 - - A comprehensive penetration testing toolkit framework ready. Now on the way to be the best framework ever released. - - Changelog: - - The biggest release till now. - - Total modules now comprise of 73 modules. - - Complete change of interface for easy interactions. - - This is something real. *fire* - - * v1.1.0 - - Small minor additions to the framework. - - Changelog: - - Huge bug fixes. - - Addition of CRLF to VulnLysis - - Proper configuration of the payload database. - - * v1.1.1 - - Addition of modules + bug fixes. - - Changelog: - - Added 3 more brutemods_ modules. - - Bug fix to the main modules. - - Brute database updated with more default protocol changes. - - Addition of pre-config. database. - - * v1.2.0 - - Huge bug fixes + Utility Modules Additions. - - Changelog: - - Bug fixes (huge). - - Added 4 modules to _brutemods_. - - Updates to the payload database + fuzz database. - - Improvements to the cloudflare misconfig. module. - - Operating System Detection Module improved. - - * v1.2.1 - - Major code changes. Improvements to the ActiveRecon modules. (thanks to CodeBy Forum). - - Changlog: - - Added port scan support for OS fingerprinting module. - - Replaced all recursion string collisons. big bug fix - - Added support for minor updates via git pull. - - Added fix to the core end modules. - - * v1.2.2 - - Improvements to the core features. Bug fixes. - - Changelog: - - Added Exception Handling feature globally. - - Improved the crlf module. - - Fixed erring code at Host Header Injection module. - - Updated the payload database with new payloads. - - * v1.3.0 - - Additions to OSINT modules. Improvements to other parts of `ActiveRecon`. - - Changelog: - - Addition and improvements to `ActiveRecon` modules. - - New module added `Web Technology Enumeration`. - - 3 new modules added to `PassiveRecon` modules: - - Enumeration via Google Groups. - - PasteBin Posts Gatherer. - - LinkedIn Gathering. - - * v1.3.1 - - Addition of the new modules + bug fixes. - - Changelog: - - New module added LDAP injection. - - Improvements to the updater module. - - Addition of ldap_payloads at the payload-db. - - Other minor bug fixes. - - * v1.4.0 - - Big release with lots of changes. - - Changelog: - - Addition of 4 major modules under ScanEnum and VulnLysis. - - Addition of HTML Payloads to the database. - - Support for API keys globally. - - Major ImportError bug fixes. - - Re-written 6 major modules for efficiency. - - * v1.5.0 - - Wholesome release with 8 new modules. - - Changelog: - - Addition of 5 new modules under ActiveRecon Phase. - - Addition of 3 new modules under Vulnerability Analysis. - - Bug fixes to the BruteMods module. - - Most of PassiveRecon Phase modules rewritten for the better. - - Lastly, some minor bug fixes and stuff. - - * v1.5.1 - - Small minor release with 5 new modules. - - Changelog: - - Separated the auxillaries from mainstream phase. - - Addition of 2 new modules to auxillaries. - - Addition of 3 new modules under OSINT. - - Minor bug fixes. - - Code optimised for better threading. - - Removal of lots of unnecessary code. - - * v1.5.2 - - Addition of 2 new modules and picks to mainstream framework. - - Changelog: - - TIDoS Framework now boasts of a century of modules. - - A new module added under Passive Recon. - - Full Contact Module saw its final touch. - - Another new module added under Auxillaries. - - Few bug fixes and stuff. - - * v1.6.0 - - Addition of 4 new modules and overall change in build structure to mainstream framework. - - Changelog: - - TIDoS Framework now has a better build infrastructure. - - 2 new module added under ActiveRecon Phase. - - A new module addition to VulnLysis/SerioBugs. - - Another new module got featured in Auxillaries. - - Few bug fixes and stuff. - - * v1.6.1 - - Huge bug fixes + Addition of a new module. - - Changelog: - - A new module added under ScanEnum phase. - - Huge bug fixes to #22. - - TIDoS is now becoming more modular. - - Enhancements to some auxillaries. - - * v1.6.2 [latest release] (#stable) - - Minor release with small bug fixes and module enhncements. - - Changelog: - - Almost 100% code refactors to Information Disclosure modules. - - Efficiency of InfoDisc Phase modules highly uplifted. - - Migration from Python2 to Python3 is on the roll. - - Small bug fixes (as usual). diff --git a/DISCLAIMER b/DISCLAIMER deleted file mode 100644 index 74b12182..00000000 --- a/DISCLAIMER +++ /dev/null @@ -1,22 +0,0 @@ ---------------- -TIDoS Framework ---------------- - -DISCLAIMER ----------- - -TIDoS Framework was provided as an open-source, royalty-free penetration testing toolkit. It has capable -modules in various phases which can unveil potential dangerous flaws in various web-applications which can -further be exploited maliciously. Therefore the author as well as the contrbutors assume no liability for misuse -of this toolkit. Usage of TIDoS Framework for testing or exploiting websites without prior mutual consistency can be -considered as an illegal activity. It is the final user's responsibility to obey all applicable local, state -and federal laws. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED -TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL -THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF -CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS -IN THE SOFTWARE. - -Copyright (C) 2018 by @_tID (https://twitter.com/infecteddrake). - diff --git a/LICENSE b/LICENSE new file mode 100644 index 00000000..f288702d --- /dev/null +++ b/LICENSE @@ -0,0 +1,674 @@ + GNU GENERAL PUBLIC LICENSE + Version 3, 29 June 2007 + + Copyright (C) 2007 Free Software Foundation, Inc. + Everyone is permitted to copy and distribute verbatim copies + of this license document, but changing it is not allowed. + + Preamble + + The GNU General Public License is a free, copyleft license for +software and other kinds of works. + + The licenses for most software and other practical works are designed +to take away your freedom to share and change the works. By contrast, +the GNU General Public License is intended to guarantee your freedom to +share and change all versions of a program--to make sure it remains free +software for all its users. We, the Free Software Foundation, use the +GNU General Public License for most of our software; it applies also to +any other work released this way by its authors. You can apply it to +your programs, too. + + When we speak of free software, we are referring to freedom, not +price. Our General Public Licenses are designed to make sure that you +have the freedom to distribute copies of free software (and charge for +them if you wish), that you receive source code or can get it if you +want it, that you can change the software or use pieces of it in new +free programs, and that you know you can do these things. + + To protect your rights, we need to prevent others from denying you +these rights or asking you to surrender the rights. Therefore, you have +certain responsibilities if you distribute copies of the software, or if +you modify it: responsibilities to respect the freedom of others. + + For example, if you distribute copies of such a program, whether +gratis or for a fee, you must pass on to the recipients the same +freedoms that you received. You must make sure that they, too, receive +or can get the source code. And you must show them these terms so they +know their rights. + + Developers that use the GNU GPL protect your rights with two steps: +(1) assert copyright on the software, and (2) offer you this License +giving you legal permission to copy, distribute and/or modify it. + + For the developers' and authors' protection, the GPL clearly explains +that there is no warranty for this free software. For both users' and +authors' sake, the GPL requires that modified versions be marked as +changed, so that their problems will not be attributed erroneously to +authors of previous versions. + + Some devices are designed to deny users access to install or run +modified versions of the software inside them, although the manufacturer +can do so. This is fundamentally incompatible with the aim of +protecting users' freedom to change the software. The systematic +pattern of such abuse occurs in the area of products for individuals to +use, which is precisely where it is most unacceptable. Therefore, we +have designed this version of the GPL to prohibit the practice for those +products. If such problems arise substantially in other domains, we +stand ready to extend this provision to those domains in future versions +of the GPL, as needed to protect the freedom of users. + + Finally, every program is threatened constantly by software patents. +States should not allow patents to restrict development and use of +software on general-purpose computers, but in those that do, we wish to +avoid the special danger that patents applied to a free program could +make it effectively proprietary. To prevent this, the GPL assures that +patents cannot be used to render the program non-free. + + The precise terms and conditions for copying, distribution and +modification follow. + + TERMS AND CONDITIONS + + 0. Definitions. + + "This License" refers to version 3 of the GNU General Public License. + + "Copyright" also means copyright-like laws that apply to other kinds of +works, such as semiconductor masks. + + "The Program" refers to any copyrightable work licensed under this +License. Each licensee is addressed as "you". "Licensees" and +"recipients" may be individuals or organizations. + + To "modify" a work means to copy from or adapt all or part of the work +in a fashion requiring copyright permission, other than the making of an +exact copy. The resulting work is called a "modified version" of the +earlier work or a work "based on" the earlier work. + + A "covered work" means either the unmodified Program or a work based +on the Program. + + To "propagate" a work means to do anything with it that, without +permission, would make you directly or secondarily liable for +infringement under applicable copyright law, except executing it on a +computer or modifying a private copy. Propagation includes copying, +distribution (with or without modification), making available to the +public, and in some countries other activities as well. + + To "convey" a work means any kind of propagation that enables other +parties to make or receive copies. Mere interaction with a user through +a computer network, with no transfer of a copy, is not conveying. + + An interactive user interface displays "Appropriate Legal Notices" +to the extent that it includes a convenient and prominently visible +feature that (1) displays an appropriate copyright notice, and (2) +tells the user that there is no warranty for the work (except to the +extent that warranties are provided), that licensees may convey the +work under this License, and how to view a copy of this License. If +the interface presents a list of user commands or options, such as a +menu, a prominent item in the list meets this criterion. + + 1. Source Code. + + The "source code" for a work means the preferred form of the work +for making modifications to it. "Object code" means any non-source +form of a work. + + A "Standard Interface" means an interface that either is an official +standard defined by a recognized standards body, or, in the case of +interfaces specified for a particular programming language, one that +is widely used among developers working in that language. + + The "System Libraries" of an executable work include anything, other +than the work as a whole, that (a) is included in the normal form of +packaging a Major Component, but which is not part of that Major +Component, and (b) serves only to enable use of the work with that +Major Component, or to implement a Standard Interface for which an +implementation is available to the public in source code form. A +"Major Component", in this context, means a major essential component +(kernel, window system, and so on) of the specific operating system +(if any) on which the executable work runs, or a compiler used to +produce the work, or an object code interpreter used to run it. + + The "Corresponding Source" for a work in object code form means all +the source code needed to generate, install, and (for an executable +work) run the object code and to modify the work, including scripts to +control those activities. However, it does not include the work's +System Libraries, or general-purpose tools or generally available free +programs which are used unmodified in performing those activities but +which are not part of the work. For example, Corresponding Source +includes interface definition files associated with source files for +the work, and the source code for shared libraries and dynamically +linked subprograms that the work is specifically designed to require, +such as by intimate data communication or control flow between those +subprograms and other parts of the work. + + The Corresponding Source need not include anything that users +can regenerate automatically from other parts of the Corresponding +Source. + + The Corresponding Source for a work in source code form is that +same work. + + 2. Basic Permissions. + + All rights granted under this License are granted for the term of +copyright on the Program, and are irrevocable provided the stated +conditions are met. This License explicitly affirms your unlimited +permission to run the unmodified Program. The output from running a +covered work is covered by this License only if the output, given its +content, constitutes a covered work. This License acknowledges your +rights of fair use or other equivalent, as provided by copyright law. + + You may make, run and propagate covered works that you do not +convey, without conditions so long as your license otherwise remains +in force. You may convey covered works to others for the sole purpose +of having them make modifications exclusively for you, or provide you +with facilities for running those works, provided that you comply with +the terms of this License in conveying all material for which you do +not control copyright. Those thus making or running the covered works +for you must do so exclusively on your behalf, under your direction +and control, on terms that prohibit them from making any copies of +your copyrighted material outside their relationship with you. + + Conveying under any other circumstances is permitted solely under +the conditions stated below. Sublicensing is not allowed; section 10 +makes it unnecessary. + + 3. Protecting Users' Legal Rights From Anti-Circumvention Law. + + No covered work shall be deemed part of an effective technological +measure under any applicable law fulfilling obligations under article +11 of the WIPO copyright treaty adopted on 20 December 1996, or +similar laws prohibiting or restricting circumvention of such +measures. + + When you convey a covered work, you waive any legal power to forbid +circumvention of technological measures to the extent such circumvention +is effected by exercising rights under this License with respect to +the covered work, and you disclaim any intention to limit operation or +modification of the work as a means of enforcing, against the work's +users, your or third parties' legal rights to forbid circumvention of +technological measures. + + 4. Conveying Verbatim Copies. + + You may convey verbatim copies of the Program's source code as you +receive it, in any medium, provided that you conspicuously and +appropriately publish on each copy an appropriate copyright notice; +keep intact all notices stating that this License and any +non-permissive terms added in accord with section 7 apply to the code; +keep intact all notices of the absence of any warranty; and give all +recipients a copy of this License along with the Program. + + You may charge any price or no price for each copy that you convey, +and you may offer support or warranty protection for a fee. + + 5. Conveying Modified Source Versions. + + You may convey a work based on the Program, or the modifications to +produce it from the Program, in the form of source code under the +terms of section 4, provided that you also meet all of these conditions: + + a) The work must carry prominent notices stating that you modified + it, and giving a relevant date. + + b) The work must carry prominent notices stating that it is + released under this License and any conditions added under section + 7. This requirement modifies the requirement in section 4 to + "keep intact all notices". + + c) You must license the entire work, as a whole, under this + License to anyone who comes into possession of a copy. This + License will therefore apply, along with any applicable section 7 + additional terms, to the whole of the work, and all its parts, + regardless of how they are packaged. This License gives no + permission to license the work in any other way, but it does not + invalidate such permission if you have separately received it. + + d) If the work has interactive user interfaces, each must display + Appropriate Legal Notices; however, if the Program has interactive + interfaces that do not display Appropriate Legal Notices, your + work need not make them do so. + + A compilation of a covered work with other separate and independent +works, which are not by their nature extensions of the covered work, +and which are not combined with it such as to form a larger program, +in or on a volume of a storage or distribution medium, is called an +"aggregate" if the compilation and its resulting copyright are not +used to limit the access or legal rights of the compilation's users +beyond what the individual works permit. Inclusion of a covered work +in an aggregate does not cause this License to apply to the other +parts of the aggregate. + + 6. Conveying Non-Source Forms. + + You may convey a covered work in object code form under the terms +of sections 4 and 5, provided that you also convey the +machine-readable Corresponding Source under the terms of this License, +in one of these ways: + + a) Convey the object code in, or embodied in, a physical product + (including a physical distribution medium), accompanied by the + Corresponding Source fixed on a durable physical medium + customarily used for software interchange. + + b) Convey the object code in, or embodied in, a physical product + (including a physical distribution medium), accompanied by a + written offer, valid for at least three years and valid for as + long as you offer spare parts or customer support for that product + model, to give anyone who possesses the object code either (1) a + copy of the Corresponding Source for all the software in the + product that is covered by this License, on a durable physical + medium customarily used for software interchange, for a price no + more than your reasonable cost of physically performing this + conveying of source, or (2) access to copy the + Corresponding Source from a network server at no charge. + + c) Convey individual copies of the object code with a copy of the + written offer to provide the Corresponding Source. This + alternative is allowed only occasionally and noncommercially, and + only if you received the object code with such an offer, in accord + with subsection 6b. + + d) Convey the object code by offering access from a designated + place (gratis or for a charge), and offer equivalent access to the + Corresponding Source in the same way through the same place at no + further charge. You need not require recipients to copy the + Corresponding Source along with the object code. If the place to + copy the object code is a network server, the Corresponding Source + may be on a different server (operated by you or a third party) + that supports equivalent copying facilities, provided you maintain + clear directions next to the object code saying where to find the + Corresponding Source. Regardless of what server hosts the + Corresponding Source, you remain obligated to ensure that it is + available for as long as needed to satisfy these requirements. + + e) Convey the object code using peer-to-peer transmission, provided + you inform other peers where the object code and Corresponding + Source of the work are being offered to the general public at no + charge under subsection 6d. + + A separable portion of the object code, whose source code is excluded +from the Corresponding Source as a System Library, need not be +included in conveying the object code work. + + A "User Product" is either (1) a "consumer product", which means any +tangible personal property which is normally used for personal, family, +or household purposes, or (2) anything designed or sold for incorporation +into a dwelling. In determining whether a product is a consumer product, +doubtful cases shall be resolved in favor of coverage. For a particular +product received by a particular user, "normally used" refers to a +typical or common use of that class of product, regardless of the status +of the particular user or of the way in which the particular user +actually uses, or expects or is expected to use, the product. A product +is a consumer product regardless of whether the product has substantial +commercial, industrial or non-consumer uses, unless such uses represent +the only significant mode of use of the product. + + "Installation Information" for a User Product means any methods, +procedures, authorization keys, or other information required to install +and execute modified versions of a covered work in that User Product from +a modified version of its Corresponding Source. The information must +suffice to ensure that the continued functioning of the modified object +code is in no case prevented or interfered with solely because +modification has been made. + + If you convey an object code work under this section in, or with, or +specifically for use in, a User Product, and the conveying occurs as +part of a transaction in which the right of possession and use of the +User Product is transferred to the recipient in perpetuity or for a +fixed term (regardless of how the transaction is characterized), the +Corresponding Source conveyed under this section must be accompanied +by the Installation Information. But this requirement does not apply +if neither you nor any third party retains the ability to install +modified object code on the User Product (for example, the work has +been installed in ROM). + + The requirement to provide Installation Information does not include a +requirement to continue to provide support service, warranty, or updates +for a work that has been modified or installed by the recipient, or for +the User Product in which it has been modified or installed. Access to a +network may be denied when the modification itself materially and +adversely affects the operation of the network or violates the rules and +protocols for communication across the network. + + Corresponding Source conveyed, and Installation Information provided, +in accord with this section must be in a format that is publicly +documented (and with an implementation available to the public in +source code form), and must require no special password or key for +unpacking, reading or copying. + + 7. Additional Terms. + + "Additional permissions" are terms that supplement the terms of this +License by making exceptions from one or more of its conditions. +Additional permissions that are applicable to the entire Program shall +be treated as though they were included in this License, to the extent +that they are valid under applicable law. If additional permissions +apply only to part of the Program, that part may be used separately +under those permissions, but the entire Program remains governed by +this License without regard to the additional permissions. + + When you convey a copy of a covered work, you may at your option +remove any additional permissions from that copy, or from any part of +it. (Additional permissions may be written to require their own +removal in certain cases when you modify the work.) You may place +additional permissions on material, added by you to a covered work, +for which you have or can give appropriate copyright permission. + + Notwithstanding any other provision of this License, for material you +add to a covered work, you may (if authorized by the copyright holders of +that material) supplement the terms of this License with terms: + + a) Disclaiming warranty or limiting liability differently from the + terms of sections 15 and 16 of this License; or + + b) Requiring preservation of specified reasonable legal notices or + author attributions in that material or in the Appropriate Legal + Notices displayed by works containing it; or + + c) Prohibiting misrepresentation of the origin of that material, or + requiring that modified versions of such material be marked in + reasonable ways as different from the original version; or + + d) Limiting the use for publicity purposes of names of licensors or + authors of the material; or + + e) Declining to grant rights under trademark law for use of some + trade names, trademarks, or service marks; or + + f) Requiring indemnification of licensors and authors of that + material by anyone who conveys the material (or modified versions of + it) with contractual assumptions of liability to the recipient, for + any liability that these contractual assumptions directly impose on + those licensors and authors. + + All other non-permissive additional terms are considered "further +restrictions" within the meaning of section 10. If the Program as you +received it, or any part of it, contains a notice stating that it is +governed by this License along with a term that is a further +restriction, you may remove that term. If a license document contains +a further restriction but permits relicensing or conveying under this +License, you may add to a covered work material governed by the terms +of that license document, provided that the further restriction does +not survive such relicensing or conveying. + + If you add terms to a covered work in accord with this section, you +must place, in the relevant source files, a statement of the +additional terms that apply to those files, or a notice indicating +where to find the applicable terms. + + Additional terms, permissive or non-permissive, may be stated in the +form of a separately written license, or stated as exceptions; +the above requirements apply either way. + + 8. Termination. + + You may not propagate or modify a covered work except as expressly +provided under this License. Any attempt otherwise to propagate or +modify it is void, and will automatically terminate your rights under +this License (including any patent licenses granted under the third +paragraph of section 11). + + However, if you cease all violation of this License, then your +license from a particular copyright holder is reinstated (a) +provisionally, unless and until the copyright holder explicitly and +finally terminates your license, and (b) permanently, if the copyright +holder fails to notify you of the violation by some reasonable means +prior to 60 days after the cessation. + + Moreover, your license from a particular copyright holder is +reinstated permanently if the copyright holder notifies you of the +violation by some reasonable means, this is the first time you have +received notice of violation of this License (for any work) from that +copyright holder, and you cure the violation prior to 30 days after +your receipt of the notice. + + Termination of your rights under this section does not terminate the +licenses of parties who have received copies or rights from you under +this License. If your rights have been terminated and not permanently +reinstated, you do not qualify to receive new licenses for the same +material under section 10. + + 9. Acceptance Not Required for Having Copies. + + You are not required to accept this License in order to receive or +run a copy of the Program. Ancillary propagation of a covered work +occurring solely as a consequence of using peer-to-peer transmission +to receive a copy likewise does not require acceptance. However, +nothing other than this License grants you permission to propagate or +modify any covered work. These actions infringe copyright if you do +not accept this License. Therefore, by modifying or propagating a +covered work, you indicate your acceptance of this License to do so. + + 10. Automatic Licensing of Downstream Recipients. + + Each time you convey a covered work, the recipient automatically +receives a license from the original licensors, to run, modify and +propagate that work, subject to this License. You are not responsible +for enforcing compliance by third parties with this License. + + An "entity transaction" is a transaction transferring control of an +organization, or substantially all assets of one, or subdividing an +organization, or merging organizations. If propagation of a covered +work results from an entity transaction, each party to that +transaction who receives a copy of the work also receives whatever +licenses to the work the party's predecessor in interest had or could +give under the previous paragraph, plus a right to possession of the +Corresponding Source of the work from the predecessor in interest, if +the predecessor has it or can get it with reasonable efforts. + + You may not impose any further restrictions on the exercise of the +rights granted or affirmed under this License. For example, you may +not impose a license fee, royalty, or other charge for exercise of +rights granted under this License, and you may not initiate litigation +(including a cross-claim or counterclaim in a lawsuit) alleging that +any patent claim is infringed by making, using, selling, offering for +sale, or importing the Program or any portion of it. + + 11. Patents. + + A "contributor" is a copyright holder who authorizes use under this +License of the Program or a work on which the Program is based. The +work thus licensed is called the contributor's "contributor version". + + A contributor's "essential patent claims" are all patent claims +owned or controlled by the contributor, whether already acquired or +hereafter acquired, that would be infringed by some manner, permitted +by this License, of making, using, or selling its contributor version, +but do not include claims that would be infringed only as a +consequence of further modification of the contributor version. For +purposes of this definition, "control" includes the right to grant +patent sublicenses in a manner consistent with the requirements of +this License. + + Each contributor grants you a non-exclusive, worldwide, royalty-free +patent license under the contributor's essential patent claims, to +make, use, sell, offer for sale, import and otherwise run, modify and +propagate the contents of its contributor version. + + In the following three paragraphs, a "patent license" is any express +agreement or commitment, however denominated, not to enforce a patent +(such as an express permission to practice a patent or covenant not to +sue for patent infringement). To "grant" such a patent license to a +party means to make such an agreement or commitment not to enforce a +patent against the party. + + If you convey a covered work, knowingly relying on a patent license, +and the Corresponding Source of the work is not available for anyone +to copy, free of charge and under the terms of this License, through a +publicly available network server or other readily accessible means, +then you must either (1) cause the Corresponding Source to be so +available, or (2) arrange to deprive yourself of the benefit of the +patent license for this particular work, or (3) arrange, in a manner +consistent with the requirements of this License, to extend the patent +license to downstream recipients. "Knowingly relying" means you have +actual knowledge that, but for the patent license, your conveying the +covered work in a country, or your recipient's use of the covered work +in a country, would infringe one or more identifiable patents in that +country that you have reason to believe are valid. + + If, pursuant to or in connection with a single transaction or +arrangement, you convey, or propagate by procuring conveyance of, a +covered work, and grant a patent license to some of the parties +receiving the covered work authorizing them to use, propagate, modify +or convey a specific copy of the covered work, then the patent license +you grant is automatically extended to all recipients of the covered +work and works based on it. + + A patent license is "discriminatory" if it does not include within +the scope of its coverage, prohibits the exercise of, or is +conditioned on the non-exercise of one or more of the rights that are +specifically granted under this License. You may not convey a covered +work if you are a party to an arrangement with a third party that is +in the business of distributing software, under which you make payment +to the third party based on the extent of your activity of conveying +the work, and under which the third party grants, to any of the +parties who would receive the covered work from you, a discriminatory +patent license (a) in connection with copies of the covered work +conveyed by you (or copies made from those copies), or (b) primarily +for and in connection with specific products or compilations that +contain the covered work, unless you entered into that arrangement, +or that patent license was granted, prior to 28 March 2007. + + Nothing in this License shall be construed as excluding or limiting +any implied license or other defenses to infringement that may +otherwise be available to you under applicable patent law. + + 12. No Surrender of Others' Freedom. + + If conditions are imposed on you (whether by court order, agreement or +otherwise) that contradict the conditions of this License, they do not +excuse you from the conditions of this License. If you cannot convey a +covered work so as to satisfy simultaneously your obligations under this +License and any other pertinent obligations, then as a consequence you may +not convey it at all. For example, if you agree to terms that obligate you +to collect a royalty for further conveying from those to whom you convey +the Program, the only way you could satisfy both those terms and this +License would be to refrain entirely from conveying the Program. + + 13. Use with the GNU Affero General Public License. + + Notwithstanding any other provision of this License, you have +permission to link or combine any covered work with a work licensed +under version 3 of the GNU Affero General Public License into a single +combined work, and to convey the resulting work. The terms of this +License will continue to apply to the part which is the covered work, +but the special requirements of the GNU Affero General Public License, +section 13, concerning interaction through a network will apply to the +combination as such. + + 14. Revised Versions of this License. + + The Free Software Foundation may publish revised and/or new versions of +the GNU General Public License from time to time. Such new versions will +be similar in spirit to the present version, but may differ in detail to +address new problems or concerns. + + Each version is given a distinguishing version number. If the +Program specifies that a certain numbered version of the GNU General +Public License "or any later version" applies to it, you have the +option of following the terms and conditions either of that numbered +version or of any later version published by the Free Software +Foundation. If the Program does not specify a version number of the +GNU General Public License, you may choose any version ever published +by the Free Software Foundation. + + If the Program specifies that a proxy can decide which future +versions of the GNU General Public License can be used, that proxy's +public statement of acceptance of a version permanently authorizes you +to choose that version for the Program. + + Later license versions may give you additional or different +permissions. However, no additional obligations are imposed on any +author or copyright holder as a result of your choosing to follow a +later version. + + 15. Disclaimer of Warranty. + + THERE IS NO WARRANTY FOR THE PROGRAM, TO THE EXTENT PERMITTED BY +APPLICABLE LAW. EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT +HOLDERS AND/OR OTHER PARTIES PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY +OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, +THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR +PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE PROGRAM +IS WITH YOU. SHOULD THE PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF +ALL NECESSARY SERVICING, REPAIR OR CORRECTION. + + 16. Limitation of Liability. + + IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING +WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MODIFIES AND/OR CONVEYS +THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, INCLUDING ANY +GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING OUT OF THE +USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED TO LOSS OF +DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD +PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER PROGRAMS), +EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF +SUCH DAMAGES. + + 17. Interpretation of Sections 15 and 16. + + If the disclaimer of warranty and limitation of liability provided +above cannot be given local legal effect according to their terms, +reviewing courts shall apply local law that most closely approximates +an absolute waiver of all civil liability in connection with the +Program, unless a warranty or assumption of liability accompanies a +copy of the Program in return for a fee. + + END OF TERMS AND CONDITIONS + + How to Apply These Terms to Your New Programs + + If you develop a new program, and you want it to be of the greatest +possible use to the public, the best way to achieve this is to make it +free software which everyone can redistribute and change under these terms. + + To do so, attach the following notices to the program. It is safest +to attach them to the start of each source file to most effectively +state the exclusion of warranty; and each file should have at least +the "copyright" line and a pointer to where the full notice is found. + + + Copyright (C) + + This program is free software: you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation, either version 3 of the License, or + (at your option) any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this program. If not, see . + +Also add information on how to contact you by electronic and paper mail. + + If the program does terminal interaction, make it output a short +notice like this when it starts in an interactive mode: + + Copyright (C) + This program comes with ABSOLUTELY NO WARRANTY; for details type `show w'. + This is free software, and you are welcome to redistribute it + under certain conditions; type `show c' for details. + +The hypothetical commands `show w' and `show c' should show the appropriate +parts of the General Public License. Of course, your program's commands +might be different; for a GUI interface, you would use an "about box". + + You should also get your employer (if you work as a programmer) or school, +if any, to sign a "copyright disclaimer" for the program, if necessary. +For more information on this, and how to apply and follow the GNU GPL, see +. + + The GNU General Public License does not permit incorporating your program +into proprietary programs. If your program is a subroutine library, you +may consider it more useful to permit linking proprietary applications with +the library. If this is what you want to do, use the GNU Lesser General +Public License instead of this License. But first, please read +. diff --git a/README.md b/README.md index 25143744..50297bd8 100644 --- a/README.md +++ b/README.md @@ -1,117 +1,159 @@

-
- TIDoS -
- The TIDoS Framework +
+ TIDoS

-

The Offensive Web Application Penetration Testing Framework.

-

- - - - - - - - - - - - - - - - - - - - - - - + + + + +
+ The Offensive Web Application Penetration Testing Framework.

+> __IMPORTANT__: +> +> The new Qt5 interface is complete, but has additional dependencies. Take a look at the updated installation instructions. + ### Highlights :- Here is some light on what the framework is all about: -- [x] TIDoS Framework now boasts of a century+ of modules. -- [x] A complete versatile framework to cover up everything from Reconnaissance to Vulnerability Analysis. -- [x] Has 5 main phases, subdivided into __14 sub-phases__ consisting a total of __108 modules__. -- [x] Reconnaissance Phase has 50 modules of its own (including active and passive recon, information disclosure modules). -- [x] Scanning & Enumeration Phase has got 16 modules (including port scans, WAF analysis, etc) -- [x] Vulnerability Analysis Phase has 37 modules (including most common vulnerabilites in action). -- [x] Exploits Castle has only 1 exploit. `(purely developmental)` -- [x] And finally, Auxillaries have got 4 modules. `more under development` -- [x] All four phases each have a `Auto-Awesome` module which automates every module for you. -- [x] You just need the domain, and leave everything is to this tool. -- [x] TIDoS has full verbose out support, so you'll know whats going on. -- [x] Fully user friendly interaction environment. `(no shits)` - - +- A complete versatile framework to cover up everything from Reconnaissance to Vulnerability Analysis. +- Has 5 main phases, subdivided into __14 sub-phases__ consisting a total of __108 modules__. +- Reconnaissance Phase has 50 modules of its own (including active and passive recon, information disclosure modules). +- Scanning & Enumeration Phase has got 16 modules (including port scans, WAF analysis, etc) +- Vulnerability Analysis Phase has 37 modules (including most common vulnerabilities in action). +- Exploits Castle has only 1 exploit. `(purely developmental)` +- And finally, Auxiliaries have got 4 modules. `more under development` +- All four phases each have an `Auto-Awesome` module which automates every module for you. +- huge performance boost through multiprocessing +- Piping Attacks through Tor (not implemented everywhere yet) +- You just need the domain, and leave everything is to this tool. +- TIDoS has full verbose out support, so you'll know whats going on. +- Attacking now even easier with a new GUI + +### Main new features +- the programming language: TIDoS is fully ported to Python3 +- the interface: TIDoS presents a new, Metasploit-like console interface +- Parallelisation: TIDoS uses multiprocessing to speed up attacks +- An alternative CLI interface for faster interaction with one specific module +- Anonymity: Attacking through Tor is possible (95% done) +- Module Completion: Some modules have been feature-extended (e.g. more evasion, supporting more than 1 query parameter) +- Some new modules: arpscan +- A Graphical User Interface for easier interaction with the toolkit +- Supports non-default http(s) ports + +### Upcoming +- results of modules will be stored in a database +- new modules: nikto&photon ### Installation :- -#### Global Installation: +#### Installation Script (Globally) : -> NOTE: For installing globally, you will need to default your Python version to 2.x. +To install the framework globally in /opt, run the provided `core/install.py` script as root. After this, you can launch TIDoS simply by typing `tidos` on the command line. + +#### Manual Installation (Locally) : * Clone the repository locally and navigate there: ``` -git clone https://github.com/theinfecteddrake/tidos-framework.git +git clone https://github.com/0xinfection/tidos-framework.git cd tidos-framework ``` -* Install the dependencies: + +TIDoS needs some libraries to run, which can be installed via `aptitude` or `dnf` Package Managers. +``` +sudo apt-get install libncurses5 libxml2 nmap tcpdump libexiv2-dev build-essential python3-pip libmariadbclient18 libmysqlclient-dev tor konsole +``` +Now after these dependencies are finished installing, we need to install the remaining Python Package dependencies, hence run: ``` -chmod +x install -./install +pip3 install -r requirements.txt ``` - -Thats it! Now you are good to go! Now lets run the tool: +TIDoS uses Vailyn to scan for path traversals in a new, improved path traversal module. If you want to use that module, head to `https://github.com/VainlyStrain/Vailyn`, and follow the installation instructions there. + +Thats it. You now have TIDoS at your service. Fire it up using: ``` -tidos +python3 tidv2 #Qt5 interface +sudo python3 tidconsole.py #console interface ``` -#### Manual Installation (Locally) : +#### Docker image : -TIDoS needs some libraries to run, which can be installed via `aptitude` or `yum` Package Managers. +You can build it from Dockerfile : ``` -sudo apt-get install libncurses5 libxml2 nmap tcpdump scons libexiv2-dev python-pyexiv2 build-essential python-pip default-libmysqlclient-dev python-xmpp +git clone https://github.com/0xinfection/tidos-framework.git +cd tidos-framework/core/docker +docker build -t tidos . ``` -Now after these dependencies are finished installing, we need to install the remaining Python Package dependencies, hence run: + +To run TIDoS : + ``` -pip2 install -r requirements.txt +docker run --interactive --tty --rm tidos bash +tidos ``` -Thats it, You now have TIDoS at your service. Fire it up using: + +Update: TIDoS is now available on Docker Hub. Install and run the container like this: + ``` -python2 tidos.py +docker run -it vainlystrain/tidos-framework ``` -### Getting Started :- +#### Updating TIDoS : -TIDoS is built to be a comprehensive, flexible and versatile framework where you just have to select and use modules. +To get the current version of TIDoS, move into the installation folder and perform `(sudo) git pull #sudo if installed by install.py`. Alternatively, you can run the `fetch` command in tidconsole. -So to get started, you need to set your own `API KEYS` for various OSINT & Scanning and Enumeration purposes. To do so, open up `API_KEYS.py` under `files/` directory and set your own keys and access tokens for `SHODAN`, `CENSYS`, `FULL CONTACT`, `GOOGLE` and `WHATCMS`. Public `API KEYS` and `ACCESS TOKENS` for `SHODAN` and `WHATCMS` have been provided with the TIDoS release itself. You can still add your own... `no harm!` +### Getting Started :- -Finally, as the framework opens up, enter the website name `eg. http://www.example.com` and let TIDoS lead you. Thats it! Its as easy as that. +To get started, you need to set your own `API KEYS` for various OSINT & Scanning and Enumeration purposes. To do so, open up `API_KEYS.py` under `files/` directory and set your own keys and access tokens for `SHODAN`, `CENSYS`, `FULL CONTACT`, `GOOGLE` and `WHATCMS`. -> Recommended: -> - Follow the order of the tool (Run in a schematic way). +> __GOOD NEWS__: > -> `Reconnaissance ➣ Scanning & Enumeration ➣ Vulnerability Analysis` +> The latest release of TIDoS includes all API KEYS and ACCESS TOKENS for `SHODAN`, `CENSYS`, `FULL CONTACT`, `GOOGLE` and `WHATCMS` by default. I found these tokens on various repositories on GitHub itself. __You can now use all the modules__ which use the API KEYS. :) -To update this tool, use `tidos_updater.py` module under `tools/` folder. +#### Commands :- + +``` +__ __ + ! attack Attack specified target(s) M + : clear Clear terminal. : + V creds Handle target credentials. + : fetch Check for and install updates. : + : find Search a module. : + help Show help message. : + info Show description of current module. M + : intro Display Intro. : + : leave Leave module. M + list List all modules of a category. : + : load Load module. : + : netinfo Show network information. : + : opts Show options of current module. M + phpsploit Load the phpsploit framework. : + (needs to be downloaded externally) + : processes Set number of processes in parallelis. : + q Terminate TIDoS session. : + : sessions Interact with cached sessions. : + : set Set option value of module. M + : tor Pipe Attacks through the Tor Network. : + vicadd Add Target to list. : + vicdel Delete Target from list. : + viclist List all targets. : + + Avail. Cmds + M needs loaded modvle + V [! potentially] need loaded target(s) +``` ### Flawless Features :- -TIDoS Framework presently supports the following: `and more modules are under active development` +TIDoS presently supports the following: `and more modules are under active development` * __Reconnaissance + OSINT__ - + Passive Reconnaissance: + + __Passive Reconnaissance:__ - Nping Enumeration `Via external APi` - WhoIS Lookup `Domain info gathering` - GeoIP Lookup `Pinpoint physical location` @@ -136,7 +178,7 @@ TIDoS Framework presently supports the following: `and more modules are under ac - Censys Intel Gathering `Domain Based` - Threat Intelligence Gathering `Bad IPs` - + Active Reconnaissance + + __Active Reconnaissance:__ - Ping Enumeration `Advanced` - CMS Detection `(185+ CMSs supported)` `IMPROVED` - Advanced Traceroute `IMPROVED` @@ -160,7 +202,7 @@ TIDoS Framework presently supports the following: `and more modules are under ac - Common Dot Files `.htaccess, .apache, etc` - Common Logfile Locations `.log, .changelog, etc` - + Information Disclosure + + __Information Disclosure:__ - Credit Cards Disclosure `If Plaintext` - Email Harvester `IMPROVED` - Fatal Errors Enumeration `Includes Full Path Disclosure` @@ -188,8 +230,9 @@ TIDoS Framework presently supports the following: `and more modules are under ac - Depth 1 `Indexed Uri Crawler` - Depth 2 `Single Page Crawler` - Depth 3 `Web Link Crawler` + + ARP Scanner `NEW` -+ __Vulnerability Analysis__ +* __Vulnerability Analysis__ __Web-Bugs & Server Misconfigurations__ @@ -227,7 +270,7 @@ TIDoS Framework presently supports the following: `and more modules are under ac - Parameter Based - Pre-loaded Path Based + OS Command Injection `Linux & Windows (RCE)` - + Path Traversal `(Sensitive Paths)` + + Path Traversal `ENHANCED` + Cross-Site Request Forgery `Absolute` + SQL Injection + Error Based Injection @@ -267,7 +310,7 @@ TIDoS Framework presently supports the following: `and more modules are under ac - SSH Protocol Bruteforce - POP 2/3 Protocol Bruteforce - SQL Protocol Bruteforce - - XMPP Protocol Bruteforce + - (XMPP Protocol Bruteforce) `BROKEN:DEP` - SMTP Protocol Bruteforce - TELNET Protocol Bruteforce @@ -283,63 +326,22 @@ TIDoS Framework presently supports the following: `and more modules are under ac + ShellShock ### Other Tools: -- `net_info.py` - Displays information about your network. Located under `tools/`. -- `tidos_updater.py` - Updates the framework to the latest release via signature matching. Located under `tools/`. +- `net_info.py` - Displays information about your network. Accessible from 'netinfo' command. ### TIDoS In Action: -Lets see some screenshots of TIDoS in real world pentesting action: - - - - - - +Lets see a demonstration of TIDoS in action: - - - +[![asciicast](https://asciinema.org/a/359477.svg)](https://asciinema.org/a/359477) ### Version: ``` -v1.6.2 [latest release] [#stable] +v2.0.1-5 [latest release] [#beta] ``` -### Upcoming: - -These are some modules which I have thought of adding: -- Some more of Enumeraton & Information Disclosure modules. -- Lots more of OSINT & Stuff (let that be a suspense). -- More of Auxillary Modules. -- Some Exploits are too being worked on. - -### Ongoing: - -- Working on a full-featured Web UI implementation on Flask and MongoDB and Node.js. -- Working on a new framework, a real framework. `To be released with v2` -- Working on a campaign feature + addition of arguments. -- Normal Bug Fixing Stuffs. `As per the issues being raised` -- Some other perks: - - Working on a way for contributing new modules easily. - - A complete new method of multi-threaded fuzzing of parameters. - - Keeping better of new console stuff. - ### Disclaimer: -TIDoS is provided as a offensive web application audit framework. It has built-in modules which can reveal potential misconfigurations and vulnerabilties in web applications which could possibly be exploited maliciously. - -__THEREFORE, THE AUTHOR AND NEITHER THE CONTRIBUTORS ARE NOT EXCLUSIVELY RESPONSIBLE FOR ANY MISUSE OR DAMAGE DUE TO THIS TOOLKIT.__ - -### Final Words: - -This project is a very fresh and new project which just simply springed off my mind, and is presently under active development so you may want to put it on a watch, since it is updated frequently. - -TIDoS is an in progress work far from perfection and I admit that there may be bugs out there which may cause many modules not to work properly and just bug out. However, being the only single author and maintainer behind this framework, it is my humble request to all users of this framework to hand me the list of modules via raising a [new issue](https://github.com/theInfectedDrake/TIDoS-Framework/issues/new) which simply do not work and bug out, and I would be more than happy to fix them as we jointly make our journey to realising TIDoS as the greatest web penetration testing framework ever built. - -> __TEMPORARY UPDATE__: -> -> Please avoid doing any pull requests temporarily as work for v2 of this framework is already underway and in active development. +TIDoS is provided as an offensive web application audit framework. It has built-in modules which can reveal potential misconfigurations and vulnerabilties in web applications which could possibly be exploited maliciously. -Got more suggestions or new ideas? Raise up an [issue](https://github.com/theInfectedDrake/TIDoS-Framework/issues/new) or hit me up via DM on [twitter](https://twitter.com/infecteddrake). +__THEREFORE, NEITHER THE AUTHOR NOR THE CONTRIBUTORS ARE RESPONSIBLE FOR ANY MISUSE OR DAMAGE DUE TO THIS TOOLKIT.__ -> Copyright © [__The Infected Drake__](https://twitter.com/infecteddrake) diff --git a/core/.directory b/core/.directory new file mode 100644 index 00000000..acdd027f --- /dev/null +++ b/core/.directory @@ -0,0 +1,2 @@ +[Desktop Entry] +Icon=/home/vainlystrain/Pictures/vaileava11.png diff --git a/core/Auxillaries/__init__.py b/core/Auxillaries/__init__.py deleted file mode 100644 index 73a0d197..00000000 --- a/core/Auxillaries/__init__.py +++ /dev/null @@ -1,11 +0,0 @@ -#!/usr/bin/env python2 -# coding: utf-8 - -#-:-:-:-:-:-:-:-:-:-:-:-:# -# TIDoS Framework # -#-:-:-:-:-:-:-:-:-:-:-:-:# - -#This module requires TIDoS Framework -#https://github.com/theInfectedDrake/TIDoS-Framework - -pass diff --git a/core/Auxillaries/auxil.py b/core/Auxillaries/auxil.py deleted file mode 100644 index c03a906d..00000000 --- a/core/Auxillaries/auxil.py +++ /dev/null @@ -1,76 +0,0 @@ -#!/usr/bin/env python2 -# coding: utf-8 - -#-:-:-:-:-:-:-:-:-:-:-:-:# -# TIDoS Framework # -#-:-:-:-:-:-:-:-:-:-:-:-:# - -#This module requires TIDoS Framework -#https://github.com/theInfectedDrake/TIDoS-Framework - -from __future__ import print_function -import sys -import os -import time -import subprocess -import random -from random import randint -from subprocess import call -sys.path.append('modules/0x05-Auxillaries+PF6/') -from auxilban import * -from encodeall import * -from honeypot import * -from hashes import * -from imgext import * - -def auxil(web): - - auxilban() - print('') - time.sleep(0.3) - v = raw_input(GR+' [#] \033[1;4mTID\033[0m'+GR+' :> ' + color.END) - print('') - if v == '1': - print(' [!] Type Selected : Generate Hashes') - hashes() - print('\n\n') - raw_input(O+' [+] Press '+GR+'Enter'+O+' to Continue...') - auxilban() - auxil(web) - - elif v == '2': - print(' [!] Type Selected : Encode Strings') - encodeall() - print('\n\n') - raw_input(O+' [+] Press '+GR+'Enter'+O+' to Continue...') - auxilban() - auxil(web) - - elif v == '3': - print(' [!] Type Selected : Extract Metadata') - imgext() - print('\n\n') - raw_input(O+' [+] Press '+GR+'Enter'+O+' to Continue...') - auxilban() - auxil(web) - - elif v == '4': - print(' [!] Type Selected : Honeypot Detector') - honeypot() - print('\n\n') - raw_input(O+' [+] Press '+GR+'Enter'+O+' to Continue...') - auxilban() - auxil(web) - - elif v == '99': - print(GR+' [*] Going back!') - time.sleep(0.7) - os.system('clear') - - else: - dope = ['You high dude?','Shit! Enter a valid option','Whoops! Thats not an option','Sorry! You just typed shit'] - print(dope[randint(0,3)]) - time.sleep(0.7) - os.system('clear') - auxilban() - auxil(web) diff --git a/core/Auxillaries/auxilban.py b/core/Auxillaries/auxilban.py deleted file mode 100644 index d0f69535..00000000 --- a/core/Auxillaries/auxilban.py +++ /dev/null @@ -1,34 +0,0 @@ -#!/usr/bin/env python2 -# -*- coding: utf-8 -*- - -#-:-:-:-:-:-:-:-:-:-:-:-:# -# TIDoS Framework # -#-:-:-:-:-:-:-:-:-:-:-:-:# - -#This module requires TIDoS Framework -#https://github.com/theInfectedDrake/TIDoS-Framework - -from __future__ import print_function -import time -import os -from colors import * -from core.Core.arts import auxilban_art - -def auxilban(): - - os.system('clear') - print(" [!] Module Selected : Auxillary Modules\n") - time.sleep(0.4) - print(auxilban_art) - time.sleep(0.3) - print('') - print(B+' [1]'+C+' Generate Hashes from Strings'+W+'(4 Types) ') - time.sleep(0.1) - print(B+' [2]'+C+' Encode Payload or Strings'+W+' (7 Types)') - time.sleep(0.1) - print(B+' [3]'+C+' Extract Metadata from Images'+W+' (EXIF Data)') - time.sleep(0.1) - print(B+' [4]'+C+' HoneyPot Probability'+W+' (ShodanLabs HoneyScore)\n') - time.sleep(0.1) - print(B+' [99]'+C+' Back\n') - diff --git a/core/Auxillaries/colors.py b/core/Auxillaries/colors.py deleted file mode 100644 index 96ed4433..00000000 --- a/core/Auxillaries/colors.py +++ /dev/null @@ -1,37 +0,0 @@ -#!/usr/bin/env python2 - -#-:-:-:-:-:-:-:-:-:-:-:-:# -# TIDoS Framework # -#-:-:-:-:-:-:-:-:-:-:-:-:# - -#This module requires TIDoS Framework -#https://github.com/theInfectedDrake/TIDoS-Framework - -############################### -class color: - PURPLE = '\033[95m' - CYAN = '\033[96m' - DARKCYAN = '\033[36m' - BLUE = '\033[94m' - GREEN = '\033[92m' - YELLOW = '\033[93m' - RED = '\033[91m' - BOLD = '\033[1m' - UNDERLINE = '\033[4m' - END = '\033[0m' - HEADER = '\033[95m' - OKBLUE = '\033[94m' - OKGREEN = '\033[92m' - WARNING = '\033[93m' - FAIL = '\033[91m' - -W = '\033[1;0m' # white (normal) -R = '\033[1;31m' # red -G = '\033[1;32m' # green -O = '\033[1;33m' # orange -B = '\033[1;34m' # blue -P = '\033[1;35m' # purple -C = '\033[1;36m' # cyan -GR = '\033[1;37m' # gray -T = '\033[1;93m' # tan -############################### diff --git a/core/Auxillaries/module_index.py b/core/Auxillaries/module_index.py deleted file mode 100644 index e69de29b..00000000 diff --git a/core/Core/__init__.py b/core/Core/__init__.py index 73a0d197..8d1c8b69 100644 --- a/core/Core/__init__.py +++ b/core/Core/__init__.py @@ -1,11 +1 @@ -#!/usr/bin/env python2 -# coding: utf-8 - -#-:-:-:-:-:-:-:-:-:-:-:-:# -# TIDoS Framework # -#-:-:-:-:-:-:-:-:-:-:-:-:# - -#This module requires TIDoS Framework -#https://github.com/theInfectedDrake/TIDoS-Framework - -pass + diff --git a/core/Core/__pycache__/__init__.cpython-37.pyc b/core/Core/__pycache__/__init__.cpython-37.pyc new file mode 100644 index 00000000..646a3499 Binary files /dev/null and b/core/Core/__pycache__/__init__.cpython-37.pyc differ diff --git a/core/Core/__pycache__/colors.cpython-37.pyc b/core/Core/__pycache__/colors.cpython-37.pyc new file mode 100644 index 00000000..f4f04f36 Binary files /dev/null and b/core/Core/__pycache__/colors.cpython-37.pyc differ diff --git a/core/Core/agree.py b/core/Core/agree.py deleted file mode 100644 index 8492efff..00000000 --- a/core/Core/agree.py +++ /dev/null @@ -1,40 +0,0 @@ -#!/usr/bin/env python2 -# coding: utf-8 - -#-:-:-:-:-:-:-:-:-:-:-:-:# -# TIDoS Framework # -#-:-:-:-:-:-:-:-:-:-:-:-:# - -#This module requires TIDoS Framework -#https://github.com/theInfectedDrake/TIDoS-Framework - -from __future__ import print_function -import os -import sys -import platform -import time -from agreement import * -from colors import * - -def agree(): - - os.system('clear') - if str(platform.system()) != "Linux": - sys.exit(R+" [!] " + color.UNDERLINE + "\033[91m" + "You are not using a Linux Based OS! Linux is a must-have for this script!" + color.END) - if not os.geteuid() == 0: - sys.exit(" [!] " + color.UNDERLINE + "\033[91m" + "Must be run as root. :) " + color.END) - if 'no' in open('agree').read(): - agreement() - - a1 = raw_input(O+' [0x00] '+G+'Do you agree to these terms and conditions? :> '+C) - if a1 == "yes" or a1 == 'y' or a1 == 'Y' or a1 == 'Yes' or a1 == 'yo' or a1 == 'YES' or a1 == 'yep' or a1 == 'Yep' or a1 == 'YEP': - print(G+' [0x01] '+O+'Thats awesome! Move on...') - time.sleep(3) - FILE = open("agree","w") - FILE.write('yes') - FILE.close() - - else: - print(O+' [0x0F] '+R+'You have to agree!') - time.sleep(1) - sys.exit(0) diff --git a/core/Core/agreement.py b/core/Core/agreement.py deleted file mode 100644 index 703e69d5..00000000 --- a/core/Core/agreement.py +++ /dev/null @@ -1,30 +0,0 @@ -#!/usr/bin/env python2 -# -*- coding: utf-8 -*- - -#-:-:-:-:-:-:-:-:-:-:-:-:# -# TIDoS Framework # -#-:-:-:-:-:-:-:-:-:-:-:-:# - -#This module requires TIDoS Framework -#https://github.com/theInfectedDrake/TIDoS-Framework - -from __future__ import print_function -def agreement(): - - print(""" -\033[1;95m - ================================== - T I D O S F R A M E W O R K - ================================== -\033[1;37m - TIDoS is an open-source toolkit developed as a comprehensive web-application penetration testing framework. - - TIDoS was developed by \033[1;36m@_tID\033[1;37m aka \033[1;36mThe Infected Drake.\033[1;37m - - This is for you to note that TIDoS Framework has capable modules in various phases which can unveil potential dangerous flaws in various web-applications, which can further be exploited maliciously. Therefore the author as well as the contrbutors assume no liability for misuse of this toolkit. Usage of TIDoS Framework for testing or exploiting websites without prior mutual consistency can be considered as an illegal activity. It is the end user's responsibility to obey all applicable local, state and federal laws. - - You can edit these scripts within this tool as per your own needs, provided you use it only for yourself. If you're using some source-code from here, give the developer some credits. :) \033[1;91m - - P.S. - If you find any bugs with this tool, report it. - -""") diff --git a/core/Core/arts.py b/core/Core/arts.py deleted file mode 100644 index 2886a406..00000000 --- a/core/Core/arts.py +++ /dev/null @@ -1,153 +0,0 @@ -#!/usr/bin/env python2 -# -*- coding: utf-8 -*- - -#-:-:-:-:-:-:-:-:-:-:-:-:# -# TIDoS Framework # -#-:-:-:-:-:-:-:-:-:-:-:-:# - -#Author : @_tID -#This module requires TIDoS Framework -#https://github.com/theInfectedDrake/TIDoS-Framework - -from colors import * - -auxilban_art = C+''' -\033[1;37m - ' . + . . ' + ' . . - . ' + . * . - + ' . + - . * . . . * . * - . \033[1;33m _\033[1;37m . . . . - . . \033[1;33m _ / | \033[1;37m . . * \033[1;33m _ \033[1;37m . . + - \033[1;33m| \_| | \033[1;37m + . \033[1;33m| | __ - \033[1;33m _ | |\033[1;37m . _ \033[1;33m| |/ | - + \033[1;33m| \ | \033[1;36m _/\_ \033[1;33m| | / | \ \033[1;37m + / - \033[1;33m| | \ \033[1;36m+/_\/_\+ \033[1;33m| | / | \ \033[1;37m . |\033[1;34m - ____\033[1;33m/____\--...\___ \033[1;36m\_||_/\033[1;34m ___...\033[1;33m|__\_\033[1;34m..\033[1;33m|____\____/\033[1;34m_______/_\033[1;34m - . . \033[1;36m|_|__|_| \033[1;34m . . . - . . . \033[1;36m_/ /__\ \_\033[1;34m . . . . - . . . . . . - . ' ' ' ' - ' \033[1;33m-=[\033[1;31m A U X I L L A R I E S \033[1;33m]=-\033[1;34m . ' . - . ' . . ' . -''' - -scanenumban_art = """ - \033[1;33m,-. . \033[1;37m + . + -\033[1;37m * \033[1;33m / \ `. \033[1;31m __..-,O \033[1;37m + * . -\033[1;37m + \033[1;33m: \ \033[1;31m--''_..-'.' -\033[1;37m \033[1;33m| . \033[1;31m.-' `. '.\033[1;37m + . . + + -\033[1;37m . \033[1;33m: . \033[1;31m.`.' \033[1;37m -\033[1;37m \033[1;33m \ `. \033[1;31m/ .. \033[1;37m . + + . -\033[1;37m + \033[1;33m \ `. \033[1;31m' \033[1;33m. \033[1;37m * . -\033[1;37m \033[1;33m `, `. \ \033[1;37m + + -\033[1;37m . \033[1;36m,|,\033[1;33m`. `-.\ \033[1;37m * . -\033[1;37m + \033[1;36m'.|| \033[1;33m ``-...__..-` \033[1;37m ' -\033[1;37m + \033[1;36m| | \033[1;37m . * + -\033[1;37m * \033[1;36m|__| \033[1;37m + * . -\033[1;37m . \033[1;36m/||\ \033[1;37m . -\033[1;37m . \033[1;36m//||\\ \033[1;37m + \033[1;33m-=[ \033[1;31mP R O B E & E N U M E R A T E \033[1;33m]=-\033[1;37m -\033[1;37m + \033[1;36m// || \\ \033[1;37m + -\033[1;37m \033[1;36m __//__||__\\_ \033[1;37m . . * . + -\033[1;33m ____________\033[1;36m'--------------'\033[1;33m____________________________________________ """ - -exploitsban_art = ''' - \033[1;33m|\ \033[1;33m/) -\033[1;37m /\_\033[1;33m\\\033[1;37m__ \033[1;33m(_// -\033[1;37m| `>\-` \033[1;36m_._ \033[1;33m//`) -\033[1;37m \ /` \033[1;33m\\\033[1;36m _.-\033[1;34m:::\033[1;36m`-._ \033[1;33m// -\033[1;37m ` \033[1;33m\|\033[1;36m` \033[1;34m::: \033[1;36m `|\033[1;33m// \033[1;37m[0x00] \033[1;31mE X P L O I T S -\033[1;36m | \033[1;34m ::: \033[1;36m|\033[1;33m/ -\033[1;36m |\033[1;34m.....:::.....\033[1;36m| \033[1;31mC A S T L E \033[1;37m[0x00] -\033[1;36m |\033[1;34m:::::::::::::\033[1;36m| -\033[1;36m | \033[1;34m::: \033[1;36m| -\033[1;36m \ \033[1;34m ::: \033[1;36m/ -\033[1;36m \ \033[1;34m ::: \033[1;36m / \033[1;37m" [0x00] \033[1;33mCode the Exploits -\033[1;36m `-. \033[1;34m:::\033[1;36m .-' \033[1;33mand - \033[1;33m//\033[1;36m`:::`\033[1;33m\\ \033[1;33mExploit the Codes \033[1;37m[0x00] " - \033[1;33m// \033[1;36m' \033[1;33m\\ - |/ \033[1;33m\| ''' - -footprintban_art = """ -\033[1;36m - -\033[1;37m . . - * . . . . * . - . . . . . \033[1;35m ### - \033[1;35mo \033[1;33m-=[ \033[1;31mR E C O N N A I S S A N C E \033[1;33m]=- \033[1;35m > ######-\033[1;37m --0 - + . . . \033[1;35m### - \033[1;35m0\033[37m . . . - . . + , , , - . \033[1;35m\ \033[37m . . + . - . \033[1;35m\ \033[36m . . \033[1;36m###\033[1;37m . - . \033[1;35mo \033[36m . \033[1;33m> \033[1;36m###########- --0\033[1;37m . + - . \033[36m\ \033[1;36m########\033[1;37m . . - \033[34m#\##\##. \033[1;33m> \033[1;36m###########- --0\033[1;37m . . - + \033[34m# #O##\### \033[1;36m###\033[1;37m . + . - . \033[34m#*# #\##\###\033[37m . + . - . \033[34m##*# #\##\##\033[37m + . - . \033[34m##*# #o##\# \033[37m . * , . - . \033[34m**# #\# \033[37m . . . - + \ . \033[33m/\^ \033[37m \033[1;33m.". \033[1;33m/ -\033[1;33m____^/\___^--____/\____\033[1;31mO\033[1;33m_____________/ \/\___________/\/ \______________ - /\^ ^ ^ ^ ^^ ^ '\ ^ ^ --- - -- - -- - - --- __ ^ - -- __ ___-- ^ ^ -- __""" - -vulnban_art = R+""" - ..... - .:noONNNNNNNOon:. - .:NNNNNNNmddddNNNNNNN:. - :NNNNmy+:. + .:+ymNNNN: - NNNNy:` + `:yNNNN - NNNNy. -!NNNN - NNNN/ + \NNNN - NNNm- .:#####:. -mNNN \033[1;37m[0x00] \033[1;33mV U L N E R A B I L I T Y \033[1;31m - :NNN+ # + # +NNN: - NNNm # + # mNNN \033[1;33mE N U M E R A T I O N\033[1;31m \033[1;37m[0x00] - NNNh+++ ++#+++++++++++#++ +++hNNN - NNNm # + # mNNN - :NNN+ # + # +NNN: - NNNm- *:#####:* -mNNN - NNNN\ + /NNNN - NNNNy. -yNNNN - NNNNy:` + `:yNNNN" - :NNNNmy+:. + .:+ymNNNN: - *:NNNNNNNmddddNNNNNNNN* - *:!NNNNNNNNNNN!:* - '''*''' - -""" - -bugsban_art = C+''' -\033[1;34m - +------------------------------------------------------+ - | \033[1;37mTIDoS Dialog \033[1;33m[-] [口] [×] \033[1;34m| - | ---------------------------------------------------- | -\033[1;36m | | - | \033[1;33mTIDoS has detected that you want to hunt for bugs! \033[1;36m | - | \033[1;33mDo you wish to continue? \033[1;36m | - | | - | \033[1;37m.----------. .----------. .----------. \033[1;36m| - | \033[1;37m| Yes \033[1;37m| | No \033[1;37m| | Maybe \033[1;37m| \033[1;36m| - | \033[1;37m'----------' '----------' '----------' \033[1;36m | - |______________________________________________________| - -''' - -tidosrules_art = """ - _nnnn_ - dGGGGMMb - @p~qp~~qMb {}TIDoS Rules!!! - M(\033[37m@\033[96m)(\033[37m@\033[96m) M| {}_; - @\033[33m,----.\033[96mJM| {}-' - JS^\033[33m\__/ \033[96mqKL - dZP qKRb - dZP qKKb - fZP SMMb - HZM MMMM - FqM MMMM - \033[33m_| '. |\033[96mdS'qML' - \033[33m| `. | `' \_\033[96mZq' - \033[33m_) \.___.,| .' - \033[33m\________)\033[96mMMMMM\033[33m| .'""".format(O, GR, GR) diff --git a/core/Core/banner.py b/core/Core/banner.py deleted file mode 100644 index cbe2a977..00000000 --- a/core/Core/banner.py +++ /dev/null @@ -1,145 +0,0 @@ -# coding: utf-8 -#!/usr/bin/env python - -#-:-:-:-:-:-:-:-:-:-:-:-:# -# TIDoS Framework # -#-:-:-:-:-:-:-:-:-:-:-:-:# - -#This module requires TIDoS Framework -#https://github.com/theInfectedDrake/TIDoS-Framework - -from __future__ import print_function -import os -from random import randint -from colors import * - -def banner(): - - header = """ -\033[1;31m - T H E - - ▄▀▀▀█▀▀▄ ▄▀▀█▀▄ ▄▀▀█▄▄ ▄▀▀▀▀▄ ▄▀▀▀▀▄ \033[1;37m - █ █ ▐ █ █ █ █ ▄▀ █ █ █ ██ ▐ - ▐ █ ▐ █ ▐ ▐ █ █ █ █ ▀▄ - █ █ █ █ ▀▄ ▄▀ ▀▄ █ \033[1;31m - ▄▀ ▄▀▀▀▀▀▄ ▄▀▄▄▄▄▀ ▀▀▀▀ █▀▀▀ - █ █ █ █ ▐ ▐ - ▐ ▐ ▐ ▐ - F R A M E W O R K - -""" - - - oblique = C + """ -\033[1;36m - T H E - - ███ ▄█ ████████▄ ▄██████▄ ▄████████ - ▀█████████▄ ███ ███ ▀███ ███ ███ ███ ███ \033[1;37m - ▀███▀▀██ ███▌ ███ ███ ███ ███ ███ █▀ - ███ ▀ ███▌ ███ ███ ███ ███ ███ - ███ ███▌ ███ ███ ███ ███ ▀███████████ - ███ ███ ███ ███ ███ ███ ███ \033[1;36m - ███ ███ ███ ▄███ ███ ███ ▄█ ███ - ▄████▀ █▀ ████████▀ ▀██████▀ ▄████████▀ - - F R A M E W O R K -""" - - modular = O + """ -\033[1;33m - ___________________________ - |\_________________________/|\ - || || \ - || \033[1;36mThe \033[1;33m|| | - || \033[1;36m TIDoS \033[1;33m|| | - || \033[1;36m Framework \033[1;33m|| | - || \033[1;33m|| | - || \033[1;34mWeb Application Audit \033[1;33m|| | - || \033[1;34m Framework \033[1;33m|| | - || \033[1;33m|| | - || \033[1;37mFrom: CodeSploit \033[1;33m|| / - ||_________________________|| / - |/_________________________\|/ - __\_________________/__/| - |_______________________|/ - ________________________ - /\033[0m\033[37moooo oooo oooo oooo \033[1;33m/| - /\033[0m\033[37mooooooooooooooooooooooo\033[1;33m/ / - /\033[0m\033[37mooooooooooooooooooooooo\033[1;33m/ / - /C=_____________________/_/ -""" - - fb = C + """ -\033[1;36m - ,------,-------------------------------------,------. - | | | | - | | \033[1;37mThe TIDoS Framework | | - | | \033[1;34m< CodeSploit > \033[1;36m | | - | | | | - | |-------------------------------------| | - | ||...................................|| | - | || || | - | || \033[1;33mHack Facebook? (y/n) \033[1;36m|| | - | || \033[1;34m---------------------- \033[1;36m|| | - | ||_______ \033[1;33m$ > (Input) \033[1;36m_______|| | - | || \033[1;32m$$$$$ \033[1;36m| | \033[1;32m$$$$$\033[1;36m || | - | ||-------'-------------------'-------|| | - `------'|___________________________________|`------' - -""" - codesploit = GR + """ - - MMMMMNMNMMMM$%&. - .DMMM lM$%. - .MMN \M$%,. - MN \M%$.. - .M. \033[1;36mXXXXXXXXXXXXX \033[1;37m\M%$M - .M \033[1;36m XXXXXXXXXXXXX \033[1;37m\l$%M. - M \033[1;36m XXX \033[1;37m\M$%M:. - M \033[1;36m XXX \033[1;37m\$MMM: - M \033[1;36m XXX \033[1;34mXXXXXXX \033[1;37m:$%MM: - :M \033[1;36m XXX \033[1;34mXX \033[1;37m :$%MMM: - M \033[1;36m XXX \033[1;34mXXXXXXX \033[1;37m M%$MM: - :M: \033[1;36m XXX \033[1;34m XX \033[1;37m M$%M:' - NM \033[1;36m XXXXXX\033[1;34mXXXXXXX\033[1;36mm \033[1;37m .M$%MM: - IMM. \033[1;36m XXXXXXXXXXXXX\033[1;36mm \033[1;37m.MD%4M' - :MM . .MM$%M' - $MM .MMM$%"' - MMMM. MMMMMM" - MMMMMMMMMMMMMMMMMM:*" -\033[1;33m - ╔═════════════════════════╗ - █ \033[1;31mC O D E S P L O I T\033[1;33m █ - ╚═════════════════════════╝ -""" - swan = """ -\033[1;33m - ...,ooooooooo...... - .o8888888888888888888888888o. - .o888888888888888888888888888888888o. - o8888888888A88"V888888888888888888888888o - o88888887"8" V V888 88888888888888888888o - o88888888 VV0 888888888888888888888 - o888888888 !/ 88888888888888888888o - .88888888888 88888V" "V8888888888. - o88888888888v \033[1;37mT H E \033[1;33m 8888" v8 8888888888o - 88888888888v 8888v v88 88888888888 - 888888888888 \033[1;37mT I D O S\033[1;33m 88888v "8888888888888 - 88888888888V ""M888 "888P8888888 - 88888888888v \033[1;37mF R A M E W O R K \033[1;33m 88P8888888 -\033[1;36m ______\033[1;33m8888888888888v.........................VF8888888\033[1;36m_______ - :::::::::::::::::::' :::::::::::::::: - ::::::::::::::::: .::::::: .:::::::::::::::::\033[1;34m - ::::::::::::::: \033[1;36mFrom:\033[1;34m ::::::: .::::::::::::::::::: - ::::::::::::::: \033[1;37mCodeSploit\033[1;34m :::::: ::: :::::::::::::::: - :::::::::::::::. ::::::. :: .::::::::::::::::\033[1;36m - :::::::::::::::: :::::::. .::::::::::::::::: - :::::::::::::::. . :::::::::::::::::::::::::::: -""" - headers = [header, oblique, modular, codesploit, fb, swan] - os.system('clear') - print(headers[randint(0,5)]) - - diff --git a/core/Core/bannerbelow.py b/core/Core/bannerbelow.py deleted file mode 100644 index abd2bab9..00000000 --- a/core/Core/bannerbelow.py +++ /dev/null @@ -1,33 +0,0 @@ -#!/usr/bin/env python2 -# -*- coding: utf-8 -*- - -#-:-:-:-:-:-:-:-:-:-:-:-:# -# TIDoS Framework # -#-:-:-:-:-:-:-:-:-:-:-:-:# - -#This module requires TIDoS Framework -#https://github.com/theInfectedDrake/TIDoS-Framework - -from __future__ import print_function -import time -from time import sleep -from colors import * - -def bannerbelow(): - - print(B+'[---] '+C+'The TIDoS Framework \033[36m| \033[1;37mVersion v1.6 \033[1;34m[---]') - sleep(0.2) - print(B+'[---] [---]') - print(B+'[---] \033[1;31m~ Author \033[1;31m: \033[1;33m@_tID ~ \033[1;34m[---]') - sleep(0.2) - print(B+'[---] '+O+'~ github.com / \033[1;32mtheInfectedDrake ~ \033[1;34m[---]') - sleep(0.2) - print(B+'[---] [---]') - sleep(0.2) - print(B+'[---] \033[1;35m5 Phases | \033[1;31m14 Sub-Phases | \033[1;37m108 Modules \033[1;34m[---]') - sleep(0.2) - print('') - print(B+' Welcome to '+C+'The TIDoS Framework (TTF)') - sleep(0.2) - print(GR+' The TIDoS Framework is a project by '+R+'Team CodeSploit\n') - diff --git a/core/Core/colors.py b/core/Core/colors.py index 96ed4433..1a278a6f 100644 --- a/core/Core/colors.py +++ b/core/Core/colors.py @@ -1,37 +1,64 @@ -#!/usr/bin/env python2 +#!/usr/bin/env python3 #-:-:-:-:-:-:-:-:-:-:-:-:# # TIDoS Framework # #-:-:-:-:-:-:-:-:-:-:-:-:# #This module requires TIDoS Framework -#https://github.com/theInfectedDrake/TIDoS-Framework +#https://github.com/0xInfection/TIDoS-Framework ############################### class color: - PURPLE = '\033[95m' - CYAN = '\033[96m' - DARKCYAN = '\033[36m' - BLUE = '\033[94m' - GREEN = '\033[92m' - YELLOW = '\033[93m' - RED = '\033[91m' - BOLD = '\033[1m' - UNDERLINE = '\033[4m' - END = '\033[0m' - HEADER = '\033[95m' - OKBLUE = '\033[94m' - OKGREEN = '\033[92m' - WARNING = '\033[93m' - FAIL = '\033[91m' + PURPLE = '\033[95m' + CYAN = '\033[96m' + DARKCYAN = '\033[36m' + BLUE = '\033[94m' + GREEN = '\033[92m' + YELLOW = '\033[93m' + RED = '\033[91m' + BOLD = '\033[1m' + UNDERLINE = '\033[4m' + CURSIVE = '\033[3m' + END = '\033[0m' + HEADER = '\033[95m' + OKBLUE = '\033[94m' + OKGREEN = '\033[92m' + WARNING = '\033[93m' + FAIL = '\033[91m' + #TR1 = '\033[0m\033[48;2;58;49;58m\033[38;2;225;214;225m\uE0B0' + #TR2 = '\033[0m\033[38;2;225;214;225m\uE0B0' + #TR3 = '\033[0m\033[48;2;225;214;225m\033[38;2;58;49;58m\uE0B0' + #TR4 = '\033[0m\033[38;2;58;49;58m\uE0B0' + #TR5 = '\033[0m\033[48;2;225;214;225m\033[38;2;19;14;19m\uE0B0' + #TR6 = '\033[0m\033[48;2;58;49;58m\033[38;2;19;14;19m\uE0B0' -W = '\033[1;0m' # white (normal) -R = '\033[1;31m' # red -G = '\033[1;32m' # green -O = '\033[1;33m' # orange -B = '\033[1;34m' # blue -P = '\033[1;35m' # purple -C = '\033[1;36m' # cyan -GR = '\033[1;37m' # gray -T = '\033[1;93m' # tan + TR1 = '\033[0m\033[48;2;58;49;58m\033[38;2;225;214;225m|' + TR2 = '\033[0m\033[38;2;225;214;225m|' + TR3 = '\033[0m\033[48;2;225;214;225m\033[38;2;58;49;58m|' + TR4 = '\033[0m\033[38;2;58;49;58m|' + TR5 = '\033[0m\033[48;2;225;214;225m\033[38;2;19;14;19m|' + TR6 = '\033[0m\033[48;2;58;49;58m\033[38;2;19;14;19m|' + VBG = '\033[48;2;19;14;19m' + TITLE = '\033[38;2;85;72;85m' + BAR = '\033[38;2;225;214;225m' + #TR1 = '\033[48;2;58;49;58m\033[38;2;225;214;225m\u25B6' + +W = '\033[0m\033[1;0m' # white (normal) +#R = '\033[1;31m' # red +R = '\033[0m\033[38;2;58;49;58m\033[1m' +#G = '\033[0m\033[1m' # green +#G = '\033[0m\033[48;2;255;255;255m\033[38;2;58;49;58m\033[1m' +G = '\033[0m\033[48;2;225;214;225m\033[38;2;58;49;58m\033[1m' +#G = '\033[0m\033[48;2;85;72;85m\033[38;2;225;214;225m' +#O = '\033[0m\033[1m' # orange +O = '\033[0m\033[48;2;58;49;58m' +B = '\033[0m\033[1m' # blue +#P = '\033[0m\033[1m' # purple +P = '\033[0m\033[38;2;58;49;58m\033[3m' +C = '\033[0m\033[1m' # cyan +GR = '\033[0m\033[1m' # gray +T = '\033[0m\033[1m' # tan +RB = '\033[48;2;58;49;58m' +RC = '\033[0m\033[38;2;58;49;58m\033[3m' +RD = '\033[0m\033[38;2;58;49;58m' ############################### diff --git a/core/Core/dispmenu.py b/core/Core/dispmenu.py deleted file mode 100644 index d40ed2b0..00000000 --- a/core/Core/dispmenu.py +++ /dev/null @@ -1,50 +0,0 @@ -#!/usr/bin/env python2 -# coding: utf-8 - -#-:-:-:-:-:-:-:-:-:-:-:-:# -# TIDoS Framework # -#-:-:-:-:-:-:-:-:-:-:-:-:# - -#This module requires TIDoS Framework -#https://github.com/theInfectedDrake/TIDoS-Framework - -from __future__ import print_function -import time -from colors import * - -def dispmenu(): - - print(''' - -\033[1;37m . + \033[1;34m ______ \033[1;37m . . - +. \033[1;34m / ==== \ \033[1;37m . + . . - . . \033[1;36m ,-~--------~-. \033[1;37m * + - \033[1;36m,^\033[1;33m ___ \033[1;36m^.\033[1;37m + * . . . - * * \033[1;36m / \033[1;33m.^ ^. \033[1;36m\ \033[1;37m . \033[1;32m _ | _ - \033[1;36m| \033[1;33m| o ! \033[1;36m|\033[1;37m . \033[1;32m __ \ /--. - . \033[1;36m|\033[1;34m_ \033[1;33m'.___.' \033[1;34m_\033[1;36m|\033[1;37m \033[1;32mI__/_\ / )}\033[1;36m======> \033[1;37m + - \033[1;36m| \033[1;34m"'----------------"\033[1;36m|\033[1;37m + \033[1;32m _[ _(\033[1;33m0\033[1;32m): ))\033[1;36m========> - + . \033[1;36m! !\033[1;37m . \033[1;32mI__\ / \. ]}\033[1;36m======> \033[1;37m . - . \033[1;36m \ \033[1;37mTIDoS Prober \033[1;36m/ \033[1;37m \033[1;32m ~^-.--' - \033[1;36m^. .^ \033[1;37m . \033[1;32m | \033[1;37m +. * - . \033[1;36m "-..______.,-" \033[1;37m. . * - + . . + * . - \033[1;33m-=[ \033[1;31mL E T S S T A R T\033[1;33m ]=-\033[1;37m - + . ' . + + - * . + * . * . -''') - print(O+'\n Choose from the options below :\n') - time.sleep(0.2) - print(B+' [1] \033[1;36mReconnaissance & OSINT'+W+' (50 modules)') - time.sleep(0.1) - print(B+' [2] \033[1;36mScanning & Enumeration'+W+' (16 modules)') - time.sleep(0.1) - print(B+' [3] \033[1;36mVulnerability Analysis'+W+' (37 modules)') - time.sleep(0.1) - print(B+' [4] \033[1;36mExploitation (beta)'+W+' (1 modules)') - time.sleep(0.1) - print(B+' [5] \033[1;36mAuxillary Modules'+W+' (4 modules)\n') - time.sleep(0.1) - print(B+' [99] \033[1;36mSay "alvida"! (Exit TIDoS)\n') - time.sleep(0.1) - diff --git a/core/Core/inputin.py b/core/Core/inputin.py deleted file mode 100644 index 6f2d3956..00000000 --- a/core/Core/inputin.py +++ /dev/null @@ -1,58 +0,0 @@ -#!/usr/bin/env python2 -# coding: utf-8 - -#-:-:-:-:-:-:-:-:-:-:-:-:# -# TIDoS Framework # -#-:-:-:-:-:-:-:-:-:-:-:-:# - -#This module requires TIDoS Framework -#https://github.com/theInfectedDrake/TIDoS-Framework - -from __future__ import print_function -import sys -import socket -import time -import os -from colors import * - -def inputin(): - - try: - web = raw_input(''+O+' [#] Target web address :> '+C) - global web - if not str(web).startswith('http'): - mo = raw_input(GR+' [#] Does this website use SSL? (y/n) :> ') - if mo == 'y' or mo == 'Y': - web = 'https://'+web - elif mo == 'n': - web = 'http://'+web - if 'http://' in web: - po = web.split('//')[1] - elif 'https://' in web: - po = web.split('//')[1] - if str(web).endswith('/'): - web = po[:-1] - po = po[:-1] - print(GR+' [*] Checking server status...') - time.sleep(0.6) - - try: - ip = socket.gethostbyname(po) - print(G+' [+] Site seems to be up...') - time.sleep(0.5) - print(G+' [+] IP Detected : '+O+ip) - time.sleep(0.5) - print('') - os.system('cd tmp/logs/ && rm -rf '+po+'-logs && mkdir '+po+'-logs/') - return web - - except socket.gaierror: - print(R+' [-] Site seems to be down...') - sys.exit(1) - - except KeyboardInterrupt: - print(R+' [-] Exiting...') - time.sleep(0.7) - print(C+' [#] Alvida, my friend!') - sys.exit(1) - diff --git a/core/Core/loadstyle.py b/core/Core/loadstyle.py deleted file mode 100644 index bf8fdea4..00000000 --- a/core/Core/loadstyle.py +++ /dev/null @@ -1,35 +0,0 @@ -#!/usr/bin/env python2 - -#-:-:-:-:-:-:-:-:-:-:-:-:# -# TIDoS Framework # -#-:-:-:-:-:-:-:-:-:-:-:-:# - -#This module requires TIDoS Framework -#https://github.com/theInfectedDrake/TIDoS-Framework - -from __future__ import print_function -import os -import time -from colors import * - -def loadstyle(): - - os.system('clear') - red_bold = R - reset = W - loading = "Loading the TIDoS Framework..." - action = 0 - while action < 1: - for i,char in enumerate(loading): - if i == 0: - print("%s%s%s%s" %(red_bold,char.upper(),reset,loading[1:])) - elif i == 1: - old_loading = loading[0].lower() - print("%s%s%s%s%s" %(old_loading,red_bold,char.upper(),reset,loading[2:])) - elif i == i: - old_loading = loading[-0:i].lower() - print("%s%s%s%s%s" %(old_loading,red_bold,char.upper(),reset,loading[i+1:])) - time.sleep(0.1) - os.system('clear') - action += 1 - diff --git a/core/Enumeration/Crawling/__init__.py b/core/Enumeration/Crawling/__init__.py deleted file mode 100644 index 73a0d197..00000000 --- a/core/Enumeration/Crawling/__init__.py +++ /dev/null @@ -1,11 +0,0 @@ -#!/usr/bin/env python2 -# coding: utf-8 - -#-:-:-:-:-:-:-:-:-:-:-:-:# -# TIDoS Framework # -#-:-:-:-:-:-:-:-:-:-:-:-:# - -#This module requires TIDoS Framework -#https://github.com/theInfectedDrake/TIDoS-Framework - -pass diff --git a/core/Enumeration/Crawling/crawlers.py b/core/Enumeration/Crawling/crawlers.py deleted file mode 100644 index 6dbbe1bc..00000000 --- a/core/Enumeration/Crawling/crawlers.py +++ /dev/null @@ -1,84 +0,0 @@ -#!/usr/bin/env python2 -# -*- coding : utf-8 - -#-:-:-:-:-:-:-:-:-:-:-:-:# -# TIDoS Framework # -#-:-:-:-:-:-:-:-:-:-:-:-:# - -#This script is a part of TIDoS Framework -#https://github.com/theInfectedDrake/TIDoS-Framework - -from __future__ import print_function -import sys -import platform -import os -import time -import random -import subprocess -from random import * -sys.path.append('modules/0x02-Scanning+Enumeration/0x02-WebCrawling/') - -# Import stuff -from crawler1 import * -from crawler2 import * -from crawler3 import * -from crawlersban import * -from colors import * - -def crawlers(web): - - time.sleep(0.3) - print(' [!] Module Selected : Crawlers') - time.sleep(0.4) - crawlersban() # banner - v = raw_input(O+' [#] TID :> ') - - if v.strip() == '1': # level 1 crawler - print(B+' [!] Module Selected :'+C+' Crawler (Depth 1)') - crawler1(web) - time.sleep(1) - crawlers(web) - - elif v.strip() == '2': # level 2 crawler - print(B+' [!] Module Selected :'+C+' Crawler (Depth 2)') - crawler2(web) - time.sleep(1) - crawlers(web) - - elif v.strip() == '3': # level 3 crawler - print(B+' [!] Module Selected :'+C+' Crawler (Depth 3)') - crawler3(web) - time.sleep(1) - crawlers(web) - - elif v.strip() == '99': # to go back - print(GR+' [*] Going back...') - time.sleep(0.5) - os.system('clear') - - elif v.strip() == 'A': - print(W+'\n [!] Module Automater Initialized...') - sleep(0.5) - print(B+' [*] Initializing Scan Type :'+C+' Crawler (Depth 1)') - crawler1(web) # unleash level 1 - - print(B+'\n [!] Scan Type Completed :'+C+' Crawler 1\n') - sleep(0.5) - print(B+' [!] Initializing Scan Type :'+C+' Crawler (Depth 2)') - crawler2(web) # unleash level 2 - - print(B+'\n [!] Scan Type Completed :'+C+' Crawler 2\n') - sleep(0.5) - print(B+' [!] Initializing Scan Type :'+C+' Crawler (Depth 3)') - crawler3(web) # unleash level 3 - - print(B+'\n [!] Scan Type Completed :'+C+' Crawler 3\n\n'+G+' [+] All modules successfully completed!') - raw_input(GR+' [+] Press '+O+'Enter '+GR+'to continue...') # for the user to take a breadth :/ - crawlers(web) # get back to menu - - else: - dope = ['You high dude?','Shit! Enter a valid option','Whoops! Thats not an option','Sorry! You just typed shit'] - print(' [-] '+dope[randint(0,3)]) # troll stuffs :p - sleep(1) - crawlers(web) - diff --git a/core/Enumeration/Crawling/crawlersban.py b/core/Enumeration/Crawling/crawlersban.py deleted file mode 100644 index 3475a6bf..00000000 --- a/core/Enumeration/Crawling/crawlersban.py +++ /dev/null @@ -1,32 +0,0 @@ -#!/usr/bin/env python2 -# -*- coding : utf-8 - -#-:-:-:-:-:-:-:-:-:-:-:-:# -# TIDoS Framework # -#-:-:-:-:-:-:-:-:-:-:-:-:# - -#This script is a part of TIDoS Framework -#https://github.com/theInfectedDrake/TIDoS-Framework - -from __future__ import print_function -import time -from time import sleep -from colors import * - -def crawlersban(): - - print(O+'\n +-----------------+') - print(O+' | '+G+' CRAWLER TYPES '+O+' |') - print(O+' +-----------------+\n') - print('') - sleep(0.2) - print(B+" [1] "+C+"Crawler \033[1;0m(Depth 1)") - sleep(0.2) - print(B+' [2] '+C+'Crawler \033[1;0m(Depth 2) ') - sleep(0.2) - print(B+' [3] '+C+'Crawler \033[1;0m(Depth 3) ') - sleep(0.2) - print(B+'\n [A] '+C+'Test both crawlers 1 by 1 ') - sleep(0.2) - print(B+'\n [99] '+C+'Back \n') - diff --git a/core/Enumeration/PortScans/__init__.py b/core/Enumeration/PortScans/__init__.py deleted file mode 100644 index 73a0d197..00000000 --- a/core/Enumeration/PortScans/__init__.py +++ /dev/null @@ -1,11 +0,0 @@ -#!/usr/bin/env python2 -# coding: utf-8 - -#-:-:-:-:-:-:-:-:-:-:-:-:# -# TIDoS Framework # -#-:-:-:-:-:-:-:-:-:-:-:-:# - -#This module requires TIDoS Framework -#https://github.com/theInfectedDrake/TIDoS-Framework - -pass diff --git a/core/Enumeration/PortScans/portscan.py b/core/Enumeration/PortScans/portscan.py deleted file mode 100644 index 46f18fc5..00000000 --- a/core/Enumeration/PortScans/portscan.py +++ /dev/null @@ -1,155 +0,0 @@ -#!/usr/bin/env python2 -# -*- coding: utf-8 -*- - -#-:-:-:-:-:-:-:-:-:-:-:-:# -# TIDoS Framework # -#-:-:-:-:-:-:-:-:-:-:-:-:# - -#This script is a part of TIDoS Framework -#https://github.com/theInfectedDrake/TIDoS-Framework - -from __future__ import print_function -import sys -import os -import time -import random -from random import * -from time import sleep -sys.path.append('modules/0x02-Scanning+Enumeration/0x01-PortScanning/') - -from finscan import * -from servicedetect import * -#from nullscan import * -#from tcpack import * -from simpleport import * -from tcpconnectscan import * -from tcpstealthscan import * -#from tcpwindows import * -#from udpscan import * -from xmasscan import * -from colors import * -from portscanban import * - -def portscan(web): - - time.sleep(0.3) - print(W+' [!] Module Selected : Port Scanning') - time.sleep(0.4) - portscanban() - v = raw_input (GR+' [#] \033[1;4mTID\033[0m'+GR+' :> ' + color.END) - - if v.strip() == '1': - print(B+' [!] Module Selected :'+C+' Simple Port Scan') - simpleport(web) - time.sleep(1) - portscan(web) - - elif v.strip() == '2': - print(B+' [!] Module Selected :'+C+' TCP Connect Scan') - tcpconnectscan(web) - time.sleep(1) - portscan(web) - -# elif v.strip() == '3': -# print B+' [!] Module Selected :'+C+' TCP ACK Scan' -# tcpack(web) -# time.sleep(1) -# portscan(web) - - elif v.strip() == '4': - print(B+' [!] Module Selected :'+C+' TCP Stealth Scan') - tcpstealthscan(web) - time.sleep(1) - portscan(web) - -# elif v.strip() == '5': -# print B+' [!] Module Selected :'+C+' UDP Scan' -# udpscan(web) -# time.sleep(1) -# portscan(web) - - elif v.strip() == '6': - print(B+' [!] Module Selected :'+C+' XMAS Scan') - xmasscan(web) - time.sleep(1) - portscan(web) - -# elif v.strip() == '7': -# print B+' [!] Module Selected :'+C+' NULL Scan' -# nullscan(web) -# time.sleep(1) -# portscan(web) - - elif v.strip() == '8': - print(B+' [!] Module Selected :'+C+' FIN Scan') - finscan(web) - time.sleep(1) - portscan(web) - - elif v.strip() == '9': - print(B+' [!] Module Selected :'+C+' Service Detector') - servicedetect(web) - time.sleep(1) - portscan(web) - -# elif v.strip() == '10': -# print B+' [!] Module Selected :'+C+' TCP Windows' -# tcpwindowsscan(web) -# time.sleep(1) -# portscan(web) - - elif v.strip() == 'A': - print('\n [!] Module Automater Initialized...') - sleep(0.5) - print(B+' [*] Initializing Scan Type :'+C+' Simple Port Scan') - simpleport(web) - print(B+' [!] Scan Type Completed :'+C+' Simple Port Scan\n') - sleep(0.5) - print(B+' [!] Initializing Scan Type :'+C+' TCP Connect Scan') - tcpconnectscan(web) - print(B+' [!] Scan Type Completed :'+C+' TCP Connect\n') - sleep(0.5) -# print B+' [!] Initializing Scan Type :'+C+' TCP ACK Scan' -# tcpack(web) -# print B+' [!] Scan Type Completed :'+C+' TCP ACK Scan\n' -# sleep(0.5) - print(B+' [!] Initializing Scan Type :'+C+' TCP Stealth Scan') - tcpstealthscan(web) - print(B+' [!] Scan Type Completed :'+C+' TCP Stealth Scan\n') - sleep(0.5) -# print B+' [!] Initializing Scan Type :'+C+' UDP Scan' -# udpscan(web) -# print B+' [!] Scan Type Completed :'+C+' UDP Scan\n' -# sleep(0.5) - print(B+' [!] Initializing Scan Type :'+C+' XMAS Scan') - xmasscan(web) - print(B+' [!] Scan Type Completed :'+C+' XMAS Scan\n') - sleep(0.5) -# print B+' [!] Initializing Scan Type :'+C+' NULL Scan' -# nullscan(web) -# print B+' [!] Scan Type Completed :'+C+' NULL Scan\n' -# sleep(0.5) - print(B+' [!] Initializing Scan Type :'+C+' FIN Scan') - finscan(web) - print(B+' [!] Scan Type Completed :'+C+' FIN Scan\n') - sleep(0.5) - print(B+' [!] Initializing Scan Type :'+C+' Service Detection') - servicedetect(web) - print(B+' [!] Scan Type Completed :'+C+' Service Detection\n') - sleep(0.5) - print(B+' [!] All scantypes have been tested on target...') - print(C+' [!] Going back to menu...') - sleep(3) - portscan(web) - - elif v.strip() == '99': - print(GR+' [*] Going back...') - time.sleep(0.5) - os.system('clear') - - else: - dope = ['You high dude?','Shit! Enter a valid option','Whoops! Thats not an option','Sorry! You just typed shit'] - print(dope[randint(0,3)]) - time.sleep(0.7) - portscan(web) - diff --git a/core/Enumeration/PortScans/portscanban.py b/core/Enumeration/PortScans/portscanban.py deleted file mode 100644 index 7998cdc8..00000000 --- a/core/Enumeration/PortScans/portscanban.py +++ /dev/null @@ -1,46 +0,0 @@ -#!/usr/bin/env python2 -# -*- coding : utf-8 - -#-:-:-:-:-:-:-:-:-:-:-:-:# -# TIDoS Framework # -#-:-:-:-:-:-:-:-:-:-:-:-:# - -#This script is a part of TIDoS Framework -#https://github.com/theInfectedDrake/TIDoS-Framework - -from __future__ import print_function -import time -import os -from time import sleep -from colors import * - -def portscanban(): - - print(O+'\n +--------------+') - print(O+' | '+W+'SCAN TYPES'+O+' |') - print(O+' +--------------+\n') - sleep(0.1) - print(B+" [1]"+C+" A Simple Port Scan") - sleep(0.1) - print(B+" [2]"+C+" A TCP Connect Scan"+G+' (Highly Reliable)') - sleep(0.1) -# print B+" [3]"+C+" A TCP-ACK Scan" -# sleep(0.1) - print(B+" [4]"+C+" A TCP Stealth Scan"+G+' (Highly Reliable)') - sleep(0.1) -# print B+" [5]"+C+" A UDP Scan" -# sleep(0.1) - print(B+" [6]"+C+" A XMAS Flag Scan "+R+"(Reliable only in LANs)") - sleep(0.1) -# print B+" [7]"+C+" A NULL Scan" -# sleep(0.1) - print(B+" [8]"+C+" A FIN Flag Scan "+R+"(Reliable only in LANs)") - sleep(0.1) - print(B+" [9]"+C+" A Open Ports Services Detector") - sleep(0.1) -# print O+B+" [10]"+C+" A TCP Windows Scan" -# sleep(0.1) - print(B+" [A]"+C+" Automate all modules one by one\n") - sleep(0.1) - print(B+' [99]'+C+' Back\n') - diff --git a/core/Enumeration/__init__.py b/core/Enumeration/__init__.py deleted file mode 100644 index 73a0d197..00000000 --- a/core/Enumeration/__init__.py +++ /dev/null @@ -1,11 +0,0 @@ -#!/usr/bin/env python2 -# coding: utf-8 - -#-:-:-:-:-:-:-:-:-:-:-:-:# -# TIDoS Framework # -#-:-:-:-:-:-:-:-:-:-:-:-:# - -#This module requires TIDoS Framework -#https://github.com/theInfectedDrake/TIDoS-Framework - -pass diff --git a/core/Enumeration/colors.py b/core/Enumeration/colors.py deleted file mode 100644 index 96ed4433..00000000 --- a/core/Enumeration/colors.py +++ /dev/null @@ -1,37 +0,0 @@ -#!/usr/bin/env python2 - -#-:-:-:-:-:-:-:-:-:-:-:-:# -# TIDoS Framework # -#-:-:-:-:-:-:-:-:-:-:-:-:# - -#This module requires TIDoS Framework -#https://github.com/theInfectedDrake/TIDoS-Framework - -############################### -class color: - PURPLE = '\033[95m' - CYAN = '\033[96m' - DARKCYAN = '\033[36m' - BLUE = '\033[94m' - GREEN = '\033[92m' - YELLOW = '\033[93m' - RED = '\033[91m' - BOLD = '\033[1m' - UNDERLINE = '\033[4m' - END = '\033[0m' - HEADER = '\033[95m' - OKBLUE = '\033[94m' - OKGREEN = '\033[92m' - WARNING = '\033[93m' - FAIL = '\033[91m' - -W = '\033[1;0m' # white (normal) -R = '\033[1;31m' # red -G = '\033[1;32m' # green -O = '\033[1;33m' # orange -B = '\033[1;34m' # blue -P = '\033[1;35m' # purple -C = '\033[1;36m' # cyan -GR = '\033[1;37m' # gray -T = '\033[1;93m' # tan -############################### diff --git a/core/Enumeration/scanenum.py b/core/Enumeration/scanenum.py deleted file mode 100644 index ad3fa9ab..00000000 --- a/core/Enumeration/scanenum.py +++ /dev/null @@ -1,155 +0,0 @@ -#!/usr/bin/env python2 -# -*- coding: utf-8 -*- - -#-:-:-:-:-:-:-:-:-:-:-:-:# -# TIDoS Framework # -#-:-:-:-:-:-:-:-:-:-:-:-:# - -#Author: @_tID -#This script is a part of TIDoS Framework -#https://github.com/theInfectedDrake/TIDoS-Framework - -from __future__ import print_function -import sys -import time -import os -sys.path.append('modules/0x02-Scanning+Enumeration/') - -from nmapmain import * -from colors import * -from scanenumban import * -from webscan import * -from bannergrab import * -from osdetect import * -from webtech import * -from waf import * -from ssltlsscan import * -from Crawling.crawlers import * -from PortScans.portscan import * - -def scanenum(web): - - print(B+' [+] Module Selected : '+C+'Scanning and Enumeation') - scanenumban() - v = raw_input(''+O+' \033[4mTID\033[1;0m '+GR+':> ' + color.END) - print('\n') - if v.strip() == '1': - print(B+' [!] Type Selected :'+C+' WAF Analysis'+O) - waf(web) - raw_input(O+' [#] Press '+GR+'Enter'+O+' to continue...') - scanenum(web) - - elif v.strip() == '2': - print(B+' [!] Type Selected :'+C+' Port Scanning') - portscan(web) - raw_input(O+' [#] Press '+GR+'Enter'+O+' to continue...') - scanenum(web) - - elif v.strip() == '3': - print(B+' [!] Type Selected :'+C+' Interactive NMap') - nmapmain(web) - raw_input(O+' [#] Press '+GR+'Enter'+O+' to continue...') - scanenum(web) - - elif v.strip() == '4': - print(B+' [!] Type Selected :'+C+' WebTech Fingerprinting') - webtech(web) - raw_input(O+' [#] Press '+GR+'Enter'+O+' to continue...') - scanenum(web) - - elif v.strip() == '5': - print(B+' [!] Type Selected :'+C+' SSL Enumeration') - ssltlsscan(web) - raw_input(O+' [#] Press '+GR+'Enter'+O+' to continue...') - scanenum(web) - - elif v.strip() == '6': - print(B+' [!] Type Selected :'+C+' OS Fingerprinting') - osdetect(web) - raw_input(O+' [#] Press '+GR+'Enter'+O+' to continue...') - scanenum(web) - - elif v.strip() == '7': - print(B+' [!] Type Selected :'+C+' Banner Grab') - bannergrab(web) - raw_input(O+' [#] Press '+GR+'Enter'+O+' to continue...') - scanenum(web) - - elif v.strip() == '8': - print(B+' [!] Type Selected :'+C+' IP Crawler') - webscan(web) - raw_input(O+' [#] Press '+GR+'Enter'+O+' to continue...') - scanenumban() - scanenum(web) - - elif v.strip() == '9': - print(B+' [!] Type Selected :'+C+' Web Crawlers') - crawlers(web) - raw_input(O+' [#] Press '+GR+'Enter'+O+' to continue...') - scanenum(web) - - elif v.strip() == 'A': - print(' [!] Type Selected : All Modules') - time.sleep(0.5) - - print(B+' [*] Firing up module -->'+C+' WAF Analysis'+O) - waf(web) - print(B+' [!] Module Completed -->'+C+' WAF Analysis\n') - time.sleep(1) - - print(B+' [*] Firing up module -->'+C+' Port Scanning ') - portscan(web) - print(B+' [!] Module Completed -->'+C+' Port Scanning \n') - time.sleep(1) - - print(B+' [*] Firing up module -->'+C+' Interactive NMap') - nmapmain(web) - print(B+' [!] Module Completed -->'+C+' NMap\n') - time.sleep(1) - - print(B + ' [*] Firing up module -->' + C + ' WebTech Fingerprinting') - webtech(web) - print(B + ' [!] Module Completed -->' + C + ' WebTech\n') - time.sleep(1) - - print(B + ' [*] Firing up module -->' + C + ' SSL Enumeration') - ssltlsscan(web) - print(B + ' [!] Module Completed -->' + C + ' SSL Enumeration\n') - time.sleep(1) - - print(B + ' [*] Firing up module -->' + C + ' OS Detect') - osdetect(web) - print(B + ' [!] Module Completed -->' + C + ' OS Detect\n') - time.sleep(1) - - print(B + ' [*] Firing up module -->' + C + ' Banner Grabbing') - bannergrab(web) - print(B + ' [!] Module Completed -->' + C + ' Banner Grabbing\n') - time.sleep(1) - - print(B + ' [*] Firing up module -->' + C + ' Webserver Scanning') - webscan(web) - print(B + ' [!] Module Completed -->' + C + ' Webserver Scanning\n') - time.sleep(1) - - print(B+' [*] Firing up module -->'+C+' Crawlers') - crawlers(web) - print(B+' [!] Module Completed -->'+C+' Crawlers\n') - time.sleep(0.5) - - print(G+' [+] All modules successfully completed!') - time.sleep(0.5) - raw_input(O+' [#] Press '+GR+'Enter'+O+' to continue...') - print(GR+' [*] Going back...') - - elif v.strip() == '99': - print('[!] Back') - time.sleep(0.7) - - else: - dope = ['You high dude?','Hey there! Enter a valid option','Whoops! Thats not an option','Sorry fam! You just typed shit'] - print(dope[randint(0,3)]) - time.sleep(0.7) - os.system('clear') - scanenum(web) - diff --git a/core/Enumeration/scanenumban.py b/core/Enumeration/scanenumban.py deleted file mode 100644 index d8580093..00000000 --- a/core/Enumeration/scanenumban.py +++ /dev/null @@ -1,37 +0,0 @@ -#!/usr/bin/env python2 -# -*- coding: utf-8 -*- - -#-:-:-:-:-:-:-:-:-:-:-:-:# -# TIDoS Framework # -#-:-:-:-:-:-:-:-:-:-:-:-:# - -#This script is a part of TIDoS Framework -#https://github.com/theInfectedDrake/TIDoS-Framework - -from __future__ import print_function -import os -import time -from core.Core.arts import scanenumban_art - -def scanenumban(): - - os.system('clear') - time.sleep(0.7) - print(scanenumban_art) - print(""" - Choose from the following options: - -\033[1;34m [1] \033[1;36mRemote Server WAF Enumeration \033[0m(Generic) (54 WAFs) -\033[1;34m [2] \033[1;36mPort Scanning and Analysis \033[0m(Several Types) -\033[1;34m [3] \033[1;36mInteractive Scanning with NMap \033[0m(16 Preloaded modules) -\033[1;34m [4] \033[1;36mWeb Technologies Enumeration\033[0m(FrontEnd Technologies) -\033[1;34m [5] \033[1;36mRemote Server SSL Enumeration\033[0m(Absolute) -\033[1;34m [6] \033[1;36mOperating System Enumeration \033[0m(Absolute) -\033[1;34m [7] \033[1;36mGrab Banners on Services \033[0m(via Open Ports) -\033[1;34m [8] \033[1;36mScan all IP Addresses Linked to Domain \033[0m(CENSYS) -\033[1;34m [9] \033[1;36mLet loose Crawlers on the target \033[0m(Depth 1, 2 & 3) - -\033[1;34m [A] \033[1;36mAutomate all one by one on target - -\033[1;34m [99] \033[1;36mBack -""") diff --git a/core/Exploitation/__init__.py b/core/Exploitation/__init__.py deleted file mode 100644 index 73a0d197..00000000 --- a/core/Exploitation/__init__.py +++ /dev/null @@ -1,11 +0,0 @@ -#!/usr/bin/env python2 -# coding: utf-8 - -#-:-:-:-:-:-:-:-:-:-:-:-:# -# TIDoS Framework # -#-:-:-:-:-:-:-:-:-:-:-:-:# - -#This module requires TIDoS Framework -#https://github.com/theInfectedDrake/TIDoS-Framework - -pass diff --git a/core/Exploitation/colors.py b/core/Exploitation/colors.py deleted file mode 100644 index 96ed4433..00000000 --- a/core/Exploitation/colors.py +++ /dev/null @@ -1,37 +0,0 @@ -#!/usr/bin/env python2 - -#-:-:-:-:-:-:-:-:-:-:-:-:# -# TIDoS Framework # -#-:-:-:-:-:-:-:-:-:-:-:-:# - -#This module requires TIDoS Framework -#https://github.com/theInfectedDrake/TIDoS-Framework - -############################### -class color: - PURPLE = '\033[95m' - CYAN = '\033[96m' - DARKCYAN = '\033[36m' - BLUE = '\033[94m' - GREEN = '\033[92m' - YELLOW = '\033[93m' - RED = '\033[91m' - BOLD = '\033[1m' - UNDERLINE = '\033[4m' - END = '\033[0m' - HEADER = '\033[95m' - OKBLUE = '\033[94m' - OKGREEN = '\033[92m' - WARNING = '\033[93m' - FAIL = '\033[91m' - -W = '\033[1;0m' # white (normal) -R = '\033[1;31m' # red -G = '\033[1;32m' # green -O = '\033[1;33m' # orange -B = '\033[1;34m' # blue -P = '\033[1;35m' # purple -C = '\033[1;36m' # cyan -GR = '\033[1;37m' # gray -T = '\033[1;93m' # tan -############################### diff --git a/core/Exploitation/exploits.py b/core/Exploitation/exploits.py deleted file mode 100644 index 4d0f6b3e..00000000 --- a/core/Exploitation/exploits.py +++ /dev/null @@ -1,36 +0,0 @@ -#!/usr/bin/env python2 -# -*- coding: utf-8 -*- - -#-:-:-:-:-:-:-:-:-:-:-:-:# -# TIDoS Framework # -#-:-:-:-:-:-:-:-:-:-:-:-:# - -#This module requires TIDoS Framework -#https://github.com/theInfectedDrake/TIDoS-Framework - -from __future__ import print_function -import sys -import time -import os -from exploitsban import * -from colors import * -sys.path.append('modules/0x04-Exploitation+Loot/') - -from shellshock_exp import * - -def exploits(web): - - print('') - print(B+' [+] Module Selected : '+C+'Exploitation') - exploitsban() - time.sleep(0.3) - v = raw_input(GR+' [#] \033[1;4mTID\033[0m'+GR+' :> ' + color.END) - print('') - if v == '1': - print(' [!] Type Selected : Shellshock Exploit') - shellshock_exp(web) - print(O+' [!] Completed!') - time.sleep(1) - print('\n\n') - os.system('clear') - diff --git a/core/Exploitation/exploitsban.py b/core/Exploitation/exploitsban.py deleted file mode 100644 index 46411295..00000000 --- a/core/Exploitation/exploitsban.py +++ /dev/null @@ -1,25 +0,0 @@ -#!/usr/bin/env python2 -# coding: utf-8 - -#-:-:-:-:-:-:-:-:-:-:-:-:# -# TIDoS Framework # -#-:-:-:-:-:-:-:-:-:-:-:-:# - -#This module requires TIDoS Framework -#https://github.com/theInfectedDrake/TIDoS-Framework - -from __future__ import print_function -import os, time -from core.Core.arts import exploitsban_art - -def exploitsban(): - - os.system('clear') - print(" [!] Module Selected : Exploits\n\n") - time.sleep(0.5) - print(exploitsban_art) - print(''' -\033[1;36m [1] \033[1;34mShellShock Exploit\n -\033[1;36m [!info] \033[1;34m This module is still being worked on... -''') - diff --git a/core/Footprinting/Active_Recon/__init__.py b/core/Footprinting/Active_Recon/__init__.py deleted file mode 100644 index 73a0d197..00000000 --- a/core/Footprinting/Active_Recon/__init__.py +++ /dev/null @@ -1,11 +0,0 @@ -#!/usr/bin/env python2 -# coding: utf-8 - -#-:-:-:-:-:-:-:-:-:-:-:-:# -# TIDoS Framework # -#-:-:-:-:-:-:-:-:-:-:-:-:# - -#This module requires TIDoS Framework -#https://github.com/theInfectedDrake/TIDoS-Framework - -pass diff --git a/core/Footprinting/Active_Recon/activeban.py b/core/Footprinting/Active_Recon/activeban.py deleted file mode 100644 index 421ae084..00000000 --- a/core/Footprinting/Active_Recon/activeban.py +++ /dev/null @@ -1,56 +0,0 @@ -#!/usr/bin/env python2 -# coding: utf-8 - -#-:-:-:-:-:-:-:-:-:-:-:-:# -# TIDoS Framework # -#-:-:-:-:-:-:-:-:-:-:-:-:# - -#This module requires TIDoS Framework -#https://github.com/theInfectedDrake/TIDoS-Framework - -from __future__ import print_function -from colors import * -import time - -def activeban(): - - time.sleep(0.4) - print(G+' +----------------+') - print(G+' | '+O+'ACTIVE RECON'+G+' |') - print(G+' +----------------+') - time.sleep(0.3) - print('') - print(B+' [1]'+C+' Ping/NPing Enumeration'+W+' (Adaptative+Debug)') - time.sleep(0.04) - print(B+' [2]'+C+' Grab HTTP Headers'+W+' (Live Capture)') - time.sleep(0.04) - print(B+' [3]'+C+' Find Allowed HTTP Methods'+W+' (Via OPTIONS)') - time.sleep(0.04) - print(B+' [4]'+C+' Examine robots.txt and sitemap.xml') - time.sleep(0.04) - print(B+' [5]'+C+' Scrape Comments from Webpage'+W+' (Regex Based)') - time.sleep(0.04) - print(B+' [6]'+C+' Perform Advanced Traceroute'+W+' (TTL Based)') - time.sleep(0.04) - print(B+' [7]'+C+' Find Shared DNS Hosts'+W+' (NameServer Based)') - time.sleep(0.04) - print(B+' [8]'+C+' Examine SSL Certificate'+W+' (Absolute)') - time.sleep(0.04) - print(B+' [9]'+C+' CMS Detection '+W+'(185+ CMSs supported)') - time.sleep(0.04) - print(B+' [10]'+C+' Apache Status Disclosure'+W+' (File Based)') - time.sleep(0.04) - print(B+' [11]'+C+' WebDAV HTTP Enumeration'+W+' (SEARCH, PROFIND)') - time.sleep(0.04) - print(B+' [12]'+C+' Find PHPInfo File'+W+' (Regular Bruteforce)') - time.sleep(0.04) - print(B+' [13]'+C+' Enumerate Server behind website'+W) - time.sleep(0.04) - print(B+' [14]'+C+' Alternate Sites'+W+' (User-Agent Based)') - time.sleep(0.04) - print(B+' [15]'+C+' Common File Bruteforce'+W+' (5 modules)\n') - time.sleep(0.04) - print(B+' [A]'+C+' The Auto-Awesome Module\n') - time.sleep(0.04) - print(B+' [99]'+C+' Back\n') - diff --git a/core/Footprinting/Active_Recon/activeo.py b/core/Footprinting/Active_Recon/activeo.py deleted file mode 100644 index 466c943f..00000000 --- a/core/Footprinting/Active_Recon/activeo.py +++ /dev/null @@ -1,246 +0,0 @@ -#!/usr/bin/env python2 -# coding: utf-8 - -#-:-:-:-:-:-:-:-:-:-:-:-:# -# TIDoS Framework # -#-:-:-:-:-:-:-:-:-:-:-:-:# - -#This module requires TIDoS Framework -#https://github.com/theInfectedDrake/TIDoS-Framework - -from __future__ import print_function -import sys -import os -import time -import subprocess -import random -from random import randint -sys.path.append('modules/0x01-OSINT+Footprinting/0x02-ActiveReconnaissance/') - -from piwebenum import * -from grabhead import * -from httpmethods import * -from robot import * -from apachestat import * -from dav import * -from sharedns import * -from commentssrc import * -from sslcert import * -from activeban import * -from filebrute import * -from traceroute import * -from phpinfo import * -from cms import * -from serverdetect import * -from altsites import * -from colors import * - -def activeo(web): - - print(" [!] Module Selected : Active Reconnaissance\n\n") - activeban() - print('') - time.sleep(0.3) - v = raw_input (''+GR+' [#] \033[1;4mTID\033[0m'+GR+' :> ' + color.END) - print('') - if v.strip() == '1': - print(C+' [!] Type Selected : Ping/NPing Enumeration') - piwebenum(web) - print('\n\n') - raw_input(O+' [#] Press '+GR+'Enter'+O+' to continue...') - activeo(web) - - elif v.strip() == '2': - print(C+' [!] Type Selected : Grab HTTP Headers') - grabhead(web) - print('\n\n') - raw_input(O+' [#] Press '+GR+'Enter'+O+' to continue...') - activeo(web) - - elif v.strip() == '3': - print(C+' [!] Type Selected : HTTP Allowed Methods') - httpmethods(web) - print('\n\n') - raw_input(O+' [#] Press '+GR+'Enter'+O+' to continue...') - activeo(web) - - elif v.strip() == '4': - print(C+' [!] Type Selected : robots.txt and sitemap.xml Hunt') - robot(web) - print('\n\n') - raw_input(O+' [#] Press '+GR+'Enter'+O+' to continue...') - activeo(web) - - elif v.strip() == '5': - print(C+' [!] Type Selected : Scrape Comments') - commentssrc(web) - print('\n\n') - raw_input(O+' [#] Press '+GR+'Enter'+O+' to continue...') - activeo(web) - - elif v.strip() == '6': - print(C+' [!] Type Selected '+B+': Traceroute') - traceroute(web) - print('\n\n') - raw_input(O+' [#] Press '+GR+'Enter'+O+' to continue...') - activeo(web) - - elif v.strip() == '7': - print(C+' [!] Type Selected : DNS Hosts') - sharedns(web) - print('\n\n') - raw_input(O+' [#] Press '+GR+'Enter'+O+' to continue...') - activeo(web) - - elif v.strip() == '8': - print(C+' [!] Type Selected : SSL Certificate') - sslcert(web) - print('\n\n') - raw_input(O+' [#] Press '+GR+'Enter'+O+' to continue...') - activeo(web) - - elif v.strip() == '9': - print(C+' [!] Type Selected : CMS Detection') - cms(web) - print('\n\n') - raw_input(O+' [#] Press '+GR+'Enter'+O+' to continue...') - activeo(web) - - elif v.strip() == '10': - print(C+' [!] Type Selected : Apache Status') - apachestat(web) - print('\n\n') - raw_input(O+' [#] Press '+GR+'Enter'+O+' to continue...') - activeo(web) - - elif v.strip() == '11': - print(C+' [!] Type Selected : WebDAV HTTP Enumeration') - dav(web) - print('\n\n') - raw_input(O+' [#] Press '+GR+'Enter'+O+' to continue...') - activeo(web) - - elif v.strip() == '12': - print(C+' [!] Type Selected : PHPInfo Enumeration') - phpinfo(web) - print('\n\n') - raw_input(O+' [#] Press '+GR+'Enter'+O+' to continue...') - activeo(web) - - elif v.strip() == '13': - print(C+' [!] Type Selected : Server Detection') - serverdetect(web) - print('\n\n') - raw_input(O+' [#] Press '+GR+'Enter'+O+' to continue...') - activeo(web) - - elif v.strip() == '14': - print(C+' [!] Type Selected : Alternate Sites ') - altsites(web) - print('\n\n') - raw_input(O+' [#] Press '+GR+'Enter'+O+' to continue...') - activeo(web) - - elif v.strip() == '15': - print(C+' [!] Type Selected : File Bruteforcers') - filebrute(web) - print('\n\n') - raw_input(O+' [#] Press '+GR+'Enter'+O+' to continue...') - activeo(web) - - elif v.strip() == 'A': - print(C+' [!] Type Selected : All Modules') - time.sleep(0.5) - print(C+' [*] Firing up module -->'+B+' Ping Enum') - piwebenum(web) - print(C+' [!] Module Completed -->'+B+' PIng\n') - - time.sleep(1) - print(C+' [*] Firing up module -->'+B+' Grab Headers') - grabhead(web) - print(C+'\n [!] Module Completed -->'+B+' Grabhead\n') - - time.sleep(1) - print(C+' [*] Firing up module -->'+B+' Robots.txt Hunter') - robot(web) - print(C+'\n [!] Module Completed -->'+B+' Robot Hunter\n') - time.sleep(1) - - print(C+' [*] Firing up module -->'+B+' Comments Scraper') - commentssrc(web) - print(C+'\n [!] Module Completed -->'+B+' Comments Src\n') - time.sleep(1) - - print(C+' [*] Firing up module -->'+B+' Traceroute') - traceroute(web) - print(C+'\n [!] Module Completed -->'+B+' Traceroute\n') - time.sleep(1) - - print(C+' [*] Firing up module -->'+B+' Shared DNS Servers') - sharedns(web) - print(C+'\n [!] Module Completed -->'+B+' Shared DNS Servers\n') - time.sleep(1) - - print(C+' [*] Firing up module -->'+B+' SSl Certificate Info') - sslcert(web) - print(C+'\n [!] Module Completed -->'+B+' SSl Cert\n') - time.sleep(1) - - print(C+' [*] Firing up module -->'+B+' CMS Detection') - cms(web) - print(C+'\n [!] Module Completed -->'+B+' CMS Detect\n') - time.sleep(1) - - print(C+' [*] Firing up module -->'+B+' WebDAV HTTP Profiling') - dav(web) - print(C+'\n [!] Module Completed -->'+B+' WebDAV HTTP Profiling\n') - time.sleep(1) - - print(C+' [*] Firing up module -->'+B+' Apache Status') - apachestat(web) - print(C+'\n [!] Module Completed -->'+B+' Apache Status\n') - time.sleep(1) - - print(C+' [*] Firing up module -->'+B+' PHPInfo') - phpinfo(web) - print(C+'\n [!] Module Completed -->'+B+' PHPInfo\n') - time.sleep(1) - - print(C+' [*] Firing up module -->'+B+' OS Fingerprinting') - osdetect(web) - print(C+'\n [!] Module Completed -->'+B+' OS Detect\n') - time.sleep(1) - - print(C+' [*] Firing up module -->'+B+' File bruteforcer') - filebrute(web) - print(C+'\n [!] Module Completed -->'+B+' File Bruteforcer\n') - time.sleep(1) - - print(C+' [*] Firing up module -->'+B+' Server Detection') - serverdetect(web) - print(C+'\n [!] Module Completed -->'+B+' Server Detect\n') - time.sleep(1) - - print(C+' [*] Firing up module -->'+B+' Alt. Sites') - altsites(web) - print(C+'\n [!] Module Completed -->'+B+' Alt. Sites\n') - time.sleep(1) - - print(C+'\n [!] All scantypes have been tested on target...') - raw_input(O+' [#] Press '+GR+'Enter'+O+' to continue...') - print(C+' [*] Going back to menu...') - time.sleep(3) - os.system('clear') - activeo(web) - - elif v.strip() == '99': - print(C+' [*] Back to the menu !') - os.system('clear') - - else: - dope = ['You high dude?','Shit! Enter a valid option','Whoops! Thats not an option','Sorry! You just typed shit'] - print(dope[randint(0,3)]) - time.sleep(0.7) - os.system('clear') - activeo(web) - diff --git a/core/Footprinting/Info_Disc/__init__.py b/core/Footprinting/Info_Disc/__init__.py deleted file mode 100644 index 73a0d197..00000000 --- a/core/Footprinting/Info_Disc/__init__.py +++ /dev/null @@ -1,11 +0,0 @@ -#!/usr/bin/env python2 -# coding: utf-8 - -#-:-:-:-:-:-:-:-:-:-:-:-:# -# TIDoS Framework # -#-:-:-:-:-:-:-:-:-:-:-:-:# - -#This module requires TIDoS Framework -#https://github.com/theInfectedDrake/TIDoS-Framework - -pass diff --git a/core/Footprinting/Info_Disc/infodisc.py b/core/Footprinting/Info_Disc/infodisc.py deleted file mode 100644 index 1ceec3c5..00000000 --- a/core/Footprinting/Info_Disc/infodisc.py +++ /dev/null @@ -1,124 +0,0 @@ -#!/usr/bin/env python2 -# coding:'+B+' utf-8 - -#-:'+B+'-:-:-:-:-:-:-:-:-:-:-:# -# TIDoS Framework # -#-:-:-:-:-:-:-:-:-:-:-:-:# - -#This module requires TIDoS Framework -#https://github.com/theInfectedDrake/TIDoS-Framework - -from __future__ import print_function -import sys -import os -import time -import subprocess -import random -from random import randint -from subprocess import call -sys.path.append('modules/0x01-OSINT+Footprinting/0x03-InformationDisclosure/') - -from credit import * -from emailext import * -from errors import * -from phone import * -from ssn import * -from infodiscban import * -from colors import * -from internalip import * - -def infodisc(web): - - print(" [!] Module Selected : Information Disclosure\n\n") - infodiscban() - print('') - time.sleep(0.3) - v = raw_input (''+GR+' [#] \033[1;4mTID\033[0m'+GR+' :> ' + color.END) - print('') - if v == '1': - print(C+' [!] Type Selected :'+B+' Credit Card Enumeration') - credit(web) - print('\n\n') - raw_input(O+' [#] Press '+GR+'Enter'+O+' to continue...') - infodisc(web) - - elif v == '2': - print(C+' [!] Type Selected :'+B+' Extract All Emails') - emailext(web) - print('\n\n') - raw_input(O+' [#] Press '+GR+'Enter'+O+' to continue...') - infodisc(web) - - elif v == '3': - print(C+' [!] Type Selected :'+B+' Enumerate Errors + FPD') - errors(web) - print('\n\n') - raw_input(O+' [#] Press '+GR+'Enter'+O+' to continue...') - infodisc(web) - - elif v == '4': - print(C+' [!] Type Selected :'+B+' Internal IP disclosure') - internalip(web) - print('\n\n') - raw_input(O+' [#] Press '+GR+'Enter'+O+' to continue...') - infodisc(web) - - elif v == '5': - print(C+' [!] Type Selected :'+B+' Phone Numbers Extract') - phone(web) - print('\n\n') - raw_input(O+' [#] Press '+GR+'Enter'+O+' to continue...') - infodisc(web) - - elif v == '6': - print(C+' [!] Type Selected :'+B+' Social Security Numbers') - ssn(web) - print('\n\n') - raw_input(O+' [#] Press '+GR+'Enter'+O+' to continue...') - infodisc(web) - - elif v == 'A': - print(C+' [!] Type Selected :'+B+' All Modules') - time.sleep(0.5) - print(C+' [*] Firing up module -->'+B+' Credit Cards') - credit(web) - print(C+' [!] Module Completed -->'+B+' Credit Cards\n') - - time.sleep(1) - print(C+' [*] Firing up module -->'+B+' Email Extraction') - emailext(web) - print(C+' [!] Module Completed -->'+B+' Email Hunt\n') - - time.sleep(1) - print(C+' [*] Firing up module -->'+B+' Errors Enumeration + FPD') - errors(web) - print(C+' [!] Module Completed -->'+B+' Errors Enumeration\n') - time.sleep(1) - - print(C+' [*] Firing up module -->'+B+' Extract Phone Numbers') - phone(web) - print(C+' [!] Module Completed -->'+B+' Extract Phone Numbers\n') - time.sleep(1) - - print(C+' [*] Firing up module -->'+B+' Extract Social Security Numbers') - ssn(web) - print(C+' [!] Module Completed -->'+B+' Extract SSN\n') - time.sleep(1) - - print(C+' [!] All scantypes have been tested on target...') - time.sleep(1) - print(C+' [*] Going back to menu...') - infodisc(web) - - elif v == '99': - print(C+' [*] Back to the menu !') - time.sleep(0.8) - os.system('clear') - - else: - dope = ['You high dude?','Shit! Enter a valid option','Whoops! Thats not an option','Sorry! You just typed shit'] - print(dope[randint(0,3)]) - time.sleep(0.7) - os.system('clear') - infodisc(web) - diff --git a/core/Footprinting/Info_Disc/infodiscban.py b/core/Footprinting/Info_Disc/infodiscban.py deleted file mode 100644 index c625b2b4..00000000 --- a/core/Footprinting/Info_Disc/infodiscban.py +++ /dev/null @@ -1,38 +0,0 @@ -#!/usr/bin/env python2 -# coding: utf-8 - -#-:-:-:-:-:-:-:-:-:-:-:-:# -# TIDoS Framework # -#-:-:-:-:-:-:-:-:-:-:-:-:# - -#This module requires TIDoS Framework -#https://github.com/theInfectedDrake/TIDoS-Framework - -from __future__ import print_function -from colors import * -import time - -def infodiscban(): - - time.sleep(0.4) - print(G+'\n +-------------------+') - print(G+' | '+O+'INFO DISCLOSURE'+G+' |') - print(G+' +-------------------+') - time.sleep(0.3) - print('') - print(B+' [1]'+C+' Find out Credit Cards '+W+'(if disclosed in plain text)') - time.sleep(0.1) - print(B+' [2]'+C+' Extract out all existing emails'+W+' (Absolute)') - time.sleep(0.1) - print(B+' [3]'+C+' Enumerate Errors '+W+'(Includes Full Path Disclosure)') - time.sleep(0.1) - print(B+' [4]'+C+' Find out any leaks of internal IP addresses') - time.sleep(0.1) - print(B+' [5]'+C+' Extract out all Phone Numbers '+W+'(if plaintext disclosure)') - time.sleep(0.1) - print(B+' [6]'+C+' Extract out all Social Security Numbers '+W+'(US Based)\n') - time.sleep(0.1) - print(B+' [A]'+C+' Start up ALL modules 1 by 1\n') - time.sleep(0.1) - print(B+' [99]'+C+' Back\n') - diff --git a/core/Footprinting/Passive_Recon/__init__.py b/core/Footprinting/Passive_Recon/__init__.py deleted file mode 100644 index 73a0d197..00000000 --- a/core/Footprinting/Passive_Recon/__init__.py +++ /dev/null @@ -1,11 +0,0 @@ -#!/usr/bin/env python2 -# coding: utf-8 - -#-:-:-:-:-:-:-:-:-:-:-:-:# -# TIDoS Framework # -#-:-:-:-:-:-:-:-:-:-:-:-:# - -#This module requires TIDoS Framework -#https://github.com/theInfectedDrake/TIDoS-Framework - -pass diff --git a/core/Footprinting/Passive_Recon/passiveban.py b/core/Footprinting/Passive_Recon/passiveban.py deleted file mode 100644 index 190ac7c6..00000000 --- a/core/Footprinting/Passive_Recon/passiveban.py +++ /dev/null @@ -1,74 +0,0 @@ -#!/usr/bin/env python2 -# -*- coding: utf-8 -*- - -#-:-:-:-:-:-:-:-:-:-:-:-:# -# TIDoS Framework # -#-:-:-:-:-:-:-:-:-:-:-:-:# - -#Author: @_tID -#This module requires TIDoS Framework -#https://github.com/theInfectedDrake/TIDoS-Framework - -from __future__ import print_function -import time -from colors import * - -def passiveban(): - - time.sleep(0.4) - print(G+' +-----------------+') - print(G+' | '+O+'PASSIVE RECON '+G+'|') - print(G+' +-----------------+') - time.sleep(0.6) - print('') - print(B+' [1] '+C+'Ping Check '+W+'(Using external APi)') - time.sleep(0.04) - print(B+' [2] '+C+'WhoIS Lookup '+W+'(Get domain info)') - time.sleep(0.04) - print(B+' [3] '+C+'GeoIP Lookup '+W+'(Pinpoint Server Location)') - time.sleep(0.04) - print(B+' [4]'+C+' DNS Configuration Lookup'+W+' (DNSDump)') - time.sleep(0.04) - print(B+' [5]'+C+' Gather Subdomains '+W+'(Only indexed ones)') - time.sleep(0.04) - print(B+' [6]'+C+' Reverse DNS Configuration Lookup ') - time.sleep(0.04) - print(B+' [7]'+C+' Subnet Enumeration '+W+'(Class Based)') - time.sleep(0.04) - print(B+' [8]'+C+' Reverse IP Lookup '+W+'(Hosts on same server)') - time.sleep(0.04) - print(B+' [9]'+C+' Domain IP History '+W+'(IP History Instances)') - time.sleep(0.04) - print(B+' [10]'+C+' Gather All Links from WebPage '+W+'(Indexed ones)') - time.sleep(0.04) - print(B+' [11]'+C+' Google Search '+W+'(Search your own Query or Dork)') - time.sleep(0.04) - print(B+' [12] '+C+'Google Dorking '+W+'(Multiple Modules)') - time.sleep(0.04) - print(B+' [13] '+C+'Wayback Machine Lookup '+W+'(pure backups)') - time.sleep(0.04) - print(B+' [14] '+C+'Hacked Email Check '+W+'(Breached/leaked emails)') - time.sleep(0.04) - print(B+' [15] '+C+'Email to Domain Resolver '+W+'(Email whois)') - time.sleep(0.04) - print(B+' [16] '+C+'Email Enumeration via Google Groups '+W+'') - time.sleep(0.04) - print(B+' [17] '+C+'Check Alias Availability '+W+'(Social Networks)') - time.sleep(0.04) - print(B+' [18] '+C+'Find PasteBin Posts '+W+'(Domain Based)') - time.sleep(0.04) - print(B+' [19] '+C+'LinkedIn Gathering '+W+'(Employees, Companies)') - time.sleep(0.04) - print(B+' [20] '+C+'Google Plus Gathering '+W+'(Profiles Crawling)') - time.sleep(0.04) - print(B+' [21] '+C+'Public Contact Info Gathering '+W+'(Full Contact)') - time.sleep(0.04) - print(B+' [22] '+C+'CENSYS Domain Reconnaissance '+W+'(CENSYS.IO)') - time.sleep(0.04) - print(B+' [23] '+C+'Threat Intelligence Gathering '+W+'(Bad IPs)\n') - time.sleep(0.04) - print(B+' [A] '+C+'The Auto-Awesome Module '+W+'(Unleash the Beast)\n') - time.sleep(0.04) - print(B+' [99] '+C+'Back'+W+'\n') - time.sleep(0.3) - diff --git a/core/Footprinting/Passive_Recon/passiveo.py b/core/Footprinting/Passive_Recon/passiveo.py deleted file mode 100644 index 3966dd3c..00000000 --- a/core/Footprinting/Passive_Recon/passiveo.py +++ /dev/null @@ -1,324 +0,0 @@ -#!/usr/bin/env python2 -#-*- coding: utf-8 -*- - -#-:-:-:-:-:-:-:-:-:-:-:-:# -# TIDoS Framework # -#-:-:-:-:-:-:-:-:-:-:-:-:# - -#This module requires TIDoS Framework -#https://github.com/theInfectedDrake/TIDoS-Framework - -from __future__ import print_function -import sys -import time -import os -from random import randint -sys.path.append('modules/0x01-OSINT+Footprinting/0x01-PassiveReconnaissance/') - -from dnschk import * -from passiveban import * -from piweb import * -from getgeoip import * -from revip import * -from revdns import * -from getconinfo import * -from subdom import * -from googlenum import * -from links import * -from censysdom import * -from subnet import * -from hackedmail import * -from iphistory import * -from mailtodom import * -from checkuser import * -from googlegroups import * -from threatintel import * -from webarchive import * -from googledorker import * -from googleSearch import * -from whoischeckup import * -from pastebin import * -from linkedin import * -from colors import * - -def passiveo(web): - - print(" [!] Module Selected : Passive Reconnaissance\n") - passiveban() - v = raw_input (''+GR+' [#] \033[1;4mTID\033[0m'+GR+' :> ' + color.END) - print('\n\n') - if v.strip() == '1': - print(C+' [!] Type Selected '+B+': Ping Check') - piweb(web) - raw_input(O+' [#] Press '+GR+'Enter'+O+' to continue...') - passiveo(web) - - elif v.strip() == '2': - print(C+' [!] Type Selected '+B+': WhoIS Checkup') - whoischeckup(web) - raw_input(O+' [#] Press '+GR+'Enter'+O+' to continue...') - passiveo(web) - - elif v.strip() == '3': - print(C+' [!] Type Selected '+B+': GeoIP Lookup') - getgeoip(web) - raw_input(O+' [#] Press '+GR+'Enter'+O+' to continue...') - passiveo(web) - - elif v.strip() == '4': - print(C+' [!] Type Selected '+B+': DNS Lookup') - dnschk(web) - raw_input(O+' [#] Press '+GR+'Enter'+O+' to continue...') - passiveo(web) - - elif v.strip() == '5': - print(C+' [!] Type Selected '+B+': Subdomain Scan') - subdom(web) - raw_input(O+' [#] Press '+GR+'Enter'+O+' to continue...') - passiveo(web) - - elif v.strip() == '6': - print(C+' [!] Type Selected '+B+': Reverse DNS Lookup') - revdns(web) - raw_input(O+' [#] Press '+GR+'Enter'+O+' to continue...') - passiveo(web) - - elif v.strip() == '7': - print(C+' [!] Type Selected : Subnet Enumeration') - subnet(web) - raw_input(O+' [#] Press '+GR+'Enter'+O+' to continue...') - passiveo(web) - - elif v.strip() == '8': - print(C+' [!] Type Selected '+B+': Reverse IP Lookup') - revip(web) - raw_input(O+' [#] Press '+GR+'Enter'+O+' to continue...') - passiveo(web) - - elif v.strip() == '9': - print(C+' [!] Type Selected '+B+': IP History') - iphistory(web) - raw_input(O+' [#] Press '+GR+'Enter'+O+' to continue...') - passiveo(web) - - elif v.strip() == '10': - print(C+' [!] Type Selected '+B+': Page Links') - links(web) - raw_input(O+' [#] Press '+GR+'Enter'+O+' to continue...') - passiveo(web) - - elif v.strip() == '11': - print(C+' [!] Type Selected '+B+': Google Search') - googleSearch() - raw_input(O+' [#] Press '+GR+'Enter'+O+' to continue...') - passiveo(web) - - elif v.strip() == '12': - print(C+' [!] Type Selected '+B+': Google Dorker') - googledorker(web) - raw_input(O+' [#] Press '+GR+'Enter'+O+' to continue...') - passiveo(web) - - elif v.strip() == '13': - print(C+' [!] Type Selected '+B+': Wayback Machine') - webarchive(web) - raw_input(O+' [#] Press '+GR+'Enter'+O+' to continue...') - passiveo(web) - - elif v.strip() == '14': - print(C+' [!] Type Selected '+B+': Hacked Email Check') - hackedmail() - raw_input(O+' [#] Press '+GR+'Enter'+O+' to continue...') - passiveo(web) - - elif v.strip() == '15': - print(C+' [!] Type Selected '+B+': Mail to Domain') - mailtodom() - raw_input(O+' [#] Press '+GR+'Enter'+O+' to continue...') - passiveo(web) - - elif v.strip() == '16': - print(C+' [!] Type Selected '+B+': Google Groups Enum') - googlegroups(web) - raw_input(O+' [#] Press '+GR+'Enter'+O+' to continue...') - passiveo(web) - - elif v.strip() == '17': - print(C+' [!] Type Selected '+B+': Check Username') - checkuser(web) - raw_input(O+' [#] Press '+GR+'Enter'+O+' to continue...') - passiveo(web) - - elif v.strip() == '18': - print(C+' [!] Type Selected '+B+': PasteBin Posts') - pastebin(web) - raw_input(O+' [#] Press '+GR+'Enter'+O+' to continue...') - passiveo(web) - - elif v.strip() == '19': - print(C+' [!] Type Selected '+B+': LinkedIn Gathering') - linkedin(web) - raw_input(O+' [#] Press '+GR+'Enter'+O+' to continue...') - passiveo(web) - - elif v.strip() == '20': - print(C+' [!] Type Selected '+B+': Google Plus Gathering') - googlenum(web) - raw_input(O+' [#] Press '+GR+'Enter'+O+' to continue...') - passiveo(web) - - elif v.strip() == '21': - print(C+' [!] Type Selected '+B+': Public Contact Info') - getconinfo(web) - raw_input(O+' [#] Press '+GR+'Enter'+O+' to continue...') - passiveo(web) - - elif v.strip() == '22': - print(C+' [!] Type Selected '+B+': CENSYS Gathering') - censysdom(web) - raw_input(O+' [#] Press '+GR+'Enter'+O+' to continue...') - passiveo(web) - - elif v.strip() == '23': - print(C+' [!] Type Selected '+B+': Threat Intel Gathering') - threatintel(web) - raw_input(O+' [#] Press '+GR+'Enter'+O+' to continue...') - passiveo(web) - - elif v.strip() == '99': - print(C+' [*] Back!') - time.sleep(0.7) - os.system('clear') - - elif v.strip() == 'A': - print(C+' [!] Type Selected '+B+': All Modules\n') - time.sleep(0.5) - - print(C+' [*] Firing up module -->'+O+' Ping Check') - piweb(web) - print(C+'\n [!] Module Completed -->'+O+' Piweb\n') - time.sleep(1) - - print(C+' [*] Firing up module -->'+O+' WHOIS ') - whoischeckup(web) - print(C+'\n [!] Module Completed -->'+O+' WHOIS\n') - time.sleep(1) - - print(C+' [*] Firing up module -->'+O+' GeoIP Lookup ') - getgeoip(web) - print(C+'\n [!] Module Completed -->'+O+' GeoIP\n') - time.sleep(1) - - print(C+' [*] Firing up module -->'+O+' DNS Enumeration ') - dnschk(web) - print(C+'\n [!] Module Completed -->'+O+' DNS Enum\n') - time.sleep(1) - - print(C+' [*] Firing up module -->'+O+' Subdomain Scan ') - subdom(web) - print(C+'\n [!] Module Completed -->'+O+' Subdom\n') - time.sleep(1) - - print(C+' [*] Firing up module -->'+O+' Subnet Calc. ') - subnet(web) - print(C+'\n [!] Module Completed -->'+O+' Subnet Calculation\n') - time.sleep(1) - - print(C+' [*] Firing up module -->'+O+' Reverse DNS Lookup ') - revdns(web) - print(C+'\n [!] Module Completed -->'+O+' RevDNS\n') - time.sleep(1) - - print(C+' [*] Firing up module -->'+O+' IP History Lookup ') - iphistory(web) - print(C+'\n [!] Module Completed -->'+O+' RevIP\n') - time.sleep(1) - - print(C+' [*] Firing up module -->'+O+' Reverse IP Lookup ') - revip(web) - print(C+'\n [!] Module Completed -->'+O+' RevIP\n') - time.sleep(1) - - print(C+' [*] Firing up module -->'+O+' Web Links ') - links(web) - print(C+'\n [!] Module Completed -->'+O+' Web Links\n') - time.sleep(1) - - print(C+' [!] Firing up module -->'+O+' Google Search') - googleSearch() - print(C+'\n [!] Module Completed -->'+O+' GSearch\n') - time.sleep(1) - - print(C+' [!] Firing up module -->'+O+' WayBack Machine') - webarchive(web) - print(C+'\n [!] Module Completed -->'+O+' WayBack Machine\n') - time.sleep(1) - - print(C+' [!] Firing up module -->'+O+' Hacked Email Checker') - hackedmail() - print(C+'\n [!] Module Completed -->'+O+' Hacked Email\n') - time.sleep(1) - - print(C+' [!] Firing up module -->'+O+' Mail to Domain') - mailtodom() - print(C+'\n [!] Module Completed -->'+O+' Mail to Domain\n') - time.sleep(1) - - print(C+' [*] Firing up module -->'+O+' Google Groups Enum') - googlegroups(web) - print(C+'\n [!] Module Completed -->'+O+' GGroups\n') - time.sleep(1) - - print(C+' [*] Firing up module -->'+O+' Check Username') - checkuser(web) - print(C+'\n [!] Module Completed -->'+O+' Username\n') - time.sleep(1) - - print(C+' [*] Firing up module -->'+O+' LinkedIn gathering') - linkedin(web) - print(C+'\n [!] Module Completed -->'+O+' LinkedIn\n') - time.sleep(1) - - print(C+' [*] Firing up module -->'+O+' Pastebin Posts') - pastebin(web) - print(C+'\n [!] Module Completed -->'+O+' Pastebin\n') - time.sleep(1) - - print(C+' [*] Firing up module -->'+O+' Google Plus Gathering') - googlenum(web) - print(C+'\n [!] Module Completed -->'+O+' Google Plus Gathering\n') - time.sleep(1) - - print(C+' [*] Firing up module -->'+O+' Google Dorker') - googledorker(web) - print(C+'\n [!] Module Completed -->'+O+' GDorker\n') - time.sleep(1) - - print(C+' [*] Firing up module -->'+O+' Public Contact Info') - getconinfo(web) - print(C+'\n [!] Module Completed -->'+O+' Public Contact info\n') - time.sleep(1) - - print(C+' [*] Firing up module -->'+O+' Gathering via CENSYS') - censysdom(web) - print(C+'\n [!] Module Completed -->'+O+' CENSYS Gathering\n') - time.sleep(1) - - print(C+' [*] Firing up module -->'+O+' Threat Intelligence') - threatintel(web) - print(C+'\n [!] Module Completed -->'+O+' Threat Intelligence\n') - time.sleep(1) - - print(G+' [+] All modules successfully completed!') - time.sleep(3) - raw_input(O+' [#] Press '+GR+'Enter'+O+' to continue...') - print(GR+' [*] Going back...') - os.system('clear') - passiveo(web) - - else: - dope = ['You high dude?','Shit! Enter a valid option','Whoops! Thats not an option','Sorry! You just typed shit'] - print(C+'\n [!] '+dope[randint(0,3)]) - os.system('clear') - passiveo(web) - diff --git a/core/Footprinting/__init__.py b/core/Footprinting/__init__.py deleted file mode 100644 index 73a0d197..00000000 --- a/core/Footprinting/__init__.py +++ /dev/null @@ -1,11 +0,0 @@ -#!/usr/bin/env python2 -# coding: utf-8 - -#-:-:-:-:-:-:-:-:-:-:-:-:# -# TIDoS Framework # -#-:-:-:-:-:-:-:-:-:-:-:-:# - -#This module requires TIDoS Framework -#https://github.com/theInfectedDrake/TIDoS-Framework - -pass diff --git a/core/Footprinting/colors.py b/core/Footprinting/colors.py deleted file mode 100644 index 96ed4433..00000000 --- a/core/Footprinting/colors.py +++ /dev/null @@ -1,37 +0,0 @@ -#!/usr/bin/env python2 - -#-:-:-:-:-:-:-:-:-:-:-:-:# -# TIDoS Framework # -#-:-:-:-:-:-:-:-:-:-:-:-:# - -#This module requires TIDoS Framework -#https://github.com/theInfectedDrake/TIDoS-Framework - -############################### -class color: - PURPLE = '\033[95m' - CYAN = '\033[96m' - DARKCYAN = '\033[36m' - BLUE = '\033[94m' - GREEN = '\033[92m' - YELLOW = '\033[93m' - RED = '\033[91m' - BOLD = '\033[1m' - UNDERLINE = '\033[4m' - END = '\033[0m' - HEADER = '\033[95m' - OKBLUE = '\033[94m' - OKGREEN = '\033[92m' - WARNING = '\033[93m' - FAIL = '\033[91m' - -W = '\033[1;0m' # white (normal) -R = '\033[1;31m' # red -G = '\033[1;32m' # green -O = '\033[1;33m' # orange -B = '\033[1;34m' # blue -P = '\033[1;35m' # purple -C = '\033[1;36m' # cyan -GR = '\033[1;37m' # gray -T = '\033[1;93m' # tan -############################### diff --git a/core/Footprinting/footprint.py b/core/Footprinting/footprint.py deleted file mode 100644 index eb99ee8f..00000000 --- a/core/Footprinting/footprint.py +++ /dev/null @@ -1,57 +0,0 @@ -#!/usr/bin/env python2 -# -*- coding: utf-8 -*- - -#-:-:-:-:-:-:-:-:-:-:-:-:# -# TIDoS Framework # -#-:-:-:-:-:-:-:-:-:-:-:-:# - -#This module requires TIDoS Framework -#https://github.com/theInfectedDrake/TIDoS-Framework - -from __future__ import print_function -import os -import time - -# Get module imports -from colors import * -from footprintban import * -from Info_Disc.infodisc import * -from Active_Recon.activeo import * -from Passive_Recon.passiveo import * - -def footprint(web): - - print(B+' [+] Module Selected : '+C+'Footprinting') - footprintban() # banner - m = raw_input(O+' [#] \033[1;4mTID\033[0m'+GR+' :> ' + color.END) - print('') - - if m.strip() == '1': - passiveo(web) # passive recon module - print('\n') - raw_input(O+' [#] Press '+GR+'Enter'+O+' to continue...') - footprint(web) - - elif m.strip() == '2': - activeo(web) # active recon module - print('\n') - raw_input(O+' [#] Press '+GR+'Enter'+O+' to continue...') - footprint(web) - - elif m.strip() == '3': - infodisc(web) # information disclosure modules - print('\n') - raw_input(O+' [#] Press '+GR+'Enter'+O+' to continue...') - footprint(web) - - elif m.strip() == '99': # get back to main module - print(' [+] Back!') - - else: - - print('') - dope = [' [*] You high dude?',' [*] Hey there! Enter a valid option',' [*] Whoops! Thats not an option',' [*] Sorry fam! You just typed shit'] # troll stuff :p - print(dope[randint(0,3)]) - time.sleep(0.5) - footprint(web) - diff --git a/core/Footprinting/footprintban.py b/core/Footprinting/footprintban.py deleted file mode 100644 index 37375b8c..00000000 --- a/core/Footprinting/footprintban.py +++ /dev/null @@ -1,30 +0,0 @@ -#!/usr/bin/env python2 -# coding: utf-8 - -#-:-:-:-:-:-:-:-:-:-:-:-:# -# TIDoS Framework # -#-:-:-:-:-:-:-:-:-:-:-:-:# - -#This module requires TIDoS Framework -#https://github.com/theInfectedDrake/TIDoS-Framework - -from __future__ import print_function -import os, time -from colors import * -from core.Core.arts import footprintban_art - -def footprintban(): - - time.sleep(0.5) - os.system('clear') - print(G+' [!] Module Loaded : Reconnaissance\n') - print(footprintban_art) - print(""" -Choose from the following options: - -\033[1;34m [1] \033[1;36mPassive Footprinting \033[1;0m(Open Source Intelligence) -\033[1;34m [2] \033[1;36mActive Reconnaissance \033[1;0m(Gather via Interaction) -\033[1;34m [3] \033[1;36mInformation Disclosure \033[1;0m(Errors, Emails, etc) - -\033[1;34m [99] \033[1;36mBack -""") diff --git a/core/Vulnlysis/Misc_Bugs/__init__.py b/core/Vulnlysis/Misc_Bugs/__init__.py deleted file mode 100644 index 73a0d197..00000000 --- a/core/Vulnlysis/Misc_Bugs/__init__.py +++ /dev/null @@ -1,11 +0,0 @@ -#!/usr/bin/env python2 -# coding: utf-8 - -#-:-:-:-:-:-:-:-:-:-:-:-:# -# TIDoS Framework # -#-:-:-:-:-:-:-:-:-:-:-:-:# - -#This module requires TIDoS Framework -#https://github.com/theInfectedDrake/TIDoS-Framework - -pass diff --git a/core/Vulnlysis/Misc_Bugs/webbugs.py b/core/Vulnlysis/Misc_Bugs/webbugs.py deleted file mode 100644 index 6486f257..00000000 --- a/core/Vulnlysis/Misc_Bugs/webbugs.py +++ /dev/null @@ -1,202 +0,0 @@ -#!/usr/bin/env python2 -# coding: utf-8 - -#-:-:-:-:-:-:-:-:-:-:-:-:# -# TIDoS Framework # -#-:-:-:-:-:-:-:-:-:-:-:-:# - -#This module requires TIDoS Framework -#https://github.com/theInfectedDrake/TIDoS-Framework - -from __future__ import print_function -import time -import os -import sys -sys.path.append('modules/0x03-Vulnerability+Analysis/0x02-MisconfigurationBugs/') - -from icors import * -from ssscript import * -from clickjack import * -from zone import * -from webbugsban import * -from hhi import * -from netmisc import * -from cloudflaremisc import * -from hsts import * -from sessionfix import * -from headers import * -from colors import * -from xsstrace import * -from cookiecheck import * -from mailspoof import * - -def webbugs(web): - - print(W+'\n [*] Type Selected : Basic Web Bugs and Misconfigurations...') - webbugsban() - v = raw_input(O+B+' [#] \033[4mTID\033[1;0m '+GR+':> ' + color.END) - print('\n') - if v.strip() == '1': - print(B+' [!] Type Selected :'+C+' iCORS') - icors(web) - raw_input(O+' [#] Press '+GR+'Enter'+O+' to continue...') - webbugs(web) - - elif v.strip() == '2': - print(B+' [!] Type Selected :'+C+' Same Site Scripting') - ssscript(web) - raw_input(O+' [#] Press '+GR+'Enter'+O+' to continue...') - webbugs(web) - - elif v.strip() == '3': - print(B+' [!] Type Selected :'+C+' Clickjack') - clickjack(web) - raw_input(O+' [#] Press '+GR+'Enter'+O+' to continue...') - webbugs(web) - - elif v.strip() == '4': - print(B+' [!] Type Selected :'+C+' Zone Transfer') - zone(web) - raw_input(O+' [#] Press '+GR+'Enter'+O+' to continue...') - webbugs(web) - - elif v.strip() == '5': - print(B+' [!] Type Selected :'+C+' Cookie Check') - cookiecheck(web) - raw_input(O+' [#] Press '+GR+'Enter'+O+' to continue...') - webbugs(web) - - elif v.strip() == '6': - print(B+' [!] Type Selected :'+C+' Sec. Headers') - headers(web) - raw_input(O+' [#] Press '+GR+'Enter'+O+' to continue...') - webbugs(web) - - elif v.strip() == '7': - print(B+' [!] Type Selected :'+C+' Cloudflare Misconfig.') - cloudflaremisc(web) - raw_input(O+' [#] Press '+GR+'Enter'+O+' to continue...') - webbugs(web) - - elif v.strip() == '8': - print(B+' [!] Type Selected :'+C+' HSTS Check') - hsts(web) - raw_input(O+' [#] Press '+GR+'Enter'+O+' to continue...') - webbugs(web) - - elif v.strip() == '9': - print(B+' [!] Type Selected :'+C+' Cross Site Tracing') - xsstrace(web) - raw_input(O+' [#] Press '+GR+'Enter'+O+' to continue...') - webbugs(web) - - elif v.strip() == '10': - print(B+' [!] Type Selected :'+C+' Telnet Enabled') - netmisc(web) - raw_input(O+' [#] Press '+GR+'Enter'+O+' to continue...') - webbugs(web) - - elif v.strip() == '11': - print(B+' [!] Type Selected :'+C+' Email Spoof') - mailspoof(web) - raw_input(O+' [#] Press '+GR+'Enter'+O+' to continue...') - webbugs(web) - - elif v.strip() == '12': - print(B+' [!] Type Selected :'+C+' Host Header Injection') - hhi(web) - raw_input(O+' [#] Press '+GR+'Enter'+O+' to continue...') - webbugs(web) - - elif v.strip() == '13': - print(B+' [!] Type Selected :'+C+' Cookie Injection') - sessionfix(web) - raw_input(O+' [#] Press '+GR+'Enter'+O+' to continue...') - webbugs(web) - - elif v.strip() == 'A': - print(B+' [!] Type Selected : All Modules') - time.sleep(0.5) - - print(B+' [*] Firing up module -->'+C+' iCORS') - icors(web) - print(B+'\n [!] Module Completed -->'+C+' iCORS\n') - time.sleep(1) - - print(B+' [*] Firing up module -->'+C+' SSS ') - ssscript(web) - print(B+'\n [!] Module Completed -->'+C+' SSS \n') - time.sleep(1) - - print(B+' [*] Firing up module -->'+C+' ClickJacking') - clickjack(web) - print(B+'\n [!] Module Completed -->'+C+' ClickJacking\n') - time.sleep(1) - - print(B+' [*] Firing up module -->'+C+' Zone Transfer') - zone(web) - print(B+'\n [!] Module Completed -->'+C+' Zone Transfer\n') - time.sleep(1) - - print(B+' [*] Firing up module -->'+C+' Cookie Check') - cookiecheck(web) - print(B+'\n [!] Module Completed -->'+C+' Cookie Check\n') - time.sleep(1) - - print(B+' [*] Firing up module -->'+C+' Security Headers ') - headers(web) - print(B+'\n [!] Module Completed -->'+C+' Security Headers \n') - time.sleep(1) - - print(B+' [*] Firing up module -->'+C+' Cloudflare Misconfig.') - cloudflaremisc(web) - print(B+'\n [!] Module Completed -->'+C+' Cloudflare Misconfig.\n') - time.sleep(1) - - print(B+' [*] Firing up module -->'+C+' Mail Spoofing') - mailspoof(web) - print(B+'\n [!] Module Completed -->'+C+' Mail Spoofing\n') - time.sleep(0.5) - - print(B+' [*] Firing up module -->'+C+' HSTS Checker') - hsts(web) - print(B+'\n [!] Module Completed -->'+C+' HSTS Checker\n') - time.sleep(0.5) - - print(B+' [*] Firing up module -->'+C+' Cross Site Tracing') - xsstrace(web) - print(B+'\n [!] Module Completed -->'+C+' Cross Site Tracing\n') - time.sleep(0.5) - - print(B+' [*] Firing up module -->'+C+' Telnet Enabled') - netmisc(web) - print(B+'\n [!] Module Completed -->'+C+' Telnet Enabled\n') - time.sleep(1) - - print(B+' [*] Firing up module -->'+C+' Host Header Injection') - hhi(web) - print(B+'\n [!] Module Completed -->'+C+' Host Header Injection\n') - time.sleep(1) - - print(B+' [*] Firing up module -->'+C+' Cookie Injection') - sessionfix(web) - print(B+'\n [!] Module Completed -->'+C+' Cookie Injection\n') - time.sleep(1) - - print(G+' [+] All modules successfully completed!') - time.sleep(0.5) - raw_input(O+' [#] Press '+GR+'Enter'+O+' to continue...') - webbugs(web) - - elif v.strip() == '99': - print('[!] Back') - time.sleep(0.7) - - else: - print('') - dope = ['You high dude?','Hey there! Enter a valid option','Whoops! Thats not an option','Sorry fam! You just typed shit'] - print(dope[randint(0,3)]) - time.sleep(0.7) - os.system('clear') - webbugs(web) - diff --git a/core/Vulnlysis/Misc_Bugs/webbugsban.py b/core/Vulnlysis/Misc_Bugs/webbugsban.py deleted file mode 100644 index 968beced..00000000 --- a/core/Vulnlysis/Misc_Bugs/webbugsban.py +++ /dev/null @@ -1,50 +0,0 @@ -#!/usr/bin/env python2 -# -*- coding: utf-8 -*- - -#-:-:-:-:-:-:-:-:-:-:-:-:# -# TIDoS Framework # -#-:-:-:-:-:-:-:-:-:-:-:-:# - -#This module requires TIDoS Framework -#https://github.com/theInfectedDrake/TIDoS-Framework - -from __future__ import print_function -import time -import os -from colors import * -from core.Core.arts import bugsban_art - -def webbugsban(): - - os.system('clear') - print(bugsban_art) - print(O+' [1]'+GR+' Insecure Cross Origin Resource Sharing'+W+' (Absolute)') - time.sleep(0.1) - print(O+' [2]'+GR+' Same Site Scripting'+W+' (Sub-Domains Based)') - time.sleep(0.1) - print(O+' [3]'+GR+' Clickjackable Vulnerabilities '+W+'(Framable Response)') - time.sleep(0.1) - print(O+' [4]'+GR+' Zone Transfer Vulnerabilities'+W+' (DNS Based)') - time.sleep(0.1) - print(O+' [5]'+GR+' Security on Cookies '+W+'(HTTPOnly & Secure Flags)') - time.sleep(0.1) - print(O+' [6]'+GR+' Security Headers Analysis '+W+'(Absolute)') - time.sleep(0.1) - print(O+' [7]'+GR+' Cloudflare Misconfiguration '+W+'(Get Real IP) ') - time.sleep(0.1) - print(O+' [8]'+GR+' HTTP Strict Transport Security Usage ') - time.sleep(0.1) - print(O+' [9]'+GR+' Cross-Site Tracing '+W+'(Port Based)') - time.sleep(0.1) - print(O+' [10]'+GR+' Network Security Misconfig. '+W+'(Telnet Port Based)') - time.sleep(0.1) - print(O+' [11]'+GR+' Spoofable Emails '+W+'(Missing SPF & DMARC Records) ') - time.sleep(0.1) - print(O+' [12]'+GR+' Host Header Injection '+W+'(Port Based) ') - time.sleep(0.1) - print(O+' [13]'+GR+' Cookie Injection '+W+'(Session Fixation)\n ') - time.sleep(0.1) - print(O+' [A]'+GR+' Load all the modules 1 by 1\n') - time.sleep(0.1) - print(O+' [99]'+GR+' Back\n') - diff --git a/core/Vulnlysis/Oth_Bugs/__init__.py b/core/Vulnlysis/Oth_Bugs/__init__.py deleted file mode 100644 index 73a0d197..00000000 --- a/core/Vulnlysis/Oth_Bugs/__init__.py +++ /dev/null @@ -1,11 +0,0 @@ -#!/usr/bin/env python2 -# coding: utf-8 - -#-:-:-:-:-:-:-:-:-:-:-:-:# -# TIDoS Framework # -#-:-:-:-:-:-:-:-:-:-:-:-:# - -#This module requires TIDoS Framework -#https://github.com/theInfectedDrake/TIDoS-Framework - -pass diff --git a/core/Vulnlysis/Oth_Bugs/othbugs.py b/core/Vulnlysis/Oth_Bugs/othbugs.py deleted file mode 100644 index f3591fe1..00000000 --- a/core/Vulnlysis/Oth_Bugs/othbugs.py +++ /dev/null @@ -1,142 +0,0 @@ -#!/usr/bin/env python2 -# -*- coding: utf-8 -*- - -#-:-:-:-:-:-:-:-:-:-:-:-:# -# TIDoS Framework # -#-:-:-:-:-:-:-:-:-:-:-:-:# - -#Author : @_tID -#This module requires TIDoS Framework -#https://github.com/theInfectedDrake/TIDoS-Framework - -from __future__ import print_function -import sys -import os -import time -import subprocess -import random -from random import randint -sys.path.append('modules/0x03-Vulnerability+Analysis/0x03-OtherWebBugs/') -from popbrute import * -from ftpbrute import * -from sqlbrute import * -from sshbrute import * -from othbugsban import * -from colors import * -from smtpbrute import * -from xmppbrute import * -from telnetbrute import * - -def othbugs(web): - - print(" [!] Module Selected : Bruteforce Modules\n\n") - othbugsban() - print('') - time.sleep(0.3) - v = raw_input (GR+' [#] \033[1;4mTID\033[0m'+GR+' :> ' + color.END) - print('') - if v == '1': - print(B+' [!] Type Selected :'+C+' FTP Brute') - ftpbrute(web) - raw_input(O+' [#] Press '+GR+'Enter'+O+' to continue...') - print('\n\n') - othbugs(web) - - elif v == '2': - print(B+' [!] Type Selected :'+C+' SSH Brute') - sshbrute(web) - raw_input(O+' [#] Press '+GR+'Enter'+O+' to continue...') - print('\n\n') - othbugs(web) - - elif v == '3': - print(B+' [!] Type Selected :'+C+' SQL Brute') - sqlbrute(web) - raw_input(O+' [#] Press '+GR+'Enter'+O+' to continue...') - print('\n\n') - othbugs(web) - - elif v == '4': - print(B+' [!] Type Selected :'+C+' POP 3/2 Brute') - popbrute(web) - raw_input(O+' [#] Press '+GR+'Enter'+O+' to continue...') - print('\n\n') - othbugs(web) - - elif v == '5': - print(B+' [!] Type Selected :'+C+' SMTP Brute') - smtpbrute(web) - raw_input(O+' [#] Press '+GR+'Enter'+O+' to continue...') - print('\n\n') - othbugs(web) - - elif v == '6': - print(B+' [!] Type Selected :'+C+' TELNET Brute') - telnetbrute(web) - raw_input(O+' [#] Press '+GR+'Enter'+O+' to continue...') - print('\n\n') - othbugs(web) - - elif v == '7': - print(B+' [!] Type Selected :'+C+' XMPP Brute') - xmppbrute(web) - raw_input(O+' [#] Press '+GR+'Enter'+O+' to continue...') - print('\n\n') - othbugs(web) - - elif v == 'A': - print(B+' [!] Type Selected :'+C+' All Modules') - time.sleep(0.5) - print(B+' [*] Firing up module -->'+C+' FTP Brute') - ftpbrute(web) - print(B+' [!] Module Completed -->'+C+' FTP Brute\n') - time.sleep(2) - - print(B+' [*] Firing up module -->'+C+' SSH Brute') - sshbrute(web) - print(B+' [!] Module Completed -->'+C+' SSH Brute\n') - time.sleep(2) - - print(B+' [*] Firing up module -->'+C+' SQL Brute') - sqlbrute(web) - print(B+' [!] Module Completed -->'+C+' SQL Brute\n') - time.sleep(2) - - print(B+' [*] Firing up module -->'+C+' POP Brute') - popbrute(web) - print(B+' [!] Module Completed -->'+C+' POP Brute\n') - time.sleep(2) - - print(B+' [*] Firing up module -->'+C+' SMTP Brute') - smtpbrute(web) - print(B+' [!] Module Completed -->'+C+' SMTP Brute\n') - time.sleep(2) - - print(B+' [*] Firing up module -->'+C+' TElNET Brute') - telnetbrute(web) - print(B+' [!] Module Completed -->'+C+' TELNET Brute\n') - time.sleep(2) - - print(B+' [*] Firing up module -->'+C+' XMPP Brute') - xmppbrute(web) - print(B+' [!] Module Completed -->'+C+' XMPP Brute\n') - time.sleep(2) - - print(B+' [!] All scantypes have been tested on target...') - time.sleep(4) - raw_input(O+' [#] Press '+GR+'Enter'+O+' to continue...') - print(B+' [*] Going back to menu...') - othbugs(web) - - elif v == '99': - print(GR+' [*] Going back...') - time.sleep(0.5) - os.system('clear') - - else: - dope = ['You high dude?','Shit! Enter a valid option','Whoops! Thats not an option','Sorry! You just typed shit'] - print(dope[randint(0,3)]) - time.sleep(0.7) - os.system('clear') - othbugs(web) - diff --git a/core/Vulnlysis/Oth_Bugs/othbugsban.py b/core/Vulnlysis/Oth_Bugs/othbugsban.py deleted file mode 100644 index 801e3d30..00000000 --- a/core/Vulnlysis/Oth_Bugs/othbugsban.py +++ /dev/null @@ -1,40 +0,0 @@ -#!/usr/bin/env python2 -# coding: utf-8 - -#-:-:-:-:-:-:-:-:-:-:-:-:# -# TIDoS Framework # -#-:-:-:-:-:-:-:-:-:-:-:-:# - -#Author : @_tID -#This module requires TIDoS Framework -#https://github.com/theInfectedDrake/TIDoS-Framework - -from __future__ import print_function -from core.Core.arts import bugsban_art -from colors import * -import time - -def othbugsban(): - - time.sleep(0.4) - os.system('clear') - print(bugsban_art) - time.sleep(0.3) - print(B+'\n [1]'+C+' FTP Protocol Bruteforce'+W+' (Default Credentials)') - time.sleep(0.1) - print(B+' [2]'+C+' SSH Protocol Bruteforce'+W+' (Default Credentials)') - time.sleep(0.1) - print(B+' [3]'+C+' SQL Protocol Bruteforce'+W+' (Default Credentials)') - time.sleep(0.1) - print(B+' [4]'+C+' POP 3/2 Protocol Bruteforce'+W+' (Default Credentials)') - time.sleep(0.1) - print(B+' [5]'+C+' SMTP Protocol Bruteforce'+W+' (Default Credentials)') - time.sleep(0.1) - print(B+' [6]'+C+' TELNET Protocol Bruteforce'+W+' (Default Credentials)') - time.sleep(0.1) - print(B+' [7]'+C+' XMPP Protocol Bruteforce'+W+' (Default Credentials)\n') - time.sleep(0.1) - print(B+' [A]'+C+' Start up ALL modules 1 by 1\n') - time.sleep(0.1) - print(B+' [99]'+C+' Back\n') - diff --git a/core/Vulnlysis/Serio_Bugs/__init__.py b/core/Vulnlysis/Serio_Bugs/__init__.py deleted file mode 100644 index 73a0d197..00000000 --- a/core/Vulnlysis/Serio_Bugs/__init__.py +++ /dev/null @@ -1,11 +0,0 @@ -#!/usr/bin/env python2 -# coding: utf-8 - -#-:-:-:-:-:-:-:-:-:-:-:-:# -# TIDoS Framework # -#-:-:-:-:-:-:-:-:-:-:-:-:# - -#This module requires TIDoS Framework -#https://github.com/theInfectedDrake/TIDoS-Framework - -pass diff --git a/core/Vulnlysis/Serio_Bugs/serbugs.py b/core/Vulnlysis/Serio_Bugs/serbugs.py deleted file mode 100644 index 0d7cf7ab..00000000 --- a/core/Vulnlysis/Serio_Bugs/serbugs.py +++ /dev/null @@ -1,225 +0,0 @@ -#!/usr/bin/env python2 -# -*- coding: utf-8 -*- - -#-:-:-:-:-:-:-:-:-:-:-:-:# -# TIDoS Framework # -#-:-:-:-:-:-:-:-:-:-:-:-:# - -#Author: @_tID -#This module requires TIDoS Framework -#https://github.com/theInfectedDrake/TIDoS-Framework - -from __future__ import print_function -import sys -import time -import os -sys.path.append('modules/0x03-Vulnerability+Analysis/0x01-TopPriorityBugs/') - -from serbugsban import * -from lfi import * -from rfi import * -from ldap import * -from rce import * -from csrf import * -from sqli import * -from crlf import * -from subdomover import * -from strutsshock import * -from phpi import * -from htmli import * -from xpathi import * -from shellshock import * -from colors import * -from xss import * -from openredirect import * -from pathtrav import * - -def serbugs(web): - - print(GR+'\n [*] Loading module...') - serbugsban() - v = raw_input(''+O+' \033[4mTID\033[1;0m '+GR+':> ' + color.END) - print('\n') - if v.strip() == '1': - print(' Type Selected : LFI') - lfi(web) - raw_input(O+' [#] Press '+GR+'Enter'+O+' to continue...') - serbugs(web) - - elif v.strip() == '2': - print(' Type Selected : RFI') - rfi(web) - raw_input(O+' [#] Press '+GR+'Enter'+O+' to continue...') - serbugs(web) - - elif v.strip() == '3': - print(' Type Selected : RCE') - rce(web) - raw_input(O+' [#] Press '+GR+'Enter'+O+' to continue...') - serbugs(web) - - elif v.strip() == '4': - print(' Type Selected : Path Traversal') - pathtrav(web) - raw_input(O+' [#] Press '+GR+'Enter'+O+' to continue...') - serbugs(web) - - elif v.strip() == '5': - print(' Type Selected : CSRF') - csrf(web) - raw_input(O+' [#] Press '+GR+'Enter'+O+' to continue...') - serbugs(web) - - elif v.strip() == '6': - print(' Type Selected : XSS') - xss(web) - raw_input(O+' [#] Press '+GR+'Enter'+O+' to continue...') - serbugs(web) - - elif v.strip() == '7': - print(' Type Selected : SQLi') - sqli(web) - raw_input(O+' [#] Press '+GR+'Enter'+O+' to continue...') - serbugs(web) - - elif v.strip() == '8': - print(' Type Selected : LDAP Injection') - ldap(web) - raw_input(O+' [#] Press '+GR+'Enter'+O+' to continue...') - serbugs(web) - - elif v.strip() == '9': - print(' Type Selected : HTML Code Injection') - htmli(web) - raw_input(O+' [#] Press '+GR+'Enter'+O+' to continue...') - serbugs(web) - - elif v.strip() == '10': - print(' Type Selected : HTTP Response Splitting') - crlf(web) - raw_input(O+' [#] Press '+GR+'Enter'+O+' to continue...') - serbugs(web) - - elif v.strip() == '11': - print(' Type Selected : PHP Code Injection') - phpi(web) - raw_input(O+' [#] Press '+GR+'Enter'+O+' to continue...') - serbugs(web) - - elif v.strip() == '12': - print(' Type Selected : XPATH Injection') - xpathi(web) - raw_input(O+' [#] Press '+GR+'Enter'+O+' to continue...') - serbugs(web) - - elif v.strip() == '13': - print(' Type Selected : Shellshock') - shellshock(web) - raw_input(O+' [#] Press '+GR+'Enter'+O+' to continue...') - serbugs(web) - - elif v.strip() == '14': - print(' Type Selected : Apache Struts Shock') - strutsshock(web) - raw_input(O+' [#] Press '+GR+'Enter'+O+' to continue...') - serbugs(web) - - elif v.strip() == '15': - print(' Type Selected : URL Validation') - redirect(web) - raw_input(O+' [#] Press '+GR+'Enter'+O+' to continue...') - serbugs(web) - - elif v.strip() == '16': - print(' Type Selected : Subdomain Takeover') - subdomover(web) - raw_input(O+' [#] Press '+GR+'Enter'+O+' to continue...') - serbugs(web) - - elif v.strip() == 'A': - print(' [!] Type Selected : All Modules') - time.sleep(0.5) - - print(' [*] Firing up module --> LFI') - lfi(web) - print(' [!] Module Completed --> LFI\n') - time.sleep(1) - - print(' [*] Firing up module --> RFI ') - rfi(web) - print(' [!] Module Completed --> RFI \n') - time.sleep(1) - - print(' [*] Firing up module --> RCE') - rce(web) - print(' [!] Module Completed --> RCE\n') - time.sleep(1) - - print(' [*] Firing up module --> Path Traversal') - pathtrav(web) - print(' [!] Module Completed --> Path Traversal\n') - time.sleep(1) - - print(' [*] Firing up module --> CSRF') - csrf(web) - print(' [!] Module Completed --> CSRF\n') - time.sleep(1) - - print(' [*] Firing up module --> XSS ') - xss(web) - print(' [!] Module Completed --> XSS \n') - time.sleep(1) - - print(' [*] Firing up module --> SQLi') - sqli(web) - print(' [!] Module Completed --> SQLi\n') - time.sleep(1) - - print(' [*] Firing up module --> LDAPi') - ldap(web) - print(' [!] Module Completed --> LDAPi\n') - time.sleep(1) - - print(' [*] Firing up module --> CRLF') - crlf(web) - print(' [!] Module Completed --> CRLF\n') - time.sleep(1) - - print(' [*] Firing up module --> PHP Code Injection') - phpi(web) - print(' [!] Module Completed --> PHP Code Injection\n') - time.sleep(0.5) - - print(' [*] Firing up module --> XPATH Injection') - xpathi(web) - print(' [!] Module Completed --> XPATH Injection\n') - time.sleep(0.5) - - print(' [*] Firing up module --> ShellShock') - shellshock(web) - print(' [!] Module Completed --> ShellShock\n') - time.sleep(1) - - print(' [*] Firing up module --> URL Forwards') - redirect(web) - print(' [!] Module Completed --> Url Forwards\n') - time.sleep(0.5) - print(G+' [+] All modules successfully completed!') - time.sleep(4) - raw_input(O+' [#] Press '+GR+'Enter'+O+' to continue...') - serbugs(web) - - elif v.strip() == '99': - print('[!] Back') - time.sleep(0.7) - - else: - print('') - dope = ['You high dude?','Hey there! Enter a valid option','Whoops! Thats not an option','Sorry fam! You just typed shit'] - print(dope[randint(0,3)]) - time.sleep(0.7) - os.system('clear') - - time.sleep(1) - serbugs(web) - diff --git a/core/Vulnlysis/Serio_Bugs/serbugsban.py b/core/Vulnlysis/Serio_Bugs/serbugsban.py deleted file mode 100644 index 55a0e3c9..00000000 --- a/core/Vulnlysis/Serio_Bugs/serbugsban.py +++ /dev/null @@ -1,57 +0,0 @@ -#!/usr/bin/env python2 -# -*- coding: utf-8 -*- - -#-:-:-:-:-:-:-:-:-:-:-:-:# -# TIDoS Framework # -#-:-:-:-:-:-:-:-:-:-:-:-:# - -#This module requires TIDoS Framework -#https://github.com/theInfectedDrake/TIDoS-Framework - -from __future__ import print_function -import time -from colors import * -import os -from core.Core.arts import bugsban_art - -def serbugsban(): - - time.sleep(0.5) - os.system('clear') - print(bugsban_art) - print(B+' [1]'+C+' Local File Inclusion'+W+' (Root Directories)') - time.sleep(0.1) - print(B+' [2]'+C+' Remote File Inclusion'+W+' (Executable Scripts)') - time.sleep(0.1) - print(B+' [3]'+C+' OS Command Injection'+W+' (Windows & Linux)') - time.sleep(0.1) - print(B+' [4]'+C+' Path Traversal '+W+'(Sensitive Paths)') - time.sleep(0.1) - print(B+' [5]'+C+' Cross-Site Request Forgery '+W+'(Absolute)') - time.sleep(0.1) - print(B+' [6]'+C+' Cross-Site Scripting '+W+'(Absolute)') - time.sleep(0.1) - print(B+' [7]'+C+' SQL Injection '+W+'(Error & Blind Based)') - time.sleep(0.1) - print(B+' [8]'+C+' LDAP Entity Injection '+W+'(Error Enumeration)') - time.sleep(0.1) - print(B+' [9]'+C+' HTML Code Injection '+W+'(Tag Based)') - time.sleep(0.1) - print(B+' [10]'+C+' HTTP Response Splitting '+W+'(CRLF Injection)') - time.sleep(0.1) - print(B+' [11]'+C+' PHP Code Injection '+W+'(Windows + Linux)') - time.sleep(0.1) - print(B+' [12]'+C+' XPATH Injection '+W+'(Blind and Error Based)') - time.sleep(0.1) - print(B+' [13]'+C+' Shellshock Vulnerabilities'+W+' (Bash RCE)') - time.sleep(0.1) - print(B+' [14]'+C+' Apache Struts Shock'+W+' (Apache RCE)') - time.sleep(0.1) - print(B+' [15]'+C+' Unvalidated URL Redirects'+W+' (Open Redirects)') - time.sleep(0.1) - print(B+' [16]'+C+' Sub-domain Takeover'+W+' (50+ Services)\n') - time.sleep(0.1) - print(B+' [A]'+C+' Load all the modules 1 by 1\n') - time.sleep(0.1) - print(B+' [99]'+C+' Back\n') - diff --git a/core/Vulnlysis/__init__.py b/core/Vulnlysis/__init__.py deleted file mode 100644 index 73a0d197..00000000 --- a/core/Vulnlysis/__init__.py +++ /dev/null @@ -1,11 +0,0 @@ -#!/usr/bin/env python2 -# coding: utf-8 - -#-:-:-:-:-:-:-:-:-:-:-:-:# -# TIDoS Framework # -#-:-:-:-:-:-:-:-:-:-:-:-:# - -#This module requires TIDoS Framework -#https://github.com/theInfectedDrake/TIDoS-Framework - -pass diff --git a/core/Vulnlysis/colors.py b/core/Vulnlysis/colors.py deleted file mode 100644 index 96ed4433..00000000 --- a/core/Vulnlysis/colors.py +++ /dev/null @@ -1,37 +0,0 @@ -#!/usr/bin/env python2 - -#-:-:-:-:-:-:-:-:-:-:-:-:# -# TIDoS Framework # -#-:-:-:-:-:-:-:-:-:-:-:-:# - -#This module requires TIDoS Framework -#https://github.com/theInfectedDrake/TIDoS-Framework - -############################### -class color: - PURPLE = '\033[95m' - CYAN = '\033[96m' - DARKCYAN = '\033[36m' - BLUE = '\033[94m' - GREEN = '\033[92m' - YELLOW = '\033[93m' - RED = '\033[91m' - BOLD = '\033[1m' - UNDERLINE = '\033[4m' - END = '\033[0m' - HEADER = '\033[95m' - OKBLUE = '\033[94m' - OKGREEN = '\033[92m' - WARNING = '\033[93m' - FAIL = '\033[91m' - -W = '\033[1;0m' # white (normal) -R = '\033[1;31m' # red -G = '\033[1;32m' # green -O = '\033[1;33m' # orange -B = '\033[1;34m' # blue -P = '\033[1;35m' # purple -C = '\033[1;36m' # cyan -GR = '\033[1;37m' # gray -T = '\033[1;93m' # tan -############################### diff --git a/core/Vulnlysis/vuln.py b/core/Vulnlysis/vuln.py deleted file mode 100644 index c7ec1210..00000000 --- a/core/Vulnlysis/vuln.py +++ /dev/null @@ -1,49 +0,0 @@ -#!/usr/bin/env python2 - -#-:-:-:-:-:-:-:-:-:-:-:-:# -# TIDoS Framework # -#-:-:-:-:-:-:-:-:-:-:-:-:# - -#This module requires TIDoS Framework -#https://github.com/theInfectedDrake/TIDoS-Framework - -from __future__ import print_function -import os -import time -import random -from random import * -from vulnban import * -from core.Vulnlysis.Misc_Bugs.webbugs import * -from core.Vulnlysis.Oth_Bugs.othbugs import * -from core.Vulnlysis.Serio_Bugs.serbugs import * -from colors import * - -def vuln(web): - - print(B+' [+] Module Loaded : '+C+'Vulnerability Analysis') - vulnban() - v = raw_input(''+O+' \033[4mTID\033[1;0m '+GR+':> ' + color.END) - print('\n') - - if v.strip() == '1': - webbugs(web) - - elif v.strip() == '2': - serbugs(web) - - elif v.strip() == '3': - othbugs(web) - - elif v.strip() == '99': - print('[!] Back') - time.sleep(0.7) - os.system('clear') - - else: - dope = ['You high dude?','Hey there! Enter a valid option','Whoops! Thats not an option','Sorry fam! You just typed shit'] - print(dope[randint(0,3)]) - time.sleep(0.7) - os.system('clear') - vulnban() - vuln(web) - diff --git a/core/Vulnlysis/vulnban.py b/core/Vulnlysis/vulnban.py deleted file mode 100644 index c894dde1..00000000 --- a/core/Vulnlysis/vulnban.py +++ /dev/null @@ -1,30 +0,0 @@ -#!/usr/bin/env python2 -# coding: utf-8 - -#-:-:-:-:-:-:-:-:-:-:-:-:# -# TIDoS Framework # -#-:-:-:-:-:-:-:-:-:-:-:-:# - -#This module requires TIDoS Framework -#https://github.com/theInfectedDrake/TIDoS-Framework - -from __future__ import print_function -import os, time -from colors import * -from core.Core.arts import vulnban_art - -def vulnban(): - - time.sleep(0.3) - os.system('clear') - print(O+' [!] Module Selected : Vulnerability Analysis') - print(vulnban_art) - print(B+' [1] '+C+' Basic Bugs & Misconfigurations'+W+' (Low Priority [P0x3-P0x4])') - time.sleep(0.2) - print(B+' [2] '+C+' Critical Vulnerabilities '+W+'(High Priority [P0x1-P0x2])') - time.sleep(0.2) - print(B+' [3] '+C+' Others '+W+'(Bruters)\n') - time.sleep(0.2) - print(B+' [99] '+C+'Back\n') - time.sleep(0.2) - diff --git a/core/__init__.py b/core/__init__.py index 73a0d197..8d1c8b69 100644 --- a/core/__init__.py +++ b/core/__init__.py @@ -1,11 +1 @@ -#!/usr/bin/env python2 -# coding: utf-8 - -#-:-:-:-:-:-:-:-:-:-:-:-:# -# TIDoS Framework # -#-:-:-:-:-:-:-:-:-:-:-:-:# - -#This module requires TIDoS Framework -#https://github.com/theInfectedDrake/TIDoS-Framework - -pass + diff --git a/core/__pycache__/__init__.cpython-37.pyc b/core/__pycache__/__init__.cpython-37.pyc new file mode 100644 index 00000000..33b2aef7 Binary files /dev/null and b/core/__pycache__/__init__.cpython-37.pyc differ diff --git a/core/__pycache__/colors.cpython-37.pyc b/core/__pycache__/colors.cpython-37.pyc new file mode 100644 index 00000000..697a5602 Binary files /dev/null and b/core/__pycache__/colors.cpython-37.pyc differ diff --git a/core/__pycache__/variables.cpython-37.pyc b/core/__pycache__/variables.cpython-37.pyc new file mode 100644 index 00000000..cf485848 Binary files /dev/null and b/core/__pycache__/variables.cpython-37.pyc differ diff --git a/core/database/database_module.py b/core/database/database_module.py new file mode 100644 index 00000000..1a7c73ea --- /dev/null +++ b/core/database/database_module.py @@ -0,0 +1,113 @@ +import sqlite3 + +# This module contains three functions: +# 1. save_data - inserts data into the database, and automatically creates tables and +# organizes the data as necessary. +# 2. retrieve_data - generates SQLite queries to retrieve the requested data from the +# database and returns the data. +# 3. get_info - reads the database and returns a dictionary that acts as an index to +# the data in the database. This dictionary is used by the menu function to build +# out the menu. +# The functions in this module take the following arguments: +# save_data and retrieve_data take the following arguments: +# database = database file name in the format "databasename.db". This will be the same +# throughout the session. +# module = the name of the top-level module you're in. Can't have spaces or special +# characters. Should be EXACTLY matching one of the following: +# "ReconANDOSINT", "ScanANDEnum", "VulnAnalysis", "Exploitation", or "AuxModules" +# lvl1, lvl2, lvl3 = the names of the next levels of modules, on down to the one you're +# in. If you don't go all the way down to lvl3, input Null. Can have spaces. Should +# exactly match the name of the module as written in the menu. +# data = should be the data generated by the module. It will be unchanged when it is +# passed in and out of the database. + +def save_data(database, module, lvl1, lvl2, lvl3, host, data): + connection = sqlite3.connect(database) + cursor = connection.cursor() + check_table = 'SELECT name FROM sqlite_master WHERE type=\'table\' AND name=\'{}\''.format(module) + cursor.execute(check_table) + checker = cursor.fetchone() + if checker == None: + create_table = 'CREATE TABLE {} (\ + id INTEGER PRIMARY KEY, \ + lvl1 text not null, \ + lvl2 text, \ + lvl3 text, \ + number int, \ + data blob);'.format(module) + cursor.execute(create_table) + connection.commit() + check_entries = 'SELECT number FROM {} WHERE lvl1="{}" AND lvl2="{}" AND lvl3="{}"'.format(module, lvl1, lvl2, lvl3) + cursor.execute(check_entries) + printable = cursor.fetchall() + ctr = 0 + high = [] + while ctr < len(printable): + high.append(printable[ctr][0]) + ctr += 1 + if high == []: + highest = 1 + else: + highest = max(high) + 1 + insert_into_table = 'INSERT INTO {} (lvl1, lvl2, lvl3, number, data) VALUES (?, ?, ?, ?, ?);'.format(module) + table_entry_parameters = (lvl1, lvl2, lvl3, highest, data) + cursor.execute(insert_into_table, table_entry_parameters) + connection.commit() + connection.close() + +def retrieve_data(database, module, lvl1, lvl2, lvl3, num): + connection = sqlite3.connect(database) + cursor = connection.cursor() + if lvl3 == "": + if lvl2 == "": + select_from_table = 'SELECT data FROM {} WHERE lvl1="{}" AND lvl2="" AND lvl3="" AND number={}'.format(module, lvl1, num) + else: + select_from_table = 'SELECT data FROM {} WHERE lvl1="{}" AND lvl2="{}" AND lvl3="" AND number={}'.format(module, lvl1, lvl2, num) + else: + select_from_table = 'SELECT data FROM {} WHERE lvl1="{}" AND lvl2="{}" AND lvl3="{}" AND number={}'.format(module, lvl1, lvl2, lvl3, num) + cursor.execute(select_from_table) + returned_data = cursor.fetchall() + connection.close() + return returned_data[0][0] + +# This function receives only the file name of the database. It reads what is in the +# database and returns a dictionary that acts as an index to the data saved in the +# database. This dictionary is read by the menu function to build out the menu. +def get_info(database): + modules = ['ReconANDOSINT', 'ScanANDEnum', 'VulnAnalysis', 'Exploitation', 'AuxModules'] + saved_modules = [] + data_saved = {} + connection = sqlite3.connect(database) + cursor = connection.cursor() + for module in modules: + check_table = 'SELECT name FROM sqlite_master WHERE type=\'table\' AND name=\'{}\''.format(module) + cursor.execute(check_table) + check = cursor.fetchone() + if check != None: + saved_modules.append(module) + for module in saved_modules: + if module not in data_saved.keys(): + data_saved[module] = {} + ctr = 1 + while True: + cmd = 'SELECT lvl1, lvl2, lvl3, number FROM {} WHERE id={}'.format(module, ctr) + cursor.execute(cmd) + grab_data = cursor.fetchone() + if grab_data == None: + break + else: + if grab_data[0] not in data_saved[module].keys(): + data_saved[module][grab_data[0]] = {} + if grab_data[1] != '': + if grab_data[1] not in data_saved[module][grab_data[0]].keys(): + data_saved[module][grab_data[0]][grab_data[1]] = {} + if grab_data[2] == '': + if grab_data[1] == '': + data_saved[module][grab_data[0]].update( {grab_data[3] : "Data"} ) + else: + data_saved[module][grab_data[0]][grab_data[1]].update( {grab_data[3] : "Data"} ) + else: + data_saved[module][grab_data[0]][grab_data[1]][grab_data[2]].update( {grab_data[3] : "Data"} ) + ctr += 1 + connection.close() + return data_saved \ No newline at end of file diff --git a/core/database/db_menu.py b/core/database/db_menu.py new file mode 100644 index 00000000..1dc1ebaf --- /dev/null +++ b/core/database/db_menu.py @@ -0,0 +1,108 @@ +from database_module import get_info, retrieve_data +import sys + +menu_dict = { + 'ReconANDOSINT' : 'Reconnaissance & OSINT', + 'ScanANDEnum' : 'Scanning & Enumeration', + 'VulnAnalysis' : 'Vulnerability Analysis', + 'Exploitation' : 'Exploitation', + 'AuxModules' : 'Auxiliary Modules' + } +db_name = "sessionresults.db" +query_list = [db_name] +error_message = "Sorry, please enter one of the choices listed." +menu_message = "Please make your selection: " +input_cursor = "Input > " +main_exit_message = "E) Exit." +higher_menu_exit_message = "0) Exit to higher menu." +exit_message = "Now exiting. Goodbye." + +def query_db(query_list): + db, module, lvl1 = query_list[0], query_list[1], query_list[2] + if len(query_list) == 4: + lvl2, lvl3, num = "", "", query_list[3] + elif len(query_list) == 5: + lvl2, lvl3, num = query_list[3], "", query_list[4] + else: + lvl2, lvl3, num = query_list[3], query_list[4], query_list[5] + print(retrieve_data(db, module, lvl1, lvl2, lvl3, num)) + +def build_db_menu(a_list, b_list, selection): + print(menu_message) + while True: + ctr = 0 + while ctr < len(a_list): + if selection == "Data": + print("{}) Scan {}".format(str(ctr + 1), a_list[ctr])) + elif b_list != "None": + print("{}) {}".format(str(ctr + 1), b_list[ctr])) + else: + print("{}) {}".format(str(ctr + 1), a_list[ctr])) + ctr += 1 + if selection != "None": + print(higher_menu_exit_message) + print(main_exit_message) + cmd = input(input_cursor) + if cmd == "e" or cmd == "E" or cmd == "exit" or cmd == "Exit" or cmd == "EXIT": + print(exit_message) + sys.exit() + elif cmd == "0": + del query_list[-1] + return cmd + elif int(cmd) <= len(a_list): + query_list.append(a_list[int(cmd) - 1]) + if selection == "None": + return a_list[int(cmd) - 1] + elif selection[a_list[int(cmd) - 1]] == "Data": + print(selection[a_list[int(cmd) - 1]]) + query_db(query_list) + del query_list[-1] + else: + return a_list[int(cmd) - 1] + else: + print(error_message) + +def level_five_menu(choice1, choice2, choice3, choice4, menu_data): + a_list = list(menu_data[choice1][choice2][choice3][choice4].keys()) + selection = menu_data[choice1][choice2][choice3][choice4] + result = build_db_menu(a_list, "None", selection) + if result == "0": + level_four_menu(choice1, choice2, choice3, menu_data) + +def level_four_menu(choice1, choice2, choice3, menu_data): + a_list = list(menu_data[choice1][choice2][choice3].keys()) + selection = menu_data[choice1][choice2][choice3] + result = build_db_menu(a_list, "None", selection) + if result == "0": + level_three_menu(choice1, choice2, menu_data) + else: + level_five_menu(choice1, choice2, choice3, result, menu_data) + +def level_three_menu(choice1, choice2, menu_data): + a_list = list(menu_data[choice1][choice2].keys()) + selection = menu_data[choice1][choice2] + result = build_db_menu(a_list, "None", selection) + if result == "0": + level_two_menu(choice1, menu_data) + else: + level_four_menu(choice1, choice2, result, menu_data) + +def level_two_menu(choice, menu_data): + a_list = list(menu_data[choice].keys()) + selection = menu_data[choice] + result = build_db_menu(a_list, "None", selection) + if result == "0": + menu(menu_data) + else: + level_three_menu(choice, result, menu_data) + +def menu(menu_data): + a_list = list(menu_data.keys()) + b_list = [] + for item in a_list: + b_list.append(menu_dict[item]) + result = build_db_menu(a_list, b_list, "None") + level_two_menu(result, menu_data) + +menu_data = get_info(db_name) +menu(menu_data) \ No newline at end of file diff --git a/core/database/tidos.db b/core/database/tidos.db new file mode 100644 index 00000000..d4b04e9c Binary files /dev/null and b/core/database/tidos.db differ diff --git a/lib/bs4_mod/beautifulsoup4.egg-info/dependency_links.txt b/core/doc/.gitignore similarity index 100% rename from lib/bs4_mod/beautifulsoup4.egg-info/dependency_links.txt rename to core/doc/.gitignore diff --git a/core/doc/CONTRIBUTING b/core/doc/CONTRIBUTING new file mode 100644 index 00000000..e679f8b5 --- /dev/null +++ b/core/doc/CONTRIBUTING @@ -0,0 +1,4 @@ +Contributing to TIDoS Framework +--------------------------------- + + diff --git a/core/doc/DISCLAIMER b/core/doc/DISCLAIMER new file mode 100644 index 00000000..17c1586e --- /dev/null +++ b/core/doc/DISCLAIMER @@ -0,0 +1,4 @@ +DISCLAIMER +---------- + +TIDoS Attack was provided as an open-source, royalty-free penetration testing toolkit. It has capable modules in various phases which can unveil potential dangerous flaws in various web-applications which can further be exploited maliciously. Therefore the author as well as the contrbutors assume no liability for misuse of this toolkit. Usage of TIDoS Attack for testing or exploiting websites without prior mutual consent can be considered as an illegal activity. It is the final user's responsibility to obey all applicable local, state and federal laws. diff --git a/agree b/core/doc/choice similarity index 100% rename from agree rename to core/doc/choice diff --git a/core/doc/local b/core/doc/local new file mode 100644 index 00000000..8d1c8b69 --- /dev/null +++ b/core/doc/local @@ -0,0 +1 @@ + diff --git a/core/doc/man/tidos.1 b/core/doc/man/tidos.1 new file mode 100644 index 00000000..211f0ce3 --- /dev/null +++ b/core/doc/man/tidos.1 @@ -0,0 +1,144 @@ +.TH VAILE 1 2020-03-23 "" + +.SH NAME +.P +\fBVaile\fR — Metasploit\-like pentest framework derived from TIDoS + +.SH SYNOPSIS +.P +\fBVaile\fR [\fIOPTION\fR]... + +.SH DESCRIPTION +.P +\fBVaile\fR is a versatile collection of tools for \fIwebapp\fR security testing. It was designed in order to help penetration testers during all phases of an operation, especially reconnaissance, scanning and vulnerability analysis. + +.P +It features 3 easy\-to\-use interfaces: an interactive shell, an inline CLI and a graphical user interface powered by Qt. Its modules are easily comprehensible and fully verbose, and are using \fImultiprocessing\fR to make attacking more efficient. If requested, TIDoS will also pipe attacks through \fITor\fR, rendering your attacks more anonymous and difficult to track. + +.P +The \fBVaile\fR framework is module\-based, so users can easily create their own modules, or edit the built\-in ones, respecting the general structure of the already existent modules. + +.P +Its structure allows it to evolve and be easily adapted to new features and modules. Currently, it has 108 modules ready to be used. + +.SH OPTIONS +.P +Running \fBVaile\fR without any argument runs an interactive, metasploit\-like shell, with all settings set to default. + +.TP +You can also specify a target URL, combined with a module, to execute this module on given target in a quicker and easier way. +\fB$ TIDoS \-v http://example.com \-l pathtrav\fR + +.TP +You also can use a previously saved \fIsession\fR file as argument, to use it instead of a target URL. Sessions can (and need to) be saved with the \fBsessions\fR command. +\fB$ TIDoS \-v saarsec \-l pathtrav \-s\fR + +.TP +Using TIDoS's \fBVAL\fR file format, you can fully automate attacks, since it sets targets, modules and options automatically. Load a file up this way: +\fB$ TIDoS \-c syn.val\fR + +.TP +When attacking per CLI, you can also make use of the \fBtor\fR command to pipe attacks through the Tor network, like this: +\fB$ TIDoS \-v http://example.com \-l pathtrav \-\-tor\fR + +.TP +Finally, \fBVaile\fR can be run as a graphical user interface, using and wrapping around the core framework. +\fB$ TIDoS \-\-app\fR + +.TP +For inline help and more options, use \fBVaile \-\-help\fR + +.SH INTERFACE +.P +The main interface of \fBVaile\fR framework is its interactive, metasploit\-like console. + +.P +\fBTO GET HELP\fR on a TIDoS command, you can use "\fBhelp \fR" or "\fB? \fR". To list all available commands, use "\fBhelp\fR" resp. "\fB?\fR" without argument. This will also give a short summary on the commands, as listed below. + +.P +\fICommands:\fR + +.TP +\fBattack\fR +Attack specified target(s) +.TP +\fBclear\fR +Clear terminal +.TP +\fBcreds\fR +Handle target credentials +.TP +\fBfetch\fR +Check for and install updates +.TP +\fBfind\fR +Search a module +.TP +\fBhelp\fR +Show help message +.TP +\fBinfo\fR +Show description of current module +.TP +\fBintro\fR +Display Intro +.TP +\fBleave\fR +Leave module +.TP +\fBlist\fR +List all modules of a category +.TP +\fBload\fR +Load module +.TP +\fBnetinfo\fR +Show network information +.TP +\fBopts\fR +Show options of current module +.TP +\fBphpsploit\fR +Load the phpsploit framework (needs to be downloaded externally) +.TP +\fBprocesses\fR +Set number of processes in parallelisation +.TP +\fBq\fR +Terminate TIDoS session +.TP +\fBsessions\fR +Interact with cached sessions +.TP +\fBset\fR +Set option value of module +.TP +\fBtor\fR +Pipe Attacks through the Tor Network +.TP +\fBvicadd\fR +Add Target to list +.TP +\fBvicdel\fR +Delete Target from list +.TP +\fBviclist\fR +List all targets + +.SH ISSUES +.TP +To submit any issue, bug or proposal, please send it in TIDoS's issues section: +https://github.com/VainlyStrain/TIDoS/issues + +.SH CONTRIBUTE +.TP +If you want to contribute to \fBVaile\fR, submit a module, patch, or anything else, take a look at the \fBCONTRIBUTING\fR file, in the core/doc directory + +.SH LICENCE +.P +This software is under the GNU GENERAL PUBLIC LICENSE Version 3, 29 June 2007 + + +.\" man code generated by txt2tags 2.5 (http://txt2tags.sf.net) +.\" cmdline: txt2tags -q -t man -i man.txt2tags -o TIDoS.1 + diff --git a/core/doc/mystery b/core/doc/mystery new file mode 100644 index 00000000..396a0ba2 --- /dev/null +++ b/core/doc/mystery @@ -0,0 +1 @@ +yes \ No newline at end of file diff --git a/core/doc/vailyn b/core/doc/vailyn new file mode 100644 index 00000000..8d1c8b69 --- /dev/null +++ b/core/doc/vailyn @@ -0,0 +1 @@ + diff --git a/core/doc/version b/core/doc/version new file mode 100644 index 00000000..52837484 --- /dev/null +++ b/core/doc/version @@ -0,0 +1 @@ +2.0.5-1 diff --git a/core/docker/Dockerfile b/core/docker/Dockerfile new file mode 100644 index 00000000..309b40fa --- /dev/null +++ b/core/docker/Dockerfile @@ -0,0 +1,41 @@ +# Pulling base image +FROM ubuntu:18.04 + +# Install TIDoS-Framework dependencies +RUN apt update && \ + apt install --install-recommends -y \ + sudo \ + libncurses5 \ + apt-utils \ + dialog \ + libxml2 \ + nmap \ + git \ + nano \ + xcb \ + tcpdump \ + libexiv2-dev \ + build-essential \ + python-xmpp \ + python-dev \ + python3-pip \ + libmysqlclient-dev \ + tor \ + konsole \ + && \ + rm -rf /var/lib/apt/lists/* && \ + apt-get clean + +# Installing TIDoS-Framework +RUN git clone https://github.com/0xinfection/tidos-framework.git && \ + cd tidos-framework && \ + python3 -m pip install --upgrade --force pip && \ + python3 -m pip install --upgrade --force wheel && \ + python3 -m pip install -r requirements.txt && \ + mkdir -v -p /opt/TIDoS/ && \ + cp -r -v * /opt/TIDoS/ && \ + cp -v tmp/tidos /usr/bin/tidos && \ + export EDITOR=nano && \ + chmod -R 755 /opt/TIDoS/* && \ + chmod -v 755 /usr/bin/tidos && \ + cd .. && rm -rf tidos-framework diff --git a/core/initfiles/sample.vaile b/core/initfiles/sample.vaile new file mode 100644 index 00000000..21098bb8 --- /dev/null +++ b/core/initfiles/sample.vaile @@ -0,0 +1,3 @@ +sessions load --val saarsec.val +load pathtrav +attack diff --git a/core/install.py b/core/install.py new file mode 100755 index 00000000..5b40110c --- /dev/null +++ b/core/install.py @@ -0,0 +1,45 @@ +#!/usr/bin/env python3 +# -*- coding: utf-8 -*- +""" +_____, ___ + '+ .; + , ; + . + + . + .;. + .; + : + , + + +┌─[TIDoS]─[] +└──╼ VainlyStrain +""" + +import os + +print('''\033[1m + ___ _ _ _ + |_ _| _ _ ___ | |_ __ _ | | | | + | | | ' \\ (_-< | _| / _` | | | | | + |___| |_||_| /__/_ _\\__| \\__,_| _|_|_ _|_|_ +_|"""""|_|"""""|_|"""""|_|"""""|_|"""""|_|"""""|_|"""""| +"`-0-0-'"`-0-0-'"`-0-0-'"`-0-0-'"`-0-0-'"`-0-0-'"`-0-0-' +''') + + +print(" [+] Installing dependencies (1/2): Package Manager") +os.system("apt-get install libncurses5 libxml2 nmap tcpdump libexiv2-dev build-essential python3-pip libmariadbclient18 libmysqlclient-dev tor konsole") + +print(" [+] Installing dependencies (2/2): pip3") +os.system("pip3 install -r requirements.txt") + +print(" [+] Installing TIDoS...") +os.system('mkdir -v -p /opt/TIDoS/') +os.system('cp -r -v ../* /opt/TIDoS/') +os.system('cp -v ../tmp/tidos /usr/bin/tidos') +os.system('chmod -R 755 /opt/TIDoS/*') +os.system('chmod -v 755 /usr/bin/tidos') + +print("Installation process complete. Run 'tidos' to launch the framework.\033[0m") diff --git a/core/lib/FileUtils.py b/core/lib/FileUtils.py new file mode 100644 index 00000000..aa3ed0c0 --- /dev/null +++ b/core/lib/FileUtils.py @@ -0,0 +1,138 @@ +#!/usr/bin/env python +# -*- coding: utf-8 -*- + +#-:-:-:-:-:-:-:-:-:-:-:-:# +# TIDoS Framework # +#-:-:-:-:-:-:-:-:-:-:-:-:# + +#This module requires TIDoS Framework +#https://github.com/0xInfection/TIDoS-Framework + +import os +import os.path + + +class File(object): + def __init__(self, *pathComponents): + self._path = FileUtils.buildPath(*pathComponents) + self.content = None + + @property + def path(self): + return self._path + + @path.setter + def path(self, value): + raise NotImplemented + + def isValid(self): + return FileUtils.isFile(self.path) + + def exists(self): + return FileUtils.exists(self.path) + + def canRead(self): + return FileUtils.canRead(self.path) + + def canWrite(self): + return FileUtils.canWrite(self.path) + + def read(self): + return FileUtils.read(self.path) + + def update(self): + self.content = self.read() + + def content(self): + if not self.content: + self.content = FileUtils.read() + return self.content() + + def getLines(self): + for line in FileUtils.getLines(self.path): + yield line + + def __cmp__(self, other): + if not isinstance(other, File): + raise NotImplemented + return cmp(self.content(), other.content()) + + def __enter__(self): + return self + + def __exit__(self, type, value, tb): + pass + + +class FileUtils(object): + @staticmethod + def buildPath(*pathComponents): + if pathComponents: + path = os.path.join(*pathComponents) + else: + path = '' + return path + + @staticmethod + def exists(fileName): + return os.access(fileName, os.F_OK) + + @staticmethod + def canRead(fileName): + if not os.access(fileName, os.R_OK): + return False + try: + with open(fileName): + pass + except IOError: + return False + return True + + @staticmethod + def canWrite(fileName): + return os.access(fileName, os.W_OK) + + @staticmethod + def read(fileName): + result = '' + with open(fileName, 'r') as fd: + for line in fd.readlines(): + result += line + return result + + @staticmethod + def getLines(fileName): + with open(fileName, 'r', errors="replace") as fd: + return fd.read().splitlines() + + @staticmethod + def isDir(fileName): + return os.path.isdir(fileName) + + @staticmethod + def isFile(fileName): + return os.path.isfile(fileName) + + @staticmethod + def createDirectory(directory): + if not FileUtils.exists(directory): + os.makedirs(directory) + + @staticmethod + def sizeHuman(num): + base = 1024 + for x in ['B ', 'KB', 'MB', 'GB']: + if num < base and num > -base: + return "%3.0f%s" % (num, x) + num /= base + return "%3.0f %s" % (num, 'TB') + + @staticmethod + def writeLines(fileName, lines): + content = None + if type(lines) is list: + content = "\n".join(lines) + else: + content = lines + with open(fileName, "w") as f: + f.writelines(content) diff --git a/core/lib/Photon/.travis.yml b/core/lib/Photon/.travis.yml new file mode 100644 index 00000000..b5731398 --- /dev/null +++ b/core/lib/Photon/.travis.yml @@ -0,0 +1,16 @@ +language: python +os: + - linux +python: + - 3.6 +install: + - pip install -r requirements.txt + - pip install flake8 +before_script: + # stop the build if there are Python syntax errors or undefined names + - flake8 . --count --select=E901,E999,F821,F822,F823 --show-source --statistics + # exit-zero treats all errors as warnings. The GitHub editor is 127 chars wide + - flake8 . --count --exit-zero --max-complexity=10 --max-line-length=127 --statistics +script: + - python photon.py -u "https://somdev.me/" -l 1 -d 1 -t 100 --regex "\d{10}" --dns --output="d3v" + - python photon.py -u "https://somdev.me/" -l 1 -t 10 --seeds="https://somdev.me/posts" --only-urls --export=json --wayback diff --git a/core/lib/Photon/.whitesource b/core/lib/Photon/.whitesource new file mode 100644 index 00000000..f0569521 --- /dev/null +++ b/core/lib/Photon/.whitesource @@ -0,0 +1,8 @@ +{ + "generalSettings": { + "shouldScanRepo": true + }, + "checkRunSettings": { + "vulnerableCheckRunConclusionLevel": "failure" + } +} \ No newline at end of file diff --git a/core/lib/Photon/CHANGELOG.md b/core/lib/Photon/CHANGELOG.md new file mode 100644 index 00000000..cc5fdad3 --- /dev/null +++ b/core/lib/Photon/CHANGELOG.md @@ -0,0 +1,121 @@ +#### v1.3.2 +- add support for socks proxies +- add rotating proxies +- `-p` now takes `IP:PORT` or `DOMAIN:PORT` with `http://`, `socks5://` or nothing (default is `http`) or a `file` with a list of proxies (`http://` or `socks5://` or nothing). + +#### v1.3.1 +- Added more intels (GENERIC_URL, BRACKET_URL, BACKSLASH_URL, HEXENCODED_URL, URLENCODED_URL, B64ENCODED_URL, IPV4, IPV6, EMAIL, MD5, SHA1, SHA256, SHA512, YARA_PARSE, CREDIT_CARD) +- proxy support with `-p, --proxy` option (http proxy only) +- minor fixes and pep8 format + +#### v1.3.0 +- Dropped Python < 3.2 support +- Removed Ninja mode +- Fixed a bug in link parsing +- Fixed Unicode output +- Fixed a bug which caused URLs to be treated as files +- Intel is now associated with the URL where it was found + +#### v1.2.1 +- Added cloning ability +- Refactored to be modular + +#### v1.1.6 +- Reuse TCP connection for better performance +- Handle redirect loops +- CSV export support +- Fixed `sitemap.xml` parsing +- Improved regex + +#### v1.1.5 +- fixed some minor bugs +- fixed a bug in domain name parsing +- added --headers option for interactive HTTP headers input + +#### v1.1.4 +- Added `-v` option +- Fixed progress animation for Python 2 +- Added `developer.facebook.com` API for Ninja mode + +#### v1.1.3 +- Added `--stdout` option +- Fixed a bug in `zap()` function +- Fixed crashing when target is an IP address +- Minor refactor + +#### v1.1.2 +- Added `--wayback` +- Fixed progress bar for Python > 3.2 +- Added `/core/config.py` for easy customization +- `--dns` now saves subdomains in `subdomains.txt` + +#### v1.1.1 +- Use of `ThreadPoolExecutor` for x2 speed (for Python > 3.2) +- Fixed mishandling of urls starting with `//` +- Removed a redundant try-except statement +- Evaluate entropy of found keys to avoid false positives + +#### v1.1.0 +- Added `--keys` option +- Fixed a bug related to SSL certificate verification + +#### v1.0.9 +- Code refactor +- Better identification of external URLs +- Fixed a major bug that made several intel URLs pass under the radar +- Fixed a major bug that caused non-html type content to be marked a crawlable URL + +#### v1.0.8 +- added `--exclude` option +- Better regex and code logic to favor performance +- Fixed a bug that caused dnsdumpster to fail if target was a subdomain +- Fixed a bug that caused a crash if run outside "Photon" directory +- Fixed a bug in file saving (specific to Python 3) + +#### v1.0.7 +- Added `--timeout` option +- Added `--output` option +- Added `--user-agent` option +- Replaced lxml with regex +- Better logic for favoring performance +- Added bigger and separate file for user-agents + +#### v1.0.6 +- Fixed lot of bugs +- Suppress SSL warnings in MAC +- x100 speed by code optimization +- Simplified code of `exporter` plugin + +#### v1.0.5 +- Added `exporter` plugin +- Added seamless update ability +- Fixed a bug in update function + +#### v1.0.4 +- Fixed an issue which caused regular links to be saved in robots.txt +- Simplified `flash` function +- Removed `-n` as an alias of `--ninja` +- Added `--only-urls` option +- Refactored code for readability +- Skip saving files if the content is empty + +#### v1.0.3 +- Introduced plugins +- Added `dnsdumpster` plugin +- Fixed non-ascii character handling, again +- 404 pages are now added to `failed` list +- Handling exceptions in `jscanner` + +#### v1.0.2 +- Proper handling of null response from `robots.txt` & `sitemap.xml` +- Python2 compatibility +- Proper handling of non-ascii chars +- Added ability to specify custom regex pattern +- Display total time taken and average time per request + +#### v1.0.1 +- Disabled colors on Windows and macOS +- Cross platform file handling + +#### v1.0.0 +- First stable release diff --git a/core/lib/Photon/Dockerfile b/core/lib/Photon/Dockerfile new file mode 100644 index 00000000..4b9fc881 --- /dev/null +++ b/core/lib/Photon/Dockerfile @@ -0,0 +1,16 @@ +FROM python:3-alpine + +LABEL name photon +LABEL src "https://github.com/s0md3v/Photon" +LABEL creator s0md3v +LABEL dockerfile_maintenance khast3x +LABEL desc "Incredibly fast crawler designed for reconnaissance." + +RUN apk add git && git clone https://github.com/s0md3v/Photon.git Photon +WORKDIR Photon +RUN pip install -r requirements.txt + +VOLUME [ "/Photon" ] +# ENTRYPOINT ["sh"] +ENTRYPOINT [ "python", "photon.py" ] +CMD ["--help"] diff --git a/core/lib/Photon/LICENSE.md b/core/lib/Photon/LICENSE.md new file mode 100644 index 00000000..deea74ad --- /dev/null +++ b/core/lib/Photon/LICENSE.md @@ -0,0 +1,674 @@ + GNU GENERAL PUBLIC LICENSE + Version 3, 29 June 2007 + + Copyright (C) 2007 Free Software Foundation, Inc. + Everyone is permitted to copy and distribute verbatim copies + of this license document, but changing it is not allowed. + + Preamble + + The GNU General Public License is a free, copyleft license for +software and other kinds of works. + + The licenses for most software and other practical works are designed +to take away your freedom to share and change the works. By contrast, +the GNU General Public License is intended to guarantee your freedom to +share and change all versions of a program--to make sure it remains free +software for all its users. We, the Free Software Foundation, use the +GNU General Public License for most of our software; it applies also to +any other work released this way by its authors. You can apply it to +your programs, too. + + When we speak of free software, we are referring to freedom, not +price. Our General Public Licenses are designed to make sure that you +have the freedom to distribute copies of free software (and charge for +them if you wish), that you receive source code or can get it if you +want it, that you can change the software or use pieces of it in new +free programs, and that you know you can do these things. + + To protect your rights, we need to prevent others from denying you +these rights or asking you to surrender the rights. Therefore, you have +certain responsibilities if you distribute copies of the software, or if +you modify it: responsibilities to respect the freedom of others. + + For example, if you distribute copies of such a program, whether +gratis or for a fee, you must pass on to the recipients the same +freedoms that you received. You must make sure that they, too, receive +or can get the source code. And you must show them these terms so they +know their rights. + + Developers that use the GNU GPL protect your rights with two steps: +(1) assert copyright on the software, and (2) offer you this License +giving you legal permission to copy, distribute and/or modify it. + + For the developers' and authors' protection, the GPL clearly explains +that there is no warranty for this free software. For both users' and +authors' sake, the GPL requires that modified versions be marked as +changed, so that their problems will not be attributed erroneously to +authors of previous versions. + + Some devices are designed to deny users access to install or run +modified versions of the software inside them, although the manufacturer +can do so. This is fundamentally incompatible with the aim of +protecting users' freedom to change the software. The systematic +pattern of such abuse occurs in the area of products for individuals to +use, which is precisely where it is most unacceptable. Therefore, we +have designed this version of the GPL to prohibit the practice for those +products. If such problems arise substantially in other domains, we +stand ready to extend this provision to those domains in future versions +of the GPL, as needed to protect the freedom of users. + + Finally, every program is threatened constantly by software patents. +States should not allow patents to restrict development and use of +software on general-purpose computers, but in those that do, we wish to +avoid the special danger that patents applied to a free program could +make it effectively proprietary. To prevent this, the GPL assures that +patents cannot be used to render the program non-free. + + The precise terms and conditions for copying, distribution and +modification follow. + + TERMS AND CONDITIONS + + 0. Definitions. + + "This License" refers to version 3 of the GNU General Public License. + + "Copyright" also means copyright-like laws that apply to other kinds of +works, such as semiconductor masks. + + "The Program" refers to any copyrightable work licensed under this +License. Each licensee is addressed as "you". "Licensees" and +"recipients" may be individuals or organizations. + + To "modify" a work means to copy from or adapt all or part of the work +in a fashion requiring copyright permission, other than the making of an +exact copy. The resulting work is called a "modified version" of the +earlier work or a work "based on" the earlier work. + + A "covered work" means either the unmodified Program or a work based +on the Program. + + To "propagate" a work means to do anything with it that, without +permission, would make you directly or secondarily liable for +infringement under applicable copyright law, except executing it on a +computer or modifying a private copy. Propagation includes copying, +distribution (with or without modification), making available to the +public, and in some countries other activities as well. + + To "convey" a work means any kind of propagation that enables other +parties to make or receive copies. Mere interaction with a user through +a computer network, with no transfer of a copy, is not conveying. + + An interactive user interface displays "Appropriate Legal Notices" +to the extent that it includes a convenient and prominently visible +feature that (1) displays an appropriate copyright notice, and (2) +tells the user that there is no warranty for the work (except to the +extent that warranties are provided), that licensees may convey the +work under this License, and how to view a copy of this License. If +the interface presents a list of user commands or options, such as a +menu, a prominent item in the list meets this criterion. + + 1. Source Code. + + The "source code" for a work means the preferred form of the work +for making modifications to it. "Object code" means any non-source +form of a work. + + A "Standard Interface" means an interface that either is an official +standard defined by a recognized standards body, or, in the case of +interfaces specified for a particular programming language, one that +is widely used among developers working in that language. + + The "System Libraries" of an executable work include anything, other +than the work as a whole, that (a) is included in the normal form of +packaging a Major Component, but which is not part of that Major +Component, and (b) serves only to enable use of the work with that +Major Component, or to implement a Standard Interface for which an +implementation is available to the public in source code form. A +"Major Component", in this context, means a major essential component +(kernel, window system, and so on) of the specific operating system +(if any) on which the executable work runs, or a compiler used to +produce the work, or an object code interpreter used to run it. + + The "Corresponding Source" for a work in object code form means all +the source code needed to generate, install, and (for an executable +work) run the object code and to modify the work, including scripts to +control those activities. However, it does not include the work's +System Libraries, or general-purpose tools or generally available free +programs which are used unmodified in performing those activities but +which are not part of the work. For example, Corresponding Source +includes interface definition files associated with source files for +the work, and the source code for shared libraries and dynamically +linked subprograms that the work is specifically designed to require, +such as by intimate data communication or control flow between those +subprograms and other parts of the work. + + The Corresponding Source need not include anything that users +can regenerate automatically from other parts of the Corresponding +Source. + + The Corresponding Source for a work in source code form is that +same work. + + 2. Basic Permissions. + + All rights granted under this License are granted for the term of +copyright on the Program, and are irrevocable provided the stated +conditions are met. This License explicitly affirms your unlimited +permission to run the unmodified Program. The output from running a +covered work is covered by this License only if the output, given its +content, constitutes a covered work. This License acknowledges your +rights of fair use or other equivalent, as provided by copyright law. + + You may make, run and propagate covered works that you do not +convey, without conditions so long as your license otherwise remains +in force. You may convey covered works to others for the sole purpose +of having them make modifications exclusively for you, or provide you +with facilities for running those works, provided that you comply with +the terms of this License in conveying all material for which you do +not control copyright. Those thus making or running the covered works +for you must do so exclusively on your behalf, under your direction +and control, on terms that prohibit them from making any copies of +your copyrighted material outside their relationship with you. + + Conveying under any other circumstances is permitted solely under +the conditions stated below. Sublicensing is not allowed; section 10 +makes it unnecessary. + + 3. Protecting Users' Legal Rights From Anti-Circumvention Law. + + No covered work shall be deemed part of an effective technological +measure under any applicable law fulfilling obligations under article +11 of the WIPO copyright treaty adopted on 20 December 1996, or +similar laws prohibiting or restricting circumvention of such +measures. + + When you convey a covered work, you waive any legal power to forbid +circumvention of technological measures to the extent such circumvention +is effected by exercising rights under this License with respect to +the covered work, and you disclaim any intention to limit operation or +modification of the work as a means of enforcing, against the work's +users, your or third parties' legal rights to forbid circumvention of +technological measures. + + 4. Conveying Verbatim Copies. + + You may convey verbatim copies of the Program's source code as you +receive it, in any medium, provided that you conspicuously and +appropriately publish on each copy an appropriate copyright notice; +keep intact all notices stating that this License and any +non-permissive terms added in accord with section 7 apply to the code; +keep intact all notices of the absence of any warranty; and give all +recipients a copy of this License along with the Program. + + You may charge any price or no price for each copy that you convey, +and you may offer support or warranty protection for a fee. + + 5. Conveying Modified Source Versions. + + You may convey a work based on the Program, or the modifications to +produce it from the Program, in the form of source code under the +terms of section 4, provided that you also meet all of these conditions: + + a) The work must carry prominent notices stating that you modified + it, and giving a relevant date. + + b) The work must carry prominent notices stating that it is + released under this License and any conditions added under section + 7. This requirement modifies the requirement in section 4 to + "keep intact all notices". + + c) You must license the entire work, as a whole, under this + License to anyone who comes into possession of a copy. This + License will therefore apply, along with any applicable section 7 + additional terms, to the whole of the work, and all its parts, + regardless of how they are packaged. This License gives no + permission to license the work in any other way, but it does not + invalidate such permission if you have separately received it. + + d) If the work has interactive user interfaces, each must display + Appropriate Legal Notices; however, if the Program has interactive + interfaces that do not display Appropriate Legal Notices, your + work need not make them do so. + + A compilation of a covered work with other separate and independent +works, which are not by their nature extensions of the covered work, +and which are not combined with it such as to form a larger program, +in or on a volume of a storage or distribution medium, is called an +"aggregate" if the compilation and its resulting copyright are not +used to limit the access or legal rights of the compilation's users +beyond what the individual works permit. Inclusion of a covered work +in an aggregate does not cause this License to apply to the other +parts of the aggregate. + + 6. Conveying Non-Source Forms. + + You may convey a covered work in object code form under the terms +of sections 4 and 5, provided that you also convey the +machine-readable Corresponding Source under the terms of this License, +in one of these ways: + + a) Convey the object code in, or embodied in, a physical product + (including a physical distribution medium), accompanied by the + Corresponding Source fixed on a durable physical medium + customarily used for software interchange. + + b) Convey the object code in, or embodied in, a physical product + (including a physical distribution medium), accompanied by a + written offer, valid for at least three years and valid for as + long as you offer spare parts or customer support for that product + model, to give anyone who possesses the object code either (1) a + copy of the Corresponding Source for all the software in the + product that is covered by this License, on a durable physical + medium customarily used for software interchange, for a price no + more than your reasonable cost of physically performing this + conveying of source, or (2) access to copy the + Corresponding Source from a network server at no charge. + + c) Convey individual copies of the object code with a copy of the + written offer to provide the Corresponding Source. This + alternative is allowed only occasionally and noncommercially, and + only if you received the object code with such an offer, in accord + with subsection 6b. + + d) Convey the object code by offering access from a designated + place (gratis or for a charge), and offer equivalent access to the + Corresponding Source in the same way through the same place at no + further charge. You need not require recipients to copy the + Corresponding Source along with the object code. If the place to + copy the object code is a network server, the Corresponding Source + may be on a different server (operated by you or a third party) + that supports equivalent copying facilities, provided you maintain + clear directions next to the object code saying where to find the + Corresponding Source. Regardless of what server hosts the + Corresponding Source, you remain obligated to ensure that it is + available for as long as needed to satisfy these requirements. + + e) Convey the object code using peer-to-peer transmission, provided + you inform other peers where the object code and Corresponding + Source of the work are being offered to the general public at no + charge under subsection 6d. + + A separable portion of the object code, whose source code is excluded +from the Corresponding Source as a System Library, need not be +included in conveying the object code work. + + A "User Product" is either (1) a "consumer product", which means any +tangible personal property which is normally used for personal, family, +or household purposes, or (2) anything designed or sold for incorporation +into a dwelling. In determining whether a product is a consumer product, +doubtful cases shall be resolved in favor of coverage. For a particular +product received by a particular user, "normally used" refers to a +typical or common use of that class of product, regardless of the status +of the particular user or of the way in which the particular user +actually uses, or expects or is expected to use, the product. A product +is a consumer product regardless of whether the product has substantial +commercial, industrial or non-consumer uses, unless such uses represent +the only significant mode of use of the product. + + "Installation Information" for a User Product means any methods, +procedures, authorization keys, or other information required to install +and execute modified versions of a covered work in that User Product from +a modified version of its Corresponding Source. The information must +suffice to ensure that the continued functioning of the modified object +code is in no case prevented or interfered with solely because +modification has been made. + + If you convey an object code work under this section in, or with, or +specifically for use in, a User Product, and the conveying occurs as +part of a transaction in which the right of possession and use of the +User Product is transferred to the recipient in perpetuity or for a +fixed term (regardless of how the transaction is characterized), the +Corresponding Source conveyed under this section must be accompanied +by the Installation Information. But this requirement does not apply +if neither you nor any third party retains the ability to install +modified object code on the User Product (for example, the work has +been installed in ROM). + + The requirement to provide Installation Information does not include a +requirement to continue to provide support service, warranty, or updates +for a work that has been modified or installed by the recipient, or for +the User Product in which it has been modified or installed. Access to a +network may be denied when the modification itself materially and +adversely affects the operation of the network or violates the rules and +protocols for communication across the network. + + Corresponding Source conveyed, and Installation Information provided, +in accord with this section must be in a format that is publicly +documented (and with an implementation available to the public in +source code form), and must require no special password or key for +unpacking, reading or copying. + + 7. Additional Terms. + + "Additional permissions" are terms that supplement the terms of this +License by making exceptions from one or more of its conditions. +Additional permissions that are applicable to the entire Program shall +be treated as though they were included in this License, to the extent +that they are valid under applicable law. If additional permissions +apply only to part of the Program, that part may be used separately +under those permissions, but the entire Program remains governed by +this License without regard to the additional permissions. + + When you convey a copy of a covered work, you may at your option +remove any additional permissions from that copy, or from any part of +it. (Additional permissions may be written to require their own +removal in certain cases when you modify the work.) You may place +additional permissions on material, added by you to a covered work, +for which you have or can give appropriate copyright permission. + + Notwithstanding any other provision of this License, for material you +add to a covered work, you may (if authorized by the copyright holders of +that material) supplement the terms of this License with terms: + + a) Disclaiming warranty or limiting liability differently from the + terms of sections 15 and 16 of this License; or + + b) Requiring preservation of specified reasonable legal notices or + author attributions in that material or in the Appropriate Legal + Notices displayed by works containing it; or + + c) Prohibiting misrepresentation of the origin of that material, or + requiring that modified versions of such material be marked in + reasonable ways as different from the original version; or + + d) Limiting the use for publicity purposes of names of licensors or + authors of the material; or + + e) Declining to grant rights under trademark law for use of some + trade names, trademarks, or service marks; or + + f) Requiring indemnification of licensors and authors of that + material by anyone who conveys the material (or modified versions of + it) with contractual assumptions of liability to the recipient, for + any liability that these contractual assumptions directly impose on + those licensors and authors. + + All other non-permissive additional terms are considered "further +restrictions" within the meaning of section 10. If the Program as you +received it, or any part of it, contains a notice stating that it is +governed by this License along with a term that is a further +restriction, you may remove that term. If a license document contains +a further restriction but permits relicensing or conveying under this +License, you may add to a covered work material governed by the terms +of that license document, provided that the further restriction does +not survive such relicensing or conveying. + + If you add terms to a covered work in accord with this section, you +must place, in the relevant source files, a statement of the +additional terms that apply to those files, or a notice indicating +where to find the applicable terms. + + Additional terms, permissive or non-permissive, may be stated in the +form of a separately written license, or stated as exceptions; +the above requirements apply either way. + + 8. Termination. + + You may not propagate or modify a covered work except as expressly +provided under this License. Any attempt otherwise to propagate or +modify it is void, and will automatically terminate your rights under +this License (including any patent licenses granted under the third +paragraph of section 11). + + However, if you cease all violation of this License, then your +license from a particular copyright holder is reinstated (a) +provisionally, unless and until the copyright holder explicitly and +finally terminates your license, and (b) permanently, if the copyright +holder fails to notify you of the violation by some reasonable means +prior to 60 days after the cessation. + + Moreover, your license from a particular copyright holder is +reinstated permanently if the copyright holder notifies you of the +violation by some reasonable means, this is the first time you have +received notice of violation of this License (for any work) from that +copyright holder, and you cure the violation prior to 30 days after +your receipt of the notice. + + Termination of your rights under this section does not terminate the +licenses of parties who have received copies or rights from you under +this License. If your rights have been terminated and not permanently +reinstated, you do not qualify to receive new licenses for the same +material under section 10. + + 9. Acceptance Not Required for Having Copies. + + You are not required to accept this License in order to receive or +run a copy of the Program. Ancillary propagation of a covered work +occurring solely as a consequence of using peer-to-peer transmission +to receive a copy likewise does not require acceptance. However, +nothing other than this License grants you permission to propagate or +modify any covered work. These actions infringe copyright if you do +not accept this License. Therefore, by modifying or propagating a +covered work, you indicate your acceptance of this License to do so. + + 10. Automatic Licensing of Downstream Recipients. + + Each time you convey a covered work, the recipient automatically +receives a license from the original licensors, to run, modify and +propagate that work, subject to this License. You are not responsible +for enforcing compliance by third parties with this License. + + An "entity transaction" is a transaction transferring control of an +organization, or substantially all assets of one, or subdividing an +organization, or merging organizations. If propagation of a covered +work results from an entity transaction, each party to that +transaction who receives a copy of the work also receives whatever +licenses to the work the party's predecessor in interest had or could +give under the previous paragraph, plus a right to possession of the +Corresponding Source of the work from the predecessor in interest, if +the predecessor has it or can get it with reasonable efforts. + + You may not impose any further restrictions on the exercise of the +rights granted or affirmed under this License. For example, you may +not impose a license fee, royalty, or other charge for exercise of +rights granted under this License, and you may not initiate litigation +(including a cross-claim or counterclaim in a lawsuit) alleging that +any patent claim is infringed by making, using, selling, offering for +sale, or importing the Program or any portion of it. + + 11. Patents. + + A "contributor" is a copyright holder who authorizes use under this +License of the Program or a work on which the Program is based. The +work thus licensed is called the contributor's "contributor version". + + A contributor's "essential patent claims" are all patent claims +owned or controlled by the contributor, whether already acquired or +hereafter acquired, that would be infringed by some manner, permitted +by this License, of making, using, or selling its contributor version, +but do not include claims that would be infringed only as a +consequence of further modification of the contributor version. For +purposes of this definition, "control" includes the right to grant +patent sublicenses in a manner consistent with the requirements of +this License. + + Each contributor grants you a non-exclusive, worldwide, royalty-free +patent license under the contributor's essential patent claims, to +make, use, sell, offer for sale, import and otherwise run, modify and +propagate the contents of its contributor version. + + In the following three paragraphs, a "patent license" is any express +agreement or commitment, however denominated, not to enforce a patent +(such as an express permission to practice a patent or covenant not to +sue for patent infringement). To "grant" such a patent license to a +party means to make such an agreement or commitment not to enforce a +patent against the party. + + If you convey a covered work, knowingly relying on a patent license, +and the Corresponding Source of the work is not available for anyone +to copy, free of charge and under the terms of this License, through a +publicly available network server or other readily accessible means, +then you must either (1) cause the Corresponding Source to be so +available, or (2) arrange to deprive yourself of the benefit of the +patent license for this particular work, or (3) arrange, in a manner +consistent with the requirements of this License, to extend the patent +license to downstream recipients. "Knowingly relying" means you have +actual knowledge that, but for the patent license, your conveying the +covered work in a country, or your recipient's use of the covered work +in a country, would infringe one or more identifiable patents in that +country that you have reason to believe are valid. + + If, pursuant to or in connection with a single transaction or +arrangement, you convey, or propagate by procuring conveyance of, a +covered work, and grant a patent license to some of the parties +receiving the covered work authorizing them to use, propagate, modify +or convey a specific copy of the covered work, then the patent license +you grant is automatically extended to all recipients of the covered +work and works based on it. + + A patent license is "discriminatory" if it does not include within +the scope of its coverage, prohibits the exercise of, or is +conditioned on the non-exercise of one or more of the rights that are +specifically granted under this License. You may not convey a covered +work if you are a party to an arrangement with a third party that is +in the business of distributing software, under which you make payment +to the third party based on the extent of your activity of conveying +the work, and under which the third party grants, to any of the +parties who would receive the covered work from you, a discriminatory +patent license (a) in connection with copies of the covered work +conveyed by you (or copies made from those copies), or (b) primarily +for and in connection with specific products or compilations that +contain the covered work, unless you entered into that arrangement, +or that patent license was granted, prior to 28 March 2007. + + Nothing in this License shall be construed as excluding or limiting +any implied license or other defenses to infringement that may +otherwise be available to you under applicable patent law. + + 12. No Surrender of Others' Freedom. + + If conditions are imposed on you (whether by court order, agreement or +otherwise) that contradict the conditions of this License, they do not +excuse you from the conditions of this License. If you cannot convey a +covered work so as to satisfy simultaneously your obligations under this +License and any other pertinent obligations, then as a consequence you may +not convey it at all. For example, if you agree to terms that obligate you +to collect a royalty for further conveying from those to whom you convey +the Program, the only way you could satisfy both those terms and this +License would be to refrain entirely from conveying the Program. + + 13. Use with the GNU Affero General Public License. + + Notwithstanding any other provision of this License, you have +permission to link or combine any covered work with a work licensed +under version 3 of the GNU Affero General Public License into a single +combined work, and to convey the resulting work. The terms of this +License will continue to apply to the part which is the covered work, +but the special requirements of the GNU Affero General Public License, +section 13, concerning interaction through a network will apply to the +combination as such. + + 14. Revised Versions of this License. + + The Free Software Foundation may publish revised and/or new versions of +the GNU General Public License from time to time. Such new versions will +be similar in spirit to the present version, but may differ in detail to +address new problems or concerns. + + Each version is given a distinguishing version number. If the +Program specifies that a certain numbered version of the GNU General +Public License "or any later version" applies to it, you have the +option of following the terms and conditions either of that numbered +version or of any later version published by the Free Software +Foundation. If the Program does not specify a version number of the +GNU General Public License, you may choose any version ever published +by the Free Software Foundation. + + If the Program specifies that a proxy can decide which future +versions of the GNU General Public License can be used, that proxy's +public statement of acceptance of a version permanently authorizes you +to choose that version for the Program. + + Later license versions may give you additional or different +permissions. However, no additional obligations are imposed on any +author or copyright holder as a result of your choosing to follow a +later version. + + 15. Disclaimer of Warranty. + + THERE IS NO WARRANTY FOR THE PROGRAM, TO THE EXTENT PERMITTED BY +APPLICABLE LAW. EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT +HOLDERS AND/OR OTHER PARTIES PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY +OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, +THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR +PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE PROGRAM +IS WITH YOU. SHOULD THE PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF +ALL NECESSARY SERVICING, REPAIR OR CORRECTION. + + 16. Limitation of Liability. + + IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING +WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MODIFIES AND/OR CONVEYS +THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, INCLUDING ANY +GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING OUT OF THE +USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED TO LOSS OF +DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD +PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER PROGRAMS), +EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF +SUCH DAMAGES. + + 17. Interpretation of Sections 15 and 16. + + If the disclaimer of warranty and limitation of liability provided +above cannot be given local legal effect according to their terms, +reviewing courts shall apply local law that most closely approximates +an absolute waiver of all civil liability in connection with the +Program, unless a warranty or assumption of liability accompanies a +copy of the Program in return for a fee. + + END OF TERMS AND CONDITIONS + + How to Apply These Terms to Your New Programs + + If you develop a new program, and you want it to be of the greatest +possible use to the public, the best way to achieve this is to make it +free software which everyone can redistribute and change under these terms. + + To do so, attach the following notices to the program. It is safest +to attach them to the start of each source file to most effectively +state the exclusion of warranty; and each file should have at least +the "copyright" line and a pointer to where the full notice is found. + + + Copyright (C) + + This program is free software: you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation, either version 3 of the License, or + (at your option) any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this program. If not, see . + +Also add information on how to contact you by electronic and paper mail. + + If the program does terminal interaction, make it output a short +notice like this when it starts in an interactive mode: + + {{ project }} Copyright (C) {{ year }} {{ organization }} + This program comes with ABSOLUTELY NO WARRANTY; for details type `show w'. + This is free software, and you are welcome to redistribute it + under certain conditions; type `show c' for details. + +The hypothetical commands `show w' and `show c' should show the appropriate +parts of the General Public License. Of course, your program's commands +might be different; for a GUI interface, you would use an "about box". + + You should also get your employer (if you work as a programmer) or school, +if any, to sign a "copyright disclaimer" for the program, if necessary. +For more information on this, and how to apply and follow the GNU GPL, see +. + + The GNU General Public License does not permit incorporating your program +into proprietary programs. If your program is a subroutine library, you +may consider it more useful to permit linking proprietary applications with +the library. If this is what you want to do, use the GNU Lesser General +Public License instead of this License. But first, please read +. \ No newline at end of file diff --git a/core/lib/Photon/MANIFEST.in b/core/lib/Photon/MANIFEST.in new file mode 100644 index 00000000..e267daf0 --- /dev/null +++ b/core/lib/Photon/MANIFEST.in @@ -0,0 +1 @@ +include LICENSE.md diff --git a/core/lib/Photon/README.md b/core/lib/Photon/README.md new file mode 100644 index 00000000..bf1de88d --- /dev/null +++ b/core/lib/Photon/README.md @@ -0,0 +1,108 @@ + +

+
+ Photon +
+ Photon +
+

+ +

Incredibly fast crawler designed for OSINT.

+ +

+ + + + + pypi + + + + + + + +

+ +![demo](https://image.ibb.co/kQSUcz/demo.png) + +

+ Photon Wiki • + How To Use • + Compatibility • + Photon Library • + Contribution • + Roadmap +

+ +### Key Features + +#### Data Extraction +Photon can extract the following data while crawling: + +- URLs (in-scope & out-of-scope) +- URLs with parameters (`example.com/gallery.php?id=2`) +- Intel (emails, social media accounts, amazon buckets etc.) +- Files (pdf, png, xml etc.) +- Secret keys (auth/API keys & hashes) +- JavaScript files & Endpoints present in them +- Strings matching custom regex pattern +- Subdomains & DNS related data + +The extracted information is saved in an organized manner or can be [exported as json](https://github.com/s0md3v/Photon/wiki/Usage#export-formatted-result). + +![save demo](https://image.ibb.co/dS1BqK/carbon_2.png) + +#### Flexible +Control timeout, delay, add seeds, exclude URLs matching a regex pattern and other cool stuff. +The extensive range of [options](https://github.com/s0md3v/Photon/wiki/Usage) provided by Photon lets you crawl the web exactly the way you want. + +#### Genius +Photon's smart thread management & refined logic gives you top notch performance. + +Still, crawling can be resource intensive but Photon has some tricks up it's sleeves. You can fetch URLs archived by [archive.org](https://archive.org/) to be used as seeds by using `--wayback` option. + +#### Plugins +- **[wayback](https://github.com/s0md3v/Photon/wiki/Usage#use-urls-from-archiveorg-as-seeds)** +- **[dnsdumpster](https://github.com/s0md3v/Photon/wiki/Usage#dumping-dns-data)** +- **[Exporter](https://github.com/s0md3v/Photon/wiki/Usage#export-formatted-result)** + +#### Docker + +Photon can be launched using a lightweight Python-Alpine (103 MB) Docker image. + +```bash +$ git clone https://github.com/s0md3v/Photon.git +$ cd Photon +$ docker build -t photon . +$ docker run -it --name photon photon:latest -u google.com +``` + +To view results, you can either head over to the local docker volume, which you can find by running `docker inspect photon` or by mounting the target loot folder: + +```bash +$ docker run -it --name photon -v "$PWD:/Photon/google.com" photon:latest -u google.com +``` + +#### Frequent & Seamless Updates +Photon is under heavy development and updates for fixing bugs. optimizing performance & new features are being rolled regularly. + +If you would like to see features and issues that are being worked on, you can do that on [Development](https://github.com/s0md3v/Photon/projects/1) project board. + +Updates can be installed & checked for with the `--update` option. Photon has seamless update capabilities which means you can update Photon without losing any of your saved data. + +### Contribution & License +You can contribute in following ways: + +- Report bugs +- Develop plugins +- Add more "APIs" for ninja mode +- Give suggestions to make it better +- Fix issues & submit a pull request + +Please read the [guidelines](https://github.com/s0md3v/Photon/wiki/Guidelines) before submitting a pull request or issue. + +Do you want to have a conversation in private? Hit me up on my [twitter](https://twitter.com/s0md3v/), inbox is open :) + +**Photon** is licensed under [GPL v3.0 license](https://www.gnu.org/licenses/gpl-3.0.en.html) diff --git a/core/lib/Photon/core/__init__.py b/core/lib/Photon/core/__init__.py new file mode 100644 index 00000000..0d75f5e1 --- /dev/null +++ b/core/lib/Photon/core/__init__.py @@ -0,0 +1 @@ +"""The Photon core.""" diff --git a/core/lib/Photon/core/colors.py b/core/lib/Photon/core/colors.py new file mode 100644 index 00000000..f549f64b --- /dev/null +++ b/core/lib/Photon/core/colors.py @@ -0,0 +1,17 @@ +import sys + +if sys.platform.lower().startswith(('os', 'win', 'darwin', 'ios')): + # Colors shouldn't be displayed on Mac and Windows + end = red = white = green = yellow = run = bad = good = info = que = '' +else: + white = '\033[97m' + green = '\033[92m' + red = '\033[91m' + yellow = '\033[93m' + end = '\033[0m' + back = '\033[7;91m' + info = '\033[93m[!]\033[0m' + que = '\033[94m[?]\033[0m' + bad = '\033[91m[-]\033[0m' + good = '\033[92m[+]\033[0m' + run = '\033[97m[~]\033[0m' diff --git a/core/lib/Photon/core/config.py b/core/lib/Photon/core/config.py new file mode 100644 index 00000000..0a54b9ab --- /dev/null +++ b/core/lib/Photon/core/config.py @@ -0,0 +1,27 @@ +"""Configuration options for Photon.""" + +VERBOSE = False + +INTELS = [ + 'facebook.com', + 'github.com', + 'instagram.com', + 'youtube.com', +] + +BAD_TYPES = ( + 'bmp', + 'css', + 'csv', + 'docx', + 'ico', + 'jpeg', + 'jpg', + 'js', + 'json', + 'pdf', + 'png', + 'svg', + 'xls', + 'xml', +) diff --git a/core/lib/Photon/core/flash.py b/core/lib/Photon/core/flash.py new file mode 100644 index 00000000..0741fbba --- /dev/null +++ b/core/lib/Photon/core/flash.py @@ -0,0 +1,20 @@ +# from __future__ import print_function +import concurrent.futures +import sys +import os +from os import path +sys.path.append(os.path.abspath('.')) + +from .colors import info + +def flash(function, links, thread_count): + """Process the URLs and uses a threadpool to execute a function.""" + # Convert links (set) to list + links = list(links) + threadpool = concurrent.futures.ThreadPoolExecutor( + max_workers=thread_count) + futures = (threadpool.submit(function, link) for link in links) + for i, _ in enumerate(concurrent.futures.as_completed(futures)): + if i + 1 == len(links) or (i + 1) % thread_count == 0: + print('%s Progress: %i/%i' % (info, i + 1, len(links))) + print('') diff --git a/core/lib/Photon/core/mirror.py b/core/lib/Photon/core/mirror.py new file mode 100644 index 00000000..8dfebe06 --- /dev/null +++ b/core/lib/Photon/core/mirror.py @@ -0,0 +1,39 @@ +import os + + +def mirror(url, response): + if response != 'dummy': + clean_url = url.replace('http://', '').replace('https://', '').rstrip('/') + parts = clean_url.split('?')[0].split('/') + root = parts[0] + webpage = parts[-1] + parts.remove(root) + try: + parts.remove(webpage) + except ValueError: + pass + prefix = root + '_mirror' + try: + os.mkdir(prefix) + except OSError: + pass + suffix = '' + if parts: + for directory in parts: + suffix += directory + '/' + try: + os.mkdir(prefix + '/' + suffix) + except OSError: + pass + path = prefix + '/' + suffix + trail = '' + if '.' not in webpage: + trail += '.html' + if webpage == root: + name = 'index.html' + else: + name = webpage + if len(url.split('?')) > 1: + trail += '?' + url.split('?')[1] + with open(path + name + trail, 'w+') as out_file: + out_file.write(response.encode('utf-8')) diff --git a/core/lib/Photon/core/prompt.py b/core/lib/Photon/core/prompt.py new file mode 100644 index 00000000..0e3e84bf --- /dev/null +++ b/core/lib/Photon/core/prompt.py @@ -0,0 +1,22 @@ +"""Support for an input prompt.""" +import os +import tempfile + + +def prompt(default=None): + """Present the user a prompt.""" + editor = 'nano' + with tempfile.NamedTemporaryFile(mode='r+') as tmpfile: + if default: + tmpfile.write(default) + tmpfile.flush() + + child_pid = os.fork() + is_child = child_pid == 0 + + if is_child: + os.execvp(editor, [editor, tmpfile.name]) + else: + os.waitpid(child_pid, 0) + tmpfile.seek(0) + return tmpfile.read().strip() diff --git a/core/lib/Photon/core/regex.py b/core/lib/Photon/core/regex.py new file mode 100644 index 00000000..570742d8 --- /dev/null +++ b/core/lib/Photon/core/regex.py @@ -0,0 +1,234 @@ +import re + +# regex taken from https://github.com/InQuest/python-iocextract +# Reusable end punctuation regex. +END_PUNCTUATION = r"[\.\?>\"'\)!,}:;\u201d\u2019\uff1e\uff1c\]]*" + +# Reusable regex for symbols commonly used to defang. +SEPARATOR_DEFANGS = r"[\(\)\[\]{}<>\\]" + +# Split URLs on some characters that may be valid, but may also be garbage. +URL_SPLIT_STR = r"[>\"'\),};]" + +# Get basic url format, including a few obfuscation techniques, main anchor is the uri scheme. +GENERIC_URL = re.compile(r""" + ( + # Scheme. + [fhstu]\S\S?[px]s? + # One of these delimiters/defangs. + (?: + :\/\/| + :\\\\| + :?__ + ) + # Any number of defang characters. + (?: + \x20| + """ + SEPARATOR_DEFANGS + r""" + )* + # Domain/path characters. + \w + \S+? + # CISCO ESA style defangs followed by domain/path characters. + (?:\x20[\/\.][^\.\/\s]\S*?)* + ) + """ + END_PUNCTUATION + r""" + (?=\s|$) + """, re.IGNORECASE | re.VERBOSE | re.UNICODE) + +# Get some obfuscated urls, main anchor is brackets around the period. +BRACKET_URL = re.compile(r""" + \b + ( + [\.\:\/\\\w\[\]\(\)-]+ + (?: + \x20? + [\(\[] + \x20? + \. + \x20? + [\]\)] + \x20? + \S*? + )+ + ) + """ + END_PUNCTUATION + r""" + (?=\s|$) + """, re.VERBOSE | re.UNICODE) + +# Get some obfuscated urls, main anchor is backslash before a period. +BACKSLASH_URL = re.compile(r""" + \b + ( + [\:\/\\\w\[\]\(\)-]+ + (?: + \x20? + \\?\. + \x20? + \S*? + )*? + (?: + \x20? + \\\. + \x20? + \S*? + ) + (?: + \x20? + \\?\. + \x20? + \S*? + )* + ) + """ + END_PUNCTUATION + r""" + (?=\s|$) + """, re.VERBOSE | re.UNICODE) + +# Get hex-encoded urls. +HEXENCODED_URL = re.compile(r""" + ( + [46][86] + (?:[57]4)? + [57]4[57]0 + (?:[57]3)? + 3a2f2f + (?:2[356def]|3[0-9adf]|[46][0-9a-f]|[57][0-9af])+ + ) + (?:[046]0|2[0-2489a-c]|3[bce]|[57][b-e]|[8-f][0-9a-f]|0a|0d|09|[ + \x5b-\x5d\x7b\x7d\x0a\x0d\x20 + ]|$) + """, re.IGNORECASE | re.VERBOSE) + +# Get urlencoded urls. +URLENCODED_URL = re.compile(r""" + (s?[hf]t?tps?%3A%2F%2F\w[\w%-]*?)(?:[^\w%-]|$) + """, re.IGNORECASE | re.VERBOSE) + +# Get base64-encoded urls. +B64ENCODED_URL = re.compile(r""" + ( + # b64re '([hH][tT][tT][pP][sS]|[hH][tT][tT][pP]|[fF][tT][pP])://' + # Modified to ignore whitespace. + (?: + [\x2b\x2f-\x39A-Za-z]\s*[\x2b\x2f-\x39A-Za-z]\s*[\x31\x35\x39BFJNRVZdhlptx]\s*[Gm]\s*[Vd]\s*[FH]\s*[A]\s*\x36\s*L\s*y\s*[\x2b\x2f\x38-\x39]\s*| + [\x2b\x2f-\x39A-Za-z]\s*[\x2b\x2f-\x39A-Za-z]\s*[\x31\x35\x39BFJNRVZdhlptx]\s*[Io]\s*[Vd]\s*[FH]\s*[R]\s*[Qw]\s*[O]\s*i\s*\x38\s*v\s*[\x2b\x2f-\x39A-Za-z]\s*| + [\x2b\x2f-\x39A-Za-z]\s*[\x2b\x2f-\x39A-Za-z]\s*[\x31\x35\x39BFJNRVZdhlptx]\s*[Io]\s*[Vd]\s*[FH]\s*[R]\s*[Qw]\s*[Uc]\s*[z]\s*o\s*v\s*L\s*[\x2b\x2f-\x39w-z]\s*| + [\x2b\x2f-\x39A-Za-z]\s*[\x30\x32EGUWkm]\s*[Z]\s*[\x30U]\s*[Uc]\s*[D]\s*o\s*v\s*L\s*[\x2b\x2f-\x39w-z]\s*| + [\x2b\x2f-\x39A-Za-z]\s*[\x30\x32EGUWkm]\s*[h]\s*[\x30U]\s*[Vd]\s*[FH]\s*[A]\s*\x36\s*L\s*y\s*[\x2b\x2f\x38-\x39]\s*| + [\x2b\x2f-\x39A-Za-z]\s*[\x30\x32EGUWkm]\s*[h]\s*[\x30U]\s*[Vd]\s*[FH]\s*[B]\s*[Tz]\s*[O]\s*i\s*\x38\s*v\s*[\x2b\x2f-\x39A-Za-z]\s*| + [RZ]\s*[ln]\s*[R]\s*[Qw]\s*[O]\s*i\s*\x38\s*v\s*[\x2b\x2f-\x39A-Za-z]\s*| + [Sa]\s*[FH]\s*[R]\s*[\x30U]\s*[Uc]\s*[D]\s*o\s*v\s*L\s*[\x2b\x2f-\x39w-z]\s*| + [Sa]\s*[FH]\s*[R]\s*[\x30U]\s*[Uc]\s*[FH]\s*[M]\s*\x36\s*L\s*y\s*[\x2b\x2f\x38-\x39]\s* + ) + # Up to 260 characters (pre-encoding, reasonable URL length). + [A-Za-z0-9+/=\s]{1,357} + ) + (?=[^A-Za-z0-9+/=\s]|$) + """, re.VERBOSE) + +# Get some valid obfuscated ip addresses. +IPV4 = re.compile(r""" + (?:^| + (?![^\d\.]) + ) + (?: + (?:[1-9]?\d|1\d\d|2[0-4]\d|25[0-5]) + [\[\(\\]*?\.[\]\)]*? + ){3} + (?:[1-9]?\d|1\d\d|2[0-4]\d|25[0-5]) + (?:(?=[^\d\.])|$) + """, re.VERBOSE) + +# Experimental IPv6 regex, will not catch everything but should be sufficent for now. +IPV6 = re.compile(r""" + \b(?:[a-f0-9]{1,4}:|:){2,7}(?:[a-f0-9]{1,4}|:)\b + """, re.IGNORECASE | re.VERBOSE) + +# Capture email addresses including common defangs. +EMAIL = re.compile(r""" + ( + [a-z0-9_.+-]+ + [\(\[{\x20]* + (?:@|\Wat\W) + [\)\]}\x20]* + [a-z0-9-]+ + (?: + (?: + (?: + \x20* + """ + SEPARATOR_DEFANGS + r""" + \x20* + )* + \. + (?: + \x20* + """ + SEPARATOR_DEFANGS + r""" + \x20* + )* + | + \W+dot\W+ + ) + [a-z0-9-]+? + )+ + ) + """ + END_PUNCTUATION + r""" + (?=\s|$) + """, re.IGNORECASE | re.VERBOSE | re.UNICODE) + +MD5 = re.compile(r"(?:[^a-fA-F\d]|\b)([a-fA-F\d]{32})(?:[^a-fA-F\d]|\b)") +SHA1 = re.compile(r"(?:[^a-fA-F\d]|\b)([a-fA-F\d]{40})(?:[^a-fA-F\d]|\b)") +SHA256 = re.compile(r"(?:[^a-fA-F\d]|\b)([a-fA-F\d]{64})(?:[^a-fA-F\d]|\b)") +SHA512 = re.compile( + r"(?:[^a-fA-F\d]|\b)([a-fA-F\d]{128})(?:[^a-fA-F\d]|\b)") + +# YARA regex. +YARA_PARSE = re.compile(r""" + (?:^|\s) + ( + (?: + \s*?import\s+?"[^\r\n]*?[\r\n]+| + \s*?include\s+?"[^\r\n]*?[\r\n]+| + \s*?//[^\r\n]*[\r\n]+| + \s*?/\*.*?\*/\s*? + )* + (?: + \s*?private\s+| + \s*?global\s+ + )* + rule\s*? + \w+\s*? + (?: + :[\s\w]+ + )? + \s+\{ + .*? + condition\s*?: + .*? + \s*\} + ) + (?:$|\s) + """, re.MULTILINE | re.DOTALL | re.VERBOSE) + +CREDIT_CARD = re.compile(r"[0-9]{4}[ ]?[-]?[0-9]{4}[ ]?[-]?[0-9]{4}[ ]?[-]?[0-9]{4}") + +rintels = [(GENERIC_URL, "GENERIC_URL"), + (BRACKET_URL, "BRACKET_URL"), + (BACKSLASH_URL, "BACKSLASH_URL"), + (HEXENCODED_URL, "HEXENCODED_URL"), + (URLENCODED_URL, "URLENCODED_URL"), + (B64ENCODED_URL, "B64ENCODED_URL"), + (IPV4, "IPV4"), + (IPV6, "IPV6"), + (EMAIL, "EMAIL"), + (MD5, "MD5"), + (SHA1, "SHA1"), + (SHA256, "SHA256"), + (SHA512, "SHA512"), + (YARA_PARSE, "YARA_PARSE"), + (CREDIT_CARD, "CREDIT_CARD")] + + +rscript = re.compile(r'<(script|SCRIPT).*(src|SRC)=([^\s>]+)') +rhref = re.compile(r'<[aA].*(href|HREF)=([^\s>]+)') +rendpoint = re.compile(r'[\'"](/.*?)[\'"]|[\'"](http.*?)[\'"]') +rentropy = re.compile(r'[\w-]{16,45}') diff --git a/core/lib/Photon/core/requester.py b/core/lib/Photon/core/requester.py new file mode 100644 index 00000000..9711c18e --- /dev/null +++ b/core/lib/Photon/core/requester.py @@ -0,0 +1,72 @@ +import random +import time + +import requests +from requests.exceptions import TooManyRedirects + + +SESSION = requests.Session() +SESSION.max_redirects = 3 + +def requester( + url, + main_url=None, + delay=0, + cook=None, + headers=None, + timeout=10, + host=None, + proxies=[None], + user_agents=[None], + failed=None, + processed=None + ): + """Handle the requests and return the response body.""" + cook = cook or set() + headers = headers or set() + user_agents = user_agents or ['Photon'] + failed = failed or set() + processed = processed or set() + # Mark the URL as crawled + processed.add(url) + # Pause/sleep the program for specified time + time.sleep(delay) + + def make_request(url): + """Default request""" + final_headers = headers or { + 'Host': host, + # Selecting a random user-agent + 'User-Agent': random.choice(user_agents), + 'Accept': 'text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8', + 'Accept-Language': 'en-US,en;q=0.5', + 'Accept-Encoding': 'gzip', + 'DNT': '1', + 'Connection': 'close', + } + try: + response = SESSION.get( + url, + cookies=cook, + headers=final_headers, + verify=False, + timeout=timeout, + stream=True, + proxies=random.choice(proxies) + ) + except TooManyRedirects: + return 'dummy' + + if 'text/html' in response.headers['content-type'] or \ + 'text/plain' in response.headers['content-type']: + if response.status_code != '404': + return response.text + else: + response.close() + failed.add(url) + return 'dummy' + else: + response.close() + return 'dummy' + + return make_request(url) diff --git a/core/lib/Photon/core/updater.py b/core/lib/Photon/core/updater.py new file mode 100644 index 00000000..3583923e --- /dev/null +++ b/core/lib/Photon/core/updater.py @@ -0,0 +1,43 @@ +import os +import re +import sys +from os import path +sys.path.append(os.path.abspath('.')) + +from .colors import run, que, good, green, end, info +from .requester import requester + + +def updater(): + """Update the current installation. + + git clones the latest version and merges it with the current directory. + """ + print('%s Checking for updates' % run) + # Changes must be separated by ; + changes = '''major bug fixes;removed ninja mode;dropped python < 3.2 support;fixed unicode output;proxy support;more intels''' + latest_commit = requester('https://raw.githubusercontent.com/s0md3v/Photon/master/core/updater.py', host='raw.githubusercontent.com') + # Just a hack to see if a new version is available + if changes not in latest_commit: + changelog = re.search(r"changes = '''(.*?)'''", latest_commit) + # Splitting the changes to form a list + changelog = changelog.group(1).split(';') + print('%s A new version of Photon is available.' % good) + print('%s Changes:' % info) + for change in changelog: # print changes + print('%s>%s %s' % (green, end, change)) + + current_path = os.getcwd().split('/') # if you know it, you know it + folder = current_path[-1] # current directory name + path = '/'.join(current_path) # current directory path + choice = input('%s Would you like to update? [Y/n] ' % que).lower() + + if choice != 'n': + print('%s Updating Photon' % run) + os.system('git clone --quiet https://github.com/s0md3v/Photon %s' + % (folder)) + os.system('cp -r %s/%s/* %s && rm -r %s/%s/ 2>/dev/null' + % (path, folder, path, path, folder)) + print('%s Update successful!' % good) + else: + print('%s Photon is up to date!' % good) diff --git a/core/lib/Photon/core/user-agents.txt b/core/lib/Photon/core/user-agents.txt new file mode 100644 index 00000000..dc25d833 --- /dev/null +++ b/core/lib/Photon/core/user-agents.txt @@ -0,0 +1,18 @@ +Mozilla/4.0 (compatible; MSIE 6.0; MSIE 5.5; Windows NT 5.0) Opera 7.02 Bork-edition [en] +Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.0; .NET CLR 1.0.3705) +Mozilla/4.0 (compatible; MSIE 7.0; Windows NT 5.1; Trident/4.0; .NET CLR 2.0.50727; .NET CLR 3.0.4506.2152; .NET CLR 3.5.30729) +Mozilla/5.0 (compatible; Baiduspider/2.0; +http://www.baidu.com/search/spider.html) +Mozilla/5.0 (compatible; MSIE 9.0; Windows NT 6.1; WOW64; Trident/5.0) +Mozilla/5.0 (Macintosh; Intel Mac OS X 10_11_2) AppleWebKit/601.3.9 (KHTML, like Gecko) Version/9.0.2 Safari/601.3.9 +Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/42.0.2311.135 Safari/537.36 Edge/12.246 +Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; FSL 7.0.7.01001) +Mozilla/5.0 (Windows NT 5.1; rv:13.0) Gecko/20100101 Firefox/13.0.1 +Mozilla/5.0 (Windows NT 6.0) AppleWebKit/535.1 (KHTML, like Gecko) Chrome/13.0.782.112 Safari/535.1 +Mozilla/5.0 (Windows NT 6.1; rv:5.0) Gecko/20100101 Firefox/5.02 +Mozilla/5.0 (Windows NT 6.1; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/47.0.2526.111 Safari/537.36 +Mozilla/4.0 (compatible; MSIE 7.0; Windows NT 5.1; SV1; .NET CLR 2.0.50727) +Mozilla/5.0 (Windows NT 6.1; WOW64; rv:12.0) Gecko/20100101 Firefox/12.0 +Mozilla/5.0 (X11; CrOS x86_64 8172.45.0) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/51.0.2704.64 Safari/537.36 +Mozilla/5.0 (X11; Ubuntu; Linux x86_64; rv:15.0) Gecko/20100101 Firefox/15.0.1 +Mozilla/5.0 (X11; U; Linux x86_64; de; rv:1.9.2.8) Gecko/20100723 Ubuntu/10.04 (lucid) Firefox/3.6.8 +Opera/9.80 (Windows NT 5.1; U; en) Presto/2.10.289 Version/12.01 diff --git a/core/lib/Photon/core/utils.py b/core/lib/Photon/core/utils.py new file mode 100644 index 00000000..3c6a7fe4 --- /dev/null +++ b/core/lib/Photon/core/utils.py @@ -0,0 +1,208 @@ +import requests +import math +import os.path +import re +import argparse +import sys +sys.path.append(os.path.abspath('.')) + +import tld + +from .colors import info +from .config import VERBOSE, BAD_TYPES + +from urllib.parse import urlparse + + +def regxy(pattern, response, supress_regex, custom): + """Extract a string based on regex pattern supplied by user.""" + try: + matches = re.findall(r'%s' % pattern, response) + for match in matches: + verb('Custom regex', match) + custom.add(match) + except: + supress_regex = True + + +def is_link(url, processed, files): + """ + Determine whether or not a link should be crawled + A url should not be crawled if it + - Is a file + - Has already been crawled + + Args: + url: str Url to be processed + processed: list[str] List of urls that have already been crawled + + Returns: + bool If `url` should be crawled + """ + if url not in processed: + if url.startswith('#') or url.startswith('javascript:'): + return False + is_file = url.endswith(BAD_TYPES) + if is_file: + files.add(url) + return False + return True + return False + + +def remove_regex(urls, regex): + """ + Parse a list for non-matches to a regex. + + Args: + urls: iterable of urls + regex: string regex to be parsed for + + Returns: + list of strings not matching regex + """ + + if not regex: + return urls + + # To avoid iterating over the characters of a string + if not isinstance(urls, (list, set, tuple)): + urls = [urls] + + try: + non_matching_urls = [url for url in urls if not re.search(regex, url)] + except TypeError: + return [] + + return non_matching_urls + + +def writer(datasets, dataset_names, output_dir): + """Write the results.""" + for dataset, dataset_name in zip(datasets, dataset_names): + if dataset: + filepath = output_dir + '/' + dataset_name + '.txt' + with open(filepath, 'w+') as out_file: + joined = '\n'.join(dataset) + out_file.write(str(joined.encode('utf-8').decode('utf-8'))) + out_file.write('\n') + + +def timer(diff, processed): + """Return the passed time.""" + # Changes seconds into minutes and seconds + minutes, seconds = divmod(diff, 60) + try: + # Finds average time taken by requests + time_per_request = diff / float(len(processed)) + except ZeroDivisionError: + time_per_request = 0 + return minutes, seconds, time_per_request + + +def entropy(string): + """Calculate the entropy of a string.""" + entropy = 0 + for number in range(256): + result = float(string.encode('utf-8').count( + chr(number))) / len(string.encode('utf-8')) + if result != 0: + entropy = entropy - result * math.log(result, 2) + return entropy + + +def xml_parser(response): + """Extract links from .xml files.""" + # Regex for extracting URLs + return re.findall(r'(.*?)', response) + + +def verb(kind, string): + """Enable verbose output.""" + if VERBOSE: + print('%s %s: %s' % (info, kind, string)) + + +def extract_headers(headers): + """This function extracts valid headers from interactive input.""" + sorted_headers = {} + matches = re.findall(r'(.*):\s(.*)', headers) + for match in matches: + header = match[0] + value = match[1] + try: + if value[-1] == ',': + value = value[:-1] + sorted_headers[header] = value + except IndexError: + pass + return sorted_headers + + +def top_level(url, fix_protocol=True): + """Extract the top level domain from an URL.""" + ext = tld.get_tld(url, fix_protocol=fix_protocol) + toplevel = '.'.join(urlparse(url).netloc.split('.')[-2:]).split( + ext)[0] + ext + return toplevel + + +def is_proxy_list(v, proxies): + if os.path.isfile(v): + with open(v, 'r') as _file: + for line in _file: + line = line.strip() + if re.match(r"((http|socks5):\/\/.)?(\d{1,3}\.\d{1,3}\.\d{1,3}\.\d{1,3}):(\d{1,5})", line) or \ + re.match(r"((http|socks5):\/\/.)?[-a-zA-Z0-9@:%._\+~#=]{2,256}\.[a-z]{2,6}:(\d{1,5})", line): + proxies.append({"http": line, + "https": line}) + else: + print("%s ignored" % line) + if proxies: + return True + return False + + +def proxy_type(v): + """ Match IP:PORT or DOMAIN:PORT in a losse manner """ + proxies = [] + if re.match(r"((http|socks5):\/\/.)?(\d{1,3}\.\d{1,3}\.\d{1,3}\.\d{1,3}):(\d{1,5})", v): + proxies.append({"http": v, + "https": v}) + return proxies + elif re.match(r"((http|socks5):\/\/.)?[-a-zA-Z0-9@:%._\+~#=]{2,256}\.[a-z]{2,6}:(\d{1,5})", v): + proxies.append({"http": v, + "https": v}) + return proxies + elif is_proxy_list(v, proxies): + return proxies + else: + raise argparse.ArgumentTypeError( + "Proxy should follow IP:PORT or DOMAIN:PORT format") + + +def luhn(purported): + + # sum_of_digits (index * 2) + LUHN_ODD_LOOKUP = (0, 2, 4, 6, 8, 1, 3, 5, 7, 9) + + if not isinstance(purported, str): + purported = str(purported) + try: + evens = sum(int(p) for p in purported[-1::-2]) + odds = sum(LUHN_ODD_LOOKUP[int(p)] for p in purported[-2::-2]) + return (evens + odds) % 10 == 0 + except ValueError: # Raised if an int conversion fails + return False + + +def is_good_proxy(pip): + try: + requests.get('http://example.com/', proxies=pip, timeout=3) + except requests.exceptions.ConnectTimeout as e: + return False + except Exception as detail: + return False + + return True + diff --git a/core/lib/Photon/core/zap.py b/core/lib/Photon/core/zap.py new file mode 100644 index 00000000..8f1221b2 --- /dev/null +++ b/core/lib/Photon/core/zap.py @@ -0,0 +1,61 @@ +import re +import requests +import random +import sys +import os +from os import path +sys.path.append(os.path.abspath('.')) + +from .utils import verb, xml_parser +from .colors import run, good +from plugins.wayback import time_machine + + +def zap(input_url, archive, domain, host, internal, robots, proxies): + """Extract links from robots.txt and sitemap.xml.""" + if archive: + print('%s Fetching URLs from archive.org' % run) + if False: + archived_urls = time_machine(domain, 'domain') + else: + archived_urls = time_machine(host, 'host') + print('%s Retrieved %i URLs from archive.org' % ( + good, len(archived_urls) - 1)) + for url in archived_urls: + verb('Internal page', url) + internal.add(url) + # Makes request to robots.txt + response = requests.get(input_url + '/robots.txt', + proxies=random.choice(proxies)).text + # Making sure robots.txt isn't some fancy 404 page + if '(?s)', '', response) + res = re.sub(r'<[^<]+?>', '', res) + matches = rintel[0].findall(res) + if matches: + for match in matches: + verb('Intel', match) + bad_intel.add((match, rintel[1], url)) + + +def js_extractor(response): + """Extract js files from the response body""" + # Extract .js files + matches = rscript.findall(response) + for match in matches: + match = match[2].replace('\'', '').replace('"', '') + verb('JS file', match) + bad_scripts.add(match) + +def remove_file(url): + if url.count('/') > 2: + replacable = re.search(r'/[^/]*?$', url).group() + if replacable != '/': + return url.replace(replacable, '') + else: + return url + else: + return url + +def extractor(url): + """Extract details from the response body.""" + response = requester(url, main_url, delay, cook, headers, timeout, host, proxies, user_agents, failed, processed) + if clone: + mirror(url, response) + matches = rhref.findall(response) + for link in matches: + # Remove everything after a "#" to deal with in-page anchors + link = link[1].replace('\'', '').replace('"', '').split('#')[0] + # Checks if the URLs should be crawled + if is_link(link, processed, files): + if link[:4] == 'http': + if link.startswith(main_url): + verb('Internal page', link) + internal.add(link) + else: + verb('External page', link) + external.add(link) + elif link[:2] == '//': + if link.split('/')[2].startswith(host): + verb('Internal page', link) + internal.add(schema + '://' + link) + else: + verb('External page', link) + external.add(link) + elif link[:1] == '/': + verb('Internal page', link) + internal.add(remove_file(url) + link) + else: + verb('Internal page', link) + usable_url = remove_file(url) + if usable_url.endswith('/'): + internal.add(usable_url + link) + elif link.startswith('/'): + internal.add(usable_url + link) + else: + internal.add(usable_url + '/' + link) + + if not only_urls: + intel_extractor(url, response) + js_extractor(response) + if args.regex and not supress_regex: + regxy(args.regex, response, supress_regex, custom) + if api: + matches = rentropy.findall(response) + for match in matches: + if entropy(match) >= 4: + verb('Key', match) + keys.add(url + ': ' + match) + + +def jscanner(url): + """Extract endpoints from JavaScript code.""" + response = requester(url, main_url, delay, cook, headers, timeout, host, proxies, user_agents, failed, processed) + # Extract URLs/endpoints + matches = rendpoint.findall(response) + # Iterate over the matches, match is a tuple + for match in matches: + # Combining the items because one of them is always empty + match = match[0] + match[1] + # Making sure it's not some JavaScript code + if not re.search(r'[}{><"\']', match) and not match == '/': + verb('JS endpoint', match) + endpoints.add(match) + + +# Records the time at which crawling started +then = time.time() + +# Step 1. Extract urls from robots.txt & sitemap.xml +zap(main_url, args.archive, domain, host, internal, robots, proxies) + +# This is so the level 1 emails are parsed as well +internal = set(remove_regex(internal, args.exclude)) + +# Step 2. Crawl recursively to the limit specified in "crawl_level" +for level in range(crawl_level): + # Links to crawl = (all links - already crawled links) - links not to crawl + links = remove_regex(internal - processed, args.exclude) + # If links to crawl are 0 i.e. all links have been crawled + if not links: + break + # if crawled links are somehow more than all links. Possible? ;/ + elif len(internal) <= len(processed): + if len(internal) > 2 + len(args.seeds): + break + print('%s Level %i: %i URLs' % (run, level + 1, len(links))) + try: + flash(extractor, links, thread_count) + except KeyboardInterrupt: + print('') + break + +if not only_urls: + for match in bad_scripts: + if match.startswith(main_url): + scripts.add(match) + elif match.startswith('/') and not match.startswith('//'): + scripts.add(main_url + match) + elif not match.startswith('http') and not match.startswith('//'): + scripts.add(main_url + '/' + match) + # Step 3. Scan the JavaScript files for endpoints + print('%s Crawling %i JavaScript files' % (run, len(scripts))) + flash(jscanner, scripts, thread_count) + + for url in internal: + if '=' in url: + fuzzable.add(url) + + for match, intel_name, url in bad_intel: + if isinstance(match, tuple): + for x in match: # Because "match" is a tuple + if x != '': # If the value isn't empty + if intel_name == "CREDIT_CARD": + if not luhn(match): + # garbage number + continue + intel.add("%s:%s" % (intel_name, x)) + else: + if intel_name == "CREDIT_CARD": + if not luhn(match): + # garbage number + continue + intel.add("%s:%s:%s" % (url, intel_name, match)) + for url in external: + try: + if top_level(url, fix_protocol=True) in INTELS: + intel.add(url) + except: + pass + +# Records the time at which crawling stopped +now = time.time() +# Finds total time taken +diff = (now - then) +minutes, seconds, time_per_request = timer(diff, processed) + +# Step 4. Save the results +if not os.path.exists(output_dir): # if the directory doesn't exist + os.mkdir(output_dir) # create a new directory + +datasets = [files, intel, robots, custom, failed, internal, scripts, + external, fuzzable, endpoints, keys] +dataset_names = ['files', 'intel', 'robots', 'custom', 'failed', 'internal', + 'scripts', 'external', 'fuzzable', 'endpoints', 'keys'] + +writer(datasets, dataset_names, output_dir) +# Printing out results +print(('%s-%s' % (red, end)) * 50) +for dataset, dataset_name in zip(datasets, dataset_names): + if dataset: + print('%s %s: %s' % (good, dataset_name.capitalize(), len(dataset))) +print(('%s-%s' % (red, end)) * 50) + +print('%s Total requests made: %i' % (info, len(processed))) +print('%s Total time taken: %i minutes %i seconds' % (info, minutes, seconds)) +print('%s Requests per second: %i' % (info, int(len(processed) / diff))) + +datasets = { + 'files': list(files), 'intel': list(intel), 'robots': list(robots), + 'custom': list(custom), 'failed': list(failed), 'internal': list(internal), + 'scripts': list(scripts), 'external': list(external), + 'fuzzable': list(fuzzable), 'endpoints': list(endpoints), + 'keys': list(keys) +} + +if args.dns: + print('%s Enumerating subdomains' % run) + from plugins.find_subdomains import find_subdomains + subdomains = find_subdomains(domain) + print('%s %i subdomains found' % (info, len(subdomains))) + writer([subdomains], ['subdomains'], output_dir) + datasets['subdomains'] = subdomains + from plugins.dnsdumpster import dnsdumpster + print('%s Generating DNS map' % run) + dnsdumpster(domain, output_dir) + +if args.export: + from plugins.exporter import exporter + # exporter(directory, format, datasets) + exporter(output_dir, args.export, datasets) + +print('%s Results saved in %s%s%s directory' % (good, green, output_dir, end)) + +if args.std: + for string in datasets[args.std]: + sys.stdout.write(string + '\n') diff --git a/core/lib/Photon/plugins/__init__.py b/core/lib/Photon/plugins/__init__.py new file mode 100644 index 00000000..2be64901 --- /dev/null +++ b/core/lib/Photon/plugins/__init__.py @@ -0,0 +1 @@ +"""Plugins for Photon.""" diff --git a/core/lib/Photon/plugins/dnsdumpster.py b/core/lib/Photon/plugins/dnsdumpster.py new file mode 100644 index 00000000..29a9614a --- /dev/null +++ b/core/lib/Photon/plugins/dnsdumpster.py @@ -0,0 +1,22 @@ +"""Support for dnsdumpster.com.""" +import re + +import requests + + +def dnsdumpster(domain, output_dir): + """Query dnsdumpster.com.""" + response = requests.Session().get('https://dnsdumpster.com/').text + csrf_token = re.search( + r"name=\"csrfmiddlewaretoken\" value=\"(.*?)\"", response).group(1) + + cookies = {'csrftoken': csrf_token} + headers = {'Referer': 'https://dnsdumpster.com/'} + data = {'csrfmiddlewaretoken': csrf_token, 'targetip': domain} + response = requests.Session().post( + 'https://dnsdumpster.com/', cookies=cookies, data=data, headers=headers) + + image = requests.get('https://dnsdumpster.com/static/map/%s.png' % domain) + if image.status_code == 200: + with open('%s/%s.png' % (output_dir, domain), 'wb') as f: + f.write(image.content) diff --git a/core/lib/Photon/plugins/exporter.py b/core/lib/Photon/plugins/exporter.py new file mode 100644 index 00000000..207cc674 --- /dev/null +++ b/core/lib/Photon/plugins/exporter.py @@ -0,0 +1,24 @@ +"""Support for exporting the results.""" +import csv +import json + + +def exporter(directory, method, datasets): + """Export the results.""" + if method.lower() == 'json': + # Convert json_dict to a JSON styled string + json_string = json.dumps(datasets, indent=4) + savefile = open('{}/exported.json'.format(directory), 'w+') + savefile.write(json_string) + savefile.close() + + if method.lower() == 'csv': + with open('{}/exported.csv'.format(directory), 'w+') as csvfile: + csv_writer = csv.writer( + csvfile, delimiter=',', quoting=csv.QUOTE_MINIMAL) + for key, values in datasets.items(): + if values is None: + csv_writer.writerow([key]) + else: + csv_writer.writerow([key] + values) + csvfile.close() diff --git a/core/lib/Photon/plugins/find_subdomains.py b/core/lib/Photon/plugins/find_subdomains.py new file mode 100644 index 00000000..98c9109a --- /dev/null +++ b/core/lib/Photon/plugins/find_subdomains.py @@ -0,0 +1,14 @@ +"""Support for findsubdomains.com.""" +from re import findall + +from requests import get + + +def find_subdomains(domain): + """Find subdomains according to the TLD.""" + result = set() + response = get('https://findsubdomains.com/subdomains-of/' + domain).text + matches = findall(r'(?s)
(.*?)
', response) + for match in matches: + result.add(match.replace(' ', '').replace('\n', '')) + return list(result) diff --git a/core/lib/Photon/plugins/wayback.py b/core/lib/Photon/plugins/wayback.py new file mode 100644 index 00000000..d15942f6 --- /dev/null +++ b/core/lib/Photon/plugins/wayback.py @@ -0,0 +1,22 @@ +"""Support for archive.org.""" +import datetime +import json + +from requests import get + + +def time_machine(host, mode): + """Query archive.org.""" + now = datetime.datetime.now() + to = str(now.year) + str(now.day) + str(now.month) + if now.month > 6: + fro = str(now.year) + str(now.day) + str(now.month - 6) + else: + fro = str(now.year - 1) + str(now.day) + str(now.month + 6) + url = "http://web.archive.org/cdx/search?url=%s&matchType=%s&collapse=urlkey&fl=original&filter=mimetype:text/html&filter=statuscode:200&output=json&from=%s&to=%s" % (host, mode, fro, to) + response = get(url).text + parsed = json.loads(response)[1:] + urls = [] + for item in parsed: + urls.append(item[0]) + return urls diff --git a/core/lib/Photon/requirements.txt b/core/lib/Photon/requirements.txt new file mode 100644 index 00000000..19be6bc4 --- /dev/null +++ b/core/lib/Photon/requirements.txt @@ -0,0 +1,4 @@ +requests +requests[socks] +urllib3 +tld \ No newline at end of file diff --git a/core/lib/__pycache__/FileUtils.cpython-37.pyc b/core/lib/__pycache__/FileUtils.cpython-37.pyc new file mode 100644 index 00000000..df4f5d53 Binary files /dev/null and b/core/lib/__pycache__/FileUtils.cpython-37.pyc differ diff --git a/core/lib/dnsdump_mod/DNSDumpsterAPI.py b/core/lib/dnsdump_mod/DNSDumpsterAPI.py new file mode 100644 index 00000000..685884ff --- /dev/null +++ b/core/lib/dnsdump_mod/DNSDumpsterAPI.py @@ -0,0 +1,118 @@ +""" +This is the (unofficial) Python API for dnsdumpster.com Website. +Using this code, you can retrieve subdomains + +""" + + +import requests +import re +import sys + +from bs4 import BeautifulSoup + + +class DNSDumpsterAPI(object): + + """DNSDumpsterAPI Main Handler""" + + def __init__(self, verbose=False): + self.verbose = verbose + + def display_message(self, s): + if self.verbose: + print('[verbose] %s' % s) + + + def retrieve_results(self, table): + res = [] + trs = table.findAll('tr') + for tr in trs: + tds = tr.findAll('td') + pattern_ip = r'([0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3})' + ip = re.findall(pattern_ip, tds[1].text)[0] + domain = tds[0].text.replace('\n', '').split(' ')[0] + header = ' '.join(tds[0].text.replace('\n', '').split(' ')[1:]) + reverse_dns = tds[1].find('span', attrs={}).text + + additional_info = tds[2].text + country = tds[2].find('span', attrs={}).text + autonomous_system = additional_info.split(' ')[0] + provider = ' '.join(additional_info.split(' ')[1:]) + provider = provider.replace(country, '') + data = {'domain': domain, + 'ip': ip, + 'reverse_dns': reverse_dns, + 'as': autonomous_system, + 'provider': provider, + 'country': country, + 'header': header} + res.append(data) + return res + + def retrieve_txt_record(self, table): + res = [] + for td in table.findAll('td'): + res.append(td.text) + return res + + + def search(self, domain): + dnsdumpster_url = 'https://dnsdumpster.com/' + s = requests.session() + + req = s.get(dnsdumpster_url) + soup = BeautifulSoup(req.content, 'html.parser') + csrf_middleware = soup.findAll('input', attrs={'name': 'csrfmiddlewaretoken'})[0]['value'] + self.display_message('Retrieved token: %s' % csrf_middleware) + + cookies = {'csrftoken': csrf_middleware} + headers = {'Referer': dnsdumpster_url} + data = {'csrfmiddlewaretoken': csrf_middleware, 'targetip': domain} + req = s.post(dnsdumpster_url, cookies=cookies, data=data, headers=headers) + + if req.status_code != 200: + print( + u"Unexpected status code from {url}: {code}".format( + url=dnsdumpster_url, code=req.status_code), + file=sys.stderr, + ) + return [] + + if 'error' in req.content.decode('utf-8'): + print("There was an error getting results", file=sys.stderr) + return [] + + soup = BeautifulSoup(req.content, 'html.parser') + tables = soup.findAll('table') + + res = {} + res['domain'] = domain + res['dns_records'] = {} + res['dns_records']['dns'] = self.retrieve_results(tables[0]) + res['dns_records']['mx'] = self.retrieve_results(tables[1]) + res['dns_records']['txt'] = self.retrieve_txt_record(tables[2]) + res['dns_records']['host'] = self.retrieve_results(tables[3]) + + # Network mapping image + try: + val = soup.find('img', attrs={'class': 'img-responsive'})['src'] + tmp_url = '{}{}'.format(dnsdumpster_url, val) + image_data = requests.get(tmp_url).content.encode('base64') + except: + image_data = None + finally: + res['image_data'] = image_data + + # XLS hosts. + # eg. tsebo.com-201606131255.xlsx + try: + pattern = r'https://dnsdumpster.com/static/xls/' + domain + '-[0-9]{12}\.xlsx' + xls_url = re.findall(pattern, req.content)[0] + xls_data = requests.get(xls_url).content.encode('base64') + except: + xls_data = None + finally: + res['xls_data'] = xls_data + + return res diff --git a/core/lib/dnsdump_mod/DNSDumpsterAPI.pyc b/core/lib/dnsdump_mod/DNSDumpsterAPI.pyc new file mode 100644 index 00000000..1ff1af6d Binary files /dev/null and b/core/lib/dnsdump_mod/DNSDumpsterAPI.pyc differ diff --git a/core/lib/dnsdump_mod/__init__.py b/core/lib/dnsdump_mod/__init__.py new file mode 100644 index 00000000..d493f670 --- /dev/null +++ b/core/lib/dnsdump_mod/__init__.py @@ -0,0 +1,11 @@ +#!/usr/bin/env python +# coding: utf-8 + +#-:-:-:-:-:-:-:-:-:-:-:-:# +# TIDoS Framework # +#-:-:-:-:-:-:-:-:-:-:-:-:# + +#This module requires TIDoS Framework +#https://github.com/0xInfection/TIDoS-Framework + +pass diff --git a/core/lib/dnsdump_mod/__init__.pyc b/core/lib/dnsdump_mod/__init__.pyc new file mode 100644 index 00000000..382a88d4 Binary files /dev/null and b/core/lib/dnsdump_mod/__init__.pyc differ diff --git a/core/lib/dnsdump_mod/__pycache__/DNSDumpsterAPI.cpython-37.pyc b/core/lib/dnsdump_mod/__pycache__/DNSDumpsterAPI.cpython-37.pyc new file mode 100644 index 00000000..949722c7 Binary files /dev/null and b/core/lib/dnsdump_mod/__pycache__/DNSDumpsterAPI.cpython-37.pyc differ diff --git a/core/lib/dnsdump_mod/__pycache__/__init__.cpython-37.pyc b/core/lib/dnsdump_mod/__pycache__/__init__.cpython-37.pyc new file mode 100644 index 00000000..57599102 Binary files /dev/null and b/core/lib/dnsdump_mod/__pycache__/__init__.cpython-37.pyc differ diff --git a/lib/emailprotectionslib_mod/build/lib.linux-x86_64-2.7/emailprotectionslib/Resolver.py b/core/lib/emailprotectionslib/Resolver.py similarity index 100% rename from lib/emailprotectionslib_mod/build/lib.linux-x86_64-2.7/emailprotectionslib/Resolver.py rename to core/lib/emailprotectionslib/Resolver.py diff --git a/lib/emailprotectionslib_mod/build/lib.linux-x86_64-2.7/emailprotectionslib/__init__.py b/core/lib/emailprotectionslib/__init__.py similarity index 100% rename from lib/emailprotectionslib_mod/build/lib.linux-x86_64-2.7/emailprotectionslib/__init__.py rename to core/lib/emailprotectionslib/__init__.py diff --git a/core/lib/emailprotectionslib/__pycache__/Resolver.cpython-37.pyc b/core/lib/emailprotectionslib/__pycache__/Resolver.cpython-37.pyc new file mode 100644 index 00000000..734904d8 Binary files /dev/null and b/core/lib/emailprotectionslib/__pycache__/Resolver.cpython-37.pyc differ diff --git a/core/lib/emailprotectionslib/__pycache__/__init__.cpython-37.pyc b/core/lib/emailprotectionslib/__pycache__/__init__.cpython-37.pyc new file mode 100644 index 00000000..66706854 Binary files /dev/null and b/core/lib/emailprotectionslib/__pycache__/__init__.cpython-37.pyc differ diff --git a/core/lib/emailprotectionslib/__pycache__/dmarc.cpython-37.pyc b/core/lib/emailprotectionslib/__pycache__/dmarc.cpython-37.pyc new file mode 100644 index 00000000..b8ee7b5c Binary files /dev/null and b/core/lib/emailprotectionslib/__pycache__/dmarc.cpython-37.pyc differ diff --git a/core/lib/emailprotectionslib/__pycache__/spf.cpython-37.pyc b/core/lib/emailprotectionslib/__pycache__/spf.cpython-37.pyc new file mode 100644 index 00000000..6a3b8de5 Binary files /dev/null and b/core/lib/emailprotectionslib/__pycache__/spf.cpython-37.pyc differ diff --git a/core/lib/emailprotectionslib/dmarc.py b/core/lib/emailprotectionslib/dmarc.py new file mode 100644 index 00000000..29a13f94 --- /dev/null +++ b/core/lib/emailprotectionslib/dmarc.py @@ -0,0 +1,150 @@ +import re +import logging +import core.lib.emailprotectionslib.Resolver +import tldextract + + +class DmarcRecord(object): + + def __init__(self, domain): + self.domain = domain + self.version = None + self.policy = None + self.pct = None + self.rua = None + self.ruf = None + self.subdomain_policy = None + self.dkim_alignment = None + self.spf_alignment = None + self.record = None + + def __str__(self): + return self.record + + def __eq__(self, other): + return self.__dict__ == other.__dict__ + + def _store_tag_data(self, tag_name, tag_value): + if tag_name == "v": + self.version = tag_value + elif tag_name == "p": + self.policy = tag_value + elif tag_name == "pct": + self.pct = tag_value + elif tag_name == "rua": + self.rua = tag_value + elif tag_name == "ruf": + self.ruf = tag_value + elif tag_name == "sp": + self.subdomain_policy = tag_value + elif tag_name == "adkim": + self.dkim_alignment = tag_value + elif tag_name == "aspf": + self.spf_alignment = tag_value + + def process_tags(self, dmarc_string): + TAG_NAME, TAG_VALUE = (0, 1) + tags = _extract_tags(dmarc_string) + for tag in tags: + self._store_tag_data(tag[TAG_NAME], tag[TAG_VALUE]) + + def is_record_strong(self): + record_strong = False + if self.policy is not None and (self.policy == "reject" or self.policy == "quarantine"): + record_strong = True + + if not record_strong: + try: + record_strong = self.is_org_domain_strong() + except OrgDomainException: + record_strong = False + + return record_strong + + def is_subdomain_policy_strong(self): + if self.subdomain_policy is not None: + return self.subdomain_policy == "reject" or self.subdomain_policy == "quarantine" + + def is_org_domain_strong(self): + org_record = self.get_org_record() + subdomain_policy_strong = org_record.is_subdomain_policy_strong() + if subdomain_policy_strong is not None: + return subdomain_policy_strong + else: + return org_record.is_record_strong() + + def get_org_record(self): + org_domain = self.get_org_domain() + if org_domain == self.domain: + raise OrgDomainException + else: + return DmarcRecord.from_domain(org_domain) + + def get_org_domain(self): + try: + domain_parts = tldextract.extract(self.domain) + return "%(domain)s.%(tld)s" % {'domain': domain_parts.domain, 'tld': domain_parts.suffix} + except TypeError: + return None + + @staticmethod + def from_dmarc_string(dmarc_string, domain): + if dmarc_string is not None: + dmarc_record = DmarcRecord(domain) + dmarc_record.record = dmarc_string + dmarc_record.process_tags(dmarc_string) + return dmarc_record + else: + return DmarcRecord(domain) + + @staticmethod + def from_domain(domain): + dmarc_string = get_dmarc_string_for_domain(domain) + if dmarc_string is not None: + return DmarcRecord.from_dmarc_string(dmarc_string, domain) + else: + return DmarcRecord(domain) + + +def _extract_tags(dmarc_record): + dmarc_pattern = "(\w+)=(.*?)(?:; ?|$)" + return re.findall(dmarc_pattern, dmarc_record) + + +def _merge_txt_record_strings(txt_record): + # DMARC spec requires that TXT records containing multiple strings be cat'd together. + string_pattern = re.compile('"([^"]*)"') + txt_record_strings = string_pattern.findall(txt_record) + return "".join(txt_record_strings) + + +def _match_dmarc_record(txt_record): + merged_txt_record = _merge_txt_record_strings(txt_record) + dmarc_pattern = re.compile('^(v=DMARC.*)') + potential_dmarc_match = dmarc_pattern.match(str(merged_txt_record)) + return potential_dmarc_match + + +def _find_record_from_answers(txt_records): + dmarc_record = None + for record in txt_records: + potential_match = _match_dmarc_record(record[2]) + if potential_match is not None: + dmarc_record = potential_match.group(1) + return dmarc_record + + +def get_dmarc_string_for_domain(domain): + try: + txt_records = Resolver.resolver().query("_dmarc." + domain, query_type="TXT") + return _find_record_from_answers(txt_records) + except IOError: + # This is returned usually as a NXDOMAIN, which is expected. + return None + except TypeError as error: + logging.exception(error) + return None + + +class OrgDomainException(Exception): + pass diff --git a/core/lib/emailprotectionslib/spf.py b/core/lib/emailprotectionslib/spf.py new file mode 100644 index 00000000..e2c4d70d --- /dev/null +++ b/core/lib/emailprotectionslib/spf.py @@ -0,0 +1,192 @@ +import re +import logging +import core.lib.emailprotectionslib.Resolver + + +class SpfRecord(object): + + def __init__(self, domain): + self.version = None + self.record = None + self.mechanisms = None + self.all_string = None + self.domain = domain + self.recursion_depth = 0 + + def __str__(self): + return self.record + + def __eq__(self, other): + return self.__dict__ == other.__dict__ + + def get_redirected_record(self): + if self.recursion_depth >= 10: + return SpfRecord(self.get_redirect_domain()) + else: + redirect_domain = self.get_redirect_domain() + if redirect_domain is not None: + redirect_record = SpfRecord.from_domain(redirect_domain) + redirect_record.recursion_depth = self.recursion_depth + 1 + return redirect_record + + def get_redirect_domain(self): + redirect_domain = None + if self.mechanisms is not None: + for mechanism in self.mechanisms: + redirect_mechanism = re.match('redirect=(.*)', mechanism) + if redirect_mechanism is not None: + redirect_domain = redirect_mechanism.group(1) + return redirect_domain + + def get_include_domains(self): + include_domains = [] + if self.mechanisms is not None: + for mechanism in self.mechanisms: + include_mechanism = re.match('include:(.*)', mechanism) + if include_mechanism is not None: + include_domains.append(include_mechanism.group(1)) + return include_domains + else: + return [] + + def get_include_records(self): + if self.recursion_depth >= 10: + return {} + else: + include_domains = self.get_include_domains() + include_records = {} + for domain in include_domains: + try: + include_records[domain] = SpfRecord.from_domain(domain) + include_records[domain].recursion_depth = self.recursion_depth + 1 + except IOError as e: + logging.exception(e) + include_records[domain] = None + return include_records + + def _is_all_mechanism_strong(self): + strong_spf_all_string = True + if self.all_string is not None: + if not (self.all_string == "~all" or self.all_string == "-all"): + strong_spf_all_string = False + else: + strong_spf_all_string = False + return strong_spf_all_string + + def _is_redirect_mechanism_strong(self): + redirect_domain = self.get_redirect_domain() + + if redirect_domain is not None: + redirect_mechanism = SpfRecord.from_domain(redirect_domain) + + if redirect_mechanism is not None: + return redirect_mechanism.is_record_strong() + else: + return False + else: + return False + + def _are_include_mechanisms_strong(self): + include_records = self.get_include_records() + for record in include_records: + if include_records[record] is not None and include_records[record].is_record_strong(): + return True + return False + + def is_record_strong(self): + strong_spf_record = self._is_all_mechanism_strong() + if strong_spf_record is False: + + redirect_strength = self._is_redirect_mechanism_strong() + include_strength = self._are_include_mechanisms_strong() + + strong_spf_record = False + + if redirect_strength is True: + strong_spf_record = True + + if include_strength is True: + strong_spf_record = True + return strong_spf_record + + @staticmethod + def from_spf_string(spf_string, domain): + if spf_string is not None: + spf_record = SpfRecord(domain) + spf_record.record = spf_string + spf_record.mechanisms = _extract_mechanisms(spf_string) + spf_record.version = _extract_version(spf_string) + spf_record.all_string = _extract_all_mechanism(spf_record.mechanisms) + return spf_record + else: + return SpfRecord(domain) + + @staticmethod + def from_domain(domain): + spf_string = get_spf_string_for_domain(domain) + if spf_string is not None: + return SpfRecord.from_spf_string(spf_string, domain) + else: + return SpfRecord(domain) + + +def _extract_version(spf_string): + version_pattern = "^v=(spf.)" + version_match = re.match(version_pattern, spf_string) + if version_match is not None: + return version_match.group(1) + else: + return None + + +def _extract_all_mechanism(mechanisms): + all_mechanism = None + for mechanism in mechanisms: + if re.match(".all", mechanism): + all_mechanism = mechanism + return all_mechanism + + +def _find_unique_mechanisms(initial_mechanisms, redirected_mechanisms): + return [x for x in redirected_mechanisms if x not in initial_mechanisms] + + +def _extract_mechanisms(spf_string): + spf_mechanism_pattern = ("(?:((?:\+|-|~)?(?:a|mx|ptr|include" + "|ip4|ip6|exists|redirect|exp|all)" + "(?:(?::|=|/)?(?:\S*))?) ?)") + spf_mechanisms = re.findall(spf_mechanism_pattern, spf_string) + + return spf_mechanisms + + +def _merge_txt_record_strings(txt_record): + # SPF spec requires that TXT records containing multiple strings be cat'd together. + string_pattern = re.compile('"([^"]*)"') + txt_record_strings = string_pattern.findall(txt_record) + return "".join(txt_record_strings) + + +def _match_spf_record(txt_record): + clean_txt_record = _merge_txt_record_strings(txt_record) + spf_pattern = re.compile('^(v=spf.*)') + potential_spf_match = spf_pattern.match(str(clean_txt_record)) + return potential_spf_match + + +def _find_record_from_answers(txt_records): + spf_record = None + for record in txt_records: + potential_match = _match_spf_record(record[2]) + if potential_match is not None: + spf_record = potential_match.group(1) + return spf_record + + +def get_spf_string_for_domain(domain): + try: + txt_records = Resolver.resolver().query(domain, query_type="TXT") + return _find_record_from_answers(txt_records) + except IOError as e: + # This is returned usually as a NXDOMAIN, which is expected. + return None diff --git a/lib/mechanize_mod/build/lib.linux-x86_64-2.7/mechanize/__init__.py b/core/lib/mechanize/__init__.py similarity index 100% rename from lib/mechanize_mod/build/lib.linux-x86_64-2.7/mechanize/__init__.py rename to core/lib/mechanize/__init__.py diff --git a/core/lib/mechanize/__pycache__/__init__.cpython-37.pyc b/core/lib/mechanize/__pycache__/__init__.cpython-37.pyc new file mode 100644 index 00000000..087638ec Binary files /dev/null and b/core/lib/mechanize/__pycache__/__init__.cpython-37.pyc differ diff --git a/core/lib/mechanize/__pycache__/_auth.cpython-37.pyc b/core/lib/mechanize/__pycache__/_auth.cpython-37.pyc new file mode 100644 index 00000000..a8c0b601 Binary files /dev/null and b/core/lib/mechanize/__pycache__/_auth.cpython-37.pyc differ diff --git a/core/lib/mechanize/__pycache__/_clientcookie.cpython-37.pyc b/core/lib/mechanize/__pycache__/_clientcookie.cpython-37.pyc new file mode 100644 index 00000000..7d3e703b Binary files /dev/null and b/core/lib/mechanize/__pycache__/_clientcookie.cpython-37.pyc differ diff --git a/core/lib/mechanize/__pycache__/_debug.cpython-37.pyc b/core/lib/mechanize/__pycache__/_debug.cpython-37.pyc new file mode 100644 index 00000000..c7d9a56d Binary files /dev/null and b/core/lib/mechanize/__pycache__/_debug.cpython-37.pyc differ diff --git a/core/lib/mechanize/__pycache__/_entities.cpython-37.pyc b/core/lib/mechanize/__pycache__/_entities.cpython-37.pyc new file mode 100644 index 00000000..d424ad30 Binary files /dev/null and b/core/lib/mechanize/__pycache__/_entities.cpython-37.pyc differ diff --git a/core/lib/mechanize/__pycache__/_equiv.cpython-37.pyc b/core/lib/mechanize/__pycache__/_equiv.cpython-37.pyc new file mode 100644 index 00000000..3ecfd596 Binary files /dev/null and b/core/lib/mechanize/__pycache__/_equiv.cpython-37.pyc differ diff --git a/core/lib/mechanize/__pycache__/_form.cpython-37.pyc b/core/lib/mechanize/__pycache__/_form.cpython-37.pyc new file mode 100644 index 00000000..0b311a2d Binary files /dev/null and b/core/lib/mechanize/__pycache__/_form.cpython-37.pyc differ diff --git a/core/lib/mechanize/__pycache__/_form_controls.cpython-37.pyc b/core/lib/mechanize/__pycache__/_form_controls.cpython-37.pyc new file mode 100644 index 00000000..4389b7da Binary files /dev/null and b/core/lib/mechanize/__pycache__/_form_controls.cpython-37.pyc differ diff --git a/core/lib/mechanize/__pycache__/_gzip.cpython-37.pyc b/core/lib/mechanize/__pycache__/_gzip.cpython-37.pyc new file mode 100644 index 00000000..4bacbfa9 Binary files /dev/null and b/core/lib/mechanize/__pycache__/_gzip.cpython-37.pyc differ diff --git a/core/lib/mechanize/__pycache__/_headersutil.cpython-37.pyc b/core/lib/mechanize/__pycache__/_headersutil.cpython-37.pyc new file mode 100644 index 00000000..dfd08984 Binary files /dev/null and b/core/lib/mechanize/__pycache__/_headersutil.cpython-37.pyc differ diff --git a/core/lib/mechanize/__pycache__/_html.cpython-37.pyc b/core/lib/mechanize/__pycache__/_html.cpython-37.pyc new file mode 100644 index 00000000..f17b847f Binary files /dev/null and b/core/lib/mechanize/__pycache__/_html.cpython-37.pyc differ diff --git a/core/lib/mechanize/__pycache__/_http.cpython-37.pyc b/core/lib/mechanize/__pycache__/_http.cpython-37.pyc new file mode 100644 index 00000000..80f60ed0 Binary files /dev/null and b/core/lib/mechanize/__pycache__/_http.cpython-37.pyc differ diff --git a/core/lib/mechanize/__pycache__/_mechanize.cpython-37.pyc b/core/lib/mechanize/__pycache__/_mechanize.cpython-37.pyc new file mode 100644 index 00000000..f878d1d6 Binary files /dev/null and b/core/lib/mechanize/__pycache__/_mechanize.cpython-37.pyc differ diff --git a/core/lib/mechanize/__pycache__/_opener.cpython-37.pyc b/core/lib/mechanize/__pycache__/_opener.cpython-37.pyc new file mode 100644 index 00000000..c3e94a7a Binary files /dev/null and b/core/lib/mechanize/__pycache__/_opener.cpython-37.pyc differ diff --git a/core/lib/mechanize/__pycache__/_request.cpython-37.pyc b/core/lib/mechanize/__pycache__/_request.cpython-37.pyc new file mode 100644 index 00000000..562fd545 Binary files /dev/null and b/core/lib/mechanize/__pycache__/_request.cpython-37.pyc differ diff --git a/core/lib/mechanize/__pycache__/_response.cpython-37.pyc b/core/lib/mechanize/__pycache__/_response.cpython-37.pyc new file mode 100644 index 00000000..50ddeb47 Binary files /dev/null and b/core/lib/mechanize/__pycache__/_response.cpython-37.pyc differ diff --git a/core/lib/mechanize/__pycache__/_rfc3986.cpython-37.pyc b/core/lib/mechanize/__pycache__/_rfc3986.cpython-37.pyc new file mode 100644 index 00000000..453d0efb Binary files /dev/null and b/core/lib/mechanize/__pycache__/_rfc3986.cpython-37.pyc differ diff --git a/core/lib/mechanize/__pycache__/_sockettimeout.cpython-37.pyc b/core/lib/mechanize/__pycache__/_sockettimeout.cpython-37.pyc new file mode 100644 index 00000000..152ad1ce Binary files /dev/null and b/core/lib/mechanize/__pycache__/_sockettimeout.cpython-37.pyc differ diff --git a/core/lib/mechanize/__pycache__/_urllib2.cpython-37.pyc b/core/lib/mechanize/__pycache__/_urllib2.cpython-37.pyc new file mode 100644 index 00000000..42cbac8f Binary files /dev/null and b/core/lib/mechanize/__pycache__/_urllib2.cpython-37.pyc differ diff --git a/core/lib/mechanize/__pycache__/_urllib2_fork.cpython-37.pyc b/core/lib/mechanize/__pycache__/_urllib2_fork.cpython-37.pyc new file mode 100644 index 00000000..2fae671f Binary files /dev/null and b/core/lib/mechanize/__pycache__/_urllib2_fork.cpython-37.pyc differ diff --git a/core/lib/mechanize/__pycache__/_useragent.cpython-37.pyc b/core/lib/mechanize/__pycache__/_useragent.cpython-37.pyc new file mode 100644 index 00000000..69c2f585 Binary files /dev/null and b/core/lib/mechanize/__pycache__/_useragent.cpython-37.pyc differ diff --git a/core/lib/mechanize/__pycache__/_util.cpython-37.pyc b/core/lib/mechanize/__pycache__/_util.cpython-37.pyc new file mode 100644 index 00000000..d3e82356 Binary files /dev/null and b/core/lib/mechanize/__pycache__/_util.cpython-37.pyc differ diff --git a/core/lib/mechanize/__pycache__/_version.cpython-37.pyc b/core/lib/mechanize/__pycache__/_version.cpython-37.pyc new file mode 100644 index 00000000..53ecad65 Binary files /dev/null and b/core/lib/mechanize/__pycache__/_version.cpython-37.pyc differ diff --git a/core/lib/mechanize/__pycache__/polyglot.cpython-37.pyc b/core/lib/mechanize/__pycache__/polyglot.cpython-37.pyc new file mode 100644 index 00000000..231e1191 Binary files /dev/null and b/core/lib/mechanize/__pycache__/polyglot.cpython-37.pyc differ diff --git a/core/lib/mechanize/_auth.py b/core/lib/mechanize/_auth.py new file mode 100644 index 00000000..023a689b --- /dev/null +++ b/core/lib/mechanize/_auth.py @@ -0,0 +1,73 @@ +"""HTTP Authentication and Proxy support. + + +Copyright 2006 John J. Lee + +This code is free software; you can redistribute it and/or modify it under +the terms of the BSD or ZPL 2.1 licenses (see the file LICENSE +included with the distribution). + +""" + +from __future__ import absolute_import +from ._urllib2_fork import HTTPPasswordMgr +from .polyglot import is_string, iteritems + + +# TODO: stop deriving from HTTPPasswordMgr +class HTTPProxyPasswordMgr(HTTPPasswordMgr): + # has default realm and host/port + + def add_password(self, realm, uri, user, passwd): + # uri could be a single URI or a sequence + if uri is None or is_string(uri): + uris = [uri] + else: + uris = uri + passwd_by_domain = self.passwd.setdefault(realm, {}) + for uri in uris: + for default_port in True, False: + reduced_uri = self.reduce_uri(uri, default_port) + passwd_by_domain[reduced_uri] = (user, passwd) + + def find_user_password(self, realm, authuri): + attempts = [(realm, authuri), (None, authuri)] + # bleh, want default realm to take precedence over default + # URI/authority, hence this outer loop + for default_uri in False, True: + for realm, authuri in attempts: + authinfo_by_domain = self.passwd.get(realm, {}) + for default_port in True, False: + reduced_authuri = self.reduce_uri(authuri, default_port) + for uri, authinfo in iteritems(authinfo_by_domain): + if uri is None and not default_uri: + continue + if self.is_suburi(uri, reduced_authuri): + return authinfo + user, password = None, None + + if user is not None: + break + return user, password + + def reduce_uri(self, uri, default_port=True): + if uri is None: + return None + return HTTPPasswordMgr.reduce_uri(self, uri, default_port) + + def is_suburi(self, base, test): + if base is None: + # default to the proxy's host/port + hostport, path = test + base = (hostport, "/") + return HTTPPasswordMgr.is_suburi(self, base, test) + + +class HTTPSClientCertMgr(HTTPPasswordMgr): + # implementation inheritance: this is not a proper subclass + + def add_key_cert(self, uri, key_file, cert_file): + self.add_password(None, uri, key_file, cert_file) + + def find_key_cert(self, authuri): + return HTTPPasswordMgr.find_user_password(self, None, authuri) diff --git a/core/lib/mechanize/_clientcookie.py b/core/lib/mechanize/_clientcookie.py new file mode 100644 index 00000000..ebd27736 --- /dev/null +++ b/core/lib/mechanize/_clientcookie.py @@ -0,0 +1,252 @@ +from __future__ import absolute_import + +import re +import time +from .polyglot import ( + Cookie as _Cookie, CookieJar as CJ, MozillaCookieJar as MCJ, request_host + as request_host_lc, DEFAULT_HTTP_PORT, CookiePolicy, DefaultCookiePolicy, + FileCookieJar, LoadError, LWPCookieJar, _debug, domain_match, + eff_request_host, escape_path, is_HDN, lwp_cookie_str, reach, request_path, + request_port, user_domain_match, iteritems) + +__all__ = [ + 'DEFAULT_HTTP_PORT', 'CookiePolicy', 'DefaultCookiePolicy', + 'request_host_lc', 'MozillaCookieJar', 'escape_path', 'is_HDN', + 'request_port', 'LWPCookieJar', 'LoadError', 'reach', 'FileCookieJar', + 'lwp_cookie_str', 'domain_match', 'request_path', 'user_domain_match' +] + + +def effective_request_host(request): + """Return the effective request-host, as defined by RFC 2965.""" + return eff_request_host(request)[1] + + +def request_is_unverifiable(request): + try: + return request.is_unverifiable() + except AttributeError: + if hasattr(request, "unverifiable"): + return request.unverifiable + else: + raise + + +def cookies_equal(a, b): + return all(getattr(a, x) == getattr(b, x) for x in Cookie._attrs) + + +class Cookie(_Cookie): + _attrs = ("version", "name", "value", "port", "port_specified", "domain", + "domain_specified", "domain_initial_dot", "path", + "path_specified", "secure", "expires", "discard", "comment", + "comment_url", "rfc2109", "_rest") + + def __eq__(self, other): + return all(getattr(self, a) == getattr(other, a) for a in self._attrs) + + def __ne__(self, other): + return not (self == other) + + +class CookieJar(CJ): + + def __getstate__(self): + ans = self.__dict__.copy() + del ans['_cookies_lock'] + return ans + + def __setstate__(self, val): + for k, v in iteritems(val): + setattr(self, k, v) + + def cookies_for_request(self, request): + """Return a list of cookies to be returned to server. + + The returned list of cookie instances is sorted in the order they + should appear in the Cookie: header for return to the server. + + See add_cookie_header.__doc__ for the interface required of the + request argument. + """ + with self._cookies_lock: + self._policy._now = self._now = int(time.time()) + cookies = self._cookies_for_request(request) + + # add cookies in order of most specific (i.e. longest) path first + def key(x): + return len(x.path) + + cookies.sort(key=key, reverse=True) + return cookies + + def get_policy(self): + return self._policy + + def _normalized_cookie_tuples(self, attrs_set): + """Return list of tuples containing normalised cookie information. + + attrs_set is the list of lists of key,value pairs extracted from + the Set-Cookie or Set-Cookie2 headers. + + Tuples are name, value, standard, rest, where name and value are the + cookie name and value, standard is a dictionary containing the standard + cookie-attributes (discard, secure, version, expires or max-age, + domain, path and port) and rest is a dictionary containing the rest of + the cookie-attributes. + + """ + cookie_tuples = [] + + boolean_attrs = "discard", "secure" + value_attrs = ("version", "expires", "max-age", "domain", "path", + "port", "comment", "commenturl") + + for cookie_attrs in attrs_set: + name, value = cookie_attrs[0] + + # Build dictionary of standard cookie-attributes (standard) and + # dictionary of other cookie-attributes (rest). + + # Note: expiry time is normalised to seconds since epoch. V0 + # cookies should have the Expires cookie-attribute, and V1 cookies + # should have Max-Age, but since V1 includes RFC 2109 cookies (and + # since V0 cookies may be a mish-mash of Netscape and RFC 2109), we + # accept either (but prefer Max-Age). + max_age_set = False + + bad_cookie = False + + standard = {} + rest = {} + for k, v in cookie_attrs[1:]: + lc = k.lower() + # don't lose case distinction for unknown fields + if lc in value_attrs or lc in boolean_attrs: + k = lc + if k in boolean_attrs and v is None: + # boolean cookie-attribute is present, but has no value + # (like "discard", rather than "port=80") + v = True + if k in standard: + # only first value is significant + continue + if k == "domain": + if v is None: + _debug(" missing value for domain attribute") + bad_cookie = True + break + # RFC 2965 section 3.3.3 + v = v.lower() + if k == "expires": + if max_age_set: + # Prefer max-age to expires (like Mozilla) + continue + if v is None: + _debug(" missing or invalid value for expires " + "attribute: treating as session cookie") + continue + if k == "max-age": + max_age_set = True + try: + v = int(v) + except ValueError: + _debug(" missing or invalid (non-numeric) value for " + "max-age attribute") + bad_cookie = True + break + # convert RFC 2965 Max-Age to seconds since epoch + # XXX Strictly you're supposed to follow RFC 2616 + # age-calculation rules. Remember that zero Max-Age + # is a request to discard (old and new) cookie, though. + k = "expires" + v = self._now + v + if not v and k == 'path': + # Added by Kovid, not in stdlib implementation + v = '/' + if (k in value_attrs) or (k in boolean_attrs): + if (v is None and + k not in ("port", "comment", "commenturl")): + _debug(" missing value for %s attribute" % k) + bad_cookie = True + break + standard[k] = v + else: + rest[k] = v + + if bad_cookie: + continue + + cookie_tuples.append((name, value, standard, rest)) + + return cookie_tuples + + def __getitem__(self, i): + for q, ans in enumerate(self): + if q == i: + return ans + raise IndexError() + + +class MozillaCookieJar(MCJ): + + def _really_load(self, f, filename, ignore_discard, ignore_expires): + now = time.time() + + magic = f.readline() + if not re.search(self.magic_re, magic): + f.close() + raise LoadError( + "%r does not look like a Netscape format cookies file" % + filename) + + try: + while 1: + line = f.readline() + if line == "": + break + + # last field may be absent, so keep any trailing tab + if line.endswith("\n"): + line = line[:-1] + + # skip comments and blank lines XXX what is $ for? + if (line.strip().startswith(("#", "$")) or line.strip() == ""): + continue + + (domain, domain_specified, path, secure, expires, name, + value) = line.split("\t", 6) # Changed by Kovid + secure = (secure == "TRUE") + domain_specified = (domain_specified == "TRUE") + if name == "": + # cookies.txt regards 'Set-Cookie: foo' as a cookie + # with no name, whereas cookielib regards it as a + # cookie with no value. + name = value + value = None + + initial_dot = domain.startswith(".") + if domain_specified != initial_dot: + raise ValueError() + assert domain_specified == initial_dot + + discard = False + if expires == "": + expires = None + discard = True + + # assume path_specified is false + c = Cookie(0, name, value, None, False, domain, + domain_specified, initial_dot, path, False, secure, + expires, discard, None, None, {}) + if not ignore_discard and c.discard: + continue + if not ignore_expires and c.is_expired(now): + continue + self.set_cookie(c) + + except IOError: + raise + except Exception: + raise LoadError("invalid Netscape format cookies file %r: %r" % + (filename, line)) diff --git a/lib/mechanize_mod/build/lib.linux-x86_64-2.7/mechanize/_debug.py b/core/lib/mechanize/_debug.py similarity index 100% rename from lib/mechanize_mod/build/lib.linux-x86_64-2.7/mechanize/_debug.py rename to core/lib/mechanize/_debug.py diff --git a/core/lib/mechanize/_entities.py b/core/lib/mechanize/_entities.py new file mode 100644 index 00000000..50a075cc --- /dev/null +++ b/core/lib/mechanize/_entities.py @@ -0,0 +1,1751 @@ +#!/usr/bin/env python +# vim:fileencoding=utf-8 +# Copyright: 2017, Kovid Goyal + +from __future__ import (absolute_import, division, print_function, + unicode_literals) + +html5_entities = { +# ENTITY_DATA {{{ + 'aacute': 'á', + 'abreve': 'ă', + 'ac': '∾', + 'acd': '∿', + 'ace': '∾̳', + 'acirc': 'â', + 'acute': '´', + 'acy': 'а', + 'aelig': 'æ', + 'af': '\u2061', + 'afr': '𝔞', + 'agrave': 'à', + 'alefsym': 'ℵ', + 'aleph': 'ℵ', + 'alpha': 'α', + 'amacr': 'ā', + 'amalg': '⨿', + 'amp': '&', + 'and': '∧', + 'andand': '⩕', + 'andd': '⩜', + 'andslope': '⩘', + 'andv': '⩚', + 'ang': '∠', + 'ange': '⦤', + 'angle': '∠', + 'angmsd': '∡', + 'angmsdaa': '⦨', + 'angmsdab': '⦩', + 'angmsdac': '⦪', + 'angmsdad': '⦫', + 'angmsdae': '⦬', + 'angmsdaf': '⦭', + 'angmsdag': '⦮', + 'angmsdah': '⦯', + 'angrt': '∟', + 'angrtvb': '⊾', + 'angrtvbd': '⦝', + 'angsph': '∢', + 'angst': 'Å', + 'angzarr': '⍼', + 'aogon': 'ą', + 'aopf': '𝕒', + 'ap': '≈', + 'apacir': '⩯', + 'ape': '≊', + 'apid': '≋', + 'apos': "'", + 'applyfunction': '\u2061', + 'approx': '≈', + 'approxeq': '≊', + 'aring': 'å', + 'ascr': '𝒶', + 'assign': '≔', + 'ast': '*', + 'asymp': '≈', + 'asympeq': '≍', + 'atilde': 'ã', + 'auml': 'ä', + 'awconint': '∳', + 'awint': '⨑', + 'backcong': '≌', + 'backepsilon': '϶', + 'backprime': '‵', + 'backsim': '∽', + 'backsimeq': '⋍', + 'backslash': '∖', + 'barv': '⫧', + 'barvee': '⊽', + 'barwed': '⌅', + 'barwedge': '⌅', + 'bbrk': '⎵', + 'bbrktbrk': '⎶', + 'bcong': '≌', + 'bcy': 'б', + 'bdquo': '„', + 'becaus': '∵', + 'because': '∵', + 'bemptyv': '⦰', + 'bepsi': '϶', + 'bernou': 'ℬ', + 'bernoullis': 'ℬ', + 'beta': 'β', + 'beth': 'ℶ', + 'between': '≬', + 'bfr': '𝔟', + 'bigcap': '⋂', + 'bigcirc': '◯', + 'bigcup': '⋃', + 'bigodot': '⨀', + 'bigoplus': '⨁', + 'bigotimes': '⨂', + 'bigsqcup': '⨆', + 'bigstar': '★', + 'bigtriangledown': '▽', + 'bigtriangleup': '△', + 'biguplus': '⨄', + 'bigvee': '⋁', + 'bigwedge': '⋀', + 'bkarow': '⤍', + 'blacklozenge': '⧫', + 'blacksquare': '▪', + 'blacktriangle': '▴', + 'blacktriangledown': '▾', + 'blacktriangleleft': '◂', + 'blacktriangleright': '▸', + 'blank': '␣', + 'blk12': '▒', + 'blk14': '░', + 'blk34': '▓', + 'block': '█', + 'bne': '=⃥', + 'bnequiv': '≡⃥', + 'bnot': '⌐', + 'bopf': '𝕓', + 'bot': '⊥', + 'bottom': '⊥', + 'bowtie': '⋈', + 'boxbox': '⧉', + 'boxdl': '┐', + 'boxdr': '┌', + 'boxh': '─', + 'boxhd': '┬', + 'boxhu': '┴', + 'boxminus': '⊟', + 'boxplus': '⊞', + 'boxtimes': '⊠', + 'boxul': '┘', + 'boxur': '└', + 'boxv': '│', + 'boxvh': '┼', + 'boxvl': '┤', + 'boxvr': '├', + 'bprime': '‵', + 'breve': '˘', + 'brvbar': '¦', + 'bscr': '𝒷', + 'bsemi': '⁏', + 'bsim': '∽', + 'bsime': '⋍', + 'bsol': '\\', + 'bsolb': '⧅', + 'bsolhsub': '⟈', + 'bull': '•', + 'bullet': '•', + 'bump': '≎', + 'bumpe': '≏', + 'bumpeq': '≏', + 'cacute': 'ć', + 'cap': '∩', + 'capand': '⩄', + 'capbrcup': '⩉', + 'capcap': '⩋', + 'capcup': '⩇', + 'capdot': '⩀', + 'capitaldifferentiald': 'ⅅ', + 'caps': '∩︀', + 'caret': '⁁', + 'caron': 'ˇ', + 'cayleys': 'ℭ', + 'ccaps': '⩍', + 'ccaron': 'č', + 'ccedil': 'ç', + 'ccirc': 'ĉ', + 'cconint': '∰', + 'ccups': '⩌', + 'ccupssm': '⩐', + 'cdot': 'ċ', + 'cedil': '¸', + 'cedilla': '¸', + 'cemptyv': '⦲', + 'cent': '¢', + 'centerdot': '·', + 'cfr': '𝔠', + 'chcy': 'ч', + 'check': '✓', + 'checkmark': '✓', + 'chi': 'χ', + 'cir': '○', + 'circ': 'ˆ', + 'circeq': '≗', + 'circlearrowleft': '↺', + 'circlearrowright': '↻', + 'circledast': '⊛', + 'circledcirc': '⊚', + 'circleddash': '⊝', + 'circledot': '⊙', + 'circledr': '®', + 'circleds': 'Ⓢ', + 'circleminus': '⊖', + 'circleplus': '⊕', + 'circletimes': '⊗', + 'cire': '≗', + 'cirfnint': '⨐', + 'cirmid': '⫯', + 'cirscir': '⧂', + 'clockwisecontourintegral': '∲', + 'closecurlydoublequote': '”', + 'closecurlyquote': '’', + 'clubs': '♣', + 'clubsuit': '♣', + 'colon': ':', + 'colone': '≔', + 'coloneq': '≔', + 'comma': ',', + 'commat': '@', + 'comp': '∁', + 'compfn': '∘', + 'complement': '∁', + 'complexes': 'ℂ', + 'cong': '≅', + 'congdot': '⩭', + 'congruent': '≡', + 'conint': '∮', + 'contourintegral': '∮', + 'copf': '𝕔', + 'coprod': '∐', + 'coproduct': '∐', + 'copy': '©', + 'copysr': '℗', + 'counterclockwisecontourintegral': '∳', + 'crarr': '↵', + 'cross': '✗', + 'cscr': '𝒸', + 'csub': '⫏', + 'csube': '⫑', + 'csup': '⫐', + 'csupe': '⫒', + 'ctdot': '⋯', + 'cudarrl': '⤸', + 'cudarrr': '⤵', + 'cuepr': '⋞', + 'cuesc': '⋟', + 'cularr': '↶', + 'cularrp': '⤽', + 'cup': '∪', + 'cupbrcap': '⩈', + 'cupcap': '⩆', + 'cupcup': '⩊', + 'cupdot': '⊍', + 'cupor': '⩅', + 'cups': '∪︀', + 'curarr': '↷', + 'curarrm': '⤼', + 'curlyeqprec': '⋞', + 'curlyeqsucc': '⋟', + 'curlyvee': '⋎', + 'curlywedge': '⋏', + 'curren': '¤', + 'curvearrowleft': '↶', + 'curvearrowright': '↷', + 'cuvee': '⋎', + 'cuwed': '⋏', + 'cwconint': '∲', + 'cwint': '∱', + 'cylcty': '⌭', + 'dagger': '†', + 'daleth': 'ℸ', + 'darr': '↓', + 'dash': '‐', + 'dashv': '⊣', + 'dbkarow': '⤏', + 'dblac': '˝', + 'dcaron': 'ď', + 'dcy': 'д', + 'dd': 'ⅆ', + 'ddagger': '‡', + 'ddarr': '⇊', + 'ddotrahd': '⤑', + 'ddotseq': '⩷', + 'deg': '°', + 'del': '∇', + 'delta': 'δ', + 'demptyv': '⦱', + 'dfisht': '⥿', + 'dfr': '𝔡', + 'dhar': '⥥', + 'dharl': '⇃', + 'dharr': '⇂', + 'diacriticalacute': '´', + 'diacriticaldot': '˙', + 'diacriticaldoubleacute': '˝', + 'diacriticalgrave': '`', + 'diacriticaltilde': '˜', + 'diam': '⋄', + 'diamond': '⋄', + 'diamondsuit': '♦', + 'diams': '♦', + 'die': '¨', + 'differentiald': 'ⅆ', + 'digamma': 'ϝ', + 'disin': '⋲', + 'div': '÷', + 'divide': '÷', + 'divideontimes': '⋇', + 'divonx': '⋇', + 'djcy': 'ђ', + 'dlcorn': '⌞', + 'dlcrop': '⌍', + 'dollar': '$', + 'dopf': '𝕕', + 'dot': '˙', + 'dotdot': '⃜', + 'doteq': '≐', + 'doteqdot': '≑', + 'dotequal': '≐', + 'dotminus': '∸', + 'dotplus': '∔', + 'dotsquare': '⊡', + 'doublebarwedge': '⌆', + 'doublecontourintegral': '∯', + 'doubledot': '¨', + 'doubledownarrow': '⇓', + 'doubleleftarrow': '⇐', + 'doubleleftrightarrow': '⇔', + 'doublelefttee': '⫤', + 'doublelongleftarrow': '⟸', + 'doublelongleftrightarrow': '⟺', + 'doublelongrightarrow': '⟹', + 'doublerightarrow': '⇒', + 'doublerighttee': '⊨', + 'doubleuparrow': '⇑', + 'doubleupdownarrow': '⇕', + 'doubleverticalbar': '∥', + 'downarrow': '↓', + 'downarrowbar': '⤓', + 'downarrowuparrow': '⇵', + 'downbreve': '̑', + 'downdownarrows': '⇊', + 'downharpoonleft': '⇃', + 'downharpoonright': '⇂', + 'downleftrightvector': '⥐', + 'downleftteevector': '⥞', + 'downleftvector': '↽', + 'downleftvectorbar': '⥖', + 'downrightteevector': '⥟', + 'downrightvector': '⇁', + 'downrightvectorbar': '⥗', + 'downtee': '⊤', + 'downteearrow': '↧', + 'drbkarow': '⤐', + 'drcorn': '⌟', + 'drcrop': '⌌', + 'dscr': '𝒹', + 'dscy': 'ѕ', + 'dsol': '⧶', + 'dstrok': 'đ', + 'dtdot': '⋱', + 'dtri': '▿', + 'dtrif': '▾', + 'duarr': '⇵', + 'duhar': '⥯', + 'dwangle': '⦦', + 'dzcy': 'џ', + 'dzigrarr': '⟿', + 'eacute': 'é', + 'easter': '⩮', + 'ecaron': 'ě', + 'ecir': '≖', + 'ecirc': 'ê', + 'ecolon': '≕', + 'ecy': 'э', + 'eddot': '⩷', + 'edot': 'ė', + 'ee': 'ⅇ', + 'efdot': '≒', + 'efr': '𝔢', + 'eg': '⪚', + 'egrave': 'è', + 'egs': '⪖', + 'egsdot': '⪘', + 'el': '⪙', + 'element': '∈', + 'elinters': '⏧', + 'ell': 'ℓ', + 'els': '⪕', + 'elsdot': '⪗', + 'emacr': 'ē', + 'empty': '∅', + 'emptyset': '∅', + 'emptysmallsquare': '◻', + 'emptyv': '∅', + 'emptyverysmallsquare': '▫', + 'emsp': '\u2003', + 'emsp13': '\u2004', + 'emsp14': '\u2005', + 'eng': 'ŋ', + 'ensp': '\u2002', + 'eogon': 'ę', + 'eopf': '𝕖', + 'epar': '⋕', + 'eparsl': '⧣', + 'eplus': '⩱', + 'epsi': 'ε', + 'epsilon': 'ε', + 'epsiv': 'ϵ', + 'eqcirc': '≖', + 'eqcolon': '≕', + 'eqsim': '≂', + 'eqslantgtr': '⪖', + 'eqslantless': '⪕', + 'equal': '⩵', + 'equals': '=', + 'equaltilde': '≂', + 'equest': '≟', + 'equilibrium': '⇌', + 'equiv': '≡', + 'equivdd': '⩸', + 'eqvparsl': '⧥', + 'erarr': '⥱', + 'erdot': '≓', + 'escr': 'ℯ', + 'esdot': '≐', + 'esim': '≂', + 'eta': 'η', + 'eth': 'ð', + 'euml': 'ë', + 'euro': '€', + 'excl': '!', + 'exist': '∃', + 'exists': '∃', + 'expectation': 'ℰ', + 'exponentiale': 'ⅇ', + 'fallingdotseq': '≒', + 'fcy': 'ф', + 'female': '♀', + 'ffilig': 'ffi', + 'fflig': 'ff', + 'ffllig': 'ffl', + 'ffr': '𝔣', + 'filig': 'fi', + 'filledsmallsquare': '◼', + 'filledverysmallsquare': '▪', + 'fjlig': 'fj', + 'flat': '♭', + 'fllig': 'fl', + 'fltns': '▱', + 'fnof': 'ƒ', + 'fopf': '𝕗', + 'forall': '∀', + 'fork': '⋔', + 'forkv': '⫙', + 'fouriertrf': 'ℱ', + 'fpartint': '⨍', + 'frac12': '½', + 'frac13': '⅓', + 'frac14': '¼', + 'frac15': '⅕', + 'frac16': '⅙', + 'frac18': '⅛', + 'frac23': '⅔', + 'frac25': '⅖', + 'frac34': '¾', + 'frac35': '⅗', + 'frac38': '⅜', + 'frac45': '⅘', + 'frac56': '⅚', + 'frac58': '⅝', + 'frac78': '⅞', + 'frasl': '⁄', + 'frown': '⌢', + 'fscr': '𝒻', + 'gacute': 'ǵ', + 'gamma': 'γ', + 'gammad': 'ϝ', + 'gap': '⪆', + 'gbreve': 'ğ', + 'gcedil': 'Ģ', + 'gcirc': 'ĝ', + 'gcy': 'г', + 'gdot': 'ġ', + 'ge': '≥', + 'gel': '⋛', + 'geq': '≥', + 'geqq': '≧', + 'geqslant': '⩾', + 'ges': '⩾', + 'gescc': '⪩', + 'gesdot': '⪀', + 'gesdoto': '⪂', + 'gesdotol': '⪄', + 'gesl': '⋛︀', + 'gesles': '⪔', + 'gfr': '𝔤', + 'gg': '≫', + 'ggg': '⋙', + 'gimel': 'ℷ', + 'gjcy': 'ѓ', + 'gl': '≷', + 'gla': '⪥', + 'gle': '⪒', + 'glj': '⪤', + 'gnap': '⪊', + 'gnapprox': '⪊', + 'gne': '⪈', + 'gneq': '⪈', + 'gneqq': '≩', + 'gnsim': '⋧', + 'gopf': '𝕘', + 'grave': '`', + 'greaterequal': '≥', + 'greaterequalless': '⋛', + 'greaterfullequal': '≧', + 'greatergreater': '⪢', + 'greaterless': '≷', + 'greaterslantequal': '⩾', + 'greatertilde': '≳', + 'gscr': 'ℊ', + 'gsim': '≳', + 'gsime': '⪎', + 'gsiml': '⪐', + 'gt': '>', + 'gtcc': '⪧', + 'gtcir': '⩺', + 'gtdot': '⋗', + 'gtlpar': '⦕', + 'gtquest': '⩼', + 'gtrapprox': '⪆', + 'gtrarr': '⥸', + 'gtrdot': '⋗', + 'gtreqless': '⋛', + 'gtreqqless': '⪌', + 'gtrless': '≷', + 'gtrsim': '≳', + 'gvertneqq': '≩︀', + 'gvne': '≩︀', + 'hacek': 'ˇ', + 'hairsp': '\u200a', + 'half': '½', + 'hamilt': 'ℋ', + 'hardcy': 'ъ', + 'harr': '↔', + 'harrcir': '⥈', + 'harrw': '↭', + 'hat': '^', + 'hbar': 'ℏ', + 'hcirc': 'ĥ', + 'hearts': '♥', + 'heartsuit': '♥', + 'hellip': '…', + 'hercon': '⊹', + 'hfr': '𝔥', + 'hilbertspace': 'ℋ', + 'hksearow': '⤥', + 'hkswarow': '⤦', + 'hoarr': '⇿', + 'homtht': '∻', + 'hookleftarrow': '↩', + 'hookrightarrow': '↪', + 'hopf': '𝕙', + 'horbar': '―', + 'horizontalline': '─', + 'hscr': '𝒽', + 'hslash': 'ℏ', + 'hstrok': 'ħ', + 'humpdownhump': '≎', + 'humpequal': '≏', + 'hybull': '⁃', + 'hyphen': '‐', + 'iacute': 'í', + 'ic': '\u2063', + 'icirc': 'î', + 'icy': 'и', + 'idot': 'İ', + 'iecy': 'е', + 'iexcl': '¡', + 'iff': '⇔', + 'ifr': '𝔦', + 'igrave': 'ì', + 'ii': 'ⅈ', + 'iiiint': '⨌', + 'iiint': '∭', + 'iinfin': '⧜', + 'iiota': '℩', + 'ijlig': 'ij', + 'im': 'ℑ', + 'imacr': 'ī', + 'image': 'ℑ', + 'imaginaryi': 'ⅈ', + 'imagline': 'ℐ', + 'imagpart': 'ℑ', + 'imath': 'ı', + 'imof': '⊷', + 'imped': 'Ƶ', + 'implies': '⇒', + 'in': '∈', + 'incare': '℅', + 'infin': '∞', + 'infintie': '⧝', + 'inodot': 'ı', + 'int': '∫', + 'intcal': '⊺', + 'integers': 'ℤ', + 'integral': '∫', + 'intercal': '⊺', + 'intersection': '⋂', + 'intlarhk': '⨗', + 'intprod': '⨼', + 'invisiblecomma': '\u2063', + 'invisibletimes': '\u2062', + 'iocy': 'ё', + 'iogon': 'į', + 'iopf': '𝕚', + 'iota': 'ι', + 'iprod': '⨼', + 'iquest': '¿', + 'iscr': '𝒾', + 'isin': '∈', + 'isindot': '⋵', + 'isine': '⋹', + 'isins': '⋴', + 'isinsv': '⋳', + 'isinv': '∈', + 'it': '\u2062', + 'itilde': 'ĩ', + 'iukcy': 'і', + 'iuml': 'ï', + 'jcirc': 'ĵ', + 'jcy': 'й', + 'jfr': '𝔧', + 'jmath': 'ȷ', + 'jopf': '𝕛', + 'jscr': '𝒿', + 'jsercy': 'ј', + 'jukcy': 'є', + 'kappa': 'κ', + 'kappav': 'ϰ', + 'kcedil': 'ķ', + 'kcy': 'к', + 'kfr': '𝔨', + 'kgreen': 'ĸ', + 'khcy': 'х', + 'kjcy': 'ќ', + 'kopf': '𝕜', + 'kscr': '𝓀', + 'laarr': '⇚', + 'lacute': 'ĺ', + 'laemptyv': '⦴', + 'lagran': 'ℒ', + 'lambda': 'λ', + 'lang': '⟨', + 'langd': '⦑', + 'langle': '⟨', + 'lap': '⪅', + 'laplacetrf': 'ℒ', + 'laquo': '«', + 'larr': '←', + 'larrb': '⇤', + 'larrbfs': '⤟', + 'larrfs': '⤝', + 'larrhk': '↩', + 'larrlp': '↫', + 'larrpl': '⤹', + 'larrsim': '⥳', + 'larrtl': '↢', + 'lat': '⪫', + 'latail': '⤙', + 'late': '⪭', + 'lates': '⪭︀', + 'lbarr': '⤌', + 'lbbrk': '❲', + 'lbrace': '{', + 'lbrack': '[', + 'lbrke': '⦋', + 'lbrksld': '⦏', + 'lbrkslu': '⦍', + 'lcaron': 'ľ', + 'lcedil': 'ļ', + 'lceil': '⌈', + 'lcub': '{', + 'lcy': 'л', + 'ldca': '⤶', + 'ldquo': '“', + 'ldquor': '„', + 'ldrdhar': '⥧', + 'ldrushar': '⥋', + 'ldsh': '↲', + 'le': '≤', + 'leftanglebracket': '⟨', + 'leftarrow': '←', + 'leftarrowbar': '⇤', + 'leftarrowrightarrow': '⇆', + 'leftarrowtail': '↢', + 'leftceiling': '⌈', + 'leftdoublebracket': '⟦', + 'leftdownteevector': '⥡', + 'leftdownvector': '⇃', + 'leftdownvectorbar': '⥙', + 'leftfloor': '⌊', + 'leftharpoondown': '↽', + 'leftharpoonup': '↼', + 'leftleftarrows': '⇇', + 'leftrightarrow': '↔', + 'leftrightarrows': '⇆', + 'leftrightharpoons': '⇋', + 'leftrightsquigarrow': '↭', + 'leftrightvector': '⥎', + 'lefttee': '⊣', + 'leftteearrow': '↤', + 'leftteevector': '⥚', + 'leftthreetimes': '⋋', + 'lefttriangle': '⊲', + 'lefttrianglebar': '⧏', + 'lefttriangleequal': '⊴', + 'leftupdownvector': '⥑', + 'leftupteevector': '⥠', + 'leftupvector': '↿', + 'leftupvectorbar': '⥘', + 'leftvector': '↼', + 'leftvectorbar': '⥒', + 'leg': '⋚', + 'leq': '≤', + 'leqq': '≦', + 'leqslant': '⩽', + 'les': '⩽', + 'lescc': '⪨', + 'lesdot': '⩿', + 'lesdoto': '⪁', + 'lesdotor': '⪃', + 'lesg': '⋚︀', + 'lesges': '⪓', + 'lessapprox': '⪅', + 'lessdot': '⋖', + 'lesseqgtr': '⋚', + 'lesseqqgtr': '⪋', + 'lessequalgreater': '⋚', + 'lessfullequal': '≦', + 'lessgreater': '≶', + 'lessgtr': '≶', + 'lessless': '⪡', + 'lesssim': '≲', + 'lessslantequal': '⩽', + 'lesstilde': '≲', + 'lfisht': '⥼', + 'lfloor': '⌊', + 'lfr': '𝔩', + 'lg': '≶', + 'lge': '⪑', + 'lhar': '⥢', + 'lhard': '↽', + 'lharu': '↼', + 'lharul': '⥪', + 'lhblk': '▄', + 'ljcy': 'љ', + 'll': '≪', + 'llarr': '⇇', + 'llcorner': '⌞', + 'lleftarrow': '⇚', + 'llhard': '⥫', + 'lltri': '◺', + 'lmidot': 'ŀ', + 'lmoust': '⎰', + 'lmoustache': '⎰', + 'lnap': '⪉', + 'lnapprox': '⪉', + 'lne': '⪇', + 'lneq': '⪇', + 'lneqq': '≨', + 'lnsim': '⋦', + 'loang': '⟬', + 'loarr': '⇽', + 'lobrk': '⟦', + 'longleftarrow': '⟵', + 'longleftrightarrow': '⟷', + 'longmapsto': '⟼', + 'longrightarrow': '⟶', + 'looparrowleft': '↫', + 'looparrowright': '↬', + 'lopar': '⦅', + 'lopf': '𝕝', + 'loplus': '⨭', + 'lotimes': '⨴', + 'lowast': '∗', + 'lowbar': '_', + 'lowerleftarrow': '↙', + 'lowerrightarrow': '↘', + 'loz': '◊', + 'lozenge': '◊', + 'lozf': '⧫', + 'lpar': '(', + 'lparlt': '⦓', + 'lrarr': '⇆', + 'lrcorner': '⌟', + 'lrhar': '⇋', + 'lrhard': '⥭', + 'lrm': '\u200e', + 'lrtri': '⊿', + 'lsaquo': '‹', + 'lscr': '𝓁', + 'lsh': '↰', + 'lsim': '≲', + 'lsime': '⪍', + 'lsimg': '⪏', + 'lsqb': '[', + 'lsquo': '‘', + 'lsquor': '‚', + 'lstrok': 'ł', + 'lt': '<', + 'ltcc': '⪦', + 'ltcir': '⩹', + 'ltdot': '⋖', + 'lthree': '⋋', + 'ltimes': '⋉', + 'ltlarr': '⥶', + 'ltquest': '⩻', + 'ltri': '◃', + 'ltrie': '⊴', + 'ltrif': '◂', + 'ltrpar': '⦖', + 'lurdshar': '⥊', + 'luruhar': '⥦', + 'lvertneqq': '≨︀', + 'lvne': '≨︀', + 'macr': '¯', + 'male': '♂', + 'malt': '✠', + 'maltese': '✠', + 'map': '↦', + 'mapsto': '↦', + 'mapstodown': '↧', + 'mapstoleft': '↤', + 'mapstoup': '↥', + 'marker': '▮', + 'mcomma': '⨩', + 'mcy': 'м', + 'mdash': '—', + 'mddot': '∺', + 'measuredangle': '∡', + 'mediumspace': '\u205f', + 'mellintrf': 'ℳ', + 'mfr': '𝔪', + 'mho': '℧', + 'micro': 'µ', + 'mid': '∣', + 'midast': '*', + 'midcir': '⫰', + 'middot': '·', + 'minus': '−', + 'minusb': '⊟', + 'minusd': '∸', + 'minusdu': '⨪', + 'minusplus': '∓', + 'mlcp': '⫛', + 'mldr': '…', + 'mnplus': '∓', + 'models': '⊧', + 'mopf': '𝕞', + 'mp': '∓', + 'mscr': '𝓂', + 'mstpos': '∾', + 'mu': 'μ', + 'multimap': '⊸', + 'mumap': '⊸', + 'nabla': '∇', + 'nacute': 'ń', + 'nang': '∠⃒', + 'nap': '≉', + 'nape': '⩰̸', + 'napid': '≋̸', + 'napos': 'ʼn', + 'napprox': '≉', + 'natur': '♮', + 'natural': '♮', + 'naturals': 'ℕ', + 'nbsp': '\xa0', + 'nbump': '≎̸', + 'nbumpe': '≏̸', + 'ncap': '⩃', + 'ncaron': 'ň', + 'ncedil': 'ņ', + 'ncong': '≇', + 'ncongdot': '⩭̸', + 'ncup': '⩂', + 'ncy': 'н', + 'ndash': '–', + 'ne': '≠', + 'nearhk': '⤤', + 'nearr': '↗', + 'nearrow': '↗', + 'nedot': '≐̸', + 'negativemediumspace': '\u200b', + 'negativethickspace': '\u200b', + 'negativethinspace': '\u200b', + 'negativeverythinspace': '\u200b', + 'nequiv': '≢', + 'nesear': '⤨', + 'nesim': '≂̸', + 'nestedgreatergreater': '≫', + 'nestedlessless': '≪', + 'newline': '\n', + 'nexist': '∄', + 'nexists': '∄', + 'nfr': '𝔫', + 'nge': '≱', + 'ngeq': '≱', + 'ngeqq': '≧̸', + 'ngeqslant': '⩾̸', + 'nges': '⩾̸', + 'ngg': '⋙̸', + 'ngsim': '≵', + 'ngt': '≯', + 'ngtr': '≯', + 'ngtv': '≫̸', + 'nharr': '↮', + 'nhpar': '⫲', + 'ni': '∋', + 'nis': '⋼', + 'nisd': '⋺', + 'niv': '∋', + 'njcy': 'њ', + 'nlarr': '↚', + 'nldr': '‥', + 'nle': '≰', + 'nleftarrow': '↚', + 'nleftrightarrow': '↮', + 'nleq': '≰', + 'nleqq': '≦̸', + 'nleqslant': '⩽̸', + 'nles': '⩽̸', + 'nless': '≮', + 'nll': '⋘̸', + 'nlsim': '≴', + 'nlt': '≮', + 'nltri': '⋪', + 'nltrie': '⋬', + 'nltv': '≪̸', + 'nmid': '∤', + 'nobreak': '\u2060', + 'nonbreakingspace': '\xa0', + 'nopf': '𝕟', + 'not': '¬', + 'notcongruent': '≢', + 'notcupcap': '≭', + 'notdoubleverticalbar': '∦', + 'notelement': '∉', + 'notequal': '≠', + 'notequaltilde': '≂̸', + 'notexists': '∄', + 'notgreater': '≯', + 'notgreaterequal': '≱', + 'notgreaterfullequal': '≧̸', + 'notgreatergreater': '≫̸', + 'notgreaterless': '≹', + 'notgreaterslantequal': '⩾̸', + 'notgreatertilde': '≵', + 'nothumpdownhump': '≎̸', + 'nothumpequal': '≏̸', + 'notin': '∉', + 'notindot': '⋵̸', + 'notine': '⋹̸', + 'notinva': '∉', + 'notinvb': '⋷', + 'notinvc': '⋶', + 'notlefttriangle': '⋪', + 'notlefttrianglebar': '⧏̸', + 'notlefttriangleequal': '⋬', + 'notless': '≮', + 'notlessequal': '≰', + 'notlessgreater': '≸', + 'notlessless': '≪̸', + 'notlessslantequal': '⩽̸', + 'notlesstilde': '≴', + 'notnestedgreatergreater': '⪢̸', + 'notnestedlessless': '⪡̸', + 'notni': '∌', + 'notniva': '∌', + 'notnivb': '⋾', + 'notnivc': '⋽', + 'notprecedes': '⊀', + 'notprecedesequal': '⪯̸', + 'notprecedesslantequal': '⋠', + 'notreverseelement': '∌', + 'notrighttriangle': '⋫', + 'notrighttrianglebar': '⧐̸', + 'notrighttriangleequal': '⋭', + 'notsquaresubset': '⊏̸', + 'notsquaresubsetequal': '⋢', + 'notsquaresuperset': '⊐̸', + 'notsquaresupersetequal': '⋣', + 'notsubset': '⊂⃒', + 'notsubsetequal': '⊈', + 'notsucceeds': '⊁', + 'notsucceedsequal': '⪰̸', + 'notsucceedsslantequal': '⋡', + 'notsucceedstilde': '≿̸', + 'notsuperset': '⊃⃒', + 'notsupersetequal': '⊉', + 'nottilde': '≁', + 'nottildeequal': '≄', + 'nottildefullequal': '≇', + 'nottildetilde': '≉', + 'notverticalbar': '∤', + 'npar': '∦', + 'nparallel': '∦', + 'nparsl': '⫽⃥', + 'npart': '∂̸', + 'npolint': '⨔', + 'npr': '⊀', + 'nprcue': '⋠', + 'npre': '⪯̸', + 'nprec': '⊀', + 'npreceq': '⪯̸', + 'nrarr': '↛', + 'nrarrc': '⤳̸', + 'nrarrw': '↝̸', + 'nrightarrow': '↛', + 'nrtri': '⋫', + 'nrtrie': '⋭', + 'nsc': '⊁', + 'nsccue': '⋡', + 'nsce': '⪰̸', + 'nscr': '𝓃', + 'nshortmid': '∤', + 'nshortparallel': '∦', + 'nsim': '≁', + 'nsime': '≄', + 'nsimeq': '≄', + 'nsmid': '∤', + 'nspar': '∦', + 'nsqsube': '⋢', + 'nsqsupe': '⋣', + 'nsub': '⊄', + 'nsube': '⊈', + 'nsubset': '⊂⃒', + 'nsubseteq': '⊈', + 'nsubseteqq': '⫅̸', + 'nsucc': '⊁', + 'nsucceq': '⪰̸', + 'nsup': '⊅', + 'nsupe': '⊉', + 'nsupset': '⊃⃒', + 'nsupseteq': '⊉', + 'nsupseteqq': '⫆̸', + 'ntgl': '≹', + 'ntilde': 'ñ', + 'ntlg': '≸', + 'ntriangleleft': '⋪', + 'ntrianglelefteq': '⋬', + 'ntriangleright': '⋫', + 'ntrianglerighteq': '⋭', + 'nu': 'ν', + 'num': '#', + 'numero': '№', + 'numsp': '\u2007', + 'nvap': '≍⃒', + 'nvdash': '⊬', + 'nvge': '≥⃒', + 'nvgt': '>⃒', + 'nvharr': '⤄', + 'nvinfin': '⧞', + 'nvlarr': '⤂', + 'nvle': '≤⃒', + 'nvlt': '<⃒', + 'nvltrie': '⊴⃒', + 'nvrarr': '⤃', + 'nvrtrie': '⊵⃒', + 'nvsim': '∼⃒', + 'nwarhk': '⤣', + 'nwarr': '↖', + 'nwarrow': '↖', + 'nwnear': '⤧', + 'oacute': 'ó', + 'oast': '⊛', + 'ocir': '⊚', + 'ocirc': 'ô', + 'ocy': 'о', + 'odash': '⊝', + 'odblac': 'ő', + 'odiv': '⨸', + 'odot': '⊙', + 'odsold': '⦼', + 'oelig': 'œ', + 'ofcir': '⦿', + 'ofr': '𝔬', + 'ogon': '˛', + 'ograve': 'ò', + 'ogt': '⧁', + 'ohbar': '⦵', + 'ohm': 'Ω', + 'oint': '∮', + 'olarr': '↺', + 'olcir': '⦾', + 'olcross': '⦻', + 'oline': '‾', + 'olt': '⧀', + 'omacr': 'ō', + 'omega': 'ω', + 'omicron': 'ο', + 'omid': '⦶', + 'ominus': '⊖', + 'oopf': '𝕠', + 'opar': '⦷', + 'opencurlydoublequote': '“', + 'opencurlyquote': '‘', + 'operp': '⦹', + 'oplus': '⊕', + 'or': '∨', + 'orarr': '↻', + 'ord': '⩝', + 'order': 'ℴ', + 'orderof': 'ℴ', + 'ordf': 'ª', + 'ordm': 'º', + 'origof': '⊶', + 'oror': '⩖', + 'orslope': '⩗', + 'orv': '⩛', + 'os': 'Ⓢ', + 'oscr': 'ℴ', + 'oslash': 'ø', + 'osol': '⊘', + 'otilde': 'õ', + 'otimes': '⊗', + 'otimesas': '⨶', + 'ouml': 'ö', + 'ovbar': '⌽', + 'overbar': '‾', + 'overbrace': '⏞', + 'overbracket': '⎴', + 'overparenthesis': '⏜', + 'par': '∥', + 'para': '¶', + 'parallel': '∥', + 'parsim': '⫳', + 'parsl': '⫽', + 'part': '∂', + 'partiald': '∂', + 'pcy': 'п', + 'percnt': '%', + 'period': '.', + 'permil': '‰', + 'perp': '⊥', + 'pertenk': '‱', + 'pfr': '𝔭', + 'phi': 'φ', + 'phiv': 'ϕ', + 'phmmat': 'ℳ', + 'phone': '☎', + 'pi': 'π', + 'pitchfork': '⋔', + 'piv': 'ϖ', + 'planck': 'ℏ', + 'planckh': 'ℎ', + 'plankv': 'ℏ', + 'plus': '+', + 'plusacir': '⨣', + 'plusb': '⊞', + 'pluscir': '⨢', + 'plusdo': '∔', + 'plusdu': '⨥', + 'pluse': '⩲', + 'plusminus': '±', + 'plusmn': '±', + 'plussim': '⨦', + 'plustwo': '⨧', + 'pm': '±', + 'poincareplane': 'ℌ', + 'pointint': '⨕', + 'popf': '𝕡', + 'pound': '£', + 'pr': '≺', + 'prap': '⪷', + 'prcue': '≼', + 'pre': '⪯', + 'prec': '≺', + 'precapprox': '⪷', + 'preccurlyeq': '≼', + 'precedes': '≺', + 'precedesequal': '⪯', + 'precedesslantequal': '≼', + 'precedestilde': '≾', + 'preceq': '⪯', + 'precnapprox': '⪹', + 'precneqq': '⪵', + 'precnsim': '⋨', + 'precsim': '≾', + 'prime': '′', + 'primes': 'ℙ', + 'prnap': '⪹', + 'prne': '⪵', + 'prnsim': '⋨', + 'prod': '∏', + 'product': '∏', + 'profalar': '⌮', + 'profline': '⌒', + 'profsurf': '⌓', + 'prop': '∝', + 'proportion': '∷', + 'proportional': '∝', + 'propto': '∝', + 'prsim': '≾', + 'prurel': '⊰', + 'pscr': '𝓅', + 'psi': 'ψ', + 'puncsp': '\u2008', + 'qfr': '𝔮', + 'qint': '⨌', + 'qopf': '𝕢', + 'qprime': '⁗', + 'qscr': '𝓆', + 'quaternions': 'ℍ', + 'quatint': '⨖', + 'quest': '?', + 'questeq': '≟', + 'quot': '"', + 'raarr': '⇛', + 'race': '∽̱', + 'racute': 'ŕ', + 'radic': '√', + 'raemptyv': '⦳', + 'rang': '⟩', + 'rangd': '⦒', + 'range': '⦥', + 'rangle': '⟩', + 'raquo': '»', + 'rarr': '→', + 'rarrap': '⥵', + 'rarrb': '⇥', + 'rarrbfs': '⤠', + 'rarrc': '⤳', + 'rarrfs': '⤞', + 'rarrhk': '↪', + 'rarrlp': '↬', + 'rarrpl': '⥅', + 'rarrsim': '⥴', + 'rarrtl': '↣', + 'rarrw': '↝', + 'ratail': '⤚', + 'ratio': '∶', + 'rationals': 'ℚ', + 'rbarr': '⤍', + 'rbbrk': '❳', + 'rbrace': '}', + 'rbrack': ']', + 'rbrke': '⦌', + 'rbrksld': '⦎', + 'rbrkslu': '⦐', + 'rcaron': 'ř', + 'rcedil': 'ŗ', + 'rceil': '⌉', + 'rcub': '}', + 'rcy': 'р', + 'rdca': '⤷', + 'rdldhar': '⥩', + 'rdquo': '”', + 'rdquor': '”', + 'rdsh': '↳', + 're': 'ℜ', + 'real': 'ℜ', + 'realine': 'ℛ', + 'realpart': 'ℜ', + 'reals': 'ℝ', + 'rect': '▭', + 'reg': '®', + 'reverseelement': '∋', + 'reverseequilibrium': '⇋', + 'reverseupequilibrium': '⥯', + 'rfisht': '⥽', + 'rfloor': '⌋', + 'rfr': '𝔯', + 'rhar': '⥤', + 'rhard': '⇁', + 'rharu': '⇀', + 'rharul': '⥬', + 'rho': 'ρ', + 'rhov': 'ϱ', + 'rightanglebracket': '⟩', + 'rightarrow': '→', + 'rightarrowbar': '⇥', + 'rightarrowleftarrow': '⇄', + 'rightarrowtail': '↣', + 'rightceiling': '⌉', + 'rightdoublebracket': '⟧', + 'rightdownteevector': '⥝', + 'rightdownvector': '⇂', + 'rightdownvectorbar': '⥕', + 'rightfloor': '⌋', + 'rightharpoondown': '⇁', + 'rightharpoonup': '⇀', + 'rightleftarrows': '⇄', + 'rightleftharpoons': '⇌', + 'rightrightarrows': '⇉', + 'rightsquigarrow': '↝', + 'righttee': '⊢', + 'rightteearrow': '↦', + 'rightteevector': '⥛', + 'rightthreetimes': '⋌', + 'righttriangle': '⊳', + 'righttrianglebar': '⧐', + 'righttriangleequal': '⊵', + 'rightupdownvector': '⥏', + 'rightupteevector': '⥜', + 'rightupvector': '↾', + 'rightupvectorbar': '⥔', + 'rightvector': '⇀', + 'rightvectorbar': '⥓', + 'ring': '˚', + 'risingdotseq': '≓', + 'rlarr': '⇄', + 'rlhar': '⇌', + 'rlm': '\u200f', + 'rmoust': '⎱', + 'rmoustache': '⎱', + 'rnmid': '⫮', + 'roang': '⟭', + 'roarr': '⇾', + 'robrk': '⟧', + 'ropar': '⦆', + 'ropf': '𝕣', + 'roplus': '⨮', + 'rotimes': '⨵', + 'roundimplies': '⥰', + 'rpar': ')', + 'rpargt': '⦔', + 'rppolint': '⨒', + 'rrarr': '⇉', + 'rrightarrow': '⇛', + 'rsaquo': '›', + 'rscr': '𝓇', + 'rsh': '↱', + 'rsqb': ']', + 'rsquo': '’', + 'rsquor': '’', + 'rthree': '⋌', + 'rtimes': '⋊', + 'rtri': '▹', + 'rtrie': '⊵', + 'rtrif': '▸', + 'rtriltri': '⧎', + 'ruledelayed': '⧴', + 'ruluhar': '⥨', + 'rx': '℞', + 'sacute': 'ś', + 'sbquo': '‚', + 'sc': '≻', + 'scap': '⪸', + 'scaron': 'š', + 'sccue': '≽', + 'sce': '⪰', + 'scedil': 'ş', + 'scirc': 'ŝ', + 'scnap': '⪺', + 'scne': '⪶', + 'scnsim': '⋩', + 'scpolint': '⨓', + 'scsim': '≿', + 'scy': 'с', + 'sdot': '⋅', + 'sdotb': '⊡', + 'sdote': '⩦', + 'searhk': '⤥', + 'searr': '↘', + 'searrow': '↘', + 'sect': '§', + 'semi': ';', + 'seswar': '⤩', + 'setminus': '∖', + 'setmn': '∖', + 'sext': '✶', + 'sfr': '𝔰', + 'sfrown': '⌢', + 'sharp': '♯', + 'shchcy': 'щ', + 'shcy': 'ш', + 'shortdownarrow': '↓', + 'shortleftarrow': '←', + 'shortmid': '∣', + 'shortparallel': '∥', + 'shortrightarrow': '→', + 'shortuparrow': '↑', + 'shy': '\xad', + 'sigma': 'σ', + 'sigmaf': 'ς', + 'sigmav': 'ς', + 'sim': '∼', + 'simdot': '⩪', + 'sime': '≃', + 'simeq': '≃', + 'simg': '⪞', + 'simge': '⪠', + 'siml': '⪝', + 'simle': '⪟', + 'simne': '≆', + 'simplus': '⨤', + 'simrarr': '⥲', + 'slarr': '←', + 'smallcircle': '∘', + 'smallsetminus': '∖', + 'smashp': '⨳', + 'smeparsl': '⧤', + 'smid': '∣', + 'smile': '⌣', + 'smt': '⪪', + 'smte': '⪬', + 'smtes': '⪬︀', + 'softcy': 'ь', + 'sol': '/', + 'solb': '⧄', + 'solbar': '⌿', + 'sopf': '𝕤', + 'spades': '♠', + 'spadesuit': '♠', + 'spar': '∥', + 'sqcap': '⊓', + 'sqcaps': '⊓︀', + 'sqcup': '⊔', + 'sqcups': '⊔︀', + 'sqrt': '√', + 'sqsub': '⊏', + 'sqsube': '⊑', + 'sqsubset': '⊏', + 'sqsubseteq': '⊑', + 'sqsup': '⊐', + 'sqsupe': '⊒', + 'sqsupset': '⊐', + 'sqsupseteq': '⊒', + 'squ': '□', + 'square': '□', + 'squareintersection': '⊓', + 'squaresubset': '⊏', + 'squaresubsetequal': '⊑', + 'squaresuperset': '⊐', + 'squaresupersetequal': '⊒', + 'squareunion': '⊔', + 'squarf': '▪', + 'squf': '▪', + 'srarr': '→', + 'sscr': '𝓈', + 'ssetmn': '∖', + 'ssmile': '⌣', + 'sstarf': '⋆', + 'star': '☆', + 'starf': '★', + 'straightepsilon': 'ϵ', + 'straightphi': 'ϕ', + 'strns': '¯', + 'sub': '⊂', + 'subdot': '⪽', + 'sube': '⊆', + 'subedot': '⫃', + 'submult': '⫁', + 'subne': '⊊', + 'subplus': '⪿', + 'subrarr': '⥹', + 'subset': '⊂', + 'subseteq': '⊆', + 'subseteqq': '⫅', + 'subsetequal': '⊆', + 'subsetneq': '⊊', + 'subsetneqq': '⫋', + 'subsim': '⫇', + 'subsub': '⫕', + 'subsup': '⫓', + 'succ': '≻', + 'succapprox': '⪸', + 'succcurlyeq': '≽', + 'succeeds': '≻', + 'succeedsequal': '⪰', + 'succeedsslantequal': '≽', + 'succeedstilde': '≿', + 'succeq': '⪰', + 'succnapprox': '⪺', + 'succneqq': '⪶', + 'succnsim': '⋩', + 'succsim': '≿', + 'suchthat': '∋', + 'sum': '∑', + 'sung': '♪', + 'sup': '⊃', + 'sup1': '¹', + 'sup2': '²', + 'sup3': '³', + 'supdot': '⪾', + 'supdsub': '⫘', + 'supe': '⊇', + 'supedot': '⫄', + 'superset': '⊃', + 'supersetequal': '⊇', + 'suphsol': '⟉', + 'suphsub': '⫗', + 'suplarr': '⥻', + 'supmult': '⫂', + 'supne': '⊋', + 'supplus': '⫀', + 'supset': '⊃', + 'supseteq': '⊇', + 'supseteqq': '⫆', + 'supsetneq': '⊋', + 'supsetneqq': '⫌', + 'supsim': '⫈', + 'supsub': '⫔', + 'supsup': '⫖', + 'swarhk': '⤦', + 'swarr': '↙', + 'swarrow': '↙', + 'swnwar': '⤪', + 'szlig': 'ß', + 'tab': ' ', + 'target': '⌖', + 'tau': 'τ', + 'tbrk': '⎴', + 'tcaron': 'ť', + 'tcedil': 'ţ', + 'tcy': 'т', + 'tdot': '⃛', + 'telrec': '⌕', + 'tfr': '𝔱', + 'there4': '∴', + 'therefore': '∴', + 'theta': 'θ', + 'thetasym': 'ϑ', + 'thetav': 'ϑ', + 'thickapprox': '≈', + 'thicksim': '∼', + 'thickspace': '\u205f\u200a', + 'thinsp': '\u2009', + 'thinspace': '\u2009', + 'thkap': '≈', + 'thksim': '∼', + 'thorn': 'þ', + 'tilde': '˜', + 'tildeequal': '≃', + 'tildefullequal': '≅', + 'tildetilde': '≈', + 'times': '×', + 'timesb': '⊠', + 'timesbar': '⨱', + 'timesd': '⨰', + 'tint': '∭', + 'toea': '⤨', + 'top': '⊤', + 'topbot': '⌶', + 'topcir': '⫱', + 'topf': '𝕥', + 'topfork': '⫚', + 'tosa': '⤩', + 'tprime': '‴', + 'trade': '™', + 'triangle': '▵', + 'triangledown': '▿', + 'triangleleft': '◃', + 'trianglelefteq': '⊴', + 'triangleq': '≜', + 'triangleright': '▹', + 'trianglerighteq': '⊵', + 'tridot': '◬', + 'trie': '≜', + 'triminus': '⨺', + 'tripledot': '⃛', + 'triplus': '⨹', + 'trisb': '⧍', + 'tritime': '⨻', + 'trpezium': '⏢', + 'tscr': '𝓉', + 'tscy': 'ц', + 'tshcy': 'ћ', + 'tstrok': 'ŧ', + 'twixt': '≬', + 'twoheadleftarrow': '↞', + 'twoheadrightarrow': '↠', + 'uacute': 'ú', + 'uarr': '↑', + 'uarrocir': '⥉', + 'ubrcy': 'ў', + 'ubreve': 'ŭ', + 'ucirc': 'û', + 'ucy': 'у', + 'udarr': '⇅', + 'udblac': 'ű', + 'udhar': '⥮', + 'ufisht': '⥾', + 'ufr': '𝔲', + 'ugrave': 'ù', + 'uhar': '⥣', + 'uharl': '↿', + 'uharr': '↾', + 'uhblk': '▀', + 'ulcorn': '⌜', + 'ulcorner': '⌜', + 'ulcrop': '⌏', + 'ultri': '◸', + 'umacr': 'ū', + 'uml': '¨', + 'underbar': '_', + 'underbrace': '⏟', + 'underbracket': '⎵', + 'underparenthesis': '⏝', + 'union': '⋃', + 'unionplus': '⊎', + 'uogon': 'ų', + 'uopf': '𝕦', + 'uparrow': '↑', + 'uparrowbar': '⤒', + 'uparrowdownarrow': '⇅', + 'updownarrow': '↕', + 'upequilibrium': '⥮', + 'upharpoonleft': '↿', + 'upharpoonright': '↾', + 'uplus': '⊎', + 'upperleftarrow': '↖', + 'upperrightarrow': '↗', + 'upsi': 'υ', + 'upsih': 'ϒ', + 'upsilon': 'υ', + 'uptee': '⊥', + 'upteearrow': '↥', + 'upuparrows': '⇈', + 'urcorn': '⌝', + 'urcorner': '⌝', + 'urcrop': '⌎', + 'uring': 'ů', + 'urtri': '◹', + 'uscr': '𝓊', + 'utdot': '⋰', + 'utilde': 'ũ', + 'utri': '▵', + 'utrif': '▴', + 'uuarr': '⇈', + 'uuml': 'ü', + 'uwangle': '⦧', + 'vangrt': '⦜', + 'varepsilon': 'ϵ', + 'varkappa': 'ϰ', + 'varnothing': '∅', + 'varphi': 'ϕ', + 'varpi': 'ϖ', + 'varpropto': '∝', + 'varr': '↕', + 'varrho': 'ϱ', + 'varsigma': 'ς', + 'varsubsetneq': '⊊︀', + 'varsubsetneqq': '⫋︀', + 'varsupsetneq': '⊋︀', + 'varsupsetneqq': '⫌︀', + 'vartheta': 'ϑ', + 'vartriangleleft': '⊲', + 'vartriangleright': '⊳', + 'vbar': '⫨', + 'vbarv': '⫩', + 'vcy': 'в', + 'vdash': '⊢', + 'vdashl': '⫦', + 'vee': '∨', + 'veebar': '⊻', + 'veeeq': '≚', + 'vellip': '⋮', + 'verbar': '|', + 'vert': '|', + 'verticalbar': '∣', + 'verticalline': '|', + 'verticalseparator': '❘', + 'verticaltilde': '≀', + 'verythinspace': '\u200a', + 'vfr': '𝔳', + 'vltri': '⊲', + 'vnsub': '⊂⃒', + 'vnsup': '⊃⃒', + 'vopf': '𝕧', + 'vprop': '∝', + 'vrtri': '⊳', + 'vscr': '𝓋', + 'vsubne': '⊊︀', + 'vsupne': '⊋︀', + 'vvdash': '⊪', + 'vzigzag': '⦚', + 'wcirc': 'ŵ', + 'wedbar': '⩟', + 'wedge': '∧', + 'wedgeq': '≙', + 'weierp': '℘', + 'wfr': '𝔴', + 'wopf': '𝕨', + 'wp': '℘', + 'wr': '≀', + 'wreath': '≀', + 'wscr': '𝓌', + 'xcap': '⋂', + 'xcirc': '◯', + 'xcup': '⋃', + 'xdtri': '▽', + 'xfr': '𝔵', + 'xharr': '⟷', + 'xi': 'ξ', + 'xlarr': '⟵', + 'xmap': '⟼', + 'xnis': '⋻', + 'xodot': '⨀', + 'xopf': '𝕩', + 'xoplus': '⨁', + 'xotime': '⨂', + 'xrarr': '⟶', + 'xscr': '𝓍', + 'xsqcup': '⨆', + 'xuplus': '⨄', + 'xutri': '△', + 'xvee': '⋁', + 'xwedge': '⋀', + 'yacute': 'ý', + 'yacy': 'я', + 'ycirc': 'ŷ', + 'ycy': 'ы', + 'yen': '¥', + 'yfr': '𝔶', + 'yicy': 'ї', + 'yopf': '𝕪', + 'yscr': '𝓎', + 'yucy': 'ю', + 'yuml': 'ÿ', + 'zacute': 'ź', + 'zcaron': 'ž', + 'zcy': 'з', + 'zdot': 'ż', + 'zeetrf': 'ℨ', + 'zerowidthspace': '\u200b', + 'zeta': 'ζ', + 'zfr': '𝔷', + 'zhcy': 'ж', + 'zigrarr': '⇝', + 'zopf': '𝕫', + 'zscr': '𝓏', + 'zwj': '\u200d', + 'zwnj': '\u200c', +# }}} +} + + +if __name__ == '__main__': + import re + from html5lib.constants import entities + entities = {k.lower().replace(';', ''): entities[k] for k in entities} + lines = [] + + for k in sorted(entities): + lines.append(" '%s': %r," % (k, entities[k])) + + with open(__file__, 'r+b') as f: + raw = f.read().decode('utf-8') + raw = re.sub(r'^# ENTITY_DATA {{{.+^# }}}', + '# ENTITY_DATA {{{\n' + '\n'.join(lines) + '\n# }}}', + raw, flags=re.M | re.DOTALL) + f.seek(0), f.truncate() + f.write(raw.encode('utf-8')) diff --git a/core/lib/mechanize/_equiv.py b/core/lib/mechanize/_equiv.py new file mode 100644 index 00000000..6c00287a --- /dev/null +++ b/core/lib/mechanize/_equiv.py @@ -0,0 +1,350 @@ +#!/usr/bin/env python +# vim:fileencoding=utf-8 +# Copyright: 2017, Kovid Goyal + +from __future__ import (absolute_import, division, print_function, + unicode_literals) + +import re +import string + +from ._entities import html5_entities +from .polyglot import codepoint_to_chr + +space_chars = frozenset(("\t", "\n", "\u000C", " ", "\r")) +space_chars_bytes = frozenset(item.encode("ascii") for item in space_chars) +ascii_letters_bytes = frozenset( + item.encode("ascii") for item in string.ascii_letters) +spaces_angle_brackets = space_chars_bytes | frozenset((b">", b"<")) +skip1 = space_chars_bytes | frozenset((b"/", )) +head_elems = frozenset(( + b"html", b"head", b"title", b"base", b"script", + b"style", b"meta", b"link", b"object")) + + +def my_unichr(num): + try: + return codepoint_to_chr(num) + except (ValueError, OverflowError): + return '?' + + +def replace_entity(match): + ent = match.group(1).lower() + if ent in {'apos', 'squot'}: + # squot is generated by some broken CMS software + return "'" + if ent == 'hellips': + ent = 'hellip' + if ent.startswith('#'): + try: + if ent[1] in ('x', 'X'): + num = int(ent[2:], 16) + else: + num = int(ent[1:]) + except Exception: + return '&' + ent + ';' + if num > 255: + return my_unichr(num) + try: + return chr(num).decode('cp1252') + except UnicodeDecodeError: + return my_unichr(num) + try: + return html5_entities[ent] + except KeyError: + pass + return '&' + ent + ';' + + +class Bytes(bytes): + """String-like object with an associated position and various extra methods + If the position is ever greater than the string length then an exception is + raised""" + + def __init__(self, value): + self._position = -1 + + def __iter__(self): + return self + + def __next__(self): + p = self._position = self._position + 1 + if p >= len(self): + raise StopIteration + elif p < 0: + raise TypeError + return self[p:p + 1] + + def next(self): + # Py2 compat + return self.__next__() + + def previous(self): + p = self._position + if p >= len(self): + raise StopIteration + elif p < 0: + raise TypeError + self._position = p = p - 1 + return self[p:p + 1] + + @property + def position(self): + if self._position >= len(self): + raise StopIteration + if self._position >= 0: + return self._position + + @position.setter + def position(self, position): + if self._position >= len(self): + raise StopIteration + self._position = position + + @property + def current_byte(self): + return self[self.position:self.position + 1] + + def skip(self, chars=space_chars_bytes): + """Skip past a list of characters""" + p = self.position # use property for the error-checking + while p < len(self): + c = self[p:p + 1] + if c not in chars: + self._position = p + return c + p += 1 + self._position = p + return + + def skip_until(self, chars): + p = pos = self.position + while p < len(self): + c = self[p:p + 1] + if c in chars: + self._position = p + return self[pos:p], c + p += 1 + self._position = p + return b'', b'' + + def match_bytes(self, bytes): + """Look for a sequence of bytes at the start of a string. If the bytes + are found return True and advance the position to the byte after the + match. Otherwise return False and leave the position alone""" + p = self.position + data = self[p:p + len(bytes)] + rv = data.startswith(bytes) + if rv: + self.position += len(bytes) + return rv + + def match_bytes_pat(self, pat): + bytes = pat.pattern + m = pat.match(self, self.position) + if m is None: + return False + bytes = m.group() + self.position += len(bytes) + return True + + def jump_to(self, bytes): + """Look for the next sequence of bytes matching a given sequence. If + a match is found advance the position to the last byte of the match""" + new_pos = self.find(bytes, max(0, self.position)) + if new_pos > -1: + new_pos -= self.position + if self._position == -1: + self._position = 0 + self._position += (new_pos + len(bytes) - 1) + return True + else: + raise StopIteration + + +class HTTPEquivParser(object): + """Mini parser for detecting http-equiv headers from meta tags """ + + def __init__(self, data): + """string - the data to work on """ + self.data = Bytes(data) + self.headers = [] + + def __call__(self): + mb, mbp = self.data.match_bytes, self.data.match_bytes_pat + dispatch = ( + (mb, b"") + + def handle_meta(self): + if self.data.current_byte not in space_chars_bytes: + # if we have ") + + def get_attribute(self): + """Return a name,value pair for the next attribute in the stream, + if one is found, or None""" + data = self.data + # Step 1 (skip chars) + c = data.skip(skip1) + assert c is None or len(c) == 1 + # Step 2 + if c in (b">", None): + return None + # Step 3 + attr_name = [] + attr_value = [] + # Step 4 attribute name + while True: + if c == b"=" and attr_name: + break + elif c in space_chars_bytes: + # Step 6! + c = data.skip() + break + elif c in (b"/", b">"): + return b"".join(attr_name), b"" + elif c is None: + return None + else: + attr_name.append(c) + # Step 5 + c = next(data) + # Step 7 + if c != b"=": + data.previous() + return b"".join(attr_name), b"" + # Step 8 + next(data) + # Step 9 + c = data.skip() + # Step 10 + if c in (b"'", b'"'): + # 10.1 + quote_char = c + while True: + # 10.2 + c = next(data) + # 10.3 + if c == quote_char: + next(data) + return b"".join(attr_name), b"".join(attr_value) + # 10.4 + else: + attr_value.append(c) + elif c == b">": + return b"".join(attr_name), b"" + elif c is None: + return None + else: + attr_value.append(c) + # Step 11 + while True: + c = next(data) + if c in spaces_angle_brackets: + return b"".join(attr_name), b"".join(attr_value) + elif c is None: + return None + else: + attr_value.append(c) diff --git a/core/lib/mechanize/_form.py b/core/lib/mechanize/_form.py new file mode 100644 index 00000000..c09fa4bf --- /dev/null +++ b/core/lib/mechanize/_form.py @@ -0,0 +1,167 @@ +from __future__ import absolute_import + +import re +from collections import defaultdict + +from ._form_controls import HTMLForm, Label +from ._request import Request +from .polyglot import urljoin, is_string, as_unicode + + +class SkipControl(ValueError): + pass + + +def normalize_line_endings(text): + return re.sub(as_unicode(r"(?:(? + w = MimeWriter(f) + ...call w.addheader(key, value) 0 or more times... + + followed by either: + + .. code-block:: python + + f = w.startbody(content_type) + ...call f.write(data) for body data... + + or: + + .. code-block:: python + + w.startmultipartbody(subtype) + for each part: + subwriter = w.nextpart() + ...use the subwriter's methods to create the subpart... + w.lastpart() + + The subwriter is another MimeWriter instance, and should be + treated in the same way as the toplevel MimeWriter. This way, + writing recursive body parts is easy. + + Warning: don't forget to call lastpart()! + + XXX There should be more state so calls made in the wrong order + are detected. + + Some special cases: + + - startbody() just returns the file passed to the constructor; + but don't use this knowledge, as it may be changed. + + - startmultipartbody() actually returns a file as well; + this can be used to write the initial 'if you can read this your + mailer is not MIME-aware' message. + + - If you call flushheaders(), the headers accumulated so far are + written out (and forgotten); this is useful if you don't need a + body part at all, e.g. for a subpart of type message/rfc822 + that's (mis)used to store some header-like information. + + - Passing a keyword argument 'prefix=' to addheader(), + start*body() affects where the header is inserted; 0 means + append at the end, 1 means insert at the start; default is + append for addheader(), but insert for start*body(), which use + it to determine where the Content-type header goes. + + """ + + def __init__(self, fp, http_hdrs=None): + self._http_hdrs = http_hdrs + self._fp = fp + self._headers = [] + self._boundary = [] + self._first_part = True + + def addheader(self, key, value, prefix=0, add_to_http_hdrs=0): + """ + prefix is ignored if add_to_http_hdrs is true. + """ + lines = value.split("\r\n") + while lines and not lines[-1]: + del lines[-1] + while lines and not lines[0]: + del lines[0] + if add_to_http_hdrs: + value = "".join(lines) + # 2.2 urllib2 doesn't normalize header case + self._http_hdrs.append((key.capitalize(), value)) + else: + for i in range(1, len(lines)): + lines[i] = " " + lines[i].strip() + value = "\r\n".join(lines) + "\r\n" + line = key.title() + ": " + value + if prefix: + self._headers.insert(0, line) + else: + self._headers.append(line) + + def flushheaders(self): + for line in self._headers: + self._fp.write(line) + self._headers = [] + + def startbody(self, + ctype=None, + plist=[], + prefix=1, + add_to_http_hdrs=0, + content_type=1): + """ + prefix is ignored if add_to_http_hdrs is true. + """ + if content_type and ctype: + for name, value in plist: + ctype = ctype + ';\r\n %s=%s' % (name, value) + self.addheader( + "Content-Type", + ctype, + prefix=prefix, + add_to_http_hdrs=add_to_http_hdrs) + self.flushheaders() + if not add_to_http_hdrs: + self._fp.write("\r\n") + self._first_part = True + return self._fp + + def startmultipartbody(self, + subtype, + boundary=None, + plist=[], + prefix=1, + add_to_http_hdrs=0, + content_type=1): + boundary = boundary or choose_boundary() + self._boundary.append(boundary) + return self.startbody( + "multipart/" + subtype, [("boundary", boundary)] + plist, + prefix=prefix, + add_to_http_hdrs=add_to_http_hdrs, + content_type=content_type) + + def nextpart(self): + boundary = self._boundary[-1] + if self._first_part: + self._first_part = False + else: + self._fp.write("\r\n") + self._fp.write("--" + boundary + "\r\n") + return self.__class__(self._fp) + + def lastpart(self): + if self._first_part: + self.nextpart() + boundary = self._boundary.pop() + self._fp.write("\r\n--" + boundary + "--\r\n") + + +class Label: + def __init__(self, text, for_id=None): + self.id = for_id + self.text = compress_whitespace(text or '') + + def __repr__(self): + return "" % (self.id, self.text) + + __str__ = __repr__ + + +def _get_label(attrs): + text = attrs.get("__label") + if text is not None: + return Label(text) + + +class Control: + """An HTML form control. + + An HTMLForm contains a sequence of Controls. The Controls in an HTMLForm + are accessed using the HTMLForm.find_control method or the + HTMLForm.controls attribute. + + Control instances are usually constructed using the ParseFile / + ParseResponse functions. If you use those functions, you can ignore the + rest of this paragraph. A Control is only properly initialised after the + fixup method has been called. In fact, this is only strictly necessary for + ListControl instances. This is necessary because ListControls are built up + from ListControls each containing only a single item, and their initial + value(s) can only be known after the sequence is complete. + + The types and values that are acceptable for assignment to the value + attribute are defined by subclasses. + + If the disabled attribute is true, this represents the state typically + represented by browsers by 'greying out' a control. If the disabled + attribute is true, the Control will raise AttributeError if an attempt is + made to change its value. In addition, the control will not be considered + 'successful' as defined by the W3C HTML 4 standard -- ie. it will + contribute no data to the return value of the HTMLForm.click* methods. To + enable a control, set the disabled attribute to a false value. + + If the readonly attribute is true, the Control will raise AttributeError if + an attempt is made to change its value. To make a control writable, set + the readonly attribute to a false value. + + All controls have the disabled and readonly attributes, not only those that + may have the HTML attributes of the same names. + + On assignment to the value attribute, the following exceptions are raised: + TypeError, AttributeError (if the value attribute should not be assigned + to, because the control is disabled, for example) and ValueError. + + If the name or value attributes are None, or the value is an empty list, or + if the control is disabled, the control is not successful. + + Public attributes: + + :ivar str type: string describing type of control (see the keys of the + HTMLForm.type2class dictionary for the allowable values) (readonly) + :ivar str name: name of control (readonly) + :ivar value: current value of control (subclasses may allow a single value, + a sequence of values, or either) + :ivar bool disabled: disabled state + :ivar bool readonly: readonly state + :ivar str id: value of id HTML attribute + + """ + + def __init__(self, type, name, attrs, index=None): + """ + type: string describing type of control (see the keys of the + HTMLForm.type2class dictionary for the allowable values) + name: control name + attrs: HTML attributes of control's HTML element + + """ + raise NotImplementedError() + + def add_to_form(self, form): + self._form = form + form.controls.append(self) + + def fixup(self): + pass + + def is_of_kind(self, kind): + raise NotImplementedError() + + def clear(self): + raise NotImplementedError() + + def __getattr__(self, name): + raise NotImplementedError() + + def __setattr__(self, name, value): + raise NotImplementedError() + + def pairs(self): + """Return list of (key, value) pairs suitable for passing to urlencode. + """ + return [(k, v) for (i, k, v) in self._totally_ordered_pairs()] + + def _totally_ordered_pairs(self): + """Return list of (key, value, index) tuples. + + Like pairs, but allows preserving correct ordering even where several + controls are involved. + + """ + raise NotImplementedError() + + def _write_mime_data(self, mw, name, value): + """Write data for a subitem of this control to a MimeWriter.""" + # called by HTMLForm + mw2 = mw.nextpart() + mw2.addheader( + "Content-Disposition", 'form-data; name="%s"' % as_unicode(name), + 1) + f = mw2.startbody(prefix=0) + f.write(value) + + def __str__(self): + raise NotImplementedError() + + def get_labels(self): + """Return all labels (Label instances) for this control. + + If the control was surrounded by a