Skip to content

Instantly share code, notes, and snippets.

@blackphreak
Created June 30, 2017 17:12
Show Gist options
  • Select an option

  • Save blackphreak/e8de345ff5cf9a5262225d8548c6c6b8 to your computer and use it in GitHub Desktop.

Select an option

Save blackphreak/e8de345ff5cf9a5262225d8548c6c6b8 to your computer and use it in GitHub Desktop.
[jq] s0urce.io cheating script - work before 2017-07-01 [v2]
var map = {};
function get(k) {
return map[k];
}
//ez
map["easy/i2i542"] = "reset";
map["easy/32jrh32r"] = "join";
map["easy/gf43t"] = "send";
map["easy/23j4d"] = "part";
map["easy/f4365"] = "right";
map["easy/f32"] = "buffer";
map["easy/t342"] = "ghost";
map["easy/j3245g3"] = "root";
map["easy/r3r3f"] = "anon";
map["easy/f4tr3"] = "event";
map["easy/f487k"] = "client";
map["easy/f43543"] = "init";
map["easy/fh3rg32"] = "global";
map["easy/f436fghz"] = "val";
map["easy/56436u"] = "num";
map["easy/gi9846"] = "type";
map["easy/j5675"] = "domain";
map["easy/42j4"] = "add";
map["easy/34jhg23"] = "bytes";
map["easy/h5jz5"] = "handle";
map["easy/i5ut5"] = "net";
map["easy/u6jz345h"] = "signal";
map["easy/bz334"] = "xml";
map["easy/34h34"] = "bit";
map["easy/fge332"] = "file";
map["easy/gerg43643"] = "info";
map["easy/hj5646"] = "socket";
map["easy/rh324525"] = "list";
map["easy/fjwegf2"] = "cookies";
map["easy/klj52"] = "delete";
map["easy/fej5"] = "com";
map["easy/jgj4"] = "intel";
map["easy/zhg43z34"] = "data";
map["easy/g45u3"] = "pass";
map["easy/44j"] = "upload";
map["easy/djk3"] = "dir";
map["easy/4232"] = "ping";
map["easy/grj23"] = "host";
map["easy/fg32t"] = "get";
map["easy/35d"] = "poly";
map["easy/rnr3ur23gh325"] = "status";
map["easy/h5343"] = "load";
map["easy/f3425"] = "temp";
map["easy/fhj332"] = "write";
map["easy/gfu4643876"] = "count";
map["easy/4353i"] = "call";
map["easy/gher43"] = "port";
map["easy/5h"] = "url";
map["easy/jfs3231"] = "add";
map["easy/4j22"] = "user";
map["easy/f34"] = "emit";
map["easy/f4ef3"] = "left";
map["easy/fzh32"] = "point";
map["easy/kj44"] = "remove";
map["easy/3523ghr"] = "log";
map["easy/gfzu3"] = "set";
map["easy/ztuz2gh"] = "system";
map["easy/gg421"] = "http";
map["easy/5h3j5"] = "size";
map["easy/tu34ht"] = "key";
map["easy/gg44"] = "loop";
map["easy/3j5h353"] = "hostserver";
map["easy/hwejg3"] = "stat";
//medium
map["medium/5hj23"] = "password";
map["medium/3j2gh5"] = "response";
map["medium/hj436"] = "listconfig";
map["medium/5335jf"] = "gridwidth";
map["medium/03653j"] = "disconnect";
map["medium/j3252"] = "config";
map["medium/jh6b3"] = "channel";
map["medium/jk125"] = "findpackage";
map["medium/4k2hj54"] = "export";
map["medium/k3465jh"] = "setcookie";
map["medium/fhweg"] = "patcheventlog";
map["medium/3k5jh3"] = "connect";
map["medium/8725h"] = "newserver";
map["medium/kj53"] = "setnewid";
map["medium/yxn24"] = "process";
map["medium/j35h"] = "syscall";
map["medium/nfn3"] = "urlcheck";
map["medium/5698n"] = "vector";
map["medium/56j3hn"] = "getpass";
map["medium/k34h63"] = "filedir";
map["medium/hg4"] = "package";
map["medium/jj47"] = "decryptfile";
map["medium/jb6"] = "userid";
map["medium/385gh2"] = "setstats";
map["medium/78m"] = "account";
map["medium/l3667"] = "filetype";
map["medium/f3234"] = "getinfo";
map["medium/k34h63"] = "filedir";
map["medium/j5h632"] = "download";
map["medium/74n4"] = "accountname";
map["medium/j35h5"] = "number";
map["medium/84m4"] = "fillgrid";
map["medium/yxn24"] = "process";
map["medium/935h"] = "setport";
map["medium/k62"] = "userport";
map["medium/jg35"] = "username";
map["medium/5h323"] = "module";
map["medium/8467hz"] = "constructor";
map["medium/kh6"] = "thread";
map["medium/fh3"] = "gridheight";
map["medium/3h5g5"] = "datatype";
map["medium/jn35b"] = "command";
map["medium/jbg5335"] = "setping";
map["medium/48z625h"] = "eventtype";
map["medium/jhn6n3"] = "newhost";
map["medium/v235"] = "generate";
map["medium/l3976"] = "length";
map["medium/736h"] = "proxy";
map["medium/j2h512"] = "mysql";
map["medium/h5g325"] = "getkey";
map["medium/32k56"] = "protocol";
map["medium/82365h"] = "getlog";
map["medium/3k6734"] = "encryptfile";
map["medium/f3j3"] = "loadbytes";
map["medium/sn2"] = "getping";
map["medium/3j5h353"] = "hostserver";
map["medium/63623"] = "sizeof";
map["medium/3j5"] = "newline";
map["medium/3jh5"] = "encrypt";
map["medium/35hj"] = "server";
map["medium/j3k6h"] = "writefile";
map["medium/424h8"] = "hexagon";
map["medium/894h"] = "encode";
map["medium/5j2356h"] = "getfile";
map["medium/5h213553"] = "serverproxy";
map["medium/jkh532"] = "getid";
map["medium/964hf"] = "decrypt";
map["medium/435n"] = "responder";
map["medium/ycmn25"] = "threat";
//hard
map["hard/v235"] = "removeoldcookie";
map["hard/m3n63"] = "checkhttptype";
map["hard/h35g"] = "dodecahedron";
map["hard/j363"] = "getdatapassword";
map["hard/l4j56"] = "decryptdatabatch";
map["hard/3426h"] = "sizeofhexagon";
map["hard/3h25g125"] = "callmodule";
map["hard/k23j6"] = "eventlistdir";
map["hard/bv35b23"] = "create2axisvector";
map["hard/n23v55"] = "createfilethread";
map["hard/n234v65"] = "fileexpresslog";
map["hard/j5h35"] = "disconnectserver";
map["hard/b235"] = "getmysqldomain";
map["hard/2n52b"] = "loadregisterlist";
map["hard/v51"] = "createnewpackage";
map["hard/dnv24"] = "systemportkey";
map["hard/n32v52"] = "getxmlprotocol";
map["hard/h35g"] = "dodecahedron";
map["hard/b32563"] = "removenewcookie";
map["hard/u254oo"] = "httpbuffersize";
map["hard/mb2"] = "ghostfilesystem";
map["hard/b626"] = "encryptunpackedbatch";
map["hard/n326"] = "wordcounter";
map["hard/n3bv5"] = "loadloggedpassword";
map["hard/j235g23"] = "tempdatapass";
map["hard/n3v5b56"] = "encodenewfolder";
map["hard/n3b55"] = "create3axisvector";
map["hard/k23j6"] = "eventlistdir";
map["hard/njm23b632"] = "emitconfiglist";
map["hard/3v5235"] = "respondertimeout";
map["hard/dnv24"] = "systemportkey";
map["hard/bv35"] = "changeusername";
map["hard/f5452"] = "joinnetworkclient";
map["hard/h2v5"] = "setnewproxy";
map["hard/j56b3"] = "exportconfigpackage";
map["hard/b5256"] = "changepassword";
map["hard/3k5"] = "uploaduserstats";
map["hard/yxb24"] = "loadaltevent";
map["hard/lkkj2"] = "destroybatch";
map["hard/vbv42"] = "bufferpingset";
map["hard/3426h"] = "sizeofhexagon";
map["hard/v42"] = "channelsetpackage";
map["hard/jn35"] = "disconnectchannel";
map["hard/l4j56"] = "decryptdatabatch";
map["hard/n2356b"] = "sendintelpass";
map["hard/mb235"] = "batchallfiles";
map["hard/k43h2"] = "systemgridtype";
map["hard/fhweg"] = "patcheventlog";
map["hard/nv2353"] = "blockthreat";
map["hard/j3453"] = "deleteallids";
map["hard/v535"] = "getfirewallchannel";
map["hard/v235"] = "removeoldcookie";
map["hard/n23b56"] = "includedirectory";
map["hard/j52"] = "createnewsocket";
map["hard/m3n636"] = "hostnewserver";
map["hard/3bv5235"] = "statusofprocess";
map["hard/m2b62"] = "getpartoffile";
map["hard/k32h6j"] = "rootcookieset";
map["hard/j35g2"] = "mergesocket";
map["hard/b533252"] = "unpacktmpfile";
map["hard/h552"] = "generatecodepack";
//setting var
var findKeys = false,
customTarget = false,
accuracy = 0.989,
timerMin = 890,
timerMax = 800,
customTimer = false,
action = true,
runtimeBreaker = false,
noTargetChange = false,
selectNewTargetChance = 0.6,
delayMax = 1200,
delayMin = 1100,
noTargetChangeTilOffline = false,
debug = false;
//storing var
var finished = false,
lastRich = "",
lastRichGain = -1,
lastRichName = "",
hackedTarget = 0,
lastHackedPoor = 0,
knownPoorList = "",
lastSelectedPort = "";
/*function selectOfflistTarget(targetName, targetID, targetGain)
{
var randomX = Math.random();
customTarget = true;
//creating a fake log
$(".window-log-content").append('<div class="window-log-message"><img src="../client/img/icon-success.png" class="icon-small"> FakeLog <div id="hackedid-form" class="button" data-x="fakeTarget_'+randomX+'" data-text=' + targetID + '>' + targetName + '</div> and gained <img src="../client/img/icon-bt.png" class="icon-small window-bt-icon"><span class="log-gained">'+ targetGain +'</span></div>');
console.info("creating offlist target ... " + targetName + " | ID: " + targetID + " | Gain: " + targetGain);
setTimeout(function (){
console.log("triggering click on Fake Log ...");
$('[data-x="fakeTarget_'+randomX+'"]').trigger("click");
//click Hack button
selectNextTarget();
}, 800);
}*/
//init
/*$("[id^='window-other-port']").click(function (){
setTimeout(startHacking, 600);
});*/
$(".window-list-table-select").click(function (){
if (customTarget)
setTimeout(selectNextTarget(), 600);
})
function noAds()
{
$("#window-msg").remove();
}
function moneyCheck()
{
//current money
if (parseInt($("#window-my-coinamount").html()) > parseInt($("#shop-quantum-server-value").html()))
{
$("#shop-quantum-server").trigger("click");
setTimeout(function (){
moneyCheck();
}, 700);
}
}
function getLastRichTarget()
{
if (debug)
console.log("getLastRichTarget() called.");
if (noTargetChangeTilOffline)
{
if ($("#cdm-text-container>span").html() == "Target is disconnected from the Server.")
{
noTargetChangeTilOffline = false;
if (action)
console.log("target offed-line. searching for new target...");
}
else
{
// if ($("#cdm-text-container>span").html() == "This port has been closed. Try another one."
// || ) //closed port
selectPort();
if (action)
console.log("selecting the same target, triggered click port [noTargetChangeTilOffline]");
return;
}
}
if (noTargetChange)
{
selectPort();
if (action)
console.log("selecting the same target, triggered click port");
return;
}
if (Math.random() > selectNewTargetChance)
{
/*lastHackedPoor++;
if (lastHackedPoor > 3)
{
getLastRichTarget();
return;
}*/
//random select hacker
$($(".window-list-table-select")[Math.floor(Math.random() * 20)]).trigger("click");
if (action)
console.log("selecting random target, triggered click target");
selectNextTarget();
return;
}
if (debug)
console.log("getLastRichTarget() -> richer one check.");
var lastGain = $(".log-gained"),
loc_lastGain = parseInt($(lastGain[lastGain.length - 1]).html()),
loc_lastGainName = $(lastGain[lastGain.length - 1]).parent().children("#hackedid-form").html();
if (loc_lastGain > lastRichGain) //this is the richer one
{
lastRich = $(lastGain[lastGain.length - 1]).parent().children("#hackedid-form");
lastRichGain = $(lastGain[lastGain.length - 1]).html();
lastRichName = lastRich.html();
if (action)
console.info("the richest target found: " + lastRich.attr("data-text") + "(" + lastRichName + ") | " + lastRichGain);
lastRich = lastRich.attr("data-text");
setTimeout(function (){
if (hackedTarget < 15)
{
//target not enough to compare the richest.
if (action)
console.log("selecting random target, triggered click target [target < 15]");
//random select hacker
$($(".window-list-table-select")[Math.floor(Math.random() * 20)]).trigger("click");
selectNextTarget();
return;
}
if (action)
console.log("selected the richest target ...");
$('[data-text="'+lastRich+'"').trigger("click");
setTimeout(function (){
selectNextTarget();
}, 700);
}, 700);
if (debug)
console.log("getLastRichTarget() -> looping | richer one");
}
else
{
if (loc_lastGainName == lastRichName) //the richest one is not the richest now
{
/* search for the richest one on the log */
$.each( $(".log-gained"), function( indexNumber, value )
{
var tmpInt = parseInt($(value).html());
if (tmpInt > lastRichGain)
{
var tmp = $(value).parent().children("#hackedid-form");
lastRichName = tmp.html();
lastRich = tmp.attr("data-text");
lastRichGain = tmpInt;
if (action)
console.info("updating the richest one: " + lastRich + "(" + lastRichName + ") | " + tmpInt);
}
});
}
if (action)
console.log("selecting the last rich target ...");
setTimeout(function (){
$('[data-text="'+lastRich+'"').trigger("click");
setTimeout(function (){
selectNextTarget();
}, 700);
}, 700);
if (debug)
console.log("getLastRichTarget() -> looping | not richer one");
}
if (debug)
console.log("getLastRichTarget() -> lastLine.");
}
function selectNextTarget()
{
if (action)
console.log(" ");
setTimeout(function (){
$("#window-other-button").trigger("click");
if (action)
console.log("selected new target, triggered click Hack");
//random select hack port A/B/C
selectPort();
}, 700);
}
function selectPort()
{
setTimeout(function (){
port = Math.floor(Math.random() * 3);
while (lastSelectedPort == ""+port)
{
port = Math.floor(Math.random() * 3);
}
lastSelectedPort = port;
port = $($("[id^='window-other-port']")[port]);
if (action)
console.log("selected port : " + port.html().replace(/\s/g, ''));
port.trigger("click");
setTimeout(function (){
startHacking();
}, 500);
if (action)
console.log("selected target (name: " + $("#window-other-playername").html() + "), triggered click port");
}, 1500);
}
function startHacking() {
if (runtimeBreaker)
return;
if ($("#topwindow-success").css("opacity") == "1")
{
finished = true;
hackedTarget++;
if (action)
console.info("hack finished ...");
//hack finished
$(".button.targetmessage-button-cancel").trigger("click");
if (action)
console.log("previous hack finished, searching for new target...");
setTimeout(function (){
moneyCheck();
if (!customTarget)
{
getLastRichTarget();
}
else
{
selectNextTarget();
if (action)
console.log("customTarget is true, directly triggering click port ...");
}
}, 1500);
return;
}
else
finished = false;
var keyword;
var myKey = $("#tool-type>.tool-type-img").attr("src").split("/");
if (Math.random() > accuracy)
{
keyword = myKey[4] + "/" + "h552.png".replace(".png", "");
}
else if (myKey.length == 6)
keyword = myKey[4] + "/" + myKey[5].replace(".png", "");
else //not in hacking, restarting attempt
{
if (action)
console.warn("hacking not in progress, trigger again after 1second ...");
setTimeout(function (){
getLastRichTarget();
}, 1000);
return;
}
if (action)
console.log("hacking ... keyword: " + keyword);
if (get(keyword) == "")
{
console.error('map["' + keyword + '"] = ""');
return;
}
else
keyword = get(keyword);
$("#tool-type-word").val(keyword);
$("#tool-type-form").submit();
if (!finished/*100% hacked*/)
{
var delay;
if (findKeys)
delay = Math.floor(Math.random() * 200 + 100);
else if (customTimer)
delay = timerMax;
else if (myKey[4] == "hard")
delay = Math.floor(Math.random() * 1200 + 1000);
else if (myKey[4] == "medium")
delay = Math.floor(Math.random() * 900 + 860);
else if (myKey[4] == "easy")
delay = Math.floor(Math.random() * 900 + 860);
if (delay > delayMax)
delay = delayMax;
else if (delay < delayMin)
delay = delayMin;
if (action)
console.log("next submittion will be start after: " + delay + " ticks");
setTimeout(startHacking, delay);
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment