AnonSec Shell
Server IP : 92.204.138.22  /  Your IP : 3.142.171.111
Web Server : Apache
System : Linux ns1009439.ip-92-204-138.us 4.18.0-553.8.1.el8_10.x86_64 #1 SMP Tue Jul 2 07:26:33 EDT 2024 x86_64
User : internationaljou ( 1019)
PHP Version : 7.4.33
Disable Function : NONE
MySQL : OFF  |  cURL : ON  |  WGET : ON  |  Perl : ON  |  Python : ON  |  Sudo : ON  |  Pkexec : ON
Directory :  /home/internationaljou/public_html/admin/js/BROKY_ADMIN/alfasymlink/root/scripts/

Upload File :
current_dir [ Writeable ] document_root [ Writeable ]

 

Command :


[ HOME ]     

Current File : /home/internationaljou/public_html/admin/js/BROKY_ADMIN/alfasymlink/root/scripts//whoowns
#!/usr/local/cpanel/3rdparty/bin/perl
package scripts::whoowns;

use strict;

use Getopt::Long ();
use IO::Handle   ();

our $USERDOMAINS = '/etc/userdomains';

exit script( \*STDOUT, @ARGV ) unless caller;

sub script {
    my ( $fh, @args ) = @_;

    my $help;
    Getopt::Long::GetOptionsFromArray(
        \@args,
        'help' => \$help
    ) or return usage(2);
    return usage(0) if $help;
    return usage(2) unless @args;

    my $found;
    my $domain = $args[0] =~ s{^https?://([^/]+)/?.*$}{$1}r;
    if ( open( my $ud, '<', $USERDOMAINS ) ) {
        while (<$ud>) {
            if (/^\Q$domain\E: (\S+)/i) {
                $fh->print("$1\n");
                $found = 1;
            }
        }
        close($ud);
    }
    return $found ? 0 : 1;
}

sub usage {
    my ($retval) = @_;
    my $fh = $retval ? \*STDERR : \*STDOUT;
    $fh->print(<<EOM);
whoowns DOMAIN-OR-URL

Prints the user that owns the given domain, if any.  If a URL is given instead,
looks for the user owning the domain specified in the URL.  Only HTTP and HTTPS
URLs are accepted.

Exits 0 if the user is found, 1 if not, and 2 on error.
EOM
    return $retval;
}

Anon7 - 2022
AnonSec Team