POST / game / eor /? Timestamp = 1328793172978 & signature = ktVfjD3VFg2EG2GNiBlTgVnBg4TZJ3-DGkbAsFuWirw% 3D & session = 1100447b5bb0d01c14a974bc63318d12 api_verver = 1100447b5bb0d01c14a974bc63318d12 api_verver = 1100447b5bb0d01c14a974bc63318d12 and api_verver = 130044b5bb0d01c14a974bc63318d12
Host: dd.wooga.com
Connection: keep-alive
Content-Length: 136
Origin: http://cdn-dd.wooga.com
User-Agent: Mozilla / 5.0 (X11; Linux i686) AppleWebKit / 535.7 (KHTML, like Gecko) Chrome / 16.0.912.77 Safari / 535.7
content-type: application / json
Accept: * / *
Accept-Encoding: gzip, deflate, sdch
Accept-Language: ru-RU, ru; q = 0.8, en-US; q = 0.6, en; q = 0.4
Accept-Charset: windows-1251, utf-8; q = 0.7, *; q = 0.3
{"fireballs_used": 0, "xp": 75, "sound": true, "gems_removed": 65, "score": 19430, "level": 100, "plasma_bursts_used": 0, "user_id": "My Yiddish "}
internal function extendUrl ( ) : void
{
var loc1: * = net. wooga . diamonddash . shared . util . getTimestamp ( ) ;
var loc2: * = net. wooga . diamonddash . service . util . generateRequestSignature ( loc1 + this . userId + this ._requestDetails. requestData ) ;
loc2 = escape ( loc2 ) ;
this ._requestDetails. url = this ._requestDetails. url + ( "? timestamp =" + loc1 + "& signature =" + loc2 + "& session =" + this . sessionId + "& api_version = 2" ) ;
return ;
}
public function generateRequestSignature ( arg1: String ) : String
{
var loc1: * = new com. hurlant . crypto . hash . HMAC ( new com. Hurlant . Crypto . Hash . SHA256 ( ) ) ;
var loc2: * = new flash. utils . ByteArray ( ) ;
loc2. writeUTFBytes ( net. wooga . diamonddash . service . SHARED_SECRET ) ;
var loc3: * ;
( loc3 = new flash. utils . ByteArray ( ) ) . writeUTFBytes ( arg1 ) ;
var loc4: * ;
return loc4 = ( loc4 = ( loc4 = com. hurlant . util . Base64 . encodeByteArray ( loc1. compute ( loc2, loc3 ) ) ) . replace ( new RegExp ( " \ + " , "g" ) , "-" ) ) . replace ( new RegExp ( " \ / " , "g" ) , "_" ) ;
}
package net. wooga . diamonddash . service
{
public const SHARED_SECRET: String = "foeD4ktl2gdoDdle" ;
}
base64(SHA256(_ + id_ + _, SHARED_SECRET)).
POST http://dd.wooga.com/game/eor/?timestamp=$time&signature=$r%3D&api_version=2 HTTP / 1.1
Host: dd.wooga.com
content-type: application / json
$ data
#! / usr / bin / perl -w
use LWP :: UserAgent ;
use Digest :: SHA qw ( hmac_sha256_base64 ) ;
$ ua = new LWP :: UserAgent ;
$ userID = "123456789123456" ;
$ time = time ;
$ data =
qq # {"plasma_bursts_used": 0, "score": 10,000,000, "level": 100, "gems_removed": 165, "user_id": "$ userID", "sound": true, "xp": 100, "fireballs_used ":one}#;
$ r = hmac_sha256_base64 ( $ time . $ userID . $ data , "foeD4ktl2gdoDdle" ) ;
$ r = ~ s / ± / g ;
$ r = ~ s / \ // _ / g ;
$ req =
qq #POST http://dd.wooga.com/game/eor/?timestamp=$time&signature=$r%3D&api_version=2 HTTP / 1.1
Host : dd . wooga . com
content - type : application / json
$ data #;
$ req = HTTP :: Request -> parse ( $ req ) ;
print $ ua -> simple_request ( $ req ) -> as_string ( ) ;
Source: https://habr.com/ru/post/137913/
All Articles