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
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) { |
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
#!/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 and remove the trailing newline | |
ranges4=$(curl -s https://www.cloudflare.com/ips-v4 | head -c -1) | |
ranges6=$(curl -s https://www.cloudflare.com/ips-v6 | head -c -1) |