This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import sys, subprocess, os, re | |
if not os.path.exists("es.txt"): | |
subprocess.check_output("wget -c https://raw.githubusercontent.com/lorenbrichter/Words/master/Words/es.txt", shell=True) | |
if not os.path.exists("corncob_lowercase.txt"): | |
subprocess.check_output("wget -c http://www.mieliestronk.com/corncob_lowercase.txt", shell=True) | |
if len(sys.argv) > 1 and sys.argv[1] == "--help": |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
from manticore import ManticoreEVM | |
from manticore.core.smtlib import Operators | |
m = ManticoreEVM() # initiate the blockchain | |
ETHER = 1**18 | |
# Create accounts and the target contract | |
user = m.create_account(balance=1*ETHER, name='owner') | |
attacker = m.create_account(balance=1*ETHER, name='attacker') | |
contract = m.solidity_create_contract('pepecoin.sol', owner=user) | |
# Prepare symbolic input |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
contract PepeCoin{ | |
uint dec = 10**18; | |
mapping(address => uint) balances; | |
function buy(uint tokens) public payable{ | |
uint required_wei = (tokens / 10) * dec; | |
if (msg.value >= required_wei){ | |
balances[msg.sender] += tokens; | |
}else{ | |
revert(); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
==> flow0.c <== | |
#include<string.h> | |
#include<stdio.h> | |
#include<assert.h> | |
#define HIGH 0 | |
#define LOW 1 | |
void sha1_hex(char* pwd, size_t co,char *hashed_pwd){ | |
assert (co<9); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
==> flow0.c <== | |
#include<string.h> | |
#include<stdio.h> | |
#include<assert.h> | |
#define HIGH 0 | |
#define LOW 1 | |
void sha1_hex(char* pwd, size_t co,char *hashed_pwd){ | |
assert (co<9); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
''' | |
Get your client_id client_secret be registering a new app in your slack | |
Got to: | |
https://qgdm.slack.com/oauth?client_id=???????????????????&scope=files:write:user files:read users:read users:read.email reactions:read reactions:write | |
After authorizing... | |
http://127.0.0.1:8080/?code=?????????????? | |
Take the code and put it.. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
1/ PDBs informed by transactions and "stable storage" (@uwaterloo CS454 '86), Alice Pascal '85 (HT @bradtem), C#'88. | |
2/ I wanted MS C++ to have a persistent program database (and fast incremental builds). PDBs were a step by step way to sneak that in. | |
3/ MS C/C++ and then VC++ build speeds were slow, especially with windows.h growing and growing. | |
4/ So C7:VC1/2/4 added precompiled headers (critical heap save/reload/move was skunkworks) and PDBs. | |
5/ First built MSF -- transacted multistream file (filesystem in a file). Uodate/append new data to streams, commit all chgs w/ one write. | |
6/ Transactions critical to making PDBs robust. You can interrupt compile at any instant and PDB is always consistent. | |
7/ This is critical to making incremental compile tools. PDBs updated hundreds of times (e.g. a database) must stay consistent. | |
8/ So atop MSF implemented various services persisted as streams. | |
9/ First one, typeserver, provides stable persistent mapping from CodeView type record graphs to dense integer type indice |