Skip to content
Permalink

Comparing changes

Choose two branches to see what’s changed or to start a new pull request. If you need to, you can also or learn more about diff comparisons.

Open a pull request

Create a new pull request by comparing changes across two branches. If you need to, you can also . Learn more about diff comparisons here.
base repository: asciimoo/wuzz
Failed to load repositories. Confirm that selected base ref is valid, then try again.
Loading
base: v0.1.0
Choose a base ref
...
head repository: asciimoo/wuzz
Failed to load repositories. Confirm that selected head ref is valid, then try again.
Loading
compare: master
Choose a head ref
Loading
Showing with 2,451 additions and 398 deletions.
  1. +8 −0 .dockerignore
  2. +8 −2 .travis.yml
  3. +45 −0 CHANGELOG.md
  4. +25 −0 Dockerfile
  5. +37 −7 README.md
  6. +1 −0 _config.yml
  7. +273 −0 commands.go
  8. +175 −0 config/config.go
  9. +9 −0 docker-entrypoint.sh
  10. BIN docs/images/screencast.gif
  11. +28 −0 formatter/binary.go
  12. +29 −0 formatter/formatter.go
  13. +104 −0 formatter/formatter_test.go
  14. +54 −0 formatter/html.go
  15. +55 −0 formatter/json.go
  16. +34 −0 formatter/text.go
  17. +21 −0 go.mod
  18. +76 −0 keys.go
  19. +37 −0 request-headers.go
  20. +55 −0 sample-config.toml
  21. +75 −0 status-line.go
  22. +1,302 −389 wuzz.go
8 changes: 8 additions & 0 deletions .dockerignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
**

!config
!formatter
!*.go
!go.mod
!sample-config.toml
!docker-entrypoint.sh
10 changes: 8 additions & 2 deletions .travis.yml
Original file line number Diff line number Diff line change
@@ -1,16 +1,22 @@
language: go
go:
- 1.7.5
- tip # latest
- 1.12.x #Update go version
- tip
os:
- linux
# remove osx, getting vm from travis is extremely slow
# - osx

arch:
- amd64
- ppc64le
env:
- "PATH=/home/travis/gopath/bin:$PATH"
script:
- test -z "$(go get -a)"
- 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
45 changes: 45 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,45 @@
## 0.5.0 2020.01.19

- Added context specific search for HTML (goquery)
- Request data displayed in request history
- Fixed JSON indentation
- Redirect toggle command Added
- Multiple minor bug fixes

## 0.4.0 2017.08.21

- Save/load requests (`-f`/`--file` flags for loading)
- Multipart form handling (`-F`/`--form` flags)
- Edit window content in external editor
- Colorized html output
- Context specific search (github.com/tidwall/gjson for JSON)
- More consistency with cURL API (`--data-urlencode` flag added)
- Update to the latest `gocui` ui library


## 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
25 changes: 25 additions & 0 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
FROM alpine:3.12 AS permissions-giver

# Make sure docker-entrypoint.sh is executable, regardless of the build host.
WORKDIR /out
COPY docker-entrypoint.sh .
RUN chmod +x docker-entrypoint.sh

FROM golang:1.14-alpine3.12 AS builder

# Build wuzz
WORKDIR /out
COPY . .
RUN go build .

FROM alpine:3.12 AS organizer

# Prepare executables
WORKDIR /out
COPY --from=builder /out/wuzz .
COPY --from=permissions-giver /out/docker-entrypoint.sh .

FROM alpine:3.12 AS runner
WORKDIR /wuzz
COPY --from=organizer /out /usr/local/bin
ENTRYPOINT [ "docker-entrypoint.sh" ]
44 changes: 37 additions & 7 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# wuzz

Interactive cli tool for HTTP inspection
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
@@ -16,17 +16,36 @@ $ go get github.com/asciimoo/wuzz
$ "$GOPATH/bin/wuzz" --help
```

Note: golang >= 1.10 required.

[Binary releases](https://github.com/asciimoo/wuzz/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](sample-config.toml) for more details.


### Commands

Keybinding | Description
----------------------------------------|---------------------------------------
<kbd>F1</kbd> | Display help
<kbd>Ctrl+R</kbd> | Send request
<kbd>Ret</kbd> | Send request (only from URL view)
<kbd>Ctrl+S</kbd> | Save response
<kbd>Ctrl+E</kbd> | Save request
<kbd>Ctrl+F</kbd> | Load request
<kbd>Ctrl+C</kbd> | Quit
<kbd>Ctrl+K</kbd>, <kbd>Shift+Tab</kbd> | Previous view
<kbd>Ctlr+J</kbd>, <kbd>Tab</kbd> | Next view
<kbd>Ctrl+H</kbd>, <kbd>Alt+H</kbd> | Toggle history
<kbd>Ctlr+T</kbd> | Toggle context specific search
<kbd>Alt+H</kbd> | Toggle history
<kbd>Down</kbd> | Move down one view line
<kbd>Up</kbd> | Move up one view line
<kbd>Page down</kbd> | Move down one view page
@@ -39,18 +58,29 @@ Keybinding | Description
<kbd>F7</kbd> | Jump to search
<kbd>F8</kbd> | Jump to response headers
<kbd>F9</kbd> | Jump to response body
<kbd>F11</kbd> | Redirects Restriction Mode


### Context specific search

Wuzz accepts regular expressions by default to filter response body.
Custom query syntax can be toggled by pressing <kbd>Ctrl+T</kbd>.
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

* Colors
* Response specific filters (xpath, etc..)
* Better navigation
* File upload
* Autocompletion
* Tests


## Bugs
## Bugs / Suggestions

Bugs or suggestions? Visit the [issue tracker](https://github.com/asciimoo/wuzz/issues).
Bugs or suggestions? Visit the [issue tracker](https://github.com/asciimoo/wuzz/issues)
or join `#wuzz` on freenode
1 change: 1 addition & 0 deletions _config.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
theme: jekyll-theme-cayman
Loading