- Source: https://distrowatch.com/
- Author: Christian Heimes
- Created: 2018-01-12
- alpine 3.2.2 (OpenSSL 1.0.2d)
- alpine 3.6.2 (LibreSSL 2.5.4)
- alpine 3.7.0 (LibreSSL 2.6.3)
#!/usr/bin/env python3 | |
"""Dump FreeIPA wiki pages as restructured text | |
Example: | |
python3 importwiki.py V4/Kerberos_PKINIT V4/Healthcheck | |
""" | |
import argparse | |
import os | |
import subprocess |
# Christian Heimes <[email protected]> | |
# https://docs.python.org/3/howto/instrumentation.html?highlight=dtrace#c.import__find__load__start | |
# https://speakerdeck.com/tiran/europython-2019-introduction-to-low-level-profiling-and-tracing?slide=64 | |
global depths = 0; | |
global timing | |
probe process("python3").library("libpython3.7m.so.1.0").mark("import__find__load__start") { | |
modname = user_string($arg1); |
#!/usr/bin/env python3 | |
"""Generate X.509 cert with bad serial number encoding | |
Christian Heimes | |
""" | |
from asn1crypto.x509 import Certificate | |
from asn1crypto.core import Integer | |
from asn1crypto.pem import armor, unarmor | |
from cryptography.hazmat.primitives import hashes | |
from cryptography.hazmat.primitives.asymmetric import padding |
/* polkit rule to allow 'pkiuser' to access NitroHSM PCSC interface | |
* | |
* file name: /etc/polkit-1/rules.d/99-pkiuser-pcsc.rules | |
* | |
* Resources: | |
* - https://access.redhat.com/blogs/766093/posts/1976313 | |
* - https://raymii.org/s/articles/Get_Started_With_The_Nitrokey_HSM.html | |
* | |
* Installation: | |
* # dnf install opensc pcsc-lite pcsc-tools |
#! ./python | |
"""TLS 1.3 shutdown issue reproducer | |
./configure -C --with-pydebug | |
make | |
./python Tools/ssl/multissltests.py --openssl 1.1.1-pre6 --steps modules | |
./python shutdown.py --server | |
./python shutdown.py | |
""" |
0000000000000000 <siphash24>: | |
0: 48 b8 61 72 65 6e 65 movabs $0x6c7967656e657261,%rax | |
7: 67 79 6c | |
a: 53 push %rbx | |
b: 48 bb 75 65 73 70 65 movabs $0x736f6d6570736575,%rbx | |
12: 6d 6f 73 | |
15: 48 31 fb xor %rdi,%rbx | |
18: 49 89 c9 mov %rcx,%r9 | |
1b: 48 31 c7 xor %rax,%rdi | |
1e: 49 bb 6d 6f 64 6e 61 movabs $0x646f72616e646f6d,%r11 |
#!/usr/bin/env python | |
"""Regenerate Custodia server.keys and config | |
Christian Heimes <[email protected]> | |
""" | |
import argparse | |
import os | |
from ipalib import api | |
from ipaplatform.paths import paths |
#!/usr/bin/env python3 | |
# see https://bugs.python.org/issue31892 | |
from socket import create_connection | |
from ssl import ( | |
_create_stdlib_context, DER_cert_to_PEM_cert, PROTOCOL_TLS, | |
CERT_REQUIRED, CERT_NONE | |
) | |
CERT_TYPE = { |
$ mkdir a | |
$ touch a/__init__.py | |
$ touch a/b.py | |
$ python2 | |
Python 2.7.13 (default, Sep 5 2017, 08:53:59) | |
[GCC 7.1.1 20170622 (Red Hat 7.1.1-3)] on linux2 | |
Type "help", "copyright", "credits" or "license" for more information. | |
>>> import a | |
>>> a |