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 | |
BLOCKCHAININFO=$(bitcoin-cli getblockchaininfo) | |
TAPROOT=$(echo "$BLOCKCHAININFO" | jq .softforks.taproot.bip9) | |
SINCE=$(echo "$TAPROOT" | jq .since) | |
ELAPSED=$(echo "$TAPROOT" | jq .statistics.elapsed) | |
for BLOCK in $(seq "$SINCE" $((SINCE + ELAPSED - 1))); do | |
HASH=$(bitcoin-cli getblockhash "$BLOCK") | |
HEADER=$(bitcoin-cli getblockheader "$HASH") | |
VERSION=$(echo "$HEADER" | jq .version) | |
SIGNAL=$(((VERSION & 3758096388) == 536870916)) |
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
# Source: | |
# https://www.cloudflare.com/ips | |
# https://support.cloudflare.com/hc/en-us/articles/200169166-How-do-I-whitelist-CloudFlare-s-IP-addresses-in-iptables- | |
for i in `curl https://www.cloudflare.com/ips-v4`; do iptables -I INPUT -p tcp -m multiport --dports http,https -s $i -j ACCEPT; done | |
for i in `curl https://www.cloudflare.com/ips-v6`; do ip6tables -I INPUT -p tcp -m multiport --dports http,https -s $i -j ACCEPT; done | |
# Avoid racking up billing/attacks | |
# WARNING: If you get attacked and CloudFlare drops you, your site(s) will be unreachable. | |
iptables -A INPUT -p tcp -m multiport --dports http,https -j DROP |
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
# | |
# | |
# The Seedbox From Scratch Script | |
# By Notos ---> https://github.com/Notos/ | |
# | |
# | |
###################################################################### | |
# | |
# Copyright (c) 2013 Notos (https://github.com/Notos/) | |
# |
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
<?php | |
$transaction_id = $argv[1]; | |
$url = "https://blockchain.info/tx/$transaction_id?show_adv=true&format=json"; | |
$result = file_get_contents($url); | |
$resultJSON = json_decode($result, true); | |
function hex2str($hex) { | |
$str = ''; | |
for($i=0;$i<strlen($hex);$i+=2) $str .= chr(hexdec(substr($hex,$i,2))); | |
return $str; | |
} |
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
#### | |
# Install magneticod go-rewrite on a brand new scaleway ubuntu 16.04 instance | |
#### | |
apt-get update && apt-get -y upgrade | |
apt-get install -y software-properties-common python-software-properties git trickle | |
add-apt-repository ppa:gophers/archive | |
apt update | |
apt-get -y install golang-1.9-go | |
mkdir -p $HOME/go/src | |
cd $HOME/go/src |
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
#!/usr/bin/env bash | |
# pomf.se uploader | |
# requires: curl | |
dest_url='http://pomf.se/upload.php' | |
return_url='http://a.pomf.se' | |
if [[ -n "${1}" ]]; then | |
file="${1}" | |
if [ -f "${file}" ]; then |
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/env python | |
import json | |
import logging | |
import sys | |
import os | |
from six.moves import configparser | |
from datetime import datetime, timedelta | |
''' | |
Usage: |
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
var crypto = require('crypto'); | |
var key = 'MySecretKey12345'; | |
var iv = '1234567890123456'; | |
var cipher = crypto.createCipheriv('aes-128-cbc', key, iv); | |
var decipher = crypto.createDecipheriv('aes-128-cbc', key, iv); | |
var text = 'plain text'; | |
var encrypted = cipher.update(text, 'utf8', 'binary'); | |
encrypted += cipher.final('binary'); | |
hexVal = new Buffer(encrypted, 'binary'); |
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 | |
# Script that attempts to create a tunnel for Usenet (NNTP) to pass through | |
# This script: creates a tunnel, assigns the host address to local address in /etc/hosts | |
# For Mac OS X | |
### CONFIGURATION ### | |
SERVER='your.nntp.server' | |
PORT='your.nntp.port' | |
LOCAL='127.0.0.1' | |
USER='root' | |
HOST='your.ssh.server' |
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
dGVzdDIwMTYtMTEtMDUgMTc6MzQ6MTAsNzI5fDgzQkQyMDJFNEExN0RGQzJFRDRDRUZBOEVFMkU5RTE4RDU1QzQ1OEZ8MjEzLjQ3LjE1Mi41OTo2ODgxCjIwMTYtMTEtMDUgMTc6MzQ6MTEsMDY4fDNEODMzMUVFRjZEQzg5NEMzNUE3M0M0MDcyNkUwODVFQTI5M0QwREN8ODguMjAzLjE3MC4xNzoyMTMzNgoyMDE2LTExLTA1IDE3OjM0OjExLDE4OHxEQTQ4M0I4ODA0QTI3NjU3NDBGMkZEN0YwQkQ3RTA5Q0I0NDg1M0JCfDg2LjYxLjI2LjE3OjUxNDEzCjIwMTYtMTEtMDUgMTc6MzQ6MTEsMTg4fERBNDgzQjg4MDRBMjc2NTc0MEYyRkQ3RjBCRDdFMDlDQjQ0ODUzQkJ8ODYuNjEuMjYuMTc6NTE0MTMKMjAxNi0xMS0wNSAxNzozNDoxMSwyNTF8OTIzMkQ3QUQ4RjIzQkE5Q0E5ODZERTJDRjA4Qzk4OUZBN0NGMUVBMnw0Ni4xNDguOTYuMTk2OjU5Mzg2CjIwMTYtMTEtMDUgMTc6MzQ6MTEsNzQ3fDc2QjAxMEUxNkNENkFFNTI5MDQ5RjFFNTAwMDA2NzdGMDAwMD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