Hacking Pygecko: how to run OSFatal?

H0neyBadger

Well-Known Member
OP
Newcomer
Joined
Oct 4, 2015
Messages
96
Trophies
0
XP
505
Country
France
Hello,
I try to run the OSFatal function from pygecko.
I tried the following code, without success.

Code:
tcp = TCPGecko("192.168.1.1")
OSFatal = tcp.get_symbol('coreinit.rpl', 'OSFatal')
print(OSFatal("hello pygecko"))


Traceback (most recent call last):
  File ".\hello_world.py", line 42, in <module>
  print(OSFatal("hello pygecko"))
  File "C:\wiiu\libwiiu\pyGecko\tcpgecko.py", line 353, in __call__
  return self.rpc.call(self.address, *args) #Pass in arguments, run address
  File " C:\wiiu\libwiiu\pyGecko\tcpgecko.py", line 241, in call
  request = struct.pack(">I8I", address, *arguments)
struct.error: cannot convert argument to integer

Then I tried to convert the python2.7 string into integer, but unfortunately system crash in a mess of pixels.

Somebody have an example of python code?
 

BullyWiiPlaza

Nintendo Hacking <3
Member
Joined
Aug 2, 2014
Messages
1,932
Trophies
0
XP
2,477
Country
Germany
Code:
print(OSFatal("hello pygecko"))
This is the error I believe.

You don't do it like that, OSFatal() shouldn't be nested in a print() statement.
 

H0neyBadger

Well-Known Member
OP
Newcomer
Joined
Oct 4, 2015
Messages
96
Trophies
0
XP
505
Country
France
Code:
print(OSFatal("hello pygecko"))
This is the error I believe.

You don't do it like that, OSFatal() shouldn't be nested in a print() statement.

The nested print doesn’t matter. It print the value returned by the OSFatal function in python console.
But thanks for the advice.
 

H0neyBadger

Well-Known Member
OP
Newcomer
Joined
Oct 4, 2015
Messages
96
Trophies
0
XP
505
Country
France
No, OSFatal is not in tcp gecko. But pygecko allow us to run rpl symbols through python code.

Indeed, I often forget the imports in my code samples.
Code:
from tcpgecko import TCPGecko
tcp =TCPGecko("192.168.1.1")
OSFatal= tcp.get_symbol('coreinit.rpl','OSFatal')
OSFatal("hello pygecko")
There is no need to import OSFatal since the get_symbol return a function.
I have good knowledges in python. And it’s probably my main problem because I don’t really know others languages (and English is the first one)
 

H0neyBadger

Well-Known Member
OP
Newcomer
Joined
Oct 4, 2015
Messages
96
Trophies
0
XP
505
Country
France
Did you look at NW_Player's pastebin?
http://pastebin.com/3YYMUzTx

Yes, This file is basically the (partial) source of pygecko. https://github.com/wiiudev/pyGecko/blob/master/tcpgecko.py

The examples provided in sources are based on pokemem or readmem.
https://github.com/wiiudev/pyGecko/blob/master/octoling.py


The most significant example of symbol import can be found in FS* functions
https://github.com/wiiudev/pyGecko/blob/master/tcpgecko.py#L147
https://github.com/wiiudev/pyGecko/blob/master/tcpgecko.py#L161
I think I have to work from this base.

But if somebody has the solution … any help is appreciated.
Thanks a lot guys!
 
Last edited by H0neyBadger,

Site & Scene News

Popular threads in this forum

General chit-chat
Help Users
    Psionic Roshambo @ Psionic Roshambo: https://www.youtube.com/watch?v=A0FyqCEfD0E