Interactive cli tool for HTTP inspection

Overview

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

Installation and usage

$ go get github.com/asciimoo/wuzz
$ "$GOPATH/bin/wuzz" --help

Note: golang >= 1.10 required.

Binary releases are also available.

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 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+E Save request
Ctrl+F Load request
Ctrl+C Quit
Ctrl+K, Shift+Tab Previous view
Ctlr+J, Tab Next view
Ctlr+T Toggle context specific search
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
F11 Redirects Restriction Mode

Context specific search

Wuzz accepts regular expressions by default to filter response body. Custom query syntax can be toggled by pressing Ctrl+T. The following formats have context specific search syntax:

Response format Query syntax
HTML https://github.com/PuerkitoBio/goquery
JSON https://github.com/tidwall/gjson

TODO

  • Better navigation
  • Autocompletion
  • Tests

Bugs / Suggestions

Bugs or suggestions? Visit the issue tracker or join #wuzz on freenode

Comments
  • JSON API content type

    JSON API content type

    Hi,

    I am using Wuzz to test my JSON API endpoint. The problem is Wuzz doesn't format the response body. From the code I see that Wuzz only format if the config is true and Content-Type is application/json while JSON API require the server endpoint return the Content-Type as application/vnd.api+json.

    Do you have suggestion to solved this?

    You've done a great work with Wuzz.

    Thank you.

    opened by williamn 20
  • Query json response using gjson

    Query json response using gjson

    the query syntax is using https://github.com/tidwall/gjson

    If there is a need, we can create a new query syntax but that is not necessary at this moment.

    I also took out the search code into search.go, I hope that is okay. This way, we can put all the searching code in one place.

    Issue https://github.com/asciimoo/wuzz/issues/40

    opened by ZwodahS 17
  • Add config file

    Add config file

    I think we're reaching the point where wuzz could use a config file. For syntax, I suggest TOML, which I've used before and is quite easy to integrate into Go.

    There are a couple things that need to be decided on for the config file:

    • Config sections and keys
    • Available settings
    • Default config location
    • Command-line flag to specify a different config location
    enhancement 
    opened by Benaiah 11
  • go install fialed

    go install fialed

    codecat@codecat-HP:~/mycode/go/src/github.com/asciimoo/wuzz$ go install
    # github.com/nwidger/jsoncolor
    ../../nwidger/jsoncolor/jsoncolor.go:225: enc.SetEscapeHTML undefined (type *json.Encoder has no field or method SetEscapeHTML)
    
    opened by akkuman 8
  • Add Dockerfile

    Add Dockerfile

    I thought this was a really neat tool, but I don't currently have go set up on my computer, so I set it up to run in docker and published an image here: https://hub.docker.com/r/nevon/wuzz/

    I would much rather have that be automatically built whenever there's a push to master in here, though, so I thought I'd do a PR and see if you were interested. If you are, all you have to do in order to have an automated build is to go to docker hub, click the "automated build" thing, choose this repo and you should be good to go. By default it will build and tag with latest for master, and tag with branch-name for branch pushes.

    It's nothing special, really, the only weird thing is that I had to sleep for a tiny duration before running wuzz, because otherwise I would get an error from gocui. I think it has something to do with docker run -it running the command before actually attaching.

    opened by Nevon 8
  • Use jsoncolor package to colorize JSON bodies

    Use jsoncolor package to colorize JSON bodies

    This PR uses the jsoncolor package to colorize JSON bodies. It changes the imports to use my forked version of github.com/jroimartin/gocui which includes a small patch to support zero-parameter CSI escape sequences. I have submitted a PR upstream:

    https://github.com/jroimartin/gocui/pull/98

    Once that PR is merged the import can be switched back to github.com/jroimartin/gocui if desired.

    opened by nwidger 7
  • Save requests

    Save requests

    Hi,

    First of all, thank you for the utility. It is just great!

    I wanted to propose a feature (which will let me forget about CocoaRest app) of saving requests (with its parameters.

    Usually, how I use the utility, I have some small number of requests that have to work on my API. I test my API (same endpoints) with the utility until they work.

    It would be much easier for me if I could save the requests.

    Thank you!

    enhancement 
    opened by dbogatov 5
  • Add configuration system

    Add configuration system

    The new configuration system, using TOML, loads into app.config using a TOML config file. This can be specified on the command-line with the -c option, or it can be at one of the following default locations:

    • Linux: $XDG_CONFIG_HOME/wuzz/config.toml (by default this is ~/.config/wuzz/config.toml)
    • Other OSs: ~/.wuzz/config.toml

    Currently the following keys can be set, along with their default values:

    [general]
    
    timeout = "1m" # string parsed into time.Duration
    formatJSON = true # toggles JSON formatting
    preserveScrollPosition = true # currently unused
    defaultURLScheme = "https" # when a URL is not provided, this is the scheme used by default
    

    In addition, a [keys] section can also be set and will be successfully parsed, but it is currently non-functional.

    enhancement 
    opened by Benaiah 5
  • Disable multiline on url and method views

    Disable multiline on url and method views

    • Disable multiline on url, method & search views by creating a singlelineEditor
    • Add HOME END shortcuts to theses views to jump at beginning and end of line according to #27
    • Arrow up & down on url and search view jumps at beginning and end of line
    • Arrow up & down on method view change the method in the same order of the method-list popup
    opened by cyberj 5
  • This project requires termbox-go.

    This project requires termbox-go.

    If you have not previously installed termbox-go you will get an error when you attempt to install the project.

    $ go get github.com/asciimoo/wuzz
    # github.com/jroimartin/gocui
    ../../.gocode/src/github.com/jroimartin/gocui/keybinding.go:74: undefined: termbox.MouseRelease
    

    Informing the user they need termbox-go would be helpful so I have included it in the readme.

    bug 
    opened by IWriteThings 5
  • long headers get messed up

    long headers get messed up

    First off, thanks for a great tool for exploring web apis.

    I was using it to access Github's API and went to put in the auth header (eg Authorization: Basic dGVzdHVzZXI6bm9wYXNzbm9wYXNzbm9wYXNzbm9wYXNzbm9wYXNzbm9wYXNzbm9wYXNzbm9wYXNz), the display shows some characters on the next line:

    ndj homenet org - putty 2017-02-06 17 43 51

    If I adjust the characters to be on the line above, like this, it works:

    ndj homenet org - putty 2017-02-06 17 45 28

    Thanks again.

    bug 
    opened by justone 5
  • fix(sec): upgrade github.com/tidwall/gjson to 1.9.3

    fix(sec): upgrade github.com/tidwall/gjson to 1.9.3

    What happened?

    There are 1 security vulnerabilities found in github.com/tidwall/gjson v1.6.0

    What did I do?

    Upgrade github.com/tidwall/gjson from v1.6.0 to 1.9.3 for vulnerability fix

    What did you expect to happen?

    Ideally, no insecure libs should be used.

    The specification of the pull request

    PR Specification from OSCS

    opened by chncaption 0
  • Please add cursor support for editing

    Please add cursor support for editing

    When i try and edit something in the request fields using my cursor all i get is A, B, C, D. This makes using wuzz really frustrating when I'm editing requests and trying different things. The same goes for the copy and paste issue.

    Try using wuzz to play around with something like https://overthewire.org/wargames/natas/ and you'll see what i mean.

    opened by tc-mgriff 0
  • Cannot build wuzz with go 1.18

    Cannot build wuzz with go 1.18

    I cannot build wuzz with go 1.18:

    $ go version
    go version go1.18 darwin/amd64
    
    $ sw_vers
    ProductName:	macOS
    ProductVersion:	12.3
    BuildVersion:	21E230
    
    $ go install github.com/asciimoo/wuzz@latest
    # golang.org/x/sys/unix
    go/pkg/mod/golang.org/x/[email protected]/unix/syscall_darwin.1_13.go:29:3: //go:linkname must refer to declared function or variable
    go/pkg/mod/golang.org/x/[email protected]/unix/zsyscall_darwin_amd64.1_13.go:27:3: //go:linkname must refer to declared function or variable
    go/pkg/mod/golang.org/x/[email protected]/unix/zsyscall_darwin_amd64.1_13.go:40:3: //go:linkname must refer to declared function or variable
    go/pkg/mod/golang.org/x/[email protected]/unix/zsyscall_darwin_amd64.go:28:3: //go:linkname must refer to declared function or variable
    go/pkg/mod/golang.org/x/[email protected]/unix/zsyscall_darwin_amd64.go:43:3: //go:linkname must refer to declared function or variable
    go/pkg/mod/golang.org/x/[email protected]/unix/zsyscall_darwin_amd64.go:59:3: //go:linkname must refer to declared function or variable
    go/pkg/mod/golang.org/x/[email protected]/unix/zsyscall_darwin_amd64.go:75:3: //go:linkname must refer to declared function or variable
    go/pkg/mod/golang.org/x/[email protected]/unix/zsyscall_darwin_amd64.go:90:3: //go:linkname must refer to declared function or variable
    go/pkg/mod/golang.org/x/[email protected]/unix/zsyscall_darwin_amd64.go:105:3: //go:linkname must refer to declared function or variable
    go/pkg/mod/golang.org/x/[email protected]/unix/zsyscall_darwin_amd64.go:121:3: //go:linkname must refer to declared function or variable
    go/pkg/mod/golang.org/x/[email protected]/unix/zsyscall_darwin_amd64.go:121:3: too many errors
    
    opened by mikemadden42 1
  • HTTP trace logging

    HTTP trace logging

    Go net/http request can be traced using net/http/httptrace.

    This extension enables tracing, capturing of relevant events in a ring buffer and introduces a new view, displaying the buffers contents.

    Sometimes it would be quite useful to not only see the request result headers and body, but also connection handling information.

    Especially with HTTPS connections any packet tracer is not sufficient, so gathering tracing information from within HTTP client library seems to be the best option.

    opened by pitpalme 0
Releases(v0.5.0)
Owner
Adam Tauber
Adam Tauber
This tool is a CLI-interactive tool for TA who use eeclass platform

NTHU eeclass TA helper. This tool is a CLI-interactive tool for TA who use eeclass platform. It helps TA to download all the submitted homework, and use CSV to record the score and comment, and upload CSV score directly to the eeclass platform with just 2 Enter key!

Bo-Wei Chen 1 Dec 11, 2021
Abacus is a simple interactive calculator CLI

Abacus is a simple interactive calculator CLI with support for variables, comparison checks, and math functions abacus -

Viktor Danov 33 Sep 15, 2022
Build an interactive CLI application with Go, Cobra and promptui. Video tutorial available on the Div Rhino YouTube channel.

Build an interactive CLI app with Go, Cobra and promptui Text tutorial: https://divrhino.com/articles/build-interactive-cli-app-with-go-cobra-promptui

Div Rhino Dev 16 Dec 8, 2022
Interactive CLI helper for creating git branches with JIRA Links and some text

bb (better-branch) Interactive CLI helper for creating git branches with JIRA Links and some text Still in development? Yes How it works? This tiny ut

Eugene Uvarov 3 Aug 18, 2022
🧨 Interactive Process Killer CLI made with Go!

proc-manager is an interactive CLI to kill processes made with Go, currently supports Linux, Mac OS X, Solaris, and Windows.

Aykut 24 Dec 2, 2022
Generate an interactive, autocompleting shell for any Cobra CLI

cobra-shell Description Leverages the Cobra completion API to generate an interactive shell for any Cobra CLI, powered by go-prompt. On-the-fly autoco

Brian Strauch 30 Dec 19, 2022
A simple CLI based rock-paper-scissors game created in GO with interactive shell prompt.

rock-paper-scissors A simple CLI (Command Line Interface) based rock-paper-scissors game with interactive shell prompt. Language Download Grab a binar

Saif Shahriar 0 Oct 9, 2022
Simplistic interactive filtering tool

peco Simplistic interactive filtering tool NOTE: If you are viewing this on GitHub, this document refers to the state of peco in whatever current bran

null 7.2k Dec 30, 2022
An interactive command-line tool to manage your environments

goto An interactive command-line tool to manage your environments Overview You always need to login to some Linux machine or connect to a MySQL instan

Lucien 10 Jul 11, 2022
Nebula Diagnosis CLI Tool is an information diagnosis cli tool for the nebula service and the node to which the service belongs.

Nebula Diagnosis CLI Tool is an information diagnosis cli tool for the nebula service and the node to which the service belongs.

Katz 1 Jan 12, 2022
🔥 [WIP] Interactive Jira Command Line

JiraCLI Interactive Jira CLI ?? This project is still a work in progress ?? This tool mostly focuses on issue search and navigation at the moment. How

Ankit Pokhrel 2.3k Jan 4, 2023
Building powerful interactive prompts in Go, inspired by python-prompt-toolkit.

go-prompt A library for building powerful interactive prompts inspired by python-prompt-toolkit, making it easier to build cross-platform command line

Masashi Shibata 4.7k Jan 3, 2023
Terminal UI library with rich, interactive widgets — written in Golang

Rich Interactive Widgets for Terminal UIs This Go package provides commonly needed components for terminal based user interfaces. Among these componen

rivo 7.8k Jan 7, 2023
A golang library for building interactive prompts with full support for windows and posix terminals.

Survey A library for building interactive prompts on terminals supporting ANSI escape sequences. package main import ( "fmt" "github.com/Alec

Alec Aivazis 3.5k Jan 6, 2023
Interactive prompt for command-line applications

promptui Interactive prompt for command-line applications. We built Promptui because we wanted to make it easy and fun to explore cloud services with

Manifold 5.3k Jan 8, 2023
Interactive prompt to set and push a semver tag

cutver For when you know what version to tag, and you want to cut a release in the annotated tag format. Installation go install github.com/roryq/cutv

Rory Quinn 8 Nov 15, 2022
The missing git branch --interactive

git branch-i I got cross that there's no git branch --interactive, so I made this. It's a very (very) simple curses-mode git branch/git checkout alter

Joel Auterson 4 Nov 2, 2022
An interactive shell for go application

goshell An interactive shell for go application in normal mode ctrl-c break exec

null 1 Dec 15, 2022
This CLI tool sends HTTP GET requests and print MD5 hash values of the response's body

HTTP Body Hash Generator This CLI (Command Line Interface) tool sends HTTP GET requests and print MD5 hash values of the response's body. Usage You ne

Uğur Kınık 0 Feb 10, 2022