Skip to content

Instantly share code, notes, and snippets.

View Swyter's full-sized avatar
💭
¯\_(ツ)_/¯

Swyter Swyter

💭
¯\_(ツ)_/¯
View GitHub Profile
@castano
castano / SparkTextureOutput.md
Last active February 24, 2025 09:48
Writing to block compressed textures across different graphics APIs

Writing to Compressed Textures

In general it's not possible to use a block-compressed texture as a render target or as a compute shader output. Instead you have to either: Alias the block compressed texture with an uncompressed texture where each texel corresponds to a block, or to output the compressed blocks to an uncompressed texture buffer, and then copy the compressed blocks from that intermediate memory location to the final compressed texture.

Each of the graphics APIs expose this functionality in a different way. This document explains the options available under the following APIs:

IERAE CTF 2024 - Intel CET Bypass Challenge

IERAE CTF had one of the coolest pwn challenges I've done in the while. It was written by hugeh0ge.

Here's the full source:

// gcc chal.c -fno-stack-protector -static -o chal
#include <stdio.h>
#include 
@TolyanDimov
TolyanDimov / whatsapp-full-screen.user.js
Last active August 20, 2024 07:39
Enable full-screen mode for WhatsApp Web on larger screens
// ==UserScript==
// @name whatsapp-full-screen
// @namespace http://tampermonkey.net/
// @version 1.0
// @description Enable full-screen mode for WhatsApp Web on larger screens
// @author tolyandimov
// @match https://web.whatsapp.com/
// @icon https://www.google.com/s2/favicons?sz=64&domain=whatsapp.com
// @grant none
// ==/UserScript==
import struct, time
## This experiment demonstrates that the claimed "hash" (that is not a hash) used
## by the L2 cache ECC debug feature used by Operation Triangulation is not secure,
## and can be trivially reverse engineered by anyone who owns one of the machines
## with the hardware (such as any M1 Mac), in seconds to days. Therefore, this proves
## that no "insider" access or leak is necessary to obtain this table, and that the
## attackers most likely did exactly the same thing.
## This is the "black box", i.e. the hardware: The table is not exposed to the caller.
class BlackBox:
@Swyter
Swyter / farmer-notes.txt
Last active September 2, 2023 03:38
Sphinx -- Heliopolis Farmer Brothers scripting notes
HT_Objective_Hel_Exterior_Farm_PlotTime: in-game timestamp in seconds when they originally started to dig
(gettimer - gPlotTime > 300 seconds) means done
HT_Objective_Hel_Exterior_Farm_FarmerState: 0 = waiting for player to kill all eyes,
1 = waiting in the hut to pick a plot,
2 = walking to farm plot,
3 = digging,
4 = walking back to hut,
5 = waiting for player to give reward
HT_Objective_Hel_Exterior_Farm_Plot: Active/current plot index, from 1 to 16 (this and the one below are set by each plot context action)
HT_Objective_Hel_Exterior_Farm_PlotList: bitfield of spent/dug plots, the set bit index comes from the Farm_Plot objective
@JiayinCao
JiayinCao / tiny_fiber.h
Last active May 20, 2025 13:13
Tiny Fiber ( A razor thin cross platform fiber library )
/*
MIT License
Copyright (c) 2023 Jiayin Cao
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is

v34 - Beyond Good and Evil - Symbolicated PS2 proto .elf
v36 - King Kong - (0xB398CC66 XOR key for headers) - Symbolicated .elf
v36 - Rayman Raving Rabbids - (0xB398CC66 XOR key for headers) - Symbolicated .elf
v36 - Rayman Raving Rabbids 2 - (0xB398CC66 XOR key for headers) - Multiple symbolicated .elf
v37 - Prince of Persia: The Sands of Time - PS2 proto symbol map file
v38 - Prince of Persia: Warrior Within -
v38 - Prince of Persia: The Two Thrones -
v42 - TMNT -
v42 - My Word Coach - Symbolicated .elf, unpacked data, uncompiled AI scripts
v42 - My Spanish Coach -

@DavidBuchanan314
DavidBuchanan314 / widevine_fixup.py
Last active September 13, 2024 21:45
Patch aarch64 widevine blobs from ChromeOS to work on non-ChromeOS linux, including platforms with 16K page size like Apple Silicon / Asahi Linux
"""
MIT License
Copyright (c) 2023 David Buchanan
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
@Swyter
Swyter / fixes.sh
Last active December 6, 2022 07:26
mab-warband-macos-binary-patches.txt
sh <<EOF && sh -c "# swy: zsh in catalina+ doesn't support inline comments: https://apple.stackexchange.com/a/405317"
# swy: needed for sed to stop complaining about the wholy unsupported hexadecimal literals
export LANG=C
export LC_ALL=C
# swy: go into the game's binary folder
cd ~/'Library/Application Support/Steam/steamapps/common/MountBlade Warband/Mount and Blade.app/Contents/MacOS'
# swy: turn their ../../.. hack into the harmless .//.//./ without changing the length of the string
sed -i '' 's|\.\./\.\./\.\.|\.//\.//\./|g' ./'Mount and Blade'
@Swyter
Swyter / listado-sds.md
Last active June 5, 2025 10:36
Listado de descargas de versiones antiguas de ContaSol, FactuSol, TPVSol y NominaSol de la compañia Software DELSOL