Skip to content

Instantly share code, notes, and snippets.

package me.sheidy.mfgparse;
import java.nio.file.Files;
import java.nio.file.Paths;
import java.util.LinkedHashMap;
import java.util.Map;
public class ParseMfgData {
public static Map<String, byte[]> parseMfgData(byte[] data) {
@OopsieWoopsie
OopsieWoopsie / cloudflare.sh
Last active April 8, 2026 15:34
Only allow CloudFlare connections to your web server
#!/bin/bash
# This script downloads the actual list of CloudFlare's IPv4/6 ranges
# and allows them to connect to the 443 port (HTTPS) and drops
# connections from other addresses.
# This is to prevent DDoS attacks and attackers from using the "Host"
# header to identify your server backend address.
# download the lists
ranges4=$(curl -s https://www.cloudflare.com/ips-v4)
ranges6=$(curl -s https://www.cloudflare.com/ips-v6)