1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.
  2. The forum has been upgraded to a more recent and user-friendly software, called "XenForo".
    It will take some time to get everything set up and running smoothly, so please report any bug you may find to the forum staff.
    Thank you for your patience.

Score Sending Help

Discussion in 'Code Snippets and Tutorials' started by Shawn, Mar 20, 2010.

  1. Shawn

    Shawn Well-Known Member

    Joined:
    Jul 15, 2009
    Messages:
    1,989
    Likes Received:
    76
    Location:
    Somewhere, lah.
    I've been trying to send scores for flash games on a pet site.

    It works like this, when the game is over, this generates a random hash. Then when you click send score, the score is sent in some url with the hash in it. After the score is sent, the hash expires.

    So, I've found the page to generate a new hash, but I dont know how to incorporate this into the URL, to send a score

    the hash page is like, sendhash.php?helloworld=hi&n%5finfo=WAIT
    If I go to the page in my browser, it will display something like:
    &hashkey=d1547bd7014963edfb80ffddd193fb43

    The URL to send score after getting the hash contains all the info, and is like this:
    Code (Text):
    1.  
    2. http://www.site.com/sendscore.php?g=2&s=268&h=17d1d80fa375661185a17aac6592568&myscore=242&myhash=16a9a12e5e671456537c64fda8327155&myhashlen=32&myhashnum=32&numpos=0%2C1%2C3%2C5%2C6%2C8%2C10%2C11%2C12%2C13%2C14%2C15%2C16%2C17%2C18%2C20%2C21%2C25%2C26%2C27%2C28%2C29%2C30%2C31&letpos=2%2C4%2C7%2C9%2C19%2C22%2C23%2C24&mycatch=24&mychar=5&mynum=16912&b=6&EndString=1%2C7%2Cd%2C1%2Cd%2C8%2C0%2Cf%2C%2Ca%2C3%2C7%2C5%2C6%2C6%2C1%2C1%2C8%2C5%2Ca%2C1%2C7%2Ca%2Ca%2Cc%2C6%2C5%2C9%2C2%2C5%2C6%2C8&i=32&EndStringLen=0&FinalString=17d1d80fa375661185a17aac6592568&e=32&thischar=8
    3.  
    I know that the values:
    g: is for game ID
    s: is the score to be sent
    myhash: is for the hash generated
    myhashlen: should be for the number of charaters in the hash

    can't figure out what others stand for.
     
  2. tharoux

    tharoux Well-Known Member

    Joined:
    Dec 30, 2006
    Messages:
    2,733
    Likes Received:
    126
    Location:
    In front of my PC, Montreal
    The rest is probably a function in the flash file directly.
    You'll have to download the flash game and extract the Action Script with a SWF decompiler to see all the code hidden in there. From there, you'll be able to see how they constructed the final URL to send the score.
    It's far from easy. And that's the reason why there's not many scoresenders for neopets either.
     
  3. Shawn

    Shawn Well-Known Member

    Joined:
    Jul 15, 2009
    Messages:
    1,989
    Likes Received:
    76
    Location:
    Somewhere, lah.
    Where can I get a decompiler that's good?
    So I can't just SS by getting a fresh hash and changing value in the URL eh
     
  4. tharoux

    tharoux Well-Known Member

    Joined:
    Dec 30, 2006
    Messages:
    2,733
    Likes Received:
    126
    Location:
    In front of my PC, Montreal
    I think it's called SoThink or something like this...
    search for SWF decompiler.
    But it's more than just changing hash ;)
     

Share This Page