Skip to content

Instantly share code, notes, and snippets.

@JavaScript-Packer
JavaScript-Packer / power-top.js
Created March 26, 2016 06:33
Bookmarklet to get a web page back to the top without having to scroll all the way back. Add a link too bookmarks, then edit URL to be the JavaScript code provided.
javascript:void(function(){window.scroll(0,0)}());void(0);
@JavaScript-Packer
JavaScript-Packer / LZ-string.asp
Created January 27, 2016 23:07
LZ-string.asp
<!DOCTYPE html><html><head></head><body><script><%
'on error resume next
dim str,zapped,unzapped
str="function randomSite() {\n var tempWebSite, tempValueSetting, onlineWebsiteURL = new Array();\n onlineWebsiteURL[0] = 'http://www.WHAK.com';\n onlineWebsiteURL[1] = 'http://www.ScriptCompress.com';\n onlineWebsiteURL[2] = 'http://www.Trollize.com';\n onlineWebsiteURL[3] = 'http://www.Holy-Bibles.com';\n onlineWebsiteURL[4] = 'http://www.Make-A-Meme.com';\n onlineWebsiteURL[5] = 'http://www.BoobSigns.com';\n onlineWebsiteURL[6] = 'http://www.SeekFreak.com';\n onlineWebsiteURL[7] = 'http://www.Is-A-Jerk.com';\n onlineWebsiteURL[8] = 'http://www.HolyBibleVerse.com';\n onlineWebsiteURL[9] = 'http://www.HolyBibleSearch.com';\n onlineWebsiteURL[10] = 'http://www.SirSeek.com';\n onlineWebsiteURL[11] = 'http://www.TXT2PIC.com';\n onlineWebsiteURL[12] = 'http://www.13KG.com';\n onlineWebsiteURL[13] = 'http://www.Nerdful.com';\n onlineWebsiteURL[14] = 'http://www.FanSignGenerator.com';\n onlineWebsiteUR
@JavaScript-Packer
JavaScript-Packer / encrypt-decrypt-JS-JSE.asp
Last active January 27, 2016 23:21
Creates JS file on server side, encodes it as different file and then decodes it afterwards as separate file
<%
dim pathz
pathz = replace(Server.MapPath(Request.ServerVariables("PATH_INFO")), "encrypt-decrypt-JS-JSE.asp", "")
dim faith, holy
set faith=Server.CreateObject("Scripting.FileSystemObject")
on error resume next
set holy=faith.CreateTextFile(pathz & "tester.js")
on error resume next
holy.WriteLine("window.location.href='http://www.holybiblesearch.net';")
on error resume next
@JavaScript-Packer
JavaScript-Packer / wtf.js
Created January 26, 2016 04:38
Using mostly brackets. It simply runs alert("WHAK.ca") as the end result.
eval(eval("'\\" + [ +!+[] ] + [ !+[] + !+[] + !+[] + !+[] ] + [ +!+[] ] + "\\" + [ +!+[] ] + [ !+[] + !+[] + !+[] + !+[] + !+[] ] + [ !+[] + !+[] + !+[] + !+[] ] + "\\" + [ +!+[] ] + [ !+[] + !+[] + !+[] + !+[] ] + [ !+[] + !+[] + !+[] + !+[] + !+[] ] + "\\" + [ +!+[] ] + [ !+[] + !+[] + !+[] + !+[] + !+[] + !+[] ] + [ !+[] + !+[] ] + "\\" + [ +!+[] ] + [ !+[] + !+[] + !+[] + !+[] + !+[] + !+[] ] + [ !+[] + !+[] + !+[] + !+[] ] + "\\" + [ !+[] + !+[] + !+[] + !+[] + !+[] ] + [ +[] ] + "\\" + [ !+[] + !+[] + !+[] + !+[] ] + [ !+[] + !+[] ] + "\\" + [ +!+[] ] + [ !+[] + !+[] ] + [ !+[] + !+[] + !+[] + !+[] + !+[] + !+[] + !+[] ] + "\\" + [ +!+[] ] + [ +!+[] ] + [ +[] ] + "\\" + [ +!+[] ] + [ +[] ] + [ +!+[] ] + "\\" + [ +!+[] ] + [ +!+[] ] + [ !+[] + !+[] + !+[] ] + "\\" + [ !+[] + !+[] + !+[] + !+[] + !+[] ] + [ !+[] + !+[] + !+[] + !+[] + !+[] + !+[] ] + "\\" + [ +!+[] ] + [ !+[] + !+[] + !+[] + !+[] ] + [ !+[] + !+[] + !+[] ] + "\\" + [ +!+[] ] + [ !+[] + !+[] + !+[] + !+[] ] + [ +!+[] ] + "\\" + [ !+[] + !+
@JavaScript-Packer
JavaScript-Packer / evil-eval.js
Created January 26, 2016 00:24
Hidden evil eval in JavaScript www.JavaScriptCrypt.com
var evil_eval = (!+[] + [])[!+[] + !+[] + !+[]] + "v" + (!1 + [])[+!+[]] + (!1 + [])[!+[] + !+[]];
function test() {
alert("WHAK.com");
}
this[evil_eval](test());
@JavaScript-Packer
JavaScript-Packer / notifier.js
Created January 24, 2016 20:50
Internet Browser notifications in JavaScript
!function() {
"Notification" in window ? "granted" === Notification.permission ? new Notification("Hi there from WHAK.com!") :"denied" !== Notification.permission && Notification.requestPermission(function(permission) {
"granted" === permission && new Notification("Hi there from WHAK.com!");
}) :alert("no");
}();
@JavaScript-Packer
JavaScript-Packer / vanity-functions-variables.js
Created January 24, 2016 16:08
Few ways to do vanity scripting in JavaScript www.fakehack.com
var www = {}; www.WHAK = {};
www.WHAK.ca = "http://www.whak.ca";
www.WHAK.com = function(){ return "http://www.whak.com"; }();
www.WHAK.us = function(x){ return x}
console.log(www.WHAK.us("http://www.whak.us"));
console.log(www.WHAK.com);
console.log(www.WHAK.ca);
@JavaScript-Packer
JavaScript-Packer / hex-encoder.htm
Created January 17, 2016 18:10
HEX encoding from JavaScript escape function/command. www.whak.ca
<input type="button" value="Hex Escape" onclick="alert(escape('A test!').replace(/%/g,'\\x'));">
<input type="button" value="Hex unEscape" onclick="alert(unescape('A\\x20test\\x21'.replace(/\\x/g,'%')));">
@JavaScript-Packer
JavaScript-Packer / cypheriffic.js
Created January 15, 2016 16:49
Like ROT13 but uses characters used in JavaScript source codes to encrypt/encode. Function will automatically decide if it must decode or encode. www.whak.ca
function cypher(r) {
function t(r, e) {
var a = "\n\x20\t`~_^*'\"<+,-.:;=>!?/{|}[\\]#$%&()@0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz";
a.length > e && (r === a.split("").reverse().join("")[e] && (n += a[e]), t(r, e + 1));
}
function e(r, a) {
return a > r.length ? void 0 : (t(r[a], 0), e(r, a + 1), n);
}
var n = "";
return e(r, 0);
@JavaScript-Packer
JavaScript-Packer / codepoints.js
Created January 14, 2016 09:25
UTF-8 to character code points array, bot encode and decode functions
var toCharCode = function(x) {
var o, e = x.split(""), t = [];
for (o in e) t.push(e[o].charCodeAt(0));
return t;
};
var unCharCode = function(x) {
return this["eval"]("String.fromCharCode(" + x + ")");
};