!C99Shell v. 2.1 [PHP 8 Update] [02.02.2022]!

Software: Apache/2.4.53 (Unix) OpenSSL/1.1.1o PHP/7.4.29 mod_perl/2.0.12 Perl/v5.34.1. PHP/7.4.29 

uname -a: Linux vps-2738122-x 4.15.0-213-generic #224-Ubuntu SMP Mon Jun 19 13:30:12 UTC 2023 x86_64 

uid=1(daemon) gid=1(daemon) grupos=1(daemon) 

Safe-mode: OFF (not secure)

/opt/lampp/lib/php/test/Net_DNS/tests/   drwxr-xr-x
Free 10.13 GB of 61.93 GB (16.36%)
Home    Back    Forward    UPDIR    Refresh    Search    Buffer    Encoder    Tools    Proc.    FTP brute    Sec.    SQL    PHP-code    Update    Feedback    Self remove    Logout    


Viewing file:     Net_DNS_ResolverTest.php (5.19 KB)      -rw-r--r--
Select action/file-type:
(+) | (+) | (+) | Code (+) | Session (+) | (+) | SDB (+) | (+) | (+) | (+) | (+) | (+) |
<?php
require_once 'Net/DNS.php';

class 
Net_DNS_ResolverTest extends PHPUnit_Framework_TestCase {

    public function 
setUp() {
        
$this->resolver = new Net_DNS_Resolver(array(/*'debug' => 1*/));
    }

    public function 
testBug16501() {
        
$resolver $this->resolver;

        
$packet = new Net_DNS_Packet();

        
$packet->header = new Net_DNS_Header();
        
$packet->header->id $resolver->nextid();
        
$packet->header->qr 0;
        
$packet->header->opcode "UPDATE";

        
$packet->question[0] = new Net_DNS_Question('example.com''SOA''IN');
        
$packet->answer = array();

        
$packet->authority[0] = Net_DNS_RR::factory('example.com. 0 ANY A');
        
$packet->authority[1] = Net_DNS_RR::factory('example.com. 1800 IN A 192.168.0.2');

        
$tsig Net_DNS_RR::factory('example-key TSIG 6i7jUkH1LXDnMKc7ElBKXQ==');
        
$packet->additional = array($tsig);

        
$packet->header->qdcount count($packet->question);
        
$packet->header->ancount count($packet->answer);
        
$packet->header->nscount count($packet->authority);
        
$packet->header->arcount count($packet->additional);

        
$response $resolver->send_tcp($packet$packet->data());

        
$this->assertSame("NOERROR"$response->header->rcode);
    }

    public function 
testBug16502() {
        
$resolver $this->resolver;

        
$packet = new Net_DNS_Packet();

        
$packet->header = new Net_DNS_Header();
        
$packet->header->id $resolver->nextid();
        
$packet->header->qr 0;
        
$packet->header->opcode "UPDATE";

        
$packet->question[0] = new Net_DNS_Question('example.com''SOA''IN');
        
$packet->answer = array();
        
$packet->authority[0] = Net_DNS_RR::factory('example.com. 0 ANY A');
        
$packet->authority[1] = Net_DNS_RR::factory('example.com. 1800 IN A 192.168.0.2');
        
$tsig Net_DNS_RR::factory('example-key TSIG 6i7jUkH1LXDnMKc7ElBKXQ==');
        
$packet->additional = array($tsig);
        
$packet->header->qdcount count($packet->question);
        
$packet->header->ancount count($packet->answer);
        
$packet->header->nscount count($packet->authority);
        
$packet->header->arcount count($packet->additional);
        
$response $resolver->send_tcp($packet$packet->data());

        
$this->assertTrue($response instanceof Net_DNS_Packet);
        
$this->assertSame("NOERROR"$response->header->rcode);
    }

    public function 
testBug16515() {
        
$r $this->resolver;

        
$data $r->query('example.com.''TXT');
        
$this->assertNotSame(false$data);


        
$this->assertTrue(is_array($data->answer), "Expected an array, found " gettype($data->answer) . "\n" print_r($data->answertrue));

        
$txt_rr reset($data->answer);

        
$this->assertSame('example.com. 3600 IN TXT "x" "y" "z"'$txt_rr->string());
        
$this->assertSame('xyz'$txt_rr->rr_rdata(00));
    }


    public function 
testPregChange() {
        
$r $this->resolver;

        
// A
        
$a Net_DNS_RR::factory('example.com. 1800 IN A 10.10.10.10');
        
$this->assertSame('10.10.10.10'$a->address);

        
// CNAME
        
$cname Net_DNS_RR::factory('example.com. 1800 IN CNAME www.example.com');
        
$this->assertSame('www.example.com'$cname->cname);

        
// HINFO
        
$hinfo Net_DNS_RR::factory('example.com. 1800 IN HINFO PC-Intel-700mhz "Redhat Linux 7.1"');
        
$this->assertSame('PC-Intel-700mhz'$hinfo->cpu);
        
$this->assertSame('"Redhat Linux 7.1"'$hinfo->os);

        
// MX
        
$mx Net_DNS_RR::factory('example.com. 1800 IN MX 10 mail.example.com');
        
$this->assertSame('10'$mx->preference);
        
$this->assertSame('mail.example.com'$mx->exchange);

        
// NAPTR
        
$naptr Net_DNS_RR::factory('example.com. 1800 IN NAPTR 100 10 "S" "SIPD2U" "!^.*$!sip:customer-service@example.com!" _sip._udp.example.com');
        
$this->assertSame('"S"'$naptr->flags);
        
$this->assertSame('"SIPD2U"'$naptr->services);
        
$this->assertSame('_sip._udp.example.com'$naptr->replacement);

        
// NS
        
$ns Net_DNS_RR::factory('example.com. 1800 IN NS dns1.example.com');
        
$this->assertSame('dns1.example.com'$ns->nsdname);

        
// PTR
        
$ptr Net_DNS_RR::factory('192.168.0.100 1800 IN PTR mail.example.com');
        
$this->assertSame('mail.example.com'$ptr->ptrdname);

        
// SOA
        
$soa Net_DNS_RR::factory('example.com. 3600 IN SOA ns.example.com. support.example.com. 8 3600 600 1209600 3600');
        
$this->assertSame('ns.example.com'$soa->mname);
        
$this->assertSame('support.example.com'$soa->rname);

        
// SRV
        
$srv Net_DNS_RR::factory('_xmpp-server._tcp.gmail.com. IN SRV 5 0 5269 xmpp-server.l.google.com.');
        
$this->assertSame('_xmpp-server._tcp.gmail.com'$srv->name);
        
$this->assertSame('5269'$srv->port);
        
$this->assertSame('xmpp-server.l.google.com'$srv->target);

        
// TXT
        
$txt  Net_DNS_RR::factory('example.com. 1800 IN TXT "text message"');
        
$this->assertSame('"text message"'$txt->text);
    }
 }

:: Command execute ::

Enter:
 
Select:
 

:: Search ::
  - regexp 

:: Upload ::
 
[ Read-Only ]

:: Make Dir ::
 
[ Read-Only ]
:: Make File ::
 
[ Read-Only ]

:: Go Dir ::
 
:: Go File ::
 

--[ c99shell v. 2.1 [PHP 8 Update] [02.02.2022] maintained byC99Shell Github | Generation time: 0.523 ]--