Skip to content

Instantly share code, notes, and snippets.

View arbipher's full-sized avatar
🐪

Weng Shiwei 翁士伟 arbipher

🐪
View GitHub Profile
@arbipher
arbipher / debug.ml
Last active December 20, 2019 14:38
code on angstrom
(* #require "Angstrom";; *)
open Angstrom
type exp =
| Int of int
| Plus of exp * exp
let (let*) = (>>=)
let ws = skip_while (function
@arbipher
arbipher / oracle.ml
Last active November 21, 2019 18:58
generate inf bool stream
module Oracle = struct
(* encoding count as co-binary
0 = t inf_t
1 = f inf_t
2 .. 3 = b f inf_t
4 .. 7 = b^2 f inf_t
...
2^k .. 2^(k+1)-1 = b^k f inf_t
\bar{b^k f} is the mirror of \bar{f b^k}, in which f is the MSB bit
#!/bin/python3
import math
import os
import random
import re
import sys
from collections import deque
@arbipher
arbipher / DDPA.code
Last active December 3, 2017 04:52
gradual typing tests
# EXPECT-WELL-FORMED
tr = true;
fl = false;
one = 1;
f = fun x -> (
rf = x + one
);
@arbipher
arbipher / brute.py
Last active November 13, 2017 06:32
#!/usr/bin/env python3
import requests
import re
import sys
from multiprocessing.dummy import Pool, Manager
import concurrent.futures
site = 'http://10.0.0.8'
login_page = site + '/DVWA/login.php'
@arbipher
arbipher / .go
Created November 2, 2017 16:13
golang crypto randint
func RandomNumber(max *big.Int) *big.Int {
n, err := rand.Int(rand.Reader, max)
if err != nil {
fmt.Println(err)
panic("error random number")
}
return n
}