sysctl -w fs.file-max=12000500
sysctl -w fs.nr_open=20000500
# Set the maximum number of open file descriptors
ulimit -n 20000000
# Set the memory size for TCP with minimum, default and maximum thresholds
sysctl -w net.ipv4.tcp_mem='10000000 10000000 10000000'
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
cd /usr/src/ | |
git clone https://github.com/expressif/pecl-event-libevent.git | |
cd pecl-event-libevent | |
phpize | |
./configure | |
make && sudo make install | |
sudo apt update | |
sudo apt install php7.4-dev libevent-dev |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env php | |
<?php | |
/** | |
* GeoIP Legacy Download & Updated from https://www.miyuru.lk/geoiplegacy | |
* Change $path or put on /usr/share/GeoIP | |
* This script will replace GeoIP.dat, GeoIPCity.dat & GeoIPASNum.dat | |
* NGINX CONFIG: | |
http { | |
.... // etc | |
geoip_country /usr/share/GeoIP/GeoIP.dat; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
function execute(action, callback) { | |
// create real promise, because execute method does not return the real one | |
// (missing documentation what actually returns) | |
const promise = new Promise((resolve, reject) => { | |
grecaptcha.ready(() => | |
grecaptcha.execute(key, { action }).then(token => { | |
resolve(token); | |
}, | |
reject) | |
); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
DEV=eth0 | |
PORT=80 | |
### Use SYNPROXY ### | |
/sbin/iptables -t raw -A PREROUTING -i $DEV -p tcp -m tcp --syn --dport $PORT -j CT --notrack | |
/sbin/iptables -t mangle -A INPUT -i $DEV -p tcp -m conntrack --ctstate INVALID,UNTRACKED --dport $PORT -j SYNPROXY \ | |
--sack-perm --timestamp --wscale 7 --mss 1460 | |
/sbin/iptables -t mangle -A INPUT -i $DEV -p tcp -m conntrack --ctstate INVALID --dport $PORT -j DROP |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include <linux/bpf.h> | |
#include <linux/in.h> | |
#include <linux/if_ether.h> | |
#include <linux/ip.h> | |
#define SEC(NAME) __attribute__((section(NAME), used)) | |
SEC("dropper_main") | |
int dropper(struct xdp_md *ctx) { | |
int ipsize = 0; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
### 1: Drop invalid packets ### | |
/sbin/iptables -t mangle -A PREROUTING -m conntrack --ctstate INVALID -j DROP | |
### 2: Drop TCP packets that are new and are not SYN ### | |
/sbin/iptables -t mangle -A PREROUTING -p tcp ! --syn -m conntrack --ctstate NEW -j DROP | |
### 3: Drop SYN packets with suspicious MSS value ### | |
/sbin/iptables -t mangle -A PREROUTING -p tcp -m conntrack --ctstate NEW -m tcpmss ! --mss 536:65535 -j DROP | |
### 4: Block packets with bogus TCP flags ### |
Collecting popup/popunder scripts.
Obnoxious ones
- dai0eej.bid, found in
http://www.nowvideo.li/video/81e35ec6727ee
- onclasrv.com, found in
https://thehiddenbay.xyz/
Ordinary ones
- watchmygf.me, found in
http://www.watchmygf.me/
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
ffprobe -of compact -select_streams v -show_packets [VIDEO_FILE OR STREAM_URL] | grep K$ | awk 'BEGIN{FS="|";last=-1}{split($5,a,"="); if(last != -1) {print "Keframe pos: " a[2] ", Interval: " a[2]-last " seconds"} else {print "Keyframe: " a[2]}; last=a[2]}' |
NewerOlder