Skip to content

Instantly share code, notes, and snippets.

View alpinevm's full-sized avatar

Cliff Syner alpinevm

  • Rift Research
  • San Francisco, CA
  • 06:02 (UTC -08:00)
  • X @alpinevm
View GitHub Profile
@alpinevm
alpinevm / anvil_wrapper.py
Created October 13, 2023 01:58
Invoke and use Foundry Anvil from a python class
"""
python3 -m pip install web3 requests
"""
import subprocess
import socket
from web3 import Web3, HTTPProvider
from web3.types import Wei
import time
import requests
import traceback
@alpinevm
alpinevm / ecdsa_vuln.py
Last active October 21, 2024 20:43
Generate arbitrary ECDSA signature + hash pairs given a public key
# Author: Alpine, @alpinevm
# python3 -m pip install eth_account ecdsa
# Inspired by: https://yondon.blog/2019/01/01/how-not-to-use-ecdsa/
import random
from eth_account import Account
from ecdsa import SECP256k1, VerifyingKey
from ecdsa.util import number_to_string