Skip to content

Instantly share code, notes, and snippets.

@Filiprogrammer
Filiprogrammer / AES.py
Created November 5, 2024 12:40
Implementation of AES encryption and decryption with S-Box generation
#!/usr/bin/env python3
# S-Box is generated by generate_s_box()
S_BOX = [None] * 256
# Inverse S-Box is generated by generate_inverse_s_box()
S_BOX_INVERSE = [None] * 256
MIX_COLUMNS_MATRIX = [
0x02, 0x03, 0x01, 0x01,
@Filiprogrammer
Filiprogrammer / DES.py
Created November 5, 2024 12:38
Implementation of DES encryption and decryption
#!/usr/bin/env python3
#import sys
PLAINTEXT = "plaintxt" #sys.argv[0]
KEY = "seeecret" #sys.argv[1]
INITIAL_PERMUTATION = [
58, 50, 42, 34, 26, 18, 10, 2,
60, 52, 44, 36, 28, 20, 12, 4,
@Filiprogrammer
Filiprogrammer / gist:10c255460e7ca4a4ebc913ea567b9425
Created June 6, 2024 11:49
Android: Change the Google Services Framework ID (GSF ID)
# Change the Google Services Framework ID (GSF ID)
# Requires the device to be rooted
# You can check the GSF ID with the Device Id for Android app (com.akademiteknoloji.androidallid)
adb shell settings delete secure android_id
adb shell settings delete secure advertising_id
adb shell settings delete secure bluetooth_address
adb shell su -c rm /data/system/users/0/accounts.db
#!/bin/sh
cd "$(dirname "$(readlink -f "$0")")"
set -e
set -x
IMAGE_SIZE=2G
BOOT_PARTITION_SIZE=64MiB
IMAGE_OUTPUT_FILE=debian.img