Showing preview only (762K chars total). Download the full file or copy to clipboard to get everything.
Repository: getanteon/anteon
Branch: master
Commit: 5cf7df3c6b71
Files: 173
Total size: 710.9 KB
Directory structure:
gitextract_guep6k27/
├── .devcontainer/
│ ├── .zshrc
│ ├── Dockerfile.dev
│ └── devcontainer.json
├── .github/
│ ├── ISSUE_TEMPLATE/
│ │ ├── bug_report.md
│ │ └── feature_request.md
│ ├── dependabot.yml
│ ├── pull_request_template.md
│ └── workflows/
│ ├── coverage.yml
│ ├── docs.yml
│ ├── release.yml
│ └── test.yml
├── .gitignore
├── .lycheeignore
├── CODE_OF_CONDUCT.md
├── CONTRIBUTING.md
├── LICENSE
├── README.md
├── SECURITY.md
├── assets/
│ └── ddosify.profile
├── ddosify_engine/
│ ├── .dockerignore
│ ├── .golangci.yml
│ ├── .goreleaser.yml
│ ├── Dockerfile
│ ├── Dockerfile.dev
│ ├── Dockerfile.release
│ ├── Jenkinsfile
│ ├── Jenkinsfile_benchmark
│ ├── README.md
│ ├── completions/
│ │ ├── README.md
│ │ └── _ddosify
│ ├── config/
│ │ ├── base.go
│ │ ├── base_test.go
│ │ ├── config_testdata/
│ │ │ ├── benchmark/
│ │ │ │ ├── config_correlation_load_1.json
│ │ │ │ ├── config_correlation_load_2.json
│ │ │ │ ├── config_correlation_load_3.json
│ │ │ │ ├── config_correlation_load_4.json
│ │ │ │ ├── config_correlation_load_5.json
│ │ │ │ ├── config_distinct_user.json
│ │ │ │ ├── config_multipart_inject_100rps.json
│ │ │ │ ├── config_multipart_inject_10rps.json
│ │ │ │ ├── config_multipart_inject_1krps.json
│ │ │ │ ├── config_multipart_inject_200rps.json
│ │ │ │ ├── config_multipart_inject_2krps.json
│ │ │ │ ├── config_multipart_inject_500rps.json
│ │ │ │ ├── config_repeated_user.json
│ │ │ │ └── json_payload.json
│ │ │ ├── config.json
│ │ │ ├── config_auth.json
│ │ │ ├── config_capture_environment.json
│ │ │ ├── config_data_csv.json
│ │ │ ├── config_debug_false.json
│ │ │ ├── config_debug_mode.json
│ │ │ ├── config_empty.json
│ │ │ ├── config_global_envs.json
│ │ │ ├── config_incorrect.json
│ │ │ ├── config_init_cookies.json
│ │ │ ├── config_inject_json.json
│ │ │ ├── config_inject_json_dynamic.json
│ │ │ ├── config_inject_xml.json
│ │ │ ├── config_invalid_capture_env.json
│ │ │ ├── config_invalid_target.json
│ │ │ ├── config_invalid_user_mode_for_cookies.json
│ │ │ ├── config_iteration_count.json
│ │ │ ├── config_iteration_count_over_req_count.json
│ │ │ ├── config_manual_load.json
│ │ │ ├── config_manual_load_override.json
│ │ │ ├── config_multipart_err.json
│ │ │ ├── config_multipart_payload.json
│ │ │ ├── config_payload.json
│ │ │ ├── config_protocol.json
│ │ │ ├── config_test_assertion_fail.json
│ │ │ ├── data_json_payload.json
│ │ │ ├── json_payload.json
│ │ │ ├── json_payload_dynamic.json
│ │ │ ├── payload.txt
│ │ │ ├── race_configs/
│ │ │ │ ├── capture_envs.json
│ │ │ │ ├── global_envs.json
│ │ │ │ ├── step_assertions_stdout.json
│ │ │ │ └── step_assertions_stdout_json.json
│ │ │ ├── test.csv
│ │ │ └── xml_payload.xml
│ │ ├── json.go
│ │ └── json_test.go
│ ├── config_examples/
│ │ ├── assertion/
│ │ │ └── expected_body.json
│ │ ├── config.json
│ │ └── payload.txt
│ ├── core/
│ │ ├── assertion/
│ │ │ ├── base.go
│ │ │ ├── service.go
│ │ │ └── service_test.go
│ │ ├── engine.go
│ │ ├── engine_test.go
│ │ ├── proxy/
│ │ │ ├── base.go
│ │ │ ├── base_test.go
│ │ │ └── single.go
│ │ ├── report/
│ │ │ ├── aggregator.go
│ │ │ ├── aggregator_test.go
│ │ │ ├── base.go
│ │ │ ├── base_test.go
│ │ │ ├── debug.go
│ │ │ ├── debug_test.go
│ │ │ ├── stdout.go
│ │ │ ├── stdoutJson.go
│ │ │ ├── stdoutJson_test.go
│ │ │ └── stdout_test.go
│ │ ├── scenario/
│ │ │ ├── client_pool.go
│ │ │ ├── client_pool_cookie_test.go
│ │ │ ├── data/
│ │ │ │ ├── csv.go
│ │ │ │ └── csv_test.go
│ │ │ ├── requester/
│ │ │ │ ├── base.go
│ │ │ │ ├── base_test.go
│ │ │ │ ├── http.go
│ │ │ │ └── http_test.go
│ │ │ ├── scripting/
│ │ │ │ ├── assertion/
│ │ │ │ │ ├── assert.go
│ │ │ │ │ ├── assert_test.go
│ │ │ │ │ ├── ast/
│ │ │ │ │ │ └── ast.go
│ │ │ │ │ ├── evaluator/
│ │ │ │ │ │ ├── env.go
│ │ │ │ │ │ ├── evaluator.go
│ │ │ │ │ │ ├── function.go
│ │ │ │ │ │ └── function_test.go
│ │ │ │ │ ├── lexer/
│ │ │ │ │ │ ├── lexer.go
│ │ │ │ │ │ └── lexer_test.go
│ │ │ │ │ ├── parser/
│ │ │ │ │ │ ├── parser.go
│ │ │ │ │ │ └── parser_test.go
│ │ │ │ │ ├── test_files/
│ │ │ │ │ │ ├── a.txt
│ │ │ │ │ │ ├── currencies.json
│ │ │ │ │ │ ├── jsonArray.json
│ │ │ │ │ │ ├── jsonMap.json
│ │ │ │ │ │ └── number.json
│ │ │ │ │ └── token/
│ │ │ │ │ └── token.go
│ │ │ │ ├── extraction/
│ │ │ │ │ ├── base.go
│ │ │ │ │ ├── base_test.go
│ │ │ │ │ ├── html.go
│ │ │ │ │ ├── html_test.go
│ │ │ │ │ ├── json.go
│ │ │ │ │ ├── json_test.go
│ │ │ │ │ ├── regex.go
│ │ │ │ │ ├── regex_test.go
│ │ │ │ │ ├── xml.go
│ │ │ │ │ └── xml_test.go
│ │ │ │ └── injection/
│ │ │ │ ├── dynamic_test.go
│ │ │ │ ├── environment.go
│ │ │ │ ├── environment_dynamic.go
│ │ │ │ ├── environment_test.go
│ │ │ │ └── init.go
│ │ │ ├── service.go
│ │ │ └── service_test.go
│ │ ├── types/
│ │ │ ├── error.go
│ │ │ ├── hammer.go
│ │ │ ├── hammer_test.go
│ │ │ ├── regex/
│ │ │ │ ├── regex.go
│ │ │ │ └── regex_test.go
│ │ │ ├── response.go
│ │ │ ├── scenario.go
│ │ │ └── scenario_test.go
│ │ └── util/
│ │ ├── buffer_pool.go
│ │ ├── helper.go
│ │ └── pool.go
│ ├── go.mod
│ ├── go.sum
│ ├── main.go
│ ├── main_benchmark_test.go
│ ├── main_exit_test.go
│ ├── main_test.go
│ └── scripts/
│ ├── install.sh
│ └── testing/
│ └── benchstat.sh
└── selfhosted/
├── README.md
├── VERSION
├── docker-compose.yml
├── init_scripts/
│ ├── influxdb/
│ │ └── 01_influxdb_create_buckets.sh
│ ├── postgres/
│ │ └── 01_postgres_create_dbs.sql
│ └── prometheus/
│ └── prometheus.yml
├── install.sh
└── nginx/
└── default_reverseproxy.conf
================================================
FILE CONTENTS
================================================
================================================
FILE: .devcontainer/.zshrc
================================================
export ZSH=$HOME/.oh-my-zsh
ZSH_THEME="cloud"
plugins=(
git
zsh-autosuggestions
)
source $ZSH/oh-my-zsh.sh
source /usr/share/doc/fzf/examples/key-bindings.zsh
source /usr/share/doc/fzf/examples/completion.zsh
alias ll='ls -alF'
alias hammer-clean='go clean -testcache'
alias hammer-test-n-cover='gotest -coverpkg=./... -coverprofile=coverage.out ./... && go tool cover -func coverage.out'
export PATH="$PATH:/go/bin"
================================================
FILE: .devcontainer/Dockerfile.dev
================================================
FROM golang:1.18.1
WORKDIR /workspace
COPY go.mod ./
COPY go.sum ./
ENV GOPATH /go
ENV GOBIN /go/bin
ENV LC_ALL=C.UTF-8
ENV LANG=C.UTF-8
ENV SHELL /bin/zsh
RUN apt update && apt install -y git zsh vim fzf locales gcc musl-dev curl iputils-ping telnet graphviz bc jq && rm -rf /var/lib/apt/lists/*
RUN sh -c "$(curl -fsSL https://raw.github.com/ohmyzsh/ohmyzsh/master/tools/install.sh)"
RUN git clone https://github.com/zsh-users/zsh-syntax-highlighting.git ${ZSH_CUSTOM:-~/.oh-my-zsh/custom}/plugins/zsh-syntax-highlighting
RUN git clone https://github.com/zsh-users/zsh-autosuggestions ${ZSH_CUSTOM:-~/.oh-my-zsh/custom}/plugins/zsh-autosuggestions
RUN curl -sSfL https://raw.githubusercontent.com/golangci/golangci-lint/master/install.sh | sh -s -- -b $(go env GOPATH)/bin v1.45.2
COPY .devcontainer/.zshrc /root/.zshrc
RUN go install -v golang.org/x/tools/gopls@v0.8.3
RUN go install -v github.com/rogpeppe/godef@v1.1.2
RUN go install -v github.com/rakyll/gotest@v0.0.6
RUN go install -v github.com/ramya-rao-a/go-outline@1.0.0
RUN go install -v github.com/go-delve/delve/cmd/dlv@v1.8.1
RUN go install -v golang.org/x/perf/cmd/benchstat@v0.0.0-20221222172245-91a04616dc65
RUN go mod download
CMD [ "zsh" ]
================================================
FILE: .devcontainer/devcontainer.json
================================================
{
"name": "Ddosify Open Source",
"build": {
"dockerfile": "Dockerfile.dev",
"context": "../"
},
"runArgs": [
"-v",
"${env:HOME}${env:USERPROFILE}/.ssh:/root/.ssh-localhost:ro",
"--cap-add=SYS_PTRACE",
"--security-opt",
"seccomp=unconfined",
"--ipc",
"host",
"--hostname",
"ddosify"
],
"customizations": {
"vscode": {
"settings": {
"terminal.integrated.defaultProfile.linux": "zsh",
"go.useLanguageServer": true,
"go.gopath": "/go",
"go.goroot": "/usr/local/go",
"go.toolsGopath": "/go",
"go.lintTool": "golangci-lint",
"go.lintFlags": [
"--config=${workspaceFolder}/.golangci.yml",
"--fast"
],
"files.eol": "\n"
},
"extensions": [
"golang.Go",
"eamodio.gitlens",
"premparihar.gotestexplorer",
"GitHub.copilot",
"GitHub.copilot-labs"
]
}
},
"postCreateCommand": "mkdir -p ~/.ssh && cp -r ~/.ssh-localhost/* ~/.ssh && chmod 700 ~/.ssh && chmod 600 ~/.ssh/*",
"mounts": [
// "source=${env:HOME}/.zsh_history,target=/root/.zsh_history,type=bind,consistency=cached"
// "source=${env:HOME}/.bash_history,target=/root/.zsh_history,type=bind,consistency=cached"
]
}
================================================
FILE: .github/ISSUE_TEMPLATE/bug_report.md
================================================
---
name: Bug report
about: Create a report to help us improve
title: ''
labels: bug
assignees: ''
---
### Describe the bug
<!-- A clear and concise description of what the bug is. -->
### To Reproduce
Steps to reproduce the behavior:
1. Go to '...'
2. Click on '....'
3. Scroll down to '....'
4. See error
### Expected behavior
<!-- A clear and concise description of what you expected to happen. -->
### Screenshots
<!-- If applicable, add screenshots to help explain your problem. -->
### System (please complete the following information):
- OS: [e.g. MacOS]
- Anteon Version [e.g. v0.15.1]
### Additional context
<!-- Add any other context about the problem here. -->
================================================
FILE: .github/ISSUE_TEMPLATE/feature_request.md
================================================
---
name: Feature request
about: Suggest an idea for this project
title: ''
labels: enhancement
assignees: ''
---
**Is your feature request related to a problem? Please describe.**
<!-- A clear and concise description of what the problem is. Ex. I'm always frustrated when [...] -->
**Describe the solution you'd like**
<!-- A clear and concise description of what you want to happen. -->
**Describe alternatives you've considered**
<!-- A clear and concise description of any alternative solutions or features you've considered. -->
**Additional context**
<!-- Add any other context or screenshots about the feature request here. -->
================================================
FILE: .github/dependabot.yml
================================================
# To get started with Dependabot version updates, you'll need to specify which
# package ecosystems to update and where the package manifests are located.
# Please see the documentation for all configuration options:
# https://docs.github.com/code-security/dependabot/dependabot-version-updates/configuration-options-for-the-dependabot.yml-file
version: 2
updates:
- package-ecosystem: "gomod" # See documentation for possible values
directory: "/" # Location of package manifests
schedule:
interval: "daily"
- package-ecosystem: "docker" # See documentation for possible values
directory: "/" # Location of package manifests
schedule:
interval: "daily"
================================================
FILE: .github/pull_request_template.md
================================================
## Description
<!-- Please provide a brief and concise description of the changes in this pull request, including the problem being solved or the feature being added. -->
<!-- Please list any related issues or reference them. -->
## Screenshots
<!-- If applicable, please provide screenshots, video or GIF to help demonstrate the changes. -->
## Type of Changes
<!-- Please check the relevant boxes by putting an "x" in the appropriate box. -->
- [ ] Bug fix (non-breaking change which fixes an issue)
- [ ] New feature (non-breaking change which adds functionality)
- [ ] Breaking change (fix or feature that would cause existing functionality to change)
- [ ] This change requires a documentation update
## Checklist
<!-- Please go through this checklist and make sure all applicable tasks have been done. -->
- [ ] I have read the [CONTRIBUTING.md](../CONTRIBUTING.md) document.
- [ ] My code follows the code style of this project.
- [ ] I have added tests to cover my changes.
- [ ] All new and existing tests passed.
- [ ] I have updated the [README.md](../README.md) as necessary if there are changes.
- [ ] I have tested the changes on my local machine before submitting the PR.
================================================
FILE: .github/workflows/coverage.yml
================================================
name: Coverage
on:
push:
branches:
- master
- develop
pull_request:
branches:
- master
- develop
jobs:
coverage:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: Set up Go
uses: actions/setup-go@v2
with:
go-version: 1.18.x
- name: Test
run: cd ddosify_engine && go test -coverpkg=./... -coverprofile=coverage.txt -parallel 1 -covermode=atomic -short ./... && go tool cover -func coverage.txt
- name: Upload reports to codecov
run: |
curl -Os https://uploader.codecov.io/latest/linux/codecov
chmod +x codecov
./codecov -t ${CODECOV_TOKEN} -f coverage.txt
env:
CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }}
================================================
FILE: .github/workflows/docs.yml
================================================
name: Documentation
on:
push:
branches:
- master
- develop
pull_request:
branches:
- master
- develop
jobs:
link-checker:
name: Check links
runs-on: ubuntu-latest
steps:
- name: Checkout the repository
uses: actions/checkout@v4
- name: Check the links
uses: lycheeverse/lychee-action@v1
with:
args: --max-concurrency 1 -v *.md **/*.md
fail: true
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
================================================
FILE: .github/workflows/release.yml
================================================
name: Release Ddosify
on:
push:
tags:
- '*'
permissions:
contents: write
jobs:
release:
runs-on: ubuntu-latest
env:
DOCKER_CLI_EXPERIMENTAL: "enabled"
steps:
-
name: Checkout
uses: actions/checkout@v2
with:
fetch-depth: 0
-
name: QEMU
uses: docker/setup-qemu-action@v1
-
name: Docker Buildx
uses: docker/setup-buildx-action@v1
-
name: Set up Go
uses: actions/setup-go@v2
with:
go-version: 1.18
-
name: Docker Hub Login
uses: docker/login-action@v1
with:
username: ${{ secrets.DOCKER_USERNAME }}
password: ${{ secrets.DOCKER_PASSWORD }}
-
name: Run GoReleaser
uses: goreleaser/goreleaser-action@v2
with:
distribution: goreleaser
version: latest
args: release --clean
env:
GITHUB_TOKEN: ${{ secrets.ACCESS_TOKEN }}
================================================
FILE: .github/workflows/test.yml
================================================
name: Test
on:
push:
branches:
- master
- develop
pull_request:
branches:
- master
- develop
jobs:
test:
strategy:
matrix:
go-version: [1.18.x, 1.19.x]
os: [ubuntu-latest, macos-latest, windows-latest]
runs-on: ${{ matrix.os }}
steps:
- uses: actions/checkout@v2
- name: Set up Go
uses: actions/setup-go@v2
with:
go-version: ${{ matrix.go-version }}
- name: Build
run: cd ddosify_engine && go build -race ./...
- name: Test
run: cd ddosify_engine && go test -parallel 1 -short ./...
================================================
FILE: .gitignore
================================================
# Binaries for programs and plugins
*.exe
*.exe~
*.dll
*.so
*.dylib
# Test binary, built with `go test -c`
*.test
# Output of the go coverage tool, specifically when used with LiteIDE
*.out
# Dependency directories (remove the comment below to include it)
# vendor/
__debug*
coverage.html
main
dist/
ddosify
.vscode
.idea/
.DS_Store
================================================
FILE: .lycheeignore
================================================
https://getanteon.com/endpoint_1
https://getanteon.com/endpoint_2
http://localhost:8014/
https://gurubase.io/
================================================
FILE: CODE_OF_CONDUCT.md
================================================
# Contributor Covenant Code of Conduct
## Our Pledge
We as members, contributors, and leaders pledge to make participation in our
community a harassment-free experience for everyone, regardless of age, body
size, visible or invisible disability, ethnicity, sex characteristics, gender
identity and expression, level of experience, education, socio-economic status,
nationality, personal appearance, race, religion, or sexual identity
and orientation.
We pledge to act and interact in ways that contribute to an open, welcoming,
diverse, inclusive, and healthy community.
## Our Standards
Examples of behavior that contributes to a positive environment for our
community include:
- Demonstrating empathy and kindness toward other people
- Being respectful of differing opinions, viewpoints, and experiences
- Giving and gracefully accepting constructive feedback
- Accepting responsibility and apologizing to those affected by our mistakes,
and learning from the experience
- Focusing on what is best not just for us as individuals, but for the
overall community
Examples of unacceptable behavior include:
- The use of sexualized language or imagery, and sexual attention or
advances of any kind
- Trolling, insulting or derogatory comments, and personal or political attacks
- Public or private harassment
- Publishing others' private information, such as a physical or email
address, without their explicit permission
- Other conduct which could reasonably be considered inappropriate in a
professional setting
## Enforcement Responsibilities
Community leaders are responsible for clarifying and enforcing our standards of
acceptable behavior and will take appropriate and fair corrective action in
response to any behavior that they deem inappropriate, threatening, offensive,
or harmful.
Community leaders have the right and responsibility to remove, edit, or reject
comments, commits, code, wiki edits, issues, and other contributions that are
not aligned to this Code of Conduct, and will communicate reasons for moderation
decisions when appropriate.
## Scope
This Code of Conduct applies within all community spaces, and also applies when
an individual is officially representing the community in public spaces.
Examples of representing our community include using an official e-mail address,
posting via an official social media account, or acting as an appointed
representative at an online or offline event.
## Enforcement
Instances of abusive, harassing, or otherwise unacceptable behavior may be
reported to the community leaders responsible for enforcement at
info@getanteon.com.
All complaints will be reviewed and investigated promptly and fairly.
All community leaders are obligated to respect the privacy and security of the
reporter of any incident.
## Enforcement Guidelines
Community leaders will follow these Community Impact Guidelines in determining
the consequences for any action they deem in violation of this Code of Conduct:
### 1. Correction
**Community Impact**: Use of inappropriate language or other behavior deemed
unprofessional or unwelcome in the community.
**Consequence**: A private, written warning from community leaders, providing
clarity around the nature of the violation and an explanation of why the
behavior was inappropriate. A public apology may be requested.
### 2. Warning
**Community Impact**: A violation through a single incident or series
of actions.
**Consequence**: A warning with consequences for continued behavior. No
interaction with the people involved, including unsolicited interaction with
those enforcing the Code of Conduct, for a specified period of time. This
includes avoiding interactions in community spaces as well as external channels
like social media. Violating these terms may lead to a temporary or
permanent ban.
### 3. Temporary Ban
**Community Impact**: A serious violation of community standards, including
sustained inappropriate behavior.
**Consequence**: A temporary ban from any sort of interaction or public
communication with the community for a specified period of time. No public or
private interaction with the people involved, including unsolicited interaction
with those enforcing the Code of Conduct, is allowed during this period.
Violating these terms may lead to a permanent ban.
### 4. Permanent Ban
**Community Impact**: Demonstrating a pattern of violation of community
standards, including sustained inappropriate behavior, harassment of an
individual, or aggression toward or disparagement of classes of individuals.
**Consequence**: A permanent ban from any sort of public interaction within
the community.
## Attribution
This Code of Conduct is adapted from the [Contributor Covenant][homepage],
version 2.0, available at
https://www.contributor-covenant.org/version/2/0/code_of_conduct.html.
Community Impact Guidelines were inspired by [Mozilla's code of conduct
enforcement ladder](https://github.com/mozilla/diversity).
[homepage]: https://www.contributor-covenant.org
For answers to common questions about this code of conduct, see the FAQ at
https://www.contributor-covenant.org/faq. Translations are available at
https://www.contributor-covenant.org/translations.
================================================
FILE: CONTRIBUTING.md
================================================
# Contributing to Anteon 🐝
Thank you for your interest in contributing to [Anteon](https://github.com/getanteon/anteon)!
In this guide, we'll provide you with the necessary information and guidelines to help you get started.
## 🚀 Getting Started
1. Fork [Anteon](https://github.com/getanteon/anteon) on GitHub.
2. Clone your fork to your local machine:
```bash
git clone git@github.com:<YOUR_USERNAME>/anteon.git
```
3. Add the Anteon repository as an upstream remote:
```bash
git remote add upstream https://github.com/getanteon/anteon
```
4. We follow Gitflow branching model. Create a feature branch from the `develop` branch:
```bash
git checkout -b feature/FEATURE_NAME develop
```
5. Set up your development environment.
- Go programming language (`Version >= 1.18`) is required to build and run Anteon. You can find the installation instructions [here](https://go.dev/doc/install).
- We also provide [Dockerfile](./.devcontainer/Dockerfile.dev) and Visual Studio Code (VS Code) [remote container configuration](./.devcontainer/devcontainer.json) for development. More information about VS Code remote container can be found [here](https://code.visualstudio.com/docs/devcontainers/containers).
6. Run the `main.go` file:
```bash
go run main.go
```
## 💻 Submitting Changes
Before submitting a [pull request (PR)](https://github.com/getanteon/anteon/pulls) with your changes, please make sure you follow these guidelines:
1. Ensure your code is well-formatted and follows the established coding style for this project (e.g., proper indentation, naming conventions, etc.).
2. Write unit tests for any new functionality or bug fixes. Ensure that all tests pass before submitting your PR.
3. Update the [README.md](./README.md) file according to your changes.
4. Keep your PRs focused and as small as possible. If you have multiple unrelated changes, create separate PRs for them.
5. Add a descriptive title and detailed description to your PR, explaining the purpose and rationale behind your changes.
6. Rebase your branch with the latest upstream changes before submitting your PR:
```bash
git pull --rebase upstream master
```
7. Create a pull request (PR) against the `develop` branch.
After submitting your PR, our team will review your changes. We may ask for revisions or provide feedback before merging your changes into the master branch. Your patience and cooperation are greatly appreciated.
## 🐛 Bug Reports
When submitting a [bug report](https://github.com/getanteon/anteon/issues), please include:
- A clear and descriptive title.
- A detailed description of the issue, including the steps to reproduce the bug.
- Any relevant information about your environment, such as the OS, Go version, and configuration.
- If possible, attach a minimal code sample or test case that demonstrates the issue.
- If possible, attach a screenshot or animated GIF that demonstrates the issue.
## ✨ Feature Requests
When submitting a [feature request](https://github.com/getanteon/anteon/issues), please include:
- A clear and descriptive title.
- A detailed description of the proposed feature or enhancement, including the rationale behind it and any potential use cases.
- If possible, provide examples or mockups to help illustrate your proposal.
## 💬 Community
Join our [Discord Server](https://discord.com/invite/9KdnrSUZQg) for issues, feature requests, feedbacks or anything else. We're happy to help you out!
## 📜 Code of Conduct
By participating in this project, you agree to abide by our [Code of Conduct](./CODE_OF_CONDUCT.md). Please read it carefully and ensure that your contributions and interactions with the community adhere to its principles.
================================================
FILE: LICENSE
================================================
GNU AFFERO GENERAL PUBLIC LICENSE
Version 3, 19 November 2007
Copyright (C) 2007 Free Software Foundation, Inc. <https://fsf.org/>
Everyone is permitted to copy and distribute verbatim copies
of this license document, but changing it is not allowed.
Preamble
The GNU Affero General Public License is a free, copyleft license for
software and other kinds of works, specifically designed to ensure
cooperation with the community in the case of network server software.
The licenses for most software and other practical works are designed
to take away your freedom to share and change the works. By contrast,
our General Public Licenses are intended to guarantee your freedom to
share and change all versions of a program--to make sure it remains free
software for all its users.
When we speak of free software, we are referring to freedom, not
price. Our General Public Licenses are designed to make sure that you
have the freedom to distribute copies of free software (and charge for
them if you wish), that you receive source code or can get it if you
want it, that you can change the software or use pieces of it in new
free programs, and that you know you can do these things.
Developers that use our General Public Licenses protect your rights
with two steps: (1) assert copyright on the software, and (2) offer
you this License which gives you legal permission to copy, distribute
and/or modify the software.
A secondary benefit of defending all users' freedom is that
improvements made in alternate versions of the program, if they
receive widespread use, become available for other developers to
incorporate. Many developers of free software are heartened and
encouraged by the resulting cooperation. However, in the case of
software used on network servers, this result may fail to come about.
The GNU General Public License permits making a modified version and
letting the public access it on a server without ever releasing its
source code to the public.
The GNU Affero General Public License is designed specifically to
ensure that, in such cases, the modified source code becomes available
to the community. It requires the operator of a network server to
provide the source code of the modified version running there to the
users of that server. Therefore, public use of a modified version, on
a publicly accessible server, gives the public access to the source
code of the modified version.
An older license, called the Affero General Public License and
published by Affero, was designed to accomplish similar goals. This is
a different license, not a version of the Affero GPL, but Affero has
released a new version of the Affero GPL which permits relicensing under
this license.
The precise terms and conditions for copying, distribution and
modification follow.
TERMS AND CONDITIONS
0. Definitions.
"This License" refers to version 3 of the GNU Affero General Public License.
"Copyright" also means copyright-like laws that apply to other kinds of
works, such as semiconductor masks.
"The Program" refers to any copyrightable work licensed under this
License. Each licensee is addressed as "you". "Licensees" and
"recipients" may be individuals or organizations.
To "modify" a work means to copy from or adapt all or part of the work
in a fashion requiring copyright permission, other than the making of an
exact copy. The resulting work is called a "modified version" of the
earlier work or a work "based on" the earlier work.
A "covered work" means either the unmodified Program or a work based
on the Program.
To "propagate" a work means to do anything with it that, without
permission, would make you directly or secondarily liable for
infringement under applicable copyright law, except executing it on a
computer or modifying a private copy. Propagation includes copying,
distribution (with or without modification), making available to the
public, and in some countries other activities as well.
To "convey" a work means any kind of propagation that enables other
parties to make or receive copies. Mere interaction with a user through
a computer network, with no transfer of a copy, is not conveying.
An interactive user interface displays "Appropriate Legal Notices"
to the extent that it includes a convenient and prominently visible
feature that (1) displays an appropriate copyright notice, and (2)
tells the user that there is no warranty for the work (except to the
extent that warranties are provided), that licensees may convey the
work under this License, and how to view a copy of this License. If
the interface presents a list of user commands or options, such as a
menu, a prominent item in the list meets this criterion.
1. Source Code.
The "source code" for a work means the preferred form of the work
for making modifications to it. "Object code" means any non-source
form of a work.
A "Standard Interface" means an interface that either is an official
standard defined by a recognized standards body, or, in the case of
interfaces specified for a particular programming language, one that
is widely used among developers working in that language.
The "System Libraries" of an executable work include anything, other
than the work as a whole, that (a) is included in the normal form of
packaging a Major Component, but which is not part of that Major
Component, and (b) serves only to enable use of the work with that
Major Component, or to implement a Standard Interface for which an
implementation is available to the public in source code form. A
"Major Component", in this context, means a major essential component
(kernel, window system, and so on) of the specific operating system
(if any) on which the executable work runs, or a compiler used to
produce the work, or an object code interpreter used to run it.
The "Corresponding Source" for a work in object code form means all
the source code needed to generate, install, and (for an executable
work) run the object code and to modify the work, including scripts to
control those activities. However, it does not include the work's
System Libraries, or general-purpose tools or generally available free
programs which are used unmodified in performing those activities but
which are not part of the work. For example, Corresponding Source
includes interface definition files associated with source files for
the work, and the source code for shared libraries and dynamically
linked subprograms that the work is specifically designed to require,
such as by intimate data communication or control flow between those
subprograms and other parts of the work.
The Corresponding Source need not include anything that users
can regenerate automatically from other parts of the Corresponding
Source.
The Corresponding Source for a work in source code form is that
same work.
2. Basic Permissions.
All rights granted under this License are granted for the term of
copyright on the Program, and are irrevocable provided the stated
conditions are met. This License explicitly affirms your unlimited
permission to run the unmodified Program. The output from running a
covered work is covered by this License only if the output, given its
content, constitutes a covered work. This License acknowledges your
rights of fair use or other equivalent, as provided by copyright law.
You may make, run and propagate covered works that you do not
convey, without conditions so long as your license otherwise remains
in force. You may convey covered works to others for the sole purpose
of having them make modifications exclusively for you, or provide you
with facilities for running those works, provided that you comply with
the terms of this License in conveying all material for which you do
not control copyright. Those thus making or running the covered works
for you must do so exclusively on your behalf, under your direction
and control, on terms that prohibit them from making any copies of
your copyrighted material outside their relationship with you.
Conveying under any other circumstances is permitted solely under
the conditions stated below. Sublicensing is not allowed; section 10
makes it unnecessary.
3. Protecting Users' Legal Rights From Anti-Circumvention Law.
No covered work shall be deemed part of an effective technological
measure under any applicable law fulfilling obligations under article
11 of the WIPO copyright treaty adopted on 20 December 1996, or
similar laws prohibiting or restricting circumvention of such
measures.
When you convey a covered work, you waive any legal power to forbid
circumvention of technological measures to the extent such circumvention
is effected by exercising rights under this License with respect to
the covered work, and you disclaim any intention to limit operation or
modification of the work as a means of enforcing, against the work's
users, your or third parties' legal rights to forbid circumvention of
technological measures.
4. Conveying Verbatim Copies.
You may convey verbatim copies of the Program's source code as you
receive it, in any medium, provided that you conspicuously and
appropriately publish on each copy an appropriate copyright notice;
keep intact all notices stating that this License and any
non-permissive terms added in accord with section 7 apply to the code;
keep intact all notices of the absence of any warranty; and give all
recipients a copy of this License along with the Program.
You may charge any price or no price for each copy that you convey,
and you may offer support or warranty protection for a fee.
5. Conveying Modified Source Versions.
You may convey a work based on the Program, or the modifications to
produce it from the Program, in the form of source code under the
terms of section 4, provided that you also meet all of these conditions:
a) The work must carry prominent notices stating that you modified
it, and giving a relevant date.
b) The work must carry prominent notices stating that it is
released under this License and any conditions added under section
7. This requirement modifies the requirement in section 4 to
"keep intact all notices".
c) You must license the entire work, as a whole, under this
License to anyone who comes into possession of a copy. This
License will therefore apply, along with any applicable section 7
additional terms, to the whole of the work, and all its parts,
regardless of how they are packaged. This License gives no
permission to license the work in any other way, but it does not
invalidate such permission if you have separately received it.
d) If the work has interactive user interfaces, each must display
Appropriate Legal Notices; however, if the Program has interactive
interfaces that do not display Appropriate Legal Notices, your
work need not make them do so.
A compilation of a covered work with other separate and independent
works, which are not by their nature extensions of the covered work,
and which are not combined with it such as to form a larger program,
in or on a volume of a storage or distribution medium, is called an
"aggregate" if the compilation and its resulting copyright are not
used to limit the access or legal rights of the compilation's users
beyond what the individual works permit. Inclusion of a covered work
in an aggregate does not cause this License to apply to the other
parts of the aggregate.
6. Conveying Non-Source Forms.
You may convey a covered work in object code form under the terms
of sections 4 and 5, provided that you also convey the
machine-readable Corresponding Source under the terms of this License,
in one of these ways:
a) Convey the object code in, or embodied in, a physical product
(including a physical distribution medium), accompanied by the
Corresponding Source fixed on a durable physical medium
customarily used for software interchange.
b) Convey the object code in, or embodied in, a physical product
(including a physical distribution medium), accompanied by a
written offer, valid for at least three years and valid for as
long as you offer spare parts or customer support for that product
model, to give anyone who possesses the object code either (1) a
copy of the Corresponding Source for all the software in the
product that is covered by this License, on a durable physical
medium customarily used for software interchange, for a price no
more than your reasonable cost of physically performing this
conveying of source, or (2) access to copy the
Corresponding Source from a network server at no charge.
c) Convey individual copies of the object code with a copy of the
written offer to provide the Corresponding Source. This
alternative is allowed only occasionally and noncommercially, and
only if you received the object code with such an offer, in accord
with subsection 6b.
d) Convey the object code by offering access from a designated
place (gratis or for a charge), and offer equivalent access to the
Corresponding Source in the same way through the same place at no
further charge. You need not require recipients to copy the
Corresponding Source along with the object code. If the place to
copy the object code is a network server, the Corresponding Source
may be on a different server (operated by you or a third party)
that supports equivalent copying facilities, provided you maintain
clear directions next to the object code saying where to find the
Corresponding Source. Regardless of what server hosts the
Corresponding Source, you remain obligated to ensure that it is
available for as long as needed to satisfy these requirements.
e) Convey the object code using peer-to-peer transmission, provided
you inform other peers where the object code and Corresponding
Source of the work are being offered to the general public at no
charge under subsection 6d.
A separable portion of the object code, whose source code is excluded
from the Corresponding Source as a System Library, need not be
included in conveying the object code work.
A "User Product" is either (1) a "consumer product", which means any
tangible personal property which is normally used for personal, family,
or household purposes, or (2) anything designed or sold for incorporation
into a dwelling. In determining whether a product is a consumer product,
doubtful cases shall be resolved in favor of coverage. For a particular
product received by a particular user, "normally used" refers to a
typical or common use of that class of product, regardless of the status
of the particular user or of the way in which the particular user
actually uses, or expects or is expected to use, the product. A product
is a consumer product regardless of whether the product has substantial
commercial, industrial or non-consumer uses, unless such uses represent
the only significant mode of use of the product.
"Installation Information" for a User Product means any methods,
procedures, authorization keys, or other information required to install
and execute modified versions of a covered work in that User Product from
a modified version of its Corresponding Source. The information must
suffice to ensure that the continued functioning of the modified object
code is in no case prevented or interfered with solely because
modification has been made.
If you convey an object code work under this section in, or with, or
specifically for use in, a User Product, and the conveying occurs as
part of a transaction in which the right of possession and use of the
User Product is transferred to the recipient in perpetuity or for a
fixed term (regardless of how the transaction is characterized), the
Corresponding Source conveyed under this section must be accompanied
by the Installation Information. But this requirement does not apply
if neither you nor any third party retains the ability to install
modified object code on the User Product (for example, the work has
been installed in ROM).
The requirement to provide Installation Information does not include a
requirement to continue to provide support service, warranty, or updates
for a work that has been modified or installed by the recipient, or for
the User Product in which it has been modified or installed. Access to a
network may be denied when the modification itself materially and
adversely affects the operation of the network or violates the rules and
protocols for communication across the network.
Corresponding Source conveyed, and Installation Information provided,
in accord with this section must be in a format that is publicly
documented (and with an implementation available to the public in
source code form), and must require no special password or key for
unpacking, reading or copying.
7. Additional Terms.
"Additional permissions" are terms that supplement the terms of this
License by making exceptions from one or more of its conditions.
Additional permissions that are applicable to the entire Program shall
be treated as though they were included in this License, to the extent
that they are valid under applicable law. If additional permissions
apply only to part of the Program, that part may be used separately
under those permissions, but the entire Program remains governed by
this License without regard to the additional permissions.
When you convey a copy of a covered work, you may at your option
remove any additional permissions from that copy, or from any part of
it. (Additional permissions may be written to require their own
removal in certain cases when you modify the work.) You may place
additional permissions on material, added by you to a covered work,
for which you have or can give appropriate copyright permission.
Notwithstanding any other provision of this License, for material you
add to a covered work, you may (if authorized by the copyright holders of
that material) supplement the terms of this License with terms:
a) Disclaiming warranty or limiting liability differently from the
terms of sections 15 and 16 of this License; or
b) Requiring preservation of specified reasonable legal notices or
author attributions in that material or in the Appropriate Legal
Notices displayed by works containing it; or
c) Prohibiting misrepresentation of the origin of that material, or
requiring that modified versions of such material be marked in
reasonable ways as different from the original version; or
d) Limiting the use for publicity purposes of names of licensors or
authors of the material; or
e) Declining to grant rights under trademark law for use of some
trade names, trademarks, or service marks; or
f) Requiring indemnification of licensors and authors of that
material by anyone who conveys the material (or modified versions of
it) with contractual assumptions of liability to the recipient, for
any liability that these contractual assumptions directly impose on
those licensors and authors.
All other non-permissive additional terms are considered "further
restrictions" within the meaning of section 10. If the Program as you
received it, or any part of it, contains a notice stating that it is
governed by this License along with a term that is a further
restriction, you may remove that term. If a license document contains
a further restriction but permits relicensing or conveying under this
License, you may add to a covered work material governed by the terms
of that license document, provided that the further restriction does
not survive such relicensing or conveying.
If you add terms to a covered work in accord with this section, you
must place, in the relevant source files, a statement of the
additional terms that apply to those files, or a notice indicating
where to find the applicable terms.
Additional terms, permissive or non-permissive, may be stated in the
form of a separately written license, or stated as exceptions;
the above requirements apply either way.
8. Termination.
You may not propagate or modify a covered work except as expressly
provided under this License. Any attempt otherwise to propagate or
modify it is void, and will automatically terminate your rights under
this License (including any patent licenses granted under the third
paragraph of section 11).
However, if you cease all violation of this License, then your
license from a particular copyright holder is reinstated (a)
provisionally, unless and until the copyright holder explicitly and
finally terminates your license, and (b) permanently, if the copyright
holder fails to notify you of the violation by some reasonable means
prior to 60 days after the cessation.
Moreover, your license from a particular copyright holder is
reinstated permanently if the copyright holder notifies you of the
violation by some reasonable means, this is the first time you have
received notice of violation of this License (for any work) from that
copyright holder, and you cure the violation prior to 30 days after
your receipt of the notice.
Termination of your rights under this section does not terminate the
licenses of parties who have received copies or rights from you under
this License. If your rights have been terminated and not permanently
reinstated, you do not qualify to receive new licenses for the same
material under section 10.
9. Acceptance Not Required for Having Copies.
You are not required to accept this License in order to receive or
run a copy of the Program. Ancillary propagation of a covered work
occurring solely as a consequence of using peer-to-peer transmission
to receive a copy likewise does not require acceptance. However,
nothing other than this License grants you permission to propagate or
modify any covered work. These actions infringe copyright if you do
not accept this License. Therefore, by modifying or propagating a
covered work, you indicate your acceptance of this License to do so.
10. Automatic Licensing of Downstream Recipients.
Each time you convey a covered work, the recipient automatically
receives a license from the original licensors, to run, modify and
propagate that work, subject to this License. You are not responsible
for enforcing compliance by third parties with this License.
An "entity transaction" is a transaction transferring control of an
organization, or substantially all assets of one, or subdividing an
organization, or merging organizations. If propagation of a covered
work results from an entity transaction, each party to that
transaction who receives a copy of the work also receives whatever
licenses to the work the party's predecessor in interest had or could
give under the previous paragraph, plus a right to possession of the
Corresponding Source of the work from the predecessor in interest, if
the predecessor has it or can get it with reasonable efforts.
You may not impose any further restrictions on the exercise of the
rights granted or affirmed under this License. For example, you may
not impose a license fee, royalty, or other charge for exercise of
rights granted under this License, and you may not initiate litigation
(including a cross-claim or counterclaim in a lawsuit) alleging that
any patent claim is infringed by making, using, selling, offering for
sale, or importing the Program or any portion of it.
11. Patents.
A "contributor" is a copyright holder who authorizes use under this
License of the Program or a work on which the Program is based. The
work thus licensed is called the contributor's "contributor version".
A contributor's "essential patent claims" are all patent claims
owned or controlled by the contributor, whether already acquired or
hereafter acquired, that would be infringed by some manner, permitted
by this License, of making, using, or selling its contributor version,
but do not include claims that would be infringed only as a
consequence of further modification of the contributor version. For
purposes of this definition, "control" includes the right to grant
patent sublicenses in a manner consistent with the requirements of
this License.
Each contributor grants you a non-exclusive, worldwide, royalty-free
patent license under the contributor's essential patent claims, to
make, use, sell, offer for sale, import and otherwise run, modify and
propagate the contents of its contributor version.
In the following three paragraphs, a "patent license" is any express
agreement or commitment, however denominated, not to enforce a patent
(such as an express permission to practice a patent or covenant not to
sue for patent infringement). To "grant" such a patent license to a
party means to make such an agreement or commitment not to enforce a
patent against the party.
If you convey a covered work, knowingly relying on a patent license,
and the Corresponding Source of the work is not available for anyone
to copy, free of charge and under the terms of this License, through a
publicly available network server or other readily accessible means,
then you must either (1) cause the Corresponding Source to be so
available, or (2) arrange to deprive yourself of the benefit of the
patent license for this particular work, or (3) arrange, in a manner
consistent with the requirements of this License, to extend the patent
license to downstream recipients. "Knowingly relying" means you have
actual knowledge that, but for the patent license, your conveying the
covered work in a country, or your recipient's use of the covered work
in a country, would infringe one or more identifiable patents in that
country that you have reason to believe are valid.
If, pursuant to or in connection with a single transaction or
arrangement, you convey, or propagate by procuring conveyance of, a
covered work, and grant a patent license to some of the parties
receiving the covered work authorizing them to use, propagate, modify
or convey a specific copy of the covered work, then the patent license
you grant is automatically extended to all recipients of the covered
work and works based on it.
A patent license is "discriminatory" if it does not include within
the scope of its coverage, prohibits the exercise of, or is
conditioned on the non-exercise of one or more of the rights that are
specifically granted under this License. You may not convey a covered
work if you are a party to an arrangement with a third party that is
in the business of distributing software, under which you make payment
to the third party based on the extent of your activity of conveying
the work, and under which the third party grants, to any of the
parties who would receive the covered work from you, a discriminatory
patent license (a) in connection with copies of the covered work
conveyed by you (or copies made from those copies), or (b) primarily
for and in connection with specific products or compilations that
contain the covered work, unless you entered into that arrangement,
or that patent license was granted, prior to 28 March 2007.
Nothing in this License shall be construed as excluding or limiting
any implied license or other defenses to infringement that may
otherwise be available to you under applicable patent law.
12. No Surrender of Others' Freedom.
If conditions are imposed on you (whether by court order, agreement or
otherwise) that contradict the conditions of this License, they do not
excuse you from the conditions of this License. If you cannot convey a
covered work so as to satisfy simultaneously your obligations under this
License and any other pertinent obligations, then as a consequence you may
not convey it at all. For example, if you agree to terms that obligate you
to collect a royalty for further conveying from those to whom you convey
the Program, the only way you could satisfy both those terms and this
License would be to refrain entirely from conveying the Program.
13. Remote Network Interaction; Use with the GNU General Public License.
Notwithstanding any other provision of this License, if you modify the
Program, your modified version must prominently offer all users
interacting with it remotely through a computer network (if your version
supports such interaction) an opportunity to receive the Corresponding
Source of your version by providing access to the Corresponding Source
from a network server at no charge, through some standard or customary
means of facilitating copying of software. This Corresponding Source
shall include the Corresponding Source for any work covered by version 3
of the GNU General Public License that is incorporated pursuant to the
following paragraph.
Notwithstanding any other provision of this License, you have
permission to link or combine any covered work with a work licensed
under version 3 of the GNU General Public License into a single
combined work, and to convey the resulting work. The terms of this
License will continue to apply to the part which is the covered work,
but the work with which it is combined will remain governed by version
3 of the GNU General Public License.
14. Revised Versions of this License.
The Free Software Foundation may publish revised and/or new versions of
the GNU Affero General Public License from time to time. Such new versions
will be similar in spirit to the present version, but may differ in detail to
address new problems or concerns.
Each version is given a distinguishing version number. If the
Program specifies that a certain numbered version of the GNU Affero General
Public License "or any later version" applies to it, you have the
option of following the terms and conditions either of that numbered
version or of any later version published by the Free Software
Foundation. If the Program does not specify a version number of the
GNU Affero General Public License, you may choose any version ever published
by the Free Software Foundation.
If the Program specifies that a proxy can decide which future
versions of the GNU Affero General Public License can be used, that proxy's
public statement of acceptance of a version permanently authorizes you
to choose that version for the Program.
Later license versions may give you additional or different
permissions. However, no additional obligations are imposed on any
author or copyright holder as a result of your choosing to follow a
later version.
15. Disclaimer of Warranty.
THERE IS NO WARRANTY FOR THE PROGRAM, TO THE EXTENT PERMITTED BY
APPLICABLE LAW. EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT
HOLDERS AND/OR OTHER PARTIES PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY
OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO,
THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE PROGRAM
IS WITH YOU. SHOULD THE PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF
ALL NECESSARY SERVICING, REPAIR OR CORRECTION.
16. Limitation of Liability.
IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING
WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MODIFIES AND/OR CONVEYS
THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, INCLUDING ANY
GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING OUT OF THE
USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED TO LOSS OF
DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD
PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER PROGRAMS),
EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF
SUCH DAMAGES.
17. Interpretation of Sections 15 and 16.
If the disclaimer of warranty and limitation of liability provided
above cannot be given local legal effect according to their terms,
reviewing courts shall apply local law that most closely approximates
an absolute waiver of all civil liability in connection with the
Program, unless a warranty or assumption of liability accompanies a
copy of the Program in return for a fee.
END OF TERMS AND CONDITIONS
How to Apply These Terms to Your New Programs
If you develop a new program, and you want it to be of the greatest
possible use to the public, the best way to achieve this is to make it
free software which everyone can redistribute and change under these terms.
To do so, attach the following notices to the program. It is safest
to attach them to the start of each source file to most effectively
state the exclusion of warranty; and each file should have at least
the "copyright" line and a pointer to where the full notice is found.
Ddosify - Load testing tool for any web system.
Copyright (C) 2021 Ddosify
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU Affero General Public License as published
by the Free Software Foundation, either version 3 of the License, or
(at your option) any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU Affero General Public License for more details.
You should have received a copy of the GNU Affero General Public License
along with this program. If not, see <https://www.gnu.org/licenses/>.
Also add information on how to contact you by electronic and paper mail.
If your software can interact with users remotely through a computer
network, you should also make sure that it provides a way for users to
get its source. For example, if your program is a web application, its
interface could display a "Source" link that leads users to an archive
of the code. There are many ways you could offer source, and different
solutions will be better for different programs; see section 13 for the
specific requirements.
You should also get your employer (if you work as a programmer) or school,
if any, to sign a "copyright disclaimer" for the program, if necessary.
For more information on this, and how to apply and follow the GNU AGPL, see
<https://www.gnu.org/licenses/>.
================================================
FILE: README.md
================================================
<div align="center">
<img src="https://raw.githubusercontent.com/getanteon/anteon/master/assets/anteon-logo-db.svg#gh-dark-mode-only" alt="Anteon logo dark" width="336px" /><br />
<img src="https://raw.githubusercontent.com/getanteon/anteon/master/assets/anteon-logo-wb.svg#gh-light-mode-only" alt="Anteon logo light" width="336px" /><br />
</div>
<h2 align="center">eBPF-powered Kubernetes Monitoring and Performance Testing</h2>
<p align="center">
<img src="https://raw.githubusercontent.com/getanteon/anteon/master/assets/anteon_service_map.png" alt="Anteon Kubernetes Monitoring Service Map" />
<p align="center">
<a href="https://github.com/getanteon/anteon/releases" target="_blank"><img src="https://img.shields.io/github/v/release/getanteon/anteon?style=for-the-badge&logo=github&color=orange" alt="anteon latest version" /></a>
<a href="https://github.com/getanteon/anteon/blob/master/LICENSE" target="_blank"><img src="https://img.shields.io/badge/LICENSE-AGPL--3.0-orange?style=for-the-badge&logo=none" alt="Anteon license" /></a>
<a href="https://discord.com/invite/9KdnrSUZQg" target="_blank"><img src="https://img.shields.io/discord/898523141788287017?style=for-the-badge&logo=discord&label=DISCORD" alt="Anteon discord server" /></a>
<a href="https://landscape.cncf.io/?item=observability-and-analysis--observability--anteon" target="_blank"><img src="https://img.shields.io/badge/CNCF%20Landscape-5699C6?style=for-the-badge&logo=cncf&label=cncf" alt="cncf landscape" /></a>
<a href="https://gurubase.io/g/anteon" target="_blank"><img alt="Anteon Guru" src="https://img.shields.io/badge/Anteon%20Guru-F40003?style=for-the-badge&label=Gurubase&color=%23006BFF">
</a>
</p>
<i>Anteon automatically generates Service Map of your K8s cluster without code instrumentation or sidecars. So you can easily find the bottlenecks in your system. Red lines indicate the high latency between services.</i>
</p>
<h2 align="center">
<a href="https://demo.getanteon.com/" target="_blank">Live Demo</a> •
<a href="https://getanteon.com/docs" target="_blank">Documentation</a> •
<a href="https://discord.com/invite/9KdnrSUZQg" target="_blank">Discord</a>
</h2>
## 🐝 What is Anteon?
**Anteon** (formerly Ddosify) is an [open-source](https://github.com/getanteon/anteon), eBPF-based **Kubernetes Monitoring** and **Performance Testing** platform.
### 🔎 Kubernetes Monitoring
- **Automatic Service Map Creation:** Anteon automatically creates a **service map** of your cluster without code instrumentation or sidecars. So you can easily [find the bottlenecks](https://getanteon.com/docs/kubernetes-monitoring/#finding-bottlenecks) in your system.
- **Performance Insights:** It helps you spot issues like services taking too long to respond or slow SQL queries.
- **Real-Time Metrics:** The platform tracks and displays live data on your cluster instances CPU, memory, disk, and network usage.
- **Ease of Use:** You don't need to change any code, restart services, or add extra components (like sidecars) to get these insights, thanks to the [eBPF based agent (Alaz)](https://github.com/getanteon/alaz).
- **Alerts for Anomalies:** If something unusual, like a sudden increase in CPU usage, happens in your Kubernetes (K8s) cluster, Anteon immediately sends alerts to your Slack.
- **Seamless Integration with Performance Testing:** Performance testing is natively integrated with Kubernetes monitoring for a unified experience.
<p align="center">
<img src="https://raw.githubusercontent.com/getanteon/anteon/master/assets/anteon_metrics.png" alt="Anteon Kubernetes Monitoring Metrics" />
<i>Anteon tracks and displays live data on your cluster instances CPU, memory, disk, and network usage.</i>
</p>
### 🔨 Performance Testing
- **Multi-Location Based:** Generate load/performance tests from over 25 countries worldwide.
- **Easy Scenario Builder:** Create test scenarios easily without writing any code.
- **Seamless Integration with Kubernetes Monitoring:** Performance testing is natively integrated with Kubernetes monitoring for a unified experience.
- **Postman Integration:** Import tests directly from Postman, making it convenient for those already using Postman for API development and testing.
<p align="center">
<img src="https://raw.githubusercontent.com/getanteon/anteon/master/assets/anteon_performance_testing.png" alt="Anteon Kubernetes Monitoring Metrics" />
<i>Anteon Performance Testing generates load from worldwide with no-code scenario builder.</i>
</p>
## 📚 Documentation
- [🐝 Anteon Stack](https://getanteon.com/docs/stack/)
- [🚀 Getting Started](https://getanteon.com/docs/getting-started/)
- [🔎 Kubernetes Monitoring](https://getanteon.com/docs/kubernetes-monitoring/)
- [🔨 Performance Testing](https://getanteon.com/docs/performance-testing/)
## ✨ Ask Anteon Guru
If you don’t want to get lost in the documentation, you can ask [Anteon Guru](https://gurubase.io/g/anteon) directly. It's an Anteon-focused AI that uses information from the Anteon Website and Anteon GitHub Repository to answer your questions.
<a href="https://gurubase.io/g/anteon" target="_blank"><img alt="Anteon Guru" src="https://img.shields.io/badge/ASK%20ANTEON%20GURU-F40003?color=%23006BFF&style=for-the-badge"></a>
## ℹ️ About This Repository
This repository includes the source code for the Anteon Load Engine (Ddosify). You can access Docker Images for the Anteon Engine and Self Hosted on <a href="https://hub.docker.com/u/ddosify" target="_blank">Docker Hub</a>. Since Anteon is a Verified Publisher on Docker Hub, there isn't any pull limits.
- [Ddosify documentation](https://github.com/getanteon/anteon/tree/master/ddosify_engine) provides information on the installation, usage, and features of the Anteon Load Engine.
- The [Self-Hosted](https://github.com/getanteon/anteon/tree/master/selfhosted) folder contains installation instructions for the Self-Hosted version.
- [Anteon eBPF agent (Alaz)](https://github.com/getanteon/alaz) has its own repository.
See the [Anteon website](https://getanteon.com/) for more information.
## 🛠️ Contributing
See our [Contribution Guide](./CONTRIBUTING.md) and please follow the [Code of Conduct](./CODE_OF_CONDUCT.md) in all your interactions with the project.
Thanks goes to these wonderful people!
<a href="https://github.com/getanteon/anteon/graphs/contributors">
<img src="https://contrib.rocks/image?repo=getanteon/anteon" />
</a>
Made with [contrib.rocks](https://contrib.rocks).
### 📨 Communication
You can join our [Discord Server](https://discord.com/invite/9KdnrSUZQg) for issues, feature requests, feedbacks or anything else.
### ⚠️ Disclaimer
Anteon is created for testing the performance of web applications. Users must be the owner of the target system. Using it for harmful purposes is extremely forbidden. Anteon team & company is not responsible for its’ usages and consequences.
## 📜 License
Licensed under the [AGPLv3](LICENSE)
================================================
FILE: SECURITY.md
================================================
# Anteon Security Policy 🐝
We are committed to maintaining the security and integrity of [Anteon](https://github.com/getanteon/anteon), and we appreciate your help in identifying and addressing potential vulnerabilities.
This document outlines the process for reporting security issues, as well as our commitment to addressing them in a timely manner.
## Supported Versions
We provide security updates for the following versions:
| Version | Supported |
| ---------- | --------- |
| > `0.15.x` | ✅ |
⚠️ Please note that older versions may not receive security updates. We encourage you to use the [latest version](https://github.com/getanteon/anteon/releases) of the software to benefit from the most recent security enhancements.
## Reporting a Vulnerability
If you believe you have discovered a security vulnerability, please follow these steps to report it:
1. Do not create a public issue on GitHub. Disclosing security vulnerabilities publicly can put users at risk.
2. Send an email to our security team at security@getanteon.com with a detailed description of the vulnerability, including the steps to reproduce it, and any relevant information about your environment (e.g., OS, Go version, etc.).
3. If possible, provide a minimal code sample or test case that demonstrates the vulnerability.
4. Allow us a reasonable amount of time to investigate and address the issue before publicly disclosing it. We will make every effort to resolve the issue as soon as possible.
We keep you informed of our progress in addressing the issue.
## Our Commitment
We take security issues very seriously and are committed to working with you to address any vulnerabilities that you report. We will:
- Investigate and validate reported vulnerabilities.
- Work on a fix or mitigation for the issue.
- Provide regular updates on our progress in resolving the issue.
- Notify you when the issue has been resolved and provide details on the changes made.
- We appreciate your assistance in maintaining the security of Anteon, and we thank you for your responsible disclosure.
================================================
FILE: assets/ddosify.profile
================================================
export TERM=xterm-256color
NC='\033[0m'
printf "\e[38;5;172m\n"
cat<<ddosify
__ __ _ ____
____/ /____/ /____ _____ (_)/ __/__ __
/ __ // __ // __ \ / ___// // /_ / / / /
/ /_/ // /_/ // /_/ /(__ )/ // __// /_/ /
\__,_/ \__,_/ \____//____//_//_/ \__, /
/____/
ddosify
printf "Simple usage:${NC} ddosify -t https://getanteon.com\n\n"
================================================
FILE: ddosify_engine/.dockerignore
================================================
dist/
*.yml
*.out
Jenkinsfile
README.md
================================================
FILE: ddosify_engine/.golangci.yml
================================================
linters:
enable:
- lll
- golint
- misspell
linters-settings:
lll:
# max line length, lines longer will be reported. Default is 120.
# '\t' is counted as 1 character by default, and can be changed with the tab-width option
line-length: 120
# tab width in spaces. Default to 1.
tab-width: 1
golint:
min-confidence: 0.85
misspell:
locale: US
================================================
FILE: ddosify_engine/.goreleaser.yml
================================================
project_name: ddosify
before:
hooks:
- go mod tidy
builds:
- env:
- CGO_ENABLED=0
goos:
- linux
- windows
- darwin
goarch:
- 386
- amd64
- arm
- arm64
goarm:
- 6
ldflags:
- -s -w -X main.GitVersion={{ .Tag }} -X main.GitCommit={{ .ShortCommit }} -X main.BuildDate={{ .CommitDate }}
ignore:
- goos: darwin
goarch: 386
- goos: darwin
goarch: arm
goarm: 7
- goos: darwin
goarch: arm
goarm: 6
- goos: darwin
goarch: arm
goarm: 5
archives:
- format_overrides:
- goos: windows
format: zip
files:
- README.md
- LICENSE*
universal_binaries:
- replace: true
checksum:
name_template: 'checksums.txt'
snapshot:
name_template: "{{ incpatch .Tag }}-next"
changelog:
sort: asc
use: github
filters:
exclude:
- '^docs:'
- '^test:'
- Merge pull request
- Merge branch
- go mod tidy
brews:
- tap:
owner: ddosify
name: homebrew-tap
folder: Formula
homepage: https://ddosify.com
description: High-performance load testing tool, written in Golang.
license: AGPL-3.0-only
skip_upload: false
test: |
system "#{bin}/ddosify --help"
dependencies:
- name: go
type: optional
install: |-
bin.install "ddosify"
commit_author:
name: ddosifyadmin
email: admin@ddosify.com
dockers:
- image_templates:
- 'ddosify/ddosify:{{ .Tag }}-amd64'
dockerfile: Dockerfile.release
use: buildx
build_flag_templates:
- "--pull"
- "--label=org.opencontainers.image.created={{.Date}}"
- "--label=org.opencontainers.image.name={{.ProjectName}}"
- "--label=org.opencontainers.image.revision={{.FullCommit}}"
- "--label=org.opencontainers.image.version={{.Tag}}"
- "--label=org.opencontainers.image.source={{.GitURL}}"
- "--platform=linux/amd64"
extra_files:
- assets/ddosify.profile
- image_templates:
- 'ddosify/ddosify:{{ .Tag }}-arm64'
dockerfile: Dockerfile.release
use: buildx
build_flag_templates:
- "--pull"
- "--label=org.opencontainers.image.created={{.Date}}"
- "--label=org.opencontainers.image.name={{.ProjectName}}"
- "--label=org.opencontainers.image.revision={{.FullCommit}}"
- "--label=org.opencontainers.image.version={{.Tag}}"
- "--label=org.opencontainers.image.source={{.GitURL}}"
- "--platform=linux/arm64"
extra_files:
- assets/ddosify.profile
goarch: arm64
docker_manifests:
- name_template: 'ddosify/ddosify:{{ .Tag }}'
image_templates:
- 'ddosify/ddosify:{{ .Tag }}-amd64'
- 'ddosify/ddosify:{{ .Tag }}-arm64'
- name_template: 'ddosify/ddosify:latest'
image_templates:
- 'ddosify/ddosify:{{ .Tag }}-amd64'
- 'ddosify/ddosify:{{ .Tag }}-arm64'
nfpms:
- file_name_template: '{{ .ProjectName }}_{{ .Arch }}{{ if .Arm }}v{{ .Arm }}{{ end }}'
id: packages
homepage: https://ddosify.com
description: High-performance load testing tool, written in Golang.
maintainer: Ddosify <admin@ddosify.com>
license: AGPL-3.0-only
vendor: Ddosify
formats:
- apk
- deb
- rpm
release:
footer: |
## More? 🚀
- Join our [Discord server](https://discord.com/invite/9KdnrSUZQg)
- Follow us on [Twitter](https://twitter.com/getanteon)
================================================
FILE: ddosify_engine/Dockerfile
================================================
FROM golang:1.18.1-alpine as builder
WORKDIR /app
COPY . ./
RUN go mod download
RUN CGO_ENABLED=0 GOOS=linux go build -o /app/ddosify main.go
FROM alpine:3.15.4
ENV ENV="/root/.ashrc"
WORKDIR /root
RUN apk --no-cache add ca-certificates
COPY --from=builder /app/ddosify /bin/
COPY assets/ddosify.profile /tmp/profile
RUN cat /tmp/profile >> "$ENV"
================================================
FILE: ddosify_engine/Dockerfile.dev
================================================
FROM golang:1.18.1
WORKDIR /workspace
COPY go.mod ./
COPY go.sum ./
ENV GOPATH /go
ENV GOBIN /go/bin
ENV LC_ALL=C.UTF-8
ENV LANG=C.UTF-8
ENV SHELL /bin/zsh
RUN apt update && apt install -y git zsh vim fzf locales gcc musl-dev curl iputils-ping telnet graphviz bc jq && rm -rf /var/lib/apt/lists/*
RUN sh -c "$(curl -fsSL https://raw.github.com/ohmyzsh/ohmyzsh/master/tools/install.sh)"
RUN git clone https://github.com/zsh-users/zsh-syntax-highlighting.git ${ZSH_CUSTOM:-~/.oh-my-zsh/custom}/plugins/zsh-syntax-highlighting
RUN git clone https://github.com/zsh-users/zsh-autosuggestions ${ZSH_CUSTOM:-~/.oh-my-zsh/custom}/plugins/zsh-autosuggestions
RUN curl -sSfL https://raw.githubusercontent.com/golangci/golangci-lint/master/install.sh | sh -s -- -b $(go env GOPATH)/bin v1.45.2
COPY .devcontainer/.zshrc /root/.zshrc
RUN go install -v golang.org/x/tools/gopls@v0.8.3
RUN go install -v github.com/rogpeppe/godef@v1.1.2
RUN go install -v github.com/rakyll/gotest@v0.0.6
RUN go install -v github.com/ramya-rao-a/go-outline@1.0.0
RUN go install -v github.com/go-delve/delve/cmd/dlv@v1.8.1
RUN go install -v golang.org/x/perf/cmd/benchstat@v0.0.0-20221222172245-91a04616dc65
RUN go mod download
CMD [ "zsh" ]
================================================
FILE: ddosify_engine/Dockerfile.release
================================================
FROM alpine:3.15.4
ENV ENV="/root/.ashrc"
WORKDIR /root
RUN apk --no-cache add ca-certificates
COPY ddosify /bin/
COPY assets/ddosify.profile /tmp/profile
RUN cat /tmp/profile >> "$ENV"
================================================
FILE: ddosify_engine/Jenkinsfile
================================================
pipeline {
agent {
dockerfile {
filename '.devcontainer/Dockerfile.dev'
}
}
environment {
PROXY_TEST_USERNAME = credentials('proxy-test-username')
PROXY_TEST_PASSWORD = credentials('proxy-test-password')
}
options {
disableConcurrentBuilds()
}
stages {
stage('Unit Test') {
steps {
sh 'go test -coverpkg=./... -coverprofile=coverage.out ./... -timeout 100s -parallel 4'
}
}
stage('Coverage') {
steps {
sh 'go tool cover -html=coverage.out -o coverage.html'
archiveArtifacts '*.html'
sh 'echo "Coverage Report: ${BUILD_URL}artifact/coverage.html"'
sh '''t=$(go tool cover -func coverage.out | grep total | tail -1 | awk \'{print substr($3, 1, length($3)-1)}\')
if [ "${t%.*}" -lt 80 ]; then
echo "Coverage failed ${t}/80"
exit 1
fi'''
}
}
stage('Main Race Condition') {
steps {
lock('multi_branch_server') {
sh 'go run --race main.go -t https://servdown.com/ -d 1 -n 1500'
sh 'go run --race main.go -config config/config_testdata/race_configs/step_assertions_stdout.json'
sh 'go run --race main.go -config config/config_testdata/race_configs/step_assertions_stdout_json.json'
sh 'go run --race main.go -config config/config_testdata/race_configs/capture_envs.json'
sh 'go run --race main.go -config config/config_testdata/race_configs/global_envs.json'
sh 'go test -race -run ^TestDynamicVariableRace$ go.ddosify.com/ddosify/core/scenario/scripting/injection'
}
}
}
}
post {
unstable {
slackSend(channel: '#jenkins', color: 'danger', message: "${currentBuild.currentResult}: ${currentBuild.fullDisplayName} - ${BUILD_URL}")
}
failure {
slackSend(channel: '#jenkins', color: 'danger', message: "${currentBuild.currentResult}: ${currentBuild.fullDisplayName} - ${BUILD_URL}")
}
}
}
================================================
FILE: ddosify_engine/Jenkinsfile_benchmark
================================================
pipeline {
agent {
dockerfile {
label 'performance-test'
filename '.devcontainer/Dockerfile.dev'
}
}
options {
disableConcurrentBuilds()
}
stages {
stage('Performance Test') {
steps {
lock('multi_branch_server_benchmark') {
sh 'set -o pipefail && GOCACHE=/tmp/ go test -benchmem -timeout 60m -benchtime=1x -cpuprof=cpu.out -memprof=mem.out -tracef=trace.out -run=^$ -bench ^BenchmarkEngines/$ -count 1 -runN=10 | tee gobench_branch.txt'
}
}
}
stage('Performance Test Develop') {
when {
// Run on only PR
allOf {
expression { env.CHANGE_ID != null }
expression { env.CHANGE_TARGET != null }
expression { env.CHANGE_BRANCH != 'develop' }
}
}
steps {
lock('multi_branch_server_benchmark') {
sh 'git fetch origin develop:develop || git checkout develop && git pull && set -o pipefail && GOCACHE=/tmp/ go test -benchmem -timeout 60m -benchtime=1x -cpuprof=cpu_develop.out -memprof=mem_develop.out -tracef=trace_develop.out -run=^$ -bench ^BenchmarkEngines/$ -count 1 -runN=10 | tee gobench_develop.txt'
sh "git checkout ${BRANCH_NAME}"
sh "benchstat -alpha 1.01 --sort delta gobench_develop.txt gobench_branch.txt | tee gobench_branch_result.txt"
sh "benchstat -alpha 1.01 --sort delta --html gobench_develop.txt gobench_branch.txt > 00_gobench_result.html && echo ${BUILD_URL}artifact/00_gobench_result.html"
withCredentials([usernamePassword(credentialsId: 'ddosifyadmin_comment_github_access', passwordVariable: 'GITHUB_TOKEN', usernameVariable: 'GITHUB_USERNAME')]) {
sh "./scripts/testing/benchstat.sh ${GITHUB_TOKEN} ${env.CHANGE_ID}"
}
}
}
}
}
post {
always {
archiveArtifacts artifacts: '*.out', fingerprint: true
archiveArtifacts artifacts: 'gobench_*.txt', fingerprint: true
archiveArtifacts artifacts: '00_gobench_result.html', fingerprint: true, allowEmptyArchive: true
}
unstable {
slackSend(channel: '#jenkins', color: 'danger', message: "${currentBuild.currentResult}: ${currentBuild.fullDisplayName} - ${BUILD_URL}")
}
failure {
slackSend(channel: '#jenkins', color: 'danger', message: "${currentBuild.currentResult}: ${currentBuild.fullDisplayName} - ${BUILD_URL}")
}
}
}
================================================
FILE: ddosify_engine/README.md
================================================
<div align="center">
<img src="https://raw.githubusercontent.com/getanteon/anteon/master/assets/anteon-logo-db.svg#gh-dark-mode-only" alt="Anteon logo dark" width="336px" /><br />
<img src="https://raw.githubusercontent.com/getanteon/anteon/master/assets/anteon-logo-wb.svg#gh-light-mode-only" alt="Anteon logo light" width="336px" /><br />
</div>
<h1 align="center">Ddosify: A high-performance load testing tool</h1>
<p align="center">
<a href="https://app.codecov.io/gh/ddosify/ddosify" target="_blank"><img src="https://img.shields.io/codecov/c/github/ddosify/ddosify?style=for-the-badge&logo=codecov" alt="go coverage" /></a>
<a href="https://goreportcard.com/report/github.com/getanteon/ddosify" target="_blank"><img src="https://goreportcard.com/badge/github.com/getanteon/ddosify?style=for-the-badge&logo=go" alt="go report" /></a>
<a href="https://github.com/getanteon/anteon/blob/master/LICENSE" target="_blank"><img src="https://img.shields.io/badge/LICENSE-AGPL--3.0-orange?style=for-the-badge&logo=none" alt="ddosify license" /></a>
<a href="https://discord.com/invite/9KdnrSUZQg" target="_blank"><img src="https://img.shields.io/discord/898523141788287017?style=for-the-badge&logo=discord&label=DISCORD" alt="ddosify discord server" /></a>
<a href="https://hub.docker.com/r/ddosify/ddosify" target="_blank"><img src="https://img.shields.io/docker/v/ddosify/ddosify?style=for-the-badge&logo=docker&label=docker&sort=semver" alt="ddosify docker image" /></a>
</p>
<p align="center">
<img src="https://raw.githubusercontent.com/getanteon/anteon/master/assets/ddosify-quick-start.gif" alt="Ddosify - High-performance load testing tool quick start" />
</p>
<details>
<summary>Table of Contents</summary>
<!-- vim-markdown-toc GFM -->
- [Features](#features)
- [Tutorials / Blog Posts](#tutorials--blog-posts)
- [Installation](#installation)
- [Docker](#docker)
- [Docker Extension](#docker-extension)
- [Homebrew Tap (macOS and Linux)](#homebrew-tap-macos-and-linux)
- [Linux](#linux)
- [Redhat (Fedora, CentOS, RHEL, etc.)](#redhat-fedora-centos-rhel-etc)
- [Debian (Ubuntu, Linux Mint, etc.)](#debian-ubuntu-linux-mint-etc)
- [Alpine](#alpine)
- [FreeBSD](#freebsd)
- [Windows Executable](#windows-executable)
- [Using the convenience script (macOS and Linux)](#using-the-convenience-script-macos-and-linux)
- [Go install from source (macOS, FreeBSD, Linux, Windows)](#go-install-from-source-macos-freebsd-linux-windows)
- [Quick Start](#quick-start)
- [Advanced Usage](#advanced-usage)
- [CLI Flags](#cli-flags)
- [Load Types](#load-types)
- [Linear](#linear)
- [Incremental](#incremental)
- [Waved](#waved)
- [Configuration](#configuration)
- [Parameterization (Dynamic Variables)](#parameterization-dynamic-variables)
- [Parameterization on URL](#parameterization-on-url)
- [Parameterization on Headers](#parameterization-on-headers)
- [Parameterization on Payload (Body)](#parameterization-on-payload-body)
- [Parameterization on Basic Authentication](#parameterization-on-basic-authentication)
- [Parameterization on Config File](#parameterization-on-config-file)
- [Environment Variables](#environment-variables)
- [Assertion](#assertion)
- [Keywords](#keywords)
- [Functions](#functions)
- [Operators](#operators)
- [Assertion Examples](#assertion-examples)
- [Success Criteria (Pass / Fail)](#success-criteria-pass--fail)
- [Difference Between Success Criteria and Step Assertions](#difference-between-success-criteria-and-step-assertions)
- [Keywords](#keywords-1)
- [Functions](#functions-1)
- [Examples](#examples)
- [Correlation](#correlation)
- [Capture with json_path](#capture-with-json_path)
- [Capture with XPath on XML](#capture-with-xpath-on-xml)
- [Capture with XPath on HTML](#capture-with-xpath-on-html)
- [Capture with Regular Expressions](#capture-with-regular-expressions)
- [Capture Header Value](#capture-header-value)
- [Scenario-Scoped Variables](#scenario-scoped-variables)
- [Overall Config and Injection](#overall-config-and-injection)
- [Test Data Set](#test-data-set)
- [Cookies](#cookies)
- [Initial / Custom Cookies](#initial--custom-cookies)
- [Cookie Capture](#cookie-capture)
- [Cookie Assertion](#cookie-assertion)
- [Common Issues](#common-issues)
- [macOS Security Issue](#macos-security-issue)
- [OS Limit - Too Many Open Files](#os-limit---too-many-open-files)
- [Contributing](#contributing)
- [Communication](#communication)
- [More](#more)
- [Disclaimer](#disclaimer)
- [License](#license)
<!-- vim-markdown-toc -->
</details>
- [📥 Installation](https://getanteon.com/docs/ddosify/installation/)
- [🚀 Quickstart Guide](https://getanteon.com/docs/ddosify/quickstart/)
- [⚙️ Configuration](https://getanteon.com/docs/ddosify/configuration/)
- [✨ Examples](https://getanteon.com/docs/ddosify/examples/)
- ✅ **[Scenario-Based](#config-file)** - Create your flow in a JSON file. Without a line of code!
- ✅ **[Different Load Types](#load-types)** - Test your system's limits across different load types.
- ✅ **[Parameterization](#parameterization-dynamic-variables)** - Use dynamic variables just like on Postman.
- ✅ **[Correlation](#correlation)** - Extract variables from earlier phases and pass them on to the following ones.
- ✅ **[Test Data](#test-data-set)** - Import test data from CSV and use it in the scenario.
- ✅ **[Assertion](#assertion)** - Verify that the response matches your expectations.
- ✅ **[Success Criteria](#success-criteria-pass--fail)** - Set the success criteria for your test.
- ✅ **[Cookies](#cookies)** - Pass cookies through steps and set initial cookies if you want.
- ✅ **Widely Used Protocols** - Currently supporting _HTTP, HTTPS, HTTP/2_. Other protocols are on the way.
## Tutorials / Blog Posts
- [Testing the Performance of User Authentication Flow](https://getanteon.com/blog/testing-the-performance-of-user-authentication-flow)
- [Load Testing a Fintech API with CSV Test Data Import](https://getanteon.com/blog/load-testing-a-fintech-exchange-api-with-csv-test-data-import)
## Installation
`ddosify` is available via [Docker](https://hub.docker.com/r/ddosify/ddosify), [Docker Extension](https://hub.docker.com/extensions/ddosify/ddosify-docker-extension), [Homebrew Tap](#homebrew-tap-macos-and-linux), and downloadable as pre-compiled binaries from the [releases page](https://github.com/getanteon/anteon/releases/tag/v1.0.6) for macOS, Linux and Windows.
For shell auto completions, see [Ddosify Completions](https://github.com/getanteon/anteon/tree/master/ddosify_engine/completions).
### Docker
```bash
docker run -it --rm ddosify/ddosify
```
### Docker Extension
Run Ddosify on Docker Desktop with Ddosify Docker extension. More details [here](https://hub.docker.com/extensions/ddosify/ddosify-docker-extension).
### Homebrew Tap (macOS and Linux)
```bash
brew install ddosify/tap/ddosify
```
### Linux
- For ARM architectures change `ddosify_amd64` to `ddosify_arm64` or `ddosify_armv6`.
- Superuser privilege is required.
#### Redhat (Fedora, CentOS, RHEL, etc.)
```bash
rpm -i https://github.com/ddosify/ddosify/releases/download/v1.0.6/ddosify_amd64.rpm
```
#### Debian (Ubuntu, Linux Mint, etc.)
```bash
wget https://github.com/ddosify/ddosify/releases/download/v1.0.6/ddosify_amd64.deb
dpkg -i ddosify_amd64.deb
```
#### Alpine
```bash
wget https://github.com/ddosify/ddosify/releases/download/v1.0.6/ddosify_amd64.apk
apk add --allow-untrusted ddosify_amd64.apk
```
### FreeBSD
```bash
pkg install ddosify
```
### Windows Executable
- Download zip file for your architecture from the [releases page](https://github.com/ddosify/ddosify/releases/tag/v1.0.6).
- For example, download ddosify version `vx.x.x` with amd64 architecture: `ddosify_x.x.x.zip_windows_amd64`
- Unzip `ddosify_x.x.x_windows_amd64.zip`
- Open Powershell or CMD (Command Prompt) and change directory to unzipped folder: `ddosify_x.x.x_windows_amd64`
- Run ddosify:
```bash
.\ddosify.exe -t https://getanteon.com
```
### Using the convenience script (macOS and Linux)
- The script requires root or sudo privileges to move ddosify binary to `/usr/local/bin`.
- The script attempts to detect your operating system (macOS or Linux) and architecture (arm64, x86, amd64) to download the appropriate binary from the [releases page](https://github.com/getanteon/anteon/tree/master/ddosify_engine/completions).
- By default, the script installs the latest version of `ddosify`.
- If you have problems, check [common issues](#common-issues).
- Required packages: `curl` and `sudo`
```bash
curl -sSfL https://raw.githubusercontent.com/getanteon/anteon/master/scripts/install.sh | sh
```
### Go install from source (macOS, FreeBSD, Linux, Windows)
_Minimum supported Go version is 1.18_
```bash
go install -v go.ddosify.com/ddosify@latest
```
## Quick Start
This section aims to show you how to use Ddosify easily without deep dive into its details.
1. ### Simple load test
`ddosify -t https://getanteon.com`
The above command runs a load test with the default value that is 100 requests in 10 seconds.
2. ### Using some of the features
`ddosify -t https://getanteon.com -n 1000 -d 20 -m PUT -T 7 -P http://proxy_server.com:80`
Ddosify sends a total of _1000_ _PUT_ requests to *https://getanteon.com* over proxy _http://proxy_server.com:80_ in _20_ seconds with a timeout of _7_ seconds per request.
3. ### Usage for CI/CD pipelines (JSON output)
`ddosify -t https://getanteon.com -o stdout-json | jq .avg_duration`
Ddosify outputs the result in JSON format. Then `jq` (or any other command-line JSON processor) fetches the `avg_duration`. The rest depends on your CI/CD flow logic.
4. ### Scenario based load test
`ddosify -config config_examples/config.json`
Ddosify first sends _HTTP/2 POST_ request to *https://getanteon.com/endpoint_1* using basic auth credentials _test_user:12345_ over proxy _http://proxy_host.com:proxy_port_ and with a timeout of _3_ seconds. Once the response is received, HTTPS GET request will be sent to *https://getanteon.com/endpoint_2* along with the payload included in _config_examples/payload.txt_ file with a timeout of 2 seconds. This flow will be repeated _20_ times in _5_ seconds and response will be written to _stdout_.
5. ### Load test with Dynamic Variables (Parameterization)
`ddosify -t https://getanteon.com/{{_randomInt}} -d 10 -n 100 -h 'User-Agent: {{_randomUserAgent}}' -b '{"city": "{{_randomCity}}"}'`
Ddosify sends a total of _100_ _GET_ requests to *https://getanteon.com/{{_randomInt}}* in _10_ seconds. `{{_randomInt}}` path generates random integers between 1 and 1000 in every request. Dynamic variables can be used in _URL_, _headers_, _payload (body)_ and _basic authentication_. In this example, Ddosify generates a random user agent in the header and a random city in the body. The full list of the dynamic variables can be found in the [docs](https://getanteon.com/docs/performance-testing/dynamic-variables-parametrization/).
6. ### Correlation (Captured Variables)
`ddosify -config ddosify_config_correlation.json`
Ddosify allows you to specify variables at the global level and use them throughout the scenario, as well as extract variables from previous steps and inject them to the next steps in each iteration individually. You can inject those variables in requests _url_, _headers_ and _payload(body)_. The example config can be found in [correlation-config-example](#Correlation).
7. ### Test Data
`ddosify -config ddosify_data_csv.json`
Ddosify allows you to load test data from a file, tag specific columns for later use. You can inject those variables in requests _url_, _headers_ and _payload (body)_. The example config can be found in [test-data-example](#test-data-set).
## Advanced Usage
You can configure your load test by the CLI options or a config file. Config file supports more features than the CLI. For example, you can't create a scenario-based load test with CLI options.
### CLI Flags
```bash
ddosify [FLAG]
```
| Flag | Description | Type | Default | Required |
| ----------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------- | -------- | -------- | -------- |
| `-t` | Target website URL. Example: https://getanteon.com | `string` | - | Yes |
| `-n` | Total iteration count | `int` | `100` | No |
| `-d` | Test duration in seconds. | `int` | `10` | No |
| `-m` | Request method. Available methods for HTTP(s) are _GET, POST, PUT, DELETE, HEAD, PATCH, OPTIONS_ | `string` | `GET` | No |
| `-b` | The payload of the network packet. AKA body for the HTTP. | `string` | - | No |
| `-a` | Basic authentication. Usage: `-a username:password` | `string` | - | No |
| `-h` | Headers of the request. You can provide multiple headers with multiple `-h` flag. Usage: `-h 'Accept: text/html'` | `string` | - | No |
| `-T` | Timeout of the request in seconds. | `int` | `5` | No |
| `-P` | Proxy address as host:port. `-P 'http://user:pass@proxy_host.com:port'` | `string` | - | No |
| `-o` | Test result output destination. Supported outputs are [*stdout, stdout-json*] Other output types will be added. | `string` | `stdout` | No |
| `-l` | [Type](#load-types) of the load test. Ddosify supports 3 load types. | `string` | `linear` | No |
| <span style="white-space: nowrap;">`--config`</span> | [Config File](#config-file) of the load test. | `string` | - | No |
| <span style="white-space: nowrap;">`--version`</span> | Prints version, git commit, built date (utc), go information and quit | - | - | No |
| <span style="white-space: nowrap;">`--cert_path`</span> | A path to a certificate file (usually called 'cert.pem') | - | - | No |
| <span style="white-space: nowrap;">`--cert_key_path`</span> | A path to a certificate key file (usually called 'key.pem') | - | - | No |
| <span style="white-space: nowrap;">`--debug`</span> | Iterates the scenario once and prints curl-like verbose result. Note that this flag overrides json config. | `bool` | `false` | No |
### Load Types
#### Linear
```bash
ddosify -t https://getanteon.com -l linear
```
Result:

_Note:_ If the iteration count is too low for the given duration, the test might be finished earlier than you expect.
#### Incremental
```bash
ddosify -t https://getanteon.com -l incremental
```
Result:

#### Waved
```bash
ddosify -t https://getanteon.com -l waved
```
Result:

### Configuration
Configuration file lets you use all the capabilities of Ddosify.
The features you can use by config file:
- Scenario creation
- Environment variables
- Correlation
- Assertions
- Cookies
- Custom load type creation
- Payload from a file
- Multipart/form-data payload
- Extra connection configuration
- HTTP2 support
Usage:
```bash
ddosify -config <json_config_path>
```
There is an example config file at [config_examples/config.json](https://github.com/getanteon/anteon/blob/master/ddosify_engine/config_examples/config.json). This file contains all of the parameters you can use. Details of each parameter;
- `iteration_count` (_optional_)
This is the equivalent of the `-n` flag. The difference is that if you have multiple steps in your scenario, this value represents the iteration count of the steps.
- `load_type` (_optional_)
This is the equivalent of the `-l` flag.
- `duration` (_optional_)
This is the equivalent of the `-d` flag.
- `manual_load` (_optional_)
If you are looking for creating your own custom load type, you can use this feature. The example below says that Ddosify will run the scenario 5 times, 10 times, and 20 times, respectively along with the provided durations. `iteration_count` and `duration` will be auto-filled by Ddosify according to `manual_load` configuration. In this example, `iteration_count` will be 35 and the `duration` will be 18 seconds.
Also `manual_load` overrides `load_type` if you provide both of them. As a result, you don't need to provide these 3 parameters when using `manual_load`.
```json
"manual_load": [
{"duration": 5, "count": 5},
{"duration": 6, "count": 10},
{"duration": 7, "count": 20}
]
```
- `proxy` (_optional_)
This is the equivalent of the `-P` flag.
- `output` (_optional_)
This is the equivalent of the `-o` flag.
- `engine_mode` (_optional_)
Can be one of `distinct-user`, `repeated-user`, or default mode `ddosify`.
- `distinct-user` mode simulates a new user for every iteration.
- `repeated-user` mode can use pre-used user in subsequent iterations.
- `ddosify` mode is default mode of the engine. In this mode engine runs in its max capacity, and does not show user simulation behaviour.
- `env` (_optional_)
Scenario-scoped global variables. Note that dynamic variables changes every iteration.
```json
"env": {
"COMPANY_NAME" :"Ddosify",
"randomCountry" : "{{_randomCountry}}"
}
```
- `data` (_optional_)
Config for loading test data from a CSV file.
[CSV data](https://github.com/getanteon/anteon/blob/master/ddosify_engine/config/config_testdata/test.csv) used in below config.
```json
"data":{
"info": {
"path" : "config/config_testdata/test.csv",
"delimiter": ";",
"vars": {
"0":{"tag":"name"},
"1":{"tag":"city"},
"2":{"tag":"team"},
"3":{"tag":"payload", "type":"json"},
"4":{"tag":"age", "type":"int"}
},
"allow_quota" : true,
"order": "sequential",
"skip_first_line" : true,
"skip_empty_line" : true
}
}
```
| Field | Description | Type | Default | Required? |
| ----------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -------- | -------- | --------- |
| `path` | Local path or remote url for your CSV file | `string` | - | Yes |
| `delimiter` | Delimiter for reading CSV | `string` | `,` | No |
| `vars` | Tag columns using column index as key, use `type` field if you want to cast a column to a specific type, default is `string`, can be one of the following: `json`, `int`, `float`,`bool`. | `map` | - | Yes |
| `allow_quota` | If set to true, a quote may appear in an unquoted field and a non-doubled quote may appear in a quoted field | `bool` | `false` | No |
| `order` | Order of reading records from CSV. Can be `random` or `sequential` | `string` | `random` | No |
| `skip_first_line` | Skips first line while reading records from CSV. | `bool` | `false` | No |
| `skip_empty_line` | Skips empty lines while reading records from CSV. | `bool` | `true` | No |
- `success_criterias` (_optional_)
Config for pass fail logic for the test. _abort_ and _delay_ fields can be used to adjust the abort behaviour in case of failure. If abort is true for a rule and rules fails at certain point, engine will decide to abort test immediately if delay is 0 or not given. If delay is given, it will wait for delay seconds and reassert the rule.
**Example:** Check _90th percentile_ and _fail_count_;
```json
{
"duration": 10,
<other_global_configurations>,
"success_criterias": [
{
"rule" : "p90(iteration_duration) < 220",
"abort" : false
},
{
"rule" : "fail_count_perc < 0.1",
"abort" : true,
"delay" : 1
},
{
"rule" : "fail_count < 100",
"abort" : true,
"delay" : 0
}
],
"steps": [....]
}
```
- `steps` (_required_)
This parameter lets you create your scenario. Ddosify runs the provided steps, respectively. For the given example file step id: 2 will be executed immediately after the response of step id: 1 is received. The order of the execution is the same as the order of the steps in the config file.
**Details of each parameter for a step;**
- `id` (_required_)
Each step must have a unique integer id.
- `url` (_required_)
This is the equivalent of the `-t` flag.
- `name` (_optional_) <a name="#step-name"></a>
Name of the step.
- `method` (_optional_)
This is the equivalent of the `-m` flag.
- `headers` (_optional_)
List of headers with key:value format.
- `payload` (_optional_)
Body or payload. This is the equivalent of the `-b` flag.
_Note:_ If you want to use `x-www-form-urlencoded`, set Content-Type header to `application/x-www-form-urlencoded`.
**Example:** send `x-www-form-urlencoded` data;
```json
{
"headers": {
"Content-Type": "application/x-www-form-urlencoded"
},
"payload": "key1=value1&key2=value2"
}
```
- `payload_file` (_optional_)
If you need a long payload, we suggest using this parameter instead of `payload`.
- `payload_multipart` (_optional_) <a name="#payload_multipart"></a>
Use this for `multipart/form-data` Content-Type.
Accepts list of `form-field` objects, structured as below;
```json
{
"name": [field-name],
"value": [field-value|file-path|url],
"type": <text|file>, // Default "text"
"src": <local|remote> // Default "local"
}
```
**Example:** Sending form name-value pairs;
```json
"payload_multipart": [
{
"name": "[field-name]",
"value": "[field-value]"
}
]
```
**Example:** Sending form name-value pairs and a local file;
```json
"payload_multipart": [
{
"name": "[field-name]",
"value": "[field-value]",
},
{
"name": "[field-name]",
"value": "./test.png",
"type": "file"
}
]
```
**Example:** Sending form name-value pairs and a local file and a remote file;
```json
"payload_multipart": [
{
"name": "[field-name]",
"value": "[field-value]",
},
{
"name": "[field-name]",
"value": "./test.png",
"type": "file"
},
{
"name": "[field-name]",
"value": "http://getanteon.com/test.png",
"type": "file",
"src": "remote"
}
]
```
_Note:_ Ddosify adds `Content-Type: multipart/form-data; boundary=[generated-boundary-value]` header to the request when using `payload_multipart`.
- `timeout` (_optional_)
This is the equivalent of the `-T` flag.
- `capture_env` (_optional_)
Config for extraction of variables to use them in next steps.
**Example:** Capture _NUM_ variable from steps response body;
```json
"steps": [
{
"id": 1,
"url": "http://getanteon.com/endpoint1",
"capture_env": {
"NUM" :{"from":"body","json_path":"num"},
}
},
]
```
- `assertion` (_optional_)
The response from this step will be subject to the assertion rules. If one of the provided rules fails, step is considered as failure.
**Example:** Check _status code_ and _content-length_ header values;
```json
"steps": [
{
"id": 1,
"url": "http://getanteon.com/endpoint1",
"assertion": [
"equals(status_code,200)",
"in(headers.content-length,[2000,3000])"
]
},
]
```
- `sleep` (_optional_) <a name="#sleep"></a>
Sleep duration(ms) before executing the next step. Can be an exact duration or a range.
**Example:** Sleep 1000ms after step-1;
```json
"steps": [
{
"id": 1,
"url": "http://getanteon.com/endpoint1",
"sleep": "1000"
},
{
"id": 2,
"url": "http://getanteon.com/endpoint2",
}
]
```
**Example:** Sleep between 300ms-500ms after step-1;
```json
"steps": [
{
"id": 1,
"url": "http://getanteon.com/endpoint1",
"sleep": "300-500"
},
{
"id": 2,
"url": "http://getanteon.com/endpoint2",
}
]
```
- `auth` (_optional_)
Basic authentication.
```json
"auth": {
"username": "test_user",
"password": "12345"
}
```
- `others` (_optional_)
This parameter accepts dynamic _key: value_ pairs to configure connection details of the protocol in use.
```json
"others": {
"disable-compression": false, // Default true
"h2": true, // Enables HTTP/2. Default false.
"disable-redirect": true // Default false
}
```
## Parameterization (Dynamic Variables)
Just like the Postman, Ddosify supports parameterization (dynamic variables) on _URL_, _headers_, _payload (body)_ and _basic authentication_. Actually, we support all the random methods Postman supports. If you use `{{$randomVariable}}` on Postman you can use it as `{{_randomVariable}}` on Ddosify. Just change `$` to `_` and you will be fine. To simulate a realistic load test on your system, Ddosify can send every request with dynamic variables.
The full list of dynamic variables can be found in the [documentation](https://getanteon.com/docs/performance-testing/dynamic-variables-parametrization/).
### Parameterization on URL
Ddosify sends _100_ GET requests in _10_ seconds with random string `key` parameter. This approach can be also used in cache bypass.
```bash
ddosify -t https://getanteon.com/?key={{_randomString}} -d 10 -n 100
```
### Parameterization on Headers
Ddosify sends _100_ GET requests in _10_ seconds with random `Transaction-Type` and `Country` headers.
```bash
ddosify -t https://getanteon.com -d 10 -n 100 -h 'Transaction-Type: {{_randomTransactionType}}' -h 'Country: {{_randomCountry}}'
```
### Parameterization on Payload (Body)
Ddosify sends _100_ GET requests in _10_ seconds with random `latitude` and `longitude` values in body.
```bash
ddosify -t https://getanteon.com -d 10 -n 100 -b '{"latitude": "{{_randomLatitude}}", "longitude": "{{_randomLongitude}}"}'
```
### Parameterization on Basic Authentication
Ddosify sends _100_ GET requests in _10_ seconds with random `username` and `password` with basic authentication.
```bash
ddosify -t https://getanteon.com -d 10 -n 100 -a '{{_randomUserName}}:{{_randomPassword}}'
```
### Parameterization on Config File
Dynamic variables can be used on config file as well. Ddosify sends _100_ GET requests in _10_ seconds with random string `key` parameter in URL and random `User-Key` header.
```bash
ddosify -config ddosify_config_dynamic.json
```
```json
{
"iteration_count": 100,
"load_type": "linear",
"duration": 10,
"steps": [
{
"id": 1,
"url": "https://getanteon.com/?key={{_randomString}}",
"method": "POST",
"headers": {
"User-Key": "{{_randomInt}}"
}
}
]
}
```
### Environment Variables
In addition, you can also use operating system environment variables. To access these variables, simply add the `$` prefix followed by the variable name wrapped in double curly braces. The syntax for this is `{{$OS_ENV_VARIABLE}}` within the **config file**.
For instance, to use the `USER` environment variable from your operating system, simply input `{{$USER}}`. You can use operating system environment variables in `URL`, `Headers`, `Body (Payload)`, and `Basic Authentication`.
Here is an example of using operating system environment variables in the config file. `TARGET_SITE` operating system environment variable is used in `URL` and `USER` environment variable is used in `Headers`.
```bash
export TARGET_SITE="https://getanteon.com"
ddosify -config ddosify_config_os_env.json
```
```json
{
"iteration_count": 100,
"load_type": "linear",
"duration": 10,
"steps": [
{
"id": 1,
"url": "{{$TARGET_SITE}}",
"method": "POST",
"headers": {
"os-env-user": "{{$USER}}"
}
}
]
}
```
## Assertion
By default, Ddosify marks a step result as successful if it sends the request and receives the response without any network errors. Status code or body type (or content) does not affect the success/failure criteria. However, this may not provide a good test result for your use case, and you may want to create your own success/fail logic. That's where Assertions come in.
Ddosify supports assertions on `status code`, `response body`, `response size`, `response time`, `headers`, and `variables`. You can use the `assertion` parameter in the config file to check if the response matches the given condition per step. If the condition is not met, Ddosify will fail the step. Check the [example config](https://github.com/getanteon/anteon/blob/master/ddosify_engine/config_examples/config.json) to see how it looks.
As shown in the related table, the first five keywords store different data related to the response. The last keyword, `variables`, stores the current state of environment variables for the step. You can use [Functions](#functions) or [Operators](#operators) to build conditional expressions based on these keywords.
You can write multiple assertions for a step. If any assertion fails, the step is marked as failed.
If Ddosify can't receive the response for a request, that step is marked as failed without processing the assertions. You will see a **Server Error** as the failure reason in the test result instead of an **Assertion Error**.
### Keywords
| Keyword | Description | Usage |
| --------------- | ----------------------------- | ------------------ |
| `status_code` | Status code | - |
| `body` | Response body | - |
| `response_size` | Response size in bytes | - |
| `response_time` | Response time in ms | - |
| `headers` | Response headers | headers.header-key |
| `variables` | Global and captured variables | variables.VarName |
### Functions
| Function | Parameters | Description |
| ---------------- | ----------------------------------------------- | ------------------------------------------------------------------------------- |
| `less_than` | ( param `int`, limit `int` ) | checks if param is less than limit |
| `greater_than` | ( param `int`, limit `int` ) | checks if param is greater than limit |
| `exists` | ( param `any` ) | checks if variable exists |
| `equals` | ( param1 `any`, param2 `any` ) | checks if given parameters are equal |
| `equals_on_file` | ( param `any`, file_path `string` ) | reads from given file path and checks if it equals to given parameter |
| `in` | ( param `any`, array_param `array` ) | checks if expression is in given array |
| `contains` | ( param1 `any`, param2 `any` ) | makes substring with param1 inside param2 |
| `not` | ( param `bool` ) | returns converse of given param |
| `range` | ( param `int`, low `int`,high `int` ) | returns param is in range of [low,high): low is included, high is not included. |
| `json_path` | ( json_path `string`) | extracts from response body using given json path |
| `xpath` | ( xpath `string` ) | extracts from response body using given xml path |
| `html_path` | ( html `string` ) | extracts from response body using given html path |
| `regexp` | ( param `any`, regexp `string`, matchNo `int` ) | extracts from given value in the first parameter using given regular expression |
### Operators
| Operator | Description |
| -------- | ------------ |
| `==` | equals |
| `!=` | not equals |
| `>` | greater than |
| `<` | less than |
| `!` | not |
| `&&` | and |
| `\|\|` | or |
### Assertion Examples
| Expression | Description |
| -------------------------------------------------- | ------------------------------------------------------------------------------- |
| `less_than(status_code,201)` | checks if status code is less than 201 |
| `equals(status_code,200)` | checks if status code equals to 200 |
| `status_code == 200` | same as preceding one |
| `not(status_code == 500)` | checks if status code not equals to 500 |
| `status_code != 500` | same as preceding one |
| `equals(json_path(\"employees.0.name\"),\"Name\")` | checks if json extracted value is equal to "Name" |
| `equals(xpath(\"//item/title\"),\"ABC\")` | checks if xml extracted value is equal to "ABC" |
| `equals(html_path(\"//body/h1\"),\"ABC\")` | checks if html extracted value is equal to "ABC" |
| `equals(variables.x,100)` | checks if `x` variable coming from global or captured variables is equal to 100 |
| `equals(variables.x,variables.y)` | checks if variables `x` and `y` are equal to each other |
| `equals_on_file(body,\"file.json\")` | reads from file.json and compares response body with read file |
| `exists(headers.Content-Type)` | checks if content-type header exists in response headers |
| `contains(body,\"xyz\")` | checks if body contains "xyz" in it |
| `range(headers.content-length,100,300)` | checks if content-length header is in range [100,300) |
| `in(status_code,[200,201])` | checks if status code equal to 200 or 201 |
| `(status_code == 200) \|\| (status_code == 201)` | same as preceding one |
| `regexp(body,\"[a-z]+_[0-9]+\",0) == \"messi_10\"` | checks if matched result from regex is equal to "messi_10" |
## Success Criteria (Pass / Fail)
Ddosify supports success criteria, allowing users to verify the success of their load tests based on response times and failure counts of iterations. With this feature, users can assert the percentile of response times and the failure counts of all iterations in a test.
Users can specify the required percentile of response times and failure counts in the configuration file, and the engine will compare the actual response times and failure counts to these values throughout the test continuously. According to the user's configuration, the test can be aborted or continue running until the end. Check the [example config](https://github.com/getanteon/anteon/blob/master/ddosify_engine/config_examples/config.json) to see how the `success_criterias` keyword looks.
Note that the functions and operators mentioned in the [Step Assertion](#assertion) section can also be utilized for the Success Criteria keywords listed below.
You can see a success criteria example in the [EXAMPLES](https://github.com/getanteon/anteon/blob/master/ddosify_engine/EXAMPLES.md#example-2-success-criteria) file.
## Difference Between Success Criteria and Step Assertions
Unlike assertions focused on individual steps, which determine the success or failure of a step according to its response, Success Criteria create an abort/continue logic for the entire test, which is based on the accumulated data from all iterations.
### Keywords
| Keyword | Description | Usage |
| -------------------- | ------------------------------------- | ----------------------------------------------------------------- |
| `fail_count` | Failure count of iterations | Used for aborting when test exceeds certain fail_count |
| `iteration_duration` | Response times of iterations in ms | Used for percentile functions |
| `fail_count_perc` | Fail count percentage, in range [0,1] | Used for aborting when test exceeds certain fail count percentage |
### Functions
| Function | Parameters | Description |
| -------- | ------------------- | ------------------------------------------------- |
| `p99` | ( arr `int array` ) | 99th percentile, use as `p99(iteration_duration)` |
| `p98` | ( arr `int array` ) | 98th percentile, use as `p98(iteration_duration)` |
| `p95` | ( arr `int array`) | 95th percentile, use as `p95(iteration_duration)` |
| `p90` | ( arr `int array`) | 90th percentile, use as `p90(iteration_duration)` |
| `p80` | ( arr `int array`) | 80th percentile, use as `p80(iteration_duration)` |
| `min` | ( arr `int array`) | returns minimum element |
| `max` | ( arr `int array`) | returns maximum element |
| `avg` | ( arr `int array`) | calculates and returns average |
### Examples
| Expression | Description |
| --------------------------------- | -------------------------------------------- |
| `p95(iteration_duration) < 100` | 95th percentile should be less than 100 ms |
| `less_than(fail_count,120)` | Total fail count should be less than 120 |
| `less_than(fail_count_perc,0.05)` | Fail count percentage should be less than 5% |
## Correlation
Ddosify enables you to capture variables from steps using **json_path**, **xpath**, **xpath_html**, or **regular expressions**. Later, in the subsequent steps, you can inject both the captured variables and the scenario-scoped global variables.
> **:warning: Points to keep in mind**
>
> - You must specify **'header_key'** when capturing from header.
> - For json_path syntax, please take a look at [gjson syntax](https://github.com/tidwall/gjson/blob/master/SYNTAX.md) doc.
> - Regular expression are expected in **'Golang'** style regex. For converting your existing regular expressions, you can use [regex101](https://regex101.com).
> - You can extract values from **headers**, **body**, and **cookies**.
You can use **debug** parameter to validate your config.
```bash
ddosify -config ddosify_config_correlation.json -debug
```
### Capture with json_path
```json
{
"steps": [
{
"capture_env": {
"NUM": { "from": "body", "json_path": "num" },
"NAME": { "from": "body", "json_path": "name" },
"SQUAD": { "from": "body", "json_path": "squad" },
"PLAYERS": { "from": "body", "json_path": "squad.players" },
"MESSI": { "from": "body", "json_path": "squad.players.0" }
}
}
]
}
```
### Capture with XPath on XML
```json
{
"steps": [
{
"capture_env": {
"TITLE": { "from": "body", "xpath": "//item/title" }
}
}
]
}
```
### Capture with XPath on HTML
```json
{
"steps": [
{
"capture_env": {
"TITLE": { "from": "body", "xpath_html": "//body/h1" }
}
}
]
}
```
### Capture with Regular Expressions
```json
{
"steps": [
{
"capture_env": {
"CONTENT_TYPE": {
"from": "header",
"header_key": "Content-Type",
"regexp": { "exp": "application/(\\w)+", "matchNo": 0 }
},
"REGEX_MATCH_ENV": {
"from": "body",
"regexp": { "exp": "[a-z]+_[0-9]+", "matchNo": 1 }
}
}
}
]
}
```
### Capture Header Value
```json
{
"steps": [
{
"capture_env": {
"TOKEN": { "from": "header", "header_key": "Authorization" }
}
}
]
}
```
### Scenario-Scoped Variables
```json
{
"env": {
"TARGET_URL": "http://localhost:8084/hello",
"USER_KEY": "ABC",
"COMPANY_NAME": "Ddosify",
"RANDOM_COUNTRY": "{{_randomCountry}}",
"NUMBERS": [22, 33, 10, 52]
}
}
```
### Overall Config and Injection
On array-like captured variables or environment vars, the **rand( )** function can be utilized.
```json
// ddosify_config_correlation.json
{
"iteration_count": 100,
"load_type": "linear",
"duration": 10,
"steps": [
{
"id": 1,
"url": "{{TARGET_URL}}",
"method": "POST",
"headers": {
"User-Key": "{{USER_KEY}}",
"Rand-Selected-Num": "{{rand(NUMBERS)}}"
},
"payload": "{{COMPANY_NAME}}",
"capture_env": {
"NUM": { "from": "body", "json_path": "num" },
"NAME": { "from": "body", "json_path": "name" },
"SQUAD": { "from": "body", "json_path": "squad" },
"PLAYERS": { "from": "body", "json_path": "squad.players" },
"MESSI": { "from": "body", "json_path": "squad.players.0" },
"TOKEN": { "from": "header", "header_key": "Authorization" },
"CONTENT_TYPE": {
"from": "header",
"header_key": "Content-Type",
"regexp": { "exp": "application/(\\w)+", "matchNo": 0 }
}
}
},
{
"id": 2,
"url": "{{TARGET_URL}}",
"method": "POST",
"headers": {
"User-Key": "{{USER_KEY}}",
"Authorization": "{{TOKEN}}",
"Content-Type": "{{CONTENT_TYPE}}"
},
"payload_file": "payload.json",
"capture_env": {
"TITLE": { "from": "body", "xpath": "//item/title" },
"REGEX_MATCH_ENV": {
"from": "body",
"regexp": { "exp": "[a-z]+_[0-9]+", "matchNo": 1 }
}
}
}
],
"env": {
"TARGET_URL": "http://localhost:8084/hello",
"USER_KEY": "ABC",
"COMPANY_NAME": "Ddosify",
"RANDOM_COUNTRY": "{{_randomCountry}}",
"NUMBERS": [22, 33, 10, 52]
}
}
```
```json
// payload.json
{
"boolField": "{{_randomBoolean}}",
"numField": "{{NUM}}",
"strField": "{{NAME}}",
"numArrayField": ["{{NUM}}", 34],
"strArrayField": ["{{NAME}}", "hello"],
"mixedArrayField": ["{{NUM}}", 34, "{{NAME}}", "{{SQUAD}}"],
"{{NAME}}": "messi",
"obj": {
"numField": "{{NUM}}",
"objectField": "{{SQUAD}}",
"arrayField": "{{PLAYERS}}"
}
}
```
## Test Data Set
Ddosify enables you to load test data from **CSV** files. Later, in your scenario, you can inject variables that you tagged.
We are using this [CSV data](https://github.com/getanteon/anteon/tree/master/ddosify_engine/config/config_testdata/test.csv) in config below.
```json
// config_data_csv.json
"data":{
"csv_test": {
"path" : "config/config_testdata/test.csv",
"delimiter": ";",
"vars": {
"0":{"tag":"name"},
"1":{"tag":"city"},
"2":{"tag":"team"},
"3":{"tag":"payload", "type":"json"},
"4":{"tag":"age", "type":"int"}
},
"allow_quota" : true,
"order": "random",
"skip_first_line" : true
}
}
```
You can refer to tagged variables in your request like below.
```json
// payload.json
{
"name": "{{data.csv_test.name}}",
"team": "{{data.csv_test.team}}",
"city": "{{data.csv_test.city}}",
"payload": "{{data.csv_test.payload}}",
"age": "{{data.csv_test.age}}"
}
```
## Cookies
Ddosify supports cookies in the following engine modes: `distinct-user` and `repeated-user`. Cookies are not supported in the default `ddosify` mode.
In `repeated-user` mode, Ddosify uses the same cookie jar for all iterations executed by the same user. It sets cookies returned at the first successful iteration and does not change them afterward. This way, the same cookies are passed through steps in all iterations executed by the same user.
In `distinct-user` mode, Ddosify uses a different cookie jar for each iteration, so cookies are passed through steps in one iteration only.
You can see a cookie example in the [EXAMPLES](https://github.com/getanteon/anteon/blob/master/ddosify_engine/EXAMPLES.md#example-1-cookie-support) file.
### Initial / Custom Cookies
You can set initial/custom cookies for your test scenario using `cookie_jar` field in the config file. You can enable/disable custom cookies with `enabled` key. Check the [example config](https://github.com/getanteon/anteon/blob/master/ddosify_engine/config/config_testdata/config_init_cookies.json).
| Key | Description | Example |
| ----------- | --------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------- |
| `name` | The name of the cookie. This field is used to identify the cookie. | `platform` |
| `value` | The value of the cookie. This field contains the data that the cookie stores. | `web` |
| `domain` | Domain or subdomain that can access the cookie. | `app.getanteon.com` |
| `path` | Path within the domain that can access the cookie. | `/` |
| `expires` | When the cookie should expire. The date format should be rfc2616. | `Thu, 16 Mar 2023 09:24:02 GMT` |
| `max_age` | Number of seconds until the cookie expires. | `5` |
| `http_only` | Whether the cookie should only be accessible through HTTP or HTTPS headers, and not through client-side scripts | `true` |
| `secure` | Whether the cookie should only be sent over a secure (HTTPS) connection | `false` |
| `raw` | The raw format of the cookie. If it is used, the other keys are discarded. | `myCookie=myValue; Expires=Wed, 21 Oct 2026 07:28:00 GMT; Path=/` |
### Cookie Capture
You can capture values from cookies from its name just like you do for headers and body and use them in your test scenario.
```json
{
"iteration_count": 100,
"load_type": "linear",
"duration": 10,
"steps": [
{
...
"capture_env": {
"TEST" :{"from":"cookies","cookie_name":"test"}
}
}
]
}
```
### Cookie Assertion
You can refer to cookie values as `cookies.cookie_name` while you write assertions for your steps.
Following fields are available for cookie assertion:
- `name`: Name of the cookie
- `domain`: Domain of the cookie
- `path`: Path of the cookie
- `value`: Value of the cookie
- `expires`: Expiration date of the cookie
- `maxAge`: Max age of the cookie
- `secure`: Secure flag of the cookie
- `httpOnly`: Http only flag of the cookie
- `rawExpires`: Raw expiration date of the cookie
**Examples:**
- `cookies.test.expires < time(\"Thu, 01 Jan 1990 00:00:00 GMT\")` is a valid assertion expression. It checks if the cookie named `test` has an expiration date before `Thu, 01 Jan 1990 00:00:00 GMT`.
- `cookies.test.path == \"/login\"` is another valid assertion expression. It checks if the cookie named `test` has a path value equal to `/login`.
## Common Issues
### macOS Security Issue
```
"ddosify" can’t be opened because Apple cannot check it for malicious software.
```
- Open `/usr/local/bin`
- Right click `ddosify` and select Open
- Select Open
- Close the opened terminal
### OS Limit - Too Many Open Files
If you create large load tests, you may encounter the following errors:
```
Server Error Distribution (Count:Reason):
199 :Get "https://getanteon.com": dial tcp 188.114.96.3:443: socket: too many open files
159 :Get "https://getanteon.com": dial tcp 188.114.97.3:443: socket: too many open files
```
This is because the OS limits the number of open files. You can check the current limit by running `ulimit -n` command. You can increase this limit to 50000 by running the following command on both Linux and macOS.
```bash
ulimit -n 50000
```
But this will only increase the limit for the current session. To increase the limit permanently, you can change the shell configuration file. For example, if you are using bash, you can add the following lines to `~/.bashrc` file. If you are using zsh, you can add the following lines to `~/.zshrc` file.
```bash
# For .bashrc
echo "ulimit -n 50000" >> ~/.bashrc
# For .zshrc
echo "ulimit -n 50000" >> ~/.zshrc
```
## Contributing
See our [Contribution Guide](../CONTRIBUTING.md) and please follow the [Code of Conduct](../CODE_OF_CONDUCT.md) in all your interactions with the project.
## Communication
You can join our [Discord Server](https://discord.com/invite/9KdnrSUZQg) for issues, feature requests, feedbacks or anything else.
## Disclaimer
Ddosify is created for testing the performance of web applications. Users must be the owner of the target system. Using it for harmful purposes is extremely forbidden. Ddosify team & company is not responsible for its’ usages and consequences.
## License
Licensed under the [AGPLv3](../LICENSE)
================================================
FILE: ddosify_engine/completions/README.md
================================================
# Shell completions
## Zsh
`completions/_ddosify` provides a basic auto-completions. You can apply one of the steps to get an auto-completion successfully.
You can locate the file in any directory referenced by `$fpath`. You can use the following command to list directories in `$fpath`.
```bash
echo $fpath | tr ' ' '\n'
```
For example, if you are using [oh-my-zsh](https://ohmyz.sh/) you can add it as a plugin after locating file under plugin related directory appeared in `$fpath`. You can create a directory named `ddosify` under `~/.oh-my-zsh/plugins` and copy `_ddosify` file to it.
```bash
mkdir -p ~/.oh-my-zsh/plugins/ddosify
cp completions/_ddosify ~/.oh-my-zsh/plugins/ddosify
```
Then, you can add `ddosify` to your plugins list in `~/.zshrc` file.
```
# ~/.zshrc
plugins=(
...
ddosify
)
```
If you don't have an appropriate directory, you can create one and add it to `$fpath`.
```
mkdir -p ${ZDOTDIR:-~}/.zsh_functions
echo 'fpath+=${ZDOTDIR:-~}/.zsh_functions' >> ${ZDOTDIR:-~}/.zshrc
```
Then, you can copy `_ddosify` file to the directory you created.
```
cp completions/_ddosify ${ZDOTDIR:-~}/.zsh_functions/_ddosify
```
================================================
FILE: ddosify_engine/completions/_ddosify
================================================
#compdef ddosify _ddosify
typeset -A opt_args
_ddosify() {
local curcontext="$curcontext" state line
local -a opts
opts+=(
"-t[Target URL.]"
"-P[Proxy address as protocol\://username\:password@host\:port. Supported proxies \[http(s), socks\].]"
"-T[Request timeout in seconds (default 5).]"
"-a[Basic authentication, username\:password.]"
"-b[Payload of the network packet (body).]"
"-cert_key_path[A path to a certificate key file (usually called 'key.pem').]:filename:_files"
"-cert_path[A path to a certificate file (usually called 'cert.pem'.)]:filename:_files"
"-config[Json config file path. If a config file is provided, other flag values will be ignored.]:filename:_files"
"-d[Test duration in seconds (default 10).]"
"-debug[Iterates the scenario once and prints curl-like verbose result.]"
"-h[Request Headers. Ex\: -h 'Accept\: text/html' -h 'Content-Type\: application/xml'.]"
"-l[Type of the load test \['linear', 'incremental', 'waved'\] (default 'linear').]"
"-m[Request Method Type. For Http(s)\:\['GET', 'POST', 'PUT', 'DELETE', 'UPDATE', 'PATCH'\] (default 'GET').]"
"-n[Total iteration count (default 100).]"
"-o[Output destination (default 'stdout').]"
"-version[Prints version, git commit, built date (utc), go information and quit.]"
)
_arguments -s -w : $opts && return 0
return 1
}
================================================
FILE: ddosify_engine/config/base.go
================================================
/*
*
* Ddosify - Load testing tool for any web system.
* Copyright (C) 2021 Ddosify (https://ddosify.com)
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU Affero General Public License as published
* by the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU Affero General Public License for more details.
*
* You should have received a copy of the GNU Affero General Public License
* along with this program. If not, see <https://www.gnu.org/licenses/>.
*
*/
package config
import (
"fmt"
"reflect"
"go.ddosify.com/ddosify/core/types"
)
var AvailableConfigReader = make(map[string]ConfigReader)
// ConfigReader is the interface that abstracts different config reader implementations.
type ConfigReader interface {
Init([]byte) error
CreateHammer() (types.Hammer, error)
}
// NewConfigReader is the factory method of the ConfigReader.
func NewConfigReader(config []byte, configType string) (reader ConfigReader, err error) {
if val, ok := AvailableConfigReader[configType]; ok {
// Create a new object from the service type
reader = reflect.New(reflect.TypeOf(val).Elem()).Interface().(ConfigReader)
err = reader.Init(config)
} else {
err = fmt.Errorf("unsupported config reader type: %s", configType)
}
return
}
================================================
FILE: ddosify_engine/config/base_test.go
================================================
/*
*
* Ddosify - Load testing tool for any web system.
* Copyright (C) 2021 Ddosify (https://ddosify.com)
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU Affero General Public License as published
* by the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU Affero General Public License for more details.
*
* You should have received a copy of the GNU Affero General Public License
* along with this program. If not, see <https://www.gnu.org/licenses/>.
*
*/
package config
import (
"io/ioutil"
"os"
"reflect"
"testing"
)
func readConfigFile(path string) []byte {
f, _ := os.Open(path)
byteValue, _ := ioutil.ReadAll(f)
return byteValue
}
func TestNewConfigReader(t *testing.T) {
t.Parallel()
configPath := "config_testdata/config.json"
reader, err := NewConfigReader(readConfigFile(configPath), ConfigTypeJson)
if err != nil {
t.Errorf("TestNewConfigReader errored: %v", err)
}
if reflect.TypeOf(reader) != reflect.TypeOf(&JsonReader{}) {
t.Errorf("Expected jsonReader found: %v", reflect.TypeOf(reader))
}
}
func TestNewConfigReaderInvalidConfigType(t *testing.T) {
t.Parallel()
configPath := "config_testdata/config.json"
_, err := NewConfigReader(readConfigFile(configPath), "invalidConfigType")
if err == nil {
t.Errorf("TestNewConfigReaderInvalidConfigType errored")
}
}
func TestNewConfigReaderIncorrectJsonFile(t *testing.T) {
t.Parallel()
configPath := "config_testdata/config_incorrect.json"
_, err := NewConfigReader(readConfigFile(configPath), ConfigTypeJson)
if err == nil {
t.Errorf("TestNewConfigReaderInvalidFilePath errored")
}
}
================================================
FILE: ddosify_engine/config/config_testdata/benchmark/config_correlation_load_1.json
================================================
{
"iteration_count": 100,
"engine_mode": "ddosify",
"load_type": "waved",
"duration": 10,
"steps": [
{
"id": 1,
"url": "{{HTTPBIN}}/json",
"name": "JSON",
"method": "GET",
"others": {
"h2": false,
"disable-redirect": true,
"disable-compression": false
},
"headers": {
},
"payload": "",
"timeout": 3,
"capture_env": {
"NUM" :{ "from":"body","json_path":"quoteResponse.result.0.askSize"},
"STR" :{ "from":"body","json_path":"quoteResponse.result.0.currency"},
"BOOL": {"from":"body","json_path":"quoteResponse.result.0.cryptoTradeable"},
"FLOAT" : {"from":"body","json_path":"quoteResponse.result.0.epsForward"},
"ALL_RESULT" :{"from":"body","json_path":"quoteResponse.result.0"},
"CONTENT_LENGTH" :{"from":"header", "header_key":"Content-Length"},
"CONTENT_TYPE" :{"from":"header", "header_key":"Content-Type" ,"regexp":{"exp":"application\/(\\w)+","matchNo":0} }
}
},
{
"id": 2,
"url": "{{HTTPBIN}}/xml",
"name": "XML",
"method": "GET",
"others": {
"h2": false,
"disable-redirect": true,
"disable-compression": false
},
"headers": {
"num": "{{NUM}}",
"currency": "{{STR}}",
"yahoo" : "{{CONTENT_LENGTH}}"
},
"payload": "",
"timeout": 10
},
{
"id": 3,
"url": "https://servdown.com",
"name": "HTML",
"method": "GET",
"others": {
"h2": false,
"disable-redirect": true,
"disable-compression": false
},
"headers": {
"num": "{{NUM}}"
},
"payload_file": "config/config_testdata/benchmark/json_payload.json",
"timeout": 10
}
],
"output": "stdout",
"env":{
"HTTPBIN" : "https://httpbin.ddosify.com",
"LOCAL" : "http://localhost:8084"
},
"debug" : false
}
================================================
FILE: ddosify_engine/config/config_testdata/benchmark/config_correlation_load_2.json
================================================
{
"iteration_count": 1000,
"load_type": "waved",
"engine_mode": "ddosify",
"duration": 10,
"steps": [
{
"id": 1,
"url": "{{HTTPBIN}}/json",
"name": "JSON",
"method": "GET",
"others": {
"h2": false,
"disable-redirect": true,
"disable-compression": false
},
"headers": {
},
"payload": "",
"timeout": 3,
"capture_env": {
"NUM" :{ "from":"body","json_path":"quoteResponse.result.0.askSize"},
"STR" :{ "from":"body","json_path":"quoteResponse.result.0.currency"},
"BOOL": {"from":"body","json_path":"quoteResponse.result.0.cryptoTradeable"},
"FLOAT" : {"from":"body","json_path":"quoteResponse.result.0.epsForward"},
"ALL_RESULT" :{"from":"body","json_path":"quoteResponse.result.0"},
"CONTENT_LENGTH" :{"from":"header", "header_key":"Content-Length"},
"CONTENT_TYPE" :{"from":"header", "header_key":"Content-Type" ,"regexp":{"exp":"application\/(\\w)+","matchNo":0} }
}
},
{
"id": 2,
"url": "{{HTTPBIN}}/xml",
"name": "XML",
"method": "GET",
"others": {
"h2": false,
"disable-redirect": true,
"disable-compression": false
},
"headers": {
"num": "{{NUM}}",
"currency": "{{STR}}",
"yahoo" : "{{CONTENT_LENGTH}}"
},
"payload": "",
"timeout": 10
},
{
"id": 3,
"url": "https://servdown.com",
"name": "HTML",
"method": "GET",
"others": {
"h2": false,
"disable-redirect": true,
"disable-compression": false
},
"headers": {
"num": "{{NUM}}"
},
"payload_file": "config/config_testdata/benchmark/json_payload.json",
"timeout": 10
}
],
"output": "stdout",
"env":{
"HTTPBIN" : "https://httpbin.ddosify.com",
"LOCAL" : "http://localhost:8084"
},
"debug" : false
}
================================================
FILE: ddosify_engine/config/config_testdata/benchmark/config_correlation_load_3.json
================================================
{
"iteration_count": 5000,
"load_type": "waved",
"engine_mode": "ddosify",
"duration": 10,
"steps": [
{
"id": 1,
"url": "{{HTTPBIN}}/json",
"name": "JSON",
"method": "GET",
"others": {
"h2": false,
"disable-redirect": true,
"disable-compression": false
},
"headers": {
},
"payload": "",
"timeout": 3,
"capture_env": {
"NUM" :{ "from":"body","json_path":"quoteResponse.result.0.askSize"},
"STR" :{ "from":"body","json_path":"quoteResponse.result.0.currency"},
"BOOL": {"from":"body","json_path":"quoteResponse.result.0.cryptoTradeable"},
"FLOAT" : {"from":"body","json_path":"quoteResponse.result.0.epsForward"},
"ALL_RESULT" :{"from":"body","json_path":"quoteResponse.result.0"},
"CONTENT_LENGTH" :{"from":"header", "header_key":"Content-Length"},
"CONTENT_TYPE" :{"from":"header", "header_key":"Content-Type" ,"regexp":{"exp":"application\/(\\w)+","matchNo":0} }
}
},
{
"id": 2,
"url": "{{HTTPBIN}}/xml",
"name": "XML",
"method": "GET",
"others": {
"h2": false,
"disable-redirect": true,
"disable-compression": false
},
"headers": {
"num": "{{NUM}}",
"currency": "{{STR}}",
"yahoo" : "{{CONTENT_LENGTH}}"
},
"payload": "",
"timeout": 10
},
{
"id": 3,
"url": "https://servdown.com",
"name": "HTML",
"method": "GET",
"others": {
"h2": false,
"disable-redirect": true,
"disable-compression": false
},
"headers": {
"num": "{{NUM}}"
},
"payload_file": "config/config_testdata/benchmark/json_payload.json",
"timeout": 10
}
],
"output": "stdout",
"env":{
"HTTPBIN" : "https://httpbin.ddosify.com",
"LOCAL" : "http://localhost:8084"
},
"debug" : false
}
================================================
FILE: ddosify_engine/config/config_testdata/benchmark/config_correlation_load_4.json
================================================
{
"iteration_count": 10000,
"load_type": "waved",
"engine_mode": "ddosify",
"duration": 10,
"steps": [
{
"id": 1,
"url": "{{HTTPBIN}}/json",
"name": "JSON",
"method": "GET",
"others": {
"h2": false,
"disable-redirect": true,
"disable-compression": false
},
"headers": {
},
"payload": "",
"timeout": 3,
"capture_env": {
"NUM" :{ "from":"body","json_path":"quoteResponse.result.0.askSize"},
"STR" :{ "from":"body","json_path":"quoteResponse.result.0.currency"},
"BOOL": {"from":"body","json_path":"quoteResponse.result.0.cryptoTradeable"},
"FLOAT" : {"from":"body","json_path":"quoteResponse.result.0.epsForward"},
"ALL_RESULT" :{"from":"body","json_path":"quoteResponse.result.0"},
"CONTENT_LENGTH" :{"from":"header", "header_key":"Content-Length"},
"CONTENT_TYPE" :{"from":"header", "header_key":"Content-Type" ,"regexp":{"exp":"application\/(\\w)+","matchNo":0} }
}
},
{
"id": 2,
"url": "{{HTTPBIN}}/xml",
"name": "XML",
"method": "GET",
"others": {
"h2": false,
"disable-redirect": true,
"disable-compression": false
},
"headers": {
"num": "{{NUM}}",
"currency": "{{STR}}",
"yahoo" : "{{CONTENT_LENGTH}}"
},
"payload": "",
"timeout": 10
},
{
"id": 3,
"url": "https://servdown.com",
"name": "HTML",
"method": "GET",
"others": {
"h2": false,
"disable-redirect": true,
"disable-compression": false
},
"headers": {
"num": "{{NUM}}"
},
"payload_file": "config/config_testdata/benchmark/json_payload.json",
"timeout": 10
}
],
"output": "stdout",
"env":{
"HTTPBIN" : "https://httpbin.ddosify.com",
"LOCAL" : "http://localhost:8084"
},
"debug" : false
}
================================================
FILE: ddosify_engine/config/config_testdata/benchmark/config_correlation_load_5.json
================================================
{
"iteration_count": 20000,
"load_type": "waved",
"engine_mode": "ddosify",
"duration": 10,
"steps": [
{
"id": 1,
"url": "{{HTTPBIN}}/json",
"name": "JSON",
"method": "GET",
"others": {
"h2": false,
"disable-redirect": true,
"disable-compression": false
},
"headers": {
},
"payload": "",
"timeout": 3,
"capture_env": {
"NUM" :{ "from":"body","json_path":"quoteResponse.result.0.askSize"},
"STR" :{ "from":"body","json_path":"quoteResponse.result.0.currency"},
"BOOL": {"from":"body","json_path":"quoteResponse.result.0.cryptoTradeable"},
"FLOAT" : {"from":"body","json_path":"quoteResponse.result.0.epsForward"},
"ALL_RESULT" :{"from":"body","json_path":"quoteResponse.result.0"},
"CONTENT_LENGTH" :{"from":"header", "header_key":"Content-Length"},
"CONTENT_TYPE" :{"from":"header", "header_key":"Content-Type" ,"regexp":{"exp":"application\/(\\w)+","matchNo":0} }
}
},
{
"id": 2,
"url": "{{HTTPBIN}}/xml",
"name": "XML",
"method": "GET",
"others": {
"h2": false,
"disable-redirect": true,
"disable-compression": false
},
"headers": {
"num": "{{NUM}}",
"currency": "{{STR}}",
"yahoo" : "{{CONTENT_LENGTH}}"
},
"payload": "",
"timeout": 10
},
{
"id": 3,
"url": "https://servdown.com",
"name": "HTML",
"method": "GET",
"others": {
"h2": false,
"disable-redirect": true,
"disable-compression": false
},
"headers": {
"num": "{{NUM}}"
},
"payload_file": "config/config_testdata/benchmark/json_payload.json",
"timeout": 10
}
],
"output": "stdout",
"env":{
"HTTPBIN" : "https://httpbin.ddosify.com",
"LOCAL" : "http://localhost:8084"
},
"debug" : false
}
================================================
FILE: ddosify_engine/config/config_testdata/benchmark/config_distinct_user.json
================================================
{
"iteration_count": 100,
"engine_mode": "ddosify",
"load_type": "linear",
"duration": 10,
"steps": [
{
"id": 1,
"url": "{{HTTPBIN}}/json",
"name": "JSON",
"method": "GET",
"others": {
"h2": false,
"disable-redirect": true,
"disable-compression": false
}
}
],
"output": "stdout",
"env":{
"HTTPBIN" : "https://httpbin.ddosify.com"
},
"debug" : false,
"engine-mode": "distinct-user"
}
================================================
FILE: ddosify_engine/config/config_testdata/benchmark/config_multipart_inject_100rps.json
================================================
{
"steps": [
{
"id": 1,
"url": "https://testserver.ddosify.com/upload_image/",
"name": "",
"method": "POST",
"others": {
"h2": false,
"keep-alive": true,
"disable-redirect": true,
"disable-compression": false
},
"headers": {
"Content-Type": "multipart/form-data"
},
"timeout": 60,
"capture_env": {},
"payload_multipart": [
{
"src": "remote",
"name": "image",
"type": "file",
"value": "https://ddosify-backend-storage.s3.amazonaws.com/media/staging/multipart/tVGNdwRxwB-GvQth9mqKITzq28-suX6R3BzvrSH9rWo/random_image.png"
},
{
"name": "ballot_id",
"value": "{{sandikID}}"
}
]
}
],
"output": "stdout",
"env":{
"sandikID" : "mamak75yil"
},
"duration": 10,
"load_type": "linear",
"iteration_count": 1000
}
================================================
FILE: ddosify_engine/config/config_testdata/benchmark/config_multipart_inject_10rps.json
================================================
{
"steps": [
{
"id": 1,
"url": "https://testserver.ddosify.com/upload_image/",
"name": "",
"method": "POST",
"others": {
"h2": false,
"keep-alive": true,
"disable-redirect": true,
"disable-compression": false
},
"headers": {
"Content-Type": "multipart/form-data"
},
"timeout": 10,
"capture_env": {},
"payload_multipart": [
{
"src": "remote",
"name": "image",
"type": "file",
"value": "https://ddosify-backend-storage.s3.amazonaws.com/media/staging/multipart/tVGNdwRxwB-GvQth9mqKITzq28-suX6R3BzvrSH9rWo/random_image.png"
},
{
"name": "ballot_id",
"value": "{{_randomInt}}"
}
]
}
],
"output": "stdout",
"duration": 10,
"load_type": "linear",
"iteration_count": 100
}
================================================
FILE: ddosify_engine/config/config_testdata/benchmark/config_multipart_inject_1krps.json
================================================
{
"steps": [
{
"id": 1,
"url": "https://testserver.ddosify.com/upload_image/",
"name": "",
"method": "POST",
"others": {
"h2": false,
"keep-alive": true,
"disable-redirect": true,
"disable-compression": false
},
"headers": {
"Content-Type": "multipart/form-data"
},
"timeout": 15,
"capture_env": {},
"payload_multipart": [
{
"src": "remote",
"name": "image",
"type": "file",
"value": "https://ddosify-backend-storage.s3.amazonaws.com/media/staging/multipart/tVGNdwRxwB-GvQth9mqKITzq28-suX6R3BzvrSH9rWo/random_image.png"
},
{
"name": "ballot_id",
"value": "{{sandikID}}"
}
]
}
],
"output": "stdout",
"env":{
"sandikID" : "mamak75yil"
},
"duration": 10,
"load_type": "linear",
"iteration_count": 10000
}
================================================
FILE: ddosify_engine/config/config_testdata/benchmark/config_multipart_inject_200rps.json
================================================
{
"steps": [
{
"id": 1,
"url": "https://testserver.ddosify.com/upload_image/",
"name": "",
"method": "POST",
"others": {
"h2": false,
"keep-alive": true,
"disable-redirect": true,
"disable-compression": false
},
"headers": {
"Content-Type": "multipart/form-data"
},
"timeout": 10,
"capture_env": {},
"payload_multipart": [
{
"src": "remote",
"name": "image",
"type": "file",
"value": "https://ddosify-backend-storage.s3.amazonaws.com/media/staging/multipart/tVGNdwRxwB-GvQth9mqKITzq28-suX6R3BzvrSH9rWo/random_image.png"
},
{
"name": "ballot_id",
"value": "{{sandikID}}"
}
]
}
],
"output": "stdout",
"env":{
"sandikID" : "mamak75yil"
},
"duration": 10,
"load_type": "linear",
"iteration_count": 2000
}
================================================
FILE: ddosify_engine/config/config_testdata/benchmark/config_multipart_inject_2krps.json
================================================
{
"steps": [
{
"id": 1,
"url": "https://testserver.ddosify.com/upload_image/",
"name": "",
"method": "POST",
"others": {
"h2": false,
"keep-alive": true,
"disable-redirect": true,
"disable-compression": false
},
"headers": {
"Content-Type": "multipart/form-data"
},
"timeout": 30,
"capture_env": {},
"payload_multipart": [
{
"src": "remote",
"name": "image",
"type": "file",
"value": "https://ddosify-backend-storage.s3.amazonaws.com/media/staging/multipart/tVGNdwRxwB-GvQth9mqKITzq28-suX6R3BzvrSH9rWo/random_image.png"
},
{
"name": "ballot_id",
"value": "{{sandikID}}"
}
]
}
],
"output": "stdout",
"env":{
"sandikID" : "mamak75yil"
},
"duration": 10,
"load_type": "linear",
"iteration_count": 20000
}
================================================
FILE: ddosify_engine/config/config_testdata/benchmark/config_multipart_inject_500rps.json
================================================
{
"steps": [
{
"id": 1,
"url": "https://testserver.ddosify.com/upload_image/",
"name": "",
"method": "POST",
"others": {
"h2": false,
"keep-alive": true,
"disable-redirect": true,
"disable-compression": false
},
"headers": {
"Content-Type": "multipart/form-data"
},
"timeout": 30,
"capture_env": {},
"payload_multipart": [
{
"src": "remote",
"name": "image",
"type": "file",
"value": "https://ddosify-backend-storage.s3.amazonaws.com/media/staging/multipart/tVGNdwRxwB-GvQth9mqKITzq28-suX6R3BzvrSH9rWo/random_image.png"
},
{
"name": "ballot_id",
"value": "{{sandikID}}"
}
]
}
],
"output": "stdout",
"env":{
"sandikID" : "mamak75yil"
},
"duration": 10,
"load_type": "linear",
"iteration_count": 5000
}
================================================
FILE: ddosify_engine/config/config_testdata/benchmark/config_repeated_user.json
================================================
{
"iteration_count": 100,
"engine_mode": "ddosify",
"load_type": "linear",
"duration": 10,
"steps": [
{
"id": 1,
"url": "{{HTTPBIN}}/json",
"name": "JSON",
"method": "GET",
"others": {
"h2": false,
"disable-redirect": true,
"disable-compression": false
}
}
],
"output": "stdout",
"env":{
"HTTPBIN" : "https://httpbin.ddosify.com"
},
"debug" : false,
"engine-mode": "distinct-user"
}
================================================
FILE: ddosify_engine/config/config_testdata/benchmark/json_payload.json
================================================
{
"boolField" : "{{BOOL}}",
"numField" : "{{NUM}}",
"strField" : "{{STR}}",
"numArrayField" : ["{{NUM}}",34],
"strArrayField" : ["{{STR}}","hello"],
"mixedArrayField" : ["{{NUM}}",34,"{{FLOAT}}"],
"{{STR}}" : "xxxx",
"obj" :{
"numField" : "{{CONTENT_LENGTH}}",
"objectField" : "{{ALL_RESULT}}"
}
}
================================================
FILE: ddosify_engine/config/config_testdata/config.json
================================================
{
"request_count": 1555,
"load_type": "waved",
"duration": 21,
"steps": [
{
"id": 1,
"name": "Example Name 1",
"url": "https://app.servdown.com/accounts/login/?next=/",
"method": "GET",
"payload": "payload str",
"timeout": 3,
"sleep": "1000",
"others": {
}
},
{
"id": 2,
"name": "Example Name 2",
"url": "http://test.com",
"method": "PUT",
"headers": {
"ContenType": "application/xml",
"X-ddosify-key": "ajkndalnasd"
},
"timeout": 2,
"sleep": " 300-500"
}
],
"output": "stdout",
"proxy": "http://proxy_host:80"
}
================================================
FILE: ddosify_engine/config/config_testdata/config_auth.json
================================================
{
"steps": [
{
"id": 1,
"url": "https://app.servdown.com/accounts/login/?next=/",
"auth": {
"type": "basic",
"username": "kursat",
"password": "12345"
}
},
{
"id": 2,
"url": "https://app.servdown.com/accounts/login/?next=/&112f12f12f12f"
}
]
}
================================================
FILE: ddosify_engine/config/config_testdata/config_capture_environment.json
================================================
{
"iteration_count": 100,
"load_type": "waved",
"duration": 21,
"steps": [
{
"id": 1,
"name": "Example Name 1",
"url": "http://localhost:8080/hello",
"method": "GET",
"capture_env": {
"NUM" :{ "from":"body","json_path":"num"},
"X_COOKIE" :{ "from":"cookies","cookie_name":"x"}
}
},
{
"id": 2,
"name": "Example Name 2 Json Body",
"url": "http://localhost:8080/",
"method": "POST",
"headers": {
"Content-Type": "application/json",
"num": "{{NUM}}"
},
"capture_env": {
"REGEX_MATCH_ENV" :{"from":"body","regexp":{"exp" : "[a-z]+_[0-9]+", "matchNo": 1}}
}
}
],
"debug" : true
}
================================================
FILE: ddosify_engine/config/config_testdata/config_data_csv.json
================================================
{
"iteration_count": 4,
"load_type": "waved",
"duration": 1,
"steps": [
{
"id": 2,
"url": "{{LOCAL}}/body",
"name": "JSON",
"method": "GET",
"others": {
"h2": false,
"disable-redirect": true,
"disable-compression": false
},
"payload_file": "../config/config_testdata/data_json_payload.json",
"timeout": 10
}
],
"output": "stdout",
"env":{
"HTTPBIN" : "https://httpbin.ddosify.com",
"LOCAL" : "http://localhost:8084",
"RANDOM_NAMES" : ["kenan","fatih","kursat","semih","sertac"] ,
"RANDOM_INT" : [52,99,60,33],
"RANDOM_BOOL" : [true,true,true,false]
},
"data":{
"info": {
"path" : "../config/config_testdata/test.csv",
"src" : "local",
"delimiter": ";",
"vars": {
"0":{"tag":"name"},
"1":{"tag":"city"},
"2":{"tag":"team"},
"3":{"tag":"payload", "type":"json"},
"4":{"tag":"age", "type":"int"}
},
"allow_quota" : true,
"order": "random",
"skip_first_line" : true
}
},
"debug" : false
}
================================================
FILE: ddosify_engine/config/config_testdata/config_debug_false.json
================================================
{
"debug": false,
"iteration_count": 1555,
"load_type": "waved",
"duration": 21,
"steps": [
{
"id": 1,
"name": "Example Name 1",
"url": "https://app.servdown.com/accounts/login/?next=/",
"method": "GET",
"payload": "payload str",
"timeout": 3,
"sleep": "1000",
"others": {
}
},
{
"id": 2,
"name": "Example Name 2",
"url": "http://test.com",
"method": "PUT",
"headers": {
"ContenType": "application/xml",
"X-ddosify-key": "ajkndalnasd"
},
"timeout": 2,
"sleep": " 300-500"
}
],
"output": "stdout",
"proxy": "http://proxy_host:80"
}
================================================
FILE: ddosify_engine/config/config_testdata/config_debug_mode.json
================================================
{
"debug": true,
"iteration_count": 1555,
"load_type": "waved",
"duration": 21,
"steps": [
{
"id": 1,
"name": "Example Name 1",
"url": "https://app.servdown.com/accounts/login/?next=/",
"method": "GET",
"payload": "payload str",
"timeout": 3,
"sleep": "1000",
"others": {
}
},
{
"id": 2,
"name": "Example Name 2",
"url": "http://test.com",
"method": "PUT",
"headers": {
"ContenType": "application/xml",
"X-ddosify-key": "ajkndalnasd"
},
"timeout": 2,
"sleep": " 300-500"
}
],
"output": "stdout",
"proxy": "http://proxy_host:80"
}
================================================
FILE: ddosify_engine/config/config_testdata/config_empty.json
================================================
{
"steps": [
{
"id": 1,
"url": "test.com"
}
]
}
================================================
FILE: ddosify_engine/config/config_testdata/config_global_envs.json
================================================
{
"steps": [
{
"id": 1,
"name": "Example Name 1",
"url": "{{LOCAL}}",
"method": "GET"
},
{
"id": 2,
"name": "Example Name 2 Json Body",
"url": "{{HTTPBIN}}",
"method": "GET",
"headers": {
"Content-Type": "application/json"
}
}
],
"env":{
"HTTPBIN" : "https://httpbin.ddosify.com",
"LOCAL" : "http://localhost:8084/hello"
}
}
================================================
FILE: ddosify_engine/config/config_testdata/config_incorrect.json
================================================
{
"request_count": 100,
"load_type": "linear",
"duration": 10,
"steps": [
{
"id": 1,
"url": "https://app.servdown.com/accounts/login/?next=/",
"auth": {
"type": "basic",
"username": "kursat",
"password": "12345"
},
"method": "GET",
"headers": {
"ContenType": "application/xml",
"User-Agent": "chrome5"
},
"payload": "body yt kanl adnlandlandaln",
"timeout": 1,
"others": {
}
},
{
"id": 2,
"url": "https://app.servdown.com/accounts/login/?next=/&112f12f12f12f",
"method": "GET",
"headers": {
"ContenType": "application/xml",
"X-ddosify-key": "ajkndalnasd"
},
"payload_file": "config_examples/payload.txt",
"timeout": 1,
"others": {
}
},
],
"proxy": "http://proxy_host:80",
"output": "stdout"
}
================================================
FILE: ddosify_engine/config/config_testdata/config_init_cookies.json
================================================
{
"iteration_count": 1555,
"load_type": "waved",
"duration": 21,
"steps": [
{
"id": 1,
"name": "Example Name 1",
"url": "https://app.servdown.com/accounts/login/?next=/",
"method": "GET",
"payload": "payload str",
"timeout": 3,
"sleep": "1000",
"others": {
}
}
],
"output": "stdout",
"engine_mode": "distinct-user",
"cookie_jar":{
"enabled" : true,
"cookies" :[
{
"name": "platform",
"value": "web",
"domain": "httpbin.ddosify.com",
"path": "/",
"expires": "Thu, 16 Mar 2023 09:24:02 GMT",
"http_only": true,
"secure": false
}
]
}
}
================================================
FILE: ddosify_engine/config/config_testdata/config_inject_json.json
================================================
{
"iteration_count": 100,
"load_type": "waved",
"duration": 21,
"steps": [
{
"id": 1,
"name": "Example Name 1",
"url": "{{LOCAL}}",
"method": "GET",
"capture_env": {
"NUM" :{ "from":"body","json_path":"num"},
"NAME" :{ "from":"body","json_path":"name"},
"IS_CHAMPION": {"from":"body","json_path":"isChampion"},
"MESSI" : {"from":"body","json_path":"squad.players.0"},
"PLAYERS" :{"from":"body","json_path":"squad.players"},
"SQUAD" :{"from":"body","json_path":"squad"},
"ARGENTINA" :{"from":"header", "header_key":"Argentina"},
"m10" :{"from":"header", "header_key":"Argentina" ,"regexp":{"exp":"[a-z]+_[0-9]+","matchNo":1} }
}
},
{
"id": 2,
"name": "Example Name 2 Json Body",
"url": "{{LOCAL}}",
"method": "POST",
"headers": {
"Content-Type": "application/json",
"num": "{{NUM}}",
"bool" : "{{IS_CHAMPION}}"
},
"payload_file" : "../config/config_testdata/json_payload.json",
"capture_env": {
"REGEX_MATCH_ENV" :{"from":"body","json_path":"num"}
}
}
],
"env":{
"HTTPBIN" : "https://httpbin.ddosify.com",
"LOCAL" : "http://localhost:8084/hello"
},
"debug" : true
}
================================================
FILE: ddosify_engine/config/config_testdata/config_inject_json_dynamic.json
================================================
{
"iteration_count": 100,
"load_type": "waved",
"duration": 21,
"steps": [
{
"id": 1,
"name": "Example Name 1",
"url": "{{LOCAL}}",
"method": "GET",
"capture_env": {
"NUM" :{ "from":"body","json_path":"num"},
"NAME" :{ "from":"body","json_path":"name"},
"IS_CHAMPION": {"from":"body","json_path":"isChampion"},
"MESSI" : {"from":"body","json_path":"squad.players.0"},
"PLAYERS" :{"from":"body","json_path":"squad.players"},
"SQUAD" :{"from":"body","json_path":"squad"},
"ARGENTINA" :{"from":"header", "header_key":"Argentina"},
"m10" :{"from":"header", "header_key":"Argentina" ,"regexp":{"exp":"[a-z]+_[0-9]+","matchNo":1} }
}
},
{
"id": 2,
"name": "Example Name 2 Json Body",
"url": "{{LOCAL}}",
"method": "POST",
"headers": {
"Content-Type": "application/json",
"num": "{{NUM}}",
"bool" : "{{IS_CHAMPION}}"
},
"payload_file" : "../config/config_testdata/json_payload_dynamic.json",
"capture_env": {
"REGEX_MATCH_ENV" :{"from":"body","json_path":"num"}
}
}
],
"env":{
"HTTPBIN" : "https://httpbin.ddosify.com",
"LOCAL" : "http://localhost:8084/hello"
},
"debug" : true
}
================================================
FILE: ddosify_engine/config/config_testdata/config_inject_xml.json
================================================
{
"iteration_count": 100,
"load_type": "waved",
"duration": 21,
"steps": [
{
"id": 1,
"name": "Example Name 1",
"url": "{{LOCAL}}",
"method": "GET",
"payload_file" :"../config/config_testdata/xml_payload.xml"
}
],
"env":{
"LOCAL" : "http://localhost:8084",
"HELLO" : "hello"
},
"debug" : true
}
================================================
FILE: ddosify_engine/config/config_testdata/config_invalid_capture_env.json
================================================
{
"iteration_count": 100,
"load_type": "waved",
"duration": 21,
"steps": [
{
"id": 1,
"name": "Example Name 1",
"url": "{{LOCAL}}",
"method": "GET",
"capture_env": {
"NUM" :{ "from":"body","json_path":"num"}
}
},
{
"id": 2,
"name": "Example Name 2 Json Body",
"url": "{{HTTPBIN}}",
"method": "POST",
"headers": {
"Content-Type": "application/json",
"num": "{{NUM}}"
},
"capture_env": {
"REGEX_MATCH_ENV" :{"from":"header","regexp":{"exp" : "", "matchNo": 1}}
}
}
],
"debug" : true
}
================================================
FILE: ddosify_engine/config/config_testdata/config_invalid_target.json
================================================
{
"steps": [
{
"id": 1,
"url": "_invalid.com"
}
]
}
================================================
FILE: ddosify_engine/config/config_testdata/config_invalid_user_mode_for_cookies.json
================================================
{
"iteration_count": 1555,
"load_type": "waved",
"duration": 21,
"steps": [
{
"id": 1,
"name": "Example Name 1",
"url": "https://app.servdown.com/accounts/login/?next=/",
"method": "GET",
"payload": "payload str",
"timeout": 3,
"sleep": "1000",
"others": {
}
}
],
"output": "stdout",
"cookie_jar":{
"enabled" : true,
"cookies" :[
{
"name": "platform",
"value": "web",
"domain": "httpbin.ddosify.com",
"path": "/",
"expires": "Thu, 16 Mar 2023 09:24:02 GMT",
"http_only": true,
"secure": false
}
]
}
}
================================================
FILE: ddosify_engine/config/config_testdata/config_iteration_count.json
================================================
{
"iteration_count": 1555,
"load_type": "waved",
"duration": 21,
"steps": [
{
"id": 1,
"name": "Example Name 1",
"url": "https://app.servdown.com/accounts/login/?next=/",
"method": "GET",
"payload": "payload str",
"timeout": 3,
"sleep": "1000",
"others": {
}
},
{
"id": 2,
"name": "Example Name 2",
"url": "http://test.com",
"method": "PUT",
"headers": {
"ContenType": "application/xml",
"X-ddosify-key": "ajkndalnasd"
},
"timeout": 2,
"sleep": " 300-500"
}
],
"output": "stdout",
"proxy": "http://proxy_host:80"
}
================================================
FILE: ddosify_engine/config/config_testdata/config_iteration_count_over_req_count.json
================================================
{
"iteration_count": 333,
"req_count": 222,
"load_type": "waved",
"duration": 21,
"steps": [
{
"id": 1,
"name": "Example Name 1",
"url": "https://app.servdown.com/accounts/login/?next=/",
"method": "GET",
"payload": "payload str",
"timeout": 3,
"sleep": "1000",
"others": {
}
},
{
"id": 2,
"name": "Example Name 2",
"url": "http://test.com",
"method": "PUT",
"headers": {
"ContenType": "application/xml",
"X-ddosify-key": "ajkndalnasd"
},
"timeout": 2,
"sleep": " 300-500"
}
],
"output": "stdout",
"proxy": "http://proxy_host:80"
}
================================================
FILE: ddosify_engine/config/config_testdata/config_manual_load.json
================================================
{
"manual_load": [
{"duration": 5, "count": 5},
{"duration": 6, "count": 10},
{"duration": 7, "count": 20}
],
"steps": [
{
"id": 1,
"url": "test.com"
}
]
}
================================================
FILE: ddosify_engine/config/config_testdata/config_manual_load_override.json
================================================
{
"requests_count": 100,
"duration": 22,
"manual_load": [
{"duration": 5, "count": 5},
{"duration": 6, "count": 10},
{"duration": 7, "count": 20}
],
"steps": [
{
"id": 1,
"url": "test.com"
}
]
}
================================================
FILE: ddosify_engine/config/config_testdata/config_multipart_err.json
================================================
{
"steps": [
{
"id": 1,
"url": "https://app.servdown.com/accounts/login/?next=/",
"method": "GET",
"payload_multipart": [
{
"name": "example-name-5",
"value": "https://uplo333ad.wikimedia.org/wikipedia/commons/b/bd/Test.svg",
"type": "file",
"src": "remote"
}
]
}
]
}
================================================
FILE: ddosify_engine/config/config_testdata/config_multipart_payload.json
================================================
{
"steps": [
{
"id": 1,
"url": "https://app.servdown.com/accounts/login/?next=/",
"method": "GET",
"payload_multipart": [
{
"name": "example-name-1",
"value": "config_testdata/test_img.svg",
"type": "file"
},
{
"name": "example-name-2",
"value": "https://upload.wikimedia.org/wikipedia/commons/b/bd/Test.svg",
"type": "file",
"src": "remote"
},
{
"name": "example-name-3",
"value": "text-field-value"
},
{
"name": "example-name-4",
"value": "123123",
"type": "text"
}
]
}
]
}
================================================
FILE: ddosify_engine/config/config_testdata/config_payload.json
================================================
{
"steps": [
{
"id": 1,
"url": "https://app.servdown.com/accounts/login/?next=/",
"method": "GET",
"payload": "payload from string"
},
{
"id": 2,
"url": "https://app.servdown.com/accounts/login/?next=/&112f12f12f12f",
"payload_file": "config_testdata/payload.txt"
}
]
}
================================================
FILE: ddosify_engine/config/config_testdata/config_protocol.json
================================================
{
"steps": [
{
"id": 1,
"url": "https://app.servdown.com/accounts/login/?next=/",
"protocol": "http"
},
{
"id": 2,
"url": "http://app.servdown.com/accounts/login/?next=/&112f12f12f12f"
},
{
"id": 3,
"url": "app.servdown.com/accounts/login/?next=/&112f12f12f12f"
},
{
"id": 4,
"url": "app.servdown.com/accounts/login/?next=/&112f12f12f12f",
"protocol": "http"
}
]
}
================================================
FILE: ddosify_engine/config/config_testdata/config_test_assertion_fail.json
================================================
{
"iteration_count": 100,
"load_type": "linear",
"duration": 10,
"debug" : false,
"success_criterias": [
{
"rule" : "false",
"abort" : true,
"delay" : 1
}
],
"steps": [
{
"id": 1,
"url": "https://httpbin.ddosify.com/json2",
"name": "JSON",
"method": "GET",
"others": {
"h2": false,
"keep-alive": true,
"disable-redirect": true,
"disable-compression": false
},
"timeout": 2
}
]
}
================================================
FILE: ddosify_engine/config/config_testdata/data_json_payload.json
================================================
{
"name" : "{{data.info.name}}",
"team" : "{{data.info.team}}",
"city" : "{{data.info.city}}",
"payload" : "{{rand(data.info.payload)}}",
"age" : "{{data.info.age}}"
}
================================================
FILE: ddosify_engine/config/config_testdata/json_payload.json
================================================
{
"boolField" : "{{IS_CHAMPION}}",
"numField" : "{{NUM}}",
"strField" : "{{NAME}}",
"numArrayField" : ["{{NUM}}",34],
"strArrayField" : ["{{NAME}}","hello"],
"mixedArrayField" : ["{{NUM}}",34,"{{NAME}}","{{SQUAD}}"],
"{{NAME}}" : "xxxx",
"obj" :{
"numField" : "{{NUM}}",
"objectField" : "{{SQUAD}}",
"arrayField" : "{{PLAYERS}}"
}
}
================================================
FILE: ddosify_engine/config/config_testdata/json_payload_dynamic.json
================================================
{
"name" : "{{_randomString}}",
"city" : "{{_randomCity}}",
"age" : "{{_randomInt}}"
}
================================================
FILE: ddosify_engine/config/config_testdata/payload.txt
================================================
Payloaf from file.
================================================
FILE: ddosify_engine/config/config_testdata/race_configs/capture_envs.json
================================================
{
"iteration_count": 10,
"duration": 2,
"steps": [
{
"id": 1,
"name": "Example Name 2 Json Body",
"url": "{{HTTPBIN}}/json",
"method": "GET",
"headers": {
"Content-Type": "application/json"
},
"capture_env": {
"NUM" :{ "from":"body","json_path":"quoteResponse.result.0.askSize"}
}
},
{
"id": 2,
"name": "Example Name 1",
"url": "{{LOCAL}}",
"method": "GET"
}
],
"env":{
"HTTPBIN" : "https://httpbin.ddosify.com",
"LOCAL" : "http://localhost:8084/hello"
}
}
================================================
FILE: ddosify_engine/config/config_testdata/race_configs/global_envs.json
================================================
{
"iteration_count": 10,
"duration": 2,
"steps": [
{
"id": 1,
"name": "Example Name 1",
"url": "{{LOCAL}}",
"method": "GET"
},
{
"id": 2,
"name": "Example Name 2 Json Body",
"url": "{{HTTPBIN}}",
"method": "GET",
"headers": {
"Content-Type": "application/json"
}
}
],
"env":{
"HTTPBIN" : "https://httpbin.ddosify.com",
"LOCAL" : "http://localhost:8084/hello"
}
}
================================================
FILE: ddosify_engine/config/config_testdata/race_configs/step_assertions_stdout.json
================================================
{
"debug": false,
"steps": [
{
"id": 1,
"url": "https://testserver.ddosify.com/exchange/",
"name": "",
"method": "GET",
"others": {
"h2": false,
"keep-alive": true,
"disable-redirect": true,
"disable-compression": false
},
"timeout": 10,
"capture_env": {},
"assertion": [
"equals(status_code,203)",
"contains(body,\"afssafs\")"
]
},
{
"id": 2,
"url": "https://testserver.ddosify.com/exchange/",
"name": "",
"method": "GET",
"others": {
"h2": false,
"keep-alive": true,
"disable-redirect": true,
"disable-compression": false
},
"timeout": 10,
"capture_env": {},
"assertion": [
"equals(status_code,401)"
]
},
{
"id": 3,
"url": "https://teasgsagasgsastserver.ddosify.com/exchange/",
"name": "",
"method": "GET",
"others": {
"h2": false,
"keep-alive": true,
"disable-redirect": true,
"disable-compression": false
},
"timeout": 10,
"capture_env": {},
"assertion": [
"equals(status_code,401)"
]
}
],
"iteration_count": 10,
"duration": 2,
"output": "stdout"
}
================================================
FILE: ddosify_engine/config/config_testdata/race_configs/step_assertions_stdout_json.json
================================================
{
"debug": false,
"steps": [
{
"id": 1,
"url": "https://testserver.ddosify.com/exchange/",
"name": "",
"method": "GET",
"others": {
"h2": false,
"keep-alive": true,
"disable-redirect": true,
"disable-compression": false
},
"timeout": 10,
"capture_env": {},
"assertion": [
"equals(status_code,203)",
"contains(body,\"afssafs\")"
]
},
{
"id": 2,
"url": "https://testserver.ddosify.com/exchange/",
"name": "",
"method": "GET",
"others": {
"h2": false,
"keep-alive": true,
"disable-redirect": true,
"disable-compression": false
},
"timeout": 10,
"capture_env": {},
"assertion": [
"equals(status_code,401)"
]
},
{
"id": 3,
"url": "https://teasgsagasgsastserver.ddosify.com/exchange/",
"name": "",
"method": "GET",
"others": {
"h2": false,
"keep-alive": true,
"disable-redirect": true,
"disable-compression": false
},
"timeout": 10,
"capture_env": {},
"assertion": [
"equals(status_code,401)"
]
}
],
"iteration_count": 10,
"duration": 2,
"output": "stdout-json"
}
================================================
FILE: ddosify_engine/config/config_testdata/test.csv
================================================
Username;City;Team;Payload;Age;Percent;BoolField;;;
Kenan;Tokat;Galatasaray;{"data":{"profile":{"name":"Kenan"}}};25;22.3;true;;;
Fatih;Bolu;Galatasaray;[5,6,7];29;44.3;false;;;
Kursat;Samsun;Besiktas;{"a":"b"};28;12.54;True;;;
Semih;Duzce;Besiktas;{"a":"b"};27;663.67;False;;;
;;;;;;;;;
;;;;;;;;;
================================================
FILE: ddosify_engine/config/config_testdata/xml_payload.xml
================================================
<?xml version="1.0" encoding="UTF-8" ?>
<rss version="2.0">
<channel>
<item>
<title>{{HELLO}}</title>
</item>
</channel>
</rss>
================================================
FILE: ddosify_engine/config/json.go
================================================
/*
*
* Ddosify - Load testing tool for any web system.
* Copyright (C) 2021 Ddosify (https://ddosify.com)
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU Affero General Public License as published
* by the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU Affero General Public License for more details.
*
* You should have received a copy of the GNU Affero General Public License
* along with this program. If not, see <https://www.gnu.org/licenses/>.
*
*/
package config
import (
"bytes"
"encoding/json"
"fmt"
"io"
"io/ioutil"
"mime/multipart"
"net/http"
"net/url"
"os"
"path"
"path/filepath"
"strings"
"unsafe"
"go.ddosify.com/ddosify/core/proxy"
"go.ddosify.com/ddosify/core/types"
)
const ConfigTypeJson = "jsonReader"
func init() {
AvailableConfigReader[ConfigTypeJson] = &JsonReader{}
}
type timeRunCount []struct {
Duration int `json:"duration"`
Count int `json:"count"`
}
type auth struct {
Type string `json:"type"`
Username string `json:"username"`
Password string `json:"password"`
}
type multipartFormData struct {
Name string `json:"name"`
Value string `json:"value"`
Type string `json:"type"`
Src string `json:"src"`
}
type RegexCaptureConf struct {
Exp *string `json:"exp"`
No int `json:"matchNo"`
}
type capturePath struct {
JsonPath *string `json:"json_path"`
XPath *string `json:"xpath"`
XpathHtml *string `json:"xpath_html"`
RegExp *RegexCaptureConf `json:"regexp"`
From string `json:"from"` // body,header,cookie
CookieName *string `json:"cookie_name"`
HeaderKey *string `json:"header_key"` // header key
}
type step struct {
Id uint16 `json:"id"`
Name string `json:"name"`
Url string `json:"url"`
Auth auth `json:"auth"`
Method string `json:"method"`
Headers map[string]string `json:"headers"`
Payload string `json:"payload"`
PayloadFile string `json:"payload_file"`
PayloadMultipart []multipartFormData `json:"payload_multipart"`
Timeout int `json:"timeout"`
Sleep string `json:"sleep"`
Others map[string]interface{} `json:"others"`
CertPath string `json:"cert_path"`
CertKeyPath string `json:"cert_key_path"`
CaptureEnv map[string]capturePath `json:"capture_env"`
Assertions []string `json:"assertion"`
}
func (s *step) UnmarshalJSON(data []byte) error {
type stepAlias step
defaultFields := &stepAlias{
Method: types.DefaultMethod,
Timeout: types.DefaultTimeout,
}
err := json.Unmarshal(data, defaultFields)
if err != nil {
return err
}
*s = step(*defaultFields)
return nil
}
type Tag struct {
Tag string `json:"tag"`
Type string `json:"type"`
}
func (t *Tag) UnmarshalJSON(data []byte) error {
// default values
t.Type = "string"
type tempTag Tag
return json.Unmarshal(data, (*tempTag)(t))
}
type CsvConf struct {
Path string `json:"path"`
Delimiter string `json:"delimiter"`
SkipFirstLine bool `json:"skip_first_line"`
Vars map[string]Tag `json:"vars"` // "0":"name", "1":"city","2":"team"
SkipEmptyLine bool `json:"skip_empty_line"`
AllowQuota bool `json:"allow_quota"`
Order string `json:"order"`
}
func (c *CsvConf) UnmarshalJSON(data []byte) error {
// default values
c.SkipEmptyLine = true
c.SkipFirstLine = false
c.AllowQuota = false
c.Delimiter = ","
c.Order = "random"
type tempCsv CsvConf
return json.Unmarshal(data, (*tempCsv)(c))
}
type JsonReader struct {
ReqCount *int `json:"request_count"`
IterCount *int `json:"iteration_count"`
LoadType string `json:"load_type"`
Duration int `json:"duration"`
Assertions []TestAssertion `json:"success_criterias"`
TimeRunCount timeRunCount `json:"manual_load"`
Steps []step `json:"steps"`
Output string `json:"output"`
Proxy string `json:"proxy"`
Envs map[string]interface{} `json:"env"`
Data map[string]CsvConf `json:"data"`
Debug bool `json:"debug"`
SamplingRate *int `json:"sampling_rate"`
EngineMode string `json:"engine_mode"`
Cookies CookieConf `json:"cookie_jar"`
}
type CookieConf struct {
Cookies []CustomCookie `json:"cookies"`
Enabled bool `json:"enabled"`
}
type CustomCookie struct {
Name string `json:"name"`
Value string `json:"value"`
Domain string `json:"domain"`
Path string `json:"path"`
Expires string `json:"expires"`
MaxAge int `json:"max_age"`
HttpOnly bool `json:"http_only"`
Secure bool `json:"secure"`
Raw string `json:"raw"`
}
type TestAssertion struct {
Rule string `json:"rule"`
Abort bool `json:"abort"`
Delay int `json:"delay"`
}
func (j *JsonReader) UnmarshalJSON(data []byte) error {
type jsonReaderAlias JsonReader
defaultFields := &jsonReaderAlias{
LoadType: types.DefaultLoadType,
Duration: types.DefaultDuration,
Output: types.DefaultOutputType,
EngineMode: types.EngineModeDdosify,
}
err := json.Unmarshal(data, defaultFields)
if err != nil {
return err
}
*j = JsonReader(*defaultFields)
return nil
}
func (j *JsonReader) Init(jsonByte []byte) (err error) {
if !json.Valid(jsonByte) {
err = fmt.Errorf("provided json is invalid")
return
}
err = json.Unmarshal(jsonByte, &j)
if err != nil {
return
}
return
}
func (j *JsonReader) CreateHammer() (h types.Hammer, err error) {
// Scenario
s := types.Scenario{
Envs: j.Envs,
}
var si types.ScenarioStep
for _, step := range j.Steps {
si, err = stepToScenarioStep(step)
if err != nil {
return
}
s.Steps = append(s.Steps, si)
}
// Proxy
var proxyURL *url.URL
if j.Proxy != "" {
proxyURL, err = url.Parse(j.Proxy)
if err != nil {
return
}
}
p := proxy.Proxy{
Strategy: proxy.ProxyTypeSingle,
Addr: proxyURL,
}
// for backwards compatibility
var iterationCount int
if j.IterCount != nil {
iterationCount = *j.IterCount
} else if j.ReqCount != nil {
iterationCount = *j.ReqCount
} else {
iterationCount = types.DefaultIterCount
}
j.IterCount = &iterationCount
// TimeRunCount
if len(j.TimeRunCount) > 0 {
*j.IterCount, j.Duration = 0, 0
for _, t := range j.TimeRunCount {
*j.IterCount += t.Count
j.Duration += t.Duration
}
}
var samplingRate int
if j.SamplingRate != nil {
samplingRate = *j.SamplingRate
} else {
samplingRate = types.DefaultSamplingCount
}
testDataConf := make(map[string]types.CsvConf)
for key, val := range j.Data {
vars := make(map[string]types.Tag)
for k, v := range val.Vars {
vars[k] = types.Tag{
Tag: v.Tag,
Type: v.Type,
}
}
testDataConf[key] = types.CsvConf{
Path: val.Path,
Delimiter: val.Delimiter,
SkipFirstLine: val.SkipFirstLine,
Vars: vars,
SkipEmptyLine: val.SkipEmptyLine,
AllowQuota: val.AllowQuota,
Order: val.Order,
}
}
if j.Cookies.Enabled && j.EngineMode == types.EngineModeDdosify {
return h, fmt.Errorf("cookies are not supported in ddosify engine mode, please use distinct-user or repeated-user mode")
}
var testAssertions map[string]types.TestAssertionOpt
if len(j.Assertions) > 0 {
testAssertions = make(map[string]types.TestAssertionOpt, 0)
}
for _, as := range j.Assertions {
testAssertions[as.Rule] = types.TestAssertionOpt{
Abort: as.Abort,
Delay: as.Delay,
}
}
// Hammer
h = types.Hammer{
IterationCount: *j.IterCount,
LoadType: strings.ToLower(j.LoadType),
TestDuration: j.Duration,
TimeRunCountMap: types.TimeRunCount(j.TimeRunCount),
Scenario: s,
Proxy: p,
ReportDestination: j.Output,
Debug: j.Debug,
SamplingRate: samplingRate,
EngineMode: j.EngineMode,
TestDataConf: testDataConf,
Cookies: *(*[]types.CustomCookie)(unsafe.Pointer(&j.Cookies.Cookies)),
CookiesEnabled: j.Cookies.Enabled,
Assertions: testAssertions,
SingleMode: types.DefaultSingleMode,
}
return
}
func stepToScenarioStep(s step) (types.ScenarioStep, error) {
var payload string
var err error
if len(s.PayloadMultipart) > 0 {
if s.Headers == nil {
s.Headers = make(map[string]string)
}
payload, s.Headers["Content-Type"], err = prepareMultipartPayload(s.PayloadMultipart)
if err != nil {
return types.ScenarioStep{}, err
}
} else if s.PayloadFile != "" {
var pUrl *url.URL
if pUrl, err = url.ParseRequestURI(s.PayloadFile); err == nil && pUrl.IsAbs() { // url
payload, err = preparePayloadFile(s.PayloadFile)
if err != nil {
return types.ScenarioStep{}, err
}
} else if _, err = os.Stat(s.PayloadFile); err == nil { // local file path
buf, err := ioutil.ReadFile(s.PayloadFile)
if err != nil {
return types.ScenarioStep{}, err
}
payload = string(buf)
} else {
return types.ScenarioStep{}, fmt.Errorf("payload file %s not found", s.PayloadFile)
}
} else {
payload = s.Payload
}
// Set default Auth type if not set
if s.Auth != (auth{}) && s.Auth.Type == "" {
s.Auth.Type = types.AuthHttpBasic
}
err = types.IsTargetValid(s.Url)
if err != nil {
return types.ScenarioStep{}, err
}
var capturedEnvs []types.EnvCaptureConf
for name, path := range s.CaptureEnv {
capConf := types.EnvCaptureConf{
JsonPath: path.JsonPath,
Xpath: path.XPath,
XpathHtml: path.XpathHtml,
Name: name,
From: types.SourceType(path.From),
Key: path.HeaderKey,
CookieName: path.CookieName,
}
if path.RegExp != nil {
capConf.RegExp = &types.RegexCaptureConf{
Exp: path.RegExp.Exp,
No: path.RegExp.No,
}
}
capturedEnvs = append(capturedEnvs, capConf)
}
item := types.ScenarioStep{
ID: s.Id,
Name: s.Name,
URL: s.Url,
Auth: types.Auth(s.Auth),
Method: strings.ToUpper(s.Method),
Headers: s.Headers,
Payload: payload,
Timeout: s.Timeout,
Sleep: strings.ReplaceAll(s.Sleep, " ", ""),
Custom: s.Others,
EnvsToCapture: capturedEnvs,
Assertions: s.Assertions,
}
if s.CertPath != "" && s.CertKeyPath != "" {
cert, pool, err := types.ParseTLS(s.CertPath, s.CertKeyPath)
if err != nil {
return item, err
}
item.Cert = cert
item.CertPool = pool
}
return item, nil
}
func prepareMultipartPayload(parts []multipartFormData) (body string, contentType string, err error) {
byteBody := &bytes.Buffer{}
writer :=
gitextract_guep6k27/
├── .devcontainer/
│ ├── .zshrc
│ ├── Dockerfile.dev
│ └── devcontainer.json
├── .github/
│ ├── ISSUE_TEMPLATE/
│ │ ├── bug_report.md
│ │ └── feature_request.md
│ ├── dependabot.yml
│ ├── pull_request_template.md
│ └── workflows/
│ ├── coverage.yml
│ ├── docs.yml
│ ├── release.yml
│ └── test.yml
├── .gitignore
├── .lycheeignore
├── CODE_OF_CONDUCT.md
├── CONTRIBUTING.md
├── LICENSE
├── README.md
├── SECURITY.md
├── assets/
│ └── ddosify.profile
├── ddosify_engine/
│ ├── .dockerignore
│ ├── .golangci.yml
│ ├── .goreleaser.yml
│ ├── Dockerfile
│ ├── Dockerfile.dev
│ ├── Dockerfile.release
│ ├── Jenkinsfile
│ ├── Jenkinsfile_benchmark
│ ├── README.md
│ ├── completions/
│ │ ├── README.md
│ │ └── _ddosify
│ ├── config/
│ │ ├── base.go
│ │ ├── base_test.go
│ │ ├── config_testdata/
│ │ │ ├── benchmark/
│ │ │ │ ├── config_correlation_load_1.json
│ │ │ │ ├── config_correlation_load_2.json
│ │ │ │ ├── config_correlation_load_3.json
│ │ │ │ ├── config_correlation_load_4.json
│ │ │ │ ├── config_correlation_load_5.json
│ │ │ │ ├── config_distinct_user.json
│ │ │ │ ├── config_multipart_inject_100rps.json
│ │ │ │ ├── config_multipart_inject_10rps.json
│ │ │ │ ├── config_multipart_inject_1krps.json
│ │ │ │ ├── config_multipart_inject_200rps.json
│ │ │ │ ├── config_multipart_inject_2krps.json
│ │ │ │ ├── config_multipart_inject_500rps.json
│ │ │ │ ├── config_repeated_user.json
│ │ │ │ └── json_payload.json
│ │ │ ├── config.json
│ │ │ ├── config_auth.json
│ │ │ ├── config_capture_environment.json
│ │ │ ├── config_data_csv.json
│ │ │ ├── config_debug_false.json
│ │ │ ├── config_debug_mode.json
│ │ │ ├── config_empty.json
│ │ │ ├── config_global_envs.json
│ │ │ ├── config_incorrect.json
│ │ │ ├── config_init_cookies.json
│ │ │ ├── config_inject_json.json
│ │ │ ├── config_inject_json_dynamic.json
│ │ │ ├── config_inject_xml.json
│ │ │ ├── config_invalid_capture_env.json
│ │ │ ├── config_invalid_target.json
│ │ │ ├── config_invalid_user_mode_for_cookies.json
│ │ │ ├── config_iteration_count.json
│ │ │ ├── config_iteration_count_over_req_count.json
│ │ │ ├── config_manual_load.json
│ │ │ ├── config_manual_load_override.json
│ │ │ ├── config_multipart_err.json
│ │ │ ├── config_multipart_payload.json
│ │ │ ├── config_payload.json
│ │ │ ├── config_protocol.json
│ │ │ ├── config_test_assertion_fail.json
│ │ │ ├── data_json_payload.json
│ │ │ ├── json_payload.json
│ │ │ ├── json_payload_dynamic.json
│ │ │ ├── payload.txt
│ │ │ ├── race_configs/
│ │ │ │ ├── capture_envs.json
│ │ │ │ ├── global_envs.json
│ │ │ │ ├── step_assertions_stdout.json
│ │ │ │ └── step_assertions_stdout_json.json
│ │ │ ├── test.csv
│ │ │ └── xml_payload.xml
│ │ ├── json.go
│ │ └── json_test.go
│ ├── config_examples/
│ │ ├── assertion/
│ │ │ └── expected_body.json
│ │ ├── config.json
│ │ └── payload.txt
│ ├── core/
│ │ ├── assertion/
│ │ │ ├── base.go
│ │ │ ├── service.go
│ │ │ └── service_test.go
│ │ ├── engine.go
│ │ ├── engine_test.go
│ │ ├── proxy/
│ │ │ ├── base.go
│ │ │ ├── base_test.go
│ │ │ └── single.go
│ │ ├── report/
│ │ │ ├── aggregator.go
│ │ │ ├── aggregator_test.go
│ │ │ ├── base.go
│ │ │ ├── base_test.go
│ │ │ ├── debug.go
│ │ │ ├── debug_test.go
│ │ │ ├── stdout.go
│ │ │ ├── stdoutJson.go
│ │ │ ├── stdoutJson_test.go
│ │ │ └── stdout_test.go
│ │ ├── scenario/
│ │ │ ├── client_pool.go
│ │ │ ├── client_pool_cookie_test.go
│ │ │ ├── data/
│ │ │ │ ├── csv.go
│ │ │ │ └── csv_test.go
│ │ │ ├── requester/
│ │ │ │ ├── base.go
│ │ │ │ ├── base_test.go
│ │ │ │ ├── http.go
│ │ │ │ └── http_test.go
│ │ │ ├── scripting/
│ │ │ │ ├── assertion/
│ │ │ │ │ ├── assert.go
│ │ │ │ │ ├── assert_test.go
│ │ │ │ │ ├── ast/
│ │ │ │ │ │ └── ast.go
│ │ │ │ │ ├── evaluator/
│ │ │ │ │ │ ├── env.go
│ │ │ │ │ │ ├── evaluator.go
│ │ │ │ │ │ ├── function.go
│ │ │ │ │ │ └── function_test.go
│ │ │ │ │ ├── lexer/
│ │ │ │ │ │ ├── lexer.go
│ │ │ │ │ │ └── lexer_test.go
│ │ │ │ │ ├── parser/
│ │ │ │ │ │ ├── parser.go
│ │ │ │ │ │ └── parser_test.go
│ │ │ │ │ ├── test_files/
│ │ │ │ │ │ ├── a.txt
│ │ │ │ │ │ ├── currencies.json
│ │ │ │ │ │ ├── jsonArray.json
│ │ │ │ │ │ ├── jsonMap.json
│ │ │ │ │ │ └── number.json
│ │ │ │ │ └── token/
│ │ │ │ │ └── token.go
│ │ │ │ ├── extraction/
│ │ │ │ │ ├── base.go
│ │ │ │ │ ├── base_test.go
│ │ │ │ │ ├── html.go
│ │ │ │ │ ├── html_test.go
│ │ │ │ │ ├── json.go
│ │ │ │ │ ├── json_test.go
│ │ │ │ │ ├── regex.go
│ │ │ │ │ ├── regex_test.go
│ │ │ │ │ ├── xml.go
│ │ │ │ │ └── xml_test.go
│ │ │ │ └── injection/
│ │ │ │ ├── dynamic_test.go
│ │ │ │ ├── environment.go
│ │ │ │ ├── environment_dynamic.go
│ │ │ │ ├── environment_test.go
│ │ │ │ └── init.go
│ │ │ ├── service.go
│ │ │ └── service_test.go
│ │ ├── types/
│ │ │ ├── error.go
│ │ │ ├── hammer.go
│ │ │ ├── hammer_test.go
│ │ │ ├── regex/
│ │ │ │ ├── regex.go
│ │ │ │ └── regex_test.go
│ │ │ ├── response.go
│ │ │ ├── scenario.go
│ │ │ └── scenario_test.go
│ │ └── util/
│ │ ├── buffer_pool.go
│ │ ├── helper.go
│ │ └── pool.go
│ ├── go.mod
│ ├── go.sum
│ ├── main.go
│ ├── main_benchmark_test.go
│ ├── main_exit_test.go
│ ├── main_test.go
│ └── scripts/
│ ├── install.sh
│ └── testing/
│ └── benchstat.sh
└── selfhosted/
├── README.md
├── VERSION
├── docker-compose.yml
├── init_scripts/
│ ├── influxdb/
│ │ └── 01_influxdb_create_buckets.sh
│ ├── postgres/
│ │ └── 01_postgres_create_dbs.sql
│ └── prometheus/
│ └── prometheus.yml
├── install.sh
└── nginx/
└── default_reverseproxy.conf
SYMBOL INDEX (793 symbols across 73 files)
FILE: ddosify_engine/config/base.go
type ConfigReader (line 33) | type ConfigReader interface
function NewConfigReader (line 39) | func NewConfigReader(config []byte, configType string) (reader ConfigRea...
FILE: ddosify_engine/config/base_test.go
function readConfigFile (line 30) | func readConfigFile(path string) []byte {
function TestNewConfigReader (line 37) | func TestNewConfigReader(t *testing.T) {
function TestNewConfigReaderInvalidConfigType (line 51) | func TestNewConfigReaderInvalidConfigType(t *testing.T) {
function TestNewConfigReaderIncorrectJsonFile (line 61) | func TestNewConfigReaderIncorrectJsonFile(t *testing.T) {
FILE: ddosify_engine/config/json.go
constant ConfigTypeJson (line 42) | ConfigTypeJson = "jsonReader"
function init (line 44) | func init() {
type timeRunCount (line 48) | type timeRunCount
type auth (line 53) | type auth struct
type multipartFormData (line 59) | type multipartFormData struct
type RegexCaptureConf (line 66) | type RegexCaptureConf struct
type capturePath (line 70) | type capturePath struct
type step (line 80) | type step struct
method UnmarshalJSON (line 99) | func (s *step) UnmarshalJSON(data []byte) error {
type Tag (line 115) | type Tag struct
method UnmarshalJSON (line 120) | func (t *Tag) UnmarshalJSON(data []byte) error {
type CsvConf (line 127) | type CsvConf struct
method UnmarshalJSON (line 137) | func (c *CsvConf) UnmarshalJSON(data []byte) error {
type JsonReader (line 149) | type JsonReader struct
method UnmarshalJSON (line 190) | func (j *JsonReader) UnmarshalJSON(data []byte) error {
method Init (line 208) | func (j *JsonReader) Init(jsonByte []byte) (err error) {
method CreateHammer (line 221) | func (j *JsonReader) CreateHammer() (h types.Hammer, err error) {
type CookieConf (line 167) | type CookieConf struct
type CustomCookie (line 172) | type CustomCookie struct
type TestAssertion (line 184) | type TestAssertion struct
function stepToScenarioStep (line 332) | func stepToScenarioStep(s step) (types.ScenarioStep, error) {
function prepareMultipartPayload (line 424) | func prepareMultipartPayload(parts []multipartFormData) (body string, co...
function preparePayloadFile (line 491) | func preparePayloadFile(url string) (body string, err error) {
type RemoteMultipartError (line 509) | type RemoteMultipartError struct
method Error (line 514) | func (nf RemoteMultipartError) Error() string {
method Unwrap (line 521) | func (nf RemoteMultipartError) Unwrap() error {
FILE: ddosify_engine/config/json_test.go
function TestCreateHammerDefaultValues (line 40) | func TestCreateHammerDefaultValues(t *testing.T) {
function TestCreateHammer (line 76) | func TestCreateHammer(t *testing.T) {
function TestCreateHammerWithIterationCountInsteadOfReqCount (line 132) | func TestCreateHammerWithIterationCountInsteadOfReqCount(t *testing.T) {
function TestCreateHammerWithIterationCountOverridesReqCount (line 188) | func TestCreateHammerWithIterationCountOverridesReqCount(t *testing.T) {
function TestCreateHammerManualLoad (line 247) | func TestCreateHammerManualLoad(t *testing.T) {
function TestCreateHammerManualLoadOverrideOthers (line 285) | func TestCreateHammerManualLoadOverrideOthers(t *testing.T) {
function TestCreateHammerPayload (line 323) | func TestCreateHammerPayload(t *testing.T) {
function TestCreateHammerMultipartPayload (line 344) | func TestCreateHammerMultipartPayload(t *testing.T) {
function TestCreateHammerMultipartPayload_RemoteErr (line 372) | func TestCreateHammerMultipartPayload_RemoteErr(t *testing.T) {
function TestCreateHammerAuth (line 387) | func TestCreateHammerAuth(t *testing.T) {
function TestCreateHammerGlobalEnvs (line 413) | func TestCreateHammerGlobalEnvs(t *testing.T) {
function TestCreateHammerCaptureEnvs (line 433) | func TestCreateHammerCaptureEnvs(t *testing.T) {
function TestCreateHammerInvalidTarget (line 497) | func TestCreateHammerInvalidTarget(t *testing.T) {
function TestCreateHammerCookiesEnabledValidOnlyOnUserModes (line 507) | func TestCreateHammerCookiesEnabledValidOnlyOnUserModes(t *testing.T) {
function TestCreateHammerTLS (line 517) | func TestCreateHammerTLS(t *testing.T) {
function TestCreateHammerTLSWithOnlyCertPath (line 550) | func TestCreateHammerTLSWithOnlyCertPath(t *testing.T) {
function TestCreateHammerTLSWithOnlyKeyPath (line 598) | func TestCreateHammerTLSWithOnlyKeyPath(t *testing.T) {
function TestCreateHammerTLSWithWithEmptyPath (line 646) | func TestCreateHammerTLSWithWithEmptyPath(t *testing.T) {
function buildJSONTLSConfig (line 685) | func buildJSONTLSConfig(certPath, keyPath string) []byte {
function createCertPairFiles (line 705) | func createCertPairFiles(cert string, certKey string) (*os.File, *os.Fil...
function generateCerts (line 729) | func generateCerts() (string, string) {
FILE: ddosify_engine/core/assertion/base.go
type Aborter (line 7) | type Aborter interface
type ResultListener (line 11) | type ResultListener interface
type Asserter (line 16) | type Asserter interface
FILE: ddosify_engine/core/assertion/service.go
type DefaultAssertionService (line 16) | type DefaultAssertionService struct
method Init (line 42) | func (as *DefaultAssertionService) Init(assertions map[string]types.Te...
method GetTotalTimes (line 54) | func (as *DefaultAssertionService) GetTotalTimes() []int64 {
method GetFailCount (line 57) | func (as *DefaultAssertionService) GetFailCount() int {
method Start (line 61) | func (as *DefaultAssertionService) Start(input <-chan *types.ScenarioR...
method aggregate (line 79) | func (as *DefaultAssertionService) aggregate(r *types.ScenarioResult) {
method applyAssertions (line 99) | func (as *DefaultAssertionService) applyAssertions() {
method giveFinalResult (line 139) | func (as *DefaultAssertionService) giveFinalResult() TestAssertionResu...
method ResultChan (line 163) | func (as *DefaultAssertionService) ResultChan() <-chan TestAssertionRe...
method AbortChan (line 167) | func (as *DefaultAssertionService) AbortChan() <-chan struct{} {
method DoneChan (line 171) | func (as *DefaultAssertionService) DoneChan() <-chan struct{} {
method insertSorted (line 175) | func (as *DefaultAssertionService) insertSorted(v int64) {
type TestAssertionResult (line 27) | type TestAssertionResult struct
type FailedRule (line 33) | type FailedRule struct
function NewDefaultAssertionService (line 38) | func NewDefaultAssertionService() (service *DefaultAssertionService) {
FILE: ddosify_engine/core/assertion/service_test.go
function TestApplyAssertionsAbortsCorrectly (line 13) | func TestApplyAssertionsAbortsCorrectly(t *testing.T) {
function TestServiceKeepsIterationTimes (line 44) | func TestServiceKeepsIterationTimes(t *testing.T) {
function TestServiceKeepsFailCount (line 90) | func TestServiceKeepsFailCount(t *testing.T) {
type SortableInt64Slice (line 145) | type SortableInt64Slice
method Len (line 147) | func (a SortableInt64Slice) Len() int { return len(a) }
method Swap (line 148) | func (a SortableInt64Slice) Swap(i, j int) { a[i], a[j] = a[j], a...
method Less (line 149) | func (a SortableInt64Slice) Less(i, j int) bool { return a[i] < a[j] }
FILE: ddosify_engine/core/engine.go
constant tickerInterval (line 43) | tickerInterval = 100
constant resultDone (line 46) | resultDone = "done"
constant resultStopped (line 47) | resultStopped = "stopped"
constant resultAborted (line 48) | resultAborted = "aborted"
type engine (line 51) | type engine struct
method IsTestFailed (line 143) | func (e *engine) IsTestFailed() bool {
method Init (line 147) | func (e *engine) Init() (err error) {
method Start (line 180) | func (e *engine) Start() string {
method runWorkers (line 227) | func (e *engine) runWorkers(c int) {
method runWorker (line 237) | func (e *engine) runWorker(scenarioStartTime time.Time) {
method runAssertionsInEngine (line 268) | func (e *engine) runAssertionsInEngine() bool {
method stop (line 272) | func (e *engine) stop() {
method getMaxConcurrentIterCount (line 287) | func (e *engine) getMaxConcurrentIterCount() int {
method initReqCountArr (line 297) | func (e *engine) initReqCountArr() {
method createManualReqCountArr (line 319) | func (e *engine) createManualReqCountArr() {
method createLinearReqCountArr (line 336) | func (e *engine) createLinearReqCountArr() {
method createIncrementalReqCountArr (line 348) | func (e *engine) createIncrementalReqCountArr() {
method createWavedReqCountArr (line 359) | func (e *engine) createWavedReqCountArr() {
type EngineServices (line 75) | type EngineServices struct
function NewEngine (line 123) | func NewEngine(ctx context.Context, h types.Hammer,
function createLinearDistArr (line 389) | func createLinearDistArr(count int, arr []int) {
function createIncrementalDistArr (line 403) | func createIncrementalDistArr(count int, len int) []int {
function arraySum (line 435) | func arraySum(steps []int) int {
function reverse (line 443) | func reverse(s interface{}) {
function parseRawCookie (line 476) | func parseRawCookie(cookie string) []*http.Cookie {
FILE: ddosify_engine/core/engine_test.go
function newDummyHammer (line 53) | func newDummyHammer() types.Hammer {
function TestCreateEngine (line 73) | func TestCreateEngine(t *testing.T) {
function TestReqCountArrDebugMode (line 127) | func TestReqCountArrDebugMode(t *testing.T) {
function TestRequestCount (line 159) | func TestRequestCount(t *testing.T) {
function TestRequestData (line 288) | func TestRequestData(t *testing.T) {
function TestRequestDataForMultiScenarioStep (line 357) | func TestRequestDataForMultiScenarioStep(t *testing.T) {
function TestRequestTimeout (line 441) | func TestRequestTimeout(t *testing.T) {
function TestEngineResult (line 499) | func TestEngineResult(t *testing.T) {
function TestDynamicData (line 577) | func TestDynamicData(t *testing.T) {
function TestGlobalEnvs (line 688) | func TestGlobalEnvs(t *testing.T) {
function TestInjectEnvToBasicAuth (line 754) | func TestInjectEnvToBasicAuth(t *testing.T) {
function TestCapturedEnvsFromJsonBody (line 818) | func TestCapturedEnvsFromJsonBody(t *testing.T) {
function TestContinueTestOnCaptureError (line 950) | func TestContinueTestOnCaptureError(t *testing.T) {
function TestCaptureAndInjectEnvironmentsJsonPayload (line 1032) | func TestCaptureAndInjectEnvironmentsJsonPayload(t *testing.T) {
function TestCaptureAndInjectEnvironmentsJsonPayloadDynamic (line 1175) | func TestCaptureAndInjectEnvironmentsJsonPayloadDynamic(t *testing.T) {
function TestEnvInjectToXmlPayload (line 1298) | func TestEnvInjectToXmlPayload(t *testing.T) {
function TestCaptureHeaderWithRegex (line 1374) | func TestCaptureHeaderWithRegex(t *testing.T) {
function TestCaptureCookie (line 1458) | func TestCaptureCookie(t *testing.T) {
function TestCaptureStringPayloadWithRegex (line 1541) | func TestCaptureStringPayloadWithRegex(t *testing.T) {
function TestBothDynamicVarAndEnvVar (line 1617) | func TestBothDynamicVarAndEnvVar(t *testing.T) {
function TestDynamicVarAndEnvVarInSameSection (line 1682) | func TestDynamicVarAndEnvVarInSameSection(t *testing.T) {
function TestLoadRandomInfoFromData (line 1743) | func TestLoadRandomInfoFromData(t *testing.T) {
function TestDataCsv (line 1849) | func TestDataCsv(t *testing.T) {
function TestInvalidCsvEnvs (line 1895) | func TestInvalidCsvEnvs(t *testing.T) {
function TestCreateInitialCookiesReturnsErr (line 1914) | func TestCreateInitialCookiesReturnsErr(t *testing.T) {
function TestCreateInitialCookies (line 1942) | func TestCreateInitialCookies(t *testing.T) {
function TestTLSMutualAuth (line 1985) | func TestTLSMutualAuth(t *testing.T) {
function TestTLSMutualAuthButWeHaveNoCerts (line 2054) | func TestTLSMutualAuthButWeHaveNoCerts(t *testing.T) {
function TestTLSMutualAuthButServerAndClientHasDifferentCerts (line 2125) | func TestTLSMutualAuthButServerAndClientHasDifferentCerts(t *testing.T) {
function TestEngineModeUserKeepAlive (line 2206) | func TestEngineModeUserKeepAlive(t *testing.T) {
function TestEngineModeUserKeepAliveDifferentHosts (line 2283) | func TestEngineModeUserKeepAliveDifferentHosts(t *testing.T) {
function TestEngineModeUserKeepAlive_StepsKeepAliveFalse (line 2354) | func TestEngineModeUserKeepAlive_StepsKeepAliveFalse(t *testing.T) {
function TestEngineModeDdosifyKeepAlive (line 2426) | func TestEngineModeDdosifyKeepAlive(t *testing.T) {
function createCertPairFiles (line 2501) | func createCertPairFiles(cert string, certKey string) (*os.File, *os.Fil...
function generateCerts (line 2525) | func generateCerts() (string, string) {
function generateCerts2 (line 2580) | func generateCerts2() (string, string) {
FILE: ddosify_engine/core/proxy/base.go
type Proxy (line 32) | type Proxy struct
type ProxyService (line 45) | type ProxyService interface
function NewProxyService (line 55) | func NewProxyService(s string) (service ProxyService, err error) {
FILE: ddosify_engine/core/proxy/base_test.go
function TestNewProxyService (line 27) | func TestNewProxyService(t *testing.T) {
FILE: ddosify_engine/core/proxy/single.go
constant ProxyTypeSingle (line 27) | ProxyTypeSingle = "single"
function init (line 29) | func init() {
type singleProxyStrategy (line 33) | type singleProxyStrategy struct
method Init (line 37) | func (sp *singleProxyStrategy) Init(p Proxy) error {
method GetAll (line 43) | func (sp *singleProxyStrategy) GetAll() []*url.URL {
method GetProxy (line 48) | func (sp *singleProxyStrategy) GetProxy() *url.URL {
method ReportProxy (line 52) | func (sp *singleProxyStrategy) ReportProxy(addr *url.URL, reason strin...
method GetProxyCountry (line 56) | func (sp *singleProxyStrategy) GetProxyCountry(addr *url.URL) string {
method Done (line 60) | func (sp *singleProxyStrategy) Done() error {
FILE: ddosify_engine/core/report/aggregator.go
function aggregate (line 31) | func aggregate(result *Result, scr *types.ScenarioResult, samplingCount ...
type Result (line 138) | type Result struct
method successPercentage (line 148) | func (r *Result) successPercentage() int {
method failedPercentage (line 156) | func (r *Result) failedPercentage() int {
type AssertionErrVerbose (line 163) | type AssertionErrVerbose struct
type ServerErrVerbose (line 168) | type ServerErrVerbose struct
type FailVerbose (line 173) | type FailVerbose struct
type ScenarioStepResultSummary (line 179) | type ScenarioStepResultSummary struct
method successPercentage (line 187) | func (s *ScenarioStepResultSummary) successPercentage() int {
method failedPercentage (line 195) | func (s *ScenarioStepResultSummary) failedPercentage() int {
type AssertInfo (line 202) | type AssertInfo struct
FILE: ddosify_engine/core/report/aggregator_test.go
function TestStart (line 11) | func TestStart(t *testing.T) {
function compareResults (line 188) | func compareResults(r1, r2 *Result) bool {
function compareStepResults (line 208) | func compareStepResults(s1, s2 *ScenarioStepResultSummary) bool {
FILE: ddosify_engine/core/report/base.go
type ReportService (line 34) | type ReportService interface
function NewReportService (line 41) | func NewReportService(s string) (service ReportService, err error) {
FILE: ddosify_engine/core/report/base_test.go
function TestNewReportService (line 27) | func TestNewReportService(t *testing.T) {
FILE: ddosify_engine/core/report/debug.go
type verboseRequest (line 12) | type verboseRequest struct
type verboseResponse (line 19) | type verboseResponse struct
type verboseHttpRequestInfo (line 26) | type verboseHttpRequestInfo struct
function ScenarioStepResultToVerboseHttpRequestInfo (line 38) | func ScenarioStepResultToVerboseHttpRequestInfo(sr *types.ScenarioStepRe...
function decode (line 96) | func decode(headers http.Header, byteBody []byte) (map[string]string, in...
function isVerboseInfoRequestEmpty (line 122) | func isVerboseInfoRequestEmpty(req verboseRequest) bool {
FILE: ddosify_engine/core/report/debug_test.go
function TestDecode (line 10) | func TestDecode(t *testing.T) {
FILE: ddosify_engine/core/report/stdout.go
constant OutputTypeStdout (line 42) | OutputTypeStdout = "stdout"
function init (line 46) | func init() {
type stdout (line 50) | type stdout struct
method Init (line 66) | func (s *stdout) Init(debug bool, samplingRate int) (err error) {
method Start (line 81) | func (s *stdout) Start(input chan *types.ScenarioResult, assertionResu...
method cleanSamplingCount (line 131) | func (s *stdout) cleanSamplingCount(samplingCount map[uint16]map[strin...
method report (line 151) | func (s *stdout) report() {
method DoneChan (line 155) | func (s *stdout) DoneChan() <-chan bool {
method realTimePrintStart (line 159) | func (s *stdout) realTimePrintStart() {
method liveResultPrint (line 178) | func (s *stdout) liveResultPrint() {
method realTimePrintStop (line 187) | func (s *stdout) realTimePrintStop() {
method printInDebugMode (line 196) | func (s *stdout) printInDebugMode(input chan *types.ScenarioResult) {
method printDetails (line 355) | func (s *stdout) printDetails() {
function printBody (line 340) | func printBody(w io.Writer, contentType string, body interface{}) {
function deduplicate (line 456) | func deduplicate(values []interface{}) []interface{} {
type duration (line 470) | type duration struct
FILE: ddosify_engine/core/report/stdoutJson.go
constant OutputTypeStdoutJson (line 35) | OutputTypeStdoutJson = "stdout-json"
function init (line 37) | func init() {
type stdoutJson (line 41) | type stdoutJson struct
method Init (line 49) | func (s *stdoutJson) Init(debug bool, samplingRate int) (err error) {
method Start (line 59) | func (s *stdoutJson) Start(input chan *types.ScenarioResult, assertion...
method report (line 87) | func (s *stdoutJson) report() {
method DoneChan (line 106) | func (s *stdoutJson) DoneChan() <-chan bool {
method listenAndAggregate (line 110) | func (s *stdoutJson) listenAndAggregate(input chan *types.ScenarioResu...
method cleanSamplingCount (line 130) | func (s *stdoutJson) cleanSamplingCount(samplingCount map[uint16]map[s...
method printInDebugMode (line 150) | func (s *stdoutJson) printInDebugMode(input chan *types.ScenarioResult) {
function printPretty (line 175) | func printPretty(w io.Writer, info any) {
type Report (line 183) | type Report
method MarshalJSON (line 185) | func (r Result) MarshalJSON() ([]byte, error) {
type ItemReport (line 198) | type ItemReport
method MarshalJSON (line 200) | func (s ScenarioStepResultSummary) MarshalJSON() ([]byte, error) {
method MarshalJSON (line 226) | func (v verboseHttpRequestInfo) MarshalJSON() ([]byte, error) {
FILE: ddosify_engine/core/report/stdoutJson_test.go
function TestInitStdoutJson (line 34) | func TestInitStdoutJson(t *testing.T) {
function TestStdoutJsonAggregate (line 48) | func TestStdoutJsonAggregate(t *testing.T) {
function TestStdoutJsonOutput (line 158) | func TestStdoutJsonOutput(t *testing.T) {
function TestStdoutJsonDebugModePrintsValidJson (line 276) | func TestStdoutJsonDebugModePrintsValidJson(t *testing.T) {
function TestVerboseHttpInfoMarshallingErrorCaseEmptyReq (line 312) | func TestVerboseHttpInfoMarshallingErrorCaseEmptyReq(t *testing.T) {
function TestVerboseHttpInfoMarshallingErrorCase (line 346) | func TestVerboseHttpInfoMarshallingErrorCase(t *testing.T) {
function TestVerboseHttpInfoMarshallingSuccessCase (line 382) | func TestVerboseHttpInfoMarshallingSuccessCase(t *testing.T) {
function TestStdoutJsonTestResultStatusShouldBeTrueWhenNoAssertion (line 412) | func TestStdoutJsonTestResultStatusShouldBeTrueWhenNoAssertion(t *testin...
function TestStdoutJsonTestResultStatusShouldBeFalseWhenAssertionsFail (line 432) | func TestStdoutJsonTestResultStatusShouldBeFalseWhenAssertionsFail(t *te...
FILE: ddosify_engine/core/report/stdout_test.go
function TestScenarioStepReport (line 36) | func TestScenarioStepReport(t *testing.T) {
function TestResult (line 67) | func TestResult(t *testing.T) {
function TestInit (line 97) | func TestInit(t *testing.T) {
function TestPrintJsonBody (line 111) | func TestPrintJsonBody(t *testing.T) {
function TestPrintBodyAsString (line 126) | func TestPrintBodyAsString(t *testing.T) {
function TestStdoutPrintsHeadlinesInDebugMode (line 141) | func TestStdoutPrintsHeadlinesInDebugMode(t *testing.T) {
FILE: ddosify_engine/core/scenario/client_pool.go
type ClientFactoryMethod (line 14) | type ClientFactoryMethod
type ClientCloseMethod (line 15) | type ClientCloseMethod
function NewClientPool (line 23) | func NewClientPool(initialCap, maxCap int, engineMode string, factory Cl...
type cookieJarRepeated (line 51) | type cookieJarRepeated struct
method SetCookies (line 66) | func (c *cookieJarRepeated) SetCookies(u *url.URL, cookies []*http.Coo...
method Cookies (line 74) | func (c *cookieJarRepeated) Cookies(u *url.URL) []*http.Cookie {
function NewCookieJarRepeated (line 56) | func NewCookieJarRepeated() (*cookieJarRepeated, error) {
function createClientFactoryMethod (line 87) | func createClientFactoryMethod(mode string, opts ...func(http.CookieJar)...
FILE: ddosify_engine/core/scenario/client_pool_cookie_test.go
function TestCookieManagerInRepeatedModeOnlySetInFirstIter (line 17) | func TestCookieManagerInRepeatedModeOnlySetInFirstIter(t *testing.T) {
function TestSetCookiesAppendToCurrentSliceOfCookies (line 91) | func TestSetCookiesAppendToCurrentSliceOfCookies(t *testing.T) {
function TestSetCookiesOverridesCookieWithSameName (line 108) | func TestSetCookiesOverridesCookieWithSameName(t *testing.T) {
function TestSetCookiesDeletesIfUnnecessary (line 125) | func TestSetCookiesDeletesIfUnnecessary(t *testing.T) {
function TestSetCookiesUrlScheme (line 146) | func TestSetCookiesUrlScheme(t *testing.T) {
function TestSetCookiesSecure (line 164) | func TestSetCookiesSecure(t *testing.T) {
function TestPutInitialCookiesInJarFactory (line 216) | func TestPutInitialCookiesInJarFactory(t *testing.T) {
FILE: ddosify_engine/core/scenario/data/csv.go
function validateConf (line 16) | func validateConf(conf types.CsvConf) error {
type RemoteCsvError (line 23) | type RemoteCsvError struct
method Error (line 28) | func (nf RemoteCsvError) Error() string {
method Unwrap (line 35) | func (nf RemoteCsvError) Unwrap() error {
function ReadCsv (line 39) | func ReadCsv(conf types.CsvConf) ([]map[string]interface{}, error) {
function emptyLine (line 143) | func emptyLine(row []string) bool {
function wrapAsCsvError (line 152) | func wrapAsCsvError(msg string, err error) RemoteCsvError {
FILE: ddosify_engine/core/scenario/data/csv_test.go
function TestValidateCsvConf (line 15) | func TestValidateCsvConf(t *testing.T) {
function TestReadCsv_RemoteErr (line 35) | func TestReadCsv_RemoteErr(t *testing.T) {
function TestWrapAsRemoteCsvError (line 68) | func TestWrapAsRemoteCsvError(t *testing.T) {
function TestReadCsvFromRemote (line 82) | func TestReadCsvFromRemote(t *testing.T) {
function TestReadCsv (line 124) | func TestReadCsv(t *testing.T) {
function TestBenchmarkCsvRead (line 214) | func TestBenchmarkCsvRead(t *testing.T) {
FILE: ddosify_engine/core/scenario/requester/base.go
type Requester (line 34) | type Requester interface
type HttpRequesterI (line 39) | type HttpRequesterI interface
function NewRequester (line 45) | func NewRequester(s types.ScenarioStep) (requester Requester, err error) {
FILE: ddosify_engine/core/scenario/requester/http.go
type HttpRequester (line 49) | type HttpRequester struct
method Init (line 64) | func (h *HttpRequester) Init(ctx context.Context, s types.ScenarioStep...
method Done (line 166) | func (h *HttpRequester) Done() {
method Send (line 175) | func (h *HttpRequester) Send(client *http.Client, envs map[string]inte...
method prepareReq (line 403) | func (h *HttpRequester) prepareReq(envs map[string]interface{}, trace ...
method initTransport (line 554) | func (h *HttpRequester) initTransport() *http.Transport {
method updateTransport (line 576) | func (h *HttpRequester) updateTransport(tr *http.Transport) {
method initTLSConfig (line 595) | func (h *HttpRequester) initTLSConfig() *tls.Config {
method initRequestInstance (line 611) | func (h *HttpRequester) initRequestInstance() (err error) {
method Type (line 652) | func (h *HttpRequester) Type() string {
method applyAssertions (line 745) | func (h *HttpRequester) applyAssertions(assertEnv *evaluator.AssertEnv...
method captureEnvironmentVariables (line 775) | func (h *HttpRequester) captureEnvironmentVariables(header http.Header...
function concatEnvs (line 375) | func concatEnvs(envs1, envs2 map[string]interface{}) map[string]interfac...
function concatHeaders (line 389) | func concatHeaders(envs1, envs2 map[string][]string) map[string][]string {
function fetchErrType (line 518) | func fetchErrType(err error) types.RequestError {
function newTrace (line 656) | func newTrace(duration *duration, proxyAddr *url.URL, headersByClient ma...
type duration (line 813) | type duration struct
method setResStartTime (line 852) | func (d *duration) setResStartTime(t time.Time) {
method setServerProcessStart (line 864) | func (d *duration) setServerProcessStart(t time.Time) {
method setDNSDur (line 875) | func (d *duration) setDNSDur(t time.Duration) {
method getDNSDur (line 883) | func (d *duration) getDNSDur() time.Duration {
method setTLSDur (line 889) | func (d *duration) setTLSDur(t time.Duration) {
method getTLSDur (line 897) | func (d *duration) getTLSDur() time.Duration {
method setConnDur (line 903) | func (d *duration) setConnDur(t time.Duration) {
method getConnDur (line 911) | func (d *duration) getConnDur() time.Duration {
method setReqDur (line 917) | func (d *duration) setReqDur(t time.Duration) {
method getReqDur (line 925) | func (d *duration) getReqDur() time.Duration {
method setServerProcessDur (line 931) | func (d *duration) setServerProcessDur() {
method getServerProcessDur (line 944) | func (d *duration) getServerProcessDur() time.Duration {
method setResDur (line 958) | func (d *duration) setResDur() {
method getResDur (line 972) | func (d *duration) getResDur() time.Duration {
method totalDuration (line 987) | func (d *duration) totalDuration() time.Duration {
method close (line 995) | func (d *duration) close() {
FILE: ddosify_engine/core/scenario/requester/http_test.go
function TestInit (line 40) | func TestInit(t *testing.T) {
function TestInitClient (line 64) | func TestInitClient(t *testing.T) {
function TestInitRequest (line 206) | func TestInitRequest(t *testing.T) {
function TestSendOnDebugModePopulatesDebugInfo (line 348) | func TestSendOnDebugModePopulatesDebugInfo(t *testing.T) {
function TestCaptureEnvShouldSetEmptyStringWhenReqFails (line 395) | func TestCaptureEnvShouldSetEmptyStringWhenReqFails(t *testing.T) {
function TestAssertions (line 460) | func TestAssertions(t *testing.T) {
function TestTraceResDur_TypicalScenario (line 505) | func TestTraceResDur_TypicalScenario(t *testing.T) {
function TestTraceResDur_UnusualScenario (line 536) | func TestTraceResDur_UnusualScenario(t *testing.T) {
function TestTraceServerProcessDur (line 568) | func TestTraceServerProcessDur(t *testing.T) {
function TestTraceServerProcessDur_2 (line 595) | func TestTraceServerProcessDur_2(t *testing.T) {
function TestTraceServerProcessDur_3 (line 624) | func TestTraceServerProcessDur_3(t *testing.T) {
function TestTraceServerProcessDur_ErrCase (line 659) | func TestTraceServerProcessDur_ErrCase(t *testing.T) {
function TestResponseCookiesSentToAssertions (line 692) | func TestResponseCookiesSentToAssertions(t *testing.T) {
FILE: ddosify_engine/core/scenario/scripting/assertion/assert.go
type AssertionError (line 12) | type AssertionError struct
method Error (line 18) | func (ae AssertionError) Error() string {
method Rule (line 22) | func (ae AssertionError) Rule() string {
method Received (line 26) | func (ae AssertionError) Received() map[string]interface{} {
method Unwrap (line 30) | func (ae AssertionError) Unwrap() error {
function Assert (line 34) | func Assert(input string, env *evaluator.AssertEnv) (bool, error) {
FILE: ddosify_engine/core/scenario/scripting/assertion/assert_test.go
function TestAssert (line 12) | func TestAssert(t *testing.T) {
FILE: ddosify_engine/core/scenario/scripting/assertion/ast/ast.go
type Node (line 11) | type Node interface
type Statement (line 17) | type Statement interface
type Expression (line 23) | type Expression interface
type ExpressionStatement (line 28) | type ExpressionStatement struct
method statementNode (line 33) | func (es *ExpressionStatement) statementNode() {}
method TokenLiteral (line 34) | func (es *ExpressionStatement) TokenLiteral() string { return es.Token...
method String (line 35) | func (es *ExpressionStatement) String() string {
type Identifier (line 43) | type Identifier struct
method expressionNode (line 48) | func (i *Identifier) expressionNode() {}
method TokenLiteral (line 49) | func (i *Identifier) TokenLiteral() string { return i.Token.Literal }
method String (line 50) | func (i *Identifier) String() string { return i.Value }
type Boolean (line 52) | type Boolean struct
method expressionNode (line 57) | func (b *Boolean) expressionNode() {}
method TokenLiteral (line 58) | func (b *Boolean) TokenLiteral() string { return b.Token.Literal }
method String (line 59) | func (b *Boolean) String() string { return b.Token.Literal }
method GetVal (line 60) | func (il *Boolean) GetVal() interface{} { return il.Value }
type IntegerLiteral (line 62) | type IntegerLiteral struct
method expressionNode (line 67) | func (il *IntegerLiteral) expressionNode() {}
method TokenLiteral (line 68) | func (il *IntegerLiteral) TokenLiteral() string { return il.Token.Lite...
method String (line 69) | func (il *IntegerLiteral) String() string { return il.Token.Lite...
method GetVal (line 70) | func (il *IntegerLiteral) GetVal() interface{} { return il.Value }
type FloatLiteral (line 72) | type FloatLiteral struct
method expressionNode (line 77) | func (il *FloatLiteral) expressionNode() {}
method TokenLiteral (line 78) | func (il *FloatLiteral) TokenLiteral() string { return il.Token.Literal }
method String (line 79) | func (il *FloatLiteral) String() string { return il.Token.Literal }
method GetVal (line 80) | func (il *FloatLiteral) GetVal() interface{} { return il.Value }
type NullLiteral (line 82) | type NullLiteral struct
method expressionNode (line 87) | func (il *NullLiteral) expressionNode() {}
method TokenLiteral (line 88) | func (il *NullLiteral) TokenLiteral() string { return il.Token.Literal }
method String (line 89) | func (il *NullLiteral) String() string { return il.Token.Literal }
method GetVal (line 90) | func (il *NullLiteral) GetVal() interface{} { return il.Value }
type StringLiteral (line 92) | type StringLiteral struct
method expressionNode (line 97) | func (il *StringLiteral) expressionNode() {}
method TokenLiteral (line 98) | func (il *StringLiteral) TokenLiteral() string { return il.Token.Liter...
method String (line 99) | func (il *StringLiteral) String() string { return il.Token.Liter...
method GetVal (line 100) | func (il *StringLiteral) GetVal() interface{} { return il.Value }
type ArrayLiteral (line 102) | type ArrayLiteral struct
method expressionNode (line 107) | func (il *ArrayLiteral) expressionNode() {}
method TokenLiteral (line 108) | func (il *ArrayLiteral) TokenLiteral() string { return il.Token.Literal }
method String (line 109) | func (il *ArrayLiteral) String() string {
type ObjectLiteral (line 118) | type ObjectLiteral struct
method expressionNode (line 123) | func (il *ObjectLiteral) expressionNode() {}
method TokenLiteral (line 124) | func (il *ObjectLiteral) TokenLiteral() string { return il.Token.Liter...
method String (line 125) | func (il *ObjectLiteral) String() string {
type PrefixExpression (line 134) | type PrefixExpression struct
method expressionNode (line 140) | func (pe *PrefixExpression) expressionNode() {}
method TokenLiteral (line 141) | func (pe *PrefixExpression) TokenLiteral() string { return pe.Token.Li...
method String (line 142) | func (pe *PrefixExpression) String() string {
type InfixExpression (line 153) | type InfixExpression struct
method expressionNode (line 160) | func (oe *InfixExpression) expressionNode() {}
method TokenLiteral (line 161) | func (oe *InfixExpression) TokenLiteral() string { return oe.Token.Lit...
method String (line 162) | func (oe *InfixExpression) String() string {
type CallExpression (line 174) | type CallExpression struct
method expressionNode (line 180) | func (ce *CallExpression) expressionNode() {}
method TokenLiteral (line 181) | func (ce *CallExpression) TokenLiteral() string { return ce.Token.Lite...
method String (line 183) | func (ce *CallExpression) String() string {
FILE: ddosify_engine/core/scenario/scripting/assertion/evaluator/env.go
type AssertEnv (line 5) | type AssertEnv struct
FILE: ddosify_engine/core/scenario/scripting/assertion/evaluator/evaluator.go
function Eval (line 15) | func Eval(node ast.Node, env *AssertEnv, receivedMap map[string]interfac...
function evalPrefixExpression (line 336) | func evalPrefixExpression(operator string, right interface{}) (interface...
function evalInfixExpression (line 350) | func evalInfixExpression(
function evalBangOperatorExpression (line 472) | func evalBangOperatorExpression(right interface{}) (bool, error) {
function evalMinusPrefixOperatorExpression (line 484) | func evalMinusPrefixOperatorExpression(right interface{}) (interface{}, ...
function evalFloatInfixExpression (line 506) | func evalFloatInfixExpression(operator string,
function evalTimeInfixExpression (line 535) | func evalTimeInfixExpression(operator string, lTime, rTime time.Time) (i...
function evalIntegerInfixExpression (line 553) | func evalIntegerInfixExpression(
function evalIdentifier (line 583) | func evalIdentifier(
function evalObjectExpressions (line 688) | func evalObjectExpressions(
function evalExpressions (line 712) | func evalExpressions(
function evalCookieField (line 737) | func evalCookieField(c *http.Cookie, fieldName string) (interface{}, err...
type NotFoundError (line 766) | type NotFoundError struct
method Error (line 771) | func (nf NotFoundError) Error() string {
method Unwrap (line 775) | func (nf NotFoundError) Unwrap() error {
type ArgumentError (line 779) | type ArgumentError struct
method Error (line 784) | func (nf ArgumentError) Error() string {
method Unwrap (line 788) | func (nf ArgumentError) Unwrap() error {
type OperatorError (line 792) | type OperatorError struct
method Error (line 797) | func (nf OperatorError) Error() string {
method Unwrap (line 801) | func (nf OperatorError) Unwrap() error {
FILE: ddosify_engine/core/scenario/scripting/assertion/evaluator/function.go
constant NOT (line 219) | NOT = "not"
constant LESSTHAN (line 220) | LESSTHAN = "less_than"
constant GREATERTHAN (line 221) | GREATERTHAN = "greater_than"
constant EQUALS (line 222) | EQUALS = "equals"
constant IN (line 223) | IN = "in"
constant JSONPATH (line 224) | JSONPATH = "json_path"
constant XMLPATH (line 225) | XMLPATH = "xpath"
constant HTMLPATH (line 226) | HTMLPATH = "html_path"
constant REGEXP (line 227) | REGEXP = "regexp"
constant EXISTS (line 228) | EXISTS = "exists"
constant CONTAINS (line 229) | CONTAINS = "contains"
constant RANGE (line 230) | RANGE = "range"
constant EQUALSONFILE (line 231) | EQUALSONFILE = "equals_on_file"
constant TIME (line 232) | TIME = "time"
constant MIN (line 234) | MIN = "min"
constant MAX (line 235) | MAX = "max"
constant AVG (line 236) | AVG = "avg"
constant P99 (line 237) | P99 = "p99"
constant P98 (line 238) | P98 = "p98"
constant P95 (line 239) | P95 = "p95"
constant P90 (line 240) | P90 = "p90"
constant P80 (line 241) | P80 = "p80"
FILE: ddosify_engine/core/scenario/scripting/assertion/evaluator/function_test.go
function TestEmptyArraysOnMinMaxAvgFuncs (line 5) | func TestEmptyArraysOnMinMaxAvgFuncs(t *testing.T) {
FILE: ddosify_engine/core/scenario/scripting/assertion/lexer/lexer.go
type Lexer (line 9) | type Lexer struct
method NextToken (line 22) | func (l *Lexer) NextToken() token.Token {
method skipWhitespace (line 135) | func (l *Lexer) skipWhitespace() {
method readChar (line 141) | func (l *Lexer) readChar() {
method peekChar (line 151) | func (l *Lexer) peekChar() byte {
method readIdentifier (line 159) | func (l *Lexer) readIdentifier() string {
method readString (line 167) | func (l *Lexer) readString() string {
method readRawString (line 175) | func (l *Lexer) readRawString() string {
method readNumber (line 183) | func (l *Lexer) readNumber() string {
function New (line 16) | func New(input string) *Lexer {
function isChAllowedInIdent (line 191) | func isChAllowedInIdent(ch byte) bool {
function isLetter (line 196) | func isLetter(ch byte) bool { // identifiers
function isDigit (line 200) | func isDigit(ch byte) bool {
function newToken (line 204) | func newToken(tokenType token.TokenType, ch byte) token.Token {
FILE: ddosify_engine/core/scenario/scripting/assertion/lexer/lexer_test.go
function TestNextToken (line 9) | func TestNextToken(t *testing.T) {
FILE: ddosify_engine/core/scenario/scripting/assertion/parser/parser.go
constant _ (line 14) | _ int = iota
constant LOWEST (line 15) | LOWEST
constant ANDOR (line 16) | ANDOR
constant EQUALS (line 17) | EQUALS
constant LESSGREATER (line 18) | LESSGREATER
constant SUM (line 19) | SUM
constant PRODUCT (line 20) | PRODUCT
constant PREFIX (line 21) | PREFIX
constant ARRAYDEFINE (line 22) | ARRAYDEFINE
constant OBJECTDEFINE (line 23) | OBJECTDEFINE
constant CALL (line 24) | CALL
type prefixParseFn (line 44) | type prefixParseFn
type infixParseFn (line 45) | type infixParseFn
type Parser (line 48) | type Parser struct
method nextToken (line 98) | func (p *Parser) nextToken() {
method curTokenIs (line 103) | func (p *Parser) curTokenIs(t token.TokenType) bool {
method peekTokenIs (line 107) | func (p *Parser) peekTokenIs(t token.TokenType) bool {
method expectPeek (line 111) | func (p *Parser) expectPeek(t token.TokenType) bool {
method Errors (line 121) | func (p *Parser) Errors() []string {
method peekError (line 125) | func (p *Parser) peekError(t token.TokenType) {
method noPrefixParseFnError (line 131) | func (p *Parser) noPrefixParseFnError(t token.TokenType) {
method ParseExpressionStatement (line 136) | func (p *Parser) ParseExpressionStatement() *ast.ExpressionStatement {
method parseExpression (line 144) | func (p *Parser) parseExpression(precedence int) ast.Expression {
method peekPrecedence (line 170) | func (p *Parser) peekPrecedence() int {
method curPrecedence (line 178) | func (p *Parser) curPrecedence() int {
method parseIdentifier (line 186) | func (p *Parser) parseIdentifier() ast.Expression {
method parseIntegerLiteral (line 190) | func (p *Parser) parseIntegerLiteral() ast.Expression {
method parseFloatLiteral (line 205) | func (p *Parser) parseFloatLiteral() ast.Expression {
method parseStringLiteral (line 219) | func (p *Parser) parseStringLiteral() ast.Expression {
method parsePrefixExpression (line 226) | func (p *Parser) parsePrefixExpression() ast.Expression {
method parseInfixExpression (line 239) | func (p *Parser) parseInfixExpression(left ast.Expression) ast.Express...
method parseBoolean (line 253) | func (p *Parser) parseBoolean() ast.Expression {
method parseNull (line 257) | func (p *Parser) parseNull() ast.Expression {
method parseGroupedExpression (line 261) | func (p *Parser) parseGroupedExpression() ast.Expression {
method parseObjectLiteral (line 273) | func (p *Parser) parseObjectLiteral() ast.Expression {
method parseArrayLiteral (line 280) | func (p *Parser) parseArrayLiteral() ast.Expression {
method parseCallExpression (line 287) | func (p *Parser) parseCallExpression(function ast.Expression) ast.Expr...
method parseCallArguments (line 293) | func (p *Parser) parseCallArguments() []ast.Expression {
method parseArrayElements (line 317) | func (p *Parser) parseArrayElements() []ast.Expression {
method parseObjectElements (line 341) | func (p *Parser) parseObjectElements() map[string]ast.Expression {
function New (line 59) | func New(l *lexer.Lexer) *Parser {
FILE: ddosify_engine/core/scenario/scripting/assertion/parser/parser_test.go
function TestIdentifierExpression (line 11) | func TestIdentifierExpression(t *testing.T) {
function TestIntegerLiteralExpression (line 32) | func TestIntegerLiteralExpression(t *testing.T) {
function TestArrayLiteralExpression (line 48) | func TestArrayLiteralExpression(t *testing.T) {
function TestObjectLiteralExpression (line 93) | func TestObjectLiteralExpression(t *testing.T) {
function TestFloatLiteralExpression (line 136) | func TestFloatLiteralExpression(t *testing.T) {
function TestExpectPeek (line 153) | func TestExpectPeek(t *testing.T) {
function TestParsingPrefixExpressions (line 166) | func TestParsingPrefixExpressions(t *testing.T) {
function TestParsingInfixExpressions (line 200) | func TestParsingInfixExpressions(t *testing.T) {
function TestOperatorPrecedenceParsing (line 243) | func TestOperatorPrecedenceParsing(t *testing.T) {
function TestBooleanExpression (line 359) | func TestBooleanExpression(t *testing.T) {
function TestCallExpressionParsing (line 385) | func TestCallExpressionParsing(t *testing.T) {
function TestCallExpressionParameterParsing (line 412) | func TestCallExpressionParameterParsing(t *testing.T) {
function testInfixExpression (line 465) | func testInfixExpression(t *testing.T, exp ast.Expression, left interfac...
function testLiteralExpression (line 490) | func testLiteralExpression(
function testIntegerLiteral (line 509) | func testIntegerLiteral(t *testing.T, il ast.Expression, value int64) bo...
function testIdentifier (line 530) | func testIdentifier(t *testing.T, exp ast.Expression, value string) bool {
function testBooleanLiteral (line 551) | func testBooleanLiteral(t *testing.T, exp ast.Expression, value bool) bo...
function checkParserErrors (line 572) | func checkParserErrors(t *testing.T, p *Parser) {
FILE: ddosify_engine/core/scenario/scripting/assertion/token/token.go
type TokenType (line 3) | type TokenType
type Token (line 4) | type Token struct
constant ILLEGAL (line 10) | ILLEGAL = "ILLEGAL"
constant EOF (line 11) | EOF = "EOF"
constant IDENT (line 14) | IDENT = "IDENT"
constant INT (line 15) | INT = "INT"
constant FLOAT (line 16) | FLOAT = "FLOAT"
constant STRING (line 17) | STRING = "STRING"
constant PLUS (line 20) | PLUS = "+"
constant MINUS (line 21) | MINUS = "-"
constant BANG (line 22) | BANG = "!"
constant ASTERISK (line 23) | ASTERISK = "*"
constant SLASH (line 24) | SLASH = "/"
constant AND (line 25) | AND = "&&"
constant OR (line 26) | OR = "||"
constant LT (line 28) | LT = "<"
constant GT (line 29) | GT = ">"
constant EQ (line 31) | EQ = "=="
constant NOT_EQ (line 32) | NOT_EQ = "!="
constant COMMA (line 35) | COMMA = ","
constant LPAREN (line 37) | LPAREN = "("
constant RPAREN (line 38) | RPAREN = ")"
constant LBRACE (line 39) | LBRACE = "{"
constant RBRACE (line 40) | RBRACE = "}"
constant LBRACKET (line 41) | LBRACKET = "["
constant RBRACKET (line 42) | RBRACKET = "]"
constant COLON (line 44) | COLON = ":"
constant TRUE (line 47) | TRUE = "TRUE"
constant FALSE (line 48) | FALSE = "FALSE"
constant NULL (line 49) | NULL = "NULL"
function LookupIdent (line 58) | func LookupIdent(ident string) TokenType {
FILE: ddosify_engine/core/scenario/scripting/extraction/base.go
function Extract (line 11) | func Extract(source interface{}, ce types.EnvCaptureConf) (val interface...
function ExtractWithRegex (line 79) | func ExtractWithRegex(source interface{}, regexConf types.RegexCaptureCo...
function ExtractFromJson (line 92) | func ExtractFromJson(source interface{}, jsonPath string) (interface{}, ...
function ExtractFromXml (line 104) | func ExtractFromXml(source interface{}, xPath string) (interface{}, erro...
function ExtractFromHtml (line 116) | func ExtractFromHtml(source interface{}, xPath string) (interface{}, err...
type ExtractionError (line 128) | type ExtractionError struct
method Error (line 133) | func (sc ExtractionError) Error() string {
method Unwrap (line 137) | func (sc ExtractionError) Unwrap() error {
FILE: ddosify_engine/core/scenario/scripting/extraction/base_test.go
function TestHttpHeaderKey_NotSpecified (line 12) | func TestHttpHeaderKey_NotSpecified(t *testing.T) {
function TestExtract_TypeAssertErrorRecover (line 29) | func TestExtract_TypeAssertErrorRecover(t *testing.T) {
function TestExtract_NilSource (line 49) | func TestExtract_NilSource(t *testing.T) {
function TestExtract_InvalidXml (line 67) | func TestExtract_InvalidXml(t *testing.T) {
function TestCookieName_NotSpecified (line 85) | func TestCookieName_NotSpecified(t *testing.T) {
FILE: ddosify_engine/core/scenario/scripting/extraction/html.go
type htmlExtractor (line 10) | type htmlExtractor struct
method extractFromByteSlice (line 13) | func (xe htmlExtractor) extractFromByteSlice(source []byte, xPath stri...
method extractFromString (line 29) | func (xe htmlExtractor) extractFromString(source string, xPath string)...
FILE: ddosify_engine/core/scenario/scripting/extraction/html_test.go
function TestHtmlExtraction (line 9) | func TestHtmlExtraction(t *testing.T) {
function TestHtmlExtractionSeveralNode (line 32) | func TestHtmlExtractionSeveralNode(t *testing.T) {
function TestHtmlExtraction_PathNotFound (line 57) | func TestHtmlExtraction_PathNotFound(t *testing.T) {
function TestInvalidHtml (line 77) | func TestInvalidHtml(t *testing.T) {
function TestHtmlComplexExtraction (line 89) | func TestHtmlComplexExtraction(t *testing.T) {
FILE: ddosify_engine/core/scenario/scripting/extraction/json.go
type jsonExtractor (line 11) | type jsonExtractor struct
method extractFromString (line 43) | func (je jsonExtractor) extractFromString(source string, jsonPath stri...
method extractFromByteSlice (line 73) | func (je jsonExtractor) extractFromByteSlice(source []byte, jsonPath s...
FILE: ddosify_engine/core/scenario/scripting/extraction/json_test.go
function TestJsonExtract_String (line 10) | func TestJsonExtract_String(t *testing.T) {
function TestJsonExtract_Object (line 34) | func TestJsonExtract_Object(t *testing.T) {
function TestJsonExtract_Float (line 59) | func TestJsonExtract_Float(t *testing.T) {
function TestJsonExtract_Int (line 82) | func TestJsonExtract_Int(t *testing.T) {
function TestJsonExtract_Nil (line 105) | func TestJsonExtract_Nil(t *testing.T) {
function TestJsonExtract_Bool (line 125) | func TestJsonExtract_Bool(t *testing.T) {
function TestJsonExtract_JsonArray (line 156) | func TestJsonExtract_JsonArray(t *testing.T) {
function TestJsonExtract_JsonIntArray (line 178) | func TestJsonExtract_JsonIntArray(t *testing.T) {
function TestJsonExtract_JsonFloatArray (line 201) | func TestJsonExtract_JsonFloatArray(t *testing.T) {
function TestJsonExtract_JsonBoolArray (line 223) | func TestJsonExtract_JsonBoolArray(t *testing.T) {
function TestJsonExtract_ObjectArray (line 245) | func TestJsonExtract_ObjectArray(t *testing.T) {
function TestJsonExtract_JsonPathNotFound (line 269) | func TestJsonExtract_JsonPathNotFound(t *testing.T) {
FILE: ddosify_engine/core/scenario/scripting/extraction/regex.go
type regexExtractor (line 8) | type regexExtractor struct
method Init (line 12) | func (ri *regexExtractor) Init(regex string) {
method extractFromString (line 16) | func (ri *regexExtractor) extractFromString(text string, matchNo int) ...
method extractFromByteSlice (line 29) | func (ri *regexExtractor) extractFromByteSlice(text []byte, matchNo in...
FILE: ddosify_engine/core/scenario/scripting/extraction/regex_test.go
function TestRegexExtractFromString (line 8) | func TestRegexExtractFromString(t *testing.T) {
function TestRegexExtractFromStringNoMatch (line 28) | func TestRegexExtractFromStringNoMatch(t *testing.T) {
FILE: ddosify_engine/core/scenario/scripting/extraction/xml.go
type xmlExtractor (line 10) | type xmlExtractor struct
method extractFromByteSlice (line 13) | func (xe xmlExtractor) extractFromByteSlice(source []byte, xPath strin...
method extractFromString (line 29) | func (xe xmlExtractor) extractFromString(source string, xPath string) ...
FILE: ddosify_engine/core/scenario/scripting/extraction/xml_test.go
function TestXmlExtraction (line 9) | func TestXmlExtraction(t *testing.T) {
function TestXmlExtractionString (line 33) | func TestXmlExtractionString(t *testing.T) {
function TestXmlExtraction_PathNotFound (line 57) | func TestXmlExtraction_PathNotFound(t *testing.T) {
function TestInvalidXml (line 77) | func TestInvalidXml(t *testing.T) {
FILE: ddosify_engine/core/scenario/scripting/injection/dynamic_test.go
function TestDynamicVariableRace (line 7) | func TestDynamicVariableRace(t *testing.T) {
FILE: ddosify_engine/core/scenario/scripting/injection/environment.go
type BodyPiece (line 20) | type BodyPiece struct
type DdosifyBodyReader (line 27) | type DdosifyBodyReader struct
method Close (line 37) | func (dbr *DdosifyBodyReader) Close() error { return nil }
method Read (line 39) | func (dbr *DdosifyBodyReader) Read(dst []byte) (n int, err error) {
type EnvironmentInjector (line 142) | type EnvironmentInjector struct
method Init (line 150) | func (ei *EnvironmentInjector) Init() {
method InjectEnv (line 171) | func (ei *EnvironmentInjector) InjectEnv(text string, envs map[string]...
method getEnv (line 198) | func (ei *EnvironmentInjector) getEnv(envs map[string]interface{}, key...
method GenerateBodyPieces (line 347) | func (ei *EnvironmentInjector) GenerateBodyPieces(body string, envs ma...
function truncateTag (line 158) | func truncateTag(tag string, rx string) string {
function unifyErrors (line 241) | func unifyErrors(errors []error) error {
function StringToBytes (line 251) | func StringToBytes(s string) (b []byte) {
function getInjectStrFunc (line 260) | func getInjectStrFunc(rx string,
function getInjectJsonFunc (line 305) | func getInjectJsonFunc(rx string,
type EnvMatch (line 337) | type EnvMatch struct
type EnvMatchSlice (line 341) | type EnvMatchSlice
method Len (line 343) | func (a EnvMatchSlice) Len() int { return len(a) }
method Swap (line 344) | func (a EnvMatchSlice) Swap(i, j int) { a[i], a[j] = a[j], a[i] }
method Less (line 345) | func (a EnvMatchSlice) Less(i, j int) bool { return a[i].found[0] < a[...
function GetContentLength (line 492) | func GetContentLength(pieces []BodyPiece) int {
FILE: ddosify_engine/core/scenario/scripting/injection/environment_dynamic.go
method InjectDynamic (line 11) | func (ei *EnvironmentInjector) InjectDynamic(text string) (string, error) {
method getFakeData (line 36) | func (ei *EnvironmentInjector) getFakeData(key string) (interface{}, err...
FILE: ddosify_engine/core/scenario/scripting/injection/environment_test.go
function TestInjectionRegexReplacer (line 15) | func TestInjectionRegexReplacer(t *testing.T) {
function ExampleEnvironmentInjector (line 106) | func ExampleEnvironmentInjector() {
function TestRandomInjectionStringSlice (line 116) | func TestRandomInjectionStringSlice(t *testing.T) {
function TestRandomInjectionBoolSlice (line 147) | func TestRandomInjectionBoolSlice(t *testing.T) {
function TestRandomInjectionIntSlice (line 179) | func TestRandomInjectionIntSlice(t *testing.T) {
function TestRandomInjectionFloat64Slice (line 211) | func TestRandomInjectionFloat64Slice(t *testing.T) {
function TestRandomInjectionInterfaceSlice (line 243) | func TestRandomInjectionInterfaceSlice(t *testing.T) {
function TestConcatVariablesAndInjectAsTyped (line 276) | func TestConcatVariablesAndInjectAsTyped(t *testing.T) {
function TestConcatVariablesAndInjectAsTyped2 (line 313) | func TestConcatVariablesAndInjectAsTyped2(t *testing.T) {
function TestConcatVariablesAndInjectAsTypedDynamic (line 350) | func TestConcatVariablesAndInjectAsTypedDynamic(t *testing.T) {
function TestInvalidDynamicVarInjection (line 387) | func TestInvalidDynamicVarInjection(t *testing.T) {
function TestOSEnvInjection (line 399) | func TestOSEnvInjection(t *testing.T) {
function TestDdosifyBodyReader (line 426) | func TestDdosifyBodyReader(t *testing.T) {
function TestDdosifyBodyReaderSplitted (line 461) | func TestDdosifyBodyReaderSplitted(t *testing.T) {
function TestDdosifyBodyReaderSplittedPiece (line 512) | func TestDdosifyBodyReaderSplittedPiece(t *testing.T) {
function TestDdosifyBodyReaderSplittedPiece2 (line 563) | func TestDdosifyBodyReaderSplittedPiece2(t *testing.T) {
function TestDdosifyBodyReaderSplittedPiece3 (line 626) | func TestDdosifyBodyReaderSplittedPiece3(t *testing.T) {
function TestDdosifyBodyReaderSplittedPiece4 (line 688) | func TestDdosifyBodyReaderSplittedPiece4(t *testing.T) {
function TestDdosifyBodyReaderSplittedPiece5 (line 751) | func TestDdosifyBodyReaderSplittedPiece5(t *testing.T) {
function TestGenerateBodyPieces (line 813) | func TestGenerateBodyPieces(t *testing.T) {
function TestGenerateBodyPiecesWithDynamicVars (line 874) | func TestGenerateBodyPiecesWithDynamicVars(t *testing.T) {
function TestGenerateBodyPiecesSorted (line 929) | func TestGenerateBodyPiecesSorted(t *testing.T) {
FILE: ddosify_engine/core/scenario/scripting/injection/init.go
function init (line 8) | func init() {
FILE: ddosify_engine/core/scenario/service.go
type ScenarioService (line 44) | type ScenarioService struct
method Init (line 78) | func (s *ScenarioService) Init(ctx context.Context, scenario types.Sce...
method Do (line 138) | func (s *ScenarioService) Do(proxy *url.URL, startTime time.Time) (
method engineInUserMode (line 204) | func (s *ScenarioService) engineInUserMode() bool {
method enrichEnvFromData (line 211) | func (s *ScenarioService) enrichEnvFromData(envs map[string]interface{...
method Done (line 234) | func (s *ScenarioService) Done() {
method getOrCreateRequesters (line 246) | func (s *ScenarioService) getOrCreateRequesters(proxy *url.URL) (reque...
method createRequesters (line 260) | func (s *ScenarioService) createRequesters(proxy *url.URL) (err error) {
function NewScenarioService (line 64) | func NewScenarioService() *ScenarioService {
type ScenarioOpts (line 68) | type ScenarioOpts struct
function putInitialCookiesInJarFactory (line 122) | func putInitialCookiesInJarFactory(engineMode string, initCookies []*htt...
function enrichEnvFromPrevStep (line 198) | func enrichEnvFromPrevStep(m1 map[string]interface{}, m2 map[string]inte...
function injectDynamicVars (line 292) | func injectDynamicVars(vi *injection.EnvironmentInjector, envs map[strin...
type scenarioItemRequester (line 309) | type scenarioItemRequester struct
type Sleeper (line 316) | type Sleeper interface
type RangeSleep (line 321) | type RangeSleep struct
method sleep (line 326) | func (rs *RangeSleep) sleep() {
type DurationSleep (line 333) | type DurationSleep struct
method sleep (line 337) | func (ds *DurationSleep) sleep() {
function newSleeper (line 342) | func newSleeper(sleepStr string) Sleeper {
FILE: ddosify_engine/core/scenario/service_test.go
type MockHttpRequester (line 37) | type MockHttpRequester struct
method Init (line 50) | func (m *MockHttpRequester) Init(ctx context.Context, s types.Scenario...
method Send (line 58) | func (m *MockHttpRequester) Send(client *http.Client, envs map[string]...
method Done (line 63) | func (m *MockHttpRequester) Done() {
method Type (line 67) | func (m *MockHttpRequester) Type() string {
type MockSleep (line 71) | type MockSleep struct
method sleep (line 76) | func (msl *MockSleep) sleep() {
function compareScenarioServiceClients (line 81) | func compareScenarioServiceClients(
function TestInitService (line 125) | func TestInitService(t *testing.T) {
function TestDo (line 210) | func TestDo(t *testing.T) {
function TestDoErrorOnSend (line 282) | func TestDoErrorOnSend(t *testing.T) {
function TestDone (line 403) | func TestDone(t *testing.T) {
function TestGetOrCreateRequesters (line 472) | func TestGetOrCreateRequesters(t *testing.T) {
function TestGetOrCreateRequestersNewProxy (line 521) | func TestGetOrCreateRequestersNewProxy(t *testing.T) {
function TestCreateRequestersErrorOnRequesterInit (line 573) | func TestCreateRequestersErrorOnRequesterInit(t *testing.T) {
function TestnewSleeper (line 605) | func TestnewSleeper(t *testing.T) {
function TestSleep (line 637) | func TestSleep(t *testing.T) {
function TestInjectDynamicVars (line 679) | func TestInjectDynamicVars(t *testing.T) {
function TestOnlyOneClientInDebugModeInUserMode (line 709) | func TestOnlyOneClientInDebugModeInUserMode(t *testing.T) {
FILE: ddosify_engine/core/types/error.go
constant ErrorProxy (line 28) | ErrorProxy = "proxyError"
constant ErrorConn (line 29) | ErrorConn = "connectionError"
constant ErrorUnkown (line 30) | ErrorUnkown = "unknownError"
constant ErrorIntented (line 31) | ErrorIntented = "intentedError"
constant ErrorDns (line 32) | ErrorDns = "dnsError"
constant ErrorParse (line 33) | ErrorParse = "parseError"
constant ErrorAddr (line 34) | ErrorAddr = "addressError"
constant ErrorInvalidRequest (line 35) | ErrorInvalidRequest = "invalidRequestError"
constant ReasonProxyFailed (line 38) | ReasonProxyFailed = "proxy connection refused"
constant ReasonProxyTimeout (line 39) | ReasonProxyTimeout = "proxy timeout"
constant ReasonConnTimeout (line 40) | ReasonConnTimeout = "connection timeout"
constant ReasonReadTimeout (line 41) | ReasonReadTimeout = "read timeout"
constant ReasonConnRefused (line 42) | ReasonConnRefused = "connection refused"
constant ReasonCtxCanceled (line 46) | ReasonCtxCanceled = "context canceled"
type RequestError (line 50) | type RequestError struct
method Error (line 56) | func (e *RequestError) Error() string {
type ScenarioValidationError (line 60) | type ScenarioValidationError struct
method Error (line 65) | func (sc ScenarioValidationError) Error() string {
method Unwrap (line 69) | func (sc ScenarioValidationError) Unwrap() error {
type EnvironmentNotDefinedError (line 73) | type EnvironmentNotDefinedError struct
method Error (line 78) | func (sc EnvironmentNotDefinedError) Error() string {
method Unwrap (line 82) | func (sc EnvironmentNotDefinedError) Unwrap() error {
type CaptureConfigError (line 86) | type CaptureConfigError struct
method Error (line 91) | func (sc CaptureConfigError) Error() string {
method Unwrap (line 95) | func (sc CaptureConfigError) Unwrap() error {
type FailedAssertion (line 99) | type FailedAssertion struct
FILE: ddosify_engine/core/types/hammer.go
constant LoadTypeLinear (line 35) | LoadTypeLinear = "linear"
constant LoadTypeIncremental (line 36) | LoadTypeIncremental = "incremental"
constant LoadTypeWaved (line 37) | LoadTypeWaved = "waved"
constant EngineModeDistinctUser (line 40) | EngineModeDistinctUser = "distinct-user"
constant EngineModeRepeatedUser (line 41) | EngineModeRepeatedUser = "repeated-user"
constant EngineModeDdosify (line 42) | EngineModeDdosify = "ddosify"
constant DefaultIterCount (line 45) | DefaultIterCount = 100
constant DefaultLoadType (line 46) | DefaultLoadType = LoadTypeLinear
constant DefaultDuration (line 47) | DefaultDuration = 10
constant DefaultTimeout (line 48) | DefaultTimeout = 5
constant DefaultMethod (line 49) | DefaultMethod = http.MethodGet
constant DefaultOutputType (line 50) | DefaultOutputType = "stdout"
constant DefaultSamplingCount (line 51) | DefaultSamplingCount = 3
constant DefaultSingleMode (line 52) | DefaultSingleMode = true
type TestAssertionOpt (line 58) | type TestAssertionOpt struct
type TimeRunCount (line 64) | type TimeRunCount
type Tag (line 69) | type Tag struct
type CsvConf (line 74) | type CsvConf struct
type CustomCookie (line 85) | type CustomCookie struct
type Hammer (line 99) | type Hammer struct
method Validate (line 150) | func (h *Hammer) Validate() error {
function getCsvEnvs (line 179) | func getCsvEnvs(testDataConf map[string]CsvConf) []string {
FILE: ddosify_engine/core/types/hammer_test.go
function newDummyHammer (line 30) | func newDummyHammer() Hammer {
function TestHammerValidAttackType (line 46) | func TestHammerValidAttackType(t *testing.T) {
function TestHammerInValidAttackType (line 59) | func TestHammerInValidAttackType(t *testing.T) {
function TestHammerValidAuth (line 68) | func TestHammerValidAuth(t *testing.T) {
function TestHammerInValidAuth (line 84) | func TestHammerInValidAuth(t *testing.T) {
function TestHammerValidScenario (line 97) | func TestHammerValidScenario(t *testing.T) {
function TestHammerEmptyScenario (line 141) | func TestHammerEmptyScenario(t *testing.T) {
function TestHammerInvalidScenarioMethod (line 150) | func TestHammerInvalidScenarioMethod(t *testing.T) {
function TestHammerEmptyScenarioStepID (line 184) | func TestHammerEmptyScenarioStepID(t *testing.T) {
function TestHammerDuplicateScenarioStepID (line 216) | func TestHammerDuplicateScenarioStepID(t *testing.T) {
function TestHammerStepSleep (line 240) | func TestHammerStepSleep(t *testing.T) {
function TestHammerInvalidManualLoadDuration (line 302) | func TestHammerInvalidManualLoadDuration(t *testing.T) {
function TestHammerAccessingNotDefinedCsvEnvs (line 326) | func TestHammerAccessingNotDefinedCsvEnvs(t *testing.T) {
FILE: ddosify_engine/core/types/regex/regex.go
constant DynamicVariableRegex (line 3) | DynamicVariableRegex = `\{{(_)[^}]+\}}`
constant JsonDynamicVariableRegex (line 4) | JsonDynamicVariableRegex = `\"{{(_)[^}]+\}}"`
constant EnvironmentVariableRegex (line 6) | EnvironmentVariableRegex = `{{[a-zA-Z$][a-zA-Z0-9_().-]*}}`
constant JsonEnvironmentVarRegex (line 7) | JsonEnvironmentVarRegex = `\"{{[a-zA-Z$][a-zA-Z0-9_().-]*}}"`
FILE: ddosify_engine/core/types/regex/regex_test.go
function TestDynamicVariableRegex (line 8) | func TestDynamicVariableRegex(t *testing.T) {
function TestEnvironmentVariableRegex (line 46) | func TestEnvironmentVariableRegex(t *testing.T) {
FILE: ddosify_engine/core/types/response.go
type ScenarioResult (line 32) | type ScenarioResult struct
type ScenarioStepResult (line 44) | type ScenarioStepResult struct
FILE: ddosify_engine/core/types/scenario.go
constant ProtocolHTTP (line 41) | ProtocolHTTP = "HTTP"
constant ProtocolHTTPS (line 42) | ProtocolHTTPS = "HTTPS"
constant AuthHttpBasic (line 45) | AuthHttpBasic = "basic"
constant maxSleep (line 48) | maxSleep = 90000
constant EnvironmentVariableRegexStr (line 51) | EnvironmentVariableRegexStr = `{{[a-zA-Z$][a-zA-Z0-9_().-]*}}`
constant EnvironmentVariableNameStr (line 54) | EnvironmentVariableNameStr = `^[a-zA-Z][a-zA-Z0-9_-]*$`
function init (line 70) | func init() {
type Scenario (line 76) | type Scenario struct
method validate (line 83) | func (s *Scenario) validate() error {
function checkEnvsValidInStep (line 129) | func checkEnvsValidInStep(st *ScenarioStep, definedEnvs map[string]struc...
type ScenarioStep (line 194) | type ScenarioStep struct
method validate (line 274) | func (si *ScenarioStep) validate(definedEnvs map[string]struct{}) error {
type SourceType (line 238) | type SourceType
constant Header (line 241) | Header SourceType = "header"
constant Body (line 242) | Body SourceType = "body"
constant Cookie (line 243) | Cookie SourceType = "cookies"
type RegexCaptureConf (line 246) | type RegexCaptureConf struct
type EnvCaptureConf (line 251) | type EnvCaptureConf struct
type CsvData (line 262) | type CsvData struct
type Auth (line 268) | type Auth struct
function wrapAsScenarioValidationError (line 323) | func wrapAsScenarioValidationError(err error) ScenarioValidationError {
function validateCaptureConf (line 330) | func validateCaptureConf(conf EnvCaptureConf) error {
function ParseTLS (line 352) | func ParseTLS(certFile, keyFile string) (tls.Certificate, *x509.CertPool...
function IsTargetValid (line 374) | func IsTargetValid(url string) error {
FILE: ddosify_engine/core/types/scenario_test.go
function TestScenarioStepValid_EnvVariableInHeader (line 11) | func TestScenarioStepValid_EnvVariableInHeader(t *testing.T) {
function TestScenarioStepValid_EnvVariableInPayload (line 43) | func TestScenarioStepValid_EnvVariableInPayload(t *testing.T) {
function TestScenarioStepValid_EnvVariableInURL (line 73) | func TestScenarioStepValid_EnvVariableInURL(t *testing.T) {
function TestScenarioStep_InvalidCaptureConfig (line 103) | func TestScenarioStep_InvalidCaptureConfig(t *testing.T) {
function TestScenarioStepValid_OSEnvVariableInPayload (line 166) | func TestScenarioStepValid_OSEnvVariableInPayload(t *testing.T) {
FILE: ddosify_engine/core/util/buffer_pool.go
type BufferFactoryMethod (line 9) | type BufferFactoryMethod
type BufferCloseMethod (line 10) | type BufferCloseMethod
function NewBufferPool (line 12) | func NewBufferPool(initialCap, maxCap int, factory BufferFactoryMethod, ...
FILE: ddosify_engine/core/util/helper.go
function StringInSlice (line 29) | func StringInSlice(a string, list []string) bool {
function IsSystemInTestMode (line 39) | func IsSystemInTestMode() bool {
FILE: ddosify_engine/core/util/pool.go
type Pool (line 3) | type Pool struct
method Get (line 10) | func (p *Pool[T]) Get() T {
method Put (line 20) | func (p *Pool[T]) Put(item T) error {
method Len (line 42) | func (p *Pool[T]) Len() int {
method Done (line 46) | func (p *Pool[T]) Done() {
FILE: ddosify_engine/main.go
constant headerRegexp (line 45) | headerRegexp = `^*(.+):\s*(.+)`
function main (line 82) | func main() {
function start (line 93) | func start() {
function createHammer (line 107) | func createHammer() (h types.Hammer, err error) {
function createProxy (line 213) | func createProxy() (p proxy.Proxy, err error) {
function createScenario (line 229) | func createScenario() (s types.Scenario, err error) {
function versionTemplate (line 282) | func versionTemplate() string {
function printVersionAndExit (line 295) | func printVersionAndExit() {
function exitWithMsg (line 300) | func exitWithMsg(msg string) {
function parseHeaders (line 308) | func parseHeaders(headersArr []string) (headersMap map[string]string, er...
type header (line 322) | type header
method String (line 324) | func (h *header) String() string {
method Set (line 328) | func (h *header) Set(value string) error {
function isFlagPassed (line 333) | func isFlagPassed(name string) bool {
FILE: ddosify_engine/main_benchmark_test.go
type TestType (line 45) | type TestType
constant Multipart (line 48) | Multipart TestType = "multipart"
constant Correlation (line 49) | Correlation TestType = "correlation"
constant Basic (line 50) | Basic TestType = "basic"
function BenchmarkEngines (line 174) | func BenchmarkEngines(t *testing.B) {
function max (line 321) | func max[T constraints.Ordered](s []T) T {
function sum (line 335) | func sum[T constraints.Ordered](s []T) T {
FILE: ddosify_engine/main_exit_test.go
function TestExitStatusOnTestFail (line 35) | func TestExitStatusOnTestFail(t *testing.T) {
FILE: ddosify_engine/main_test.go
function TestMain (line 41) | func TestMain(m *testing.M) {
function resetFlags (line 48) | func resetFlags() {
function TestDefaultFlagValues (line 72) | func TestDefaultFlagValues(t *testing.T) {
function TestCreateHammer (line 120) | func TestCreateHammer(t *testing.T) {
function TestDebugFlagOverridesConfig (line 173) | func TestDebugFlagOverridesConfig(t *testing.T) {
function TestCreateScenario (line 214) | func TestCreateScenario(t *testing.T) {
function TestCreateScenarioTLS (line 291) | func TestCreateScenarioTLS(t *testing.T) {
function TestCreateProxy (line 354) | func TestCreateProxy(t *testing.T) {
function TestParseHeaders (line 415) | func TestParseHeaders(t *testing.T) {
function TestRun (line 462) | func TestRun(t *testing.T) {
function TestTargetEmpty (line 483) | func TestTargetEmpty(t *testing.T) {
function TestTargetInvalidHammer (line 506) | func TestTargetInvalidHammer(t *testing.T) {
function TestVersion (line 529) | func TestVersion(t *testing.T) {
function Test_versionTemplate (line 552) | func Test_versionTemplate(t *testing.T) {
function createCertPairFiles (line 571) | func createCertPairFiles(cert string, certKey string) (*os.File, *os.Fil...
function generateCerts (line 595) | func generateCerts() (string, string) {
Condensed preview — 173 files, each showing path, character count, and a content snippet. Download the .json file or copy for the full structured content (813K chars).
[
{
"path": ".devcontainer/.zshrc",
"chars": 431,
"preview": "export ZSH=$HOME/.oh-my-zsh\n\nZSH_THEME=\"cloud\"\n\nplugins=(\n git\n zsh-autosuggestions\n)\n\nsource $ZSH/oh-my-zsh.sh\n\ns"
},
{
"path": ".devcontainer/Dockerfile.dev",
"chars": 1216,
"preview": "FROM golang:1.18.1\n\nWORKDIR /workspace\n\nCOPY go.mod ./\nCOPY go.sum ./\n \nENV GOPATH /go\nENV GOBIN /go/bin\n\nENV LC_ALL=C.U"
},
{
"path": ".devcontainer/devcontainer.json",
"chars": 1175,
"preview": "{\n\t\"name\": \"Ddosify Open Source\",\n\t\"build\": {\n\t\t\"dockerfile\": \"Dockerfile.dev\",\n\t\t\"context\": \"../\"\n\t},\n\t\"runArgs\": [\n\t\t\""
},
{
"path": ".github/ISSUE_TEMPLATE/bug_report.md",
"chars": 685,
"preview": "---\nname: Bug report\nabout: Create a report to help us improve\ntitle: ''\nlabels: bug\nassignees: ''\n---\n### Describe the "
},
{
"path": ".github/ISSUE_TEMPLATE/feature_request.md",
"chars": 642,
"preview": "---\nname: Feature request\nabout: Suggest an idea for this project\ntitle: ''\nlabels: enhancement\nassignees: ''\n---\n**Is y"
},
{
"path": ".github/dependabot.yml",
"chars": 687,
"preview": "# To get started with Dependabot version updates, you'll need to specify which\n# package ecosystems to update and where "
},
{
"path": ".github/pull_request_template.md",
"chars": 1197,
"preview": "## Description\n\n<!-- Please provide a brief and concise description of the changes in this pull request, including the p"
},
{
"path": ".github/workflows/coverage.yml",
"chars": 760,
"preview": "name: Coverage\n\non:\n push:\n branches:\n - master\n - develop\n pull_request:\n branches:\n - master\n "
},
{
"path": ".github/workflows/docs.yml",
"chars": 520,
"preview": "name: Documentation\n\non:\n push:\n branches:\n - master\n - develop\n pull_request:\n branches:\n - mast"
},
{
"path": ".github/workflows/release.yml",
"chars": 1002,
"preview": "name: Release Ddosify\n\non:\n push:\n tags:\n - '*'\n\npermissions:\n contents: write\n\njobs:\n release:\n runs-on: "
},
{
"path": ".github/workflows/test.yml",
"chars": 608,
"preview": "name: Test\n\non:\n push:\n branches:\n - master\n - develop\n pull_request:\n branches:\n - master\n "
},
{
"path": ".gitignore",
"chars": 338,
"preview": "# Binaries for programs and plugins\n*.exe\n*.exe~\n*.dll\n*.so\n*.dylib\n\n# Test binary, built with `go test -c`\n*.test\n\n# Ou"
},
{
"path": ".lycheeignore",
"chars": 109,
"preview": "https://getanteon.com/endpoint_1\nhttps://getanteon.com/endpoint_2\nhttp://localhost:8014/\nhttps://gurubase.io/"
},
{
"path": "CODE_OF_CONDUCT.md",
"chars": 5219,
"preview": "# Contributor Covenant Code of Conduct\n\n## Our Pledge\n\nWe as members, contributors, and leaders pledge to make participa"
},
{
"path": "CONTRIBUTING.md",
"chars": 3693,
"preview": "# Contributing to Anteon 🐝\n\nThank you for your interest in contributing to [Anteon](https://github.com/getanteon/anteon)"
},
{
"path": "LICENSE",
"chars": 34488,
"preview": " GNU AFFERO GENERAL PUBLIC LICENSE\n Version 3, 19 November 2007\n\n Copyright (C)"
},
{
"path": "README.md",
"chars": 7007,
"preview": "<div align=\"center\">\n <img src=\"https://raw.githubusercontent.com/getanteon/anteon/master/assets/anteon-logo-db.svg#g"
},
{
"path": "SECURITY.md",
"chars": 2086,
"preview": "# Anteon Security Policy 🐝\n\nWe are committed to maintaining the security and integrity of [Anteon](https://github.com/ge"
},
{
"path": "assets/ddosify.profile",
"chars": 416,
"preview": "export TERM=xterm-256color\nNC='\\033[0m'\nprintf \"\\e[38;5;172m\\n\"\ncat<<ddosify\n __ __ _ ____ "
},
{
"path": "ddosify_engine/.dockerignore",
"chars": 40,
"preview": "dist/\n*.yml\n*.out\nJenkinsfile\nREADME.md\n"
},
{
"path": "ddosify_engine/.golangci.yml",
"chars": 386,
"preview": "linters:\n enable:\n - lll\n - golint\n - misspell\nlinters-settings:\n lll:\n # max line length, lines longer wi"
},
{
"path": "ddosify_engine/.goreleaser.yml",
"chars": 3344,
"preview": "project_name: ddosify\nbefore:\n hooks:\n - go mod tidy\nbuilds:\n - env:\n - CGO_ENABLED=0\n goos:\n - linux\n"
},
{
"path": "ddosify_engine/Dockerfile",
"chars": 352,
"preview": "FROM golang:1.18.1-alpine as builder\nWORKDIR /app\nCOPY . ./\nRUN go mod download\nRUN CGO_ENABLED=0 GOOS=linux go build -o"
},
{
"path": "ddosify_engine/Dockerfile.dev",
"chars": 1216,
"preview": "FROM golang:1.18.1\n\nWORKDIR /workspace\n\nCOPY go.mod ./\nCOPY go.sum ./\n \nENV GOPATH /go\nENV GOBIN /go/bin\n\nENV LC_ALL=C.U"
},
{
"path": "ddosify_engine/Dockerfile.release",
"chars": 187,
"preview": "FROM alpine:3.15.4\nENV ENV=\"/root/.ashrc\"\nWORKDIR /root\nRUN apk --no-cache add ca-certificates\nCOPY ddosify /bin/\n\nCOPY "
},
{
"path": "ddosify_engine/Jenkinsfile",
"chars": 1951,
"preview": "pipeline {\n agent {\n dockerfile {\n filename '.devcontainer/Dockerfile.dev'\n }\n }\n environment {\n PROXY_"
},
{
"path": "ddosify_engine/Jenkinsfile_benchmark",
"chars": 2415,
"preview": "pipeline {\n agent {\n dockerfile {\n label 'performance-test'\n filename '.devcontainer/Dockerfile.dev'\n }"
},
{
"path": "ddosify_engine/README.md",
"chars": 54239,
"preview": "<div align=\"center\">\n <img src=\"https://raw.githubusercontent.com/getanteon/anteon/master/assets/anteon-logo-db.svg#g"
},
{
"path": "ddosify_engine/completions/README.md",
"chars": 1161,
"preview": "# Shell completions\n\n## Zsh\n\n`completions/_ddosify` provides a basic auto-completions. You can apply one of the steps to"
},
{
"path": "ddosify_engine/completions/_ddosify",
"chars": 1465,
"preview": "#compdef ddosify _ddosify\n\ntypeset -A opt_args\n\n_ddosify() {\n local curcontext=\"$curcontext\" state line\n local -a "
},
{
"path": "ddosify_engine/config/base.go",
"chars": 1569,
"preview": "/*\n*\n*\tDdosify - Load testing tool for any web system.\n* Copyright (C) 2021 Ddosify (https://ddosify.com)\n*\n* This "
},
{
"path": "ddosify_engine/config/base_test.go",
"chars": 1924,
"preview": "/*\n*\n*\tDdosify - Load testing tool for any web system.\n* Copyright (C) 2021 Ddosify (https://ddosify.com)\n*\n* This "
},
{
"path": "ddosify_engine/config/config_testdata/benchmark/config_correlation_load_1.json",
"chars": 2479,
"preview": "{\n \"iteration_count\": 100,\n \"engine_mode\": \"ddosify\",\n \"load_type\": \"waved\",\n \"duration\": 10,\n \"steps\": ["
},
{
"path": "ddosify_engine/config/config_testdata/benchmark/config_correlation_load_2.json",
"chars": 2480,
"preview": "{\n \"iteration_count\": 1000,\n \"load_type\": \"waved\",\n \"engine_mode\": \"ddosify\",\n \"duration\": 10,\n \"steps\": "
},
{
"path": "ddosify_engine/config/config_testdata/benchmark/config_correlation_load_3.json",
"chars": 2480,
"preview": "{\n \"iteration_count\": 5000,\n \"load_type\": \"waved\",\n \"engine_mode\": \"ddosify\",\n \"duration\": 10,\n \"steps\": "
},
{
"path": "ddosify_engine/config/config_testdata/benchmark/config_correlation_load_4.json",
"chars": 2482,
"preview": "{\n \"iteration_count\": 10000,\n \"load_type\": \"waved\",\n \"engine_mode\": \"ddosify\",\n\n \"duration\": 10,\n \"steps\""
},
{
"path": "ddosify_engine/config/config_testdata/benchmark/config_correlation_load_5.json",
"chars": 2482,
"preview": "{\n \"iteration_count\": 20000,\n \"load_type\": \"waved\",\n \"engine_mode\": \"ddosify\",\n\n \"duration\": 10,\n \"steps\""
},
{
"path": "ddosify_engine/config/config_testdata/benchmark/config_distinct_user.json",
"chars": 599,
"preview": "{\n \"iteration_count\": 100,\n \"engine_mode\": \"ddosify\",\n \"load_type\": \"linear\",\n \"duration\": 10,\n \"steps\": "
},
{
"path": "ddosify_engine/config/config_testdata/benchmark/config_multipart_inject_100rps.json",
"chars": 1010,
"preview": "{\n \"steps\": [\n {\n \"id\": 1,\n \"url\": \"https://testserver.ddosify.com/upload_image/\",\n \"name\":"
},
{
"path": "ddosify_engine/config/config_testdata/benchmark/config_multipart_inject_10rps.json",
"chars": 960,
"preview": "{\n \"steps\": [\n {\n \"id\": 1,\n \"url\": \"https://testserver.ddosify.com/upload_image/\",\n \"name\":"
},
{
"path": "ddosify_engine/config/config_testdata/benchmark/config_multipart_inject_1krps.json",
"chars": 1011,
"preview": "{\n \"steps\": [\n {\n \"id\": 1,\n \"url\": \"https://testserver.ddosify.com/upload_image/\",\n \"name\":"
},
{
"path": "ddosify_engine/config/config_testdata/benchmark/config_multipart_inject_200rps.json",
"chars": 1010,
"preview": "{\n \"steps\": [\n {\n \"id\": 1,\n \"url\": \"https://testserver.ddosify.com/upload_image/\",\n \"name\":"
},
{
"path": "ddosify_engine/config/config_testdata/benchmark/config_multipart_inject_2krps.json",
"chars": 1011,
"preview": "{\n \"steps\": [\n {\n \"id\": 1,\n \"url\": \"https://testserver.ddosify.com/upload_image/\",\n \"name\":"
},
{
"path": "ddosify_engine/config/config_testdata/benchmark/config_multipart_inject_500rps.json",
"chars": 1010,
"preview": "{\n \"steps\": [\n {\n \"id\": 1,\n \"url\": \"https://testserver.ddosify.com/upload_image/\",\n \"name\":"
},
{
"path": "ddosify_engine/config/config_testdata/benchmark/config_repeated_user.json",
"chars": 599,
"preview": "{\n \"iteration_count\": 100,\n \"engine_mode\": \"ddosify\",\n \"load_type\": \"linear\",\n \"duration\": 10,\n \"steps\": "
},
{
"path": "ddosify_engine/config/config_testdata/benchmark/json_payload.json",
"chars": 349,
"preview": "{\n \"boolField\" : \"{{BOOL}}\",\n \"numField\" : \"{{NUM}}\",\n \"strField\" : \"{{STR}}\",\n \"numArrayField\" : [\"{{NUM}}\""
},
{
"path": "ddosify_engine/config/config_testdata/config.json",
"chars": 808,
"preview": "{\n \"request_count\": 1555,\n \"load_type\": \"waved\",\n \"duration\": 21,\n \"steps\": [\n {\n \"id\": 1,"
},
{
"path": "ddosify_engine/config/config_testdata/config_auth.json",
"chars": 403,
"preview": "{\n \"steps\": [\n {\n \"id\": 1,\n \"url\": \"https://app.servdown.com/accounts/login/?next=/\",\n "
},
{
"path": "ddosify_engine/config/config_testdata/config_capture_environment.json",
"chars": 893,
"preview": "{\n \"iteration_count\": 100,\n \"load_type\": \"waved\",\n \"duration\": 21,\n \"steps\": [\n {\n \"id\": 1"
},
{
"path": "ddosify_engine/config/config_testdata/config_data_csv.json",
"chars": 1341,
"preview": "{\n \"iteration_count\": 4,\n \"load_type\": \"waved\",\n \"duration\": 1,\n \"steps\": [\n {\n \"id\""
},
{
"path": "ddosify_engine/config/config_testdata/config_debug_false.json",
"chars": 830,
"preview": "{\n \"debug\": false,\n \"iteration_count\": 1555,\n \"load_type\": \"waved\",\n \"duration\": 21,\n \"steps\": [\n "
},
{
"path": "ddosify_engine/config/config_testdata/config_debug_mode.json",
"chars": 829,
"preview": "{\n \"debug\": true,\n \"iteration_count\": 1555,\n \"load_type\": \"waved\",\n \"duration\": 21,\n \"steps\": [\n {"
},
{
"path": "ddosify_engine/config/config_testdata/config_empty.json",
"chars": 95,
"preview": "{\n \"steps\": [\n {\n \"id\": 1,\n \"url\": \"test.com\"\n }\n ]\n}"
},
{
"path": "ddosify_engine/config/config_testdata/config_global_envs.json",
"chars": 524,
"preview": "{\n \"steps\": [\n {\n \"id\": 1,\n \"name\": \"Example Name 1\",\n \"url\": \"{{LOCAL}}\",\n "
},
{
"path": "ddosify_engine/config/config_testdata/config_incorrect.json",
"chars": 1104,
"preview": "{\n \"request_count\": 100,\n \"load_type\": \"linear\",\n \"duration\": 10,\n \"steps\": [\n {\n \"id\": 1,"
},
{
"path": "ddosify_engine/config/config_testdata/config_init_cookies.json",
"chars": 854,
"preview": "{\n \"iteration_count\": 1555,\n \"load_type\": \"waved\",\n \"duration\": 21,\n \"steps\": [\n {\n \"id\": "
},
{
"path": "ddosify_engine/config/config_testdata/config_inject_json.json",
"chars": 1542,
"preview": "{\n \"iteration_count\": 100,\n \"load_type\": \"waved\",\n \"duration\": 21,\n \"steps\": [\n {\n \"id\": 1"
},
{
"path": "ddosify_engine/config/config_testdata/config_inject_json_dynamic.json",
"chars": 1550,
"preview": "{\n \"iteration_count\": 100,\n \"load_type\": \"waved\",\n \"duration\": 21,\n \"steps\": [\n {\n \"id\": 1"
},
{
"path": "ddosify_engine/config/config_testdata/config_inject_xml.json",
"chars": 418,
"preview": "{\n \"iteration_count\": 100,\n \"load_type\": \"waved\",\n \"duration\": 21,\n \"steps\": [\n {\n \"id\": 1"
},
{
"path": "ddosify_engine/config/config_testdata/config_invalid_capture_env.json",
"chars": 786,
"preview": "{\n \"iteration_count\": 100,\n \"load_type\": \"waved\",\n \"duration\": 21,\n \"steps\": [\n {\n \"id\": 1"
},
{
"path": "ddosify_engine/config/config_testdata/config_invalid_target.json",
"chars": 99,
"preview": "{\n \"steps\": [\n {\n \"id\": 1,\n \"url\": \"_invalid.com\"\n }\n ]\n}"
},
{
"path": "ddosify_engine/config/config_testdata/config_invalid_user_mode_for_cookies.json",
"chars": 820,
"preview": "{\n \"iteration_count\": 1555,\n \"load_type\": \"waved\",\n \"duration\": 21,\n \"steps\": [\n {\n \"id\": "
},
{
"path": "ddosify_engine/config/config_testdata/config_iteration_count.json",
"chars": 812,
"preview": "{\n \"iteration_count\": 1555,\n \"load_type\": \"waved\",\n \"duration\": 21,\n \"steps\": [\n {\n \"id\": "
},
{
"path": "ddosify_engine/config/config_testdata/config_iteration_count_over_req_count.json",
"chars": 831,
"preview": "{\n \"iteration_count\": 333,\n \"req_count\": 222,\n \"load_type\": \"waved\",\n \"duration\": 21,\n \"steps\": [\n "
},
{
"path": "ddosify_engine/config/config_testdata/config_manual_load.json",
"chars": 235,
"preview": "{\n \"manual_load\": [\n {\"duration\": 5, \"count\": 5},\n {\"duration\": 6, \"count\": 10},\n {\"duration\": 7"
},
{
"path": "ddosify_engine/config/config_testdata/config_manual_load_override.json",
"chars": 282,
"preview": "{\n \"requests_count\": 100,\n \"duration\": 22,\n \"manual_load\": [\n {\"duration\": 5, \"count\": 5},\n {\"dur"
},
{
"path": "ddosify_engine/config/config_testdata/config_multipart_err.json",
"chars": 480,
"preview": "{\n \"steps\": [\n {\n \"id\": 1,\n \"url\": \"https://app.servdown.com/accounts/login/?next=/\",\n "
},
{
"path": "ddosify_engine/config/config_testdata/config_multipart_payload.json",
"chars": 927,
"preview": "{\n \"steps\": [\n {\n \"id\": 1,\n \"url\": \"https://app.servdown.com/accounts/login/?next=/\",\n "
},
{
"path": "ddosify_engine/config/config_testdata/config_payload.json",
"chars": 393,
"preview": "{\n \"steps\": [\n {\n \"id\": 1,\n \"url\": \"https://app.servdown.com/accounts/login/?next=/\",\n "
},
{
"path": "ddosify_engine/config/config_testdata/config_protocol.json",
"chars": 556,
"preview": "{\n \"steps\": [\n {\n \"id\": 1,\n \"url\": \"https://app.servdown.com/accounts/login/?next=/\",\n "
},
{
"path": "ddosify_engine/config/config_testdata/config_test_assertion_fail.json",
"chars": 633,
"preview": "{\n \"iteration_count\": 100,\n \"load_type\": \"linear\",\n \"duration\": 10,\n \"debug\" : false,\n \"success_criterias"
},
{
"path": "ddosify_engine/config/config_testdata/data_json_payload.json",
"chars": 187,
"preview": "{\n \"name\" : \"{{data.info.name}}\",\n \"team\" : \"{{data.info.team}}\",\n \"city\" : \"{{data.info.city}}\",\n \"payload\""
},
{
"path": "ddosify_engine/config/config_testdata/json_payload.json",
"chars": 392,
"preview": "{\n \"boolField\" : \"{{IS_CHAMPION}}\",\n \"numField\" : \"{{NUM}}\",\n \"strField\" : \"{{NAME}}\",\n \"numArrayField\" : [\""
},
{
"path": "ddosify_engine/config/config_testdata/json_payload_dynamic.json",
"chars": 98,
"preview": "{\n \"name\" : \"{{_randomString}}\",\n \"city\" : \"{{_randomCity}}\",\n \"age\" : \"{{_randomInt}}\"\n}"
},
{
"path": "ddosify_engine/config/config_testdata/payload.txt",
"chars": 18,
"preview": "Payloaf from file."
},
{
"path": "ddosify_engine/config/config_testdata/race_configs/capture_envs.json",
"chars": 704,
"preview": "{\n \"iteration_count\": 10,\n \"duration\": 2,\n \"steps\": [\n {\n \"id\": 1,\n \"name\": \"Examp"
},
{
"path": "ddosify_engine/config/config_testdata/race_configs/global_envs.json",
"chars": 570,
"preview": "{\n \"iteration_count\": 10,\n \"duration\": 2,\n \"steps\": [\n {\n \"id\": 1,\n \"name\": \"Examp"
},
{
"path": "ddosify_engine/config/config_testdata/race_configs/step_assertions_stdout.json",
"chars": 1414,
"preview": "{\n \"debug\": false,\n \"steps\": [\n {\n \"id\": 1,\n \"url\": \"https://testserver.ddosify.com/exchange/\","
},
{
"path": "ddosify_engine/config/config_testdata/race_configs/step_assertions_stdout_json.json",
"chars": 1419,
"preview": "{\n \"debug\": false,\n \"steps\": [\n {\n \"id\": 1,\n \"url\": \"https://testserver.ddosify.com/exchange/\","
},
{
"path": "ddosify_engine/config/config_testdata/test.csv",
"chars": 297,
"preview": "Username;City;Team;Payload;Age;Percent;BoolField;;;\nKenan;Tokat;Galatasaray;{\"data\":{\"profile\":{\"name\":\"Kenan\"}}};25;22."
},
{
"path": "ddosify_engine/config/config_testdata/xml_payload.xml",
"chars": 139,
"preview": "<?xml version=\"1.0\" encoding=\"UTF-8\" ?>\n\t<rss version=\"2.0\">\n\t<channel>\n\t <item>\n\t\t<title>{{HELLO}}</title>\n\t </item>\n"
},
{
"path": "ddosify_engine/config/json.go",
"chars": 13983,
"preview": "/*\n*\n*\tDdosify - Load testing tool for any web system.\n* Copyright (C) 2021 Ddosify (https://ddosify.com)\n*\n* This "
},
{
"path": "ddosify_engine/config/json_test.go",
"chars": 23204,
"preview": "/*\n*\n*\tDdosify - Load testing tool for any web system.\n* Copyright (C) 2021 Ddosify (https://ddosify.com)\n*\n* This "
},
{
"path": "ddosify_engine/config_examples/assertion/expected_body.json",
"chars": 288,
"preview": "[\n \"AED\",\n \"ARS\",\n \"AUD\",\n \"BGN\",\n \"BHD\",\n \"BRL\",\n \"CAD\",\n \"CHF\",\n \"CNY\",\n \"DKK\",\n \"DZD"
},
{
"path": "ddosify_engine/config_examples/config.json",
"chars": 3970,
"preview": "// This file contains full features of Ddosify as a reference. Don't use it directly.\n{\n \"request_count\": 30, // This"
},
{
"path": "ddosify_engine/config_examples/payload.txt",
"chars": 42,
"preview": "body file 1111111111\nbody file 22222222222"
},
{
"path": "ddosify_engine/core/assertion/base.go",
"chars": 344,
"preview": "package assertion\n\nimport (\n\t\"go.ddosify.com/ddosify/core/types\"\n)\n\ntype Aborter interface {\n\tAbortChan() <-chan struct{"
},
{
"path": "ddosify_engine/core/assertion/service.go",
"chars": 4806,
"preview": "package assertion\n\nimport (\n\t\"sort\"\n\t\"sync\"\n\t\"time\"\n\n\t\"go.ddosify.com/ddosify/core/scenario/scripting/assertion\"\n\t\"go.dd"
},
{
"path": "ddosify_engine/core/assertion/service_test.go",
"chars": 3242,
"preview": "package assertion\n\nimport (\n\t\"reflect\"\n\t\"sort\"\n\t\"sync\"\n\t\"testing\"\n\t\"time\"\n\n\t\"go.ddosify.com/ddosify/core/types\"\n)\n\nfunc "
},
{
"path": "ddosify_engine/core/engine.go",
"chars": 12895,
"preview": "/*\n*\n*\tDdosify - Load testing tool for any web system.\n* Copyright (C) 2021 Ddosify (https://ddosify.com)\n*\n* This "
},
{
"path": "ddosify_engine/core/engine_test.go",
"chars": 70903,
"preview": "/*\n*\n*\tDdosify - Load testing tool for any web system.\n* Copyright (C) 2021 Ddosify (https://ddosify.com)\n*\n* This "
},
{
"path": "ddosify_engine/core/proxy/base.go",
"chars": 1928,
"preview": "/*\n*\n*\tDdosify - Load testing tool for any web system.\n* Copyright (C) 2021 Ddosify (https://ddosify.com)\n*\n* This "
},
{
"path": "ddosify_engine/core/proxy/base_test.go",
"chars": 1204,
"preview": "/*\n*\n*\tDdosify - Load testing tool for any web system.\n* Copyright (C) 2021 Ddosify (https://ddosify.com)\n*\n* This "
},
{
"path": "ddosify_engine/core/proxy/single.go",
"chars": 1619,
"preview": "/*\n*\n*\tDdosify - Load testing tool for any web system.\n* Copyright (C) 2021 Ddosify (https://ddosify.com)\n*\n* This "
},
{
"path": "ddosify_engine/core/report/aggregator.go",
"chars": 7097,
"preview": "/*\n*\n*\tDdosify - Load testing tool for any web system.\n* Copyright (C) 2021 Ddosify (https://ddosify.com)\n*\n* This "
},
{
"path": "ddosify_engine/core/report/aggregator_test.go",
"chars": 5900,
"preview": "package report\n\nimport (\n\t\"reflect\"\n\t\"testing\"\n\t\"time\"\n\n\t\"go.ddosify.com/ddosify/core/types\"\n)\n\nfunc TestStart(t *testin"
},
{
"path": "ddosify_engine/core/report/base.go",
"chars": 1648,
"preview": "/*\n*\n*\tDdosify - Load testing tool for any web system.\n* Copyright (C) 2021 Ddosify (https://ddosify.com)\n*\n* This "
},
{
"path": "ddosify_engine/core/report/base_test.go",
"chars": 1207,
"preview": "/*\n*\n*\tDdosify - Load testing tool for any web system.\n* Copyright (C) 2021 Ddosify (https://ddosify.com)\n*\n* This "
},
{
"path": "ddosify_engine/core/report/debug.go",
"chars": 3642,
"preview": "package report\n\nimport (\n\t\"encoding/json\"\n\t\"html\"\n\t\"net/http\"\n\t\"strings\"\n\n\t\"go.ddosify.com/ddosify/core/types\"\n)\n\ntype v"
},
{
"path": "ddosify_engine/core/report/debug_test.go",
"chars": 572,
"preview": "package report\n\nimport (\n\t\"encoding/json\"\n\t\"net/http\"\n\t\"reflect\"\n\t\"testing\"\n)\n\nfunc TestDecode(t *testing.T) {\n\th := htt"
},
{
"path": "ddosify_engine/core/report/stdout.go",
"chars": 14119,
"preview": "/*\n*\n*\tDdosify - Load testing tool for any web system.\n* Copyright (C) 2021 Ddosify (https://ddosify.com)\n*\n* This "
},
{
"path": "ddosify_engine/core/report/stdoutJson.go",
"chars": 8980,
"preview": "/*\n*\n*\tDdosify - Load testing tool for any web system.\n* Copyright (C) 2021 Ddosify (https://ddosify.com)\n*\n* This "
},
{
"path": "ddosify_engine/core/report/stdoutJson_test.go",
"chars": 11321,
"preview": "/*\n*\n*\tDdosify - Load testing tool for any web system.\n* Copyright (C) 2021 Ddosify (https://ddosify.com)\n*\n* This "
},
{
"path": "ddosify_engine/core/report/stdout_test.go",
"chars": 5664,
"preview": "/*\n*\n*\tDdosify - Load testing tool for any web system.\n* Copyright (C) 2021 Ddosify (https://ddosify.com)\n*\n* This "
},
{
"path": "ddosify_engine/core/scenario/client_pool.go",
"chars": 3272,
"preview": "package scenario\n\nimport (\n\t\"errors\"\n\t\"net/http\"\n\t\"net/http/cookiejar\"\n\t\"net/url\"\n\n\t\"go.ddosify.com/ddosify/core/types\"\n"
},
{
"path": "ddosify_engine/core/scenario/client_pool_cookie_test.go",
"chars": 7265,
"preview": "package scenario\n\nimport (\n\t\"net/http\"\n\t\"net/http/cookiejar\"\n\t\"net/http/httptest\"\n\t\"net/url\"\n\t\"testing\"\n\n\t\"go.ddosify.co"
},
{
"path": "ddosify_engine/core/scenario/data/csv.go",
"chars": 3599,
"preview": "package data\n\nimport (\n\t\"encoding/csv\"\n\t\"encoding/json\"\n\t\"fmt\"\n\t\"io\"\n\t\"net/http\"\n\t\"net/url\"\n\t\"os\"\n\t\"strconv\"\n\n\t\"go.ddosi"
},
{
"path": "ddosify_engine/core/scenario/data/csv_test.go",
"chars": 5382,
"preview": "package data\n\nimport (\n\t\"errors\"\n\t\"fmt\"\n\t\"net/http\"\n\t\"net/http/httptest\"\n\t\"reflect\"\n\t\"strings\"\n\t\"testing\"\n\n\t\"go.ddosify."
},
{
"path": "ddosify_engine/core/scenario/requester/base.go",
"chars": 1726,
"preview": "/*\n*\n*\tDdosify - Load testing tool for any web system.\n* Copyright (C) 2021 Ddosify (https://ddosify.com)\n*\n* This "
},
{
"path": "ddosify_engine/core/scenario/requester/base_test.go",
"chars": 1047,
"preview": "/*\n*\n*\tDdosify - Load testing tool for any web system.\n* Copyright (C) 2021 Ddosify (https://ddosify.com)\n*\n* This "
},
{
"path": "ddosify_engine/core/scenario/requester/http.go",
"chars": 28337,
"preview": "/*\n*\n*\tDdosify - Load testing tool for any web system.\n* Copyright (C) 2021 Ddosify (https://ddosify.com)\n*\n* This "
},
{
"path": "ddosify_engine/core/scenario/requester/http_test.go",
"chars": 21179,
"preview": "/*\n*\n*\tDdosify - Load testing tool for any web system.\n* Copyright (C) 2021 Ddosify (https://ddosify.com)\n*\n* This "
},
{
"path": "ddosify_engine/core/scenario/scripting/assertion/assert.go",
"chars": 1761,
"preview": "package assertion\n\nimport (\n\t\"fmt\"\n\t\"strings\"\n\n\t\"go.ddosify.com/ddosify/core/scenario/scripting/assertion/evaluator\"\n\t\"g"
},
{
"path": "ddosify_engine/core/scenario/scripting/assertion/assert_test.go",
"chars": 20136,
"preview": "package assertion\n\nimport (\n\t\"errors\"\n\t\"net/http\"\n\t\"reflect\"\n\t\"testing\"\n\n\t\"go.ddosify.com/ddosify/core/scenario/scriptin"
},
{
"path": "ddosify_engine/core/scenario/scripting/assertion/ast/ast.go",
"chars": 4970,
"preview": "package ast\n\nimport (\n\t\"bytes\"\n\t\"strings\"\n\n\t\"go.ddosify.com/ddosify/core/scenario/scripting/assertion/token\"\n)\n\n// The b"
},
{
"path": "ddosify_engine/core/scenario/scripting/assertion/evaluator/env.go",
"chars": 433,
"preview": "package evaluator\n\nimport \"net/http\"\n\ntype AssertEnv struct {\n\tStatusCode int64\n\tResponseSize int64\n\tResponseTime int6"
},
{
"path": "ddosify_engine/core/scenario/scripting/assertion/evaluator/evaluator.go",
"chars": 19670,
"preview": "package evaluator\n\nimport (\n\t\"encoding/json\"\n\t\"fmt\"\n\t\"net/http\"\n\t\"reflect\"\n\t\"strconv\"\n\t\"strings\"\n\t\"time\"\n\n\t\"go.ddosify.c"
},
{
"path": "ddosify_engine/core/scenario/scripting/assertion/evaluator/function.go",
"chars": 4758,
"preview": "package evaluator\n\nimport (\n\t\"encoding/json\"\n\t\"fmt\"\n\t\"math\"\n\t\"os\"\n\t\"reflect\"\n\t\"strings\"\n\t\"time\"\n\n\t\"go.ddosify.com/ddosif"
},
{
"path": "ddosify_engine/core/scenario/scripting/assertion/evaluator/function_test.go",
"chars": 522,
"preview": "package evaluator\n\nimport \"testing\"\n\nfunc TestEmptyArraysOnMinMaxAvgFuncs(t *testing.T) {\n\tempty := []int64{}\n\t_, err :="
},
{
"path": "ddosify_engine/core/scenario/scripting/assertion/lexer/lexer.go",
"chars": 4462,
"preview": "package lexer\n\nimport (\n\t\"strings\"\n\n\t\"go.ddosify.com/ddosify/core/scenario/scripting/assertion/token\"\n)\n\ntype Lexer stru"
},
{
"path": "ddosify_engine/core/scenario/scripting/assertion/lexer/lexer_test.go",
"chars": 6759,
"preview": "package lexer\n\nimport (\n\t\"testing\"\n\n\t\"go.ddosify.com/ddosify/core/scenario/scripting/assertion/token\"\n)\n\nfunc TestNextTo"
},
{
"path": "ddosify_engine/core/scenario/scripting/assertion/parser/parser.go",
"chars": 8479,
"preview": "package parser\n\nimport (\n\t\"fmt\"\n\t\"strconv\"\n\n\t\"go.ddosify.com/ddosify/core/scenario/scripting/assertion/ast\"\n\t\"go.ddosify"
},
{
"path": "ddosify_engine/core/scenario/scripting/assertion/parser/parser_test.go",
"chars": 13253,
"preview": "package parser\n\nimport (\n\t\"fmt\"\n\t\"testing\"\n\n\t\"go.ddosify.com/ddosify/core/scenario/scripting/assertion/ast\"\n\t\"go.ddosify"
},
{
"path": "ddosify_engine/core/scenario/scripting/assertion/test_files/a.txt",
"chars": 3,
"preview": "abc"
},
{
"path": "ddosify_engine/core/scenario/scripting/assertion/test_files/currencies.json",
"chars": 288,
"preview": "[\n \"AED\",\n \"ARS\",\n \"AUD\",\n \"BGN\",\n \"BHD\",\n \"BRL\",\n \"CAD\",\n \"CHF\",\n \"CNY\",\n \"DKK\",\n \"DZD"
},
{
"path": "ddosify_engine/core/scenario/scripting/assertion/test_files/jsonArray.json",
"chars": 13,
"preview": "[\"xyz\",\"abc\"]"
},
{
"path": "ddosify_engine/core/scenario/scripting/assertion/test_files/jsonMap.json",
"chars": 83,
"preview": "{\n \"ask\": 130.75, \n \"askSize\": 10, \n \"averageAnalystRating\": \"2.0 - Buy\"\n}"
},
{
"path": "ddosify_engine/core/scenario/scripting/assertion/test_files/number.json",
"chars": 1,
"preview": "5"
},
{
"path": "ddosify_engine/core/scenario/scripting/assertion/token/token.go",
"chars": 915,
"preview": "package token\n\ntype TokenType string\ntype Token struct {\n\tType TokenType\n\tLiteral string\n}\n\nconst (\n\tILLEGAL = \"ILLEG"
},
{
"path": "ddosify_engine/core/scenario/scripting/extraction/base.go",
"chars": 3463,
"preview": "package extraction\n\nimport (\n\t\"errors\"\n\t\"fmt\"\n\t\"net/http\"\n\n\t\"go.ddosify.com/ddosify/core/types\"\n)\n\nfunc Extract(source i"
},
{
"path": "ddosify_engine/core/scenario/scripting/extraction/base_test.go",
"chars": 1877,
"preview": "package extraction\n\nimport (\n\t\"errors\"\n\t\"net/http\"\n\t\"runtime\"\n\t\"testing\"\n\n\t\"go.ddosify.com/ddosify/core/types\"\n)\n\nfunc T"
},
{
"path": "ddosify_engine/core/scenario/scripting/extraction/html.go",
"chars": 1010,
"preview": "package extraction\n\nimport (\n\t\"bytes\"\n\t\"fmt\"\n\n\t\"github.com/antchfx/htmlquery\"\n)\n\ntype htmlExtractor struct {\n}\n\nfunc (xe"
},
{
"path": "ddosify_engine/core/scenario/scripting/extraction/html_test.go",
"chars": 2560,
"preview": "package extraction\n\nimport (\n\t\"fmt\"\n\t\"strings\"\n\t\"testing\"\n)\n\nfunc TestHtmlExtraction(t *testing.T) {\n\texpected := \"Html "
},
{
"path": "ddosify_engine/core/scenario/scripting/extraction/json.go",
"chars": 2154,
"preview": "package extraction\n\nimport (\n\t\"encoding/json\"\n\t\"fmt\"\n\t\"strings\"\n\n\t\"github.com/tidwall/gjson\"\n)\n\ntype jsonExtractor struc"
},
{
"path": "ddosify_engine/core/scenario/scripting/extraction/json_test.go",
"chars": 7778,
"preview": "package extraction\n\nimport (\n\t\"encoding/json\"\n\t\"reflect\"\n\t\"strings\"\n\t\"testing\"\n)\n\nfunc TestJsonExtract_String(t *testing"
},
{
"path": "ddosify_engine/core/scenario/scripting/extraction/regex.go",
"chars": 854,
"preview": "package extraction\n\nimport (\n\t\"fmt\"\n\t\"regexp\"\n)\n\ntype regexExtractor struct {\n\tr *regexp.Regexp\n}\n\nfunc (ri *regexExtrac"
},
{
"path": "ddosify_engine/core/scenario/scripting/extraction/regex_test.go",
"chars": 775,
"preview": "package extraction\n\nimport (\n\t\"strings\"\n\t\"testing\"\n)\n\nfunc TestRegexExtractFromString(t *testing.T) {\n\tregex := \"[a-z]+_"
},
{
"path": "ddosify_engine/core/scenario/scripting/extraction/xml.go",
"chars": 984,
"preview": "package extraction\n\nimport (\n\t\"bytes\"\n\t\"fmt\"\n\n\t\"github.com/antchfx/xmlquery\"\n)\n\ntype xmlExtractor struct {\n}\n\nfunc (xe x"
},
{
"path": "ddosify_engine/core/scenario/scripting/extraction/xml_test.go",
"chars": 1841,
"preview": "package extraction\n\nimport (\n\t\"fmt\"\n\t\"strings\"\n\t\"testing\"\n)\n\nfunc TestXmlExtraction(t *testing.T) {\n\texpected := \"XML Ti"
},
{
"path": "ddosify_engine/core/scenario/scripting/injection/dynamic_test.go",
"chars": 230,
"preview": "package injection\n\nimport (\n\t\"testing\"\n)\n\nfunc TestDynamicVariableRace(t *testing.T) {\n\tnum := 10\n\tei := EnvironmentInje"
},
{
"path": "ddosify_engine/core/scenario/scripting/injection/environment.go",
"chars": 13183,
"preview": "package injection\n\nimport (\n\t\"encoding/json\"\n\t\"fmt\"\n\t\"io\"\n\t\"math/rand\"\n\t\"os\"\n\t\"reflect\"\n\t\"regexp\"\n\t\"sort\"\n\t\"strings\"\n\t\"s"
},
{
"path": "ddosify_engine/core/scenario/scripting/injection/environment_dynamic.go",
"chars": 1252,
"preview": "package injection\n\nimport (\n\t\"encoding/json\"\n\t\"fmt\"\n\t\"reflect\"\n\n\t\"go.ddosify.com/ddosify/core/types/regex\"\n)\n\nfunc (ei *"
},
{
"path": "ddosify_engine/core/scenario/scripting/injection/environment_test.go",
"chars": 20557,
"preview": "package injection\n\nimport (\n\t\"bytes\"\n\t\"encoding/json\"\n\t\"fmt\"\n\t\"io\"\n\t\"os\"\n\t\"reflect\"\n\t\"testing\"\n\n\t\"github.com/google/uuid"
},
{
"path": "ddosify_engine/core/scenario/scripting/injection/init.go",
"chars": 7160,
"preview": "package injection\n\nimport \"github.com/ddosify/go-faker/faker\"\n\nvar dynamicFakeDataMap map[string]interface{}\nvar dataFak"
},
{
"path": "ddosify_engine/core/scenario/service.go",
"chars": 9557,
"preview": "/*\n*\n*\tDdosify - Load testing tool for any web system.\n* Copyright (C) 2021 Ddosify (https://ddosify.com)\n*\n* This "
},
{
"path": "ddosify_engine/core/scenario/service_test.go",
"chars": 18496,
"preview": "/*\n*\n*\tDdosify - Load testing tool for any web system.\n* Copyright (C) 2021 Ddosify (https://ddosify.com)\n*\n* This "
},
{
"path": "ddosify_engine/core/types/error.go",
"chars": 2724,
"preview": "/*\n*\n*\tDdosify - Load testing tool for any web system.\n* Copyright (C) 2021 Ddosify (https://ddosify.com)\n*\n* This "
},
{
"path": "ddosify_engine/core/types/hammer.go",
"chars": 5047,
"preview": "/*\n*\n*\tDdosify - Load testing tool for any web system.\n* Copyright (C) 2021 Ddosify (https://ddosify.com)\n*\n* This "
},
{
"path": "ddosify_engine/core/types/hammer_test.go",
"chars": 7378,
"preview": "/*\n*\n*\tDdosify - Load testing tool for any web system.\n* Copyright (C) 2021 Ddosify (https://ddosify.com)\n*\n* This "
},
{
"path": "ddosify_engine/core/types/regex/regex.go",
"chars": 248,
"preview": "package regex\n\nconst DynamicVariableRegex = `\\{{(_)[^}]+\\}}`\nconst JsonDynamicVariableRegex = `\\\"{{(_)[^}]+\\}}\"`\n\nconst "
},
{
"path": "ddosify_engine/core/types/regex/regex_test.go",
"chars": 2613,
"preview": "package regex\n\nimport (\n\t\"regexp\"\n\t\"testing\"\n)\n\nfunc TestDynamicVariableRegex(t *testing.T) {\n\tre := regexp.MustCompile("
},
{
"path": "ddosify_engine/core/types/response.go",
"chars": 2433,
"preview": "/*\n*\n*\tDdosify - Load testing tool for any web system.\n* Copyright (C) 2021 Ddosify (https://ddosify.com)\n*\n* This "
},
{
"path": "ddosify_engine/core/types/scenario.go",
"chars": 10075,
"preview": "/*\n*\n*\tDdosify - Load testing tool for any web system.\n* Copyright (C) 2021 Ddosify (https://ddosify.com)\n*\n* This "
},
{
"path": "ddosify_engine/core/types/scenario_test.go",
"chars": 4350,
"preview": "package types\n\nimport (\n\t\"crypto/tls\"\n\t\"crypto/x509\"\n\t\"errors\"\n\t\"net/http\"\n\t\"testing\"\n)\n\nfunc TestScenarioStepValid_EnvV"
},
{
"path": "ddosify_engine/core/util/buffer_pool.go",
"chars": 748,
"preview": "package util\n\nimport (\n\t\"bytes\"\n\t\"errors\"\n)\n\n// Factory is a function to create new connections.\ntype BufferFactoryMetho"
},
{
"path": "ddosify_engine/core/util/helper.go",
"chars": 1250,
"preview": "/*\n*\n*\tDdosify - Load testing tool for any web system.\n* Copyright (C) 2021 Ddosify (https://ddosify.com)\n*\n* This "
},
{
"path": "ddosify_engine/core/util/pool.go",
"chars": 813,
"preview": "package util\n\ntype Pool[T any] struct {\n\tItems chan T\n\tFactory func() T\n\tClose func(T)\n\tAfterPut func(T)\n}\n\nfunc "
},
{
"path": "ddosify_engine/go.mod",
"chars": 1265,
"preview": "module go.ddosify.com/ddosify\n\ngo 1.18\n\nrequire (\n\tgithub.com/antchfx/xmlquery v1.3.13\n\tgithub.com/asaskevich/govalidato"
},
{
"path": "ddosify_engine/go.sum",
"chars": 10744,
"preview": "github.com/antchfx/htmlquery v1.3.0 h1:5I5yNFOVI+egyia5F2s/5Do2nFWxJz41Tr3DyfKD25E=\ngithub.com/antchfx/htmlquery v1.3.0/"
},
{
"path": "ddosify_engine/main.go",
"chars": 7681,
"preview": "/*\n*\n*\tDdosify - Load testing tool for any web system.\n* Copyright (C) 2021 Ddosify (https://ddosify.com)\n*\n* This "
},
{
"path": "ddosify_engine/main_benchmark_test.go",
"chars": 9385,
"preview": "//go:build linux || darwin\n// +build linux darwin\n\n/*\n*\n*\tDdosify - Load testing tool for any web system.\n* Copyright "
},
{
"path": "ddosify_engine/main_exit_test.go",
"chars": 1715,
"preview": "//go:build linux || darwin\n// +build linux darwin\n\n/*\n*\n*\tDdosify - Load testing tool for any web system.\n* Copyright "
},
{
"path": "ddosify_engine/main_test.go",
"chars": 17332,
"preview": "/*\n*\n*\tDdosify - Load testing tool for any web system.\n* Copyright (C) 2021 Ddosify (https://ddosify.com)\n*\n* This "
},
{
"path": "ddosify_engine/scripts/install.sh",
"chars": 1637,
"preview": "#!/bin/sh\n\nuname_arch() {\n arch=$(uname -m)\n case $arch in\n x86_64) arch=\"amd64\" ;;\n x86) arch=\"386\" ;;\n i686"
},
{
"path": "ddosify_engine/scripts/testing/benchstat.sh",
"chars": 1101,
"preview": "#!/bin/bash\nset -e\nLIMIT=15\nIS_FAILED=0\ntime_op=$(grep -A1 'time/op' gobench_branch_result.txt |tail -1 | awk '{NF--;NF-"
},
{
"path": "selfhosted/README.md",
"chars": 1469,
"preview": "<div align=\"center\">\n <img src=\"https://raw.githubusercontent.com/getanteon/anteon/master/assets/anteon-logo-db.svg#g"
},
{
"path": "selfhosted/VERSION",
"chars": 5,
"preview": "2.6.4"
},
{
"path": "selfhosted/docker-compose.yml",
"chars": 6817,
"preview": "version: '3.8'\n\nservices:\n nginx:\n image: nginx:1.25.5-alpine\n ports:\n - '8014:80'\n volumes:\n - ./ng"
},
{
"path": "selfhosted/init_scripts/influxdb/01_influxdb_create_buckets.sh",
"chars": 133,
"preview": "#!/bin/bash\nset -e\n\ninflux bucket create -n hammerBucketDetailed -o ddosify\ninflux bucket create -n hammerBucketIteratio"
},
{
"path": "selfhosted/init_scripts/postgres/01_postgres_create_dbs.sql",
"chars": 85,
"preview": "CREATE DATABASE backend;\nCREATE DATABASE alazbackend;\nCREATE DATABASE hammermanager;\n"
},
{
"path": "selfhosted/init_scripts/prometheus/prometheus.yml",
"chars": 361,
"preview": "global:\n scrape_interval: 10s\n evaluation_interval: 10s\n\nalerting:\n alertmanagers:\n - static_configs:\n - ta"
},
{
"path": "selfhosted/install.sh",
"chars": 3030,
"preview": "#!/bin/bash\n\nset -e\n\necho \"⚡ Installing Anteon Self Hosted...\"\n\necho \"🔍 Checking prerequisites...\"\n\n# Function to check "
},
{
"path": "selfhosted/nginx/default_reverseproxy.conf",
"chars": 1155,
"preview": "upstream frontend {\n server frontend:3000;\n}\n\nupstream backend {\n server backend:8008;\n}\n\nupstream alaz-backend {\n"
}
]
About this extraction
This page contains the full source code of the getanteon/anteon GitHub repository, extracted and formatted as plain text for AI agents and large language models (LLMs). The extraction includes 173 files (710.9 KB), approximately 214.5k tokens, and a symbol index with 793 extracted functions, classes, methods, constants, and types. Use this with OpenClaw, Claude, ChatGPT, Cursor, Windsurf, or any other AI tool that accepts text input. You can copy the full output to your clipboard or download it as a .txt file.
Extracted by GitExtract — free GitHub repo to text converter for AI. Built by Nikandr Surkov.