Advertisement
John4711

as_path

Jul 8th, 2022
897
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. var d=await(await fetch("/p/rstats.php?q=looking-glass:1.1.1.0/24")).json();
  2. var as_path=d.rrcs.map(v=>v.peers).flat().map(v=>v.as_path.split(" ").map(v=>parseInt(v)) );
  3. var asns=[...new Set(as_path.flat())].sort((a,b)=>a-b);
  4.  
  5. for (var i=0;i<asns.length;i+=50){
  6. var x=await Promise.all(asns.slice(i+0,i+50).map(v=>fetch("/p/rstats.php?q=as-overview:"+v).then(r=>r.json()))   );
  7. console.log(x);
  8. }
  9.  
  10.  
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement