Hacking PyGecko coreinit.rpl OSLogRetrieve

H0neyBadger

Well-Known Member
OP
Newcomer
Joined
Oct 4, 2015
Messages
96
Trophies
0
XP
505
Country
France
Hello,
I try to translate the rpc.py’s get_logs function into PyGecko call.
But the log size is always null "0".

Code:
import struct
from binascii import hexlify

tcp = TCPGecko("192.168.1.100")

def get_logs(filename='logdump.bin', save_addr=0x1e800000):
    address = save_addr
    for x in range(0,32):
        tcp.pokemem(address, 0x00000000)
        address += 4
       
    #OSLogRetrieve = tcp.get_symbol('coreinit.rpl', 'OSLogRetrieve')
    #result = OSLogRetrieve((1<<11)|(1<<12), save_addr, 0x01000000)
    result = tcp.function('coreinit.rpl', 'OSLogRetrieve', False, 0, (1<<11)|(1<<12), save_addr, 0x01000000)
    size = int(hexlify(tcp.readmem(save_addr, 4)),16)
    print("OSLogRetrieve result:{0}".format(result))
    print("OSLogRetrieve size:{0}!".format(size))
    logs = []
    if size:
        for addr in range(save_addr, save_addr + size, 500):
            print(addr)
            logs += list(tcp.readmem(addr, 4))
            print(logs)

        dump = open(filename, 'wb')
        for word in logs:
            print(word)
            dump.write(struct.pack(">I", word))
        dump.close()


get_logs()
tcp.s.close()
print("Done.")

Did I miss something?
 

Site & Scene News

Popular threads in this forum

General chit-chat
Help Users
  • K3Nv2 @ K3Nv2:
    That's not being renewed that's unlocking more medical bills from stds
    +1
  • BigOnYa @ BigOnYa:
    Somethings maybe, but drives are rated in hours, so most likely many hours already on them. I just don't trust em for data. Maybe a used(renewed) car or something be ok tho.
  • K3Nv2 @ K3Nv2:
    I like my girls like my car made in 2000
    +1
  • BigOnYa @ BigOnYa:
    I like my products new, not buying a box of condoms (renewed)
  • K3Nv2 @ K3Nv2:
    You already learned from buying used condoms from the first kid
  • K3Nv2 @ K3Nv2:
    Tyrone said it was barley used
    +1
  • K3Nv2 @ K3Nv2:
    Wonder whatever happened to that ownage pranks guy
  • BigOnYa @ BigOnYa:
    I dont know why people hate on Starfield, I think its dope. I didn't play it day one, only started it couple weeks ago so maybe they fixed issues with updates already.
  • K3Nv2 @ K3Nv2:
    Microsoft could release a poop simulator and people will say it's shit
  • Quincy @ Quincy:
    Hold up hooolddd uuupppp, we're less than a week from PM:TTYD releasing and it has not leaked yet? :o Miracles do still exist in this dystopia 🤣
  • BigOnYa @ BigOnYa:
    True. People hated on Fallout 76 at first also, but they still have huge numbers playing online.
  • BigOnYa @ BigOnYa:
    What is PM:TTYD
  • Quincy @ Quincy:
    Paper Mario: The Thousand-Year Door
  • Psionic Roshambo @ Psionic Roshambo:
    I think I played that one
  • Quincy @ Quincy:
    (i.e. Nintendos' next first party switch title/remake)
  • BigOnYa @ BigOnYa:
    Meh, I want metroid 4
  • Psionic Roshambo @ Psionic Roshambo:
    I have a refurbished hard drive like 8TBs just use it for movies and music so if it blows up nothing I can't replace lol
    +1
  • Quincy @ Quincy:
    I mean almost every first party switch title of the past year or two leaked at least a week in advance for a while now haven't they?
  • BigOnYa @ BigOnYa:
    Not all of them, but yea many.
  • Quincy @ Quincy:
    Metroid prime 4 I wouldn't be surprised if that title will be a SwitchU title (here's hoping Nintendo won't go with such a ridiculous name again)
    +1
  • Quincy @ Quincy:
    Hence me saying almost 🤣
  • Psionic Roshambo @ Psionic Roshambo:
    But for photos and OS and my ROMs not risking it on a refurbished drive lol
  • BigOnYa @ BigOnYa:
    Have you checked both the brew and 2u sites?
  • Quincy @ Quincy:
    But yes I would welcome MP4 too or even 2+3 remaster/HD to hold us over untill MP4
  • Psionic Roshambo @ Psionic Roshambo:
    Switch 2 Switched at birth
    Psionic Roshambo @ Psionic Roshambo: Switch 2 Switched at birth