summaryrefslogtreecommitdiff
AgeCommit message (Collapse)Author
2023-11-11Release trunks v0.4.1 (2023-11-11)v0.4.1Shulhan
This release only have chores, it should not break anything. * go.mod: update all dependencies This changes set minimum Go version to version 1.20. The vegeta module finally has some update to v12.11.1. * gitmodules: use https instead of git scheme Using git scheme require private key to clone the remote repository. * _www: update wui module * _www: setup eslint for linting TypeScript files This changes also apply all eslint recommendations. * Makefile: replace the Go linter and apply all their recommendations Previously, we use golangci-lint as linter. This linter does not provides any useful recommendation lately and the development is quite a mess, sometimes its break when using Go tip. In this changes we replace it with revive, fieldalignment, and shadow; and fix all of their recommendations.
2023-11-11Makefile: replace the Go linter and apply all their recommendationsShulhan
Previously, we use golangci-lint as linter. This linter does not provides any useful recommendation lately and the development is quite a mess, sometimes its break when using Go tip. In this changes we replace it with revive, fieldalignment, and shadow; and fix all of their recommendations.
2023-11-11_www: apply all eslint recommendationsShulhan
2023-11-11_www: setup eslint for linting TypeScript filesShulhan
2023-11-11_www: update wui moduleShulhan
While at it reformat all files using default prettier.
2023-11-11gitmodules: use https instead of git schemeShulhan
Using git scheme require private key to clone to remote repository.
2023-11-11go.mod: update all dependenciesShulhan
This changes set minimum Go version to version 1.20.
2023-05-16Release trunks v0.4.0 (2023-05-16)v0.4.0Shulhan
=== Bug fixes * all: fix panic when attacking HTTP due to nil Attack handler === Enhancements * _www: replace WebSocket handlers with HTTP endpoints * all: add boolean Kind for FormInput, FormInputKindBoolean * all: check and call ConvertParams when running HttpTarget === Chores * all: move the _doc directory under _www * all: convert the README from asciidoc to markdown * all: remove WebSocket server * go.mod: set Go version to 1.19 and update all dependencies
2023-05-16all: move the _doc directory under _wwwShulhan
This is to minimize symlinks in the repository.
2023-05-16all: convert the README from asciidoc to markdownShulhan
I use two remote repositories: GitHub and SourceHut. GitHub support rendering README using asciidoc while SourceHut not. This cause the repository that use README.adoc rendered as text in SourceHut which make the repository page less readable. Also, the pkg.go.dev now render README but only support Markdown. Since we cannot control the SourceHut and go.dev, the only option is to support converting Markdown in ciigo so I can write README using Markdown and the rest of documentation using Asciidoc.
2023-05-16all: remove WebSocket serverShulhan
Using WebSocket for communication in client require additional setup, especially if its behind proxy. For example, if we server the trunks server under domain testing.local behind proxy, we need to setup route for the WebSocket too.
2023-05-16_www: replace WebSocket handlers with HTTP endpointsShulhan
The Attack and attack Cancel now call the HTTP endpoints.
2023-05-16all: implement HTTP API to run and cancel attack on HTTP targetShulhan
This endpoints similar that we have in the WebSocket. The idea is to replace the WebSocket endpoints with this one.
2023-05-16go.mod: update all dependenciesShulhan
2023-05-16all: fix panic when attacking HTTP due to nil Attack handlerShulhan
In attack endpoint, check if the Attack is nil before we push the request to attack queue.
2023-05-05all: add boolean Kind for FormInput, FormInputKindBooleanShulhan
The FormInputKindBoolean only used for convertion, for example ToJsonObject. In the WUI, it still rendered as string, not as checkbox. FormInput with this Kind will be converted to true in ToJsonObject if the Value is either "true", "yes", or "1".
2023-05-05all: set the request ConvertParams before calling runHttpTargetShulhan
The req, RunRequest instance, is from request so the HttpTarget.ConvertParams need to be set from the original HttpTarget. This fix the conditional rr.HttpTarget.ConvertParams == nil always true when calling runHttpTarget.
2023-05-05go.mod: set Go version to 1.19 and update all dependenciesShulhan
2023-05-05all: check and call ConvertParams when running HttpTargetShulhan
If the ConvertParams field is set, use it to convert the parameters into desired type.
2022-08-25Release trunks v0.3.0 (2022-08-25)v0.3.0Shulhan
This release set the minimum Go version to 1.18 and update all modules. == Chores * all: group all documentations under directory _doc * example: fix the HTTP POST handler * all: remove unused field Locker in RunRequest * all: fix all linter warnings
2022-08-25all: group all documentations under directory _docShulhan
The _doc directory provides an entry point for all documentation. While at it we reformat the README to use AsciiDoc markup.
2022-08-21example: fix the HTTP POST handlerShulhan
Remove call to ParseMultipartform since the request type is x-www-form-urlencoded not multipart/form-data.
2022-08-21all: remove trailing new line on each mlog formatShulhan
The mlog functions automatically add new line to each format, so we did not need to add it manually.
2022-08-21all: remove unused field Locker in RunRequestShulhan
2022-08-21all: fix all linter warningsShulhan
Some linter, govet, warns about possible copied Mutex on HttpRequest. To fix this we implement method clone and Stringer on HttpRequest.
2022-08-21all: reformat with Go 1.19 gofmtShulhan
2022-08-21go.mod: set minimum Go to 1.18 and update all dependenciesShulhan
This changes replace any usage of ioutil with os and io package.
2022-04-20_www: set the WebSocket address schema based on URL protocolShulhan
If the address is using "https:" protocol, the WebSocket address will use the "wss://" schema. This changes require latest update on wui repository.
2022-03-14Release trunks v0.2.0 (2022-03-13)v0.2.0Shulhan
Release trunks under GPL 3.0 or later license. See https://kilabit.info/journal/2022/gpl for more information.
2022-03-14all: changes the license of trunks software to GPL 3.0 or laterShulhan
See https://kilabit.info/journal/2022/gpl for more information.
2022-03-13all: update dependenciesShulhan
2022-02-05Release trunks v0.1.0 (2022-02-05)v0.1.0Shulhan
Module trunks is a library and HTTP service that provide web user interface to test HTTP service, similar to Postman, and for load testing. For the load testing we use vegeta [1] as the backend.
2022-02-05go.mod: update share module to v0.34.0Shulhan
2022-02-05Makefile: run the test with CGO_ENABLED=1Shulhan
In case user set CGO_ENABLED=0, the task for "all" will fail. This commit fix this by setting CGO_ENABLED to 1 when running test with -race option.
2022-01-10all: update share and ciigo modulesShulhan
2021-12-21all: add option to open link inside an iframeShulhan
The NavLink struct now has field OpenInIFrame. If its true, the Href will be opened inside an iframe in the same window, otherwise it will opened in new tab.
2021-12-21all: add feature to register custom navigation linkShulhan
Using Trunks.RegisterNavLink, one can register custom link into left navigation menu.
2021-12-20go.mod: update share and ciigo modules to latestShulhan
2021-12-10all: realign all structsShulhan
Changes, * AttackResult storage size decreased -24 bytes * Environment storage size decreased -32 bytes * HttpTarget storage size decreased -24 bytes * RunRequest storage size decreased -32 bytes * RunResponse storage size decreased -8 bytes * Target storage size decreased -16 bytes * WebSocketTarget storage size decreased -8 bytes
2021-12-10www: fix rendering the WebSocket responseShulhan
The returned value from WebSocketTarget's onClickRun() is already decoded as object, so we did not need to convert and run JSON.parse with it.
2021-12-06go.mod: update to latest share moduleShulhan
This changes update on how memfs initialized and GoEmbed called.
2021-10-19cmd/trunks: update the node when changes on .js and .html filesShulhan
When the worker build received an update to .js or .html files, we run the Node.Update method on affected node to fetch their latest content. This is to allow the task to embed files, generate the latest content.
2021-10-19www: load the stored variables into Target, HttpTarget, WebSocketTargetShulhan
In the commit edff37e3 and 264cb988, we store the user modified input into local storage. This including Target options and variables, HttpTarget headers and parameters, and WebSocket headers and parameters. When the user interface refreshed, the stored variables is loaded into input form but not saved into current Target/HttpTarget/WebSocketTarget variables. This changes fix this issue by loading the stored variables into into current instance of Target/HttpTarget/WebSocketTarget variables.
2021-10-18all: rename internal/cmd/trunks-example to internal/cmd/trunksShulhan
The internal/cmd/trunks-example is not run and provide an example only now, its include the workers to build, recompile, re-embeded files.
2021-10-17all: merge all workers for related to development to internal/cmdShulhan
Previously, we have a workers to recompile TypeScript and regenerate HTML files from adoc inside the Trunks type. The workers will run if the environment variable TRUNKS_DEV set to non-zero. This changes move those workers to the internal/cmd/trunks-example, because those workers are related for development only not for running Trunks server.
2021-10-17www: disable modifying the Base URL on targetShulhan
The BaseURL should be only set once by server and read-only to client. This is to prevent a malicious client attempt to attack non-predefined target.
2021-10-17all: move the main program for example to internal/cmd/trunks-exampleShulhan
The "cmd" directory on module should be reserved for installable program that can be executed outside of this repository. The trunks-example is development server should be run on root of this repository only, not installable to $GOBIN.
2021-10-17www: create separate functions to save to local storagesShulhan
This changes split the Save function into several functions, in order to help review and minimize wrong storage key on load and save.
2021-10-11go.mod: update to latest share and ciigo moduleShulhan
Changes, * share: fix the HTTP caching using ETag on the server * share: rename the terminology to generate Go source code to "embed" * ciigo: check markup modification time before converting to HTML
2021-09-29_www: store the target attack options to local storageShulhan
Once the Attack button is clicked, the Target's attack options will be stored to local storage. On the next refresh or opening the Trunks web interface, the stored values will be loaded again.