Skip to content

Instantly share code, notes, and snippets.

View MustCodeAl's full-sized avatar

Albert MustCodeAl

  • Chicago, Illinois
  • 07:42 (UTC -05:00)
View GitHub Profile
@erikreagan
erikreagan / mac-apps.md
Created August 4, 2012 19:18
Mac developer must-haves

Mac web developer apps

This gist's comment stream is a collection of webdev apps for OS X. Feel free to add links to apps you like, just make sure you add some context to what it does — either from the creator's website or your own thoughts.

— Erik

@BlakeGardner
BlakeGardner / install nano.sh
Last active July 8, 2024 03:56
Syntax highlighting in nano on Mac OS
# Last updated May, 2024 for Apple silicon Macs
# Install Homebrew if you don't already have it: https://brew.sh
# install nano from homebrew
brew install nano nanorc
# update your nanorc file
echo 'include "'"$(brew --cellar nano)"'/*/share/nano/*.nanorc"' >> ~/.nanorc
# close and re-open your terminal and you'll have syntax highlighting

Postfix macros in Rust

The problem

Rust has many postfix combinators, for example the .unwrap_or(x) and .unwrap_or_else(|| x) functions. They are useful if you want to extract some value from an optionally present value, or if not, provide an alternative value. It's really nice and tidy to read:

@MustCodeAl
MustCodeAl / mac-apps.md
Last active November 30, 2023 05:19 — forked from erikreagan/mac-apps.md
Mac developer must-haves

Mac web developer apps

This gist's comment stream is a collection of webdev apps for OS X. Feel free to add links to apps you like, just make sure you add some context to what it does — either from the creator's website or your own thoughts.

— Erik

On offsets

After the recent release of ps5-kstuff with support for PS4 fpkg files, there is a lot of questions about porting this to other firmwares (4.50 and 4.51 are important in particular, because users of those firmwares can't update to 4.03, but they are still vulnerable to all of the used exploits). The main problem with these ports it the bespoke XOM, which prevents finding the offsets by simply examining the dumps. So in this document I'm going to go over what offsets are important for ps5-kstuff, and how I found them for 4.03.

These are the main categories of offsets:

  1. Kernel data offsets, those can be found from data dumps that are not XOM-protected
  2. Kernel text offsets pointed to by kernel data
  3. doreti_iret offset (that's one offset, but it deserves its own word)
  4. Offsets found from single-stepping of kernel functions