Skip to content

Instantly share code, notes, and snippets.

View Vladimir-Urik's full-sized avatar
:shipit:
Crazy factor

Vladimír Urík Vladimir-Urik

:shipit:
Crazy factor
View GitHub Profile
@Vladimir-Urik
Vladimir-Urik / iptables.sh
Created March 1, 2022 20:05 — forked from einyx/iptables.sh
Anti DDos kernel settings
### 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 ###
package cz.pvpcraft.gggedr.stats.common.utils;
public class ValidatorUtils {
public static boolean isInteger(String s) {
try {
Integer.parseInt(s);
} catch (NumberFormatException e) {
return false;
}
@Vladimir-Urik
Vladimir-Urik / BukkitSerialization.java
Created October 26, 2021 18:23 — forked from graywolf336/BukkitSerialization.java
Serialize and deserialize the player's inventory, including armor and content.
/**
* Converts the player inventory to a String array of Base64 strings. First string is the content and second string is the armor.
*
* @param playerInventory to turn into an array of strings.
* @return Array of strings: [ main content, armor content ]
* @throws IllegalStateException
*/
public static String[] playerInventoryToBase64(PlayerInventory playerInventory) throws IllegalStateException {
//get the main content part, this doesn't return the armor
String content = toBase64(playerInventory);
@Vladimir-Urik
Vladimir-Urik / README.md
Created September 10, 2021 05:34 — forked from Aurelien30000/README.md
A simple tool to manage scoreboards in minecraft (lines up to 48 characters !). This Fork uses ProtocolLib and is therefore compatible with 1.13.x - 1.16.x. To use it in your project, you need to use ProtocolLib as a dependency!

ScoreboardSign


package xyz.gggedr.xseries.apix.logs;
import lombok.Getter;
import java.util.List;
public enum Ascii {
A(" ",
" /\\ ",