Skip to content

Instantly share code, notes, and snippets.

@illusion0001
illusion0001 / nativeUpdater.java
Created June 21, 2024 07:09 — forked from ethylamine/nativeUpdater.java
Analyzes and updates native addresses for GTA V on PS4, based on 2much4u's IDA script
//Analyzes and updates native addresses for GTA V on PS4, based on 2much4u's IDA script
//@author ethylamine
//@category Analysis
import ghidra.app.script.GhidraScript;
import ghidra.program.model.util.*;
import ghidra.program.model.reloc.*;
import ghidra.program.model.data.*;
import ghidra.program.model.block.*;
import ghidra.program.model.symbol.*;
# Install the GitHub CLI tool by following the instructions in the official documentation: https://cli.github.com/manual/installation
# Make sure you auth first to github with 'gh auth login'
# Powershell version
$REPO_OWNER = "OWNER"
$REPO_NAME = "REPO_NAME"
$PAGE = 1
while ($true) {
# Retrieve a page of artifacts
$ART_EXIST = gh api "repos/$REPO_OWNER/$REPO_NAME/actions/artifacts?per_page=100&page=$PAGE" | ConvertFrom-Json
@illusion0001
illusion0001 / is_bad_mem_ptr.cpp
Last active February 23, 2025 07:09 — forked from rkr35/is_bad_mem_ptr.cpp
Re-wrote Boldarev's C-like version into C++. Compile for Clang CL. Description from Artem Boldarev's original Gist: "A safer replacement for the obsolete IsBadReadPtr() and IsBadWritePtr() WinAPI functions on top of VirtualQuery() which respects Windows guard pages and does not use SEH."
// https://gist.github.com/rkr35/79264c540856849a4cfa7f9edcbc493e/
// Adjusted and fixed to compile on clang-cl (missing address())
// Static usage for including in multiple files
/*
Copyright (c) 2017 Artem Boldarev <[email protected]>
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,