Skip to content

Instantly share code, notes, and snippets.

View m-rey's full-sized avatar
🏳️‍⚧️
Hack the planet!

Mæve Rey m-rey

🏳️‍⚧️
Hack the planet!
  • Nuremberg, Germany
View GitHub Profile
@m-rey
m-rey / jq_combine_redirector-config.sh
Created March 21, 2024 13:40
short one liner to combine Redirector (Firefox extension) rule backups
jq -s '{
"createdAt": (map(select(.createdAt != null) | .createdAt | .[:-5] + "Z" | fromdateiso8601) | max // now | strftime("%Y-%m-%dT%H:%M:%S.000Z")),
"createdBy": (max_by(.createdAt | .[:-5] + "Z" | fromdateiso8601) // {"createdBy": "Redirector"}).createdBy,
"redirects": (map(select(.redirects != null).redirects) | add)
}' Redirector*.json > combined_redirects.json
@m-rey
m-rey / kagi_more-results.js
Last active August 20, 2023 19:01
script to press the button to load more results in kagi search results
// ==UserScript==
// @name Auto Click Load More Results on Kagi
// @namespace http://tampermonkey.net/
// @version 0.1
// @description Automatically click the "Load More Results" button on Kagi search once per navigated site
// @author You
// @match https://kagi.com/search*
// @grant none
// ==/UserScript==
@m-rey
m-rey / frida_bypass_com-appmattus-certificatetransparency.js
Created May 23, 2023 22:19
frida script to bypass okhttp3 in com.appmattus.certificatetransparency
Java.perform(function () {
var CertificateTransparencyInterceptor = Java.use('com.appmattus.certificatetransparency.internal.verifier.CertificateTransparencyInterceptor');
var OkHttpClientBuilder = Java.use('okhttp3.OkHttpClient$Builder');
CertificateTransparencyInterceptor.intercept.implementation = function (chain) {
var request = chain.request();
var url = request.url();
var host = url.host();
// Dynamically access the VerificationResult classes
@m-rey
m-rey / vanity_argon2id.py
Created March 28, 2023 11:56
use this to generate a hashed URI of your pgp fingerprint for keyoxide
#!/usr/bin/env python3
import sys
import secrets
import re
import argon2
import os
import base64
import logging
import argparse
@m-rey
m-rey / run program in background from terminal.md
Created March 22, 2023 01:01
howto start program in terminal and run in background

Use nohup foo | cat & to run foo in the terminal and keep it running after terminal closes.

@m-rey
m-rey / spellcheck_en.py
Last active May 11, 2022 13:52
hacky spellcheck that uses rules from languagetool and suggests corrections
#!/bin/env python3
# this needs https://github.com/bminixhofer/nlprule to work:
# pip install nlprule
from nlprule import Tokenizer, Rules
from sys import argv
LANG = "en"
@m-rey
m-rey / grep_fediverse_ids
Created January 31, 2022 20:17
get mastodon ids from mastodon source. run this grep on any html (part) to return all fediverse acc ids. Perfect to dump your user lists
grep -oP '(?<=display-name__account">).*?(?=</span>)'
@m-rey
m-rey / kvb_aerztesuche.md
Created November 10, 2021 02:39
KVB Ärztesuche Info

KVB Ärztesuche

Hier ein paar infos zur KVB Ärztesuche:https://dienste.kvb.de/arztsuche/app/erweiterteSuche.htm

Nachdem das Suchformular entsprechend ausgefüllt wurde, wird ein POST request mit den Daten verschickt. Man kann daraus aber problemlos auch ein GET request machen: https://dienste.kvb.de/arztsuche/app/erweiterteSucheAusfuehrung.htm?fachgebiete=&name=&adresse=N%C3%BCrnberg&arztArt=&geschlecht=&sprechzeitenTag=&barrierefreiheit=&zustatzBezeichnungen=&zusatzWeiterbildungen=&genehmigungen=Verhaltenstherapie+Erwachsene&genehmigungen=Verhaltenstherapie+Erwachsene%2C+Gruppe&fremdsprachen=&bezirksstellen=&landkreise=&bsnrLanrHnr=&geocodeResult=&geoTest=

Besser noch wäre es, wenn man den Bezirk+Landkreis noch auswählt. Da ist die Suche etwas kaputt und graut die option aus. Einfach im source code enablen und die gewüsnchten Dinge auswählen. Als request kanns dann so aussehen (wenn Landkreis angegeben, ist Ort nicht mehr notwendig): https://dienste.kvb.de/arztsuche/app/erweiterteSucheAusfuehrung.htm?fachg

@m-rey
m-rey / ublock_gen_seq_dynamic_rules.sh
Created July 23, 2021 10:35
generate and check ublock origin dynamic rules for CDNs using multiple hostnames containing sequentially numbered hostnames. Only online hostnames will be returned.
echo osm{0..100}.openstreetmap.fr | tr " " "\n" | parallel -j10 'ping -c 1 {} >/dev/null 2>&1 && echo \* {} \* noop' | sponge | sort