13 lines
452 B
Bash
Executable File
13 lines
452 B
Bash
Executable File
#!/bin/sh
|
|
|
|
set -eu
|
|
|
|
dir_path="$(dirname "$0")"
|
|
|
|
mkdir -p "$dir_path/../data"
|
|
wget -O "$dir_path/../data/cf_ips_v4.txt" https://www.cloudflare.com/ips-v4
|
|
wget -O "$dir_path/../data/cf_ips_v6.txt" https://www.cloudflare.com/ips-v6
|
|
echo "\n" >> "$dir_path/../data/cf_ips_v4.txt"
|
|
cat "$dir_path/../data/cf_ips_v4.txt" "$dir_path/../data/cf_ips_v6.txt" > "$dir_path/../data/cf_ips.txt"
|
|
rm "$dir_path/../data/cf_ips_v4.txt" "$dir_path/../data/cf_ips_v6.txt"
|