pax_global_header00006660000000000000000000000064130576324350014522gustar00rootroot0000000000000052 comment=231f1db55fa666725896d90cd18bcde2aca8af5b wuzz-0.3.0/000077500000000000000000000000001305763243500125415ustar00rootroot00000000000000wuzz-0.3.0/.gitignore000066400000000000000000000000051305763243500145240ustar00rootroot00000000000000wuzz wuzz-0.3.0/.travis.yml000066400000000000000000000012451305763243500146540ustar00rootroot00000000000000language: go go: - 1.7.5 - tip # latest os: - linux # remove osx, getting vm from travis is extremely slow # - osx env: - "PATH=/home/travis/gopath/bin:$PATH" script: - test -z "$(gofmt -l ./)" - test -z "$(go vet -v ./...)" - go test ./... - go build # after_success: # # Publish as pre-release if it isn't a pull request # - 'if [ "$TRAVIS_PULL_REQUEST" = "false" ]; then go get github.com/mitchellh/gox && go get github.com/tcnksm/ghr; fi' # - 'if [ "$TRAVIS_PULL_REQUEST" = "false" ]; then gox -output "dist/{{.Dir}}_{{.OS}}_{{.Arch}}" && ghr --username $GITHUB_USERNAME --token $GITHUB_TOKEN --replace --prerelease --debug pre-release dist/; fi' wuzz-0.3.0/CHANGELOG.md000066400000000000000000000014211305763243500143500ustar00rootroot00000000000000## 0.3.0 2017.03.07 - Request header autocompletion - Configurable statusline - JSON requests with `-j`/`--json` flags - Allow insecure HTTPS requests (`-k`/`--insecure` flags) - Socks proxy support (`-x`/`--proxy` flags) - Disable following redirects (`-R`/`--disable-redirects` flags) - Enhanced TLS support (`-T`/`--tls`, `-1`/`--tlsv1`, `--tlsv1.0`, `--tlsv1.1`, `--tlsv1.2` flags) - Commands for line and word deletion - Home/end navigation fix ## 0.2.0 2017.02.18 - Config file support with configurable keybindings - Help popup (F1 key) - Ignore invalid SSL certs with the --insecure flag - PATCH request support - Allow JSON request body (--data-binary flag) - Colorized JSON response - Parameter encoding bugfix - Multiple UI bugfixes ## 0.1.0 2017.02.11 Initial release wuzz-0.3.0/LICENSE000066400000000000000000001033301305763243500135460ustar00rootroot00000000000000 GNU AFFERO GENERAL PUBLIC LICENSE Version 3, 19 November 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 Affero General Public License is a free, copyleft license for software and other kinds of works, specifically designed to ensure cooperation with the community in the case of network server software. The licenses for most software and other practical works are designed to take away your freedom to share and change the works. By contrast, our General Public Licenses are 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. 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. Developers that use our General Public Licenses protect your rights with two steps: (1) assert copyright on the software, and (2) offer you this License which gives you legal permission to copy, distribute and/or modify the software. A secondary benefit of defending all users' freedom is that improvements made in alternate versions of the program, if they receive widespread use, become available for other developers to incorporate. Many developers of free software are heartened and encouraged by the resulting cooperation. However, in the case of software used on network servers, this result may fail to come about. The GNU General Public License permits making a modified version and letting the public access it on a server without ever releasing its source code to the public. The GNU Affero General Public License is designed specifically to ensure that, in such cases, the modified source code becomes available to the community. It requires the operator of a network server to provide the source code of the modified version running there to the users of that server. Therefore, public use of a modified version, on a publicly accessible server, gives the public access to the source code of the modified version. An older license, called the Affero General Public License and published by Affero, was designed to accomplish similar goals. This is a different license, not a version of the Affero GPL, but Affero has released a new version of the Affero GPL which permits relicensing under this license. 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 Affero 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. Remote Network Interaction; Use with the GNU General Public License. Notwithstanding any other provision of this License, if you modify the Program, your modified version must prominently offer all users interacting with it remotely through a computer network (if your version supports such interaction) an opportunity to receive the Corresponding Source of your version by providing access to the Corresponding Source from a network server at no charge, through some standard or customary means of facilitating copying of software. This Corresponding Source shall include the Corresponding Source for any work covered by version 3 of the GNU General Public License that is incorporated pursuant to the following paragraph. 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 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 work with which it is combined will remain governed by version 3 of the GNU General Public License. 14. Revised Versions of this License. The Free Software Foundation may publish revised and/or new versions of the GNU Affero 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 Affero 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 Affero 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 Affero 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 Affero 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 Affero General Public License for more details. You should have received a copy of the GNU Affero General Public License along with this program. If not, see . Also add information on how to contact you by electronic and paper mail. If your software can interact with users remotely through a computer network, you should also make sure that it provides a way for users to get its source. For example, if your program is a web application, its interface could display a "Source" link that leads users to an archive of the code. There are many ways you could offer source, and different solutions will be better for different programs; see section 13 for the specific requirements. 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 AGPL, see . wuzz-0.3.0/README.md000066400000000000000000000044421305763243500140240ustar00rootroot00000000000000# wuzz Interactive cli tool for HTTP inspection Wuzz command line arguments are similar to cURL's arguments, so it can be used to inspect/modify requests copied from the browser's network inspector with the "copy as cURL" feature. ![wuzz screencast](docs/images/screencast.gif) ## Installation and usage ``` $ go get github.com/asciimoo/wuzz $ "$GOPATH/bin/wuzz" --help ``` ### Configuration It is possible to override default settings in a configuration file. The default location is `"$XDG_CONFIG_HOME/wuzz/config.toml"`on linux and `~/.wuzz/config.toml` on other platforms. `-c`/`--config` switches can be used to load config file from custom location. See [example configuration](sample-config.toml) for more details. ### Commands Keybinding | Description ----------------------------------------|--------------------------------------- F1 | Display help Ctrl+R | Send request Ret | Send request (only from URL view) Ctrl+S | Save response Ctrl+C | Quit Ctrl+K, Shift+Tab | Previous view Ctlr+J, Tab | Next view Alt+H | Toggle history Down | Move down one view line Up | Move up one view line Page down | Move down one view page Page up | Move up one view page F2 | Jump to URL F3 | Jump to query parameters F4 | Jump to HTTP method F5 | Jump to request body F6 | Jump to headers F7 | Jump to search F8 | Jump to response headers F9 | Jump to response body ## TODO * Colors * Response specific filters (xpath, etc..) * Better navigation * File upload * Autocompletion * Tests ## Bugs Bugs or suggestions? Visit the [issue tracker](https://github.com/asciimoo/wuzz/issues) or join `#wuzz` on freenode wuzz-0.3.0/commands.go000066400000000000000000000061301305763243500146710ustar00rootroot00000000000000package main import ( "fmt" "strings" "unicode" "github.com/jroimartin/gocui" ) type CommandFunc func(*gocui.Gui, *gocui.View) error var COMMANDS map[string]func(string, *App) CommandFunc = map[string]func(string, *App) CommandFunc{ "submit": func(_ string, a *App) CommandFunc { return a.SubmitRequest }, "save": func(_ string, a *App) CommandFunc { return a.OpenSaveDialog }, "history": func(_ string, a *App) CommandFunc { return a.ToggleHistory }, "quit": func(_ string, _ *App) CommandFunc { return quit }, "focus": func(args string, a *App) CommandFunc { return func(g *gocui.Gui, _ *gocui.View) error { return a.setViewByName(g, args) } }, "nextView": func(_ string, a *App) CommandFunc { return a.NextView }, "prevView": func(_ string, a *App) CommandFunc { return a.PrevView }, "scrollDown": func(_ string, _ *App) CommandFunc { return scrollViewDown }, "scrollUp": func(_ string, _ *App) CommandFunc { return scrollViewUp }, "pageDown": func(_ string, _ *App) CommandFunc { return pageDown }, "pageUp": func(_ string, _ *App) CommandFunc { return pageUp }, "deleteLine": func(_ string, _ *App) CommandFunc { return deleteLine }, "deleteWord": func(_ string, _ *App) CommandFunc { return deleteWord }, } func scrollView(v *gocui.View, dy int) error { v.Autoscroll = false ox, oy := v.Origin() if oy+dy < 0 { dy = -oy } if _, err := v.Line(dy); dy > 0 && err != nil { dy = 0 } v.SetOrigin(ox, oy+dy) return nil } func scrollViewUp(_ *gocui.Gui, v *gocui.View) error { return scrollView(v, -1) } func scrollViewDown(_ *gocui.Gui, v *gocui.View) error { return scrollView(v, 1) } func pageUp(_ *gocui.Gui, v *gocui.View) error { _, height := v.Size() scrollView(v, -height*2/3) return nil } func pageDown(_ *gocui.Gui, v *gocui.View) error { _, height := v.Size() scrollView(v, height*2/3) return nil } func deleteLine(_ *gocui.Gui, v *gocui.View) error { if !v.Editable { return nil } _, curY := v.Cursor() _, oY := v.Origin() currentLine := curY + oY viewLines := strings.Split(strings.TrimSpace(v.Buffer()), "\n") if currentLine >= len(viewLines) { return nil } v.Clear() if currentLine > 0 { fmt.Fprintln(v, strings.Join(viewLines[:currentLine], "\n")) } fmt.Fprint(v, strings.Join(viewLines[currentLine+1:], "\n")) v.SetCursor(0, currentLine) v.SetOrigin(0, oY) return nil } func deleteWord(_ *gocui.Gui, v *gocui.View) error { cX, cY := v.Cursor() oX, _ := v.Origin() cX = cX - 1 + oX line, err := v.Line(cY) if err != nil || line == "" || cX < 0 { return nil } if cX >= len(line) { cX = len(line) - 1 } origCharCateg := getCharCategory(rune(line[cX])) v.EditDelete(true) cX -= 1 for cX >= 0 { c := rune(line[cX]) if origCharCateg != getCharCategory(c) { break } v.EditDelete(true) cX -= 1 } return nil } func getCharCategory(chr rune) int { switch { case unicode.IsDigit(chr): return 0 case unicode.IsLetter(chr): return 1 case unicode.IsSpace(chr): return 2 case unicode.IsPunct(chr): return 3 } return int(chr) } func quit(g *gocui.Gui, v *gocui.View) error { return gocui.ErrQuit } wuzz-0.3.0/config/000077500000000000000000000000001305763243500140065ustar00rootroot00000000000000wuzz-0.3.0/config/config.go000066400000000000000000000071261305763243500156100ustar00rootroot00000000000000package config import ( "errors" "os" "path/filepath" "runtime" "time" "github.com/BurntSushi/toml" "github.com/mitchellh/go-homedir" ) var ContentTypes = map[string]string{ "json": "application/json", "form": "application/x-www-form-urlencoded", } // Duration is used to automatically unmarshal timeout strings to // time.Duration values type Duration struct { time.Duration } func (d *Duration) UnmarshalText(text []byte) error { var err error d.Duration, err = time.ParseDuration(string(text)) return err } type Config struct { General GeneralOptions Keys map[string]map[string]string } type GeneralOptions struct { Timeout Duration FormatJSON bool Insecure bool PreserveScrollPosition bool FollowRedirects bool DefaultURLScheme string StatusLine string TLSVersionMin uint16 TLSVersionMax uint16 } var defaultTimeoutDuration, _ = time.ParseDuration("1m") var DefaultKeys = map[string]map[string]string{ "global": map[string]string{ "CtrlR": "submit", "CtrlC": "quit", "CtrlS": "save", "CtrlD": "deleteLine", "CtrlW": "deleteWord", "Tab": "nextView", "CtrlJ": "nextView", "CtrlK": "prevView", "AltH": "history", "F2": "focus url", "F3": "focus get", "F4": "focus method", "F5": "focus data", "F6": "focus headers", "F7": "focus search", "F8": "focus response-headers", "F9": "focus response-body", }, "url": map[string]string{ "Enter": "submit", }, "response-headers": map[string]string{ "ArrowUp": "scrollUp", "ArrowDown": "scrollDown", "PageUp": "pageUp", "PageDown": "pageDown", }, "response-body": map[string]string{ "ArrowUp": "scrollUp", "ArrowDown": "scrollDown", "PageUp": "pageUp", "PageDown": "pageDown", }, "help": map[string]string{ "ArrowUp": "scrollUp", "ArrowDown": "scrollDown", "PageUp": "pageUp", "PageDown": "pageDown", }, } var DefaultConfig = Config{ General: GeneralOptions{ Timeout: Duration{ defaultTimeoutDuration, }, FormatJSON: true, Insecure: false, PreserveScrollPosition: true, FollowRedirects: true, StatusLine: "[wuzz {{.Version}}]{{if .Duration}} [Response time: {{.Duration}}]{{end}}", DefaultURLScheme: "https", }, } func LoadConfig(configFile string) (*Config, error) { if _, err := os.Stat(configFile); os.IsNotExist(err) { return nil, errors.New("Config file does not exist.") } else if err != nil { return nil, err } conf := DefaultConfig if _, err := toml.DecodeFile(configFile, &conf); err != nil { return nil, err } if conf.Keys == nil { conf.Keys = DefaultKeys } else { // copy default keys for keyCategory, keys := range DefaultKeys { confKeys, found := conf.Keys[keyCategory] if found { for key, action := range keys { if _, found := confKeys[key]; !found { conf.Keys[keyCategory][key] = action } } } else { conf.Keys[keyCategory] = keys } } } return &conf, nil } func GetDefaultConfigLocation() string { var configFolderLocation string switch runtime.GOOS { case "linux": // Use the XDG_CONFIG_HOME variable if it is set, otherwise // $HOME/.config/wuzz/config.toml xdgConfigHome := os.Getenv("XDG_CONFIG_HOME") if xdgConfigHome != "" { configFolderLocation = xdgConfigHome } else { configFolderLocation, _ = homedir.Expand("~/.config/wuzz/") } default: // On other platforms we just use $HOME/.wuzz configFolderLocation, _ = homedir.Expand("~/.wuzz/") } return filepath.Join(configFolderLocation, "config.toml") } wuzz-0.3.0/docs/000077500000000000000000000000001305763243500134715ustar00rootroot00000000000000wuzz-0.3.0/docs/images/000077500000000000000000000000001305763243500147365ustar00rootroot00000000000000wuzz-0.3.0/docs/images/screencast.gif000066400000000000000000003214341305763243500175660ustar00rootroot00000000000000GIF89aT^UUUUUUUUUUUUU4eUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUU9! NETSCAPE2.0!E,T^ǫ ֩Cٌ܄00͂ W_!R(=HŋXOq|W*UUI>MI7y&tv֮企ÈgTPq}v)Ԣl1Rf KӗvYozkٵsM őܸЙK|}W{v__.^{џ7|nH߃,oϛ傌|ά贕_HW) 6 Q`~H6\lx_)W5Ia,/V|*!XN D";Za!J:):6 K9~FM|i icd G}hddKm@rcx|矀*蠏%&D%F*إbR馜vXQUaj꩗꫰t)j뭞*ꫠK䇻̞5T6+ԲQV"ڬv+>m覫-+k,l' 7G,Wlgw ,$l(,0,4l8<@-DmH'L7PG-TWmXg\w`-dmhlp-tmx|߀.n'7G.Wngw砇.褗n騧ꬷ.n/o'7G/Wogw/o觯/o HL:'H Z̠7z GH(L W0 gH8̡w@ H"HL&:PH*ZX̢.z` H2hL6pH:x̣> IBL"F:򑐌$'IJZ̤&7Nz (GIRL*WV򕰌,gIZ̥.w^ 0IbL2f:Ќ4IjZ̦6nz 8IrL:v~ @JЂMBІ:D'JъZͨF7юz HGJҒ(MJWҖ0LgJӚ8ͩNwӞ@ PJԢHMRԦ:PTJժZXͪVծz` XJֲhMZֶp\J׺xͫ^׾ `KMb:d'KZͬf7z hGKҚMjWֺlgKͭnw pKMr:ЍtKZͮvz xKMz|Kͯ~LN; 'L [g ! E,8CCCEE! E,;CCEE!E,"EE!E,*C!E,*9CCE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"&0ď K`>zׯ`ÊQv6#%ndK<=E44f))qKÈ-y>F ihs֕yGǠJ[*M,A[^?tzvڲsMmt_=vp޿/n{rύCwN}u؛_מ]xtW||ŧGOh-v~K[}Ơ2!t'% 6 'URD!eaPt!hҀV_ ,"eQTT|&Ua9'"T|VMH&%ߌ(;zvH=!8ehRQA)d$0l FDwuDםwzkj衈6(h6裐F:ӘiJj饘fi'.駠**9鑣ꪬ҄*무ֺ ;j뮼k-k$rz6k:+n*牔VScv+>Zᖫzٶ+~n/7;wuzz-0.3.0/formatter/000077500000000000000000000000001305763243500145445ustar00rootroot00000000000000wuzz-0.3.0/formatter/binary.go000066400000000000000000000005271305763243500163630ustar00rootroot00000000000000package formatter import ( "encoding/hex" "fmt" "io" ) type binaryFormatter struct { } func (f *binaryFormatter) Format(writer io.Writer, data []byte) error { fmt.Fprint(writer, hex.Dump(data)) return nil } func (f *binaryFormatter) Title() string { return "[binary]" } func (f *binaryFormatter) Searchable() bool { return false } wuzz-0.3.0/formatter/formatter.go000066400000000000000000000013521305763243500170770ustar00rootroot00000000000000package formatter import ( "io" "mime" "strings" "github.com/asciimoo/wuzz/config" ) type ResponseFormatter interface { Format(writer io.Writer, data []byte) error Title() string Searchable() bool } func New(appConfig *config.Config, contentType string) ResponseFormatter { ctype, _, err := mime.ParseMediaType(contentType) if err == nil && appConfig.General.FormatJSON && (ctype == config.ContentTypes["json"] || strings.HasSuffix(ctype, "+json")) { return &jsonFormatter{} } else if strings.Contains(contentType, "text/html") { return &htmlFormatter{} } else if strings.Index(contentType, "text") == -1 && strings.Index(contentType, "application") == -1 { return &binaryFormatter{} } else { return &textFormatter{} } } wuzz-0.3.0/formatter/formatter_test.go000066400000000000000000000060441305763243500201410ustar00rootroot00000000000000package formatter import ( "bytes" "testing" "github.com/asciimoo/wuzz/config" "github.com/nwidger/jsoncolor" ) func TestFormat(t *testing.T) { var binBuffer bytes.Buffer New(configFixture(true), "octet-stream").Format(&binBuffer, []byte("some binary data")) if binBuffer.String() != "00000000 73 6f 6d 65 20 62 69 6e 61 72 79 20 64 61 74 61 |some binary data|\n" { t.Error("Expected binary to eq " + binBuffer.String()) } var htmlBuffer bytes.Buffer New(configFixture(true), "text/html; charset=utf-8").Format(&htmlBuffer, []byte("unfomatted")) if htmlBuffer.String() != "unfomatted" { t.Error("Expected html to eq " + htmlBuffer.String()) } var jsonEnabledBuffer bytes.Buffer New(configFixture(true), "application/json; charset=utf-8").Format(&jsonEnabledBuffer, []byte("{\"json\": \"some value\"}")) var targetBuffer bytes.Buffer jsoncolor.NewFormatter().Format(&targetBuffer, []byte("{\"json\": \"some value\"}")) target := targetBuffer.String() if jsonEnabledBuffer.String() != target { t.Error("Expected json to eq \n" + jsonEnabledBuffer.String() + "\nbut not\n" + target) } var jsonDisabledBuffer bytes.Buffer New(configFixture(false), "application/json; charset=utf-8").Format(&jsonDisabledBuffer, []byte("{\"json\": \"some value\"}")) if jsonDisabledBuffer.String() != "{\"json\": \"some value\"}" { t.Error("Expected json to eq " + jsonDisabledBuffer.String()) } var textBuffer bytes.Buffer New(configFixture(true), "text/html; charset=utf-8").Format(&textBuffer, []byte("some text")) if textBuffer.String() != "some text" { t.Error("Expected text to eq " + textBuffer.String()) } } func TestTitle(t *testing.T) { //binary title := New(configFixture(true), "octet-stream").Title() if title != "[binary]" { t.Error("for octet-stream content type expected title ", title, "to be [binary]") } //html title = New(configFixture(true), "text/html; charset=utf-8").Title() if title != "[html]" { t.Error("For text/html content type expected title ", title, " to be [html]") } //json title = New(configFixture(true), "application/json; charset=utf-8").Title() if title != "[json]" { t.Error("For text/html content type expected title ", title, " to be [json]") } //text title = New(configFixture(true), "text/plain; charset=utf-8").Title() if title != "[text]" { t.Error("For text/html content type expected title ", title, " to be [text]") } } func TestSearchable(t *testing.T) { if New(configFixture(true), "octet-stream").Searchable() { t.Error("binary file can't be searchable") } if !New(configFixture(true), "text/html").Searchable() { t.Error("text/html should be searchable") } if !New(configFixture(true), "application/json").Searchable() { t.Error("application/json should be searchable") } if !New(configFixture(true), "text/plain").Searchable() { t.Error("text/plain should be searchable") } } func configFixture(jsonEnabled bool) *config.Config { return &config.Config{ General: config.GeneralOptions{ FormatJSON: jsonEnabled, }, } } wuzz-0.3.0/formatter/html.go000066400000000000000000000001751305763243500160420ustar00rootroot00000000000000package formatter type htmlFormatter struct { textFormatter } func (f *htmlFormatter) Title() string { return "[html]" } wuzz-0.3.0/formatter/json.go000066400000000000000000000007731305763243500160530ustar00rootroot00000000000000package formatter import ( "bytes" "errors" "io" "github.com/nwidger/jsoncolor" ) type jsonFormatter struct { textFormatter } func (f *jsonFormatter) Format(writer io.Writer, data []byte) error { jsonFormatter := jsoncolor.NewFormatter() buf := bytes.NewBuffer(make([]byte, 0, len(data))) err := jsonFormatter.Format(buf, data) if err == nil { writer.Write(buf.Bytes()) return nil } return errors.New("json formatter error") } func (f *jsonFormatter) Title() string { return "[json]" } wuzz-0.3.0/formatter/text.go000066400000000000000000000004571305763243500160650ustar00rootroot00000000000000package formatter import ( "io" ) type textFormatter struct { } func (f *textFormatter) Format(writer io.Writer, data []byte) error { _, err := writer.Write(data) return err } func (f *textFormatter) Title() string { return "[text]" } func (f *textFormatter) Searchable() bool { return true } wuzz-0.3.0/keys.go000066400000000000000000000047071305763243500140530ustar00rootroot00000000000000package main import ( "github.com/jroimartin/gocui" ) var KEYS = map[string]gocui.Key{ "F1": gocui.KeyF1, "F2": gocui.KeyF2, "F3": gocui.KeyF3, "F4": gocui.KeyF4, "F5": gocui.KeyF5, "F6": gocui.KeyF6, "F7": gocui.KeyF7, "F8": gocui.KeyF8, "F9": gocui.KeyF9, "F10": gocui.KeyF10, "F11": gocui.KeyF11, "F12": gocui.KeyF12, "Insert": gocui.KeyInsert, "Delete": gocui.KeyDelete, "Home": gocui.KeyHome, "End": gocui.KeyEnd, "PageUp": gocui.KeyPgup, "PageDown": gocui.KeyPgdn, "ArrowUp": gocui.KeyArrowUp, "ArrowDown": gocui.KeyArrowDown, "ArrowLeft": gocui.KeyArrowLeft, "ArrowRight": gocui.KeyArrowRight, "CtrlTilde": gocui.KeyCtrlTilde, "Ctrl2": gocui.KeyCtrl2, "CtrlSpace": gocui.KeyCtrlSpace, "CtrlA": gocui.KeyCtrlA, "CtrlB": gocui.KeyCtrlB, "CtrlC": gocui.KeyCtrlC, "CtrlD": gocui.KeyCtrlD, "CtrlE": gocui.KeyCtrlE, "CtrlF": gocui.KeyCtrlF, "CtrlG": gocui.KeyCtrlG, "Backspace": gocui.KeyBackspace, "CtrlH": gocui.KeyCtrlH, "Tab": gocui.KeyTab, "CtrlI": gocui.KeyCtrlI, "CtrlJ": gocui.KeyCtrlJ, "CtrlK": gocui.KeyCtrlK, "CtrlL": gocui.KeyCtrlL, "Enter": gocui.KeyEnter, "CtrlM": gocui.KeyCtrlM, "CtrlN": gocui.KeyCtrlN, "CtrlO": gocui.KeyCtrlO, "CtrlP": gocui.KeyCtrlP, "CtrlQ": gocui.KeyCtrlQ, "CtrlR": gocui.KeyCtrlR, "CtrlS": gocui.KeyCtrlS, "CtrlT": gocui.KeyCtrlT, "CtrlU": gocui.KeyCtrlU, "CtrlV": gocui.KeyCtrlV, "CtrlW": gocui.KeyCtrlW, "CtrlX": gocui.KeyCtrlX, "CtrlY": gocui.KeyCtrlY, "CtrlZ": gocui.KeyCtrlZ, "Esc": gocui.KeyEsc, "CtrlLsqBracket": gocui.KeyCtrlLsqBracket, "Ctrl3": gocui.KeyCtrl3, "Ctrl4": gocui.KeyCtrl4, "CtrlBackslash": gocui.KeyCtrlBackslash, "Ctrl5": gocui.KeyCtrl5, "CtrlRsqBracket": gocui.KeyCtrlRsqBracket, "Ctrl6": gocui.KeyCtrl6, "Ctrl7": gocui.KeyCtrl7, "CtrlSlash": gocui.KeyCtrlSlash, "CtrlUnderscore": gocui.KeyCtrlUnderscore, "Space": gocui.KeySpace, "Backspace2": gocui.KeyBackspace2, "Ctrl8": gocui.KeyCtrl8, } wuzz-0.3.0/request-headers.go000066400000000000000000000010251305763243500161670ustar00rootroot00000000000000package main var REQUEST_HEADERS = []string{ "Accept", "Accept-Charset", "Accept-Encoding", "Accept-Language", "Accept-Datetime", "Authorization", "Cache-Control", "Connection", "Cookie", "Content-Length", "Content-MD5", "Content-Type", "Date", "Expect", "Forwarded", "From", "Host", "If-Match", "If-Modified-Since", "If-None-Match", "If-Range", "If-Unmodified-Since", "Max-Forwards", "Origin", "Pragma", "Proxy-Authorization", "Range", "Referer", "TE", "User-Agent", "Upgrade", "Via", "Warning", } wuzz-0.3.0/sample-config.toml000066400000000000000000000016211305763243500161620ustar00rootroot00000000000000[general] timeout = "1m" formatJSON = true insecure = false preserveScrollPosition = true followRedirects = true defaultURLScheme = "https" statusLine = "[wuzz {{.Version}}] [Response time: {{.Duration}}]" # KEYBINDINGS [keys.global] CtrlR = "submit" CtrlC = "quit" CtrlS = "save" CtrlD = "deleteLine" CtrlW = "deleteWord" Tab = "nextView" CtrlJ = "nextView" CtrlK = "prevView" AltH = "history" F2 = "focus url" F3 = "focus get" F4 = "focus method" F5 = "focus data" F6 = "focus headers" F7 = "focus search" F8 = "focus response-headers" F9 = "focus response-body" [keys.url] Enter = "submit" [keys.response-headers] ArrowUp = "scrollUp" ArrowDown = "scrollDown" PageUp = "pageUp" PageDown = "pageDown" [keys.response-body] ArrowUp = "scrollUp" ArrowDown = "scrollDown" PageUp = "pageUp" PageDown = "pageDown" [keys.help] ArrowUp = "scrollUp" ArrowDown = "scrollDown" PageUp = "pageUp" PageDown = "pageDown" wuzz-0.3.0/status-line.go000066400000000000000000000020331305763243500153360ustar00rootroot00000000000000package main import ( "fmt" "strconv" "text/template" "github.com/jroimartin/gocui" ) type StatusLine struct { tpl *template.Template } type StatusLineFunctions struct { app *App } func (_ *StatusLineFunctions) Version() string { return VERSION } func (s *StatusLineFunctions) Duration() string { if len(s.app.history) == 0 { return "" } return s.app.history[s.app.historyIndex].Duration.String() } func (s *StatusLineFunctions) HistorySize() string { return strconv.Itoa(len(s.app.history)) } func (s *StatusLineFunctions) RequestNumber() string { i := s.app.historyIndex if len(s.app.history) > 0 { i += 1 } return strconv.Itoa(i) } func (s *StatusLine) Update(v *gocui.View, a *App) { v.Clear() err := s.tpl.Execute(v, &StatusLineFunctions{app: a}) if err != nil { fmt.Fprintf(v, "StatusLine update error: %v", err) } } func NewStatusLine(format string) (*StatusLine, error) { tpl, err := template.New("status line").Parse(format) if err != nil { return nil, err } return &StatusLine{ tpl: tpl, }, nil } wuzz-0.3.0/wuzz.go000066400000000000000000001170041305763243500141120ustar00rootroot00000000000000package main import ( "bytes" "compress/gzip" "crypto/tls" "errors" "fmt" "io" "io/ioutil" "log" "net/http" "net/url" "os" "regexp" "runtime" "sort" "strconv" "strings" "time" "golang.org/x/net/proxy" "github.com/asciimoo/wuzz/config" "github.com/asciimoo/wuzz/formatter" "github.com/jroimartin/gocui" "github.com/mattn/go-runewidth" ) const VERSION = "0.3.0" const TIMEOUT_DURATION = 5 // in seconds const WINDOWS_OS = "windows" const SEARCH_PROMPT = "search> " const ( ALL_VIEWS = "" URL_VIEW = "url" URL_PARAMS_VIEW = "get" REQUEST_METHOD_VIEW = "method" REQUEST_DATA_VIEW = "data" REQUEST_HEADERS_VIEW = "headers" STATUSLINE_VIEW = "status-line" SEARCH_VIEW = "search" RESPONSE_HEADERS_VIEW = "response-headers" RESPONSE_BODY_VIEW = "response-body" SEARCH_PROMPT_VIEW = "prompt" POPUP_VIEW = "popup_view" AUTOCOMPLETE_VIEW = "autocomplete_view" ERROR_VIEW = "error_view" HISTORY_VIEW = "history" SAVE_DIALOG_VIEW = "save-dialog" SAVE_RESULT_VIEW = "save-result" METHOD_LIST_VIEW = "method-list" HELP_VIEW = "help" ) var VIEW_TITLES = map[string]string{ POPUP_VIEW: "Info", ERROR_VIEW: "Error", HISTORY_VIEW: "History", SAVE_DIALOG_VIEW: "Save Response (enter to submit, ctrl+q to cancel)", METHOD_LIST_VIEW: "Methods", HELP_VIEW: "Help", } type position struct { // value = prc * MAX + abs pct float32 abs int } type viewPosition struct { x0, y0, x1, y1 position } var VIEW_POSITIONS = map[string]viewPosition{ URL_VIEW: { position{0.0, 0}, position{0.0, 0}, position{1.0, -2}, position{0.0, 3}}, URL_PARAMS_VIEW: { position{0.0, 0}, position{0.0, 3}, position{0.3, 0}, position{0.25, 0}}, REQUEST_METHOD_VIEW: { position{0.0, 0}, position{0.25, 0}, position{0.3, 0}, position{0.25, 2}}, REQUEST_DATA_VIEW: { position{0.0, 0}, position{0.25, 2}, position{0.3, 0}, position{0.5, 1}}, REQUEST_HEADERS_VIEW: { position{0.0, 0}, position{0.5, 1}, position{0.3, 0}, position{1.0, -3}}, RESPONSE_HEADERS_VIEW: { position{0.3, 0}, position{0.0, 3}, position{1.0, -2}, position{0.25, 2}}, RESPONSE_BODY_VIEW: { position{0.3, 0}, position{0.25, 2}, position{1.0, -2}, position{1.0, -3}}, STATUSLINE_VIEW: { position{0.0, -1}, position{1.0, -4}, position{1.0, 0}, position{1.0, -1}}, SEARCH_VIEW: { position{0.0, 7}, position{1.0, -3}, position{1.0, -1}, position{1.0, -1}}, ERROR_VIEW: { position{0.0, 0}, position{0.0, 0}, position{1.0, -2}, position{1.0, -2}}, SEARCH_PROMPT_VIEW: { position{0.0, -1}, position{1.0, -3}, position{0.0, 8}, position{1.0, -1}}, POPUP_VIEW: { position{0.5, -9999}, // set before usage using len(msg) position{0.5, -1}, position{0.5, -9999}, // set before usage using len(msg) position{0.5, 1}}, AUTOCOMPLETE_VIEW: { position{0, -9999}, position{0, -9999}, position{0, -9999}, position{0, -9999}}, } type viewProperties struct { title string frame bool editable bool wrap bool editor gocui.Editor text string } var VIEW_PROPERTIES = map[string]viewProperties{ URL_VIEW: { title: "URL - press F1 for help", frame: true, editable: true, wrap: false, editor: &singleLineEditor{&defaultEditor}, }, URL_PARAMS_VIEW: { title: "URL params", frame: true, editable: true, wrap: false, editor: &defaultEditor, }, REQUEST_METHOD_VIEW: { title: "Method", frame: true, editable: true, wrap: false, editor: &singleLineEditor{&defaultEditor}, text: DEFAULT_METHOD, }, REQUEST_DATA_VIEW: { title: "Request data (POST/PUT/PATCH)", frame: true, editable: true, wrap: false, editor: &defaultEditor, }, REQUEST_HEADERS_VIEW: { title: "Request headers", frame: true, editable: true, wrap: false, editor: &AutocompleteEditor{&defaultEditor, func(str string) []string { return completeFromSlice(str, REQUEST_HEADERS) }, []string{}, false}, }, RESPONSE_HEADERS_VIEW: { title: "Response headers", frame: true, editable: true, wrap: true, editor: nil, // should be set using a.getViewEditor(g) }, RESPONSE_BODY_VIEW: { title: "Response body", frame: true, editable: true, wrap: true, editor: nil, // should be set using a.getViewEditor(g) }, SEARCH_VIEW: { title: "", frame: false, editable: true, wrap: false, editor: &singleLineEditor{&SearchEditor{&defaultEditor}}, }, STATUSLINE_VIEW: { title: "", frame: false, editable: false, wrap: false, editor: nil, text: "", }, SEARCH_PROMPT_VIEW: { title: "", frame: false, editable: false, wrap: false, editor: nil, text: SEARCH_PROMPT, }, POPUP_VIEW: { title: "Info", frame: true, editable: false, wrap: false, editor: nil, }, AUTOCOMPLETE_VIEW: { title: "", frame: false, editable: false, wrap: false, editor: nil, }, } var METHODS = []string{ http.MethodGet, http.MethodPost, http.MethodPut, http.MethodDelete, http.MethodPatch, http.MethodOptions, http.MethodTrace, http.MethodConnect, http.MethodHead, } const DEFAULT_METHOD = http.MethodGet var CLIENT = &http.Client{ Timeout: time.Duration(TIMEOUT_DURATION * time.Second), } var TRANSPORT = &http.Transport{ Proxy: http.ProxyFromEnvironment, } var VIEWS = []string{ URL_VIEW, URL_PARAMS_VIEW, REQUEST_METHOD_VIEW, REQUEST_DATA_VIEW, REQUEST_HEADERS_VIEW, SEARCH_VIEW, RESPONSE_HEADERS_VIEW, RESPONSE_BODY_VIEW, } var TLS_VERSIONS = map[string]uint16{ "SSL3.0": tls.VersionSSL30, "TLS1.0": tls.VersionTLS10, "TLS1.1": tls.VersionTLS11, "TLS1.2": tls.VersionTLS12, } var defaultEditor ViewEditor const ( MIN_WIDTH = 60 MIN_HEIGHT = 20 ) type Request struct { Url string Method string GetParams string Data string Headers string ResponseHeaders string RawResponseBody []byte ContentType string Duration time.Duration } type App struct { viewIndex int historyIndex int currentPopup string history []*Request config *config.Config statusLine *StatusLine } type ViewEditor struct { app *App g *gocui.Gui backTabEscape bool origEditor gocui.Editor } type AutocompleteEditor struct { wuzzEditor *ViewEditor completions func(string) []string currentCompletions []string isAutocompleting bool } type SearchEditor struct { wuzzEditor *ViewEditor } // The singleLineEditor removes multi lines capabilities type singleLineEditor struct { wuzzEditor gocui.Editor } func init() { TRANSPORT.DisableCompression = true CLIENT.Transport = TRANSPORT } // Editor funcs func (e *ViewEditor) Edit(v *gocui.View, key gocui.Key, ch rune, mod gocui.Modifier) { // handle back-tab (\033[Z) sequence if e.backTabEscape { if ch == 'Z' { e.app.PrevView(e.g, nil) e.backTabEscape = false return } else { e.origEditor.Edit(v, 0, '[', gocui.ModAlt) } } if ch == '[' && mod == gocui.ModAlt { e.backTabEscape = true return } // disable infinite down scroll if key == gocui.KeyArrowDown && mod == gocui.ModNone { _, cY := v.Cursor() _, err := v.Line(cY) if err != nil { return } } e.origEditor.Edit(v, key, ch, mod) } var symbolPattern = regexp.MustCompile("[a-zA-Z0-9-]+$") func getLastSymbol(str string) string { return symbolPattern.FindString(str) } func completeFromSlice(str string, completions []string) []string { completed := []string{} if str == "" || strings.TrimRight(str, " \n") != str { return completed } for _, completion := range completions { if strings.HasPrefix(completion, str) && str != completion { completed = append(completed, completion) } } return completed } func (e *AutocompleteEditor) Edit(v *gocui.View, key gocui.Key, ch rune, mod gocui.Modifier) { if key != gocui.KeyEnter { e.wuzzEditor.Edit(v, key, ch, mod) } cx, cy := v.Cursor() line, err := v.Line(cy) trimmedLine := line[:cx] if err != nil { e.wuzzEditor.Edit(v, key, ch, mod) return } lastSymbol := getLastSymbol(trimmedLine) if key == gocui.KeyEnter && e.isAutocompleting { currentCompletion := e.currentCompletions[0] shouldDelete := true if len(e.currentCompletions) == 1 { shouldDelete = false } if shouldDelete { for range lastSymbol { v.EditDelete(true) } } for _, char := range currentCompletion { v.EditWrite(char) } closeAutocomplete(e.wuzzEditor.g) e.isAutocompleting = false return } else if key == gocui.KeyEnter { e.wuzzEditor.Edit(v, key, ch, mod) } closeAutocomplete(e.wuzzEditor.g) e.isAutocompleting = false completions := e.completions(lastSymbol) e.currentCompletions = completions cx, cy = v.Cursor() sx, _ := v.Size() ox, oy, _, _, _ := e.wuzzEditor.g.ViewPosition(v.Name()) maxWidth := sx - cx maxHeight := 10 if len(completions) > 0 { comps := completions x := ox + cx y := oy + cy if len(comps) == 1 { comps[0] = comps[0][len(lastSymbol):] } else { y += 1 x -= len(lastSymbol) maxWidth += len(lastSymbol) } showAutocomplete(comps, x, y, maxWidth, maxHeight, e.wuzzEditor.g) e.isAutocompleting = true } } func (e *SearchEditor) Edit(v *gocui.View, key gocui.Key, ch rune, mod gocui.Modifier) { e.wuzzEditor.Edit(v, key, ch, mod) e.wuzzEditor.g.Execute(func(g *gocui.Gui) error { e.wuzzEditor.app.PrintBody(g) return nil }) } // The singleLineEditor removes multi lines capabilities func (e singleLineEditor) Edit(v *gocui.View, key gocui.Key, ch rune, mod gocui.Modifier) { switch { case (ch != 0 || key == gocui.KeySpace) && mod == 0: e.wuzzEditor.Edit(v, key, ch, mod) // At the end of the line the default gcui editor adds a whitespace // Force him to remove ox, _ := v.Cursor() if ox > 1 && ox >= len(v.Buffer())-2 { v.EditDelete(false) } return case key == gocui.KeyEnter: return case key == gocui.KeyArrowRight: ox, _ := v.Cursor() if ox >= len(v.Buffer())-1 { return } case key == gocui.KeyHome || key == gocui.KeyArrowUp: v.SetCursor(0, 0) v.SetOrigin(0, 0) return case key == gocui.KeyEnd || key == gocui.KeyArrowDown: width, _ := v.Size() lineWidth := len(v.Buffer()) - 1 if lineWidth > width { v.SetOrigin(lineWidth-width, 0) lineWidth = width - 1 } v.SetCursor(lineWidth, 0) return } e.wuzzEditor.Edit(v, key, ch, mod) } // func (a *App) getResponseViewEditor(g *gocui.Gui) gocui.Editor { return &ViewEditor{a, g, false, gocui.EditorFunc(func(v *gocui.View, key gocui.Key, ch rune, mod gocui.Modifier) { return })} } func (p position) getCoordinate(max int) int { return int(p.pct*float32(max)) + p.abs } func setView(g *gocui.Gui, viewName string) (*gocui.View, error) { maxX, maxY := g.Size() position := VIEW_POSITIONS[viewName] return g.SetView(viewName, position.x0.getCoordinate(maxX+1), position.y0.getCoordinate(maxY+1), position.x1.getCoordinate(maxX+1), position.y1.getCoordinate(maxY+1)) } func setViewProperties(v *gocui.View, name string) { v.Title = VIEW_PROPERTIES[name].title v.Frame = VIEW_PROPERTIES[name].frame v.Editable = VIEW_PROPERTIES[name].editable v.Wrap = VIEW_PROPERTIES[name].wrap v.Editor = VIEW_PROPERTIES[name].editor setViewTextAndCursor(v, VIEW_PROPERTIES[name].text) } func (a *App) Layout(g *gocui.Gui) error { maxX, maxY := g.Size() if maxX < MIN_WIDTH || maxY < MIN_HEIGHT { if v, err := setView(g, ERROR_VIEW); err != nil { if err != gocui.ErrUnknownView { return err } setViewDefaults(v) v.Title = VIEW_TITLES[ERROR_VIEW] g.Cursor = false fmt.Fprintln(v, "Terminal is too small") } return nil } if _, err := g.View(ERROR_VIEW); err == nil { g.DeleteView(ERROR_VIEW) g.Cursor = true a.setView(g) } for _, name := range []string{RESPONSE_HEADERS_VIEW, RESPONSE_BODY_VIEW} { vp := VIEW_PROPERTIES[name] vp.editor = a.getResponseViewEditor(g) VIEW_PROPERTIES[name] = vp } if a.config.General.DefaultURLScheme != "" && !strings.HasSuffix(a.config.General.DefaultURLScheme, "://") { p := VIEW_PROPERTIES[URL_VIEW] p.text = a.config.General.DefaultURLScheme + "://" VIEW_PROPERTIES[URL_VIEW] = p } for _, name := range []string{ URL_VIEW, URL_PARAMS_VIEW, REQUEST_METHOD_VIEW, REQUEST_DATA_VIEW, REQUEST_HEADERS_VIEW, RESPONSE_HEADERS_VIEW, RESPONSE_BODY_VIEW, STATUSLINE_VIEW, SEARCH_PROMPT_VIEW, SEARCH_VIEW, } { if v, err := setView(g, name); err != nil { if err != gocui.ErrUnknownView { return err } setViewProperties(v, name) } } sv, _ := g.View(STATUSLINE_VIEW) sv.BgColor = gocui.ColorDefault | gocui.AttrReverse sv.FgColor = gocui.ColorDefault | gocui.AttrReverse a.statusLine.Update(sv, a) return nil } func (a *App) NextView(g *gocui.Gui, v *gocui.View) error { a.viewIndex = (a.viewIndex + 1) % len(VIEWS) return a.setView(g) } func (a *App) PrevView(g *gocui.Gui, v *gocui.View) error { a.viewIndex = (a.viewIndex - 1 + len(VIEWS)) % len(VIEWS) return a.setView(g) } func (a *App) setView(g *gocui.Gui) error { a.closePopup(g, a.currentPopup) _, err := g.SetCurrentView(VIEWS[a.viewIndex]) return err } func (a *App) setViewByName(g *gocui.Gui, name string) error { for i, v := range VIEWS { if v == name { a.viewIndex = i return a.setView(g) } } return fmt.Errorf("View not found") } func popup(g *gocui.Gui, msg string) { pos := VIEW_POSITIONS[POPUP_VIEW] pos.x0.abs = -len(msg)/2 - 1 pos.x1.abs = len(msg)/2 + 1 VIEW_POSITIONS[POPUP_VIEW] = pos p := VIEW_PROPERTIES[POPUP_VIEW] p.text = msg VIEW_PROPERTIES[POPUP_VIEW] = p if v, err := setView(g, POPUP_VIEW); err != nil { if err != gocui.ErrUnknownView { return } setViewProperties(v, POPUP_VIEW) g.SetViewOnTop(POPUP_VIEW) } } func minInt(x, y int) int { if x < y { return x } return y } func closeAutocomplete(g *gocui.Gui) { g.DeleteView(AUTOCOMPLETE_VIEW) } func showAutocomplete(completions []string, left, top, maxWidth, maxHeight int, g *gocui.Gui) { // Get the width of the widest completion completionsWidth := 0 for _, completion := range completions { thisCompletionWidth := len(completion) if thisCompletionWidth > completionsWidth { completionsWidth = thisCompletionWidth } } // Get the width and height of the autocomplete window width := minInt(completionsWidth, maxWidth) height := minInt(len(completions), maxHeight) newPos := viewPosition{ x0: position{0, left}, y0: position{0, top}, x1: position{0, left + width + 1}, y1: position{0, top + height + 1}, } VIEW_POSITIONS[AUTOCOMPLETE_VIEW] = newPos p := VIEW_PROPERTIES[AUTOCOMPLETE_VIEW] p.text = strings.Join(completions, "\n") VIEW_PROPERTIES[AUTOCOMPLETE_VIEW] = p if v, err := setView(g, AUTOCOMPLETE_VIEW); err != nil { if err != gocui.ErrUnknownView { return } setViewProperties(v, AUTOCOMPLETE_VIEW) v.BgColor = gocui.ColorBlue v.FgColor = gocui.ColorDefault g.SetViewOnTop(AUTOCOMPLETE_VIEW) } } func (a *App) SubmitRequest(g *gocui.Gui, _ *gocui.View) error { vrb, _ := g.View(RESPONSE_BODY_VIEW) vrb.Clear() vrh, _ := g.View(RESPONSE_HEADERS_VIEW) vrh.Clear() popup(g, "Sending request..") var r *Request = &Request{} go func(g *gocui.Gui, a *App, r *Request) error { defer g.DeleteView(POPUP_VIEW) // parse url r.Url = getViewValue(g, URL_VIEW) u, err := url.Parse(r.Url) if err != nil { g.Execute(func(g *gocui.Gui) error { vrb, _ := g.View(RESPONSE_BODY_VIEW) fmt.Fprintf(vrb, "URL parse error: %v", err) return nil }) return nil } q, err := url.ParseQuery(strings.Replace(getViewValue(g, URL_PARAMS_VIEW), "\n", "&", -1)) if err != nil { g.Execute(func(g *gocui.Gui) error { vrb, _ := g.View(RESPONSE_BODY_VIEW) fmt.Fprintf(vrb, "Invalid GET parameters: %v", err) return nil }) return nil } originalQuery := u.Query() for k, v := range q { originalQuery.Add(k, strings.Join(v, "")) } u.RawQuery = originalQuery.Encode() r.GetParams = u.RawQuery // parse method r.Method = getViewValue(g, REQUEST_METHOD_VIEW) // set headers headers := http.Header{} headers.Set("User-Agent", "") r.Headers = getViewValue(g, REQUEST_HEADERS_VIEW) for _, header := range strings.Split(r.Headers, "\n") { if header != "" { header_parts := strings.SplitN(header, ": ", 2) if len(header_parts) != 2 { g.Execute(func(g *gocui.Gui) error { vrb, _ := g.View(RESPONSE_BODY_VIEW) fmt.Fprintf(vrb, "Invalid header: %v", header) return nil }) return nil } headers.Set(header_parts[0], header_parts[1]) } } var body io.Reader // parse POST/PUT/PATCH data if r.Method == http.MethodPost || r.Method == http.MethodPut || r.Method == http.MethodPatch { bodyStr := getViewValue(g, REQUEST_DATA_VIEW) if headers.Get("Content-Type") == "application/x-www-form-urlencoded" { bodyStr = strings.Replace(bodyStr, "\n", "&", -1) } body = bytes.NewBufferString(bodyStr) } // create request req, err := http.NewRequest(r.Method, u.String(), body) if err != nil { g.Execute(func(g *gocui.Gui) error { vrb, _ := g.View(RESPONSE_BODY_VIEW) fmt.Fprintf(vrb, "Request error: %v", err) return nil }) return nil } req.Header = headers // do request start := time.Now() response, err := CLIENT.Do(req) r.Duration = time.Since(start) if err != nil { g.Execute(func(g *gocui.Gui) error { vrb, _ := g.View(RESPONSE_BODY_VIEW) fmt.Fprintf(vrb, "Response error: %v", err) return nil }) return nil } defer response.Body.Close() // extract body r.ContentType = response.Header.Get("Content-Type") if response.Header.Get("Content-Encoding") == "gzip" { reader, err := gzip.NewReader(response.Body) if err == nil { defer reader.Close() response.Body = reader } else { g.Execute(func(g *gocui.Gui) error { vrb, _ := g.View(RESPONSE_BODY_VIEW) fmt.Fprintf(vrb, "Cannot uncompress response: %v", err) return nil }) return nil } } bodyBytes, err := ioutil.ReadAll(response.Body) if err == nil { r.RawResponseBody = bodyBytes } // add to history a.history = append(a.history, r) a.historyIndex = len(a.history) - 1 // render response g.Execute(func(g *gocui.Gui) error { vrh, _ := g.View(RESPONSE_HEADERS_VIEW) a.PrintBody(g) // print status code and sorted headers hkeys := make([]string, 0, len(response.Header)) for hname := range response.Header { hkeys = append(hkeys, hname) } sort.Strings(hkeys) status_color := 32 if response.StatusCode != 200 { status_color = 31 } header_str := fmt.Sprintf( "\x1b[0;%dmHTTP/1.1 %v %v\x1b[0;0m\n", status_color, response.StatusCode, http.StatusText(response.StatusCode), ) for _, hname := range hkeys { header_str += fmt.Sprintf("\x1b[0;33m%v:\x1b[0;0m %v\n", hname, strings.Join(response.Header[hname], ",")) } fmt.Fprint(vrh, header_str) if _, err := vrh.Line(0); err != nil { vrh.SetOrigin(0, 0) } r.ResponseHeaders = header_str return nil }) return nil }(g, a, r) return nil } func (a *App) PrintBody(g *gocui.Gui) { g.Execute(func(g *gocui.Gui) error { if len(a.history) == 0 { return nil } req := a.history[a.historyIndex] if req.RawResponseBody == nil { return nil } vrb, _ := g.View(RESPONSE_BODY_VIEW) vrb.Clear() responseFormatter := formatter.New(a.config, req.ContentType) vrb.Title = VIEW_PROPERTIES[vrb.Name()].title + " " + responseFormatter.Title() search_text := getViewValue(g, "search") if search_text == "" || !responseFormatter.Searchable() { err := responseFormatter.Format(vrb, req.RawResponseBody) if err != nil { return err } if _, err := vrb.Line(0); !a.config.General.PreserveScrollPosition || err != nil { vrb.SetOrigin(0, 0) } return nil } vrb.SetOrigin(0, 0) search_re, err := regexp.Compile(search_text) if err != nil { fmt.Fprint(vrb, "Error: invalid search regexp") return nil } results := search_re.FindAll(req.RawResponseBody, 1000) if len(results) == 0 { vrb.Title = "No results" fmt.Fprint(vrb, "Error: no results") return nil } vrb.Title = fmt.Sprintf("%d results", len(results)) for _, result := range results { fmt.Fprintf(vrb, "-----\n%s\n", result) } return nil }) } func parseKey(k string) (interface{}, gocui.Modifier, error) { mod := gocui.ModNone if strings.Index(k, "Alt") == 0 { mod = gocui.ModAlt k = k[3:] } switch len(k) { case 0: return 0, 0, errors.New("Empty key string") case 1: if mod != gocui.ModNone { k = strings.ToLower(k) } return rune(k[0]), mod, nil } key, found := KEYS[k] if !found { return 0, 0, fmt.Errorf("Unknown key: %v", k) } return key, mod, nil } func (a *App) setKey(g *gocui.Gui, keyStr, commandStr, viewName string) error { if commandStr == "" { return nil } key, mod, err := parseKey(keyStr) if err != nil { return err } commandParts := strings.SplitN(commandStr, " ", 2) command := commandParts[0] var commandArgs string if len(commandParts) == 2 { commandArgs = commandParts[1] } keyFnGen, found := COMMANDS[command] if !found { return fmt.Errorf("Unknown command: %v", command) } keyFn := keyFnGen(commandArgs, a) if err := g.SetKeybinding(viewName, key, mod, keyFn); err != nil { return fmt.Errorf("Failed to set key '%v': %v", keyStr, err) } return nil } func (a *App) printViewKeybindings(v io.Writer, viewName string) { keys, found := a.config.Keys[viewName] if !found { return } mk := make([]string, len(keys)) i := 0 for k := range keys { mk[i] = k i++ } sort.Strings(mk) fmt.Fprintf(v, "\n %v\n", viewName) for _, key := range mk { fmt.Fprintf(v, " %-15v %v\n", key, keys[key]) } } func (a *App) SetKeys(g *gocui.Gui) error { // load config keybindings for viewName, keys := range a.config.Keys { if viewName == "global" { viewName = ALL_VIEWS } for keyStr, commandStr := range keys { if err := a.setKey(g, keyStr, commandStr, viewName); err != nil { return err } } } g.SetKeybinding(ALL_VIEWS, gocui.KeyF1, gocui.ModNone, func(g *gocui.Gui, v *gocui.View) error { if a.currentPopup == HELP_VIEW { a.closePopup(g, HELP_VIEW) return nil } help, err := a.CreatePopupView(HELP_VIEW, 60, 40, g) if err != nil { return err } help.Title = VIEW_TITLES[HELP_VIEW] help.Highlight = false fmt.Fprint(help, "Keybindings:\n") a.printViewKeybindings(help, "global") for _, viewName := range VIEWS { if _, found := a.config.Keys[viewName]; !found { continue } a.printViewKeybindings(help, viewName) } g.SetViewOnTop(HELP_VIEW) g.SetCurrentView(HELP_VIEW) return nil }) g.SetKeybinding(REQUEST_METHOD_VIEW, gocui.KeyEnter, gocui.ModNone, a.ToggleMethodList) cursDown := func(g *gocui.Gui, v *gocui.View) error { cx, cy := v.Cursor() v.SetCursor(cx, cy+1) return nil } cursUp := func(g *gocui.Gui, v *gocui.View) error { cx, cy := v.Cursor() if cy > 0 { cy -= 1 } v.SetCursor(cx, cy) return nil } // history key bindings g.SetKeybinding(HISTORY_VIEW, gocui.KeyArrowDown, gocui.ModNone, cursDown) g.SetKeybinding(HISTORY_VIEW, gocui.KeyArrowUp, gocui.ModNone, cursUp) g.SetKeybinding(HISTORY_VIEW, gocui.KeyEnter, gocui.ModNone, func(g *gocui.Gui, v *gocui.View) error { _, cy := v.Cursor() // TODO error if len(a.history) <= cy { return nil } a.restoreRequest(g, cy) return nil }) // method key bindings g.SetKeybinding(REQUEST_METHOD_VIEW, gocui.KeyArrowDown, gocui.ModNone, func(g *gocui.Gui, v *gocui.View) error { value := strings.TrimSpace(v.Buffer()) for i, val := range METHODS { if val == value && i != len(METHODS)-1 { setViewTextAndCursor(v, METHODS[i+1]) } } return nil }) g.SetKeybinding(REQUEST_METHOD_VIEW, gocui.KeyArrowUp, gocui.ModNone, func(g *gocui.Gui, v *gocui.View) error { value := strings.TrimSpace(v.Buffer()) for i, val := range METHODS { if val == value && i != 0 { setViewTextAndCursor(v, METHODS[i-1]) } } return nil }) g.SetKeybinding(METHOD_LIST_VIEW, gocui.KeyArrowDown, gocui.ModNone, cursDown) g.SetKeybinding(METHOD_LIST_VIEW, gocui.KeyArrowUp, gocui.ModNone, cursUp) g.SetKeybinding(METHOD_LIST_VIEW, gocui.KeyEnter, gocui.ModNone, func(g *gocui.Gui, v *gocui.View) error { _, cy := v.Cursor() v, _ = g.View(REQUEST_METHOD_VIEW) setViewTextAndCursor(v, METHODS[cy]) a.closePopup(g, METHOD_LIST_VIEW) return nil }) g.SetKeybinding(SAVE_DIALOG_VIEW, gocui.KeyEnter, gocui.ModNone, func(g *gocui.Gui, v *gocui.View) error { defer a.closePopup(g, SAVE_DIALOG_VIEW) saveLocation := getViewValue(g, SAVE_DIALOG_VIEW) if len(a.history) == 0 { return nil } req := a.history[a.historyIndex] if req.RawResponseBody == nil { return nil } err := ioutil.WriteFile(saveLocation, req.RawResponseBody, 0644) var saveResult string if err == nil { saveResult = "Response saved successfully." } else { saveResult = "Error saving response: " + err.Error() } popupTitle := "Save Result (press enter to close)" saveResHeight := 1 saveResWidth := len(saveResult) + 1 if len(popupTitle)+2 > saveResWidth { saveResWidth = len(popupTitle) + 2 } maxX, _ := g.Size() if saveResWidth > maxX { saveResHeight = saveResWidth/maxX + 1 saveResWidth = maxX } saveResultPopup, err := a.CreatePopupView(SAVE_RESULT_VIEW, saveResWidth, saveResHeight, g) saveResultPopup.Title = popupTitle setViewTextAndCursor(saveResultPopup, saveResult) g.SetViewOnTop(SAVE_RESULT_VIEW) g.SetCurrentView(SAVE_RESULT_VIEW) return err }) g.SetKeybinding(SAVE_DIALOG_VIEW, gocui.KeyCtrlQ, gocui.ModNone, func(g *gocui.Gui, v *gocui.View) error { a.closePopup(g, SAVE_DIALOG_VIEW) return nil }) g.SetKeybinding(SAVE_RESULT_VIEW, gocui.KeyEnter, gocui.ModNone, func(g *gocui.Gui, v *gocui.View) error { a.closePopup(g, SAVE_RESULT_VIEW) return nil }) return nil } func (a *App) closePopup(g *gocui.Gui, viewname string) { _, err := g.View(viewname) if err == nil { a.currentPopup = "" g.DeleteView(viewname) g.SetCurrentView(VIEWS[a.viewIndex%len(VIEWS)]) g.Cursor = true } } // CreatePopupView create a popup like view func (a *App) CreatePopupView(name string, width, height int, g *gocui.Gui) (v *gocui.View, err error) { // Remove any concurrent popup a.closePopup(g, a.currentPopup) g.Cursor = false maxX, maxY := g.Size() if height > maxY-4 { height = maxY - 4 } if width > maxX-4 { width = maxX - 4 } v, err = g.SetView(name, maxX/2-width/2-1, maxY/2-height/2-1, maxX/2+width/2, maxY/2+height/2+1) if err != nil && err != gocui.ErrUnknownView { return } err = nil v.Wrap = false v.Frame = true v.Highlight = true v.SelFgColor = gocui.ColorYellow v.SelBgColor = gocui.ColorDefault a.currentPopup = name return } func (a *App) ToggleHistory(g *gocui.Gui, _ *gocui.View) (err error) { // Destroy if present if a.currentPopup == HISTORY_VIEW { a.closePopup(g, HISTORY_VIEW) return } history, err := a.CreatePopupView(HISTORY_VIEW, 100, len(a.history), g) if err != nil { return } history.Title = VIEW_TITLES[HISTORY_VIEW] if len(a.history) == 0 { setViewTextAndCursor(history, "[!] No items in history") return } for i, r := range a.history { req_str := fmt.Sprintf("[%02d] %v %v", i, r.Method, r.Url) if r.GetParams != "" { req_str += fmt.Sprintf("?%v", strings.Replace(r.GetParams, "\n", "&", -1)) } if r.Data != "" { req_str += fmt.Sprintf(" %v", strings.Replace(r.Data, "\n", "&", -1)) } if r.Headers != "" { req_str += fmt.Sprintf(" %v", strings.Replace(r.Headers, "\n", ";", -1)) } fmt.Fprintln(history, req_str) } g.SetViewOnTop(HISTORY_VIEW) g.SetCurrentView(HISTORY_VIEW) history.SetCursor(0, a.historyIndex) return } func (a *App) ToggleMethodList(g *gocui.Gui, _ *gocui.View) (err error) { // Destroy if present if a.currentPopup == METHOD_LIST_VIEW { a.closePopup(g, METHOD_LIST_VIEW) return } method, err := a.CreatePopupView(METHOD_LIST_VIEW, 50, len(METHODS), g) if err != nil { return } method.Title = VIEW_TITLES[METHOD_LIST_VIEW] cur := getViewValue(g, REQUEST_METHOD_VIEW) for i, r := range METHODS { fmt.Fprintln(method, r) if cur == r { method.SetCursor(0, i) } } g.SetViewOnTop(METHOD_LIST_VIEW) g.SetCurrentView(METHOD_LIST_VIEW) return } func (a *App) OpenSaveDialog(g *gocui.Gui, _ *gocui.View) (err error) { dialog, err := a.CreatePopupView(SAVE_DIALOG_VIEW, 60, 1, g) if err != nil { return } g.Cursor = true dialog.Title = VIEW_TITLES[SAVE_DIALOG_VIEW] dialog.Editable = true dialog.Wrap = false currentDir, err := os.Getwd() if err != nil { currentDir = "" } currentDir += "/" setViewTextAndCursor(dialog, currentDir) g.SetViewOnTop(SAVE_DIALOG_VIEW) g.SetCurrentView(SAVE_DIALOG_VIEW) dialog.SetCursor(0, len(currentDir)) return } func (a *App) restoreRequest(g *gocui.Gui, idx int) { if idx < 0 || idx >= len(a.history) { return } a.closePopup(g, HISTORY_VIEW) a.historyIndex = idx r := a.history[idx] v, _ := g.View(URL_VIEW) setViewTextAndCursor(v, r.Url) v, _ = g.View(REQUEST_METHOD_VIEW) setViewTextAndCursor(v, r.Method) v, _ = g.View(URL_PARAMS_VIEW) setViewTextAndCursor(v, r.GetParams) v, _ = g.View(REQUEST_DATA_VIEW) setViewTextAndCursor(v, r.Data) v, _ = g.View(REQUEST_HEADERS_VIEW) setViewTextAndCursor(v, r.Headers) v, _ = g.View(RESPONSE_HEADERS_VIEW) setViewTextAndCursor(v, r.ResponseHeaders) a.PrintBody(g) } func (a *App) LoadConfig(configPath string) error { if configPath == "" { // Load config from default path configPath = config.GetDefaultConfigLocation() } // If the config file doesn't exist, load the default config if _, err := os.Stat(configPath); os.IsNotExist(err) { a.config = &config.DefaultConfig a.config.Keys = config.DefaultKeys a.statusLine, _ = NewStatusLine(a.config.General.StatusLine) return nil } conf, err := config.LoadConfig(configPath) if err != nil { a.config = &config.DefaultConfig a.config.Keys = config.DefaultKeys return err } a.config = conf sl, err := NewStatusLine(conf.General.StatusLine) if err != nil { a.config = &config.DefaultConfig a.config.Keys = config.DefaultKeys return err } a.statusLine = sl return nil } func (a *App) ParseArgs(g *gocui.Gui, args []string) error { a.Layout(g) g.SetCurrentView(VIEWS[a.viewIndex]) vheader, err := g.View(REQUEST_HEADERS_VIEW) if err != nil { return errors.New("Too small screen") } vheader.Clear() vget, _ := g.View(URL_PARAMS_VIEW) vget.Clear() content_type := "" set_data := false set_method := false set_binary_data := false arg_index := 1 args_len := len(args) accept_types := make([]string, 0, 8) for arg_index < args_len { arg := args[arg_index] switch arg { case "-H", "--header": if arg_index == args_len-1 { return errors.New("No header value specified") } arg_index += 1 header := args[arg_index] fmt.Fprintf(vheader, "%v\n", header) case "-d", "--data", "--data-binary": if arg_index == args_len-1 { return errors.New("No POST/PUT/PATCH value specified") } arg_index += 1 set_data = true set_binary_data = arg == "--data-binary" data := args[arg_index] if !set_binary_data { data, _ = url.QueryUnescape(data) content_type = "form" } vdata, _ := g.View(REQUEST_DATA_VIEW) setViewTextAndCursor(vdata, data) case "-j", "--json": if arg_index == args_len-1 { return errors.New("No POST/PUT/PATCH value specified") } arg_index += 1 json_str := args[arg_index] content_type = "json" accept_types = append(accept_types, config.ContentTypes["json"]) set_data = true vdata, _ := g.View(REQUEST_DATA_VIEW) setViewTextAndCursor(vdata, json_str) case "-X", "--request": if arg_index == args_len-1 { return errors.New("No HTTP method specified") } arg_index++ set_method = true method := args[arg_index] if content_type == "" && (method == http.MethodPost || method == http.MethodPut || method == http.MethodPatch) { content_type = "form" } vmethod, _ := g.View(REQUEST_METHOD_VIEW) setViewTextAndCursor(vmethod, method) case "-t", "--timeout": if arg_index == args_len-1 { return errors.New("No timeout value specified") } arg_index += 1 timeout, err := strconv.Atoi(args[arg_index]) if err != nil || timeout <= 0 { return errors.New("Invalid timeout value") } a.config.General.Timeout = config.Duration{Duration: time.Duration(timeout) * time.Millisecond} case "--compressed": vh, _ := g.View(REQUEST_HEADERS_VIEW) if !strings.Contains(getViewValue(g, REQUEST_HEADERS_VIEW), "Accept-Encoding") { fmt.Fprintln(vh, "Accept-Encoding: gzip, deflate") } case "-k", "--insecure": a.config.General.Insecure = true case "-R", "--disable-redirects": a.config.General.FollowRedirects = false case "--tlsv1.0": a.config.General.TLSVersionMin = tls.VersionTLS10 a.config.General.TLSVersionMax = tls.VersionTLS10 case "--tlsv1.1": a.config.General.TLSVersionMin = tls.VersionTLS11 a.config.General.TLSVersionMax = tls.VersionTLS11 case "--tlsv1.2": a.config.General.TLSVersionMin = tls.VersionTLS12 a.config.General.TLSVersionMax = tls.VersionTLS12 case "-1", "--tlsv1": a.config.General.TLSVersionMin = tls.VersionTLS10 a.config.General.TLSVersionMax = tls.VersionTLS12 case "-T", "--tls": if arg_index >= args_len-1 { return errors.New("Missing TLS version range: MIN,MAX") } arg_index++ arg := args[arg_index] v := strings.Split(arg, ",") min := v[0] max := min if len(v) > 1 { max = v[1] } minV, minFound := TLS_VERSIONS[min] if !minFound { return errors.New("Minimum TLS version not found: " + min) } maxV, maxFound := TLS_VERSIONS[max] if !maxFound { return errors.New("Maximum TLS version not found: " + max) } a.config.General.TLSVersionMin = minV a.config.General.TLSVersionMax = maxV case "-x", "--proxy": if arg_index == args_len-1 { return errors.New("Missing proxy URL") } arg_index += 1 u, err := url.Parse(args[arg_index]) if err != nil { return fmt.Errorf("Invalid proxy URL: %v", err) } switch u.Scheme { case "", "http", "https": TRANSPORT.Proxy = http.ProxyURL(u) case "socks", "socks5": dialer, err := proxy.SOCKS5("tcp", u.Host, nil, proxy.Direct) if err != nil { return fmt.Errorf("Can't connect to proxy: %v", err) } TRANSPORT.Dial = dialer.Dial default: return errors.New("Unknown proxy protocol") } default: u := args[arg_index] if strings.Index(u, "http://") != 0 && strings.Index(u, "https://") != 0 { u = "http://" + u } parsed_url, err := url.Parse(u) if err != nil || parsed_url.Host == "" { return errors.New("Invalid url") } if parsed_url.Path == "" { parsed_url.Path = "/" } vurl, _ := g.View(URL_VIEW) vurl.Clear() for k, v := range parsed_url.Query() { fmt.Fprintf(vget, "%v=%v\n", k, strings.Join(v, "")) } parsed_url.RawQuery = "" setViewTextAndCursor(vurl, parsed_url.String()) } arg_index += 1 } if set_data && !set_method { vmethod, _ := g.View(REQUEST_METHOD_VIEW) setViewTextAndCursor(vmethod, http.MethodPost) } if !set_binary_data && content_type != "" && !a.hasHeader(g, "Content-Type") { fmt.Fprintf(vheader, "Content-Type: %v\n", config.ContentTypes[content_type]) } if len(accept_types) > 0 && !a.hasHeader(g, "Accept") { fmt.Fprintf(vheader, "Accept: %v\n", strings.Join(accept_types, ",")) } return nil } func (a *App) hasHeader(g *gocui.Gui, h string) bool { for _, header := range strings.Split(getViewValue(g, REQUEST_HEADERS_VIEW), "\n") { if header == "" { continue } header_parts := strings.SplitN(header, ": ", 2) if len(header_parts) != 2 { continue } if header_parts[0] == h { return true } } return false } // Apply startup config values. This is run after a.ParseArgs, so that // args can override the provided config values func (a *App) InitConfig() { CLIENT.Timeout = a.config.General.Timeout.Duration TRANSPORT.TLSClientConfig = &tls.Config{ InsecureSkipVerify: a.config.General.Insecure, MinVersion: a.config.General.TLSVersionMin, MaxVersion: a.config.General.TLSVersionMax, } if !a.config.General.FollowRedirects { CLIENT.CheckRedirect = func(_ *http.Request, _ []*http.Request) error { return http.ErrUseLastResponse } } } func initApp(a *App, g *gocui.Gui) { g.Cursor = true g.InputEsc = false g.BgColor = gocui.ColorDefault g.FgColor = gocui.ColorDefault g.SetManagerFunc(a.Layout) } func getViewValue(g *gocui.Gui, name string) string { v, err := g.View(name) if err != nil { return "" } return strings.TrimSpace(v.Buffer()) } func setViewDefaults(v *gocui.View) { v.Frame = true v.Wrap = false } func setViewTextAndCursor(v *gocui.View, s string) { v.Clear() fmt.Fprint(v, s) v.SetCursor(len(s), 0) } func help() { fmt.Println(`wuzz - Interactive cli tool for HTTP inspection Usage: wuzz [-H|--header HEADER]... [-d|--data|--data-binary DATA] [-X|--request METHOD] [-t|--timeout MSECS] [URL] Other command line options: -c, --config PATH Specify custom configuration file -h, --help Show this -j, --json JSON Add JSON request data and set related request headers -k, --insecure Allow insecure SSL certs -R, --disable-redirects Do not follow HTTP redirects -T, --tls MIN,MAX Restrict allowed TLS versions (values: SSL3.0,TLS1.0,TLS1.1,TLS1.2) Examples: wuzz -T TLS1.1 (TLS1.1 only) wuzz -T TLS1.0,TLS1.1 (from TLS1.0 up to TLS1.1) --tlsv1.0 Forces TLS1.0 only --tlsv1.1 Forces TLS1.1 only --tlsv1.2 Forces TLS1.2 only -1, --tlsv1 Forces TLS version 1.x (1.0, 1.1 or 1.2) -v, --version Display version number -x, --proxy URL Set HTTP(S) or SOCKS5 proxy Key bindings: ctrl+r Send request ctrl+s Save response tab, ctrl+j Next window shift+tab, ctrl+k Previous window alt+h Show history pageUp Scroll up the current window pageDown Scroll down the current window`, ) } func main() { configPath := "" args := os.Args for i, arg := range os.Args { switch arg { case "-h", "--help": help() return case "-v", "--version": fmt.Printf("wuzz %v\n", VERSION) return case "-c", "--config": configPath = os.Args[i+1] args = append(os.Args[:i], os.Args[i+2:]...) if _, err := os.Stat(configPath); os.IsNotExist(err) { log.Fatal("Config file specified but does not exist: \"" + configPath + "\"") } } } g, err := gocui.NewGui(gocui.Output256) if err != nil { log.Panicln(err) } if runtime.GOOS == WINDOWS_OS && runewidth.IsEastAsian() { g.ASCII = true } app := &App{history: make([]*Request, 0, 31)} // overwrite default editor defaultEditor = ViewEditor{app, g, false, gocui.DefaultEditor} initApp(app, g) // load config (must be done *before* app.ParseArgs, as arguments // should be able to override config values). An empty string passed // to LoadConfig results in LoadConfig loading the default config // location. If there is no config, the values in // config.DefaultConfig will be used. err = app.LoadConfig(configPath) if err != nil { g.Close() log.Fatalf("Error loading config file: %v", err) } err = app.ParseArgs(g, args) // Some of the values in the config need to have some startup // behavior associated with them. This is run after ParseArgs so // that command-line arguments can override configuration values. app.InitConfig() if err != nil { g.Close() fmt.Println("Error!", err) os.Exit(1) } err = app.SetKeys(g) if err != nil { g.Close() fmt.Println("Error!", err) os.Exit(1) } defer g.Close() if err := g.MainLoop(); err != nil && err != gocui.ErrQuit { log.Panicln(err) } }