WIF = base58check encode ([version byte][private key][checksum])
version byte = 80 for mainnet, ef for testnet and regtest
checksum = first 4 bytes of double SHA256 of private key
This file contains hidden or 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 | |
| explorer_height=$(curl -s https://explorer.gravium.io/api/getblockcount) | |
| latest_hash=$(curl -s https://explorer.gravium.io/api/getblockhash?index=$explorer_height) | |
| block_to_check=$((explorer_height - 3)) | |
| explorer_hash=$(curl -s https://explorer.gravium.io/api/getblockhash?index=$block_to_check) | |
| # environment setup, make it pretty | |
| tred=$(tput setaf 1); tgreen=$(tput setaf 2); tyellow=$(tput setaf 3); tblue=$(tput setaf 4); tmagenta=$(tput setaf 5); tcyan=$(tput setaf 6); treset=$(tput sgr0); tclear=$(tput clear); twbg=$(tput setab 7) |
This is a simple action for fail2ban that uses Cloudflare's API for Rules & Filters to block IP Addresses.
Usage is simple:
-
Add an IP address to the rule/filter:
./fail2cloudflare.py add <ip> -
Delete an IP address from the rule/filter:
Cloudflare doesn't allow disabling IPv6 via their Dashboard any more. This works:
curl -X PATCH "https://api.cloudflare.com/client/v4/zones/<zone-id>/settings/ipv6" \
-H "X-Auth-Email: <email>" \
-H "X-Auth-Key: <auth-key>" \
-H "Content-Type: application/json" \
--data '{"value":"off"}'
Simple Python script to set all downloaded movies to unmonitored after X days (default 30).
Edit the APIKEY, URL and DAYS to your liking. Run on a daily/weekly basis.
This file contains hidden or 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 | |
| # simple one-liner to update the cloudflare IPs for `set_real_ip_from` | |
| { curl -s https://www.cloudflare.com/ips-v4; echo; curl -s https://www.cloudflare.com/ips-v6; } | sed '/^$/d' | sed 's/^/set_real_ip_from /' | sed 's/$/;/' |
OlderNewer