update munge sets for new one seen in the wild

also attempt to munge method names. this has not been tested though, as only my cron job has seen the new munge sets, not the browser
for #552
This commit is contained in:
Jon Atkins 2013-09-13 00:12:54 +01:00
parent 1a77ddad77
commit e9d173402b

View File

@ -141,6 +141,37 @@ window.requestParameterMunges = [
factionOnly: '37okcr7gvd5yn2lj',
ascendingTimestampOrder: 'iimftkq7flskwrx9'
},
// set 2 - first seen 2013-09-12 21:30
{
method: '42suxeca8ttud7je',
boundsParamsList: '5uwd21hkedg3zh2c',
id: 'drtt302ebaj6ek2g',
minLatE6: 'l933r0l8brrt1x5b',
minLngE6: 'qg3xb340zed41jof',
maxLatE6: 'sw485z1n3tusdkul',
maxLngE6: '6meahm3f9xup9krb',
timestampMs: '6meahm3f9xup9krb',
qk: 'fpi9b1z0os0x9yjj',
desiredNumItems: 'inr3js77cetyibi6',
minTimestampMs: 'zfb2e5iqmggrxe98',
maxTimestampMs: '8c4imy17gfpfrl9l',
guids: '5d5hp2p3rkmanqn7',
inviteeEmailAddress: 'i1a5yp6p1l6iqk08',
message: 'xzhbk3ri04lx9xvj',
latE6: 'njg0zny4fb39mf0a',
lngE6: 'ti2rx4ltmg6d1zsr',
factionOnly: 'jegpo8rwhtuuuuhh',
ascendingTimestampOrder: '1ennke6gykwzziun',
// in this set, also the request method names are obsfucated!
'dashboard.getThinnedEntitiesV4': 'ufxcmvve3eirsf2b',
'dashboard.getPaginatedPlextsV2': 'd9dgziiw8vzhyecv',
'dashboard.getPlayersByGuids': 's53izqpxedtd0hv8',
'dashboard.sendInviteEmail': 'kn9plnbree2aeuh9',
'dashboard.redeemReward': 'les8vribyxb899wd',
'dashboard.sendPlext': '9u1ukkkx1euxf02a'
},
];
window.activeRequestMungeSet = undefined;
@ -167,10 +198,6 @@ window.detectActiveMungeSet = function() {
// niantic now add some munging to the request parameters. so far, only two sets of this munging have been seen
window.requestDataMunge = function(data) {
if (window.activeRequestMungeSet===undefined) {
window.detectActiveMungeSet();
}
var activeMunge = window.requestParameterMunges[window.activeRequestMungeSet];
function munge(obj) {
@ -215,7 +242,15 @@ window.requestDataMunge = function(data) {
// able arguments: http://api.jquery.com/jQuery.ajax/
// error: see above. Additionally it is logged if the request failed.
window.postAjax = function(action, data, success, error) {
var post_data = JSON.stringify(window.requestDataMunge($.extend({method: 'dashboard.'+action}, data)));
if (window.activeRequestMungeSet===undefined) {
window.detectActiveMungeSet();
}
var activeMunge = window.requestParameterMunges[window.activeRequestMungeSet];
var methodName = 'dashboard.'+action;
// optional munging of the method name - seen in Set 2 (onwards?)
if (methodName in activeMunge) methodName = activeMunge[methodName];
var post_data = JSON.stringify(window.requestDataMunge($.extend({method: methodName}, data)));
var remove = function(data, textStatus, jqXHR) { window.requests.remove(jqXHR); };
var errCnt = function(jqXHR) { window.failedRequestCount++; window.requests.remove(jqXHR); };
var result = $.ajax({