Skip to content

Instantly share code, notes, and snippets.

View kasnder's full-sized avatar

Konrad Kollnig kasnder

View GitHub Profile
kasnder /
Created March 10, 2023 12:11
Grant the local network permission to an iOS app. More permissions here:
# Todo: This currently fails to update the file signature. It still seems to work but should not be used on a production device.
# Usage:./ [bundleId]
# Example: ./ com.spotify.client
if [ -z "$1" ]; then
echo "Please pass bundleId"
exit -1
kasnder /
Created December 9, 2022 09:54

Keybase proof

I hereby claim:

  • I am kasnder on github.
  • I am kkollnig ( on keybase.
  • I have a public key ASCIm7oChhTGxAbhihcGtb6sti7I_thSsWJKIaNlggKnVgo

To claim this, I am signing this object:

kasnder /
Last active May 6, 2022 23:04
Grant the notification permission to an iOS app. More permissions here: Raw
# This script runs on macOS
# One needs a working, passwordless SSH login with login 'ios' on a jailbroken iOS 14.+
# One also needs Activator and ActivatorCrashFix14:
# Backup and preparation
ssh ios "cp -n /var/mobile/Library/BulletinBoard/VersionedSectionInfo.plist ~/VersionedSectionInfo.plist.bak"
scp ios:/var/mobile/Library/BulletinBoard/VersionedSectionInfo.plist ./VersionedSectionInfo2.plist
# Prepare notification settings
/usr/libexec/PlistBuddy -c "Set :\$objects:2 $appId" `pwd`/base2.plist
kasnder / snippet.tex
Last active May 6, 2022 22:59
Responsive figures for ACM TAPS submission. UPDATE: While this script theoretically works, the TAPS system is actually not compatible with it (despite it being legitimate Latex code).
%insert before \begin{document}
kasnder /
Last active May 12, 2024 20:41
Grant the location permission to an iOS app. More permissions here:
# Todo: This currently fails to replace an existing entry in the location permission database. Would be better add to the end of the clients.plist file.
# Usage:./ [bundleId]
# Example: ./ com.spotify.client
# Requirements:
# - iOS device with checkra1n jailbreak (tested on 14.8)
# - Installed `sqlite3` on iOS device from Cydia
# Usage:./ [bundleId]
# Example: ./ com.spotify.client
echo "This does not grant location, notification or local network permission. You can grant location permission with this script and the notifications permission with this script and local network permission with this script"
# Requirements:
# - iOS 14.8 device with checkra1n jailbreak
# - Installed `sqlite3` on iOS device from Cydia
kasnder /
Last active August 15, 2020 11:09
Checks that is up-to-date with Disconnect blacklist
#!/usr/bin/env python3
# -*- coding: utf-8 -*-
import urllib.request, json
import argparse
parser = argparse.ArgumentParser(description='Compare Shavar and blacklist.')
parser.add_argument("-f", "--file", help="blacklist to verify")
args = parser.parse_args()
kasnder /
Created June 15, 2020 13:30
Super genres from "Third Party Tracking in the Mobile Ecosystem" by Binns et al. adopted to iOS
super_genres = {
'ART_AND_DESIGN': 'Art & Photography',
'AUTO_AND_VEHICLES': 'Productivity & Tools',
'BEAUTY': 'Health & Lifestyle',
'BOOKS_AND_REFERENCE': 'Productivity & Tools',
'BUSINESS': 'Productivity & Tools',
'COMICS': 'Games & Entertainment',
'COMMUNICATION': 'Communication & Social',
'DATING': 'Communication & Social',
'EDUCATION': 'Education',
kasnder / helpers.ts
Last active January 21, 2020 12:16
Some TypeScript code that I've use repeatedly
const fs = require('fs');
const parseDomain = require("parse-domain");
function readJson(filename) {
return JSON.parse(
function getDomain(url) {
kasnder /
Last active January 7, 2020 15:31
Attempt to classify top sentences in the Wikipedia article on New York
# Authored by Konrad Kollnig
# Oxford, 20 April 2019
import wikipedia
from nltk.tokenize import sent_tokenize, RegexpTokenizer
from nltk.corpus import stopwords
from collections import defaultdict
import math
import numpy as np
from sklearn.feature_extraction.text import TfidfVectorizer, CountVectorizer