Skip to content

Instantly share code, notes, and snippets.

@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 / 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 / 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 / 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 / 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 / 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 / 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 / compare-lists-for-new-and-removed.htm
Last active April 3, 2016 07:45
Compare older list to a newer list to see changes (what is new and what is now gone). Working on a bookmarklet for FaceBook to find New Freinds and Friends that left (unfriended) you.
<html><head><title>Compare 2 Lists For Differences. Changes Added To List &amp; What Was Removed From Original List</title></head><body>
<script>
var s1 = 'Kvn Mrffy Brwn\n\
Lrran Brwn Lavall\n\
Rbrt Jsph\n\
Wayn Brstw\n\
Lrr Brwn Tschrwnsk\n\
Krs Oltn\n\
Paln Bckndal - Glnvw Park Scndary Schl\n\
@JavaScript-Packer
JavaScript-Packer / (de)obfuscate-IP-address.js
Last active December 29, 2022 16:24
This simple JavaScript function set/utility provides the opportunity to obfuscate an IP address or decipher an obfuscated IP. Made by www.whak.ca
function ip2decimal(ip) {
ip = ip.split(".");
var e, w = 16777216, x = 65536, y = 256, a = eval(ip[0]), b = eval(ip[1]), c = eval(ip[2]), d = eval(ip[3]);
e = a * w + b * x + c * y + d;
return e;
}
function decimal2ip(ip) {
var w = 16777216, x = 65536, y = 256, e = eval(ip), a = e / w, z = e - (a - e % w / w) * w, b = z / x, q = z - (b - z % x / x) * x, c = q / y, d = q - (c - q % y / y) * y;
return parseInt(a) + "." + parseInt(b) + "." + parseInt(c) + "." + parseInt(d);