Advertisement
rg443

1280x800.net -> imgur

Mar 25th, 2013
116
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. var stack=0;
  2. for (var i=1;i<=1018;i++){stack++;setTimeout(get_url,i*100,"http://www.1280x800.net/page/"+i, callback1);}
  3.  
  4.  
  5. function callback1() {
  6.   var a = this.toString().match(/\d+\/\d+\.jpg/gim).map(function(v){return "http://www.1280x800.net/images/"+v.replace("/","/1280x800.net_")  });
  7.  
  8.   console.log(a.join("\n"));
  9.   post_imgur(a, function() {
  10.     console.log("imgur: " + (this.split("\n").length - 1), --stack);
  11.     window.hl = this.toString()
  12.   })
  13. }
  14. ;
  15.  
  16.  
  17. /* upload imgur */
  18. function post_imgur(a,callback) {    
  19. var r=new XMLHttpRequest();
  20. r.open("POST","http://176.34.162.148/jabry/imgur1.asp?u=&b=",true);
  21. //r.open("POST","http://notebook1.lan:8000/jabry/imgur1.asp?u=&b=",true);
  22. r.setRequestHeader("Content-Type", "application/x-www-form-urlencoded");
  23. r.onreadystatechange=function(){if (this.readyState==4 && this.status==200) callback.call(this.responseText); }
  24. r.send("u=" + a.join(","));
  25. }
  26.  
  27. /* fetch url */
  28. function get_url(url,callback) {
  29.     var r=new XMLHttpRequest();
  30.     r.open("GET",url,true);
  31.     r.onreadystatechange=function(){
  32.        if (this.readyState==4 && this.status==200) callback.call(this.responseText);
  33.        }
  34.     r.send();      
  35.  
  36. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement