Skip to content

Instantly share code, notes, and snippets.

Ondřej Caletka oskar456

Block or report user

Report or block oskar456

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
@oskar456
oskar456 / walk_sk_nsec3_ds.py
Created May 8, 2019
Walk NSEC3 chain of .SK TLD in order to discover zones with secure delegation
View walk_sk_nsec3_ds.py
#!/usr/bin/env python3
from hashlib import sha1
from base64 import b32encode
import csv
from collections import OrderedDict
from itertools import zip_longest
import dns.name
from dns.rdtypes.ANY.NSEC3 import b32_normal_to_hex
@oskar456
oskar456 / grabivysilani.py
Created Mar 10, 2019
Grab TV series from iVysilani with CC and AD
View grabivysilani.py
#!/usr/bin/env python3
import subprocess
import youtube_dl
import click
from pprint import pprint
@click.command()
@oskar456
oskar456 / rpsl_to_fred.py
Created Oct 29, 2018
Convert RIPE DB domain dump into Fred-akm data file
View rpsl_to_fred.py
#!/usr/bin/env python3
import gzip
import hashlib
import sys
from collections import defaultdict
def read_db_dump(fname="ripe.db.domain.gz"):
obj = None
@oskar456
oskar456 / cert_deploy_check.py
Created Sep 19, 2018
Get hostname list from CT logs, via certspotter, check if hostnames offer valid certificate path.
View cert_deploy_check.py
#!/usr/bin/env python3
import ssl
import socket
from pathlib import Path
def get_cert_hostnames():
path = Path("~/.certspotter/certs/").expanduser()
@oskar456
oskar456 / screencast.sh
Last active Aug 3, 2018
FFmpeg record my desktop
View screencast.sh
#!/bin/sh
SCREEN_SIZE="1920x1080"
ORIGIN="0,0"
# For dual screen setup where projected is on the right side of the desktop:
#ORIGIN="1920,0"
ffmpeg -vaapi_device /dev/dri/renderD128 -framerate 25 -video_size $SCREEN_SIZE \
-f x11grab -i :0+$ORIGIN -f pulse -ac 2 -i default -vf 'format=nv12,hwupload' \
-c:v h264_vaapi -c:a aac screencast-$(date +%H%M%S).mkv
@oskar456
oskar456 / ledclock.py
Created May 1, 2018
PyGTK Cairo LED studio clock
View ledclock.py
#! /usr/bin/env python2
import pygtk
pygtk.require('2.0')
import gtk
import glib
import cairo
import math
import datetime
# Create a GTK+ widget on which we will draw using Cairo
@oskar456
oskar456 / ctlogspotter.py
Created Apr 13, 2018
Preprocess Certificate Transparency log list for Cert Spotter
View ctlogspotter.py
#!/usr/bin/env python3
import requests
import json
log_list = "https://www.gstatic.com/ct/log_list/log_list.json"
logs = requests.get(log_list).json()
outlogs = []
for log in logs["logs"]:
@oskar456
oskar456 / ctlogids.py
Last active Mar 28, 2018
Show Certificate Transparency Log IDs compatible with OpenSSL output
View ctlogids.py
#!/usr/bin/env python3
import requests
import hashlib
import base64
log_list = "https://www.gstatic.com/ct/log_list/all_logs_list.json"
logs = requests.get(log_list).json()
for log in logs['logs']:
@oskar456
oskar456 / fixmime.py
Created Jan 4, 2018
Milter to fix badly formatted MIME messages
View fixmime.py
#!/usr/bin/env python3
import email
from email.mime.multipart import MIMEMultipart
import sys
from subprocess import Popen, PIPE
def reformat(msg):
"""Reformat the MIME parts of the message to a sane one."""
newmsg = MIMEMultipart()
@oskar456
oskar456 / py6server.py
Created Dec 5, 2017
Simple Python-based HTTP Server with IPv6 support
View py6server.py
#!/usr/bin/env python3
import http.server
import socketserver
import socket
class TCP6Server(socketserver.TCPServer):
address_family = socket.AF_INET6
def server_bind(self):
self.socket.setsockopt(socket.SOL_SOCKET, socket.SO_REUSEADDR, 1)
You can’t perform that action at this time.