Skip to content

Instantly share code, notes, and snippets.

View MegaManSec's full-sized avatar
💭
currently pouring soup

Joshua Rogers MegaManSec

💭
currently pouring soup
View GitHub Profile
@MegaManSec
MegaManSec / waf.sh
Last active January 7, 2024 14:12
We were suffering a fairly large HTTP ddos, that would try and create vBulletin forum accounts, causing huge overhead with mysql, php, and apache. This was one of the solutions to that.
#!/bin/bash
#We were suffering a fairly large HTTP ddos, that would try and create vBulletin forum accounts, causing huge overhead with mysql, php, and apache.
#This script will ban anyone that goes to the pages $BADLIST more than $REGLIMIT
#It will also rename a file if it has been gone to more than $LIMIT times
#then it will add a redirect in htaccess
#what files we match (must end with .php$)
FPAT='^\/+[^/]+\.php$'
@MegaManSec
MegaManSec / diff.diff
Last active January 7, 2024 14:11
Teeworlds BBM Mod Trunk
diff -Naur Coding/teeworlds/src/banmaster/banmaster.cpp BBM/src/banmaster/banmaster.cpp
--- Coding/teeworlds/src/banmaster/banmaster.cpp 1970-01-01 10:00:00.000000000 +1000
+++ BBM/src/banmaster/banmaster.cpp 2011-02-15 23:07:48.040565002 +1100
@@ -0,0 +1,250 @@
+/* (c) Magnus Auvinen. See licence.txt in the root of the distribution for more information. */
+/* If you are missing that file, acquire a complete release at teeworlds.com. */
+#include <base/system.h>
+#include <engine/shared/network.h>
+#include <engine/console.h>
+#include <engine/storage.h>
@MegaManSec
MegaManSec / diff.diff
Last active January 7, 2024 14:11
Teeworlds 0.5.2 BBM mod patch
diff -Naur Coding/teeworlds-0.5.2-src/src/engine/e_config_variables.h BlockMod/src/engine/e_config_variables.h
--- Coding/teeworlds-0.5.2-src/src/engine/e_config_variables.h 2009-10-26 19:04:30.000000000 +1100
+++ BlockMod/src/engine/e_config_variables.h 2010-11-28 01:39:58.000000000 +1100
@@ -27,6 +27,12 @@
MACRO_CONFIG_INT(b_filter_pure_map, 1, 0, 1, CFGFLAG_SAVE|CFGFLAG_CLIENT, "Filter out non-standard maps in browser")
MACRO_CONFIG_INT(b_filter_compatversion, 1, 0, 1, CFGFLAG_SAVE|CFGFLAG_CLIENT, "Filter out non-compatible servers in browser")
+MACRO_CONFIG_INT(sv_max_connections, 2, 1, 16, CFGFLAG_SERVER, "Maximum count of connection from one IP server can accept")
+MACRO_CONFIG_INT(sv_rcon_tries, 5, 0, 100, CFGFLAG_SERVER, "How Many Password Tries Before ban")
+MACRO_CONFIG_INT(sv_rcon_tries_bantime, 300, 0, 9999, CFGFLAG_SERVER, "How Much time will the brute rcon password attacker will be banned")