403Webshell
Server IP : 66.29.132.122  /  Your IP : 18.188.55.184
Web Server : LiteSpeed
System : Linux business142.web-hosting.com 4.18.0-553.lve.el8.x86_64 #1 SMP Mon May 27 15:27:34 UTC 2024 x86_64
User : admazpex ( 531)
PHP Version : 7.2.34
Disable Function : NONE
MySQL : OFF  |  cURL : ON  |  WGET : ON  |  Perl : ON  |  Python : ON  |  Sudo : OFF  |  Pkexec : OFF
Directory :  /proc/self/root/proc/thread-self/root/proc/thread-self/root/opt/alt/php73/usr/share/pear/test/Net_SMTP/tests/

Upload File :
current_dir [ Writeable ] document_root [ Writeable ]

 

Command :


[ Back ]     

Current File : /proc/self/root/proc/thread-self/root/proc/thread-self/root/opt/alt/php73/usr/share/pear/test/Net_SMTP/tests/quotedata.phpt
--TEST--
Net_SMTP: quotedata()
--FILE--
<?php

require_once 'Net/SMTP.php';

$tests = array(
    /* Newlines */
    "\n"               => "\r\n",
    "\r\n"             => "\r\n",
    "\nxx"             => "\r\nxx",
    "xx\n"             => "xx\r\n",
    "xx\nxx"           => "xx\r\nxx",
    "\n\nxx"           => "\r\n\r\nxx",
    "xx\n\nxx"         => "xx\r\n\r\nxx",
    "xx\n\n"           => "xx\r\n\r\n",
    "\r\nxx"           => "\r\nxx",
    "xx\r\n"           => "xx\r\n",
    "xx\r\nxx"         => "xx\r\nxx",
    "\r\n\r\nxx"       => "\r\n\r\nxx",
    "xx\r\n\r\nxx"     => "xx\r\n\r\nxx",
    "xx\r\n\r\n"       => "xx\r\n\r\n",
    "\r\n\nxx"         => "\r\n\r\nxx",
    "\n\r\nxx"         => "\r\n\r\nxx",
    "xx\r\n\nxx"       => "xx\r\n\r\nxx",
    "xx\n\r\nxx"       => "xx\r\n\r\nxx",
    "xx\r\n\n"         => "xx\r\n\r\n",
    "xx\n\r\n"         => "xx\r\n\r\n",
    "\r"               => "\r\n",
    "\rxx"             => "\r\nxx",
    "xx\rxx"           => "xx\r\nxx",
    "xx\r"             => "xx\r\n",
    "\r\r"             => "\r\n\r\n",
    "\r\rxx"           => "\r\n\r\nxx",
    "xx\r\rxx"         => "xx\r\n\r\nxx",
    "xx\r\r"           => "xx\r\n\r\n",
    "xx\rxx\nxx\r\nxx" => "xx\r\nxx\r\nxx\r\nxx",
    "\r\r\n\n"         => "\r\n\r\n\r\n",

    /* Dots */
    "."                 => "..",
    "xxx\n."            => "xxx\r\n..",
    "xxx\n.\nxxx"       => "xxx\r\n..\r\nxxx",
    "xxx.\n.xxx"        => "xxx.\r\n..xxx",
);

function literal($x)
{
    return str_replace(array("\r", "\n"), array('\r', '\n'), $x);
}

$smtp = new Net_SMTP();
$error = false;
foreach ($tests as $input => $expected) {
    $output = $input;
    $smtp->quotedata($output);
    if ($output != $expected) {
        printf("Error: '%s' => '%s' (expected: '%s')",
            literal($input), literal($output), literal($expected));
        $error = true;
    }
}

if (!$error) {
    echo "success\n";
}

--EXPECT--
success

Youez - 2016 - github.com/yon3zu
LinuXploit