From 7dd62f445a6f781b790582125e73fa85376917fd Mon Sep 17 00:00:00 2001 From: Austin Lane Date: Wed, 9 Jan 2013 10:48:44 -0600 Subject: [PATCH] Initial commit, setting up repository. --- LICENSE.md | 674 ++++++++++++++++++ README.md | 71 +- build.xml | 21 + build/.DS_Store | Bin 0 -> 6148 bytes build/jar/BurpNotesExtension.jar | Bin 0 -> 25489 bytes lib/.DS_Store | Bin 0 -> 6148 bytes src/.DS_Store | Bin 0 -> 6148 bytes src/burp/BurpExtender.java | 138 ++++ src/com/.DS_Store | Bin 0 -> 6148 bytes src/com/trustwave/.DS_Store | Bin 0 -> 6148 bytes .../trustwave/burp/ButtonTabComponent.java | 157 ++++ .../burp/NotesExtensionOperations.java | 537 ++++++++++++++ 12 files changed, 1595 insertions(+), 3 deletions(-) create mode 100644 LICENSE.md create mode 100644 build.xml create mode 100644 build/.DS_Store create mode 100644 build/jar/BurpNotesExtension.jar create mode 100644 lib/.DS_Store create mode 100644 src/.DS_Store create mode 100644 src/burp/BurpExtender.java create mode 100644 src/com/.DS_Store create mode 100644 src/com/trustwave/.DS_Store create mode 100644 src/com/trustwave/burp/ButtonTabComponent.java create mode 100644 src/com/trustwave/burp/NotesExtensionOperations.java diff --git a/LICENSE.md b/LICENSE.md new file mode 100644 index 0000000..94a9ed0 --- /dev/null +++ b/LICENSE.md @@ -0,0 +1,674 @@ + GNU GENERAL PUBLIC LICENSE + Version 3, 29 June 2007 + + Copyright (C) 2007 Free Software Foundation, Inc. + Everyone is permitted to copy and distribute verbatim copies + of this license document, but changing it is not allowed. + + Preamble + + The GNU General Public License is a free, copyleft license for +software and other kinds of works. + + The licenses for most software and other practical works are designed +to take away your freedom to share and change the works. By contrast, +the GNU General Public License is intended to guarantee your freedom to +share and change all versions of a program--to make sure it remains free +software for all its users. We, the Free Software Foundation, use the +GNU General Public License for most of our software; it applies also to +any other work released this way by its authors. You can apply it to +your programs, too. + + When we speak of free software, we are referring to freedom, not +price. Our General Public Licenses are designed to make sure that you +have the freedom to distribute copies of free software (and charge for +them if you wish), that you receive source code or can get it if you +want it, that you can change the software or use pieces of it in new +free programs, and that you know you can do these things. + + To protect your rights, we need to prevent others from denying you +these rights or asking you to surrender the rights. Therefore, you have +certain responsibilities if you distribute copies of the software, or if +you modify it: responsibilities to respect the freedom of others. + + For example, if you distribute copies of such a program, whether +gratis or for a fee, you must pass on to the recipients the same +freedoms that you received. You must make sure that they, too, receive +or can get the source code. And you must show them these terms so they +know their rights. + + Developers that use the GNU GPL protect your rights with two steps: +(1) assert copyright on the software, and (2) offer you this License +giving you legal permission to copy, distribute and/or modify it. + + For the developers' and authors' protection, the GPL clearly explains +that there is no warranty for this free software. For both users' and +authors' sake, the GPL requires that modified versions be marked as +changed, so that their problems will not be attributed erroneously to +authors of previous versions. + + Some devices are designed to deny users access to install or run +modified versions of the software inside them, although the manufacturer +can do so. This is fundamentally incompatible with the aim of +protecting users' freedom to change the software. The systematic +pattern of such abuse occurs in the area of products for individuals to +use, which is precisely where it is most unacceptable. Therefore, we +have designed this version of the GPL to prohibit the practice for those +products. If such problems arise substantially in other domains, we +stand ready to extend this provision to those domains in future versions +of the GPL, as needed to protect the freedom of users. + + Finally, every program is threatened constantly by software patents. +States should not allow patents to restrict development and use of +software on general-purpose computers, but in those that do, we wish to +avoid the special danger that patents applied to a free program could +make it effectively proprietary. To prevent this, the GPL assures that +patents cannot be used to render the program non-free. + + The precise terms and conditions for copying, distribution and +modification follow. + + TERMS AND CONDITIONS + + 0. Definitions. + + "This License" refers to version 3 of the GNU General Public License. + + "Copyright" also means copyright-like laws that apply to other kinds of +works, such as semiconductor masks. + + "The Program" refers to any copyrightable work licensed under this +License. Each licensee is addressed as "you". "Licensees" and +"recipients" may be individuals or organizations. + + To "modify" a work means to copy from or adapt all or part of the work +in a fashion requiring copyright permission, other than the making of an +exact copy. The resulting work is called a "modified version" of the +earlier work or a work "based on" the earlier work. + + A "covered work" means either the unmodified Program or a work based +on the Program. + + To "propagate" a work means to do anything with it that, without +permission, would make you directly or secondarily liable for +infringement under applicable copyright law, except executing it on a +computer or modifying a private copy. Propagation includes copying, +distribution (with or without modification), making available to the +public, and in some countries other activities as well. + + To "convey" a work means any kind of propagation that enables other +parties to make or receive copies. Mere interaction with a user through +a computer network, with no transfer of a copy, is not conveying. + + An interactive user interface displays "Appropriate Legal Notices" +to the extent that it includes a convenient and prominently visible +feature that (1) displays an appropriate copyright notice, and (2) +tells the user that there is no warranty for the work (except to the +extent that warranties are provided), that licensees may convey the +work under this License, and how to view a copy of this License. If +the interface presents a list of user commands or options, such as a +menu, a prominent item in the list meets this criterion. + + 1. Source Code. + + The "source code" for a work means the preferred form of the work +for making modifications to it. "Object code" means any non-source +form of a work. + + A "Standard Interface" means an interface that either is an official +standard defined by a recognized standards body, or, in the case of +interfaces specified for a particular programming language, one that +is widely used among developers working in that language. + + The "System Libraries" of an executable work include anything, other +than the work as a whole, that (a) is included in the normal form of +packaging a Major Component, but which is not part of that Major +Component, and (b) serves only to enable use of the work with that +Major Component, or to implement a Standard Interface for which an +implementation is available to the public in source code form. A +"Major Component", in this context, means a major essential component +(kernel, window system, and so on) of the specific operating system +(if any) on which the executable work runs, or a compiler used to +produce the work, or an object code interpreter used to run it. + + The "Corresponding Source" for a work in object code form means all +the source code needed to generate, install, and (for an executable +work) run the object code and to modify the work, including scripts to +control those activities. However, it does not include the work's +System Libraries, or general-purpose tools or generally available free +programs which are used unmodified in performing those activities but +which are not part of the work. For example, Corresponding Source +includes interface definition files associated with source files for +the work, and the source code for shared libraries and dynamically +linked subprograms that the work is specifically designed to require, +such as by intimate data communication or control flow between those +subprograms and other parts of the work. + + The Corresponding Source need not include anything that users +can regenerate automatically from other parts of the Corresponding +Source. + + The Corresponding Source for a work in source code form is that +same work. + + 2. Basic Permissions. + + All rights granted under this License are granted for the term of +copyright on the Program, and are irrevocable provided the stated +conditions are met. This License explicitly affirms your unlimited +permission to run the unmodified Program. The output from running a +covered work is covered by this License only if the output, given its +content, constitutes a covered work. This License acknowledges your +rights of fair use or other equivalent, as provided by copyright law. + + You may make, run and propagate covered works that you do not +convey, without conditions so long as your license otherwise remains +in force. You may convey covered works to others for the sole purpose +of having them make modifications exclusively for you, or provide you +with facilities for running those works, provided that you comply with +the terms of this License in conveying all material for which you do +not control copyright. Those thus making or running the covered works +for you must do so exclusively on your behalf, under your direction +and control, on terms that prohibit them from making any copies of +your copyrighted material outside their relationship with you. + + Conveying under any other circumstances is permitted solely under +the conditions stated below. Sublicensing is not allowed; section 10 +makes it unnecessary. + + 3. Protecting Users' Legal Rights From Anti-Circumvention Law. + + No covered work shall be deemed part of an effective technological +measure under any applicable law fulfilling obligations under article +11 of the WIPO copyright treaty adopted on 20 December 1996, or +similar laws prohibiting or restricting circumvention of such +measures. + + When you convey a covered work, you waive any legal power to forbid +circumvention of technological measures to the extent such circumvention +is effected by exercising rights under this License with respect to +the covered work, and you disclaim any intention to limit operation or +modification of the work as a means of enforcing, against the work's +users, your or third parties' legal rights to forbid circumvention of +technological measures. + + 4. Conveying Verbatim Copies. + + You may convey verbatim copies of the Program's source code as you +receive it, in any medium, provided that you conspicuously and +appropriately publish on each copy an appropriate copyright notice; +keep intact all notices stating that this License and any +non-permissive terms added in accord with section 7 apply to the code; +keep intact all notices of the absence of any warranty; and give all +recipients a copy of this License along with the Program. + + You may charge any price or no price for each copy that you convey, +and you may offer support or warranty protection for a fee. + + 5. Conveying Modified Source Versions. + + You may convey a work based on the Program, or the modifications to +produce it from the Program, in the form of source code under the +terms of section 4, provided that you also meet all of these conditions: + + a) The work must carry prominent notices stating that you modified + it, and giving a relevant date. + + b) The work must carry prominent notices stating that it is + released under this License and any conditions added under section + 7. This requirement modifies the requirement in section 4 to + "keep intact all notices". + + c) You must license the entire work, as a whole, under this + License to anyone who comes into possession of a copy. This + License will therefore apply, along with any applicable section 7 + additional terms, to the whole of the work, and all its parts, + regardless of how they are packaged. This License gives no + permission to license the work in any other way, but it does not + invalidate such permission if you have separately received it. + + d) If the work has interactive user interfaces, each must display + Appropriate Legal Notices; however, if the Program has interactive + interfaces that do not display Appropriate Legal Notices, your + work need not make them do so. + + A compilation of a covered work with other separate and independent +works, which are not by their nature extensions of the covered work, +and which are not combined with it such as to form a larger program, +in or on a volume of a storage or distribution medium, is called an +"aggregate" if the compilation and its resulting copyright are not +used to limit the access or legal rights of the compilation's users +beyond what the individual works permit. Inclusion of a covered work +in an aggregate does not cause this License to apply to the other +parts of the aggregate. + + 6. Conveying Non-Source Forms. + + You may convey a covered work in object code form under the terms +of sections 4 and 5, provided that you also convey the +machine-readable Corresponding Source under the terms of this License, +in one of these ways: + + a) Convey the object code in, or embodied in, a physical product + (including a physical distribution medium), accompanied by the + Corresponding Source fixed on a durable physical medium + customarily used for software interchange. + + b) Convey the object code in, or embodied in, a physical product + (including a physical distribution medium), accompanied by a + written offer, valid for at least three years and valid for as + long as you offer spare parts or customer support for that product + model, to give anyone who possesses the object code either (1) a + copy of the Corresponding Source for all the software in the + product that is covered by this License, on a durable physical + medium customarily used for software interchange, for a price no + more than your reasonable cost of physically performing this + conveying of source, or (2) access to copy the + Corresponding Source from a network server at no charge. + + c) Convey individual copies of the object code with a copy of the + written offer to provide the Corresponding Source. This + alternative is allowed only occasionally and noncommercially, and + only if you received the object code with such an offer, in accord + with subsection 6b. + + d) Convey the object code by offering access from a designated + place (gratis or for a charge), and offer equivalent access to the + Corresponding Source in the same way through the same place at no + further charge. You need not require recipients to copy the + Corresponding Source along with the object code. If the place to + copy the object code is a network server, the Corresponding Source + may be on a different server (operated by you or a third party) + that supports equivalent copying facilities, provided you maintain + clear directions next to the object code saying where to find the + Corresponding Source. Regardless of what server hosts the + Corresponding Source, you remain obligated to ensure that it is + available for as long as needed to satisfy these requirements. + + e) Convey the object code using peer-to-peer transmission, provided + you inform other peers where the object code and Corresponding + Source of the work are being offered to the general public at no + charge under subsection 6d. + + A separable portion of the object code, whose source code is excluded +from the Corresponding Source as a System Library, need not be +included in conveying the object code work. + + A "User Product" is either (1) a "consumer product", which means any +tangible personal property which is normally used for personal, family, +or household purposes, or (2) anything designed or sold for incorporation +into a dwelling. In determining whether a product is a consumer product, +doubtful cases shall be resolved in favor of coverage. For a particular +product received by a particular user, "normally used" refers to a +typical or common use of that class of product, regardless of the status +of the particular user or of the way in which the particular user +actually uses, or expects or is expected to use, the product. A product +is a consumer product regardless of whether the product has substantial +commercial, industrial or non-consumer uses, unless such uses represent +the only significant mode of use of the product. + + "Installation Information" for a User Product means any methods, +procedures, authorization keys, or other information required to install +and execute modified versions of a covered work in that User Product from +a modified version of its Corresponding Source. The information must +suffice to ensure that the continued functioning of the modified object +code is in no case prevented or interfered with solely because +modification has been made. + + If you convey an object code work under this section in, or with, or +specifically for use in, a User Product, and the conveying occurs as +part of a transaction in which the right of possession and use of the +User Product is transferred to the recipient in perpetuity or for a +fixed term (regardless of how the transaction is characterized), the +Corresponding Source conveyed under this section must be accompanied +by the Installation Information. But this requirement does not apply +if neither you nor any third party retains the ability to install +modified object code on the User Product (for example, the work has +been installed in ROM). + + The requirement to provide Installation Information does not include a +requirement to continue to provide support service, warranty, or updates +for a work that has been modified or installed by the recipient, or for +the User Product in which it has been modified or installed. Access to a +network may be denied when the modification itself materially and +adversely affects the operation of the network or violates the rules and +protocols for communication across the network. + + Corresponding Source conveyed, and Installation Information provided, +in accord with this section must be in a format that is publicly +documented (and with an implementation available to the public in +source code form), and must require no special password or key for +unpacking, reading or copying. + + 7. Additional Terms. + + "Additional permissions" are terms that supplement the terms of this +License by making exceptions from one or more of its conditions. +Additional permissions that are applicable to the entire Program shall +be treated as though they were included in this License, to the extent +that they are valid under applicable law. If additional permissions +apply only to part of the Program, that part may be used separately +under those permissions, but the entire Program remains governed by +this License without regard to the additional permissions. + + When you convey a copy of a covered work, you may at your option +remove any additional permissions from that copy, or from any part of +it. (Additional permissions may be written to require their own +removal in certain cases when you modify the work.) You may place +additional permissions on material, added by you to a covered work, +for which you have or can give appropriate copyright permission. + + Notwithstanding any other provision of this License, for material you +add to a covered work, you may (if authorized by the copyright holders of +that material) supplement the terms of this License with terms: + + a) Disclaiming warranty or limiting liability differently from the + terms of sections 15 and 16 of this License; or + + b) Requiring preservation of specified reasonable legal notices or + author attributions in that material or in the Appropriate Legal + Notices displayed by works containing it; or + + c) Prohibiting misrepresentation of the origin of that material, or + requiring that modified versions of such material be marked in + reasonable ways as different from the original version; or + + d) Limiting the use for publicity purposes of names of licensors or + authors of the material; or + + e) Declining to grant rights under trademark law for use of some + trade names, trademarks, or service marks; or + + f) Requiring indemnification of licensors and authors of that + material by anyone who conveys the material (or modified versions of + it) with contractual assumptions of liability to the recipient, for + any liability that these contractual assumptions directly impose on + those licensors and authors. + + All other non-permissive additional terms are considered "further +restrictions" within the meaning of section 10. If the Program as you +received it, or any part of it, contains a notice stating that it is +governed by this License along with a term that is a further +restriction, you may remove that term. If a license document contains +a further restriction but permits relicensing or conveying under this +License, you may add to a covered work material governed by the terms +of that license document, provided that the further restriction does +not survive such relicensing or conveying. + + If you add terms to a covered work in accord with this section, you +must place, in the relevant source files, a statement of the +additional terms that apply to those files, or a notice indicating +where to find the applicable terms. + + Additional terms, permissive or non-permissive, may be stated in the +form of a separately written license, or stated as exceptions; +the above requirements apply either way. + + 8. Termination. + + You may not propagate or modify a covered work except as expressly +provided under this License. Any attempt otherwise to propagate or +modify it is void, and will automatically terminate your rights under +this License (including any patent licenses granted under the third +paragraph of section 11). + + However, if you cease all violation of this License, then your +license from a particular copyright holder is reinstated (a) +provisionally, unless and until the copyright holder explicitly and +finally terminates your license, and (b) permanently, if the copyright +holder fails to notify you of the violation by some reasonable means +prior to 60 days after the cessation. + + Moreover, your license from a particular copyright holder is +reinstated permanently if the copyright holder notifies you of the +violation by some reasonable means, this is the first time you have +received notice of violation of this License (for any work) from that +copyright holder, and you cure the violation prior to 30 days after +your receipt of the notice. + + Termination of your rights under this section does not terminate the +licenses of parties who have received copies or rights from you under +this License. If your rights have been terminated and not permanently +reinstated, you do not qualify to receive new licenses for the same +material under section 10. + + 9. Acceptance Not Required for Having Copies. + + You are not required to accept this License in order to receive or +run a copy of the Program. Ancillary propagation of a covered work +occurring solely as a consequence of using peer-to-peer transmission +to receive a copy likewise does not require acceptance. However, +nothing other than this License grants you permission to propagate or +modify any covered work. These actions infringe copyright if you do +not accept this License. Therefore, by modifying or propagating a +covered work, you indicate your acceptance of this License to do so. + + 10. Automatic Licensing of Downstream Recipients. + + Each time you convey a covered work, the recipient automatically +receives a license from the original licensors, to run, modify and +propagate that work, subject to this License. You are not responsible +for enforcing compliance by third parties with this License. + + An "entity transaction" is a transaction transferring control of an +organization, or substantially all assets of one, or subdividing an +organization, or merging organizations. If propagation of a covered +work results from an entity transaction, each party to that +transaction who receives a copy of the work also receives whatever +licenses to the work the party's predecessor in interest had or could +give under the previous paragraph, plus a right to possession of the +Corresponding Source of the work from the predecessor in interest, if +the predecessor has it or can get it with reasonable efforts. + + You may not impose any further restrictions on the exercise of the +rights granted or affirmed under this License. For example, you may +not impose a license fee, royalty, or other charge for exercise of +rights granted under this License, and you may not initiate litigation +(including a cross-claim or counterclaim in a lawsuit) alleging that +any patent claim is infringed by making, using, selling, offering for +sale, or importing the Program or any portion of it. + + 11. Patents. + + A "contributor" is a copyright holder who authorizes use under this +License of the Program or a work on which the Program is based. The +work thus licensed is called the contributor's "contributor version". + + A contributor's "essential patent claims" are all patent claims +owned or controlled by the contributor, whether already acquired or +hereafter acquired, that would be infringed by some manner, permitted +by this License, of making, using, or selling its contributor version, +but do not include claims that would be infringed only as a +consequence of further modification of the contributor version. For +purposes of this definition, "control" includes the right to grant +patent sublicenses in a manner consistent with the requirements of +this License. + + Each contributor grants you a non-exclusive, worldwide, royalty-free +patent license under the contributor's essential patent claims, to +make, use, sell, offer for sale, import and otherwise run, modify and +propagate the contents of its contributor version. + + In the following three paragraphs, a "patent license" is any express +agreement or commitment, however denominated, not to enforce a patent +(such as an express permission to practice a patent or covenant not to +sue for patent infringement). To "grant" such a patent license to a +party means to make such an agreement or commitment not to enforce a +patent against the party. + + If you convey a covered work, knowingly relying on a patent license, +and the Corresponding Source of the work is not available for anyone +to copy, free of charge and under the terms of this License, through a +publicly available network server or other readily accessible means, +then you must either (1) cause the Corresponding Source to be so +available, or (2) arrange to deprive yourself of the benefit of the +patent license for this particular work, or (3) arrange, in a manner +consistent with the requirements of this License, to extend the patent +license to downstream recipients. "Knowingly relying" means you have +actual knowledge that, but for the patent license, your conveying the +covered work in a country, or your recipient's use of the covered work +in a country, would infringe one or more identifiable patents in that +country that you have reason to believe are valid. + + If, pursuant to or in connection with a single transaction or +arrangement, you convey, or propagate by procuring conveyance of, a +covered work, and grant a patent license to some of the parties +receiving the covered work authorizing them to use, propagate, modify +or convey a specific copy of the covered work, then the patent license +you grant is automatically extended to all recipients of the covered +work and works based on it. + + A patent license is "discriminatory" if it does not include within +the scope of its coverage, prohibits the exercise of, or is +conditioned on the non-exercise of one or more of the rights that are +specifically granted under this License. You may not convey a covered +work if you are a party to an arrangement with a third party that is +in the business of distributing software, under which you make payment +to the third party based on the extent of your activity of conveying +the work, and under which the third party grants, to any of the +parties who would receive the covered work from you, a discriminatory +patent license (a) in connection with copies of the covered work +conveyed by you (or copies made from those copies), or (b) primarily +for and in connection with specific products or compilations that +contain the covered work, unless you entered into that arrangement, +or that patent license was granted, prior to 28 March 2007. + + Nothing in this License shall be construed as excluding or limiting +any implied license or other defenses to infringement that may +otherwise be available to you under applicable patent law. + + 12. No Surrender of Others' Freedom. + + If conditions are imposed on you (whether by court order, agreement or +otherwise) that contradict the conditions of this License, they do not +excuse you from the conditions of this License. If you cannot convey a +covered work so as to satisfy simultaneously your obligations under this +License and any other pertinent obligations, then as a consequence you may +not convey it at all. For example, if you agree to terms that obligate you +to collect a royalty for further conveying from those to whom you convey +the Program, the only way you could satisfy both those terms and this +License would be to refrain entirely from conveying the Program. + + 13. Use with the GNU Affero General Public License. + + Notwithstanding any other provision of this License, you have +permission to link or combine any covered work with a work licensed +under version 3 of the GNU Affero General Public License into a single +combined work, and to convey the resulting work. The terms of this +License will continue to apply to the part which is the covered work, +but the special requirements of the GNU Affero General Public License, +section 13, concerning interaction through a network will apply to the +combination as such. + + 14. Revised Versions of this License. + + The Free Software Foundation may publish revised and/or new versions of +the GNU General Public License from time to time. Such new versions will +be similar in spirit to the present version, but may differ in detail to +address new problems or concerns. + + Each version is given a distinguishing version number. If the +Program specifies that a certain numbered version of the GNU General +Public License "or any later version" applies to it, you have the +option of following the terms and conditions either of that numbered +version or of any later version published by the Free Software +Foundation. If the Program does not specify a version number of the +GNU General Public License, you may choose any version ever published +by the Free Software Foundation. + + If the Program specifies that a proxy can decide which future +versions of the GNU General Public License can be used, that proxy's +public statement of acceptance of a version permanently authorizes you +to choose that version for the Program. + + Later license versions may give you additional or different +permissions. However, no additional obligations are imposed on any +author or copyright holder as a result of your choosing to follow a +later version. + + 15. Disclaimer of Warranty. + + THERE IS NO WARRANTY FOR THE PROGRAM, TO THE EXTENT PERMITTED BY +APPLICABLE LAW. EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT +HOLDERS AND/OR OTHER PARTIES PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY +OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, +THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR +PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE PROGRAM +IS WITH YOU. SHOULD THE PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF +ALL NECESSARY SERVICING, REPAIR OR CORRECTION. + + 16. Limitation of Liability. + + IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING +WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MODIFIES AND/OR CONVEYS +THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, INCLUDING ANY +GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING OUT OF THE +USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED TO LOSS OF +DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD +PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER PROGRAMS), +EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF +SUCH DAMAGES. + + 17. Interpretation of Sections 15 and 16. + + If the disclaimer of warranty and limitation of liability provided +above cannot be given local legal effect according to their terms, +reviewing courts shall apply local law that most closely approximates +an absolute waiver of all civil liability in connection with the +Program, unless a warranty or assumption of liability accompanies a +copy of the Program in return for a fee. + + END OF TERMS AND CONDITIONS + + How to Apply These Terms to Your New Programs + + If you develop a new program, and you want it to be of the greatest +possible use to the public, the best way to achieve this is to make it +free software which everyone can redistribute and change under these terms. + + To do so, attach the following notices to the program. It is safest +to attach them to the start of each source file to most effectively +state the exclusion of warranty; and each file should have at least +the "copyright" line and a pointer to where the full notice is found. + + + Copyright (C) + + This program is free software: you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation, either version 3 of the License, or + (at your option) any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this program. If not, see . + +Also add information on how to contact you by electronic and paper mail. + + If the program does terminal interaction, make it output a short +notice like this when it starts in an interactive mode: + + Copyright (C) + This program comes with ABSOLUTELY NO WARRANTY; for details type `show w'. + This is free software, and you are welcome to redistribute it + under certain conditions; type `show c' for details. + +The hypothetical commands `show w' and `show c' should show the appropriate +parts of the General Public License. Of course, your program's commands +might be different; for a GUI interface, you would use an "about box". + + You should also get your employer (if you work as a programmer) or school, +if any, to sign a "copyright disclaimer" for the program, if necessary. +For more information on this, and how to apply and follow the GNU GPL, see +. + + The GNU General Public License does not permit incorporating your program +into proprietary programs. If your program is a subroutine library, you +may consider it more useful to permit linking proprietary applications with +the library. If this is what you want to do, use the GNU Lesser General +Public License instead of this License. But first, please read +. diff --git a/README.md b/README.md index a367503..0d504e8 100644 --- a/README.md +++ b/README.md @@ -1,4 +1,69 @@ -BurpNotesExtension -================== +Burp Notes Extension +January 2013 +Austin Lane +http://www.trustwave.com -Burp Notes Extension \ No newline at end of file +INTRODUCTION +============ + +Burp Notes Extension is a plugin for Burp Suite that adds a Notes tab. The +tool aims to better organize external files that are created during +penetration testing. + +Features: +o Create text documents and spreadsheets directly within the Burp interface +o Send HTTP requests and responses directly to new or existing files + +REQUIREMENTS +============ + +Burp Suite Pro 1.5.0.1+ +OpenCSV (if building from source) - http://opencsv.sourceforge.net + +BUILDING FROM SOURCE +==================== + +1. Drop Burp Suite Pro and the latest OpenCSV JARs in ./lib +2. ant clean; ant compile; ant jar; + +USAGE +===== + +In Burp Suite navigate to the Extender tab. +Select "Add". +Leave Extension Type as "Java" and choose "Select fileā€¦". +Navigate to the included "BurpNotesExtension.jar" file or your JAR compiled +from source, then click "Open". +Click "Next" to load the plugin. + +Within the Notes tab, there are four options: +o Save Notes: Save any currently open documents to a file. +o Load Notes: Load a previously saved set of notes from a file. +o Add Text: Add a tab with a new text document. +o Add Spreadsheet: Add a tab with a new spreadsheet. + +From other tabs in Burp, right clicking in areas where a user can normally +interact with HTTP Responses and Requests, such as the Proxy History or +Site Map Table, will present options to send those items directly to the +Notes Tab, either in a new document or appended to an existing one. + +COPYRIGHT +========= + +Burp Notes Extension - A plugin for Burp Suite that adds text documents and +spreadsheets. +Austin Lane +Copyright (C) 2013 Trustwave + +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 diff --git a/build.xml b/build.xml new file mode 100644 index 0000000..e38354c --- /dev/null +++ b/build.xml @@ -0,0 +1,21 @@ + + + + + + + + + + + + + + + + + + + + + diff --git a/build/.DS_Store b/build/.DS_Store new file mode 100644 index 0000000000000000000000000000000000000000..c9b4f3cf11ff885d088b42ddf35160087ed7c241 GIT binary patch literal 6148 zcmeH~I}XA?3`A{0fkcy%avKi74OR$Fzy^N^X;+72v%L_H&z{0#twsPys4H1xBPm z9^|w6h@Od$LItS6I25q&LxCG>vIYIqf#4$mI7QhFYo8^+Vg;}!TM!kPMk^St>SKu2 zy&WuhT}`%Nw2S8Op?PPuDF&v|E?SVlv^p5502LT0&_&+c`M-sKoBszbOsN1B_%j7` zy4h{kc&R*FKVHx3`>fi!!9l+q;q4~?i5-oBS`s?Yxr~isL5m^zd>g>v_ zy?36KYspIigFpcQKmY)EijxQe{D&7L00@ALh_V2!gsdq2_c#E6{J%mW06hLeZLMyA zz5c=@|6VA6uYZTi2*^r^iYO`5$%x8CHo)~0pa8fbeFrFniScJzcFhg<1uQMiK4VH` zk^@Sw|3POC!2K)2+0n(x+0DS!qC(0Q27>6#N^eh`Y0it+9zC2_v16wSkjUN(!XXhAP6yPuxIa4A3yiZ1Q|3rA+kJ zGT0`w1qC~ci=iNvIK}V08a0FlQnkc@;uo=VX~RT@1^8L`rL$TZZv-}Glh7y2m$Kj6 zlJ6gRW`2O`z4!{+gN86^@o@%tHjj^b|(A2dT8Y&NzRO^~vrNtCRU{&oJDbCav?5RUBtDRmqXn0o~!jSFk_oomy zhj`GmuzF^1Q$p)NiN0%(rj9|#B#%P1W@_Wrc^*@2s9u;l>eO40^ib2KpYCS1kTIy( zOOY^~v44%BWDTocNiN;dc$vw(b;VZfVFT~%a{)VvV~-M8?Rtp^RPc1r!#8aM7OY`s zHEOFK+gMP;ngFAw14ZBk`lwK~jI__+`h+=NOq6D9Du?l!$%Fa!#s=u917)&Ir5eTI zz6dZ5r*D^cNoH=>Djrrb+A;G|JhXo{ zb+?H*I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p>T0tf&)1;p_QUi8&u0!a(qynD53qG zLVu>;(>J?oB(pur}KU~ z8^_t_!7!ZL55Lsk7RCEk@8F=J z_dDH1Ll@m{v!Off-eTcn2wWl{2d(gRXV4Xeyr8}`w41(T@;=DhHmxRtAcy&=KX?;%f;0-ek1JBf^RVB zYFIDVQTK{9Q%NTZhytR(QUSM>dM}oQpeP^;hyqRl-XAm?W8ko~XtoY?<_Z9;fi?!8 z?-HD&9R?0dix`0^n+mk4%3U#(O$V=CT;Q;@XwylVl`)T7S-BgEGOL5vCY)4YQF>88 z6u7HE)jrnw{QvOy{r_%~Jc$CLz_U_7)s6;7eU#+R){Wx$tkq~=(bzbyw75!vV~%3P e@=^Q-%@}yi4lr<7S_A`=KLSPu=|q7iRp1}ywu##S literal 0 HcmV?d00001 diff --git a/src/burp/BurpExtender.java b/src/burp/BurpExtender.java new file mode 100644 index 0000000..f88e4f7 --- /dev/null +++ b/src/burp/BurpExtender.java @@ -0,0 +1,138 @@ +/* + * Burp Notes Extension - A plugin for Burp Suite that adds text documents and spreadsheets. + * Austin Lane + * Copyright (C) 2013 Trustwave Holdings, Inc. + * + * 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 . + */ + +package burp; + +import java.awt.Component; +import java.awt.GridLayout; +import java.awt.event.ActionEvent; +import java.awt.event.ActionListener; +import java.io.PrintWriter; +import java.util.HashMap; +import java.util.List; + +import javax.swing.JButton; +import javax.swing.JMenuItem; +import javax.swing.JOptionPane; +import javax.swing.JPanel; +import javax.swing.JTabbedPane; +import javax.swing.SwingUtilities; + +import com.trustwave.burp.NotesExtensionOperations; + +import burp.IBurpExtender; +import burp.IBurpExtenderCallbacks; +import burp.IContextMenuFactory; +import burp.IContextMenuInvocation; +import burp.IExtensionStateListener; +import burp.ITab; + +public class BurpExtender implements IBurpExtender, ITab, ActionListener, IExtensionStateListener, IContextMenuFactory +{ + private NotesExtensionOperations ops; + private JButton btnAddText, btnAddSpreadsheet, btnLoadNotes, btnSaveNotes; + + public final String TAB_NAME = "Notes"; + + @Override + public void registerExtenderCallbacks(final IBurpExtenderCallbacks Callbacks) + { + //Set up our extension operations + this.ops = new NotesExtensionOperations(Callbacks); + + //name our extension + ops.callbacks.setExtensionName("Burp Notes Extension"); + + //Our main and error output + ops.stdout = new PrintWriter(ops.callbacks.getStdout(), true); + ops.errout = new PrintWriter(ops.callbacks.getStderr(), true); + + // register ourselves as an extension state listener + ops.callbacks.registerExtensionStateListener(this); + + //register to produce options for the context menu + ops.callbacks.registerContextMenuFactory(this); + + //Keep track of our documents and types + ops.tabTypes = new HashMap(); + + SwingUtilities.invokeLater(new Runnable(){ + @Override + public void run(){ + //Create our initial UI components + ops.tabbedPane = new JTabbedPane(); + JPanel panel = new JPanel(); + //Add the save,load, and document buttons + btnAddText = new JButton("Add Text"); + btnAddText.setActionCommand(NotesExtensionOperations.COMMAND_ADD_TEXT); + btnAddText.addActionListener(BurpExtender.this); + btnAddSpreadsheet = new JButton("Add Spreadsheet"); + btnAddSpreadsheet.setActionCommand(NotesExtensionOperations.COMMAND_ADD_SPREADSHEET); + btnAddSpreadsheet.addActionListener(BurpExtender.this); + btnSaveNotes = new JButton("Save Notes"); + btnSaveNotes.setActionCommand(NotesExtensionOperations.COMMAND_SAVE_NOTES); + btnSaveNotes.addActionListener(BurpExtender.this); + btnLoadNotes = new JButton("Load Notes"); + btnLoadNotes.setActionCommand(NotesExtensionOperations.COMMAND_LOAD_NOTES); + btnLoadNotes.addActionListener(BurpExtender.this); + + //Make our panel with a grid layout for arranging the buttons + panel.setLayout(new GridLayout(3, 3)); + panel.add(btnSaveNotes); + panel.add(btnLoadNotes); + panel.add(btnAddText); + panel.add(btnAddSpreadsheet); + ops.tabbedPane.addTab("Main", panel); + ops.callbacks.customizeUiComponent(ops.tabbedPane); + + //Add our tab to the suite + ops.callbacks.addSuiteTab(BurpExtender.this); + } + }); + } + + @Override + public String getTabCaption() { + return TAB_NAME; + } + + @Override + public Component getUiComponent() { + return ops.tabbedPane; + } + + @Override + public void actionPerformed(ActionEvent e) { + String cmd = e.getActionCommand(); + ops.ParseAction(cmd); + + } + + @Override + public void extensionUnloaded() { + //Unloading extension, prompt user to save data if they have any tabs + if(ops.tabbedPane.getTabCount() > 1){ + Object[] options = {"Yes", "No"}; + int n = JOptionPane.showOptionDialog(getUiComponent(), "Would you like to save your notes?", "Notes Tab", JOptionPane.YES_NO_OPTION, JOptionPane.QUESTION_MESSAGE, null, options, options[0]); + if(n == JOptionPane.YES_OPTION){ + ops.SaveNotes(); + } + } + ops.stdout.println("Extension was unloaded"); + } + + @Override + public List createMenuItems(IContextMenuInvocation invocation) { + return ops.CreateMenuItems(invocation, this); + } +} + diff --git a/src/com/.DS_Store b/src/com/.DS_Store new file mode 100644 index 0000000000000000000000000000000000000000..8fc7d1c0901fc08dae2d5a14300a445d45cc73c9 GIT binary patch literal 6148 zcmeHKOH0E*5T0$TCa92$=yCB}B(*|&@DNG`k3tGPSkc538wg3sqdmlGJotC~IsP7J zA1z4hNf0SBF#8Sj*k!+zoelu7UJI}>t9p@0l=_5HG`A0<9UKm2JFX1Q&DvRb{dv%6=Qrg1PDhH;S0dr1)o z*{wTC=582_eJ{O}cJAdx*7H&sx$*J|Mx;GRk_hdQ&K`zAKDoD!%ktv9$y?p_qRGon z$8Pd&+g>b8!!WIP zKn#3mK+Jw9mgxUiKhOU%i56mj7}!n*SflUudw4h9Ti0$WdM!tNKouhLDut^OG-NBr fT+xb8P^F-s3j@*7SSdsg3jGm~G|)l}{3!!pW@Az@ literal 0 HcmV?d00001 diff --git a/src/com/trustwave/.DS_Store b/src/com/trustwave/.DS_Store new file mode 100644 index 0000000000000000000000000000000000000000..9fdd90be78db346b3904ab2d5282aea671e4b55d GIT binary patch literal 6148 zcmeH~F^@C7+QY<*`G6zt_{Ht~ce)&}*NYcvUmft2K4P+;+kzC30#ZNh|QedLMqUWQZ|2z7t`G3-)R0>Fe z4^zN~?S8xAOXb=6^m<-DWYyP=PR8X74?h7+{3u@0!?<63LDppJWQC?5fsjE#3cOW; Ee;;fTz5oCK literal 0 HcmV?d00001 diff --git a/src/com/trustwave/burp/ButtonTabComponent.java b/src/com/trustwave/burp/ButtonTabComponent.java new file mode 100644 index 0000000..30ecea6 --- /dev/null +++ b/src/com/trustwave/burp/ButtonTabComponent.java @@ -0,0 +1,157 @@ +/* + * Copyright (c) 1995, 2008, Oracle and/or its affiliates. All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * + * - Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * + * - Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * + * - Neither the name of Oracle or the names of its + * contributors may be used to endorse or promote products derived + * from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS + * IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, + * THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR + * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR + * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, + * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, + * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF + * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING + * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS + * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ + +package com.trustwave.burp; + +import javax.swing.AbstractButton; +import javax.swing.BorderFactory; +import javax.swing.JButton; +import javax.swing.JLabel; +import javax.swing.JOptionPane; +import javax.swing.JPanel; +import javax.swing.JTabbedPane; +import javax.swing.plaf.basic.BasicButtonUI; +import java.awt.*; +import java.awt.event.*; + +/** + * Component to be used as tabComponent; + * Contains a JLabel to show the text and + * a JButton to close the tab it belongs to + */ +@SuppressWarnings("serial") +public class ButtonTabComponent extends JPanel { + private final JTabbedPane pane; + + public ButtonTabComponent(final JTabbedPane pane) { + //unset default FlowLayout' gaps + super(new FlowLayout(FlowLayout.LEFT, 0, 0)); + if (pane == null) { + throw new NullPointerException("TabbedPane is null"); + } + this.pane = pane; + setOpaque(false); + + //make JLabel read titles from JTabbedPane + JLabel label = new JLabel() { + public String getText() { + int i = pane.indexOfTabComponent(ButtonTabComponent.this); + if (i != -1) { + return pane.getTitleAt(i); + } + return null; + } + }; + + add(label); + //add more space between the label and the button + label.setBorder(BorderFactory.createEmptyBorder(0, 0, 0, 5)); + //tab button + JButton button = new TabButton(); + add(button); + //add more space to the top of the component + setBorder(BorderFactory.createEmptyBorder(2, 0, 0, 0)); + } + + private class TabButton extends JButton implements ActionListener { + public TabButton() { + int size = 17; + setPreferredSize(new Dimension(size, size)); + setToolTipText("close this tab"); + //Make the button looks the same for all Laf's + setUI(new BasicButtonUI()); + //Make it transparent + setContentAreaFilled(false); + //No need to be focusable + setFocusable(false); + setBorder(BorderFactory.createEtchedBorder()); + setBorderPainted(false); + //Making nice rollover effect + //we use the same listener for all buttons + addMouseListener(buttonMouseListener); + setRolloverEnabled(true); + //Close the proper tab by clicking the button + addActionListener(this); + } + + public void actionPerformed(ActionEvent e) { + int i = pane.indexOfTabComponent(ButtonTabComponent.this); + if (i != -1) { + Object[] options = {"OK", "Cancel"}; + int n = JOptionPane.showOptionDialog(pane, "If you close this tab you will lose any unsaved data.", "Notes Tab", JOptionPane.OK_CANCEL_OPTION, JOptionPane.WARNING_MESSAGE, null, options, options[0]); + if(n == JOptionPane.OK_OPTION){ + pane.remove(i); + } + } + } + + //we don't want to update UI for this button + public void updateUI() { + } + + //paint the cross + protected void paintComponent(Graphics g) { + super.paintComponent(g); + Graphics2D g2 = (Graphics2D) g.create(); + //shift the image for pressed buttons + if (getModel().isPressed()) { + g2.translate(1, 1); + } + g2.setStroke(new BasicStroke(2)); + g2.setColor(Color.BLACK); + if (getModel().isRollover()) { + g2.setColor(Color.MAGENTA); + } + int delta = 6; + g2.drawLine(delta, delta, getWidth() - delta - 1, getHeight() - delta - 1); + g2.drawLine(getWidth() - delta - 1, delta, delta, getHeight() - delta - 1); + g2.dispose(); + } + } + + private final static MouseListener buttonMouseListener = new MouseAdapter() { + public void mouseEntered(MouseEvent e) { + Component component = e.getComponent(); + if (component instanceof AbstractButton) { + AbstractButton button = (AbstractButton) component; + button.setBorderPainted(true); + } + } + + public void mouseExited(MouseEvent e) { + Component component = e.getComponent(); + if (component instanceof AbstractButton) { + AbstractButton button = (AbstractButton) component; + button.setBorderPainted(false); + } + } + }; +} diff --git a/src/com/trustwave/burp/NotesExtensionOperations.java b/src/com/trustwave/burp/NotesExtensionOperations.java new file mode 100644 index 0000000..ef81fa3 --- /dev/null +++ b/src/com/trustwave/burp/NotesExtensionOperations.java @@ -0,0 +1,537 @@ +/* + * Notes Extension Operations - A helper class for the Burp Notes Extensions plugin. Manages all the notes and interprets user interactions on behalf of the plugin. + * Austin Lane + * Copyright (C) 2013 Trustwave Holdings, Inc. + * + * 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 . + */ + +package com.trustwave.burp; + +import java.awt.Component; +import java.awt.event.ActionListener; +import java.io.File; +import java.io.FileReader; +import java.io.FileWriter; +import java.io.IOException; +import java.io.PrintWriter; +import java.util.ArrayList; +import java.util.HashMap; +import java.util.List; + +import javax.swing.JButton; +import javax.swing.JFileChooser; +import javax.swing.JMenu; +import javax.swing.JMenuItem; +import javax.swing.JOptionPane; +import javax.swing.JScrollPane; +import javax.swing.JTabbedPane; +import javax.swing.JTable; +import javax.swing.JTextArea; + +import burp.IBurpExtenderCallbacks; +import burp.IContextMenuInvocation; +import burp.IExtensionHelpers; +import burp.IHttpRequestResponse; + +import au.com.bytecode.opencsv.CSVReader; +import au.com.bytecode.opencsv.CSVWriter; + +public class NotesExtensionOperations{ + //PROPERTIES + public IBurpExtenderCallbacks callbacks; + public IExtensionHelpers helpers; + public PrintWriter stdout, errout; + public JTabbedPane tabbedPane; + public JButton btnAddText, btnAddSpreadsheet, btnLoadNotes, btnSaveNotes; + public HashMap tabTypes; + public IHttpRequestResponse[] messages; + public byte selectedContext; + + //KEYWORDS + public static final String COMMAND_ADD_TEXT = "addText"; + public static final String COMMAND_ADD_SPREADSHEET = "addSpreadsheet"; + public static final String COMMAND_LOAD_NOTES = "loadNotes"; + public static final String COMMAND_SAVE_NOTES = "saveNotes"; + public static final String COMMAND_ADD_NEW_TEXT = "newTextDoc"; + + //Constructor + /** + * Creates a NotesExtensionOperations object, used for performing operations and managing data with the Burp Notes Extension. + * @param Callbacks The IBurpExtenderCallbacks object provided by the BurpExtender class creating this object. + */ + public NotesExtensionOperations(IBurpExtenderCallbacks Callbacks){ + this.callbacks = Callbacks; + this.helpers = callbacks.getHelpers(); + } + + //FILE OPERATIONS + /** + * Prompt user to choose a file for saving or loading with a JFileChooser. + * @param saveFile True - Show a Save Dialog. False - Show a Load Dialog. + * @return The File chosen by the user. + */ + public File GetFileFromDialog(boolean saveFile){ + JFileChooser fc = new JFileChooser(); + int returnVal; + if(saveFile) returnVal = fc.showSaveDialog(tabbedPane); + else returnVal = fc.showOpenDialog(tabbedPane); + if(returnVal == JFileChooser.APPROVE_OPTION){ + //Save location chosen, open file and iterate through tabs to save data + File f = fc.getSelectedFile(); + if(!saveFile) return f; //Not saving over file, so just return it + + try{ + if(f.exists()){ + f.delete(); + } + f.createNewFile(); + + return f; + } catch(IOException exc){ + errout.println(exc.getMessage()); + } + } + return null; + } + + /** + * Write out all open documents to a text file using OpenCSV. + * Each document begins and ends with TEXT/ENDTEXT or SPREADSHEET/ENDSPREADSHEET. + * The second line is the name of the document. + * Anything after that is the content of the document. + */ + public void SaveNotes(){ + stdout.println("Saving"); + ArrayList data = GetNotesData(); + if(data.size() > 0) { + File f; + if((f = GetFileFromDialog(true)) != null){ + try{ + //Create our various Writers + FileWriter fw = new FileWriter(f); + CSVWriter writer = new CSVWriter(fw); + //Write out to file and close + writer.writeAll(data); + writer.close(); + fw.close(); + } catch(IOException exc){ + errout.println(exc.getMessage()); + } + } + } else { + //No notes could be found + } + } + + /** + * Prompt users to open a Notes Extension file, which will be used to populate documents + */ + public void LoadNotes(){ + //Now pick file to load + File file; + try { + if((file = GetFileFromDialog(false)) != null){ + ArrayList spreadData = new ArrayList(); + if(file.exists() && file.isFile() && file.canRead()){ + CSVReader reader = new CSVReader(new FileReader(file)); + String[] nextLine; + while((nextLine = reader.readNext()) != null){ + spreadData.add(nextLine); + } + if(spreadData.size() > 0){ + SetNotesData(spreadData); + } + reader.close(); + } + } + } catch (IOException exc) { + errout.println(exc.getMessage()); + } + } + + //TAB OPERATIONS + /** + * Builds an ArrayList based on the documents within the Notes tab. Used for saving data. + * @return An ArrayList of String[] used for saving to a file. + */ + public ArrayList GetNotesData(){ + //ArrayList to store data we will write out + ArrayList allElements = new ArrayList(); + + for(int tab = 1; tab < tabbedPane.getTabCount(); tab++){ //Skip the Main tab + String tabName = tabbedPane.getTitleAt(tab); + //Check each tab name against our tab types list to determine how we will write it to the file + if(tabTypes.get(tabName) == "TEXT"){ + //Text tab + JTextArea textTab = (JTextArea) GetInnerComponent(tab); + + if(textTab != null){ + //Begin Block + allElements.add(new String[]{"TEXT"}); + //Title + allElements.add(new String[]{tabName}); + //Text + allElements.add(new String[]{textTab.getText()}); + //End Block + allElements.add(new String[]{"ENDTEXT"}); + } + + } else { + //Spreadsheet tab + JTable table = (JTable) GetInnerComponent(tab); + + if(table != null){ + //Begin Block + allElements.add(new String[]{"SPREADSHEET"}); + //Title + allElements.add(new String[]{tabName}); + //Data + int numColumns = table.getColumnCount(); + String[] data = new String[numColumns]; + // Write cell data + for(int i=0;i data){ + //Various flags to determine how to process lines being read in + boolean inText = false; + boolean inSpreadsheet = false; + boolean inTitle = false; + //Iterate through the ArrayList read from the file, build out the tabs + String current = ""; + String tabName = ""; + ArrayList spreadData = new ArrayList(); + for(int i = 0; i < data.size(); i++){ + String[] nextLine = data.get(i); + for(int j = 0; j < nextLine.length; j++){ + if(nextLine[j].equals("TEXT")){ + //Start text object + inText = true; + inTitle = true; + } else if(nextLine[j].equals("ENDTEXT")){ + //End of text object, create the new textArea and add the tab + inText = false; + AddTextTab(current, tabName); + } else if(nextLine[j].equals("SPREADSHEET")){ + //Start spreadsheet object + inSpreadsheet = true; + inTitle = true; + spreadData.clear(); + } else if(nextLine[j].equals("ENDSPREADSHEET")){ + //End of spreadsheet block. Take our ArrayList and fill out a table + inSpreadsheet = false; + AddSpreadsheetTab(spreadData, tabName); + } else if(inText){ + //Inside the content of a text block + if(inTitle){ + tabName = nextLine[j]; + inTitle = false; + } else { + current += nextLine[j]; + } + } else if(inSpreadsheet){ + //Inside the content of a spreadsheet + if(inTitle){ + tabName = nextLine[j]; + inTitle = false; + } else { + spreadData.add(nextLine); + i = nextLine.length; //End this loop early, we are taking the whole line + } + } + } + } + } + + /** + * Find the inner component of the TabbedPane->ScrollPane->Viewport->Component structure for the given index. + * Will need to be cast as a Text Area or Table depending on the tab. + * @param tabIndex The index of the Tabbed Pane from which to retrieve the component. + * @return The primary display component inside the given tab. + */ + public Component GetInnerComponent(int tabIndex){ + JScrollPane sp = (JScrollPane) tabbedPane.getComponentAt(tabIndex); + if(sp != null && sp.getViewport() != null){ + Component c = sp.getViewport().getView(); + return c; + } + return null; + } + + /** + * Add a blank text tab to the Tabbed Pane. Will prompt the user for a name. + */ + public void AddTextTab(){ + AddTextTab(""); + } + + /** + * Add a new text tab to the Tabbed pane with the given text. Will prompt the user for a name. + * @param text The text to display within the tab. + */ + public void AddTextTab(String text){ + //Prompt user to name the document + String name = getTabName(); + AddTextTab(text, name); + } + + /** + * Add a new text tab to the Tabbed Pane with the given text and name. + * @param text The text to display within the tab. + * @param name The name to appear on the tab. + */ + public void AddTextTab(String text, String name){ + // TODO Prompt user for new document or import an existing one + //Create a JTextArea for displaying plain text + JTextArea newText = new JTextArea(5,30); + newText.setText(text); + //Set it in a scroll pane + JScrollPane scrollWindow = new JScrollPane(newText); + scrollWindow.setHorizontalScrollBarPolicy(JScrollPane.HORIZONTAL_SCROLLBAR_AS_NEEDED); + scrollWindow.setVerticalScrollBarPolicy(JScrollPane.VERTICAL_SCROLLBAR_ALWAYS); + scrollWindow.setPreferredSize(tabbedPane.getSize()); + //Resize it to fit the tabbed pane + newText.setBounds(tabbedPane.getBounds()); + //Mark the tab as a TEXT tab + tabTypes.put(name, "TEXT"); + tabbedPane.addTab(name, scrollWindow); + tabbedPane.setTabComponentAt(tabbedPane.getTabCount() - 1, new ButtonTabComponent(tabbedPane)); + + } + + /** + * Add a new blank spreadsheet to the Tabbed Pane. Will prompt the user for a name. + */ + public void AddSpreadsheetTab(){ + AddSpreadsheetTab(null); + } + + /** + * Adds a new spreadsheet tab to the Tabbed Pane with the specified data. Will prompt the user for a name. + * @param data Data to populate the JTable within the tab. + */ + public void AddSpreadsheetTab(ArrayList data){ + //Prompt user to name the document + String name = getTabName(); + AddSpreadsheetTab(data, name); + } + + /** + * Adds a new spreadsheet tab to the Tabbed Pane with the specified data and name. + * @param data Data to populate the JTable within the tab. + * @param name The name to appear on the tab. + */ + public void AddSpreadsheetTab(ArrayList data, String name){ + // TODO Prompt user for a new document or import an existing one + // TODO If importing add method for interpreting CSV, investigate XLSX + //Create a JTable for holding spreadsheet data + JTable table = new JTable(60,20); + //Add the table to a scroll pane + JScrollPane scrollWindow = new JScrollPane(table); + scrollWindow.setHorizontalScrollBarPolicy(JScrollPane.HORIZONTAL_SCROLLBAR_ALWAYS); + scrollWindow.setVerticalScrollBarPolicy(JScrollPane.VERTICAL_SCROLLBAR_ALWAYS); + scrollWindow.setPreferredSize(tabbedPane.getSize()); + //Size the table and set some view properties + table.setFillsViewportHeight(true); + table.setShowVerticalLines(true); + table.setPreferredScrollableViewportSize(tabbedPane.getSize()); + table.setAutoResizeMode(JTable.AUTO_RESIZE_OFF); + + //If we have spreadsheet data, fill in the table + if(data != null){ + for(int row = 0; row < data.size(); row++){ + String[] rowData = data.get(row); + for(int col = 0; col < rowData.length; col++){ + table.setValueAt(rowData[col], row, col); + } + } + } + + //Set this tab as a spreadsheet + tabTypes.put(name, "SPREADSHEET"); + tabbedPane.addTab(name, scrollWindow); + tabbedPane.setTabComponentAt(tabbedPane.getTabCount() - 1, new ButtonTabComponent(tabbedPane)); + } + + /** + * Search through the TabbedPane and return the index of the tab matching the given name. + * @param name The name to match within the tabs. + * @return The index of a matching Tab or -1 if no matches are found. + */ + public int FindTabByName(String name){ + for(int i = 1; i < tabbedPane.getTabCount(); i++){ + //Look for the tab with a name matching the selected document + if(tabbedPane.getTitleAt(i).equals(name)){ + return i; + } + } + + return -1; + } + + /** + * Prompt the user to choose a name for a new tab. + * @return The name entered by the user. + */ + public String getTabName(){ + String newName = ""; + while(newName == "" || tabTypes.containsKey(newName)) + { + newName = JOptionPane.showInputDialog("Please enter a unique name for the document:"); + } + return newName; + } + + //CONTEXT MENU OPERATIONS + /** + * Create menu items for a context menu on behalf of the Burp Extension's createMenuItems(). + * @param invocation The IContextMenuInvocation sent by the extension. + * @param listener The listener to be passed to any created menu items. + * @return A new List to use in the context menu, null if no valid Contexts are used. + */ + public List CreateMenuItems(IContextMenuInvocation invocation, ActionListener listener){ + //User has opened a context menu. Check the context to see if its somewhere where we can grab a request/response + //Remember the context and message so when we go to the action listener we can see what was happening + selectedContext = invocation.getInvocationContext(); + messages = invocation.getSelectedMessages(); + if(selectedContext == IContextMenuInvocation.CONTEXT_MESSAGE_EDITOR_REQUEST || + selectedContext == IContextMenuInvocation.CONTEXT_MESSAGE_EDITOR_RESPONSE || + selectedContext == IContextMenuInvocation.CONTEXT_MESSAGE_VIEWER_REQUEST || + selectedContext == IContextMenuInvocation.CONTEXT_MESSAGE_VIEWER_RESPONSE){ + //Present each document, the context shows whether they selected response/request + List menu = new ArrayList(); + JMenu main = new JMenu("Send to Notes"); + menu.add(main); + //Send request/response a new text document + main.add(CreateMenuItem("New Text Document", "CON|" + NotesExtensionOperations.COMMAND_ADD_NEW_TEXT, listener)); + //Send request/response to an existing document + for(int i = 1; i < tabbedPane.getTabCount(); i++){ + if(tabTypes.get(tabbedPane.getTitleAt(i)) == "TEXT"){ + String docName = tabbedPane.getTitleAt(i); + main.add(CreateMenuItem(docName, "CON|" + docName, listener)); + } + } + return menu; + } else if(selectedContext == IContextMenuInvocation.CONTEXT_PROXY_HISTORY || + selectedContext == IContextMenuInvocation.CONTEXT_TARGET_SITE_MAP_TABLE){ + //Need to present request/response options for each document + List menu = new ArrayList(); + JMenu main = new JMenu("Send to Notes"); + menu.add(main); + //Add a Request/Response option for a new text document + main.add(NotesExtensionOperations.CreateMenuItem("New Text Document (Request)", "REQ|newTextDoc", listener)); + main.add(NotesExtensionOperations.CreateMenuItem("New Text Document (Response)", "RES|newTextDoc", listener)); + //Iterate through all open text documents, add a Request and Response option for each + for(int i = 1; i < tabbedPane.getTabCount(); i++){ + if(tabTypes.get(tabbedPane.getTitleAt(i)) == "TEXT"){ + String docName = tabbedPane.getTitleAt(i); + main.add(NotesExtensionOperations.CreateMenuItem(docName + " (Request)", "REQ|" + docName, listener)); + main.add(NotesExtensionOperations.CreateMenuItem(docName + " (Response)", "RES|" + docName, listener)); + } + } + return menu; + } + + //No contexts we care about, don't return a menu option + return null; + } + + /** + * Create and return a JMenuItem + * @param name The name to be displayed. + * @param command The action command to be used by this item. + * @param listener The listener responsible for interpreting the command. + * @return A new JMenuItem. + */ + public static JMenuItem CreateMenuItem(String name, String command, ActionListener listener){ + JMenuItem newItem = new JMenuItem(name); + newItem.setActionCommand(command); + newItem.addActionListener(listener); + + return newItem; + } + + /** + * Interpret the command sent by the BurpExtension's ActionListener + * @param cmd The command string sent by the ActionListener. + */ + public void ParseAction(String cmd){ + if(cmd.equals(COMMAND_ADD_TEXT)){ + AddTextTab(); + } else if(cmd.equals(COMMAND_ADD_SPREADSHEET)){ + AddSpreadsheetTab(); + } else if(cmd.equals(COMMAND_SAVE_NOTES)){ + SaveNotes(); + } else if(cmd.equals(COMMAND_LOAD_NOTES)){ + LoadNotes(); + } else { + ParseConCommand(cmd); + } + } + + /** + * Split command from the ActionListener by '|' and see if it results in a context|document command + * @param cmd The command string sent by the ActionListener. + */ + public void ParseConCommand(String cmd){ + String[] command = cmd.split("\\|"); + if(command != null && command.length == 2){ + boolean getReq = false; + if(command[0].equals("CON")){ + //Look at selectedContext to see which to copy + if(selectedContext == IContextMenuInvocation.CONTEXT_MESSAGE_EDITOR_REQUEST || + selectedContext == IContextMenuInvocation.CONTEXT_MESSAGE_VIEWER_REQUEST) + getReq = true; + } else if(command[0].equals("REQ")){ + //Copy the request + getReq = true; + } + //If getReq == false, we are grabbing the response + if(messages != null){ + //Copy any response/requests in messages to a string + String fullText = ""; + for(int i = 0; i < messages.length; i++){ + IHttpRequestResponse rr = messages[i]; + if(getReq) fullText += helpers.bytesToString(rr.getRequest()); + else fullText += helpers.bytesToString(rr.getResponse()); + } + if(cmd.equals(COMMAND_ADD_NEW_TEXT)){ + //We are adding a new document to the tab + AddTextTab(fullText); + } else if(tabTypes.containsKey(command[1])){ + //We are adding the messages to an existing document + int numTab = FindTabByName(command[1]); + JTextArea textTab = (JTextArea) GetInnerComponent(numTab); + String origText = textTab.getText(); + textTab.setText(origText + "\n" + fullText); + } + } + messages = null; //Clear it out once we are done + selectedContext = Byte.MIN_VALUE; + } + } +} \ No newline at end of file