Skip to content

Instantly share code, notes, and snippets.

@magenx
Created July 28, 2013 21:14
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save magenx/6100271 to your computer and use it in GitHub Desktop.
Save magenx/6100271 to your computer and use it in GitHub Desktop.
cat iptocf.txt
27.153.185.20
220.168.125.60
202.101.111.137
.....
#!/bin/bash
ACCOUNT=my@gmail.com
TOKEN=KS0gkGo9QxKzgMBHKqUK5eacrxva1Zux
FILE=iptocf.txt
while read IPTOCF; do
curl -s "https://www.cloudflare.com/api.html?a=ban&key=${IPTOCF}&u=${ACCOUNT}&tkn=${TOKEN}"
done < $FILE
@magenx
Copy link
Author

magenx commented Feb 20, 2015

#!/bin/bash 
curl -s "https://www.cloudflare.com/api.html?a=ban&key=$1&u={ACCOUNT}&tkn={TOKEN}"

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment