Skip to content

Instantly share code, notes, and snippets.

@buzzkillb
buzzkillb / addrgen
Created May 4, 2020 21:18 — forked from JBaczuk/addrgen
addrgen
#!/bin/bash
echo
echo "Welcome to the Bitcoin address generator!"
echo "input private key (32 bytes, hex format)"
read priv
echo ""
echo "#####################################"
# priv=0C28FCA386C7A227600B2FE50B7CAE11EC86D3BF1FBE471BE89827E19D72AA1D # Testing only
@buzzkillb
buzzkillb / bitcoin_connection.py
Created May 17, 2020 08:24 — forked from sappelt/bitcoin_connection.py
How to establish a connection to the bitcoin manually. Peer discovery + connecting and sending version message
# Import requests and regex library
import requests
import re
def get_external_ip():
# Make a request to checkip.dyndns.org as proposed
# in https://en.bitcoin.it/wiki/Satoshi_Client_Node_Discovery#DNS_Addresses
response = requests.get('http://checkip.dyndns.org').text
# Filter the response with a regex for an IPv4 address
#!/bin/bash
#COLORS
BLUE='\033[0;34m'
CYAN='\033[0;36m'
GREEN='\033[0;32m'
RED='\033[0;31m'
NC='\033[0m' # No Color
#FUNCTIONS
#########
# Remove the # from the UFW lines to make this fully work
#########
#!/bin/bash
. config.conf
. rpc.sh
wallet_ip=$(rpc_get_peerinfo | jq -r '.[].addr' | awk '!seen[$0]++')
while IFS= read -r
#!/bin/bash
#Revolver - Cycle through single daemon to ping the network as fast as possible
#genkeylist.txt is a copy of your masternode.conf or fortunastake.conf in same directory this script runs from
# daemon location
denariusdaemon=/usr/local/bin/denariusd
# debug.log location
debuglog=~/.denarius/debug.log
# denarius.conf location
denariusconf=~/.denarius/denarius.conf
#!/bin/bash
##Destruction.sh - checks balances and removes any addresses from dumpwallet.txt with 0 inputs
#"dumpwallet dumpwallet.txt" and put in same directory as this script
#then run this script
#might want staking=0 in denarius.conf until everything is done
#stop wallet, move wallet.dat to wallet.bak, open wallet, "importwallet cleaned.txt"
#wait for rescan, "tail -f debug.log" to watch
#once your balance shows up, stop wallet, staking=1, start wallet
#DONE
#requires config.conf and rpc.sh from https://github.com/buzzkillb/bash-denariusrpc
#!/bin/bash
#Convert seed.txt into dumpwallet.txt to import into QT/daemon
#requires seed.txt generated from bip39 tool https://iancoleman.io/bip39/
#create by cloning above bip39 tool to run locally
#select coin - DNR, 24 words - click generate
#scroll down to table view, copy and paste as many addresses as you want
#copy that into seed.txt
#run and spits out a dumpwallet.txt, use importwallet dumpwallet.txt to bring your addy's in
#be aware non HD wallets, change addresses may or may not use these addys
#need more testing (obviously copy your seed phrase to get these privkeys whenevers)
#!/bin/bash
#Denarius 5000 FortunaStake Collateral Staker
. config.conf
. rpc.sh
#daemon location
denariusdaemon=/usr/local/bin/denariusd
#debug.log location
debuglog=~/.denarius/debug.log
import os
import ecdsa
import hashlib
import base58
import binascii
import codecs
import struct
#Use Python3
#Crude Denarius address to scripthash converter for electrumx talking
import struct
import base58
import hashlib
import ecdsa
import codecs
import binascii
from hashlib import sha256
#For Python 3, tested on stock ubuntu 20.04
#pip3 install each import above