Skip to content

Instantly share code, notes, and snippets.

View ishanjain28's full-sized avatar
🎯
Focusing

Ishan Jain ishanjain28

🎯
Focusing
View GitHub Profile
@kconner
kconner / macOS Internals.md
Last active May 6, 2025 05:33
macOS Internals

macOS Internals

Understand your Mac and iPhone more deeply by tracing the evolution of Mac OS X from prelease to Swift. John Siracusa delivers the details.

Starting Points

How to use this gist

You've got two main options:

@rajkosto
rajkosto / RTL960x_features.txt
Created December 14, 2022 23:36
ODI DFP-34X-2C2 / RTL960x chipset SDK feature bits description
HGU firmware features:
0 BDP (OMCI_CUSTOM_BDP):
0x001 = KERNEL:TLS_4095 = (0)tls_4095_us_rule_to_ds_rule, (1)tls_4095_us_act_to_ds_sact, (2)tls_4095_us_act_to_ds_cact, (3)tls_4095_us_set_mbr_port_by_svlan, (4)tls_4095_us_del_mbr_port_by_svlan
0x002 = KERNEL:ignore_dsPbit = (5)ignore_ds_pbit, this one is very slightly different (less magic values) in SFU firmware
0x008 = (15)cf_gen_vtfd_rule, (14)cf_check_vtfd_mode
0x010 = KERNEL:set_ds_bc_gem_flow_to_ds_bcster_mod = (6)omci_apply_ds_bcster_mod, (7)omci_set_ds_bc_gem_flow_to_ds_bcster_mod,
KERNEL:add_ds_tag_rule_to_ds_bcster_mod = (8)omci_add_ds_tag_rule_to_ds_bcster_mod, (9)omci_del_ds_tag_rule_to_ds_bcster_mod
KERNEL:reset_to_ds_bcster_mod = (10)omci_reset_to_ds_bcster_mod,
0x080 = (18)omci_ingoreExtVlanDefaultDrop (parameter & 0x01 => IGN_ME_171_DEFAULT_DROP, parameter & 0x02 => IGN_ME_171_TREAT_UNTAG, parameter == -1 ?)
0x100 = KERNEL:force_veip_rule_to_sfu = (13)force_veip_rule_to_sfu, (14)force_veip_us_r
@rajkosto
rajkosto / odi_keygen.py
Created November 18, 2022 12:56
ODI SFP XPON stick MAC_KEY generator
#!/usr/bin/env python3
#ODI DFP-34X-2C2 MAC_KEY key generator by rajkosto
import sys
import string
import hashlib
args = sys.argv
if len(args) != 2:
sys.exit("Usage: odi_keygen.py YOURMACADDR")
@gmurdocca
gmurdocca / socat_caesar_dpi.md
Last active May 2, 2025 06:17
Circumventing Deep Packet Inspection with Socat and rot13

Circumventing Deep Packet Inspection with Socat and rot13

I have a Linux virtual machine inside a customer's private network. For security, this VM is reachable only via VPN + Citrix + Windows + a Windows SSH client (eg PuTTY). I am tasked to ensure this Citrix design is secure, and users can not access their Linux VM's or other resources on the internal private network in any way outside of using Citrix.

The VM can access the internet. This task should be easy. The VM's internet gateway allows it to connect anywhere on the internet to TCP ports 80, 443, and 8090 only. Connecting to an internet bastion box on one of these ports works and I can send and receive clear text data using netcat. I plan to use good old SSH, listening on tcp/8090 on the bastion, with a reverse port forward configured to expose sshd on the VM to the public, to show their Citrix gateway can be circumvented.

Rejected by Deep Packet Inspection

I hit an immediate snag. The moment I try to establish an SSH or SSL connection over o

@AHaymond
AHaymond / gist:25587a93094fdffdcdbfeaa90f21337c
Last active April 29, 2025 15:39
Setting up Arch Linux LXC on ProxMox
1. Edit the mirror list located at /etc/pacman.d/mirrorlist and uncomment a preferred mirror (preferrably closest to you)
2. Initialize Pacman GPG Keys
- $> pacman-key --init
- $> pacman-key --populate archlinux
- $> pacman-key --refresh-keys -u --keyserver hkps.pool.sks-keyservers.net
*The use of the --keyserver flag is due to an error that currently occurs when using the default keyserver
3. Reinstall Arch keyring
- $> pacman -S archlinux-keyring
4. Install Yay (if desired)
- Create a user (you cannot run makepkg as root, you must be signed in as a user)
@sergev
sergev / debian-mipsel-on-qemu.md
Last active April 20, 2025 11:41
Installing Debian MIPS32 on QEMU

Let's install Debian 9.0 "Stretch" on QEMU MIPS32 under Ubuntu.

Step 1: Install QEMU

sudo apt install qemu-system-mips

Step 2: Download Linux kernel and installation image

wget http://ftp.debian.org/debian/dists/stretch/main/installer-mipsel/current/images/malta/netboot/vmlinux-4.9.0-11-4kc-malta
@Matthias247
Matthias247 / async_await_cancellation.md
Created May 28, 2019 06:09
Async/Await - The challenges besides syntax - Cancellation

Async/Await - The challenges besides syntax - Cancellation

This is the second article in a series of articles around Rusts new async/await feature. The first article about interfaces can be found here.

In this part of the series we want to a look at a mechanism which behaves very different in Rust than in all other languages which feature async/await support. This mechanism is Cancellation.

@flipace
flipace / gdpr-list.json
Last active March 24, 2025 12:59
List of URLs where you can request your data according to GDPR/DSGVO laws
[
{ "name": "Amazon", "url": "https://www.amazon.de/gp/help/customer/contact-us?", "note": "Select, in this order: 'Digitale Dienste' -> 'Datenauskunft beantragen' -> 'Datenauskunft für eine spätere Zusendung beantragen' -> 'Daten aus allen Kategorien anfordern' -> Namen eingeben und Nachricht vervollständigen. -- Amazon Support Staff will review your request and send you an email, asking about a postal address. If you don't answer to their mail, your request won't be fulfilled." },
{ "name": "McDonalds", "url": "https://corporate.mcdonalds.com/corpmcd/gdpr-rights-center.html" },
{ "name": "willhaben.at", "url": "https://datenschutz.willhaben.at/" },
{ "name": "Spotify", "url": "https://www.spotify.com/account/privacy/" },
{ "name": "Google", "url": "https://takeout.google.com" },
{ "name": "PlayStation", "email": "[email protected]" },
{ "name": "Humble Bundle", "email": "[email protected]" },
{ "name": "REWE Group AT", "email": "[email protected]" },
{ "name": "BILLA", "url": "https: