matchcpanel.pl


#!/usr/bin/perl -W
#made by ev1lut10n
#sysadmin tool to match domain and cpanel user

open(PROSES_MYSQL, "ls /var/cpanel/users |");
while ()
        {
                $username =  $_;
                       $username=~ s/^\s+//;
                       $username=~ s/\s+$//;
               
                        open(PROSES_KU, "cat $username |");
                        while ()
                                {
                                        $tampilan_proses2 =  $_;
                                         $tampilan_proses2=~ s/^\s+//;
                                                $tampilan_proses2=~ s/\s+$//;
                                        if($tampilan_proses2=~/DNS=/)
                                          {
                                                 
                                                  print "\nusername : $username\n";
                                                  print "\ndomain : $tampilan_proses2\n";      
                                                  print "\n========================================\n";
                                         }
                                }
                        close(PROSES_K);
       }
close(PROSES_MYSQL);

sub str_replace {
eval
 {
my $replace_this = shift;
    my $with_this  = shift;
    my $string   = shift;

    my $length = length($string);
    my $target = length($replace_this);

    for(my $i=0; $i<$length - $target + 1; $i++) {
        if(substr($string,$i,$target) eq $replace_this) {
            $string = substr($string,0,$i) . $with_this . substr($string,$i+$target);
            return $string;
        }
    }
    return $string;
}      
}
Share this article :

Posting Komentar

 
Contact : Creating Website | Email : agendoza404@gmail.com
Copyright © 2016. Erwin Eshan Firas - All Rights Reserved
Template Created by Creating Website Published by Travis
Powered by Erwin Eshan Firas