Advertisement
rg443

ob5.ru

Apr 24th, 2013
132
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. /* 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=""/>'});
  2. document.body.insertAdjacentHTML("afterBegin",a.join(""));a.length
  3. */
  4.  
  5. for (var i=0;i<=99;i++)get_url("http://s2.ob5.ru/images/0/" + ("0"+i).substr(-2)+"/",print1);
  6. function print1(){
  7.    var s=this[0];
  8.    var u=this[1].replace("http://","");
  9.    console.log(this[1]);
  10.    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=""/>'});
  11.    document.body.insertAdjacentHTML("beforeEnd",a.join(""));a.length
  12.    var b1=this[1];
  13.    var b=s.match(/\w+.jpg(?=">)/gim).map(function(v,i){return b1+v});
  14.    console.log(b.join("\n"));
  15.    post_imgur(b,print2);
  16.    function print2(){console.log(this.toString(),this.toString().split("\n").length)}
  17. }
  18.  
  19.  
  20.  
  21. function post_imgur(a,callback) {        
  22. var r=new XMLHttpRequest();
  23. r.open("POST","http://176.34.162.148/jabry/imgur1.asp?u=&b=",true);
  24. //r.open("POST","http://notebook1.lan:8000/jabry/imgur1.asp?u=&b=",true);
  25. r.setRequestHeader("Content-Type", "application/x-www-form-urlencoded");
  26. r.onreadystatechange=function(){if (this.readyState==4 && this.status==200) callback&&callback.call(this.responseText); }
  27. r.send("u=" + a.join(","));
  28. }
  29. function get_url(url,callback) {
  30.         var r=new XMLHttpRequest();
  31.         r.open("GET",url,true);
  32.         //r.setRequestHeader("X-Requested-With", "XMLHttpRequest");
  33.         //r.setRequestHeader("Accept-Encoding", "gzip");
  34.         r.onreadystatechange=function(){
  35.        if (this.readyState==4 && this.status==200 && callback) callback.call([this.responseText,url]);
  36.        }
  37.     r.send();      
  38.  
  39. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement