Skip to content

Instantly share code, notes, and snippets.

View werew's full-sized avatar
💻
Writing new code...

Luigi Coniglio werew

💻
Writing new code...
View GitHub Profile
@werew
werew / possible_dfg_simplifications.md
Last active May 6, 2019 15:00
List of DFG simplificable patterns

List of DFG simplificable patterns (within a single DFG node)

This list includes some data flow patterns which can be simplified for better human comprehension. There may ne some overlapping between different patterns.

Saved and restored register

push rax
@werew
werew / balanceof_invariant_check.py
Created January 22, 2019 07:54
Manticore script to check whether the invariant sum_of_balances == total_supply is always satisfied in a ERC20 contract
from manticore.ethereum import *
import itertools
import binascii
import time
@werew
werew / PFAToken.tx
Created January 22, 2019 07:50
Manticore erroneous testcase on PFAToken.sol
Transactions No. 0
Type: CREATE (0)
From: user_account(0x5da83cffb5bab1cd888417a5ecefe37b9e250d67)
To: contract_account(0xafb6d63079413d167770de9c3f50db6477811bdb)
Value: 0
@werew
werew / PFAToken.sol
Created January 22, 2019 07:46
Shrinked PFAToken
pragma solidity ^0.4.20;
interface ERC20Token {
@werew
werew / r2_essential_cheatsheet.md
Last active May 9, 2025 16:23
Radare2 - essential cheatsheet

The full updated Radare2 (official) cheatsheet can be found here: https://github.com/radare/radare2/blob/master/doc/intro.md

I use this gist to gather the Radare2's commands I use the most and add some notes that the official cheatsheet is missing.

Radare2

Command line options

-w: Write mode enabled
-p [prj]: Creates a project for the file being analyzed (CC add a comment when opening a file as a project)