Trainer Question

Discussion in 'Code Snippets and Tutorials' started by Fexxel, May 24, 2009.

  1. Fexxel

    Fexxel Level IV

    Joined:
    Jan 28, 2009
    Messages:
    959
    Likes Received:
    26
    Alright... *Takes a deep breathe*
    The only answer I've found is that I have to "manipulate the browser process" and "WriteProcessMemory"
    Unfortunately, I don't know how to do either of them. (And yeah, I've already googled it)
    So, how do I manipulate the browser process?
    If you have a code snippet or something that could help me understand how to do this that'd be AMAZING.
    If you can answer this question, that would also be awesome.
    I've been looking for a week now. I can't find an answer. PLEASE HELP!
     
  2. Freya

    Freya Level III

    Joined:
    May 18, 2009
    Messages:
    437
    Likes Received:
    12
    ähm is this like the same problem I have at the moment... that you can't just "post" to start a course at the mystery island training school... Or is it something completly different? (not really getting what you wnat)
     
  3. Zer0

    Zer0 Level IV

    Joined:
    Mar 2, 2008
    Messages:
    3,037
    Likes Received:
    180
    Location:
    Home sweet home
    Um what? Why the heck would you ever need to modify the memory?
    GET/POSTS do work... You're probably doing something wrong if they don't...
     
  4. Fexxel

    Fexxel Level IV

    Joined:
    Jan 28, 2009
    Messages:
    959
    Likes Received:
    26
    Um, yeah, I know get/post works... Except I'm making a FLASH trainer?
    And my modify the memory I mean like setting values.
    ---
    Anyways, question has just been answered, so now I have a new question! Woot!
    How do I retrieve a variable value? Heres a good example:
    In potato counter, the answer is the value.
    How do I retrieve that value?
     
  5. Zer0

    Zer0 Level IV

    Joined:
    Mar 2, 2008
    Messages:
    3,037
    Likes Received:
    180
    Location:
    Home sweet home
    Um, memory hacking is very messy with Flash since flash encrypts its variables (I think...)
    I strongly suggest not going along that path...
     
  6. Fexxel

    Fexxel Level IV

    Joined:
    Jan 28, 2009
    Messages:
    959
    Likes Received:
    26
    I just need to get through the whole .translate (variable stuff here) thing...
    Unless someone has done it already... *COUGH COUGH*
     
  7. ricky92

    ricky92 Administrator
    Staff Member

    Joined:
    Nov 10, 2006
    Messages:
    1,866
    Likes Received:
    67
    Instead of accessing the memory, you can just work on a managed Flash object you can create in a vb form. Basically what you could do is load the swf of the game and pass all the parameters to the swf object in vb, and then use that object's native properties and functions to manipulate the game data... Add a reference to the Adobe Shockwave Player COM object (I think it's something like that, can't remember exactly) and drag'n'drop it on your form, then work directly on it.
     
  8. Fexxel

    Fexxel Level IV

    Joined:
    Jan 28, 2009
    Messages:
    959
    Likes Received:
    26
    Except, I've already done that.
    general-games-f59/learn-to-fly-hacked-t26001.html
    You go to project > reference > com > shock wave
    then enable the toolbar, then create the shockwave form. Then set the movie property as the url, yatta yatta, then call processes. That's where I need help.
    For example, on my Learn to Fly trainer:
    call process flash1(I renamed it).setvalue("cash", textbox1.text)
    So it sets the value cash to the value in textbox1
    My question is how to retrieve data.
    (Going back to my example), the answer in potato counter.
    ---
    Anyways, Ricky gregoden52 was looking or you. He had a problem with his ABer (I believe it was gregoden at least)
     
  9. ricky92

    ricky92 Administrator
    Staff Member

    Joined:
    Nov 10, 2006
    Messages:
    1,866
    Likes Received:
    67
    Code (Text):
    1. flash1.getvalue('valueyouwanttoretrieve')
    ... maybe?
     
  10. zav75

    zav75 Level I

    Joined:
    Feb 28, 2007
    Messages:
    76
    Likes Received:
    6
    Location:
    Canada, Province of Québec
    Do you guys think it would be possible to just use a memory editor as CheatEngine to change the score ? Even is they change it with some formula, it's always the same formula hardcoded in the flash.
     
  11. tharoux

    tharoux Level IV

    Joined:
    Dec 30, 2006
    Messages:
    2,733
    Likes Received:
    126
    Location:
    In front of my PC, Montreal
    Since most of the flash games now have encrypted variables, it's impossible to modify them with CE or any memory editor software.
    Can't modify what you can't find ;)
     
  12. Zer0

    Zer0 Level IV

    Joined:
    Mar 2, 2008
    Messages:
    3,037
    Likes Received:
    180
    Location:
    Home sweet home
    That's true for versions of Flash after v8(? not 100% sure)
    So all you have to do is get a version prior to v8 in order to memory hack. Of course, this means that some games will not be available for play.
     
  13. Fexxel

    Fexxel Level IV

    Joined:
    Jan 28, 2009
    Messages:
    959
    Likes Received:
    26
    So... To display:

    flash1.getvalue("valuename")
    set label1.text as "valuename.value"

    or rather

    flash1.getvalue("valuename")
    label1.text = "valuename.value"

    ? Thanks for all the help Ricky :-D
     
  14. tharoux

    tharoux Level IV

    Joined:
    Dec 30, 2006
    Messages:
    2,733
    Likes Received:
    126
    Location:
    In front of my PC, Montreal
    To get all those field name, I guess you're using Action Script Viewer or something similar ?
     
  15. Fexxel

    Fexxel Level IV

    Joined:
    Jan 28, 2009
    Messages:
    959
    Likes Received:
    26
    SWF decompiler.
    :)
    ----
    Ricky:
    (Using the example of getvalue)
    Code (Text):
    1. translator.addTextField(this.correctanswer_txt, {htmlText: _level0. IDS_CORRECTANSWER})
    You might recognize that, it's from potato count. Now, I realize that that is for the GUI, but it was the only thing that showed up when I searched "answer".
    So pretty much it adds a text field? However, is the information I need for the answer in "IDS_CORRECTANSWER" or "this.correctanswer_txt". So, would I do,
    call flash2.getvalue("this.correctanswer", label1)
    ?
     
  16. Freestyle

    Freestyle Level II

    Joined:
    Oct 21, 2007
    Messages:
    235
    Likes Received:
    8
    For one that isnt the variable to get the potato count.

    Second vb6:

    strArray = Flash.GetVariable("_level10.aEKZ")
    strHold1 = GetBetween(strArray, "", ",")
    strHold2 = GetBetween(strArray, trHold1 & ",", ",")
    strHold3 = GetBetween(strArray, strHold1 & "," & strHold1 & ",", ",")
    strAnswer = Int(strHold3) / Int(strHold1)
    lblAnswer.Caption = strAnswer

    might be the same for vb.net?
     
  17. Fexxel

    Fexxel Level IV

    Joined:
    Jan 28, 2009
    Messages:
    959
    Likes Received:
    26
    Free:

    Code (Text):
    1. Error   1   Name 'strArray' is not declared.    C:\Users\Carter\Documents\Visual Studio 2008\Projects\multitrainer\multitrainer\Form1.vb    15  9   multitrainer
    2. Error   2   Name 'Flash' is not declared.   C:\Users\Carter\Documents\Visual Studio 2008\Projects\multitrainer\multitrainer\Form1.vb    15  20  multitrainer
    3. Error   3   Name 'strHold1' is not declared.    C:\Users\Carter\Documents\Visual Studio 2008\Projects\multitrainer\multitrainer\Form1.vb    16  9   multitrainer
    4. Error   4   Name 'GetBetween' is not declared.  C:\Users\Carter\Documents\Visual Studio 2008\Projects\multitrainer\multitrainer\Form1.vb    16  20  multitrainer
    5. Error   5   Name 'strArray' is not declared.    C:\Users\Carter\Documents\Visual Studio 2008\Projects\multitrainer\multitrainer\Form1.vb    16  31  multitrainer
    6. Error   6   Name 'strHold2' is not declared.    C:\Users\Carter\Documents\Visual Studio 2008\Projects\multitrainer\multitrainer\Form1.vb    17  9   multitrainer
    7. Error   7   Name 'GetBetween' is not declared.  C:\Users\Carter\Documents\Visual Studio 2008\Projects\multitrainer\multitrainer\Form1.vb    17  20  multitrainer
    8. Error   8   Name 'strArray' is not declared.    C:\Users\Carter\Documents\Visual Studio 2008\Projects\multitrainer\multitrainer\Form1.vb    17  31  multitrainer
    9. Error   9   Name 'trHold1' is not declared. C:\Users\Carter\Documents\Visual Studio 2008\Projects\multitrainer\multitrainer\Form1.vb    17  41  multitrainer
    10. Error   10  Name 'strHold3' is not declared.    C:\Users\Carter\Documents\Visual Studio 2008\Projects\multitrainer\multitrainer\Form1.vb    18  9   multitrainer
    11. Error   11  Name 'GetBetween' is not declared.  C:\Users\Carter\Documents\Visual Studio 2008\Projects\multitrainer\multitrainer\Form1.vb    18  20  multitrainer
    12. Error   12  Name 'strArray' is not declared.    C:\Users\Carter\Documents\Visual Studio 2008\Projects\multitrainer\multitrainer\Form1.vb    18  31  multitrainer
    13. Error   13  Name 'strHold1' is not declared.    C:\Users\Carter\Documents\Visual Studio 2008\Projects\multitrainer\multitrainer\Form1.vb    18  41  multitrainer
    14. Error   14  Name 'strHold1' is not declared.    C:\Users\Carter\Documents\Visual Studio 2008\Projects\multitrainer\multitrainer\Form1.vb    18  58  multitrainer
    15. Error   15  Name 'strAnswer' is not declared.   C:\Users\Carter\Documents\Visual Studio 2008\Projects\multitrainer\multitrainer\Form1.vb    19  9   multitrainer
    16. Error   16  Name 'strHold3' is not declared.    C:\Users\Carter\Documents\Visual Studio 2008\Projects\multitrainer\multitrainer\Form1.vb    19  25  multitrainer
    17. Error   17  Name 'strHold1' is not declared.    C:\Users\Carter\Documents\Visual Studio 2008\Projects\multitrainer\multitrainer\Form1.vb    19  41  multitrainer
    18. Error   18  Name 'lblAnswer' is not declared.   C:\Users\Carter\Documents\Visual Studio 2008\Projects\multitrainer\multitrainer\Form1.vb    20  9   multitrainer
    19. Error   19  Name 'strAnswer' is not declared.   C:\Users\Carter\Documents\Visual Studio 2008\Projects\multitrainer\multitrainer\Form1.vb    20  29  multitrainer
    20.  
    They are NOT the same. xD You'd need to define all of them.
    ---
    Your value is _level10.aEKZ ?
    I'll test it now. (Or at least try to)
    ---
    EDIT:
    Code (Text):
    1.     Private Sub getcounteranswer_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles getcounteranswer.Click
    2.         Call AxShockwaveFlash3.GetVariable("_level10.aEKZ")
    3.         counteranswer.Text = "_level10.aEKZ"
    4.     End Sub
    5.  
    Didn't work. It froze the window.