Skip to content

Instantly share code, notes, and snippets.

@rllola
rllola / command.txt
Last active April 2, 2024 09:11
Command to sort IPs by latency when using nmap
nmap -sn -iL ethereum_ips.txt | grep -Eo "((\(|)([0-9]{1,3}[\.]){3}[0-9]{1,3})(\)|$)|[0-9]+\.[0-9]+s" | tr -d '\015' | paste - - | sort -k 2
@rllola
rllola / signhash_single.py
Last active August 30, 2023 12:07
Attempting to verify the signature for a single signing flag transaction where the ouput is non existant
import ecdsa
# https://bitcoin.stackexchange.com/questions/114850/sighash-single-with-no-corresponding-output
pubkey = "044edfcf9dfe6c0b5c83d1ab3f78d1b39a46ebac6798e08e19761f5ed89ec83c108172c4776865f02047b39cd704135c00c1b00085e0d1b9255405ac7079fa50a2"
signature = "912f994094193109a9faedf7ef855220638f95ac51c66d4eb46740dd1c0813fa100bc99adb8b64fb784173ca8883a78835e156b74f143c02e071dc82695e8472"
msg = bytes.fromhex("0100000000000000000000000000000000000000000000000000000000000000")
verify_key = ecdsa.VerifyingKey.from_string(bytearray.fromhex(pubkey), curve=ecdsa.SECP256k1)
@rllola
rllola / repos.txt
Created February 14, 2022 20:53
Some Dogecoin repos
- SPV wallet : https://github.com/BitcoinAmiens/dogecoin-spv-node
- Payment Channel service : https://github.com/xanimo/dogecoin-spv-node-middleware
- Testnet faucet : https://gitlab.com/toffee_/dogecoin-testnet-faucet
- Payment Channel poc : https://github.com/rllola/doge-payment-channel
- Testnet miner : https://github.com/rllola/dogecoin-miner-rust
- Libdogecoin : https://github.com/xanimo/libdogecoin
- Discord tipping bot : https://github.com/BitcoinAmiens/dogecoin-tipping-bot
@rllola
rllola / auxpowblock.json
Created February 4, 2022 00:35
Testnet first auxpow block
{
"hash": "a19271cbe06a8243dfecdcf5935754566edc074a7544f042b5bb4796b8a87027",
"confirmations": 3429024,
"strippedsize": 516,
"size": 516,
"weight": 2064,
"height": 158390,
"version": 6422786,
"versionHex": "00620102",
"merkleroot": "cd258a54487d9239d10743cbe3f68ce07d610def2bd5659a6e41b84671245117",
@rllola
rllola / ecdsa_private_recovering.py
Last active October 5, 2022 22:50
Recover private key from ECDSA signature
#!/usr/bin/env python3
from Crypto.Util.number import inverse
import ecdsa
import random
import hashlib
C = ecdsa.SECP256k1
G = C.generator
n = C.order
@rllola
rllola / script.py
Created January 19, 2021 20:08
Get all the environement variable in electron project
import re
import glob
javascript_files = glob.glob('**/*.js', recursive=True)
variables = []
for file in javascript_files:
with open(file, 'r') as f:
javascript_blob = f.read()
Hello World !
@rllola
rllola / updater.js
Last active December 16, 2018 06:34
Electron updater code basic example
const electron = require('electron')
const APP_VERSION = require('../package.json').version
const AUTO_UPDATE_URL = 'https://api.update.rocks/github.com/rllola/electron-example/update/' + process.platform + '/' + APP_VERSION
function init () {
if (process.platform === 'linux') {
console.log('Auto updates not available on linux')
} else {
initDarwinWin32()
@rllola
rllola / install-pyqt5.sh
Last active May 11, 2020 12:39
How to install PyQt5 (5.11.2) with from source for python2.7
#!/bin/bash
NP="$(nproc)"
PYQTSIP_VERSION=4.19.14
QT5_VERSION=5.12
QT5_PATH=/opt/qt512
@rllola
rllola / grin.toml
Created July 19, 2018 09:19
Grin config file in docker
# Sample Server Configuration File for Grin
#
# When running the grin executable without specifying any command line
# arguments, it will look for this file in three places, in the following
# order:
#
# -The working directory
# -The directory in which the executable resides
# -[user home]/.grin
#