Script at http://www.cockpig.com/js/utils/ses ...(local script)(report as good / report as bad) /*
sessvars ver 1.01
- javascript based session object
copyright 2008 thomas frank
this eula grants you the following rights:
installation and use. you may install and use an unlimited number of copies of the software product.
reproduction and distribution. you may reproduce and distribute an unlimited number of copies of the software product either in whole or in part; each copy should include all copyright and trademark notices, and shall be accompanied by a copy of this eula. copies of the software product may be distributed as a standalone product or included with your own product.
commercial use. you may sell for profit and freely distribute scripts and/or compiled scripts that were created with the software product.
v 1.0 --> 1.01
sanitizer added to toobject-method & includefunctions flag now defaults to false
*/
sessvars=function(){
var x={};
x.$={
prefs:{
memlimit:2000,
autoflush:true,
crossdomain:false,
inc ludeprotos:false,
includefunctions:false
},
parent:x,
clearmem:function(){
for( var i in this.parent){if(i!="$"){this.parent[i]=undefined}};
this.flush();
},
used mem:function(){
x={};
return math.round(this.flush(x)/1024);
},
usedmempercent:function(){
return math.round(this.usedmem()/this.prefs.memlimit);
},
flush:function(x){
var y,o={},j=this.$$;
x=x||top;
for(var i in this.parent){o[i]=this.parent[i]};
o.$=this.prefs;
j.includeprotos=this.prefs.includ eprotos;
j.includefunctions=this.prefs.includefunctions;
y=this.$$.make(o);
if(x!= top){return y.length};
if(y.length/1024>this.prefs.memlimit){return false}
x.name=y;
return true;
},
getdomain:function(){
var l=location.href
l=l.split("///").join("//");
l=l.substring(l.i ndexof("://")+3).split("/")[0];
while(l.split(".").length >2){l=l.substring(l.indexof(".")+1)};
return l
},
debug:function(t){
var t=t||this,a=arguments.callee;
if(!document.body){settimeout(function(){a(t)},200);retur n};
t.flush();
var d=document.getelementbyid("sessvarsdebugdiv");
if(!d){d=document.createelemen t("div");document.body.insertbefore(d,document.body.firstchild)};
d.id="s essvarsdebugdiv";
d.innerhtml='<div style="line-height:20px;padding:5px;font-size:11px;font-family:verdana,arial,helvetic a;z-index:10000;background:#ffffcc;border: 1px solid #333;margin-bottom:12px"><b style="font-family:trebuchet ms;font-size:20px">sessvars.js - debug info:</b><br/><br/>memory usage: '+t.usedmem()+' kb ('+t.usedmempercent()+'%) <span style="cursor:pointer"><b>[clear memory]</b></span><br/>'+
top.name.split('\n').join('<br/>') +'</div>';
d.getelementsbytagname('span')[0].onclick=function(){t.clearmem();locat ion.reload()}
},
init:function(){
var o={}, t=this;
try {o=this.$$.toobject(top.name)} catch(e){o={}};
this.prefs=o.$||t.prefs;
if(this.prefs.crossdomain || this.prefs.currentdomain==this.getdomain()){
for(var i in o){this.parent[i]=o[i]};
}
else {
this.prefs.currentdomain=this.getdomain();
};
this.parent.$=t;
t.flush();
var f=function(){if(t.prefs.autoflush){t.flush()}};
if(window["addeventlistener"] ){addeventlistener("unload",f,false)}
else if(window["attachevent"]){window.attachevent("onunload",f)}
else {this.prefs.autoflush=false};
}
};
x.$.$$={
compactoutput:false,
includeprotos:false,
includefunctions: false,
detectcirculars:true,
restorecirculars:true,
make:function(arg,restore) {
this.restore=restore;
this.mem=[];this.pathmem=[];
return this.tojsonstringarray(arg).join('');
},
toobject:function(x){
if(!this.cleaner){
try{this.cleaner=new regexp('^("(\\\\.|[^"\\\\\\n\\r])*?"|[,:{}\\[\\]0-9.\\-+eaeflnr-u \\n\\r\\t])+?$')}
catch(a){this.cleaner=/^(true|false|null|\[.*\]|\{.*\}|".*" ;|\d+|\d+\.\d+)$/}
};
if(!this.cleaner.test(x)){return {}};
eval("this.myobj="+x);
if(!this.restorecirculars || !alert){return this.myobj};
if(this.includefunctions){
var x=this.myobj;
for(var i in x){if(typeof x[i]=="string" && !x[i].indexof("jsonincludedfunc:")){
x[i]=x[i].substring(17);
eval(&qu ot;x[i]="+x[i])
}}
};
this.restorecode=[];
this.make(this.myobj,true);
var r=this.restorecode.join(";")+";";
eval('r=r.replace(/\\w([0-9]{1,}) (\\w)/g,"[$1]$2").replace(/\\.\\;/g,";")');
eval(r);
return this.myobj
},
tojsonstringarray:function(arg, out) {
if(!out){this.path=[]};
out = out || [];
var u; // undefined
switch (typeof arg) {
case 'object':
this.lastobj=arg;
if(this.detectcirculars){
var m=this.mem; var n=this.pathmem;
for(var i=0;i<m.length;i++){
if(arg===m[i]){
out.push('"jsoncircref:'+n[i]+'& quot;');return out
}
};
m.push(arg); n.push(this.path.join("."));
};
if (arg) {
if (arg.constructor == array) {
out.push('[');
for (var i = 0; i < arg.length; ++i) {
this.path.push(i);
if (i > 0)
out.push(',\n');
this.tojsonstringarray(arg[i], out);
this.path.pop();
}
out.push(']');
return out;
} else if (typeof arg.tostring != 'undefined') {
out.push('{');
var first = true;
for (var i in arg) {
if(!this.includeprotos && arg[i]===arg.constructor.prototype[i]){continue};
this.path.push(i);
var curr = out.length;
if (!first)
out.push(this.compactoutput?',':',\n');
this.tojsonstringarray(i, out);
out.push(':');
this.tojsonstringarray(arg[i], out);
if (out[out.length - 1] == u)
out.splice(curr, out.length - curr);
else
first = false;
this.path.pop();
}
out.push('}');
return out;
}
return out;
}
out.push('null');
return out;
case 'unknown':
case 'undefined':
case 'function':
if(!this.includefunctions){out.push(u);return out};
arg="jsonincludedfunc:"+arg;
out.push('"');
var a=['\n','\\n','\r','\\r','"','\\"'];
arg+=""; for(var i=0;i<6;i+=2){arg=arg.split(a[i]).join(a[i+1])};
out.push(arg);
out.push('" ;');
return out;
case 'string':
if(this.restore && arg.indexof("jsoncircref:")==0){
this.restorecode.push('this.myobj.'+this.p ath.join(".")+"="+arg.split("jsoncircref:").join("this.m yobj."));
};
out.push('"');
var a=['\n','\\n','\r','\\r','"','\\"'];
arg+=""; for(var i=0;i<6;i+=2){arg=arg.split(a[i]).join(a[i+1])};
out.push(arg);
out.push('" ;');
return out;
default:
out.push(string(arg));
return out;
}
}
};
x.$.init();
return x;
}()
- Came upon some drawback? Please, help us fix it. - This site is cheating? Please use comment and rating system below to inform us about it.
User comments
No comments for this trader. Be the first!
Only registered users have the right to post comments. You can register here
02.21.10
ICQ Bot is down
ICQ Bot no more supported.
02.20.08ICQ Bot updates!
New funcs. Now bot will show you topics ob adult boards with checked domain. Also two commands are realized: boards [domain] will show snippets and iframes [domain] will show iframes and scripts with description.
02.16.08CJLog ICQ Bot!
Use power of CJLog in your ICQ. Just add our bot 450-825-540 to your IM and you can check your traders for blacklist status, purity, traffic, niches, illegal scripts much quickly!
02.07.08CJLog Alerts!
With CJLog Alerts your sites will newer been hacked or go down. CJLog Alerts will inform you about anwanted changes or downtimes.