An open API service indexing awesome lists of open source software.

https://github.com/adrien2p/accumulator

:rocket: Send a load of requests with nodejs using cluster and with/without Tor for anonymisation :see_no_evil:
https://github.com/adrien2p/accumulator

ddos ddos-attacks ddos-tool load-testing nodejs onion security tor

Last synced: about 1 year ago
JSON representation

:rocket: Send a load of requests with nodejs using cluster and with/without Tor for anonymisation :see_no_evil:

Awesome Lists containing this project

README

          



Accumulator




🚀 Send a load of requests with nodejs using cluster and with/without Tor for anonymisation 🙈



Buy Me A Coffee

---


issues
licence
PRs welcome!

> :warning: Disclamer, This repo has been created for an educative
> purpose. I am not related to any person who
> might use this project for the wrong reason. :warning:

# Getting started

Check your node version, it must be 17.6.0, otherwise you can use `nvm` as follow

```bash
nvm install 17
nvm use 17
```

#### Optional anonymisation

> The following steps are optional and only needed if you want to use the anonymisation

First, you need to install `Tor` on your machine since the requests will transit through
it in order to get anonymous requests.

```bash
# On Mac OS
brew install tor
```

Or follow the link [here](https://tb-manual.torproject.org/installation/) or
[here](https://community.torproject.org/onion-services/setup/install/)

you can then find the configuration file located here (on mac os)
`/usr/local/etc/tor/torrc.sample`. You can remove the `.sample` to make it effective.

Finally, you can start your tor service

```bash
# On Mac OS
tor & # & make tor running as a background process
```

alternativaly, you can also install the [Tor browser](https://www.torproject.org/download/)

# Configuration

Start by populating `targets.json` with the websites you want to test.
Here is how to fill the json file

````json
{
"data": [
"http://127.0.0.1:80"
]
}
````

Update the `config.json` file to customise the test.
Here is the example `config.json`.

```json
{
"requestPerBatch": 20,
"logEveryMs": 150,
"delayBetweenBatch": 500,
"cpuUsageRatio": 1,
"socksProxies": ["socks5h://127.0.0.1:9050"]
}
```

> The `socksProxies` configuration is optional and correspond to the anonymisation using TOR as explained
> in the [Getting started](#getting-started) section. It correspond to a set of Tor sockets
> that will be used as proxy for the requests.

# Running

## Tests

Run the following commands to be able to launch your servers and the load test on it.

```bash
npm run start-server:test
npm run start
```

this command `npm run start-server:test` will start a local sever on which you can try to
send some requests. Find your public IP and open a port on your router to redirect
the request to your local server. Then, add your public IP and port prefixed with
the protocol in `target.json` file.

## Production

To really start the load test, you only need to fill your `target.json` file with
the websites you want to test and eventually update your `config.json` file.
then run the command `npm run start` only.

# Contribute :ballot_box:

Contributions are welcome! You can look at the contribution [guidelines](./CONTRIBUTING.md)