Skip to content

Instantly share code, notes, and snippets.

from channels.auth import AuthMiddlewareStack
from channels.db import database_sync_to_async
from django.contrib.auth import get_user_model
from django.contrib.auth.models import AnonymousUser
from django.http.cookie import parse_cookie
@database_sync_to_async
def get_user(token_key):
try:
# -*- coding: utf-8 -*-
import string
from django import forms
from django.conf import settings
from django.core.exceptions import ImproperlyConfigured
from django.db import models
class BaseEncryptedField(models.Field):
#!/usr/bin/env python3
import random
import sys
"""
https://github.com/taikuukaits/SimpleWordlists/
The MIT License (MIT)
#!/bin/bash
function usage() {
echo -e "This script generates a LND invoice and prints the payment request"
echo -e ""
echo -e "Usage: $0 [-h|--help] [-v*|--verbose] [-a|--amt STRING] [-m|--memo STRING]"
echo -e ""
echo -e " -h, --help\t\tprint this help message"
echo -e " -v, --verbose\t\tbe more verbose"
echo -e " -a, --amt STRING\tAmount in Satoshi"
#!/bin/bash
function usage() {
echo -e "This checks if a LND invoice has been payed using the rhash"
echo -e ""
echo -e "Usage: $0 [-h|--help] [-v*|--verbose] [-r|--rhash STRING]"
echo -e ""
echo -e " -h, --help\t\tprint this help message"
echo -e " -v, --verbose\t\tbe more verbose"
echo -e " -r, --rhash STRING\tthe payment hash of the invoice (as HEX not BASE64!)"

Setup

Install additional tools

sudo apt-get install unclutter xterm

Raspi-Config

#!/usr/bin/env python3
# -*- coding: utf-8 -*-
# 00infoLCD_wrapper.py
import os
import tkinter as tk
import platform
COLOR = "black"
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)
#!/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
#!/bin/bash
set -x
mkdir -p output
mkdir -p merge split tiff
find ./originals -type f -name '*.pdf' -exec sh -c '