Coder Social home page Coder Social logo

wuzz's Introduction

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

wuzz's People

Contributors

alok46 avatar antham avatar asciimoo avatar benaiah avatar colinta avatar cyberj avatar dolmen avatar dsalahutdinov avatar eraden avatar geodimm avatar gururajrkatti avatar idevoid avatar jroimartin avatar mattn avatar mihaitodor avatar mrsaints avatar nwidger avatar potato avatar pouulet avatar pradeepchhetri avatar pvmsikrsna avatar pwolowiec avatar teddykis avatar udhos avatar yardenshoham avatar zbb93 avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

wuzz's Issues

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.

Assume http by default

Just a feature request...perhaps just typing in "wuzz www.bleh.com" should assume http and work instead of having to include the http://. Just a thought, thank you.

vim keybindings - better navigation

This is awesome! I hate to be "that guy" but vim keybindings would be nice 🤓. Vim's <ctrl-w> window commands for navigating windows would be especially convenient for quickly jumping around.

reference to undefined identifier ‘json.Delim’

Hello!

I try to install the package using go
get github.com/asciimoo/wuzz
but get an error
gocode/src/github.com/nwidger/jsoncolor/jsoncolor.go:197:19: error: reference to undefined identifier ‘json.Delim’ printObject func(json.Delim)

How can I fix it?

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)

panic: invalid dimensions

Because of this check in gocui:

https://github.com/jroimartin/gocui/blob/6b3dc12c322589c2ecbeea58acc792d22f853455/gui.go#L128

if x0 >= x1 || y0 >= y1 {
	return nil, errors.New("invalid dimensions")
}

and because the main loop panics on error without attempting to restore the session:

https://github.com/asciimoo/wuzz/blob/master/wuzz.go#L681

if err := g.MainLoop(); err != nil && err != gocui.ErrQuit {
	log.Panicln(err)
}

Resizing the terminal window too small on at least macOS causes a panic.

Terminal:
screen shot 2017-02-04 at 10 10 23 pm

Hyper:
screen shot 2017-02-04 at 10 12 24 pm

I can reproduce this in the default terminal emulator, Terminal, and in Hyper, which is what I use primarily.

How to paste in "Copy as Curl" command?

I'm sure I'm missing something super obvious, but how do I paste in the "Copy as Curl" command I get from the network inspector?

I tried pasting it in, but it fails... and I tried starting wuzz and passing it as a command line arg, but that didnt' work either....

Japanese support

Hi!

This tool is awesome!
I'm using it right away.

By the way, do you support Japanese?

Example:
I entered "あいうえお"(aiueo).

2017-02-10 15 57 26

Export as curl command

Love this, great work!

Would be awesome to have a command to 'export as curl command', so that after finding the right request it could be easily copied to a shell script, for example.

Even more awesome, if this were sort of 'adapter' based, there could be (perhaps as contributed plugins) other export formats, such as for Python's requests library, etc.

Ability to use proxy

It would be really useful to be able to provide a use http(s) proxy option, along the lines of -x in cURL.

Thanks for this utility!

Support for END and HOME key

It would be nice to travel through URL using shortcuts.

Go to start:

  • HOME
  • CTRL + LEFT

Go to end:

  • END
  • CTRL + RIGHT

What format for Post data

I have tried POSTing some data, however the server gets blank data. What is the expected format for POST, and PUT data?
title="My Good Book" and similar combinations don't work

Perhaps a line in the README would help out.
Thanks!

Can scroll way past the end of content

Hey there, first of all, great software ! I just love it !
There's one odd thing though, I can keep scrolling using Down and Page Down way past the end of the content (headers, actual content, etc…). It's not critical and it's not even bothering, just a little weird :)

Thanks again for the great software !

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.

F* keys can be tricky to use, so they should be customizable

Many modern keyboards do not offer easy access to F* keys (they more tend to be multimedia ones by default) and pressing Fn+F3 is not very convenient in such case.

I believe, those keybindings are hardcoded now, but in future it's best to have them use-customizable as well.

POST data broken?

Awesome tool! I have a question. The following request returns HTTP status code 415:
wuzz -X POST -d "name=request-size-limiting" http://localhost:8001/apis/mockbin/plugins/

Whereas the following curl command works as expected against the same API:
curl -X POST --url http://localhost:8001/apis/mockbin/plugins/ --data "name=request-size-limiting"

I've tried various permutations of the POST data without success. Is there any way to see the actual request that wuzz is making (I am curious to inspect the format of POST data)? I've tried building this request in wuzz UI with the same 415 response.

Again, this tool is awesome. Thank you for building wuzz!

Add to package managers

Can you add this to package managers such as Homebrew, Debian repos, etc? This is a great tool! :)

Homebrew installation?

Hi,

Are there any plans to make this available under Homebrew? If not, do you mind if I take a stab at it?

Thanks,

-- Doug

[Windows] Vertical resize only expanding view

The view is not resized to a smaller size if I am descreasing the vertical axis of the terminal. Tested on windows 10 Powershell, cmd, GitCMD. Well, powershell is special because here only the enlarenment is working...

Improve infos about requests

I'd like have more infos about the requests actually sent.

If I have the URL "http://google.com" I'd like to see the actual request sent (with the "/" as path).
If there is a redirect I'd like to see the actual redirects with all the data going back and forth.

When submiting new url the response cursot not going to top

  1. I am requesting a page
  2. I go to the response (F9), and scroll all the way down. (200 lines)
  3. I am requesting a new page that is very short (3 lines)
  4. BUG: I don't see nothing in the response window.

Why? Because I need to go to response, and go all the way up.

If it was someone else, he will not know that he should scroll up. He just see a blank response.

Suggest for fixing: Do that, if your request a new different URL, scroll all the windows to the top.

If something isn't clear, I will be happy to give more information / screencast

panic: runtime error: invalid memory address or nil pointer dereference

on mac mini

panic: runtime error: invalid memory address or nil pointer dereference
[signal SIGSEGV: segmentation violation code=0x1 addr=0x0 pc=0x12e9b1a]

goroutine 1 [running]:
main.(*StatusLine).Update(0x0, 0xc42011a690, 0xc420016460)
	/Users/akc/go/src/github.com/asciimoo/wuzz/status-line.go:31 +0x6a
main.(*App).Layout(0xc420016460, 0xc4200f2090, 0xc4200d68e0, 0xc420049aa0)
	/Users/akc/go/src/github.com/asciimoo/wuzz/wuzz.go:589 +0x3c9
main.(*App).ParseArgs(0xc420016460, 0xc4200f2090, 0xc420010220, 0x1, 0x1, 0x1f, 0x0)
	/Users/akc/go/src/github.com/asciimoo/wuzz/wuzz.go:1301 +0x50
main.main()
	/Users/akc/go/src/github.com/asciimoo/wuzz/wuzz.go:1616 +0x94f
ak:~ akc$

I love this.

I love this.
I write this because your software has saved my life. At work I was asked for a lightweight software to do this, and I would have had to program it myself if I did not find this.

Thank you

shift+tab for previous window?

The current commands for moving around windows are :

tab, ctrl+j Next window
ctrl+k Previous window

It could be nice to also have shift+tab for moving to the previous window.

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

[feature request] Cookie Support

most web apps require you to be logged in, and most of them use cookies to manage that.

I need the ability to set and modify cookies in order to use this for most anything that I'd need to use a tool like this for.

unable access

when I entered the command: go get github.com/asciimoo/wuzz, It occured the below error:
fatal: unable to access 'https://github.com/asciimoo/wuzz/': Received HTTP code 302 from proxy after CONNECT
package github.com/asciimoo/wuzz: exit status 128.
Could anyone give me some advice?
Thank you!

panic: invalid arguments

I am getting the below error when trying to run wuzz with no arguments. I am using ubuntu bash on windows to run this.

2017/03/12 21:15:06 invalid argument
panic: invalid argument


goroutine 1 [running]:
panic(0x6fed00, 0xc42000d3e0)
        /usr/local/go/src/runtime/panic.go:500 +0x1a1
log.Panicln(0xc420051e60, 0x1, 0x1)
        /usr/local/go/src/log/log.go:334 +0xc9
main.main()
        /home/achernyak/go/src/github.com/asciimoo/wuzz/wuzz.go:1594 +0xf8c

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!

v.Editor undefined

$ go get github.com/asciimoo/wuzz
# github.com/asciimoo/wuzz
../code/src/github.com/asciimoo/wuzz/wuzz.go:202: v.Editor undefined (type *gocui.View has no field or method Editor)
../code/src/github.com/asciimoo/wuzz/wuzz.go:213: v.Editor undefined (type *gocui.View has no field or method Editor)
../code/src/github.com/asciimoo/wuzz/wuzz.go:231: v.Editor undefined (type *gocui.View has no field or method Editor)
../code/src/github.com/asciimoo/wuzz/wuzz.go:249: assignment count mismatch: 2 = 1
../code/src/github.com/asciimoo/wuzz/wuzz.go:469: g.SetManagerFunc undefined (type *gocui.Gui has no field or method SetManagerFunc)
../code/src/github.com/asciimoo/wuzz/wuzz.go:843: g.InputEsc undefined (type *gocui.Gui has no field or method InputEsc)
../code/src/github.com/asciimoo/wuzz/wuzz.go:913: undefined: gocui.Output256
../code/src/github.com/asciimoo/wuzz/wuzz.go:913: too many arguments in call to gocui.NewGui
../code/src/github.com/asciimoo/wuzz/wuzz.go:913: assignment count mismatch: 2 = 1
$ go version
go version go1.7.5 linux/amd64

[Feature request] --json flag

I would be really helpful to init wuzz with a --json / -j flag and automatically set the Content-Type and Accept headers set to application/json.

Example:

$ "$GOPATH/bin/wuzz" --json

Related to #9 (comment)

Add ability to not automatically follow redirects

Awesome tool. Currently it automatically follows things like HTTP 301/302/303, which makes it difficult to debug services that do redirects. A way to turn off following redirects would be very nice to have.

Wuzz compile error

./wuzz.go:1605: undefined: http.ErrUseLastResponse (golang version 1.6.2)

Seems that a there is a minimal requirement for golang, maybe this could be added to the README ?

Another shortcut for "Show history"

Many people use tmux and map ctrl+h/j/k/l to move between terminal panes (even seamlessly with vim splits), would it be possible to add another shortcut for "Show history"? Maybe ctrl+e?

What about adding the mod-key (meta/alt/win-key) support as-well as ctrl?

Why AGPL?

Are you planning on commercializing this tool? Otherwise I'm unclear as to why AGPL was selected -- this would bar me from using it at work.

Wuzz can't handle responses other than JSON?

Trying it against an API that returns XML, no results are displayed, only the headers. It seems like at a minimum it would be friendly to show an error/warning that wuzz can't parse the body of the response... and maybe indicate in the readme what it can handle?

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.