Bored? How about a challenge? I'll list challenges, and people can post their challenges below, and I will add them here:
Challenges
Make any kind of mod out of a mod that's online.
Dissect this code, and tell GeonoTRON2000 what URL it uses to +1 the website.
Please post your challenge below.
Last edited by coolhogs (2012-06-22 20:02:53)
Offline
coolhogs wrote:
A mod that's online, like Snap! that you make a mod out of.
Ah.
Offline
GeonoTRON2000 wrote:
O.K.
Dissect this code, and tell me what URL it uses to +1 the website.
What a mess! I had to write a program to insert newlines after ;'s for me before I could even think about looking at that! I hope you made it hard to read for the challenge only and that your coding isn't really like this!
I don't want to spoil the challenge for others, so the link below is the address I think that GeonoTRON2000 uses and is a SPOILER! Don't click it or hover over it if you want to work it out yourself!
SPOILER LINK
Offline
roijac wrote:
sparks wrote:
I hope you made it hard to read for the challenge only and that your coding isn't really like this!
http://closure-compiler.appspot.com/home
http://jsbeautifier.org/
Offline
bobbybee wrote:
roijac wrote:
sparks wrote:
I hope you made it hard to read for the challenge only and that your coding isn't really like this!
http://closure-compiler.appspot.com/home
http://jsbeautifier.org/
var gapi = window.gapi = window.gapi || {};
(function () {
var f = "push",
g = "replace",
h = "length";
var j = window,
k = document,
l = j.location,
m = function () {},
s = /\[native code\]/,
t = function (a, b, c) {
return a[b] = a[b] || c
},
u = function (a) {
for (var b = 0; b < this[h]; b++) if (this[b] === a) return b;
return -1
},
v = function () {
var a;
if ((a = Object.create) && s.test(a)) a = a(null);
else {
a = {};
for (var b in a) a[b] = void 0
}
return a
},
w = t(j, "gapi", {});
var C = function () {
var a = l.href,
b = B.h,
c = RegExp("([?#].*&|[?#])jsh=([^&#]*)", "g");
if (a = a && c.exec(a)) try {
b = decodeURIComponent(a[2])
} catch (e) {}
return b
};
var B;
B = t(j, "___jsl", v());
t(B, "I", 0);
var D = function (a) {
return t(t(B, "H", v()), a, v())
};
var E = v(),
F = [],
I;
I = {
a: "callback",
e: "sync",
b: "config",
c: "_c",
d: "h",
i: "platform",
g: "ds",
f: "jsl"
};
F[f]([I.f, function (a) {
for (var b in a) if (Object.prototype.hasOwnProperty.call(a, b)) {
var c = a[b];
"object" == typeof c ? B[b] = t(B, b, []).concat(c) : t(B, b, c)
}
if (a = a.u) b = t(B, "us", []), b[f](a), (c = /^https:(.*)$/.exec(a)) && b[f]("http:" + c[1]), t(B, "u", a)
}]);
E.m = function (a) {
var b = B.ms || "https://apis.google.com",
a = a[0],
c;
if (!(c = !a)) c = 0 <= a.indexOf("..");
if (c) throw "Bad hint";
return b + a
};
var J = function (a) {
return a.join(",")[g](/\./g, "_")[g](/-/g, "_")
},
K = function (a, b) {
for (var c = [], e = 0; e < a[h]; ++e) {
var d = a[e];
d && 0 > u.call(b, d) && c[f](d)
}
return c
},
L = function (a) {
var b = k.createElement("script");
b.setAttribute("src", a);
b.async = "true";
a = k.getElementsByTagName("script")[0];
a.parentNode.insertBefore(b, a)
};
w.load = function (a, b) {
var c = b || {};
"function" == typeof b && (c = {}, c[I.a] = b);
var e = c,
d = e && e[I.c];
if (d) for (var i = 0; i < F[h]; i++) {
var q = F[i][0],
n = F[i][1];
n && Object.prototype.hasOwnProperty.call(d, q) && n(d[q], a, e)
}
if (!(e = c[I.d])) if (e = C(), !e) throw "Bad hint";
var o = e,
G = c[I.a],
x = c[I.b],
e = t(D(o), "r", []).sort(),
y = t(D(o), "L", []).sort(),
H = function (a) {
y[f].apply(y, p);
var b = ((w || {}).config || {}).update;
b ? b(x) : x && t(B, "cu", [])[f](x);
if (a) {
b = o === C() ? t(w, "_", v()) : v();
b = t(D(o), "_", b);
a(b)
}
G && G();
return 1
};
if (a) {
d = a.split(":").sort();
i = [];
q = void 0;
for (n = 0; n < d[h]; n++) {
var z = d[n];
z != q && i[f](z);
q = z
}
d = i
} else d = [];
var p = K(d, y);
if (!p[h]) return H();
var p = K(d, e),
A = B.I++,
r = "loaded_" + A;
w[r] = function (a) {
if (!a) return 0;
var b = function () {
w[r] = null;
return H(a)
};
if (w["loaded_" + (A - 1)]) w[r] = b;
else for (b(); b = w["loaded_" + ++A];) if (!b()) break
};
if (!p[h]) return w[r](m);
d = o.split(";");
d = (i = E[d.shift()]) && i(d);
if (!d) throw "Bad hint:" + o;
d = d[g]("__features__", J(p))[g](/\/$/, "") + (e[h] ? "/ed=1/exm=" + J(e) : "") + ("/cb=gapi." + r);
e[f].apply(e, p);
c[I.e] || j.___gapisync ? (c = d, "loading" != k.readyState ? L(c) : k.write(['<script src="', c, '"><\/script>'].join(""))) : L(d)
};
})();
gapi.load("plusone-unsupported", {
callback: window["gapi_onload"],
_c: {
"jsl": {
"u": "https://apis.google.com/js/plusone.js",
"ci": {
"inline": {
"css": 0
},
"lexps": [34, 70, 38, 65, 36, 40, 44, 15, 45, 51, 17, 48, 61, 60, 30],
"oauth-flow": {},
"report": {},
"iframes": {
"additnow": {
"url": "https://apis.google.com/additnow/additnow.html?bsv=pr"
},
"plus": {
"methods": ["onauth"],
"url": ":socialhost:/u/:session_index:/_/pages/badge?bsv=pr"
},
":socialhost:": "https://plusone.google.com",
"configurator": {
"url": ":socialhost:/:session_prefix:_/plusbuttonconfigurator"
},
"localreview": {
"params": {
"url": ""
},
"url": ":socialhost:/:session_prefix:_/local/review?bsv=pr"
},
"plus_circle": {
"params": {
"url": ""
},
"url": ":socialhost:/:session_prefix:_/widget/plus/circle?bsv=pr"
},
":signuphost:": "https://plus.google.com",
"plusone": {
"preloadUrl": ["https://ssl.gstatic.com/s2/oz/images/stars/po/Publisher/sprite4-a67f741843ffc4220554c34bd01bb0bb.png"],
"params": {
"count": "",
"url": "",
"size": ""
},
"url": ":socialhost:/:session_prefix:_/+1/fastbutton?bsv=pr"
},
"plus_share": {
"params": {
"url": ""
},
"url": ":socialhost:/:session_prefix:_/+1/sharebutton?plusShare=true&bsv=pr"
}
},
"isPlusUser": false,
"debug": {
"host": "https://plusone.google.com",
"reportExceptionRate": 0,
"rethrowException": false
},
"googleapis.config": {
"mobilesignupurl": "https://m.google.com/app/plus/oob?"
}
},
"h": "m;/_/apps-static/_/js/gapi/__features__/rt=j/ver=9NWytBnhyEY.en./sv=1/am=!rFmBCPi40VqIDfp2cA/d=1/rs=AItRSTOHalQaTwNd-S_KVXWaYmFBtlLVCw",
"fp": "f8df42d283f496fad255464c62d4afb09a2ab34d"
},
"fp": "f8df42d283f496fad255464c62d4afb09a2ab34d"
}
});Offline
I put it through jsbeautifier yesterday and still couldn't make any headway. There are quite a few URLs towards the end of the code, but I'm not sure which one (if any).
EDIT: I've now looked at the source of the frame in which the +1 button is held, and found this URL, which might be the closest we can get:
https://plusone.google.com/_/+1/fastbut … count=true
Last edited by ohaiderstudios (2012-06-25 12:30:37)
Offline
I have an idea how it could be done..just require some packet sniffing and or browser mods.
Offline