Advertisement
rg443

tc d2

Apr 14th, 2017
259
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. Array.prototype.unique=function(){var c={},d=[],b,a;for(b=0;a=this[b];b++)c[a]=1;for(a in c)d.push(a);return d};
  2. var dl=document.body.innerHTML.match(/[a-z0-9_\-]+\.[a-z]{2,64}(?=\t)/gim).unique().sort();
  3. var qm=5;ql=0;
  4. function fetch1(){
  5. var v=dl.shift();
  6. if (v && ql<qm) {
  7.    v=v.toLowerCase();
  8.    ql++
  9.    fetch("/p/tc.php?q="+v)
  10.    .then(function(r){ql--;return r.json()})
  11.    .then(function(d){
  12.        //console.log(v,d);
  13.        for(var i=0;i<qm-ql;i++) fetch1();
  14.        if (d.subdomains) {console.log(v,d.subdomains.slice(0,10).join(", ").toLowerCase()); d2q=d2q.concat(d.subdomains)}
  15.        if (d.resolutions) {
  16.           var ips=d.resolutions.map(function(v){return v.ip_address})
  17.           console.log(v,ips.slice(0,10).join(", "))
  18.           d2q=d2q.concat(d.ips)
  19.        }
  20.        if (d2q.length && ql2<qm) fetch2(d2q.shift());
  21.     })
  22. }
  23.  
  24. }
  25.  
  26. var d2q=[],ql2=0;
  27. function fetch2(h) {
  28. ql2++;
  29.  
  30. fetch("https://rg443.tk/p/d2.php?q="+h)
  31.     .then(function(r){ql2--;return r.text()})
  32.     .then(function(d){
  33.        console.log(h,d);
  34.        for (var i=0;i<qm-ql2;i++,h=d2q.shift()) {
  35.           if (h) {fetch2(h)}
  36.           }
  37.  
  38.        })
  39. }
  40. // d2q=d2q.concat(dl);
  41.  
  42. fetch1()
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement