This file contains hidden or 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 cryptography.hazmat.backends | |
b = cryptography.hazmat.backends.default_backend() | |
print "%x" % b.lib.OPENSSL_VERSION_NUMBER | |
print b.lib.EVP_get_cipherbyname("aes-128-gcm") | |
diff --git a/cryptography/hazmat/backends/openssl/backend.py b/cryptography/hazmat/backends/openssl/backend.py | |
index 6231aad..ea43e30 100644 | |
--- a/cryptography/hazmat/backends/openssl/backend.py | |
+++ b/cryptography/hazmat/backends/openssl/backend.py | |
@@ -154,7 +154,7 @@ class Backend(object): |
This file contains hidden or 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 thread | |
import threading | |
import itertools | |
import cryptography.hazmat.backends | |
b = cryptography.hazmat.backends.default_backend() | |
# UNCOMMENT THIS TO POSSIBLY STOP CRASHES | |
#import _ssl |
This file contains hidden or 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 thread | |
import threading | |
import struct | |
import itertools | |
import cryptography.hazmat.backends | |
# UNCOMMENT THIS TO POSSIBLY STOP CRASHES | |
#import _ssl |
This file contains hidden or 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
cryptography/hazmat/backends/openssl/__pycache__/_cffi__xff7f7876x43e58bcb.c:4056:17: error: storage size of ‘x0’ isn’t known |
This file contains hidden or 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 cffi | |
isdefined_template = """ | |
#include <openssl/opensslconf.h> | |
char cryptography_isdefined_{0}() {{ | |
#ifdef {0} | |
return 1; | |
#else | |
return 0; |
This file contains hidden or 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 os | |
from binascii import hexlify | |
import json | |
import itsdangerous | |
import random | |
secret = hexlify(os.urandom(160/8)) | |
#secret = "4e0f4e0bbd859501d57460168babbe9bda0f9e77" | |
serializer = itsdangerous.URLSafeSerializer("SECRET") | |
session = { |
This file contains hidden or 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
home@alex:~$ awk '/ 1$/{print $1}' < numdeps | xargs apt-cache show | grep Original-Maintainer | sort | uniq -c | sort -k1 -n | |
1 Original-Maintainer: "Adam C. Powell, IV" <[email protected]> | |
1 Original-Maintainer: Adam C. Powell, IV <[email protected]> | |
1 Original-Maintainer: Adam Schmalhofer <[email protected]> | |
1 Original-Maintainer: Aleksey Kravchenko <[email protected]> | |
1 Original-Maintainer: Alexandre Fayolle <[email protected]> | |
1 Original-Maintainer: Al Stone <[email protected]> | |
1 Original-Maintainer: A Mennucc1 <[email protected]> | |
1 Original-Maintainer: Ana Beatriz Guerrero Lopez <[email protected]> | |
1 Original-Maintainer: Andrea Gasparini <[email protected]> |
This file contains hidden or 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
#!/bin/sh | |
grep $(virsh domiflist $1 | grep -vE '^((.)\2*)?$' | awk 'NR == 1 { for(i=1; i <= NF; i++) { if($i == "MAC") { MAC=i } } } NR > 1 { print $MAC }') /var/lib/libvirt/dnsmasq/default.leases | cut -d\ -f3 |
This file contains hidden or 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 Data.List | |
import Math.NumberTheory.Primes.Sieve | |
import Control.Monad | |
import Debug.Trace | |
numWays without p = | |
let (poor, rich) = splitAt p without | |
with = poor ++ |
This file contains hidden or 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
def block(func, args): | |
def decorator(f2): | |
return func(f2, args) | |
return decorator | |
@block(map, range(10)) | |
def square(x): | |
return x**2 |