Skip to content

Instantly share code, notes, and snippets.

@aexaey
aexaey / rsabd.py
Last active September 5, 2015 20:41 — forked from ryancdotorg/rsabd.py
update to (current) TomCrypto/pycurve25519
#!/usr/bin/env python
"""
sudo apt-get install python-gmpy python-m2crypto python-crypto python-dev
sudo pip install pycurve25519
./rsabd.py >poc.key
openssl req -new -key poc.key -out poc.csr
openssl x509 -req -days 365 -in poc.csr -signkey poc.key -out poc.crt
./rsabd.py '' poc.crt
"""
#!/usr/bin/python
import re
import string
# charset
cs = string.ascii_uppercase
# regex vertical/horizontal
rv = ['(R|I|D|ICULOUS|L|Y.)*.(EASY){0}',
@aexaey
aexaey / makesbtree.py
Last active May 4, 2017 18:44
Source-level binary tree search code generator
#!/usr/bin/python
# makesbtree.py: Source-level binary tree search code generator
#
# makesbtree.py is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation; version 2 of the License only.
#
# This would generate a source code snippet that efficiently looks up a string
# against pre-defined list of matches. Complete list of matches is stored