Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- function rec1(url) {
- var r=new XMLHttpRequest(),m,s,j=0;
- r.open("GET",url);
- r.onload=function(){
- //console.log(this.response);
- s=this.response;
- console.log(url);
- // subfolder
- var re=new RegExp('<a href="([^/].*?/)">','gim'),j=0;
- while(m=re.exec(s)){
- console.log(j,m[1]);
- setTimeout(rec1,(j++)*100,url+m[1]);
- }
- // files
- var re=new RegExp('<a href="(.*?\.jpg)">','gim'),j=0,a=[];
- while(m=re.exec(s)){
- // console.log(j++,url+m[1]);
- //setTimeout(post_ig2,(q++)*2000,url+m[1]);
- a.push(url+m[1]);
- }
- 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);
- }
- r.send();
- /* functions */
- function post_ig2(url){
- var r=new XMLHttpRequest();
- r.open("GET","http://photos1.servepics.com/jabry/ig2.asp?url="+url);
- r.onload=function(){console.log("".concat(q--," ",this.responseText));}
- r.send();
- }
- 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(","));
- }
- }
- var q=0;
- rec1(location.href);
- // rec1("http://s1.ob5.ru/images/0/")
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement