Advertisement
rg443

ob5.ru -> post_ig2 [recursive apache directory]

Jul 7th, 2013
215
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. function rec1(url) {
  2.    var r=new XMLHttpRequest(),m,s,j=0;
  3.    r.open("GET",url);
  4.    r.onload=function(){
  5.       //console.log(this.response);
  6.       s=this.response;
  7.       console.log(url);
  8.       // subfolder
  9.       var re=new RegExp('<a href="([^/].*?/)">','gim'),j=0;
  10.       while(m=re.exec(s)){
  11.         console.log(j,m[1]);
  12.         setTimeout(rec1,(j++)*100,url+m[1]);
  13.         }
  14.       // files
  15.       var re=new RegExp('<a href="(.*?\.jpg)">','gim'),j=0,a=[];
  16.       while(m=re.exec(s)){
  17.         // console.log(j++,url+m[1]);
  18.         //setTimeout(post_ig2,(q++)*2000,url+m[1]);
  19.         a.push(url+m[1]);
  20.         }
  21.       q++;setTimeout(function(a){post_imgur(a,function(){var s=this.toString();console.log(s,s.split("\n").length-1,--q);document.title=q; })},q*500,a);
  22.       }
  23.    r.send();
  24.  
  25.    /* functions */
  26.    function post_ig2(url){
  27.       var r=new XMLHttpRequest();
  28.       r.open("GET","http://photos1.servepics.com/jabry/ig2.asp?url="+url);
  29.       r.onload=function(){console.log("".concat(q--," ",this.responseText));}
  30.       r.send();
  31.       }
  32.    function post_imgur(a,callback) {        
  33.       var r=new XMLHttpRequest();
  34.       r.open("POST","http://176.34.162.148/jabry/imgur1.asp?u=&b=",true);
  35.       //r.open("POST","http://notebook1.lan:8000/jabry/imgur1.asp?u=&b=",true);
  36.       r.setRequestHeader("Content-Type", "application/x-www-form-urlencoded");
  37.       r.onreadystatechange=function(){if (this.readyState==4 && this.status==200) callback&&callback.call(this.responseText); }
  38.       r.send("u=" + a.join(","));
  39.       }  
  40.    }
  41. var q=0;
  42. rec1(location.href);
  43. // rec1("http://s1.ob5.ru/images/0/")
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement