Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ping_flash2 ? #67

Closed
denysvitali opened this issue Feb 6, 2014 · 13 comments · Fixed by #69
Closed

ping_flash2 ? #67

denysvitali opened this issue Feb 6, 2014 · 13 comments · Fixed by #69
Labels

Comments

@denysvitali
Copy link
Contributor

Hi everyone,
today I received randomly this "error":

ping_flash2 [ '239 152 50 42 152 117 81 73 241 95 119 216 147 166 61 169 64 196 18 135' ]
Error: TODO: implement!
    at Spotify._onmessagecommand (/media/denys/Homes/denys/node_modules/spotify-web/lib/spotify.js:443:11)

Did someone already got this error?

-- UPDATE --
Some logs infos:

{"message":["ping_flash2","77 156 127 5 171 248 223 205 104 212 164 78 203 10 176 127 173 251 240 140"]}

{"id":5,"name":"sp/pong_flash2","args":["228 190 100 128 11 108 110 143 61 10"]}
{"message":["ping_flash2","75 206 105 130 19 165 181 131 194 222 48 164 99 212 170 209 65 120 114 35"]}
{"id":5,"name":"sp/pong_flash2","args":["75 82 98 7 159 62 51 12 115 212"]}
@adammw
Copy link
Collaborator

adammw commented Feb 7, 2014

Hmm, seems to be calling the Flash player interface, and then sending back the result of some operation that's been compiled into Flash from C++. Stubbing it out by just sending back args of "undefined 0" (or not sending anything back and ignoring it) seems to work for now, but to fix this properly (and for good), we would need an actionscript vm and interface to actually run the Flash code.

@denysvitali
Copy link
Contributor Author

If you change the client version to the new one ( client version: 0.6.23.149, deployed at 2014-02-06 09:54 UTC ) it won't permit to "ignore it"...

@endoplasmic
Copy link

Around line 442 in the spotify.js file you can just use this:

} else if ('ping_flash2' == command) {
    //who knows what this is for...

@adammw
Copy link
Collaborator

adammw commented Feb 8, 2014

Looking into if we can get Shumway to load the player.swf file into javascript and call functions, that would be EPIC if we could get that to happen, however I am slightly skeptical on Alchemy support in shumway at the moment, it's likely going to be a lot of effort.

@TooTallNate
Copy link
Owner

Looking into if we can get Shumway to load the player.swf file into javascript and call functions

I had the same initial thought. Didn't get much further than looking at the Shumway homepage. I'm not sure how node-compatible Shumway is, since I believe it's designed for the web browser. A compatibility shim may be required.

@TooTallNate TooTallNate added the bug label Feb 9, 2014
@adammw
Copy link
Collaborator

adammw commented Feb 9, 2014

Spent today the last 3 hours looking into it, there's no good news here. :(

@TooTallNate
Copy link
Owner

@adammw Where did you get hung up on exactly? I've been looking into it as well but am caught up on what the newGlobal() function is here.

@adammw
Copy link
Collaborator

adammw commented Feb 9, 2014

The ping_pong function in the player.swf file is alchemy compiled (ie a C++ function compiled into actionscript byte code ). Chatting on IRC, shumway isn't likely to have much support for that because of its design, and I wasn't able to get it to load in the shumway inspector either.

@denysvitali
Copy link
Contributor Author

By player.swf

private function doWork(s:string):string{ return (ping_pong(s)); }
op_si32(__GLOBAL__I__Z9ping_pongv, (_local173 + 0)); //Alchemy
op_si32(__GLOBAL__D__Z9ping_pongv, (_local2 + 0)); //Alchemy

I couldn't understand those lines (except for the "do_work" function) because I'm not so good with ActionScript programming and I think that this is actually compiled. Maybe a flash geek could help us?

(I decompiled the swf with showmycode.com)

@TooTallNate
Copy link
Owner

Maybe it's time we start reverse engineerring this bad boy: https://github.com/adobe-flash/crossbridge

@denysvitali
Copy link
Contributor Author

Is there anyone who has experience in reverse engineering of Shockwave Flash?

@adammw
Copy link
Collaborator

adammw commented Feb 12, 2014

😄 think I cracked it...

@mauimauer
Copy link
Contributor

Awesome. What did they hide inside there this time?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging a pull request may close this issue.

5 participants