Skip to content

Instantly share code, notes, and snippets.

View balika011's full-sized avatar

Balázs Triszka balika011

View GitHub Profile
@balika011
balika011 / gnomeify.sh
Last active September 10, 2023 10:00
Install Gonme on the Steam Deck instead of KDE Plasma
#!/bin/bash
steamos-readonly disable
pacman-key --init
pacman-key --populate
pacman-key --refresh-keys
pacman -Sy archlinux-keyring
pacman -Syu --overwrite \*
pacman -Syu --overwrite \* baobab cheese eog evince gnome-autoar gnome-backgrounds gnome-bluetooth-3.0 gnome-boxes gnome-calculator gnome-calendar gnome-characters gnome-clocks gnome-color-manager gnome-contacts gnome-control-center gnome-desktop gnome-desktop-4 gnome-desktop-common gnome-disk-utility gnome-epub-thumbnailer gnome-font-viewer gnome-keyring gnome-logs gnome-maps gnome-menus gnome-music gnome-online-accounts gnome-photos gnome-remote-desktop gnome-screenshot gnome-session gnome-settings-daemon gnome-shell gnome-shell-extensions gnome-software gnome-system-monitor gnome-terminal gnome-themes-extra gnome-tweaks gnome-user-docs gnome-user-share gnome-video-effects gnome-weather gvfs gvfs-afc gvfs-goa gvfs-google gvfs-mtp gvfs-nfs gvfs-smb malcontent nautilus orca rygel simple-scan sushi totem tracker3-miners xdg-desktop-portal-gnome xdg-use
#define UNLOADED_FILE 1
#include <idc.idc>
static main(void)
{
// set 'loading idc file' mode
set_inf_attr(INF_GENFLAGS, INFFL_LOADIDC|get_inf_attr(INF_GENFLAGS));
GenInfo(); // various settings
Segments(); // segmentation
Enums(); // enumerations
@balika011
balika011 / xosdmain_decomp.cpp
Created December 12, 2019 09:47
PSX xosdmain decrypter and decompressor
#include <stdio.h>
#include <stdint.h>
#include <elf.h>
#include <string.h>
struct xorInfo
{
uint8_t *xor_table;
uint8_t *xor_ptr;
uint8_t *source;
@balika011
balika011 / PSX_rel.cpp
Last active April 29, 2024 09:25
This tool can be used to decrypt PSX package binaries, like main.rel. (You need to bring your own key!)
#include <stdio.h>
#include <stdint.h>
#include <string.h>
#include <openssl/aes.h>
#include <openssl/rsa.h>
#include <algorithm>
#include <openssl/sha.h>
#pragma pack(push, 1)
struct npCoreKey
@balika011
balika011 / osdsys_decomp.cpp
Last active March 5, 2022 16:50
PS2/PSX OSDSYS and PS2LOGO decompressor
#include <stdio.h>
#include <stdint.h>
#include <elf.h>
#include <string.h>
uint8_t *findDataSegment(uint8_t *buf)
{
Elf32_Ehdr *ehdr = (Elf32_Ehdr *) buf;
Elf32_Shdr *shdr = (Elf32_Shdr *)&buf[ehdr->e_shoff];
@balika011
balika011 / pak.cpp
Created November 14, 2019 04:02
PSX firmware update PAK file unpacker
#include <iostream>
#include <string.h>
#include <sys/stat.h>
#define PACK_MAGIC 0x726b7066 // rpkf
// WTF is KUL?
#pragma pack(push, 1)
struct KUL_PackHeader // 0x10
{
@balika011
balika011 / tx_unpack.py
Created June 24, 2018 23:34
TX SX "OS" unpacking tool with 1.2 support + python 3 hax
from Crypto.Cipher import AES
from Crypto.Util import Counter
import struct, sys
"""
typedef struct boot_dat_hdr
{
unsigned char ident[0x10];
unsigned char sha2_s2[0x20];
unsigned int s2_dst;