�PNG
IHDR��;���IDATx��ܻn�0���K��
�)(�pA������7�LeG{�� �§㻢|��ذaÆ
6lذaÆ
6lذaÆ
6lom��$^�y���ذag�5bÆ
6lذaÆ
6lذa{����
6lذaÆ
�`����}H�Fkm�,�m����Ӫ���ô�ô!��x�|'ܢ˟;�E:���9�&ᶒ�}�{�v]�n&�6�
�h��_��t�ڠ͵-ҫ���Z;��Z$�.�P���k�ž)�!��o���>}l�eQfJ�T��u і���چ��\��X=8��Rن4`Vw�l�>����n�G�^��i�s��"ms�$�u��i��?w�bs[m�6�K4���O���.�4��%����/����b�C%��t��M�ז� �-l�G6�mrz2���s�%�9��s@���-�k�9�=���)������k�B5����\��+͂�Zsٲ��Rn��~G���R���C������wIcI��n7jJ���hۛNCS|���j0��8y�iHKֶۛ�k�Ɉ+;Sz������L/��F�*\��Ԕ�#"5��m�2��[S��������=�g��n�a�P�e�ғ�L��
lذaÆ
6l�^k��̱aÆ
6lذaÆ
6lذa;����
�_��ذaÆ
6lذaÆ
6lذaÆ
���R���IEND�B`
#!/usr/local/cpanel/3rdparty/bin/perl
# cpanel - scripts/cpdig Copyright 2022 cPanel, L.L.C.
# All rights reserved.
# copyright@cpanel.net http://cpanel.net
# This code is subject to the cPanel license. Unauthorized copying is prohibited
package scripts::cpdig;
use strict;
use warnings;
=encoding utf-8
=head1 NAME
cpdig
=head1 USAGE
cpdig [--verbose]
=head1 DESCRIPTION
This script performs a DNS query using cPanel’s DNS resolver.
Its output should yield the same end results as C.
cPanel provides this script solely for diagnostic purposes; no cPanel
& WHM feature requires its use.
=cut
use parent qw( Cpanel::HelpfulScript );
use Cpanel::DNS::Unbound;
use constant _OPTIONS => ('verbose');
use constant _ACCEPT_UNNAMED => 1;
__PACKAGE__->new(@ARGV)->run() if !caller;
sub run {
my ($self) = @_;
my ( $name, $type ) = $self->getopt_unnamed();
die $self->help() if grep { !$_ } $name, $type;
$type = uc($type);
my $dns = Cpanel::DNS::Unbound->new();
my $ret = $dns->recursive_queries( [ [ $name, $type ] ] )->[0];
if ( $self->getopt('verbose') ) {
print STDERR $ret->{debug};
}
my $data_ar = $ret->{'decoded_data'} || $ret->{result}{data};
my %FORMATTERS = (
'ARRAY' => sub { "@{$_[0]}" },
'HASH' => sub {
join ' ', map { "$_=$_[0]->{$_}" } sort keys %{ $_[0] };
}
);
foreach my $item ( @{$data_ar} ) {
my $type = ref $item;
if ( $type ne '' && defined $FORMATTERS{$type} ) {
$self->_print( $FORMATTERS{$type}->($item) . "\n" );
}
else {
$self->_print("$item\n");
}
}
return;
}
1;