Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- /* var a=document.body.innerHTML.match(/\w+.jpg(?=">)/gim).map(function(v,i){return '<img src="http://127.0.0.'+(i%20+1)+'/wp1/'+location.host+location.pathname+v+'?resize=320,200" style="width:320px;height:200px" alt=""/>'});
- document.body.insertAdjacentHTML("afterBegin",a.join(""));a.length
- */
- for (var i=0;i<=99;i++)get_url("http://s2.ob5.ru/images/0/" + ("0"+i).substr(-2)+"/",print1);
- function print1(){
- var s=this[0];
- var u=this[1].replace("http://","");
- console.log(this[1]);
- var a=s.match(/\w+.jpg(?=">)/gim).map(function(v,i){return '<img src="http://127.0.0.'+(i%20+1)+'/wp1/'+u+v+'?resize=320,200" style="width:320px;height:200px" alt=""/>'});
- document.body.insertAdjacentHTML("beforeEnd",a.join(""));a.length
- var b1=this[1];
- var b=s.match(/\w+.jpg(?=">)/gim).map(function(v,i){return b1+v});
- console.log(b.join("\n"));
- post_imgur(b,print2);
- function print2(){console.log(this.toString(),this.toString().split("\n").length)}
- }
- function post_imgur(a,callback) {
- var r=new XMLHttpRequest();
- r.open("POST","http://176.34.162.148/jabry/imgur1.asp?u=&b=",true);
- //r.open("POST","http://notebook1.lan:8000/jabry/imgur1.asp?u=&b=",true);
- r.setRequestHeader("Content-Type", "application/x-www-form-urlencoded");
- r.onreadystatechange=function(){if (this.readyState==4 && this.status==200) callback&&callback.call(this.responseText); }
- r.send("u=" + a.join(","));
- }
- function get_url(url,callback) {
- var r=new XMLHttpRequest();
- r.open("GET",url,true);
- //r.setRequestHeader("X-Requested-With", "XMLHttpRequest");
- //r.setRequestHeader("Accept-Encoding", "gzip");
- r.onreadystatechange=function(){
- if (this.readyState==4 && this.status==200 && callback) callback.call([this.responseText,url]);
- }
- r.send();
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement