Python Tools for 3DS

Discussion in '3DS - Homebrew Development and Emulators' started by Rinnux, Jan 3, 2014.

  1. Rinnux
    OP

    Rinnux GBAtemp Advanced Fan

    Member
    655
    313
    Aug 3, 2010
    United States
    Sorry if this has already been posted. But someone named naehrwert has released some python tools. I don't know what it does but I thought I should post a thread about it

    https://github.com/naehrwert/p3ds
     
    frown, SLiV3R and yuyuyup like this.


  2. Felipe_9595

    Felipe_9595 GBAtemp Fan

    Member
    334
    89
    Dec 26, 2010
    Cote d'Ivoire
    I might actually get a 3ds witha gateway just for this lol
     
  3. Snailface

    Snailface My frothing demand for 3ds homebrew is increasing

    Member
    4,324
    1,983
    Sep 20, 2010
    Engine Room with Cyan, watching him learn.
    I mentioned this in the Fierce Waffle ram dump thread. He is working with naehrwert to get an open homebrew solution going on the 3ds by reversing the GW launcher.dat and gaining code execution. They each have their own separate repos for their projects although naehrwert is the author of these scripts.

    The python scripts serve two purposes. One generates a Ram Dumping launcher.dat not unlike Fierce Waffle's. The second, 3dsploit, also generates a launcher.dat but this one loads a 'PAYLOAD' string* of ARM11 assembly presumably to do 'fun things' with 3ds. I'm not sure if this is in kernel mode or not, maybe someone could clarify that or any other lie I've might have told in this post.

    *its empty, presumably for the user to fill in their own 133t haxx
     
    emo kid 68 likes this.
  4. Kane49

    Kane49 GBAtemp Fan

    Member
    449
    232
    Nov 4, 2013
    Gambia, The
  5. json

    json MUSCLEMAN

    Member
    693
    780
    Aug 9, 2013
    Burkina Faso

    0x51234514
    0x11123456
    0x81451243

    :P
     
    xXdeltaXx, minexew, LimeWan and 6 others like this.
  6. Kane49

    Kane49 GBAtemp Fan

    Member
    449
    232
    Nov 4, 2013
    Gambia, The
  7. Kane49

    Kane49 GBAtemp Fan

    Member
    449
    232
    Nov 4, 2013
    Gambia, The
  8. aliak11

    aliak11 Pokemon Master

    Member
    195
    308
    Dec 5, 2010
    United States
    Florida
    How do I compile the python file into the Lancher.dat file?
     
  9. aliak11
    This message by aliak11 has been removed from public view by Cyan, Jan 7, 2014, Reason: double post.
    Jan 5, 2014
  10. Snailface

    Snailface My frothing demand for 3ds homebrew is increasing

    Member
    4,324
    1,983
    Sep 20, 2010
    Engine Room with Cyan, watching him learn.
    Find these lines at the end of the script and remove the #'s to uncomment them.

    #f = open("Launcher.dat", "wb")
    #f.write(rop)
    #f.close()

    Then run the script to generate the launcher.dat
     
  11. aliak11

    aliak11 Pokemon Master

    Member
    195
    308
    Dec 5, 2010
    United States
    Florida
    Thank you.
     
  12. aliak11

    aliak11 Pokemon Master

    Member
    195
    308
    Dec 5, 2010
    United States
    Florida
    After I add ARM code it will not compile, can someone help?
     
  13. Kane49

    Kane49 GBAtemp Fan

    Member
    449
    232
    Nov 4, 2013
    Gambia, The

    Uhm what do you consider arm code ?
    As i understand it you need to compile the code and encode the bytecode in pythons format :)
     
  14. aliak11

    aliak11 Pokemon Master

    Member
    195
    308
    Dec 5, 2010
    United States
    Florida

    What programs do I use for that?
     
  15. kalimero

    kalimero Uncle Rupee

    Member
    211
    63
    Jun 28, 2006
    Gambia, The
    Can someone explain these addresses?

    ramdump.py

    r.call(0x1B82AC, [0x279000, Ref("fname"), 6], 5)
    r.call(0x1B3B54, [0x279000, 0x279020, 0x100000, 0x300000], 9)

    3dsploit.py

    r.pop_r4(0x279020)
    r.i32(0x1C1958)
    r.i32(0x44444444)
    r.call_lr(0x10C2AC, [0x279024])
     
  16. deoFusion

    deoFusion Member

    Newcomer
    48
    6
    Nov 26, 2005
    If you have to ask all these trivial questions, it's not really intended towards you. You should stop before you brick your console.
     
  17. aliak11

    aliak11 Pokemon Master

    Member
    195
    308
    Dec 5, 2010
    United States
    Florida

    I am trying to learn.
     
  18. deoFusion

    deoFusion Member

    Newcomer
    48
    6
    Nov 26, 2005
    http://gbatemp.net/threads/merry-christmas-have-some-ram-dumping.359697/page-11#post-4871942
    http://pastebin.com/6CGwGKyh
     
  19. Kane49

    Kane49 GBAtemp Fan

    Member
    449
    232
    Nov 4, 2013
    Gambia, The
    #0x279000 is a handle

    Apparently its not :)


    Thanks for the pastie :)
     
  20. Bond697

    Bond697 Dies, died, will die.

    Member
    353
    259
    Jun 7, 2009
    United States
    CT
    no it's not. they're C++ classes. it's a _thiscall. it's this->

    if you were doing this in C++, you wouldn't even see it being passed around.
     
  21. Kane49

    Kane49 GBAtemp Fan

    Member
    449
    232
    Nov 4, 2013
    Gambia, The

    Thanks alot :)