Need help with Gkencode , part of gkplugins.

joecowboy

New member
Mar 31, 2014
12
0
0
If the key you gave me was correct. Then it should have worked. I have gone over your code compared it to the decompiled version function by function of the stream4k.to encode.swf and the code is exact. I also under stand why you have those two extra lines. First one is to create the array set elements value to 0 and the second is to check the size of the key length.
 

shani_08

Banned
Nov 25, 2013
112
0
0
So, what if the flashVar is processed (resversed?byteArrayed etc) before it gets to encode? this is happening because i debug the swf and sent the url and got back garbage. remember in this process i am not sending keys so key would be generated by the code itself.
Have a look at parent swf which embeds the encode.
 

joecowboy

New member
Mar 31, 2014
12
0
0
That's, kewl... The AS3 function I posted in my first post is how it's generating the keys. I use AS3 Sorcerer to decompile the swf. The free version you can see all the logic fine just can't copy and past. Very nice tool. If you compare the enocode.swf from both sites the AS3 functions are exact except the embedded keys.

Link: http://www.as3sorcerer.com/


That one function I posted is called from this function where _arg_1 is the encrypted URL. As you can see the call to decrypt function the second parameter is where the key is generated from that function I posted in my first post. Which should be where you are getting your key you gave me. I know not all the encode.swf are the same and they do change up their logic to make it harder to decrypt the key. Just so happens these two sites used the same encode.swf but with different embedded keys. Thanks for helping me out on this.

Code:
private function _SafeStr_5(_arg_1:String):String{
            var _local_2:Gkencode = new Gkencode(192, 128);
            return (_local_2.decrypt(_arg_1, this._SafeStr_4({"v":"7195d8f072fabb791dbf3f22ccd946c2d3c8a8812b668392c5b3d286b82e96f2"}).v, "ECB").split(String.fromCharCode(0))[0]);
        }
 

shani_08

Banned
Nov 25, 2013
112
0
0
sorry bit confused, did we solve the problem then? did the key worked or you found the proper key?
Its expected that site will use same module but each site will have different code so not surprising.
 

joecowboy

New member
Mar 31, 2014
12
0
0
No we didn't solve it yet. Only way to test to see if it can be solved if we can finish porting that function from my first post from AS3 to Python and see what key it spits out. See if it's the same key you got back from you debugger.
 

shani_08

Banned
Nov 25, 2013
112
0
0
k, that I can look into but I am 100 sure that it's right key because same size and text keys were generated for other sites therefore in would say you look into what happens to the flashvar coming into it and We will meet in middle
 

joecowboy

New member
Mar 31, 2014
12
0
0
I agree with you that the debugger is giving out the right key length and key. Maybe I have over looked something in the code. I am at a loss but would like to get this to work.
 

taduyducvn

New member
Apr 10, 2014
3
0
0
Very interesting topic, I am also in the process of decoding this gkencode. Can anyone compare if this file is the same as your file?

http://www.medi afire.com/download/d67bmoxu59hqyni/gkenc.swf

Could you share your code also?

Taken from v1 vn . com website.

Also as I can see from the past few days looking into the requests and source code the ff:
1. The gkencode does not make any request to any PHP file so it seems that the key is hard coded and provided by the gkencode website when you buy the plugin. (Can you confirm is it true?)

2. The process of jw and gkencode is like this :
- Request jwplayer.swf
-> JWPlayer -> proxy.swf
-> Proxy.swf -> pluginlists.xml
-> load all plugins (gklicense, gkencode, gkproxy_** [inorder] )
-> gkencode decode the string and send to gkproxy_***
-> display like normal.

This is my insight of the problem so it's may not be correct.

Thank you in advance.
 
Last edited:

taduyducvn

New member
Apr 10, 2014
3
0
0
Haven't looked into the file yet. Everything is else you said is correct.
If you have time please look into it just to make sure if he changed the main structure on different version. Pretty sure this is the latest.

Maybe a diff with a same version file can tell what's are the crucial key for decrypt :D. I couldn't decode the file with JPEXS, the main decrypt method is obfuscated. With AS3 Sorcerer it's decoded but can't copy paste!
 
Last edited:

shani_08

Banned
Nov 25, 2013
112
0
0
I looked into the site and its the same with different key, so you have to find the key.
its in the swf file so i'll let you venture about it.
If you want me to you tell you the key, then you have to show me the purpose of this work.
sorry being just blunt here.
It seems like you are almost there and you need to figure out the key, so i would rather you find it yourself. :)
 

joecowboy

New member
Mar 31, 2014
12
0
0
Sorry, haven't responded sooner shani_08. I will check out the present you sent me in my messages. I will get respond later today. I am working on a editing project for a group and it has pulled me away some from this project some. I will let you know and then we can make a new host for the Movie2k plugin.
 
Last edited:

shani_08

Banned
Nov 25, 2013
112
0
0
Sorry, haven't responded sooner shani_08. I still haven't figured out my issue with the key you gave me. Like you said should have worked fine. Not real sure what the issue is yet in the code.
I sent you the new correct code and an example decryption too which I tested and it works. Check your message or you saying with the new code it still not working?
 

joecowboy

New member
Mar 31, 2014
12
0
0
Sorry, I did not see your last post to me. I have been out working on an editing project for this one group. I will check out your little present to me you sent me in my messages. Again thanks for all your help and once I test it I will get back with you, try today. Then we can make a new host for the Movie2k plugin.
 
Last edited:

joecowboy

New member
Mar 31, 2014
12
0
0
WOOT!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!

You are da man!!!!! It works like a charm now. May I ask, how did you figure out the new key if the swf object has not changed? What made the difference from the first time you looked for the key to the second time. Was it the %2A issue caused wrong key generation? Thanks again for your work.
 

shani_08

Banned
Nov 25, 2013
112
0
0
No, I forgot my own process of finding keys :). It had two stages and I sent you the stage1 key instead if stage 2.