any help would be greatly appreciated.
Reading application/x-amf data
#1
Posted 14 November 2010 - 06:18 AM
any help would be greatly appreciated.
#2
Posted 14 November 2010 - 07:59 AM
#3
Posted 14 November 2010 - 09:05 AM
I used wireshark, but i didnt need to use PyAMF to get it done... although, i did look into that option.Have you tried WireShark? Otherwise you can use something like PyAMF, send the same requests and you can get the data directly.
Here's what you do...
First i got the packets for the games...
WheelOfExcitement = "\x00\x03\x00\x00\x00\x01\x00\x16\x57\x68\x65\x65\x6c\x53\x65\x72\x76\x69\x63\x65\x2e\x73\x70\x69\x6e\x57\x68\x65\x65\x6c\x00\x02\x2f\x31\x00\x00\x00\x09\x0a\x00\x00\x00\x01\x02\x00\x01\x32"
WheelOfKnowledge = "\x00\x03\x00\x00\x00\x01\x00\x16\x57\x68\x65\x65\x6c\x53\x65\x72\x76\x69\x63\x65\x2e\x73\x70\x69\x6e\x57\x68\x65\x65\x6c\x00\x02\x2f\x31\x00\x00\x00\x09\x0a\x00\x00\x00\x01\x02\x00\x01\x31"
WheelOfMonotony = "\x00\x03\x00\x00\x00\x01\x00\x16\x57\x68\x65\x65\x6c\x53\x65\x72\x76\x69\x63\x65\x2e\x73\x70\x69\x6e\x57\x68\x65\x65\x6c\x00\x02\x2f\x31\x00\x00\x00\x09\x0a\x00\x00\x00\x01\x02\x00\x01\x33"
Im using python (obviously) so those strings are hex codes that simulate the exact packet that is sent. The packets that get sent to the server are EXACTLY the same, every time.
Take that data and send it to http://www.neopets.com/amfphp/gateway.php with the Content-Type as application/x-amf
Im not sure if it was needed, but i also put the refer header in there as-well
WheelOfExcitement = 'http://images.neopets.com/wheels/wheel_of_excitement_v1_a9db9936db.swf'
WheelOfKnowledge = 'http://images.neopets.com/wheels/wheel_of_knowledge_v1_731eafc8f8.swf'
WheelOfMonotony = 'http://images.neopets.com/wheels/wheel_of_mediocrity_v1_c4ed41eb31.swf'
Its basically the url of the swf... Also, be VERY careful spinning the wheel of excitement now, because you can still spin it even though the faerie quest shit is going on xD I got a test account frozen that way -.-
To get the response from the wheel, i did this: (Note that it is in python)
//response = the response returned from opening the url
//response.read() = the html data
resp_hex = response.read().encode("hex")
s = ""
for x in xrange(0, len(resp_hex), 2):
v = int(resp_hex[x:x+2], 16)
if 32 <= v and v <= 126:
s += chr(v)
//This returns a html string that is very easy to parse.
////stripHTML = a function that removes ALL html tags that are present
////GetBetween = a simple function that gets all text between point a and point b, exclusive
winText = stripHTML(GetBetween(s, "<center>", "</center>")))
I do believe that's exactly what your after Just remember who made it :3
~Cody
Edited by Pyro699, 14 November 2010 - 09:12 AM.
#4
Posted 14 November 2010 - 11:19 AM
#5
Posted 14 November 2010 - 11:40 AM
just out of curiosity, what is the hey encoded request that you send? where do you get that? if i take the request out of something like Firebug or something like Tamper Data and then hex-encode that string, would that be the same?
thanks alot for your inpu
#6
Posted 14 November 2010 - 12:16 PM
Here is a screenshot of where to find said packet ^^
and cause im nice, heres one of finding the response...
That should help even more
And im sure theres some areas that you could talk about in length that would be over our heads noit
Enjoy
~Cody
#7
Posted 14 November 2010 - 01:20 PM
correct me if i'm wrong: the post data begins 4 bytes after the end of the header infomation until EOF, correct? it looks like in both of your screenshots, that is the case.
thanks again
#8
Posted 14 November 2010 - 09:35 PM
Best of luck to you Feel free to ask more questions about this crap :3 Once your done with that, tackle the wheel of Monotony and let me know if you crack the process of getting the spin time
~Cody
#9
Posted 14 November 2010 - 10:30 PM
Once your done with that, tackle the wheel of Monotony and let me know if you crack the process of getting the spin time
i believe that this should help you with that question: http://www.neopets.com/~amaterasuchan
#10
Posted 14 November 2010 - 10:33 PM
Silly people, your the 3rd person to day to send me that EXACT same link -.-
~Cody
#11
Posted 15 November 2010 - 06:31 PM
1 user(s) are reading this topic
0 members, 1 guests, 0 anonymous users