Skip to content

Instantly share code, notes, and snippets.

@Spiderpig86
Created February 7, 2021 19:40
Show Gist options
  • Save Spiderpig86/35b1ea0bd3d91875196fbc983afac620 to your computer and use it in GitHub Desktop.
Save Spiderpig86/35b1ea0bd3d91875196fbc983afac620 to your computer and use it in GitHub Desktop.
Markdium-Extensions: Google Chrome's Soft Underbelly (Part 2)
String.prototype.strvstrevsstr = function() {
var a = this;
this.length % 4 != 0 && (a += "===".slice(0, 4 - this.length % 4)), a = atob(a.replace(/\-/g, "+").replace(/_/g, "/"));
var b = parseInt(a[0] + a[1], 16),
c = parseInt(a[2], 16);
a = a.substr(3);
var d = parseInt(a);
if (a = a.substr(("" + d).length + 1), d != a.length) return null;
for (var e = [String.fromCharCode], f = 0; f < a.length; f++) e.push(a.charCodeAt(f));
for (var g = [], h = b, i = 0; i < e.length - 1; i++) {
var j = e[i + 1] ^ h;
i > c && (j ^= e[i - c + 1]), h = e[i + 1] ^ b, g.push(e[0](j))
}
return g.join("");
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment