Skip to content

A simple tool that sends response codes on demand, with customizable bodies and sleep times, for testing web applications.

License

Notifications You must be signed in to change notification settings

twblalock/broken

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

10 Commits
 
 
 
 
 
 

Repository files navigation

Broken is a simple tool for simulating responses from web applications.

Installation:
`go build broken.go`
Copy or link the binary to a directory in your PATH.

Usage: `broken port_number [log_file]`
Help: `broken [-h] [--help] [help]`

Example: Receive a 403 status code after 10 seconds:
http://localhost:[port]/?status=403&sleep=10000

Status codes:
Broken can respond with a status code of your choice. To get a 404, request:
http://localhost:[port]/?status=404
Requests for status codes other than 3 digits cause an error.

Sleep:
To get a response after x milliseconds, request:
http://localhost:[port]/?sleep=x

Body:
To insert a body in the response, request:
http://localhost:[port]/?body=body_goes_here

Uptime:
To get broken's uptime in milliseconds, request:
http://localhost:[port]/up

Error handling:
On errors, broken responds with a status code of 500 and an error message.

About

A simple tool that sends response codes on demand, with customizable bodies and sleep times, for testing web applications.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages