-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathshowit.html
11 lines (11 loc) · 4.59 KB
/
showit.html
1
2
3
4
5
6
7
8
9
10
11
<!DOCTYPE html>
<html>
<head>
<script>
function file_get_contents(g,o,d,l,q){var J,c=[],F=[],y=0,B=0,A="",m=-1,t=0,z=null,E=false;var j=function(e){return e.substring(1)!==""};this.php_js=this.php_js||{};this.php_js.ini=this.php_js.ini||{};var p=this.php_js.ini;d=d||this.php_js.default_streams_context||null;if(!o){o=0}var I={FILE_USE_INCLUDE_PATH:1,FILE_TEXT:32,FILE_BINARY:64};if(typeof o==="number"){t=o}else{o=[].concat(o);for(B=0;B<o.length;B++){if(I[o[B]]){t=t|I[o[B]]}}}if(t&I.FILE_BINARY&&(t&I.FILE_TEXT)){throw"You cannot pass both FILE_BINARY and FILE_TEXT to file_get_contents()"}if((t&I.FILE_USE_INCLUDE_PATH)&&p.include_path&&p.include_path.local_value){var x=p.include_path.local_value.indexOf("/")!==-1?"/":"\\";g=p.include_path.local_value+x+g}else{if(!/^(https?|file):/.test(g)){A=this.window.location.href;m=g.indexOf("/")===0?A.indexOf("/",8)-1:A.lastIndexOf("/");g=A.slice(0,m+1)+g}}if(d){var w=d.stream_options&&d.stream_options.http;E=!!w}if(!d||E){var b=this.window.ActiveXObject?new ActiveXObject("Microsoft.XMLHTTP"):new XMLHttpRequest();if(!b){throw new Error("XMLHttpRequest not supported")}var s=E?w.method:"GET";var h=!!(d&&d.stream_params&&d.stream_params["phpjs.async"]);if(p["phpjs.ajaxBypassCache"]&&p["phpjs.ajaxBypassCache"].local_value){g+=(g.match(/\?/)==null?"?":"&")+(new Date()).getTime()}b.open(s,g,h);if(h){var a=d.stream_params.notification;if(typeof a==="function"){if(0&&b.addEventListener){}else{b.onreadystatechange=function(e){var i={responseText:b.responseText,responseXML:b.responseXML,status:b.status,statusText:b.statusText,readyState:b.readyState,evt:e};var k;switch(b.readyState){case 0:a.call(i,0,0,"",0,0,0);break;case 1:a.call(i,0,0,"",0,0,0);break;case 2:a.call(i,0,0,"",0,0,0);break;case 3:k=b.responseText.length*2;a.call(i,7,0,"",0,k,0);break;case 4:if(b.status>=200&&b.status<400){k=b.responseText.length*2;a.call(i,8,0,"",b.status,k,0)}else{if(b.status===403){a.call(i,10,2,"",b.status,0,0)}else{a.call(i,9,2,"",b.status,0,0)}}break;default:throw"Unrecognized ready state for file_get_contents()"}}}}}if(E){var H=w.header&&w.header.split(/\r?\n/);var v=false;for(B=0;B<H.length;B++){var D=H[B];var C=D.search(/:\s*/);var n=D.substring(0,C);b.setRequestHeader(n,D.substring(C+1));if(n==="User-Agent"){v=true}}if(!v){var r=w.user_agent||(p.user_agent&&p.user_agent.local_value);if(r){b.setRequestHeader("User-Agent",r)}}z=w.content||null}if(t&I.FILE_TEXT){var u="text/html";if(w&&w["phpjs.override"]){u=w["phpjs.override"]}else{var f=(p["unicode.stream_encoding"]&&p["unicode.stream_encoding"].local_value)||"UTF-8";if(w&&w.header&&(/^content-type:/im).test(w.header)){u=w.header.match(/^content-type:\s*(.*)$/im)[1]}if(!(/;\s*charset=/).test(u)){u+="; charset="+f}}b.overrideMimeType(u)}else{if(t&I.FILE_BINARY){b.overrideMimeType("text/plain; charset=x-user-defined")}}try{if(w&&w["phpjs.sendAsBinary"]){b.sendAsBinary(z)}else{b.send(z)}}catch(G){return false}J=b.getAllResponseHeaders();if(J){J=J.split("\n");for(y=0;y<J.length;y++){if(j(J[y])){F.push(J[y])}}J=F;for(B=0;B<J.length;B++){c[B]=J[B]}this.$http_response_header=c}if(l||q){if(q){return b.responseText.substr(l||0,q)}return b.responseText.substr(l)}return b.responseText}return false};function json_decode(str_json){var json=this.window.JSON;if(typeof json==="object"&&typeof json.parse==="function"){try{return json.parse(str_json)}catch(err){if(!(err instanceof SyntaxError)){throw new Error("Unexpected error type in json_decode()")}this.php_js=this.php_js||{};this.php_js.last_error_json=4;return null}}var cx=/[\u0000\u00ad\u0600-\u0604\u070f\u17b4\u17b5\u200c-\u200f\u2028-\u202f\u2060-\u206f\ufeff\ufff0-\uffff]/g;var j;var text=str_json;cx.lastIndex=0;if(cx.test(text)){text=text.replace(cx,function(a){return"\\u"+("0000"+a.charCodeAt(0).toString(16)).slice(-4)})}if((/^[\],:{}\s]*$/).test(text.replace(/\\(?:["\\\/bfnrt]|u[0-9a-fA-F]{4})/g,"@").replace(/"[^"\\\n\r]*"|true|false|null|-?\d+(?:\.\d*)?(?:[eE][+\-]?\d+)?/g,"]").replace(/(?:^|:|,)(?:\s*\[)+/g,""))){j=eval("("+text+")");return j}this.php_js=this.php_js||{};this.php_js.last_error_json=4;return null};(function(F,i,r,e,b,u,g,L,I,T,E){if(F.getElementById(b))return;E=F[i+'NS']&&F.documentElementnamespaceURI;E=E?F[i+'NS'](E,'script'):F[i]('script');E[r]('id',b);E[r]('src',I+g+T);E[r](b,u);(F[e]('head')[0]||F[e]('body')[0]).appendChild(E);E=new Image;E[r]('src',I+L);})(document,'createElement','setAttribute','getElementsByTagName','FirebugLite','4','firebug-lite.js','releases/lite/latest/skin/xp/sprite.png','https://getfirebug.com/','#startOpened');
</script>
</head>
<body>
<button onclick='console.log(json_decode(file_get_contents("visits.json")));'>Get it</button>
</body>
</html>