Skip to content

Instantly share code, notes, and snippets.

@hldr4
hldr4 / checkKB.py
Created February 24, 2024 03:10
Script to check whether a given attestation keybox is revoked on Google's CRL
import requests
import sys
import xml.etree.ElementTree as ET
from cryptography import x509
'''
Usage: checkKB.py keybox.xml
Checks the EC and RSA certificates against the official CRL
@hldr4
hldr4 / citas.js
Created August 9, 2023 23:06
Ayuda a coger cita en extranjeria parcialmente automatizando el proceso
// ==UserScript==
// @name Cita Previa Extranjeria
// @namespace Violentmonkey Scripts
// @match https://icp.administracionelectronica.gob.es/icpco/*
// @grant none
// @version 1.1
// @author hldr
// @description 8/9/2023, 2:03:22 PM
// ==/UserScript==
@hldr4
hldr4 / rcd.py
Created January 1, 2023 14:33
Decrypts passwords stored in rclone configuration files
import sys
import base64
from Crypto.Cipher import AES
# Constant key rclone uses
key = bytearray.fromhex('9c935b48730a554d6bfd7c63c886a92bd390198eb8128afbf4de162b8b95f638')
enc_pwd = sys.argv[1]
enc_pwd += '=' * (-len(enc_pwd) % 4) # add padding, else some passwords will fail
@hldr4
hldr4 / mkse.py
Last active September 7, 2022 02:12
Small script to extract subtitles from an mkv/s container
"""
Usage: mkse.py [path_to_container]
Requirements: pymediainfo module, mkvextract in system path
"""
import subprocess
import sys
import re
from pathlib import Path
from pymediainfo import MediaInfo
@hldr4
hldr4 / sar.py
Created June 30, 2022 21:14
Calculates the SAR required to achieve the desired new DAR
import sys
from fractions import Fraction
"""
Calculates the SAR required to achieve the desired new DAR
SAR = Desired DAR / Current DAR
eg. (4/3)/(391/284) = 1136/1173
@hldr4
hldr4 / bcore_list_redeemable.json
Last active June 30, 2022 20:58
List of all the Bravia Core titles redeemable for credits. Includes available video profiles for each.
{"title": "Julia", "year": "2021", "id": 6822, "profiles": ["h264"]}
{"title": "Journal for Jordan, A", "year": "2021", "id": 6821, "profiles": ["hdr", "h264"]}
{"title": "Resident Evil: Welcome to Raccoon City", "year": "2021", "id": 6006, "profiles": ["hdr", "h264"]}
{"title": "Ghostbusters: Afterlife", "year": "2021", "id": 6004, "profiles": ["hdr", "h264"]}
{"title": "Never Back Down: Revolt", "year": "2021", "id": 6003, "profiles": ["h264"]}
{"title": "Death of a Telemarketer", "year": "2021", "id": 6002, "profiles": ["h264"]}
{"title": "Mouthful of Air, A", "year": "2021", "id": 6001, "profiles": ["h264"]}
{"title": "Venom: Let There Be Carnage", "year": "2021", "id": 6000, "profiles": ["imax", "hdr", "h264"]}
{"title": "Blast Beat", "year": "2021", "id": 5683, "profiles": ["h264"]}
{"title": "Show Me the Father", "year": "2021", "id": 5618, "profiles": ["sdr", "h264"]}
import argparse
from typing import Tuple
"""
Examples:
esngen.py -p a -dt tv -4k -mf hisense -m 75A6G -sid 19793 -c
NFANDROID2-PRV-HISEN75A6G-19793-97FB2CAF2688F9459551F0096E075B68B6FF551FC8636BFAA35B4E68258D2B26
@hldr4
hldr4 / ccgen.py
Last active January 18, 2022 11:17
Generates n random credit cards from a given BIN, and checks them for validity using the gostrafx API
import requests, sys, random
"""
Example usage:
ccgen.py 5398172511xxxxxx 20
which returns
@hldr4
hldr4 / mpv.py
Last active December 28, 2021 23:38
Simplifies http(s) streaming with mpv a little
import sys, subprocess
'''
Required: mpv and this script in PATH
Replace username and password with yours (eg for a seedbox)
Copy direct link to file from your FTP directory listing
Example: mpv.py https://host.seedhost.eu/user/downloads/Vice.2018.1080p.BluRay.DDP.5.1.x264-decibeL.mkv
@hldr4
hldr4 / getkeys_idapython7.4.py
Created December 18, 2021 14:39
Small edits to the original for compatibility with IDAPython 7.4
#---------------------------------------------------------------------
# Simple IDA script to extract RSA private keys and certificates.
# kyprizel, 2010
#
# Based on original idea and PoC by Tobias Klein
# http://www.trapkit.de/research/sslkeyfinder/
#---------------------------------------------------------------------
import os
import idaapi
from idautils import *