Want to execute command repeatedly without workache? Here is shloop born for it!
The installation is easy!
- You can download a prebuilt binary from releases page, unpack and run! or
- If you have Go compiler installed and configured:
> go get github.com/dwisiswant0/shloop/...shLoop just reads environment values to run.
SHLOOP_COUNTis the number of times the command is repeated (default: 5),SHLOOP_THREADto specify the number of executed command concurrently (default: 1), andSHLOOP_VERBOSEto display information on what command is being executed (default: false).
Simply, shloop can be run with:
▶ shloop [command...]We also support variables, meanwhile we have variables as:
iwill generate digit incrementally (depending onSHLOOP_COUNTvalue),strwill generate a random ASCII string with length N,intwill generate a random string of length N consists of ASCII digits (note it can start with 0), anduuid(version 4) will generate a random unique identifier based upon random nunbers.- Format:
xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx.
- Format:
As an example, I want to repeat the echo command 10 times.
▶ export SHLOOP_COUNT=10
▶ shloop echo "Hello, world!"
Hello, world!
Hello, world!
Hello, world!
Hello, world!
Hello, world!
Hello, world!
Hello, world!
Hello, world!
Hello, world!
Hello, world!In case if you want to test race conditions on an endpoint with curl.
▶ export SHLOOP_COUNT=10
▶ export SHLOOP_THREAD=5
▶ shloop curl -X POST https://httpbin.org/post -d "foo=bar"Example of using incremental variable:
▶ export SHLOOP_COUNT=5
▶ shloop echo "No. {{i}}"
No. 1
No. 2
No. 3
No. 4
No. 5Have IDOR endpoints? Intruder on it!
▶ export SHLOOP_COUNT=100
▶ export SHLOOP_VERBOSE=true
▶ shloop curl -s "https://domain/api/orders/{{int 8}}"Another one:
▶ export SHLOOP_COUNT=100
▶ export SHLOOP_VERBOSE=true
▶ shloop curl -s "https://domain/profile.php?id={{uuid}}"