Skip to content

Instantly share code, notes, and snippets.

View cprkrn's full-sized avatar
💭
SUP

Soup cprkrn

💭
SUP
  • 40.0150° N, 105.2705° W
View GitHub Profile
@callebtc
callebtc / nutshell-minimal.py
Last active December 4, 2023 00:59
Nutshell: Mint a Cashu token
import asyncio
from cashu.wallet.wallet import Wallet
from cashu.core.settings import settings
async def main():
settings.tor = False
wallet = await Wallet.with_db(
url="http://mint.url:3338",
db="wallet_db_path",
@laanwj
laanwj / blocktoimg.py
Last active January 31, 2024 11:06
tools to write (block) data to png files and vice versa
#!/usr/bin/env python3
# Distributed under the MIT software license
import binascii, struct, sys, io, argparse
from PIL import Image
IMG_WIDTH = 512 # could be made adaptive...
MIN_HEIGHT = 4 # minimum height of image; twitter won't let us upload anything smaller
BYTES_PER_PIXEL = 4 # RGBA, 8 bit
def div_roundup(x,y):

Vulnerabilities in the Bitcoin Alert system

Background

The Alert System previously utilized by Bitcoin has several issues (some of which may be classified as vulnerabilities). These issues no longer exist in Bitcoin as of network protocol version 700013 which was released with Bitcoin Core 0.13.0. Many altcoins and Bitcoin client implementations were notified of the Alert System's removal and have since removed the alert system themselves or transitioned to using an Alert system that does not share an Alert Key with Bitcoin.

All of the issues described below allow an attacker in possession of the Alert Key to perform a Denial of Service attack on nodes that still support the Alert system. These issues involve the exhaustion of memory which causes node software to crash or be killed due to excessive memory usage.

Many of these issues were not known until the Alert System was removed as developers inspected the code for vulnerabilities prior to releasing the Alert Key. Due to these issues, the publicat

@rossigee
rossigee / xpub_checker.py
Created July 10, 2017 07:05
Python to fetch Bitcoin addresses/transactions for given XPUB
#!/usr/bin/python
import pycoin.key
import sys
import requests
import json
import datetime
def getbalance(address):
response = requests.get("https://bitaps.com/api/address/%s" % address)
@chris-belcher
chris-belcher / rbtc-censorship.md
Last active May 14, 2020 19:01
censorship on r/btc

r/btc markets itself as a "censorship-free" sub. In reality it attempts to silence the voices of people it disagrees with.

A few screenshot examples of censorship https://imgur.com/a/rHrtC

this article was deleted when posted, which describes how the mods of r/btc are roger ver's employees at bitcoin.com https://medium.com/@WhalePanda/the-curious-relation-between-bitcoin-com-anti-segwit-propaganda-26c877249976#.4mfo9qn3e

"Exploit code for the recent BTU attack - apparently this was posted to /r/btc, and of course, got censored. :)"

anonymous
anonymous / css3-snow-animation.markdown
Created December 7, 2016 00:58
CSS3 Snow Animation
-----BEGIN PGP PUBLIC KEY BLOCK-----
Version: GnuPG v2
mQINBFfJ8J8BEADFqS5Xda1L51ntH2NAyQuvdt/kIib0dnt/e06wuoFjBXV1MRG+
WOCaX4fMqN8LPry9GM+0CbqHYTkWjqD58MzgqgcmnZwwliHI7DHxw3+76eYxoF+J
S5ln1C6XnBJd6LNp4crfKwCd6SAzt5m94YIutABkQbnEZlOpSdc6H7A+4boToZus
hrrHc1PMfzwGHIdU3Hcge9gWiB2wWI4lbN0Qqyb3FXD1U6a5LOBsiw2+aiuivHHo
it+HcoewLHd2F0BBLMygAOCsjJhnuX2T3Yf0cHJIKyOF2U/KrEPNYH02AMe26BaW
/3x9uX14BkIgXSvUXYeX+utsiRp8ozuKqvn5BumjBG6Br7wFspJnZSbRxxiXOlAa
FxqwjB/Z6v8wKazS7hhAI/hSCbEi8VwPvccbTnIG8FG9vADMbt+FRp6uZSnPIgDh
@dvidsilva
dvidsilva / fbtoform.js
Last active May 10, 2021 08:55
HTMLForm to Firebase sample
(function(){
var newscript = document.createElement('script');
newscript.type = 'text/javascript';
newscript.async = true;
newscript.src = 'https://www.gstatic.com/firebasejs/3.0.2/firebase.js';
(document.getElementsByTagName('head')[0]||document.getElementsByTagName('body')[0]).appendChild(newscript);
})();
_setFormData = function setFormData (sel, data) {
console.info('setting form to data', data);
@kristopolous
kristopolous / hn_seach.js
Last active July 24, 2023 04:12
hn job query search
// Usage:
// Copy and paste all of this into a debug console window of the "Who is Hiring?" comment thread
// then use as follows:
//
// query(term | [term, term, ...], term | [term, term, ...], ...)
//
// When arguments are in an array then that means an "or" and when they are seperate that means "and"
//
// Term is of the format:
// ((-)text/RegExp) ( '-' means negation )
@atcuno
atcuno / gist:3425484ac5cce5298932
Last active February 18, 2025 12:41
HowTo: Privacy & Security Conscious Browsing

The purpose of this document is to make recommendations on how to browse in a privacy and security conscious manner. This information is compiled from a number of sources, which are referenced throughout the document, as well as my own experiences with the described technologies.

I welcome contributions and comments on the information contained. Please see the How to Contribute section for information on contributing your own knowledge.

Table of Contents