????JFIF??x?x????'403WebShell
403Webshell
Server IP : 79.136.114.73  /  Your IP : 52.14.137.94
Web Server : Apache/2.4.7 (Ubuntu) PHP/5.5.9-1ubuntu4.29 OpenSSL/1.0.1f
System : Linux b8009 3.13.0-170-generic #220-Ubuntu SMP Thu May 9 12:40:49 UTC 2019 x86_64
User : www-data ( 33)
PHP Version : 5.5.9-1ubuntu4.29
Disable Function : pcntl_alarm,pcntl_fork,pcntl_waitpid,pcntl_wait,pcntl_wifexited,pcntl_wifstopped,pcntl_wifsignaled,pcntl_wexitstatus,pcntl_wtermsig,pcntl_wstopsig,pcntl_signal,pcntl_signal_dispatch,pcntl_get_last_error,pcntl_strerror,pcntl_sigprocmask,pcntl_sigwaitinfo,pcntl_sigtimedwait,pcntl_exec,pcntl_getpriority,pcntl_setpriority,
MySQL : ON  |  cURL : ON  |  WGET : ON  |  Perl : ON  |  Python : ON  |  Sudo : ON  |  Pkexec : ON
Directory :  /proc/self/root/home/b8009/php-5.6.22/ext/standard/tests/strings/

Upload File :
current_dir [ Writeable ] document_root [ Writeable ]

 

Command :


[ Back ]     

Current File : /proc/self/root/home/b8009/php-5.6.22/ext/standard/tests/strings/htmlentities21.phpt
--TEST--
htmlentities() / htmlspecialchars() ENT_DISALLOWED charset variation
--FILE--
<?php
$tests = array(
    0x00, //C0
    0x01,
    0x09,
    0x0A,
    0x0B,
    0x0C,
    0x0D,
    0x0E,
    0x1F,
    0x20, //allowed always
    0x7F, //DEL
    0x80, //C1
    0x9F,
    0xA0, //allowed always
);

function test($flag, $charset) {
    global $tests;
    $i = -1;
    error_reporting(-1 & ~E_STRICT);
    foreach ($tests as $test) {
        $test = chr($test);
        $i++;
        $a = htmlentities($test, $flag | ENT_DISALLOWED, $charset);
        $b = htmlspecialchars($test, $flag | ENT_DISALLOWED, $charset);
        if ($a == "" && $b == "") { echo sprintf("%05X", $tests[$i]), ": INVALID SEQUENCE\n"; continue; }
        echo sprintf("%05X", $tests[$i]), ": ", bin2hex($a), " ", bin2hex($b), "\n";
    }
    error_reporting(-1);
}

echo "*** Testing HTML 4.01/Windows-1251 ***\n";

test(ENT_HTML401, "Windows-1251");

echo "\n*** Testing XHTML 1.0/Windows-1251 ***\n";

test(ENT_XHTML, "Windows-1251");

echo "\n*** Testing HTML 5/Windows-1251 ***\n";

test(ENT_HTML5, "Windows-1251");

echo "\n*** Testing XML 1.0/Windows-1251 ***\n";

test(ENT_XML1, "Windows-1251");

echo "\n*** Testing HTML 4.01/SJIS ***\n";

test(ENT_HTML401, "SJIS");

echo "\n*** Testing XHTML 1.0/SJIS ***\n";

test(ENT_XHTML, "SJIS");

echo "\n*** Testing HTML 5/SJIS ***\n";

test(ENT_HTML5, "SJIS");

echo "\n*** Testing XML 1.0/SJIS ***\n";

test(ENT_XML1, "SJIS");


?>
--EXPECT--
*** Testing HTML 4.01/Windows-1251 ***
00000: 262378464646443b 262378464646443b
00001: 262378464646443b 262378464646443b
00009: 09 09
0000A: 0a 0a
0000B: 262378464646443b 262378464646443b
0000C: 262378464646443b 262378464646443b
0000D: 0d 0d
0000E: 262378464646443b 262378464646443b
0001F: 262378464646443b 262378464646443b
00020: 20 20
0007F: 262378464646443b 7f
00080: 80 80
0009F: 9f 9f
000A0: 266e6273703b a0

*** Testing XHTML 1.0/Windows-1251 ***
00000: 262378464646443b 262378464646443b
00001: 262378464646443b 262378464646443b
00009: 09 09
0000A: 0a 0a
0000B: 262378464646443b 262378464646443b
0000C: 262378464646443b 262378464646443b
0000D: 0d 0d
0000E: 262378464646443b 262378464646443b
0001F: 262378464646443b 262378464646443b
00020: 20 20
0007F: 7f 7f
00080: 80 80
0009F: 9f 9f
000A0: 266e6273703b a0

*** Testing HTML 5/Windows-1251 ***
00000: 262378464646443b 262378464646443b
00001: 262378464646443b 262378464646443b
00009: 265461623b 09
0000A: 264e65774c696e653b 0a
0000B: 262378464646443b 262378464646443b
0000C: 0c 0c
0000D: 0d 0d
0000E: 262378464646443b 262378464646443b
0001F: 262378464646443b 262378464646443b
00020: 20 20
0007F: 262378464646443b 7f
00080: 26444a63793b 80
0009F: 26647a63793b 9f
000A0: 266e6273703b a0

*** Testing XML 1.0/Windows-1251 ***
00000: 262378464646443b 262378464646443b
00001: 262378464646443b 262378464646443b
00009: 09 09
0000A: 0a 0a
0000B: 262378464646443b 262378464646443b
0000C: 262378464646443b 262378464646443b
0000D: 0d 0d
0000E: 262378464646443b 262378464646443b
0001F: 262378464646443b 262378464646443b
00020: 20 20
0007F: 7f 7f
00080: 80 80
0009F: 9f 9f
000A0: a0 a0

*** Testing HTML 4.01/SJIS ***
00000: 262378464646443b 262378464646443b
00001: 262378464646443b 262378464646443b
00009: 09 09
0000A: 0a 0a
0000B: 262378464646443b 262378464646443b
0000C: 262378464646443b 262378464646443b
0000D: 0d 0d
0000E: 262378464646443b 262378464646443b
0001F: 262378464646443b 262378464646443b
00020: 20 20
0007F: 7f 7f
00080: INVALID SEQUENCE
0009F: INVALID SEQUENCE
000A0: INVALID SEQUENCE

*** Testing XHTML 1.0/SJIS ***
00000: 262378464646443b 262378464646443b
00001: 262378464646443b 262378464646443b
00009: 09 09
0000A: 0a 0a
0000B: 262378464646443b 262378464646443b
0000C: 262378464646443b 262378464646443b
0000D: 0d 0d
0000E: 262378464646443b 262378464646443b
0001F: 262378464646443b 262378464646443b
00020: 20 20
0007F: 7f 7f
00080: INVALID SEQUENCE
0009F: INVALID SEQUENCE
000A0: INVALID SEQUENCE

*** Testing HTML 5/SJIS ***
00000: 262378464646443b 262378464646443b
00001: 262378464646443b 262378464646443b
00009: 09 09
0000A: 0a 0a
0000B: 262378464646443b 262378464646443b
0000C: 0c 0c
0000D: 0d 0d
0000E: 262378464646443b 262378464646443b
0001F: 262378464646443b 262378464646443b
00020: 20 20
0007F: 7f 7f
00080: INVALID SEQUENCE
0009F: INVALID SEQUENCE
000A0: INVALID SEQUENCE

*** Testing XML 1.0/SJIS ***
00000: 262378464646443b 262378464646443b
00001: 262378464646443b 262378464646443b
00009: 09 09
0000A: 0a 0a
0000B: 262378464646443b 262378464646443b
0000C: 262378464646443b 262378464646443b
0000D: 0d 0d
0000E: 262378464646443b 262378464646443b
0001F: 262378464646443b 262378464646443b
00020: 20 20
0007F: 7f 7f
00080: INVALID SEQUENCE
0009F: INVALID SEQUENCE
000A0: INVALID SEQUENCE

Youez - 2016 - github.com/yon3zu
LinuXploit