Skip to content

Instantly share code, notes, and snippets.

View pedro-javierf's full-sized avatar
🪐

Pedro Javier pedro-javierf

🪐
View GitHub Profile
@pedro-javierf
pedro-javierf / Ghidra 9.2.2 extension trace
Created February 21, 2021 13:57
Log trace Ghidra extension issue
OpenJDK 64-Bit Server VM warning: Archived non-system classes are disabled because the java.system.class.loader property is specified (value = "ghidra.GhidraClassLoader"). To use archived non-system classes, this property must not be set
INFO Using log config file: jar:file:/D:/GHIDRA/ghidra_9.2.2_PUBLIC_20201229/ghidra_9.2.2_PUBLIC/Ghidra/Framework/Generic/lib/Generic.jar!/generic.log4j.xml (LoggingInitialization)
INFO Using log file: C:\Users\Pedro\.ghidra\.ghidra_9.2.2_PUBLIC\application.log (LoggingInitialization)
INFO Loading user preferences: C:\Users\Pedro\.ghidra\.ghidra_9.2.2_PUBLIC\preferences (Preferences)
INFO Loading previous preferences: C:\Users\Pedro\.ghidra\.ghidra_9.1.2_PUBLIC\preferences (Preferences)
INFO Class search complete (759 ms) (ClassSearcher)
INFO Initializing SSL Context (SSLContextInitializer)
INFO Initializing Random Number Generator... (SecureRandomFactory)
INFO Random Number Generator initialization complete: SHA1PRNG (SecureRandomFactory)
INFO Trust
@pedro-javierf
pedro-javierf / NTRGhidra stack trace
Last active February 20, 2021 21:28
Stack trace of NTRGhidra ARM9 analysis issue
WARNING: Use --illegal-access=warn to enable warnings of further illegal reflective access operations
WARNING: All illegal access operations will be denied in a future release
INFO Packed database cache: C:\Users\Pedro\AppData\Local\Ghidra\packed-db-cache (PackedDatabaseCache)
ERROR Unexpected exception (DecompilerSwitchAnalyzer) java.util.concurrent.ExecutionException: java.lang.NullPointerException
at java.base/java.util.concurrent.FutureTask.report(FutureTask.java:122)
at java.base/java.util.concurrent.FutureTask.get(FutureTask.java:191)
at generic.concurrent.QResult.<init>(QResult.java:40)
at generic.concurrent.FutureTaskMonitor.run(FutureTaskMonitor.java:78)
at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1128)
at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:628)
at ghidra.app.script.GhidraScript.parseFile(GhidraScript.java:1855)
at ghidra.app.script.GhidraScript.loadAskValue(GhidraScript.java:1894)
at ghidra.app.script.GhidraScript.loadAskValue(GhidraScript.java:1871)
at ghidra.app.script.GhidraScript.askFile(GhidraScript.java:2021)
at AutoCreateMultipleLibraries.run(AutoCreateMultipleLibraries.java:384)
at ghidra.app.script.GhidraScript.executeNormal(GhidraScript.java:365)
at ghidra.app.script.GhidraScript.doExecute(GhidraScript.java:220)
at ghidra.app.script.GhidraScript.execute(GhidraScript.java:198)
at ghidra.app.util.headless.HeadlessAnalyzer.runScript(HeadlessAnalyzer.java:580)
at ghidra.app.util.headless.HeadlessAnalyzer.runScriptsList(HeadlessAnalyzer.java:918)
#include <stdio.h>
#include <nds.h>
/*
Based On: https://wiki.newae.com/V3:Tutorial_A3_VCC_Glitch_Attacks
Careful, glitches in the h loop won't be noticed
*/
int main(void){
@pedro-javierf
pedro-javierf / fcram_strings_full_with_offset.txt
Created September 1, 2019 15:17
strings -t x -a fcram.bin > fcram_strings_full_with_offset.txt; Result 2579 Kb
This file has been truncated, but you can view the full file.
841e6 VN PBN
8422b "`R(
84350 "PAL"`aL"p
8603b =gf>A
86354 ff>B
8706c ef&A
8728b =333@
87c63 =333@
87c83 =333@
88803 =333A
@pedro-javierf
pedro-javierf / Snippet2.cpp
Last active December 23, 2016 11:22
C++ example routine to parse client packets
bool connectionManager(int socket)
{
// The number of bytes I send/read ... will also serve as my error code
int nBytes;
//Buffer where we will store received data. it's firstly filled with trash
std::string buffer(32, 0xcc);
for (;;)
{
/*Call the recv function, will receive a 32 bytes package
@pedro-javierf
pedro-javierf / Snippet.cpp
Last active December 22, 2016 20:44
Simple C++ Server Side Multithread snippet
clientSocket = accept(serverSocket, 0, 0);
// Check for errors
if (clientSocket == SOCKET_ERROR)
{
pfail("Accept Failed!");
}
else
{
std::cout << "New connection done." << std::endl;
std::thread p(connectionManager, (int)clientSocket);
@pedro-javierf
pedro-javierf / main.c
Last active September 9, 2016 18:16
VitaShell RW Test for darkmet
//Profit?
void *buf = malloc(0x100);
int i;
if (pressed_buttons & SCE_CTRL_LTRIGGER)
{
vshIoUmount(0x100, 0, 0, 0); // id, unk1, unk2, unk3 (flags ?)
_vshIoMount(0x100, 0, 2, buf); // id, unk, permission, work_buffer
@pedro-javierf
pedro-javierf / main.c
Last active August 24, 2016 21:30
Memory pattern searcher test
//Should work using only C pointers
#define PATTERNBYTE1 0xAA
#define PATTERNBYTE2 0xBB
#define PATTERNBYTEC 0xCC
int main(void)
{
char *pointer=(char*)0x20000000; //Framebuffer address is over this address
char *Address_of_thing_were_searching_for = 0;// 0 = NULL
@pedro-javierf
pedro-javierf / main.c
Last active October 13, 2023 14:09
PSVita Ram Dump Test
#include "fcntl.h"
#define VITA_RAM_SIZE 536870912 //512 megabytes
int main()
{
int err1, err2, y,x;
//Open dump file
err1 = sceIoOpen("ramdump.dat", 0, "wb");
if(!err1<0){return 1;}