Created
October 3, 2018 13:22
-
-
Save zachhilman/12c383b43e3bf85cefa9627ebb93b20d to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Undefined or Questionable Behavior Test of IPSwitch | |
// Written by DarkLordZach (C) 2018 | |
@nsobid-AABBCCDD // Pls don't actually patch something with this | |
// Goal: break everything | |
// Patch 1 | |
@disabled | |
00000000 "" | |
00000000 "\"\\\t" | |
00000000 "this string contains a \\ comment " \\ this comment contains a "string" | |
FFFFFFFF "trying to buffer overflow" | |
// Patch 2 | |
@flag offset_shift 0xFFFFFFFF | |
@flag print_values | |
@enabled | |
@flag doesnt exist with escape \t and comments \\ comment | |
FFFFFFFF "where will this apply? offset 0xFFFFFFE? \\ who knows" \\ lol comment | |
@flag offset_shift 0 // change mid-patch should work | |
00000000 FFFFFFFF | |
@flag offset_shift -0xFFFFFFFF // lets see what type you're using to store this | |
00000000 "where will this go" | |
FFFFFFFF "what about this" | |
// Patch 3 | |
// Patch 4 | |
@disabled | |
@enabled // This should make two patches with name "Patch 4", one empty/disabled, one with one entry and enabled | |
00000000 12 | |
# Test Parsed Successfully | |
// NSO Build ID: 0xAABBCCDD | |
// Expected Output (IL): | |
// - Patch 1 (disabled) | |
// replace offset 0x0 with contents of string `this string contains a \\ comment ` | |
// replace offset 0xFFFFFFFF with contents of string `trying to buffer overflow` | |
// - Patch 2 (enabled) | |
// replace offset 0xFFFFFFFE with contents of string `where will this apply? offset 0xFFFFFFE? \\ who knows` | |
// replace offset 0x1 with contents of string `where will this go` | |
// replace offset 0x0 with contents of string `what about this` | |
// - Patch 4 (disabled) | |
// - Patch 4 (enabled) | |
// replace offset 0x0 with 0x12 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment