Last active
December 27, 2022 19:22
-
-
Save Splint3r7/aaf8b43bf8473b4849a637ba6cda23ea to your computer and use it in GitHub Desktop.
bash script to genereate a firewall rule for CloudFlare WAF
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 | |
filename=$1 | |
output_str="(" | |
while read -r line; do | |
output_str+="ip.src eq $line) or (" | |
done < "$filename" | |
output_str=${output_str% or (*} | |
echo -e "$output_str" |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment