I hereby claim:
- I am tiran on github.
- I am ChristianHeimes (https://keybase.io/ChristianHeimes) on keybase.
- I have a public key whose fingerprint is BB97 AF8B C4E7 A5C0 D962 23D3 C788 C4C1 D455 0D45
To claim this, I am signing this object:
#!/usr/bin/env python2.7 | |
import os | |
from PIL import Image | |
from Crypto.Cipher import AES | |
# random key | |
key = os.urandom(16) | |
# load image | |
img = Image.open("militarygrade.png") | |
# encrypt |
#!/usr/bin/env python3.3 | |
"""Test / demo script for Apple OpenSSL Verification Surprises (CVE-2014-2234) | |
https://hynek.me/articles/apple-openssl-verification-surprises/ | |
Christian Heimes <[email protected]> | |
""" | |
import os | |
import platform | |
import socket |
I hereby claim:
To claim this, I am signing this object:
# http://nedbatchelder.com//blog/201407/creative_looping.html | |
>>> l = [1, 2, 3, 4] | |
>>> it = iter(l) | |
>>> while True: | |
... try: | |
... print(next(it)) | |
... except StopIteration: | |
... break | |
... | |
1 |
disable_flush
and disable_recovery
(TD)## /etc/tor/torrc | |
# hidden service | |
HiddenServiceDir /var/lib/tor/ssh | |
HiddenServicePort 22 127.0.0.1:22 | |
# relay | |
ORPort 9001 | |
Nickname some name | |
RelayBandwidthRate 100 KB # Throttle traffic to 100KB/s (800Kbps) | |
RelayBandwidthBurst 200 KB # But allow bursts up to 200KB/s (1600Kbps) |
#define _DEFAULT_SOURCE | |
#include <netdb.h> | |
#include <netinet/in.h> | |
#include <stdlib.h> | |
#include <stdio.h> | |
#include <string.h> | |
#include <sys/types.h> | |
#include <sys/socket.h> | |
/* |
/* Demo for repeated CPRNG output after pid wrap around | |
* | |
* Christian Heimes <christian@python.org> | |
* | |
* | |
* $ gcc -lcrypto openssl_rng.c -o openssl_rng | |
* $ ./openssl_rng | |
* $ head -n1 rng.txt | |
* 29104: 76949c6012516ca3 | |
* $ egrep '2920.+:' rng.txt |
#define _DEFAULT_SOURCE | |
#include <netdb.h> | |
#include <stdlib.h> | |
#include <stdio.h> | |
#include <string.h> | |
#include <sys/types.h> | |
#include <sys/socket.h> | |
#include <netinet/in.h> | |
/* |
# create keytab for radius user | |
ipa-getkeytab -p 'radius/HOSTNAME' -k /etc/raddb/radius.keytab | |
chown root:radiusd /etc/raddb/radius.keytab | |
chmod 640 /etc/raddb/radius.keytab | |
# make radius use the keytab for SASL GSSAPI | |
mkdir -p /etc/systemd/system/radiusd.service.d | |
cat > /etc/systemd/system/radiusd.service.d/krb5_keytab.conf << EOF | |
[Service] | |
Environment=KRB5_CLIENT_KTNAME=/etc/raddb/radius.keytab |