Skip to content

Instantly share code, notes, and snippets.

#!/usr/bin/env python
# -*- coding: UTF-8 -*-
# Copyright 2017 frennkie (https:/github.com/frennkie)
#
# Permission is hereby granted, free of charge, to any person obtaining a copy
# of this software and associated documentation files (the "Software"), to deal
# in the Software without restriction, including without limitation the rights
# to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
# copies of the Software, and to permit persons to whom the Software is
#!/usr/bin/env python
# -*- coding: utf-8 -*-
import requests
USERNAME = "admin2"
PASSWORD = "not-very-secret"
APIURL = "http://127.0.0.1:8080/api/v3" # no trailing slash
PROJECT_NAME = "otrs"
#!/bin/bash
# https://gist.github.com/koenpunt/40c0b042c453a1add0e8
#
# Check if the user is in the right group
# and afterwards retrieve the SSH public key from LDAP
# Logs directly in Syslog
# requires ldap-utils
#
# sshd_config for OpenSSH 6.2 or higher:
#
@frennkie
frennkie / cli.py
Last active August 23, 2017 20:32
#!/usr/bin/env python3
import datetime
import argparse
import re
DT_NOW = datetime.datetime.now()
def mkdate(datestring):
if isinstance(datestring, datetime.datetime):

Keybase proof

I hereby claim:

  • I am frennkie on github.
  • I am frennkie (https://keybase.io/frennkie) on keybase.
  • I have a public key ASDnUdnZrWbMaGeLVSkUpYfxfru5cOQMXMI5cubPq6tL_wo

To claim this, I am signing this object:

@frennkie
frennkie / YubiKey-GPG-SSH-guide.md
Created May 13, 2018 10:06 — forked from ageis/YubiKey-GPG-SSH-guide.md
Technical guide for using YubiKey series 4 for GPG and SSH

YubiKey 4 series GPG and SSH setup guide

Written for fairly adept technical users, preferably of Debian GNU/Linux, not for absolute beginners.

You'll probably be working with a single smartcard, so you'll want only one primary key (1. Sign & Certify) and two associated subkeys (2. Encrypt, 3. Authenticate).

import base64
from http import HTTPStatus
from http.server import BaseHTTPRequestHandler
import json
import logging
from random import randint
import sys
import socketserver
import threading
#!/bin/bash
set -x
mkdir -p output
mkdir -p merge split tiff
find ./originals -type f -name '*.pdf' -exec sh -c '
#!/usr/bin/env python
# Exfiltrate a file from Windows Powershell over HTTP Post using certutil for
# Base64 conversion to avoid broken file due to text based post transmission.
#
# Requires
# pip install tornado
# Sample usage (exfiltrate flag.docx)
# python certutilpostreciver.py
from O365 import Account, Connection, FileSystemTokenBackend, MSGraphProtocol, MSOffice365Protocol
import re
client_id = "<client_id>"
client_secret = "<client_secret>"
tenant_id = "<tenant_id>"
credentials = (client_id, client_secret)