Skip to content

Instantly share code, notes, and snippets.

View ungeskriptet's full-sized avatar

David Wronek ungeskriptet

View GitHub Profile
@ungeskriptet
ungeskriptet / fritz_landevices_cleanup.py
Created January 16, 2025 19:01
FRITZ!Box cleanup script
from requests import get, post, put
from time import sleep
import hashlib
import xml.etree.ElementTree as ET
URL = 'https://fritz.box/login_sid.lua?version=2'
USERNAME = 'user'
PASSWORD = 'password'
def main():
@ungeskriptet
ungeskriptet / selinux.sh
Created January 11, 2025 20:44
I refuse to elaborate
#!/vendor/bin/sh
/system/bin/magiskpolicy --live "allow dumpstate cameraserver_exec file *"
/system/bin/magiskpolicy --live "allow dumpstate * * *"
/system/bin/magiskpolicy --live "allow dumpstate charon_exec file *"
/system/bin/magiskpolicy --live "allow dumpstate connfwexe_exec file *"
/system/bin/magiskpolicy --live "allow dumpstate credstore_exec file *"
/system/bin/magiskpolicy --live "allow dumpstate ddexe_exec file *"
/system/bin/magiskpolicy --live "allow dumpstate dhkprov_exec file *"
/system/bin/magiskpolicy --live "allow dumpstate dmesgd_exec file *"
/system/bin/magiskpolicy --live "allow dumpstate dnsmasq_exec file *"
@ungeskriptet
ungeskriptet / pixelpitch.py
Created December 22, 2024 16:46
Pixel pitch calculator (for Android)
#!/usr/bin/python
from math import trunc
import sys
if len(sys.argv) <= 1:
print('pixelpitch.py <width> <height> <size in inch>')
quit()
width = float(sys.argv[1])
height = float(sys.argv[2])
@ungeskriptet
ungeskriptet / todo-samsung-sm8650.md
Last active January 18, 2025 19:40
TODO: Samsung SM8650 LineageOS

To do list for the Samsung SM8650 LineageOS port

  • Commonize device trees (To add support for other models)
  • Sensors
    • Accelerometer
    • Ambient light sensor
    • Proximity
    • Magentometer
    • Gyroscope
  • Barometer
@ungeskriptet
ungeskriptet / samsung-inquiry.py
Last active December 2, 2024 17:44
Samsung inquiry script
#!/usr/bin/python
from selenium.common.exceptions import NoSuchElementException
from selenium import webdriver
from selenium.webdriver.common.by import By
from selenium.webdriver.common.keys import Keys
from selenium.webdriver.support import expected_conditions as EC
from selenium.webdriver.support.ui import Select
from selenium.webdriver.support.ui import WebDriverWait
import requests
import sys
@ungeskriptet
ungeskriptet / unlearningapps.py
Last active November 28, 2024 19:15
Get solutions for a LearningApp on learningapps.org. Not all app types are supported. (Code explained: https://youtu.be/3K3MMtoG8rY)
#!/usr/bin/python3
import json
import requests
import sys
from urllib.parse import unquote
# Usage: python unlearningapps.py <ID>
# You can get the ID from the URL or
# by observing the network tab in your
# browser if it is embedded
@ungeskriptet
ungeskriptet / ia-check.py
Last active November 21, 2024 07:09
Python script to skip already uploaded files in an item on archive.org
#!/usr/bin/python
from internetarchive import upload
from random import randint
from requests import get
import hashlib
import sys
def info(text): print(f"\033[94mINFO: \033[00m{text}")
def warning(text): print(f"\033[93mWARNING: \033[00m{text}")
@ungeskriptet
ungeskriptet / termux-url-opener
Last active February 5, 2025 13:40
My personal termux-url-opener script
#!/data/data/com.termux/files/usr/bin/bash
function init() {
yes | pkg update
pkg upgrade -y
pkg install -y ffmpeg jq python-pip termux-api which vim openssh dnsutils traceroute iproute2 file
pip install yt-dlp
while [ ! -d "/data/data/com.termux/files/home/storage/pictures" ]; do
echo "Waiting for permissions to be granted"
termux-setup-storage
@ungeskriptet
ungeskriptet / cidr-to-ipv4.py
Created October 9, 2024 10:24
Python CIDR to IPv4 address converter
#!/usr/bin/python
import sys
cidr = sys.argv[1:][0]
octetts = ["0"] * 32
ip_dec = []
for i in range(int(cidr)):
octetts[i] = "1"
#!/bin/bash
(git --no-pager config --global --list | grep "trailer.changeid.key=Change-Id") && TRAILER_SET=1
[ -n $TRAILER_SET ] && git config --global --unset "trailer.changeid.key"
AUDIO=AUDIO.LA.9.0.r1-07800-lanai.0
CAMERA=CAMERA.LA.4.0.r2-07400-lanai.0
CV=CV.LA.2.0.r1-04900-lanai.0
DISPLAY=DISPLAY.LA.4.0.r2-08000-lanai.0
GRAPHICS=GRAPHICS.LA.14.0.r1-08200-lanai.0