Skip to content

Commit

Permalink
fix(misc/tools.php): fix vuln
Browse files Browse the repository at this point in the history
  • Loading branch information
Ahwxorg authored Sep 2, 2023
1 parent 3719a92 commit 26bfc87
Showing 1 changed file with 2 additions and 9 deletions.
11 changes: 2 additions & 9 deletions misc/tools.php
Original file line number Diff line number Diff line change
@@ -1,13 +1,6 @@
<?php
function get_root_domain($url)
{
$split_url = explode("/", $url);
$base_url = $split_url[2];

$base_url_main_split = explode(".", strrev($base_url));
$root_domain = strrev($base_url_main_split[1]) . "." . strrev($base_url_main_split[0]);

return $root_domain;
function get_root_domain($url) {
return parse_url($url, PHP_URL_HOST);
}

function request($url)
Expand Down

0 comments on commit 26bfc87

Please sign in to comment.