Gangpile - For when you need to run a script, repeatedly, and at scale.

Gangpile

For when you need to run a script, repeatedly, and at scale.

What It Does

It spawns multiple subprocesses that run a script or a program repeatedly, ideally without arguments. These subprocesses cache the standard outputs (stdout and stderr), and stream them back to the gangpile manager. The manager will then put these logs into a SQLite database for you to examine later.

At first blush, this may seem to be DDoS tool, and it can certainly be used as one, but it’s not actually meant for that. It’s for load testing, annoying your S/O, and as an exercise to better understand Go’s concurrency and parallelism options.

Build It

  1. go get
  2. Build the bits; order doesn’t matter:
    • go build -o bin/gangpile gangpile/gangpile.go
    • go build -o bin/localrunner localrunner/localrunner.go
      • Bonus zsh powerword: for p ('gangpile' 'localrunner') go build -o bin/$p $p/$p.go
  3. Get together the script you want to abuse

Run It

  1. Get together an idempotent script like this one:
    #!/bin/bash 
    # -- naggem.sh --
    
    # girlfriend is late again! this'll get her attention
    curl -XPUT -d'{"text": "ready yet?", "number": "+1888555MYGF"}' https://my.sms.api.fail/send-message
        
  2. Make the script executable
    $ chmod +x naggem.sh
        
  3. Start the program from this directory
    $ ./bin/gangpile local 12 path/to/naggem.sh
        
    • Trivia:
      • this will spawn 12 executors that will repeatedly hammer naggem.sh until the gangpile process is killed.
      • for best performance, ensure that you have at least 12 sufficiently bored CPUs on the computer you are running this on.
      • gangpile will create a “run_logs.db” file. This is SQLite file you can use to examine logs and generate reports.
        • both Python and Racket have SQLite support in their standard library, which means you can use the former to generate attractive graphs and with Jupyter.
        • SQLite ships with most Linux distros, MacOSX, and Android!
          • Yes, you can run this on your Android phone.
        • It’ll gleely add to whatever “run_logs.db” you already have stored here.
      • Twilio didn’t like my initial tests, and neither did my (now ex-) girlfriend.
  4. ???
  5. Profit! (or breakup)
  6. Press Ctrl-C to end the gangpile
Similar Resources

This Simple script is used to convert Datadog Dashboard to NewRelic.

This Simple script is used to convert Datadog Dashboard to NewRelic.

What is this? This Simple script is used to convert Datadog Dashboard to NewRelic. This script is build with specific dashboard layout in mind, so it

Feb 6, 2022

Script to generate a web page for your Aliucord plugins repo.

Aliucord-Store Script used to generate a website front-end for your plugins. Usage: go run cmds/store/main.go -dir string Your repository's

Jan 31, 2022

A tool to run queries in defined frequency and expose the count as prometheus metrics.

A tool to run queries in defined frequency and expose the count as prometheus metrics.

A tool to run queries in defined frequency and expose the count as prometheus metrics. Supports MongoDB and SQL

Jul 1, 2022

a leaderboard system that can run on any Internet enabled device.

hacktoberfest-leaderboard a leaderboard system that can run on any Internet enabled device. How it works The app updates the leaderboard on README.md

Nov 1, 2021

Run The World. Command aggregator output. Define many services watch them in one place.

Run The World. Command aggregator output. Define many services watch them in one place.

Feb 2, 2022

Run goplus org

Run goplus org

Jan 11, 2022

:chart_with_upwards_trend: Monitors Go MemStats + System stats such as Memory, Swap and CPU and sends via UDP anywhere you want for logging etc...

Package stats Package stats allows for gathering of statistics regarding your Go application and system it is running on and sent them via UDP to a se

Nov 10, 2022

GoThanks automatically stars Go's official repository and your go.mod github dependencies, providing a simple way to say thanks to the maintainers of the modules you use and the contributors of Go itself.

GoThanks automatically stars Go's official repository and your go.mod github dependencies, providing a simple way  to say thanks to the maintainers of the modules you use and the contributors of Go itself.

Give thanks (in the form of a GitHub ★) to your fellow Go modules maintainers. About GoThanks performs the following operations Sends a star to Go's r

Dec 24, 2022

Allows you to swap usernames at https://solo.to, I swapped @/city and @/lose with this program :)

Allows you to swap usernames at https://solo.to, I swapped @/city and @/lose with this program :)

Solo.To-Username-Swapper added the exe version for people who do not have Go installed, how ever I reccomend installing it at https://golang.org Getti

Sep 29, 2021
Squizit is a simple tool, that aim to help you get the grade you want, not the one you have learnt for.
Squizit is a simple tool, that aim to help you get the grade you want, not the one you have learnt for.

Squizit is a simple tool, that aim to help you get the grade you want, not the one you have learnt for. Screenshots First, input PIN Then enjoy! Hoste

Mar 11, 2022
James is your butler and helps you to create, build, debug, test and run your Go projects
James is your butler and helps you to create, build, debug, test and run your Go projects

go-james James is your butler and helps you to create, build, debug, test and run your Go projects. When you often create new apps using Go, it quickl

Oct 8, 2022
Download the httpporxy.zip file and run it, You should see the following GUI
Download the httpporxy.zip file and run it, You should see the following GUI

Proxy Download the httpporxy.zip file and run it, You should see the following GUI

Dec 14, 2021
The package manager for macOS you didn’t know you missed. Simple, functional, and fast.
The package manager for macOS you didn’t know you missed. Simple, functional, and fast.

Stew The package manager for macOS you didn’t know you missed. Built with simplicity, functionality, and most importantly, speed in mind. Installation

Mar 30, 2022
golang script for bypass AV and work only in windows platform
golang script for bypass AV and work only in windows platform

antivirus bypass protection requirements golang installed usage 1 - create your payload go run create.go <ip> <port> <secret> <any url>

Nov 9, 2022
Parse a shell script and output all export declarations in an easy to read format

Find Exports Parse a shell script and output all export declarations in an easy to read format. Usage Example $ findexports ~/.bashrc PATH=$PATH:/usr/

Jan 13, 2022
Assembly syntax that makes you feel like you're writing code in a high-level language.

shasm Assembly syntax that makes you feel like you're writing code in a high-level language. Shasm is not an Assembler. Shasm simply compiles Shasm sy

Jun 5, 2021
If you accept that 1 day is 24 hours in some situations, you might want to parse it in Go too.

relaxduration If you accept that 1 day is 24 hours in some situations, you might want to parse it in Go too. This package tries to handle situations w

Dec 7, 2022
View the script files in the original Resident Evil 2 / Biohazard 2 as pseudocode
View the script files in the original Resident Evil 2 / Biohazard 2 as pseudocode

Resident Evil 2 Script Viewer About You can view the script files in the original Resident Evil 2 / Biohazard 2 as pseudocode next to the original byt

Jan 20, 2022
Script that sets your nzxt kraken temps based on cpu temps on linux

liquidctl-cpu-temp Script that monitors cpu temps and sets cpu cooler temps according to entered fan/pump curves. Only tested on NZXT kraken z63 requi

Nov 16, 2021