Skip to content

Instantly share code, notes, and snippets.

View klondi's full-sized avatar

Francisco Blas Izquierdo Riera (klondike) klondi

View GitHub Profile
Show solution to the Hack It 1! From Araba Encounter 07
By klondike of ChaGU
Use wasm-decompile from wabt to get the DCMP files (I also used the was2c to get the static sections in a format that worked for python).
Find the relevant function:
function f_1(a:int):int {
var e:int;
@klondi
klondi / bibleparser.py
Created November 14, 2019 21:10
A simple parser of the first bible in https://www.ph4.org/b4_mobi.php?q=zefania
from xml.dom.minidom import parse, parseString, ELEMENT_NODE, TEXT_NODE
a = parse('Bible_English_ESV.xml')
data = []
for book in a.childNodes[0].childNodes:
if book.nodeType == xml.dom.minidom.Node.TEXT_NODE:
if not book.data.isspace():
var tiger = (function() {
var tiger_block = (function() {
var s0,s1,s2,s3,s4,s5,s6,s7;
s0 = [0xF7E90C5E, 0xE243A8EC, 0x0DD5FCD3, 0xF6F97F3A, 0xD21F9193, 0x708029E2,
0x922A83C3, 0x04915870, 0x7103ECE6, 0x08A3535C, 0x8DDEC47C, 0xDC0DF40C,
0xA74DBEFA, 0x5AD1AB6A, 0x572FE2FF, 0x199D921E, 0xDA0007CA, 0xE85241C7,
0xEA5947B6, 0xC99E8C92, 0xA96F864B, 0x52B5C17D, 0x373063C1, 0x9BB4C56E,
0x0E76B5EA, 0xF07FDC42, 0x243342E0, 0x9D2E7D04, 0x600B0EC6, 0x7254BCAC,
0xA4DB4FE5, 0xCE0FED9F, 0xB96545DB, 0xF2A7600B, 0x0193194E, 0x2D9CC0B3,
0x15957613, 0xFC357BF1, 0x7A370F57, 0x50B99066, 0x74424A35, 0xE325249B,
@klondi
klondi / header_validation.c
Created January 10, 2015 16:44
This is code I wrote for an I2PD http parser which will never see the light, consider it public domain
inline bool isValidHeaderChar(uint8_t c) { return (c > 0x20 && c != 0x7f); }
inline bool isValidHeaderNameChar(uint8_t c) {
//This is a bool vector containing the valid characters
//!#$%&'*+-.^_`|~0123456789abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ
static const uint8_t *valid = {0, 0, 0, 0, 250, 108, 255, 3, 254, 255, 255, 199,
255, 255, 255, 87, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0};
return valid[(x / 8) & 31] & (1 << (x & 7));
}
@klondi
klondi / keybase.md
Created January 7, 2015 22:35
Keybase verification hum

Keybase proof

I hereby claim:

  • I am klondi on github.
  • I am klondike (https://keybase.io/klondike) on keybase.
  • I have a public key whose fingerprint is 27BA AD13 B77D 1643 44FE 787F 5608 AEA2 8AAF C0EC

To claim this, I am signing this object: