Version Description
2020/Dec/30 =
TWEAK: Remove obsolete references to other plugins
TWEAK: Replace some further deprecated jQuery styles
TWEAK: Update to latest 1.0.x version of phpseclib
Download this release
Release Info
Developer | DavidAnderson |
Plugin | SSH SFTP Updater Support |
Version | 0.8.4 |
Comparing to | |
See all releases |
Code changes from version 0.8.3 to 0.8.4
- includes/ssh-sftp-updater-support-notices.php +1 -46
- phpseclib/Crypt/RSA.php +5 -5
- phpseclib/Crypt/Random.php +4 -1
- phpseclib/File/ANSI.php +1 -1
- phpseclib/File/ASN1.php +17 -3
- phpseclib/File/X509.php +40 -6
- phpseclib/Math/BigInteger.php +14 -3
- phpseclib/Net/SFTP.php +3240 -3206
- phpseclib/Net/SSH1.php +3 -0
- phpseclib/Net/SSH2.php +539 -333
- phpseclib/System/SSH/Agent.php +59 -7
- readme.txt +11 -7
- sftp.php +5 -5
- templates/notices/horizontal-notice.php +0 -4
- templates/notices/thanks-for-using-main-dash.php +0 -8
includes/ssh-sftp-updater-support-notices.php
CHANGED
@@ -68,28 +68,6 @@ class SSH_SFTP_Updater_Support_Notices extends Updraft_Notices_1_0 {
|
|
68 |
'supported_positions' => $this->anywhere,
|
69 |
'validity_function' => 'is_wpo_installed',
|
70 |
),
|
71 |
-
'keyy' => array(
|
72 |
-
'prefix' => '',
|
73 |
-
'title' => 'Keyy: Instant and secure logon with a wave of your phone',
|
74 |
-
'text' => __("Find out more about our revolutionary new WordPress plugin.", "ssh-sftp-updater-support"),
|
75 |
-
'button_link' => 'https://getkeyy.com/',
|
76 |
-
'button_meta' => 'keyy',
|
77 |
-
'image' => 'notices/keyy_logo.png',
|
78 |
-
'dismiss_time' => 'dismiss_page_notice_until',
|
79 |
-
'supported_positions' => $this->anywhere,
|
80 |
-
'validity_function' => 'is_keyy_installed',
|
81 |
-
),
|
82 |
-
'meta-slider' => array(
|
83 |
-
'prefix' => '',
|
84 |
-
'title' => __("MetaSlider: the world's #1 slider plugin from the makers of SSH SFTP Updater Support", "ssh-sftp-updater-support"),
|
85 |
-
'text' => __("With MetaSlider, you can easily add style and flare with beautifully-designed sliders.", "ssh-sftp-updater-support"),
|
86 |
-
'button_link' => 'https://metaslider.com',
|
87 |
-
'button_meta' => 'metaslider',
|
88 |
-
'image' => 'notices/metaslider_logo.png',
|
89 |
-
'dismiss_time' => 'dismiss_page_notice_until',
|
90 |
-
'supported_positions' => $this->anywhere,
|
91 |
-
'validity_function' => 'is_metaslider_installed',
|
92 |
-
),
|
93 |
|
94 |
);
|
95 |
|
@@ -130,17 +108,6 @@ class SSH_SFTP_Updater_Support_Notices extends Updraft_Notices_1_0 {
|
|
130 |
return parent::is_plugin_installed($product, $also_require_active);
|
131 |
}
|
132 |
|
133 |
-
/**
|
134 |
-
* This method will call the parent is_plugin_installed and pass in the product keyy to check if that plugin is installed if it is then we shouldn't display the notice
|
135 |
-
*
|
136 |
-
* @param string $product the plugin slug
|
137 |
-
* @param boolean $also_require_active a bool to indicate if the plugin should also be active
|
138 |
-
* @return boolean a bool to indicate if the notice should be displayed or not
|
139 |
-
*/
|
140 |
-
protected function is_keyy_installed($product = 'keyy', $also_require_active = false) {
|
141 |
-
return parent::is_plugin_installed($product, $also_require_active);
|
142 |
-
}
|
143 |
-
|
144 |
/**
|
145 |
* This method will call the is premium function in the SSH_SFTP_Updater_Support_Notices object to check if this install is premium and if it is we won't display the notice
|
146 |
*
|
@@ -149,19 +116,7 @@ class SSH_SFTP_Updater_Support_Notices extends Updraft_Notices_1_0 {
|
|
149 |
protected function is_wpo_installed($product = 'wp-optimize', $also_require_active = false) {
|
150 |
return parent::is_plugin_installed($product, $also_require_active);
|
151 |
}
|
152 |
-
|
153 |
-
/**
|
154 |
-
* This method will check to see if Meta Slider plugin is installed.
|
155 |
-
*
|
156 |
-
* @param String $product the plugin slug
|
157 |
-
* @param boolean $also_require_active a bool to indicate if the plugin should be active or not
|
158 |
-
* @return boolean a bool to indicate if the notice should be displayed or not
|
159 |
-
*/
|
160 |
-
protected function is_metaslider_installed($product = 'ml-slider', $also_require_active = false) {
|
161 |
-
return parent::is_plugin_installed($product, $also_require_active);
|
162 |
-
}
|
163 |
-
|
164 |
-
|
165 |
/**
|
166 |
* This method calls the parent verson and will work out if the user is using a non english language and if so returns true so that they can see the translation advert.
|
167 |
*
|
68 |
'supported_positions' => $this->anywhere,
|
69 |
'validity_function' => 'is_wpo_installed',
|
70 |
),
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
71 |
|
72 |
);
|
73 |
|
108 |
return parent::is_plugin_installed($product, $also_require_active);
|
109 |
}
|
110 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
111 |
/**
|
112 |
* This method will call the is premium function in the SSH_SFTP_Updater_Support_Notices object to check if this install is premium and if it is we won't display the notice
|
113 |
*
|
116 |
protected function is_wpo_installed($product = 'wp-optimize', $also_require_active = false) {
|
117 |
return parent::is_plugin_installed($product, $also_require_active);
|
118 |
}
|
119 |
+
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
120 |
/**
|
121 |
* This method calls the parent verson and will work out if the user is using a non english language and if so returns true so that they can see the translation advert.
|
122 |
*
|
phpseclib/Crypt/RSA.php
CHANGED
@@ -1603,12 +1603,12 @@ class Crypt_RSA
|
|
1603 |
&$components['primes'][2]
|
1604 |
);
|
1605 |
|
1606 |
-
|
1607 |
extract(unpack('Nlength', $this->_string_shift($paddedKey, 4)));
|
1608 |
if (strlen($paddedKey) < $length) {
|
1609 |
return false;
|
1610 |
}
|
1611 |
-
$
|
1612 |
}
|
1613 |
|
1614 |
extract(unpack('Nlength', $this->_string_shift($paddedKey, 4)));
|
@@ -2846,7 +2846,7 @@ class Crypt_RSA
|
|
2846 |
// if $m is larger than two million terrabytes and you're using sha1, PKCS#1 suggests a "Label too long" error
|
2847 |
// be output.
|
2848 |
|
2849 |
-
$emLen = ($emBits +
|
2850 |
$sLen = $this->sLen !== null ? $this->sLen : $this->hLen;
|
2851 |
|
2852 |
$mHash = $this->hash->hash($m);
|
@@ -2924,7 +2924,7 @@ class Crypt_RSA
|
|
2924 |
|
2925 |
// RSA verification
|
2926 |
|
2927 |
-
$modBits =
|
2928 |
|
2929 |
$s2 = $this->_os2ip($s);
|
2930 |
$m2 = $this->_rsavp1($s2);
|
@@ -2932,7 +2932,7 @@ class Crypt_RSA
|
|
2932 |
user_error('Invalid signature');
|
2933 |
return false;
|
2934 |
}
|
2935 |
-
$em = $this->_i2osp($m2, $
|
2936 |
if ($em === false) {
|
2937 |
user_error('Invalid signature');
|
2938 |
return false;
|
1603 |
&$components['primes'][2]
|
1604 |
);
|
1605 |
|
1606 |
+
for ($i = 0; $i < count($values); $i++) {
|
1607 |
extract(unpack('Nlength', $this->_string_shift($paddedKey, 4)));
|
1608 |
if (strlen($paddedKey) < $length) {
|
1609 |
return false;
|
1610 |
}
|
1611 |
+
$values[$i] = new Math_BigInteger($this->_string_shift($paddedKey, $length), -256);
|
1612 |
}
|
1613 |
|
1614 |
extract(unpack('Nlength', $this->_string_shift($paddedKey, 4)));
|
2846 |
// if $m is larger than two million terrabytes and you're using sha1, PKCS#1 suggests a "Label too long" error
|
2847 |
// be output.
|
2848 |
|
2849 |
+
$emLen = ($emBits + 7) >> 3; // ie. ceil($emBits / 8);
|
2850 |
$sLen = $this->sLen !== null ? $this->sLen : $this->hLen;
|
2851 |
|
2852 |
$mHash = $this->hash->hash($m);
|
2924 |
|
2925 |
// RSA verification
|
2926 |
|
2927 |
+
$modBits = strlen($this->modulus->toBits());
|
2928 |
|
2929 |
$s2 = $this->_os2ip($s);
|
2930 |
$m2 = $this->_rsavp1($s2);
|
2932 |
user_error('Invalid signature');
|
2933 |
return false;
|
2934 |
}
|
2935 |
+
$em = $this->_i2osp($m2, $this->k);
|
2936 |
if ($em === false) {
|
2937 |
user_error('Invalid signature');
|
2938 |
return false;
|
phpseclib/Crypt/Random.php
CHANGED
@@ -105,7 +105,10 @@ if (!function_exists('crypt_random_string')) {
|
|
105 |
$fp = @fopen('/dev/urandom', 'rb');
|
106 |
}
|
107 |
if ($fp !== true && $fp !== false) { // surprisingly faster than !is_bool() or is_resource()
|
108 |
-
|
|
|
|
|
|
|
109 |
}
|
110 |
// method 3. pretty much does the same thing as method 2 per the following url:
|
111 |
// https://github.com/php/php-src/blob/7014a0eb6d1611151a286c0ff4f2238f92c120d6/ext/mcrypt/mcrypt.c#L1391
|
105 |
$fp = @fopen('/dev/urandom', 'rb');
|
106 |
}
|
107 |
if ($fp !== true && $fp !== false) { // surprisingly faster than !is_bool() or is_resource()
|
108 |
+
$temp = fread($fp, $length);
|
109 |
+
if (strlen($temp) == $length) {
|
110 |
+
return $temp;
|
111 |
+
}
|
112 |
}
|
113 |
// method 3. pretty much does the same thing as method 2 per the following url:
|
114 |
// https://github.com/php/php-src/blob/7014a0eb6d1611151a286c0ff4f2238f92c120d6/ext/mcrypt/mcrypt.c#L1391
|
phpseclib/File/ANSI.php
CHANGED
@@ -299,7 +299,7 @@ class File_ANSI
|
|
299 |
case "\x1B[K": // Clear screen from cursor right
|
300 |
$this->screen[$this->y] = substr($this->screen[$this->y], 0, $this->x);
|
301 |
|
302 |
-
array_splice($this->attrs[$this->y], $this->x + 1, $this->max_x - $this->x, array_fill($this->x, $this->max_x - $this->x - 1, $this->base_attr_cell));
|
303 |
break;
|
304 |
case "\x1B[2K": // Clear entire line
|
305 |
$this->screen[$this->y] = str_repeat(' ', $this->x);
|
299 |
case "\x1B[K": // Clear screen from cursor right
|
300 |
$this->screen[$this->y] = substr($this->screen[$this->y], 0, $this->x);
|
301 |
|
302 |
+
array_splice($this->attrs[$this->y], $this->x + 1, $this->max_x - $this->x, array_fill($this->x, $this->max_x - ($this->x - 1), $this->base_attr_cell));
|
303 |
break;
|
304 |
case "\x1B[2K": // Clear entire line
|
305 |
$this->screen[$this->y] = str_repeat(' ', $this->x);
|
phpseclib/File/ASN1.php
CHANGED
@@ -577,6 +577,10 @@ class File_ASN1
|
|
577 |
*/
|
578 |
function asn1map($decoded, $mapping, $special = array())
|
579 |
{
|
|
|
|
|
|
|
|
|
580 |
if (isset($mapping['explicit']) && is_array($decoded['content'])) {
|
581 |
$decoded = $decoded['content'][0];
|
582 |
}
|
@@ -787,7 +791,14 @@ class File_ASN1
|
|
787 |
case FILE_ASN1_TYPE_UTC_TIME:
|
788 |
case FILE_ASN1_TYPE_GENERALIZED_TIME:
|
789 |
if (class_exists('DateTime')) {
|
790 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
791 |
$decoded['content'] = $this->_decodeDateTime($decoded['content'], $decoded['type']);
|
792 |
}
|
793 |
if (!$decoded['content']) {
|
@@ -795,7 +806,10 @@ class File_ASN1
|
|
795 |
}
|
796 |
return $decoded['content']->format($this->format);
|
797 |
} else {
|
798 |
-
if (
|
|
|
|
|
|
|
799 |
$decoded['content'] = $this->_decodeUnixTime($decoded['content'], $decoded['type']);
|
800 |
}
|
801 |
return @date($this->format, $decoded['content']);
|
@@ -937,7 +951,7 @@ class File_ASN1
|
|
937 |
if ($mapping['type'] == FILE_ASN1_TYPE_SET) {
|
938 |
sort($value);
|
939 |
}
|
940 |
-
$value = implode($value
|
941 |
break;
|
942 |
}
|
943 |
|
577 |
*/
|
578 |
function asn1map($decoded, $mapping, $special = array())
|
579 |
{
|
580 |
+
if (!is_array($decoded)) {
|
581 |
+
return false;
|
582 |
+
}
|
583 |
+
|
584 |
if (isset($mapping['explicit']) && is_array($decoded['content'])) {
|
585 |
$decoded = $decoded['content'][0];
|
586 |
}
|
791 |
case FILE_ASN1_TYPE_UTC_TIME:
|
792 |
case FILE_ASN1_TYPE_GENERALIZED_TIME:
|
793 |
if (class_exists('DateTime')) {
|
794 |
+
// for explicitly tagged optional stuff
|
795 |
+
if (is_array($decoded['content'])) {
|
796 |
+
$decoded['content'] = $decoded['content'][0]['content'];
|
797 |
+
}
|
798 |
+
// for implicitly tagged optional stuff
|
799 |
+
// in theory, doing isset($mapping['implicit']) would work but malformed certs do exist
|
800 |
+
// in the wild that OpenSSL decodes without issue so we'll support them as well
|
801 |
+
if (!is_object($decoded['content'])) {
|
802 |
$decoded['content'] = $this->_decodeDateTime($decoded['content'], $decoded['type']);
|
803 |
}
|
804 |
if (!$decoded['content']) {
|
806 |
}
|
807 |
return $decoded['content']->format($this->format);
|
808 |
} else {
|
809 |
+
if (is_array($decoded['content'])) {
|
810 |
+
$decoded['content'] = $decoded['content'][0]['content'];
|
811 |
+
}
|
812 |
+
if (!is_int($decoded['content'])) {
|
813 |
$decoded['content'] = $this->_decodeUnixTime($decoded['content'], $decoded['type']);
|
814 |
}
|
815 |
return @date($this->format, $decoded['content']);
|
951 |
if ($mapping['type'] == FILE_ASN1_TYPE_SET) {
|
952 |
sort($value);
|
953 |
}
|
954 |
+
$value = implode('', $value);
|
955 |
break;
|
956 |
}
|
957 |
|
phpseclib/File/X509.php
CHANGED
@@ -982,6 +982,13 @@ class File_X509
|
|
982 |
'children' => $AccessDescription
|
983 |
);
|
984 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
985 |
$this->SubjectAltName = $GeneralNames;
|
986 |
|
987 |
$this->PrivateKeyUsagePeriod = array(
|
@@ -1650,7 +1657,10 @@ class File_X509
|
|
1650 |
corresponding to the extension type identified by extnID */
|
1651 |
$map = $this->_getMapping($id);
|
1652 |
if (!is_bool($map)) {
|
1653 |
-
$
|
|
|
|
|
|
|
1654 |
$value = $mapped === false ? $decoded[0] : $mapped;
|
1655 |
|
1656 |
if ($id == 'id-ce-certificatePolicies') {
|
@@ -1919,6 +1929,8 @@ class File_X509
|
|
1919 |
return $this->ExtKeyUsageSyntax;
|
1920 |
case 'id-pe-authorityInfoAccess':
|
1921 |
return $this->AuthorityInfoAccessSyntax;
|
|
|
|
|
1922 |
case 'id-ce-subjectAltName':
|
1923 |
return $this->SubjectAltName;
|
1924 |
case 'id-ce-subjectDirectoryAttributes':
|
@@ -2206,7 +2218,11 @@ class File_X509
|
|
2206 |
}
|
2207 |
|
2208 |
while (!feof($fsock)) {
|
2209 |
-
$
|
|
|
|
|
|
|
|
|
2210 |
}
|
2211 |
|
2212 |
break;
|
@@ -2255,7 +2271,7 @@ class File_X509
|
|
2255 |
return false;
|
2256 |
}
|
2257 |
|
2258 |
-
$parent = new
|
2259 |
$parent->CAs = $this->CAs;
|
2260 |
/*
|
2261 |
"Conforming applications that support HTTP or FTP for accessing
|
@@ -2555,18 +2571,36 @@ class File_X509
|
|
2555 |
return long2ip($ip);
|
2556 |
}
|
2557 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2558 |
/**
|
2559 |
* Encodes an IP address
|
2560 |
*
|
2561 |
* Takes a human readable IP address into a base64-encoded "blob"
|
2562 |
*
|
2563 |
-
* @param string $ip
|
2564 |
* @access private
|
2565 |
* @return string
|
2566 |
*/
|
2567 |
function _encodeIP($ip)
|
2568 |
{
|
2569 |
-
return
|
|
|
|
|
2570 |
}
|
2571 |
|
2572 |
/**
|
@@ -2970,7 +3004,7 @@ class File_X509
|
|
2970 |
} elseif (is_object($value) && strtolower(get_class($value)) == 'file_asn1_element') {
|
2971 |
// @codingStandardsIgnoreStart
|
2972 |
$callback = version_compare(PHP_VERSION, '5.3.0') >= 0 ?
|
2973 |
-
function ($x) { return "\x" . bin2hex($x[0]); } :
|
2974 |
create_function('$x', 'return "\x" . bin2hex($x[0]);');
|
2975 |
// @codingStandardsIgnoreEnd
|
2976 |
$value = strtoupper(preg_replace_callback('#[^\x20-\x7E]#', $callback, $value->element));
|
982 |
'children' => $AccessDescription
|
983 |
);
|
984 |
|
985 |
+
$this->SubjectInfoAccessSyntax = array(
|
986 |
+
'type' => FILE_ASN1_TYPE_SEQUENCE,
|
987 |
+
'min' => 1,
|
988 |
+
'max' => -1,
|
989 |
+
'children' => $AccessDescription
|
990 |
+
);
|
991 |
+
|
992 |
$this->SubjectAltName = $GeneralNames;
|
993 |
|
994 |
$this->PrivateKeyUsagePeriod = array(
|
1657 |
corresponding to the extension type identified by extnID */
|
1658 |
$map = $this->_getMapping($id);
|
1659 |
if (!is_bool($map)) {
|
1660 |
+
$decoder = $id == 'id-ce-nameConstraints' ?
|
1661 |
+
array($this, '_decodeNameConstraintIP') :
|
1662 |
+
array($this, '_decodeIP');
|
1663 |
+
$mapped = $asn1->asn1map($decoded[0], $map, array('iPAddress' => $decoder));
|
1664 |
$value = $mapped === false ? $decoded[0] : $mapped;
|
1665 |
|
1666 |
if ($id == 'id-ce-certificatePolicies') {
|
1929 |
return $this->ExtKeyUsageSyntax;
|
1930 |
case 'id-pe-authorityInfoAccess':
|
1931 |
return $this->AuthorityInfoAccessSyntax;
|
1932 |
+
case 'id-pe-subjectInfoAccess':
|
1933 |
+
return $this->SubjectInfoAccessSyntax;
|
1934 |
case 'id-ce-subjectAltName':
|
1935 |
return $this->SubjectAltName;
|
1936 |
case 'id-ce-subjectDirectoryAttributes':
|
2218 |
}
|
2219 |
|
2220 |
while (!feof($fsock)) {
|
2221 |
+
$temp = fread($fsock, 1024);
|
2222 |
+
if ($temp === false) {
|
2223 |
+
return false;
|
2224 |
+
}
|
2225 |
+
$data.= $temp;
|
2226 |
}
|
2227 |
|
2228 |
break;
|
2271 |
return false;
|
2272 |
}
|
2273 |
|
2274 |
+
$parent = new File_X509();
|
2275 |
$parent->CAs = $this->CAs;
|
2276 |
/*
|
2277 |
"Conforming applications that support HTTP or FTP for accessing
|
2571 |
return long2ip($ip);
|
2572 |
}
|
2573 |
|
2574 |
+
/**
|
2575 |
+
* Decodes an IP address in a name constraints extension
|
2576 |
+
*
|
2577 |
+
* Takes in a base64 encoded "blob" and returns a human readable IP address / mask
|
2578 |
+
*
|
2579 |
+
* @param string $ip
|
2580 |
+
* @access private
|
2581 |
+
* @return array
|
2582 |
+
*/
|
2583 |
+
function _decodeNameConstraintIP($ip)
|
2584 |
+
{
|
2585 |
+
$ip = base64_decode($ip);
|
2586 |
+
list(, $ip, $mask) = unpack('N2', $ip);
|
2587 |
+
return array(long2ip($ip), long2ip($mask));
|
2588 |
+
}
|
2589 |
+
|
2590 |
/**
|
2591 |
* Encodes an IP address
|
2592 |
*
|
2593 |
* Takes a human readable IP address into a base64-encoded "blob"
|
2594 |
*
|
2595 |
+
* @param string|array $ip
|
2596 |
* @access private
|
2597 |
* @return string
|
2598 |
*/
|
2599 |
function _encodeIP($ip)
|
2600 |
{
|
2601 |
+
return is_string($ip) ?
|
2602 |
+
base64_encode(pack('N', ip2long($ip))) :
|
2603 |
+
base64_encode(pack('NN', ip2long($ip[0]), ip2long($ip[1])));
|
2604 |
}
|
2605 |
|
2606 |
/**
|
3004 |
} elseif (is_object($value) && strtolower(get_class($value)) == 'file_asn1_element') {
|
3005 |
// @codingStandardsIgnoreStart
|
3006 |
$callback = version_compare(PHP_VERSION, '5.3.0') >= 0 ?
|
3007 |
+
eval('return function ($x) { return "\x" . bin2hex($x[0]); };') :
|
3008 |
create_function('$x', 'return "\x" . bin2hex($x[0]);');
|
3009 |
// @codingStandardsIgnoreEnd
|
3010 |
$value = strtoupper(preg_replace_callback('#[^\x20-\x7E]#', $callback, $value->element));
|
phpseclib/Math/BigInteger.php
CHANGED
@@ -556,7 +556,7 @@ class Math_BigInteger
|
|
556 |
$bytes = chr(0);
|
557 |
}
|
558 |
|
559 |
-
if (ord($bytes[0]) & 0x80) {
|
560 |
$bytes = chr(0) . $bytes;
|
561 |
}
|
562 |
|
@@ -724,6 +724,7 @@ class Math_BigInteger
|
|
724 |
}
|
725 |
|
726 |
$temp = $this->copy();
|
|
|
727 |
$temp->is_negative = false;
|
728 |
|
729 |
$divisor = new Math_BigInteger();
|
@@ -860,7 +861,7 @@ class Math_BigInteger
|
|
860 |
$opts[] = 'OpenSSL';
|
861 |
}
|
862 |
if (!empty($opts)) {
|
863 |
-
$engine.= ' (' . implode(
|
864 |
}
|
865 |
return array(
|
866 |
'value' => '0x' . $this->toHex(true),
|
@@ -1586,7 +1587,9 @@ class Math_BigInteger
|
|
1586 |
$temp_value = array($quotient_value[$q_index]);
|
1587 |
$temp = $temp->multiply($y);
|
1588 |
$temp_value = &$temp->value;
|
1589 |
-
|
|
|
|
|
1590 |
|
1591 |
$x = $x->subtract($temp);
|
1592 |
|
@@ -3613,7 +3616,14 @@ class Math_BigInteger
|
|
3613 |
switch (MATH_BIGINTEGER_MODE) {
|
3614 |
case MATH_BIGINTEGER_MODE_GMP:
|
3615 |
if ($this->bitmask !== false) {
|
|
|
|
|
|
|
|
|
3616 |
$result->value = gmp_and($result->value, $result->bitmask->value);
|
|
|
|
|
|
|
3617 |
}
|
3618 |
|
3619 |
return $result;
|
@@ -3628,6 +3638,7 @@ class Math_BigInteger
|
|
3628 |
$value = &$result->value;
|
3629 |
|
3630 |
if (!count($value)) {
|
|
|
3631 |
return $result;
|
3632 |
}
|
3633 |
|
556 |
$bytes = chr(0);
|
557 |
}
|
558 |
|
559 |
+
if ($this->precision <= 0 && (ord($bytes[0]) & 0x80)) {
|
560 |
$bytes = chr(0) . $bytes;
|
561 |
}
|
562 |
|
724 |
}
|
725 |
|
726 |
$temp = $this->copy();
|
727 |
+
$temp->bitmask = false;
|
728 |
$temp->is_negative = false;
|
729 |
|
730 |
$divisor = new Math_BigInteger();
|
861 |
$opts[] = 'OpenSSL';
|
862 |
}
|
863 |
if (!empty($opts)) {
|
864 |
+
$engine.= ' (' . implode('.', $opts) . ')';
|
865 |
}
|
866 |
return array(
|
867 |
'value' => '0x' . $this->toHex(true),
|
1587 |
$temp_value = array($quotient_value[$q_index]);
|
1588 |
$temp = $temp->multiply($y);
|
1589 |
$temp_value = &$temp->value;
|
1590 |
+
if (count($temp_value)) {
|
1591 |
+
$temp_value = array_merge($adjust, $temp_value);
|
1592 |
+
}
|
1593 |
|
1594 |
$x = $x->subtract($temp);
|
1595 |
|
3616 |
switch (MATH_BIGINTEGER_MODE) {
|
3617 |
case MATH_BIGINTEGER_MODE_GMP:
|
3618 |
if ($this->bitmask !== false) {
|
3619 |
+
$flip = gmp_cmp($result->value, gmp_init(0)) < 0;
|
3620 |
+
if ($flip) {
|
3621 |
+
$result->value = gmp_neg($result->value);
|
3622 |
+
}
|
3623 |
$result->value = gmp_and($result->value, $result->bitmask->value);
|
3624 |
+
if ($flip) {
|
3625 |
+
$result->value = gmp_neg($result->value);
|
3626 |
+
}
|
3627 |
}
|
3628 |
|
3629 |
return $result;
|
3638 |
$value = &$result->value;
|
3639 |
|
3640 |
if (!count($value)) {
|
3641 |
+
$result->is_negative = false;
|
3642 |
return $result;
|
3643 |
}
|
3644 |
|
phpseclib/Net/SFTP.php
CHANGED
@@ -1,3206 +1,3240 @@
|
|
1 |
-
<?php
|
2 |
-
|
3 |
-
/**
|
4 |
-
* Pure-PHP implementation of SFTP.
|
5 |
-
*
|
6 |
-
* PHP versions 4 and 5
|
7 |
-
*
|
8 |
-
* Currently only supports SFTPv2 and v3, which, according to wikipedia.org, "is the most widely used version,
|
9 |
-
* implemented by the popular OpenSSH SFTP server". If you want SFTPv4/5/6 support, provide me with access
|
10 |
-
* to an SFTPv4/5/6 server.
|
11 |
-
*
|
12 |
-
* The API for this library is modeled after the API from PHP's {@link http://php.net/book.ftp FTP extension}.
|
13 |
-
*
|
14 |
-
* Here's a short example of how to use this library:
|
15 |
-
* <code>
|
16 |
-
* <?php
|
17 |
-
* include 'Net/SFTP.php';
|
18 |
-
*
|
19 |
-
* $sftp = new Net_SFTP('www.domain.tld');
|
20 |
-
* if (!$sftp->login('username', 'password')) {
|
21 |
-
* exit('Login Failed');
|
22 |
-
* }
|
23 |
-
*
|
24 |
-
* echo $sftp->pwd() . "\r\n";
|
25 |
-
* $sftp->put('filename.ext', 'hello, world!');
|
26 |
-
* print_r($sftp->nlist());
|
27 |
-
* ?>
|
28 |
-
* </code>
|
29 |
-
*
|
30 |
-
* LICENSE: Permission is hereby granted, free of charge, to any person obtaining a copy
|
31 |
-
* of this software and associated documentation files (the "Software"), to deal
|
32 |
-
* in the Software without restriction, including without limitation the rights
|
33 |
-
* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
34 |
-
* copies of the Software, and to permit persons to whom the Software is
|
35 |
-
* furnished to do so, subject to the following conditions:
|
36 |
-
*
|
37 |
-
* The above copyright notice and this permission notice shall be included in
|
38 |
-
* all copies or substantial portions of the Software.
|
39 |
-
*
|
40 |
-
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
41 |
-
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
42 |
-
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
43 |
-
* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
44 |
-
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
45 |
-
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
|
46 |
-
* THE SOFTWARE.
|
47 |
-
*
|
48 |
-
* @category Net
|
49 |
-
* @package Net_SFTP
|
50 |
-
* @author Jim Wigginton <terrafrost@php.net>
|
51 |
-
* @copyright 2009 Jim Wigginton
|
52 |
-
* @license http://www.opensource.org/licenses/mit-license.html MIT License
|
53 |
-
* @link http://phpseclib.sourceforge.net
|
54 |
-
*/
|
55 |
-
|
56 |
-
/**
|
57 |
-
* Include Net_SSH2
|
58 |
-
*/
|
59 |
-
if (!class_exists('Net_SSH2')) {
|
60 |
-
include_once 'SSH2.php';
|
61 |
-
}
|
62 |
-
|
63 |
-
/**#@+
|
64 |
-
* @access public
|
65 |
-
* @see self::getLog()
|
66 |
-
*/
|
67 |
-
/**
|
68 |
-
* Returns the message numbers
|
69 |
-
*/
|
70 |
-
define('NET_SFTP_LOG_SIMPLE', NET_SSH2_LOG_SIMPLE);
|
71 |
-
/**
|
72 |
-
* Returns the message content
|
73 |
-
*/
|
74 |
-
define('NET_SFTP_LOG_COMPLEX', NET_SSH2_LOG_COMPLEX);
|
75 |
-
/**
|
76 |
-
* Outputs the message content in real-time.
|
77 |
-
*/
|
78 |
-
define('NET_SFTP_LOG_REALTIME', 3);
|
79 |
-
/**#@-*/
|
80 |
-
|
81 |
-
/**
|
82 |
-
* SFTP channel constant
|
83 |
-
*
|
84 |
-
* Net_SSH2::exec() uses 0 and Net_SSH2::read() / Net_SSH2::write() use 1.
|
85 |
-
*
|
86 |
-
* @see Net_SSH2::_send_channel_packet()
|
87 |
-
* @see Net_SSH2::_get_channel_packet()
|
88 |
-
* @access private
|
89 |
-
*/
|
90 |
-
define('NET_SFTP_CHANNEL', 0x100);
|
91 |
-
|
92 |
-
/**#@+
|
93 |
-
* @access public
|
94 |
-
* @see self::put()
|
95 |
-
*/
|
96 |
-
/**
|
97 |
-
* Reads data from a local file.
|
98 |
-
*/
|
99 |
-
define('NET_SFTP_LOCAL_FILE', 1);
|
100 |
-
/**
|
101 |
-
* Reads data from a string.
|
102 |
-
*/
|
103 |
-
// this value isn't really used anymore but i'm keeping it reserved for historical reasons
|
104 |
-
define('NET_SFTP_STRING', 2);
|
105 |
-
/**
|
106 |
-
* Reads data from callback:
|
107 |
-
* function callback($length) returns string to proceed, null for EOF
|
108 |
-
*/
|
109 |
-
define('NET_SFTP_CALLBACK', 16);
|
110 |
-
/**
|
111 |
-
* Resumes an upload
|
112 |
-
*/
|
113 |
-
define('NET_SFTP_RESUME', 4);
|
114 |
-
/**
|
115 |
-
* Append a local file to an already existing remote file
|
116 |
-
*/
|
117 |
-
define('NET_SFTP_RESUME_START', 8);
|
118 |
-
/**#@-*/
|
119 |
-
|
120 |
-
/**
|
121 |
-
* Pure-PHP implementations of SFTP.
|
122 |
-
*
|
123 |
-
* @package Net_SFTP
|
124 |
-
* @author Jim Wigginton <terrafrost@php.net>
|
125 |
-
* @access public
|
126 |
-
*/
|
127 |
-
class Net_SFTP extends Net_SSH2
|
128 |
-
{
|
129 |
-
/**
|
130 |
-
* Packet Types
|
131 |
-
*
|
132 |
-
* @see self::Net_SFTP()
|
133 |
-
* @var array
|
134 |
-
* @access private
|
135 |
-
*/
|
136 |
-
var $packet_types = array();
|
137 |
-
|
138 |
-
/**
|
139 |
-
* Status Codes
|
140 |
-
*
|
141 |
-
* @see self::Net_SFTP()
|
142 |
-
* @var array
|
143 |
-
* @access private
|
144 |
-
*/
|
145 |
-
var $status_codes = array();
|
146 |
-
|
147 |
-
/**
|
148 |
-
* The Request ID
|
149 |
-
*
|
150 |
-
* The request ID exists in the off chance that a packet is sent out-of-order. Of course, this library doesn't support
|
151 |
-
* concurrent actions, so it's somewhat academic, here.
|
152 |
-
*
|
153 |
-
* @var boolean
|
154 |
-
* @see self::_send_sftp_packet()
|
155 |
-
* @access private
|
156 |
-
*/
|
157 |
-
var $use_request_id = false;
|
158 |
-
|
159 |
-
/**
|
160 |
-
* The Packet Type
|
161 |
-
*
|
162 |
-
* The request ID exists in the off chance that a packet is sent out-of-order. Of course, this library doesn't support
|
163 |
-
* concurrent actions, so it's somewhat academic, here.
|
164 |
-
*
|
165 |
-
* @var int
|
166 |
-
* @see self::_get_sftp_packet()
|
167 |
-
* @access private
|
168 |
-
*/
|
169 |
-
var $packet_type = -1;
|
170 |
-
|
171 |
-
/**
|
172 |
-
* Packet Buffer
|
173 |
-
*
|
174 |
-
* @var string
|
175 |
-
* @see self::_get_sftp_packet()
|
176 |
-
* @access private
|
177 |
-
*/
|
178 |
-
var $packet_buffer = '';
|
179 |
-
|
180 |
-
/**
|
181 |
-
* Extensions supported by the server
|
182 |
-
*
|
183 |
-
* @var array
|
184 |
-
* @see self::_initChannel()
|
185 |
-
* @access private
|
186 |
-
*/
|
187 |
-
var $extensions = array();
|
188 |
-
|
189 |
-
/**
|
190 |
-
* Server SFTP version
|
191 |
-
*
|
192 |
-
* @var int
|
193 |
-
* @see self::_initChannel()
|
194 |
-
* @access private
|
195 |
-
*/
|
196 |
-
var $version;
|
197 |
-
|
198 |
-
/**
|
199 |
-
* Current working directory
|
200 |
-
*
|
201 |
-
* @var string
|
202 |
-
* @see self::realpath()
|
203 |
-
* @see self::chdir()
|
204 |
-
* @access private
|
205 |
-
*/
|
206 |
-
var $pwd = false;
|
207 |
-
|
208 |
-
/**
|
209 |
-
* Packet Type Log
|
210 |
-
*
|
211 |
-
* @see self::getLog()
|
212 |
-
* @var array
|
213 |
-
* @access private
|
214 |
-
*/
|
215 |
-
var $packet_type_log = array();
|
216 |
-
|
217 |
-
/**
|
218 |
-
* Packet Log
|
219 |
-
*
|
220 |
-
* @see self::getLog()
|
221 |
-
* @var array
|
222 |
-
* @access private
|
223 |
-
*/
|
224 |
-
var $packet_log = array();
|
225 |
-
|
226 |
-
/**
|
227 |
-
* Error information
|
228 |
-
*
|
229 |
-
* @see self::getSFTPErrors()
|
230 |
-
* @see self::getLastSFTPError()
|
231 |
-
* @var array
|
232 |
-
* @access private
|
233 |
-
*/
|
234 |
-
var $sftp_errors = array();
|
235 |
-
|
236 |
-
/**
|
237 |
-
* Stat Cache
|
238 |
-
*
|
239 |
-
* Rather than always having to open a directory and close it immediately there after to see if a file is a directory
|
240 |
-
* we'll cache the results.
|
241 |
-
*
|
242 |
-
* @see self::_update_stat_cache()
|
243 |
-
* @see self::_remove_from_stat_cache()
|
244 |
-
* @see self::_query_stat_cache()
|
245 |
-
* @var array
|
246 |
-
* @access private
|
247 |
-
*/
|
248 |
-
var $stat_cache = array();
|
249 |
-
|
250 |
-
/**
|
251 |
-
* Max SFTP Packet Size
|
252 |
-
*
|
253 |
-
* @see self::Net_SFTP()
|
254 |
-
* @see self::get()
|
255 |
-
* @var array
|
256 |
-
* @access private
|
257 |
-
*/
|
258 |
-
var $max_sftp_packet;
|
259 |
-
|
260 |
-
/**
|
261 |
-
* Stat Cache Flag
|
262 |
-
*
|
263 |
-
* @see self::disableStatCache()
|
264 |
-
* @see self::enableStatCache()
|
265 |
-
* @var bool
|
266 |
-
* @access private
|
267 |
-
*/
|
268 |
-
var $use_stat_cache = true;
|
269 |
-
|
270 |
-
/**
|
271 |
-
* Sort Options
|
272 |
-
*
|
273 |
-
* @see self::_comparator()
|
274 |
-
* @see self::setListOrder()
|
275 |
-
* @var array
|
276 |
-
* @access private
|
277 |
-
*/
|
278 |
-
var $sortOptions = array();
|
279 |
-
|
280 |
-
/**
|
281 |
-
* Canonicalization Flag
|
282 |
-
*
|
283 |
-
* Determines whether or not paths should be canonicalized before being
|
284 |
-
* passed on to the remote server.
|
285 |
-
*
|
286 |
-
* @see self::enablePathCanonicalization()
|
287 |
-
* @see self::disablePathCanonicalization()
|
288 |
-
* @see self::realpath()
|
289 |
-
* @var bool
|
290 |
-
* @access private
|
291 |
-
*/
|
292 |
-
var $canonicalize_paths = true;
|
293 |
-
|
294 |
-
/**
|
295 |
-
* Request Buffers
|
296 |
-
*
|
297 |
-
* @see self::_get_sftp_packet()
|
298 |
-
* @var array
|
299 |
-
* @access private
|
300 |
-
*/
|
301 |
-
var $requestBuffer = array();
|
302 |
-
|
303 |
-
/**
|
304 |
-
* Default Constructor.
|
305 |
-
*
|
306 |
-
* Connects to an SFTP server
|
307 |
-
*
|
308 |
-
* @param string $host
|
309 |
-
* @param int $port
|
310 |
-
* @param int $timeout
|
311 |
-
* @return Net_SFTP
|
312 |
-
* @access public
|
313 |
-
*/
|
314 |
-
function __construct($host, $port = 22, $timeout = 10)
|
315 |
-
{
|
316 |
-
parent::__construct($host, $port, $timeout);
|
317 |
-
|
318 |
-
$this->max_sftp_packet = 1 << 15;
|
319 |
-
|
320 |
-
$this->packet_types = array(
|
321 |
-
1 => 'NET_SFTP_INIT',
|
322 |
-
2 => 'NET_SFTP_VERSION',
|
323 |
-
/* the format of SSH_FXP_OPEN changed between SFTPv4 and SFTPv5+:
|
324 |
-
SFTPv5+: http://tools.ietf.org/html/draft-ietf-secsh-filexfer-13#section-8.1.1
|
325 |
-
pre-SFTPv5 : http://tools.ietf.org/html/draft-ietf-secsh-filexfer-04#section-6.3 */
|
326 |
-
3 => 'NET_SFTP_OPEN',
|
327 |
-
4 => 'NET_SFTP_CLOSE',
|
328 |
-
5 => 'NET_SFTP_READ',
|
329 |
-
6 => 'NET_SFTP_WRITE',
|
330 |
-
7 => 'NET_SFTP_LSTAT',
|
331 |
-
9 => 'NET_SFTP_SETSTAT',
|
332 |
-
11 => 'NET_SFTP_OPENDIR',
|
333 |
-
12 => 'NET_SFTP_READDIR',
|
334 |
-
13 => 'NET_SFTP_REMOVE',
|
335 |
-
14 => 'NET_SFTP_MKDIR',
|
336 |
-
15 => 'NET_SFTP_RMDIR',
|
337 |
-
16 => 'NET_SFTP_REALPATH',
|
338 |
-
17 => 'NET_SFTP_STAT',
|
339 |
-
/* the format of SSH_FXP_RENAME changed between SFTPv4 and SFTPv5+:
|
340 |
-
SFTPv5+: http://tools.ietf.org/html/draft-ietf-secsh-filexfer-13#section-8.3
|
341 |
-
pre-SFTPv5 : http://tools.ietf.org/html/draft-ietf-secsh-filexfer-04#section-6.5 */
|
342 |
-
18 => 'NET_SFTP_RENAME',
|
343 |
-
19 => 'NET_SFTP_READLINK',
|
344 |
-
20 => 'NET_SFTP_SYMLINK',
|
345 |
-
|
346 |
-
101=> 'NET_SFTP_STATUS',
|
347 |
-
102=> 'NET_SFTP_HANDLE',
|
348 |
-
/* the format of SSH_FXP_NAME changed between SFTPv3 and SFTPv4+:
|
349 |
-
SFTPv4+: http://tools.ietf.org/html/draft-ietf-secsh-filexfer-13#section-9.4
|
350 |
-
pre-SFTPv4 : http://tools.ietf.org/html/draft-ietf-secsh-filexfer-02#section-7 */
|
351 |
-
103=> 'NET_SFTP_DATA',
|
352 |
-
104=> 'NET_SFTP_NAME',
|
353 |
-
105=> 'NET_SFTP_ATTRS',
|
354 |
-
|
355 |
-
200=> 'NET_SFTP_EXTENDED'
|
356 |
-
);
|
357 |
-
$this->status_codes = array(
|
358 |
-
0 => 'NET_SFTP_STATUS_OK',
|
359 |
-
1 => 'NET_SFTP_STATUS_EOF',
|
360 |
-
2 => 'NET_SFTP_STATUS_NO_SUCH_FILE',
|
361 |
-
3 => 'NET_SFTP_STATUS_PERMISSION_DENIED',
|
362 |
-
4 => 'NET_SFTP_STATUS_FAILURE',
|
363 |
-
5 => 'NET_SFTP_STATUS_BAD_MESSAGE',
|
364 |
-
6 => 'NET_SFTP_STATUS_NO_CONNECTION',
|
365 |
-
7 => 'NET_SFTP_STATUS_CONNECTION_LOST',
|
366 |
-
8 => 'NET_SFTP_STATUS_OP_UNSUPPORTED',
|
367 |
-
9 => 'NET_SFTP_STATUS_INVALID_HANDLE',
|
368 |
-
10 => 'NET_SFTP_STATUS_NO_SUCH_PATH',
|
369 |
-
11 => 'NET_SFTP_STATUS_FILE_ALREADY_EXISTS',
|
370 |
-
12 => 'NET_SFTP_STATUS_WRITE_PROTECT',
|
371 |
-
13 => 'NET_SFTP_STATUS_NO_MEDIA',
|
372 |
-
14 => 'NET_SFTP_STATUS_NO_SPACE_ON_FILESYSTEM',
|
373 |
-
15 => 'NET_SFTP_STATUS_QUOTA_EXCEEDED',
|
374 |
-
16 => 'NET_SFTP_STATUS_UNKNOWN_PRINCIPAL',
|
375 |
-
17 => 'NET_SFTP_STATUS_LOCK_CONFLICT',
|
376 |
-
18 => 'NET_SFTP_STATUS_DIR_NOT_EMPTY',
|
377 |
-
19 => 'NET_SFTP_STATUS_NOT_A_DIRECTORY',
|
378 |
-
20 => 'NET_SFTP_STATUS_INVALID_FILENAME',
|
379 |
-
21 => 'NET_SFTP_STATUS_LINK_LOOP',
|
380 |
-
22 => 'NET_SFTP_STATUS_CANNOT_DELETE',
|
381 |
-
23 => 'NET_SFTP_STATUS_INVALID_PARAMETER',
|
382 |
-
24 => 'NET_SFTP_STATUS_FILE_IS_A_DIRECTORY',
|
383 |
-
25 => 'NET_SFTP_STATUS_BYTE_RANGE_LOCK_CONFLICT',
|
384 |
-
26 => 'NET_SFTP_STATUS_BYTE_RANGE_LOCK_REFUSED',
|
385 |
-
27 => 'NET_SFTP_STATUS_DELETE_PENDING',
|
386 |
-
28 => 'NET_SFTP_STATUS_FILE_CORRUPT',
|
387 |
-
29 => 'NET_SFTP_STATUS_OWNER_INVALID',
|
388 |
-
30 => 'NET_SFTP_STATUS_GROUP_INVALID',
|
389 |
-
31 => 'NET_SFTP_STATUS_NO_MATCHING_BYTE_RANGE_LOCK'
|
390 |
-
);
|
391 |
-
// http://tools.ietf.org/html/draft-ietf-secsh-filexfer-13#section-7.1
|
392 |
-
// the order, in this case, matters quite a lot - see Net_SFTP::_parseAttributes() to understand why
|
393 |
-
$this->attributes = array(
|
394 |
-
0x00000001 => 'NET_SFTP_ATTR_SIZE',
|
395 |
-
0x00000002 => 'NET_SFTP_ATTR_UIDGID', // defined in SFTPv3, removed in SFTPv4+
|
396 |
-
0x00000004 => 'NET_SFTP_ATTR_PERMISSIONS',
|
397 |
-
0x00000008 => 'NET_SFTP_ATTR_ACCESSTIME',
|
398 |
-
// 0x80000000 will yield a floating point on 32-bit systems and converting floating points to integers
|
399 |
-
// yields inconsistent behavior depending on how php is compiled. so we left shift -1 (which, in
|
400 |
-
// two's compliment, consists of all 1 bits) by 31. on 64-bit systems this'll yield 0xFFFFFFFF80000000.
|
401 |
-
// that's not a problem, however, and 'anded' and a 32-bit number, as all the leading 1 bits are ignored.
|
402 |
-
(-1 << 31) & 0xFFFFFFFF => 'NET_SFTP_ATTR_EXTENDED'
|
403 |
-
);
|
404 |
-
// http://tools.ietf.org/html/draft-ietf-secsh-filexfer-04#section-6.3
|
405 |
-
// the flag definitions change somewhat in SFTPv5+. if SFTPv5+ support is added to this library, maybe name
|
406 |
-
// the array for that $this->open5_flags and similarly alter the constant names.
|
407 |
-
$this->open_flags = array(
|
408 |
-
0x00000001 => 'NET_SFTP_OPEN_READ',
|
409 |
-
0x00000002 => 'NET_SFTP_OPEN_WRITE',
|
410 |
-
0x00000004 => 'NET_SFTP_OPEN_APPEND',
|
411 |
-
0x00000008 => 'NET_SFTP_OPEN_CREATE',
|
412 |
-
0x00000010 => 'NET_SFTP_OPEN_TRUNCATE',
|
413 |
-
0x00000020 => 'NET_SFTP_OPEN_EXCL'
|
414 |
-
);
|
415 |
-
// http://tools.ietf.org/html/draft-ietf-secsh-filexfer-04#section-5.2
|
416 |
-
// see Net_SFTP::_parseLongname() for an explanation
|
417 |
-
$this->file_types = array(
|
418 |
-
1 => 'NET_SFTP_TYPE_REGULAR',
|
419 |
-
2 => 'NET_SFTP_TYPE_DIRECTORY',
|
420 |
-
3 => 'NET_SFTP_TYPE_SYMLINK',
|
421 |
-
4 => 'NET_SFTP_TYPE_SPECIAL',
|
422 |
-
5 => 'NET_SFTP_TYPE_UNKNOWN',
|
423 |
-
// the followin types were first defined for use in SFTPv5+
|
424 |
-
// http://tools.ietf.org/html/draft-ietf-secsh-filexfer-05#section-5.2
|
425 |
-
6 => 'NET_SFTP_TYPE_SOCKET',
|
426 |
-
7 => 'NET_SFTP_TYPE_CHAR_DEVICE',
|
427 |
-
8 => 'NET_SFTP_TYPE_BLOCK_DEVICE',
|
428 |
-
9 => 'NET_SFTP_TYPE_FIFO'
|
429 |
-
);
|
430 |
-
$this->_define_array(
|
431 |
-
$this->packet_types,
|
432 |
-
$this->status_codes,
|
433 |
-
$this->attributes,
|
434 |
-
$this->open_flags,
|
435 |
-
$this->file_types
|
436 |
-
);
|
437 |
-
|
438 |
-
if (!defined('NET_SFTP_QUEUE_SIZE')) {
|
439 |
-
define('NET_SFTP_QUEUE_SIZE', 32);
|
440 |
-
}
|
441 |
-
|
442 |
-
|
443 |
-
|
444 |
-
|
445 |
-
|
446 |
-
|
447 |
-
*
|
448 |
-
*
|
449 |
-
* @
|
450 |
-
* @
|
451 |
-
|
452 |
-
|
453 |
-
|
454 |
-
|
455 |
-
|
456 |
-
|
457 |
-
|
458 |
-
|
459 |
-
|
460 |
-
|
461 |
-
*
|
462 |
-
*
|
463 |
-
* @
|
464 |
-
|
465 |
-
|
466 |
-
|
467 |
-
|
468 |
-
|
469 |
-
|
470 |
-
|
471 |
-
|
472 |
-
|
473 |
-
|
474 |
-
$
|
475 |
-
|
476 |
-
|
477 |
-
|
478 |
-
|
479 |
-
|
480 |
-
|
481 |
-
|
482 |
-
|
483 |
-
|
484 |
-
|
485 |
-
|
486 |
-
|
487 |
-
|
488 |
-
|
489 |
-
|
490 |
-
|
491 |
-
|
492 |
-
|
493 |
-
|
494 |
-
|
495 |
-
|
496 |
-
|
497 |
-
|
498 |
-
|
499 |
-
|
500 |
-
|
501 |
-
|
502 |
-
|
503 |
-
|
504 |
-
|
505 |
-
|
506 |
-
|
507 |
-
|
508 |
-
|
509 |
-
|
510 |
-
|
511 |
-
|
512 |
-
|
513 |
-
|
514 |
-
|
515 |
-
|
516 |
-
|
517 |
-
|
518 |
-
|
519 |
-
|
520 |
-
|
521 |
-
|
522 |
-
|
523 |
-
|
524 |
-
|
525 |
-
|
526 |
-
|
527 |
-
|
528 |
-
|
529 |
-
|
530 |
-
|
531 |
-
|
532 |
-
|
533 |
-
|
534 |
-
|
535 |
-
|
536 |
-
|
537 |
-
|
538 |
-
|
539 |
-
|
540 |
-
|
541 |
-
|
542 |
-
|
543 |
-
|
544 |
-
|
545 |
-
}
|
546 |
-
|
547 |
-
$
|
548 |
-
|
549 |
-
|
550 |
-
return false;
|
551 |
-
}
|
552 |
-
|
553 |
-
|
554 |
-
|
555 |
-
|
556 |
-
|
557 |
-
|
558 |
-
|
559 |
-
|
560 |
-
|
561 |
-
|
562 |
-
|
563 |
-
|
564 |
-
|
565 |
-
|
566 |
-
|
567 |
-
|
568 |
-
|
569 |
-
$
|
570 |
-
|
571 |
-
|
572 |
-
|
573 |
-
|
574 |
-
|
575 |
-
|
576 |
-
|
577 |
-
|
578 |
-
|
579 |
-
|
580 |
-
|
581 |
-
|
582 |
-
|
583 |
-
|
584 |
-
*/
|
585 |
-
|
586 |
-
$this->
|
587 |
-
|
588 |
-
|
589 |
-
|
590 |
-
|
591 |
-
|
592 |
-
|
593 |
-
|
594 |
-
|
595 |
-
|
596 |
-
|
597 |
-
|
598 |
-
|
599 |
-
|
600 |
-
|
601 |
-
|
602 |
-
|
603 |
-
|
604 |
-
|
605 |
-
|
606 |
-
|
607 |
-
|
608 |
-
|
609 |
-
|
610 |
-
|
611 |
-
|
612 |
-
|
613 |
-
|
614 |
-
|
615 |
-
|
616 |
-
|
617 |
-
|
618 |
-
|
619 |
-
|
620 |
-
|
621 |
-
|
622 |
-
|
623 |
-
|
624 |
-
|
625 |
-
|
626 |
-
|
627 |
-
|
628 |
-
|
629 |
-
|
630 |
-
|
631 |
-
|
632 |
-
|
633 |
-
|
634 |
-
|
635 |
-
|
636 |
-
|
637 |
-
|
638 |
-
|
639 |
-
|
640 |
-
|
641 |
-
|
642 |
-
|
643 |
-
|
644 |
-
|
645 |
-
|
646 |
-
|
647 |
-
|
648 |
-
|
649 |
-
|
650 |
-
|
651 |
-
|
652 |
-
|
653 |
-
|
654 |
-
|
655 |
-
|
656 |
-
|
657 |
-
|
658 |
-
|
659 |
-
|
660 |
-
|
661 |
-
|
662 |
-
|
663 |
-
|
664 |
-
|
665 |
-
|
666 |
-
|
667 |
-
|
668 |
-
|
669 |
-
|
670 |
-
|
671 |
-
|
672 |
-
|
673 |
-
|
674 |
-
|
675 |
-
|
676 |
-
|
677 |
-
|
678 |
-
|
679 |
-
|
680 |
-
|
681 |
-
|
682 |
-
|
683 |
-
|
684 |
-
|
685 |
-
|
686 |
-
|
687 |
-
|
688 |
-
|
689 |
-
|
690 |
-
|
691 |
-
|
692 |
-
|
693 |
-
|
694 |
-
|
695 |
-
|
696 |
-
|
697 |
-
|
698 |
-
|
699 |
-
|
700 |
-
|
701 |
-
|
702 |
-
|
703 |
-
|
704 |
-
|
705 |
-
|
706 |
-
extract(unpack('
|
707 |
-
|
708 |
-
|
709 |
-
|
710 |
-
|
711 |
-
|
712 |
-
|
713 |
-
|
714 |
-
|
715 |
-
|
716 |
-
|
717 |
-
|
718 |
-
|
719 |
-
|
720 |
-
*
|
721 |
-
*
|
722 |
-
|
723 |
-
|
724 |
-
|
725 |
-
|
726 |
-
|
727 |
-
|
728 |
-
|
729 |
-
|
730 |
-
|
731 |
-
|
732 |
-
|
733 |
-
|
734 |
-
|
735 |
-
*
|
736 |
-
*
|
737 |
-
*
|
738 |
-
*
|
739 |
-
*
|
740 |
-
*
|
741 |
-
|
742 |
-
|
743 |
-
|
744 |
-
|
745 |
-
|
746 |
-
|
747 |
-
|
748 |
-
|
749 |
-
|
750 |
-
|
751 |
-
|
752 |
-
|
753 |
-
|
754 |
-
|
755 |
-
|
756 |
-
|
757 |
-
|
758 |
-
|
759 |
-
|
760 |
-
|
761 |
-
|
762 |
-
|
763 |
-
|
764 |
-
|
765 |
-
|
766 |
-
|
767 |
-
|
768 |
-
|
769 |
-
|
770 |
-
|
771 |
-
return
|
772 |
-
|
773 |
-
|
774 |
-
|
775 |
-
|
776 |
-
|
777 |
-
|
778 |
-
|
779 |
-
|
780 |
-
|
781 |
-
|
782 |
-
|
783 |
-
|
784 |
-
|
785 |
-
|
786 |
-
|
787 |
-
|
788 |
-
|
789 |
-
|
790 |
-
|
791 |
-
|
792 |
-
|
793 |
-
|
794 |
-
|
795 |
-
|
796 |
-
|
797 |
-
|
798 |
-
|
799 |
-
|
800 |
-
|
801 |
-
|
802 |
-
|
803 |
-
|
804 |
-
|
805 |
-
|
806 |
-
|
807 |
-
|
808 |
-
|
809 |
-
|
810 |
-
|
811 |
-
|
812 |
-
|
813 |
-
|
814 |
-
|
815 |
-
}
|
816 |
-
|
817 |
-
|
818 |
-
|
819 |
-
|
820 |
-
|
821 |
-
|
822 |
-
|
823 |
-
|
824 |
-
|
825 |
-
|
826 |
-
|
827 |
-
//
|
828 |
-
|
829 |
-
|
830 |
-
|
831 |
-
|
832 |
-
|
833 |
-
|
834 |
-
|
835 |
-
|
836 |
-
//
|
837 |
-
|
838 |
-
|
839 |
-
|
840 |
-
|
841 |
-
|
842 |
-
|
843 |
-
|
844 |
-
|
845 |
-
|
846 |
-
|
847 |
-
|
848 |
-
|
849 |
-
|
850 |
-
|
851 |
-
|
852 |
-
|
853 |
-
|
854 |
-
|
855 |
-
|
856 |
-
|
857 |
-
|
858 |
-
|
859 |
-
|
860 |
-
|
861 |
-
|
862 |
-
|
863 |
-
|
864 |
-
|
865 |
-
|
866 |
-
|
867 |
-
|
868 |
-
|
869 |
-
|
870 |
-
|
871 |
-
|
872 |
-
|
873 |
-
|
874 |
-
|
875 |
-
|
876 |
-
|
877 |
-
|
878 |
-
|
879 |
-
|
880 |
-
*
|
881 |
-
|
882 |
-
|
883 |
-
|
884 |
-
|
885 |
-
|
886 |
-
|
887 |
-
|
888 |
-
|
889 |
-
|
890 |
-
$
|
891 |
-
|
892 |
-
|
893 |
-
|
894 |
-
|
895 |
-
|
896 |
-
|
897 |
-
|
898 |
-
if (
|
899 |
-
|
900 |
-
|
901 |
-
|
902 |
-
|
903 |
-
}
|
904 |
-
|
905 |
-
|
906 |
-
|
907 |
-
|
908 |
-
|
909 |
-
|
910 |
-
|
911 |
-
|
912 |
-
|
913 |
-
|
914 |
-
|
915 |
-
|
916 |
-
|
917 |
-
|
918 |
-
|
919 |
-
|
920 |
-
|
921 |
-
|
922 |
-
|
923 |
-
|
924 |
-
|
925 |
-
|
926 |
-
|
927 |
-
|
928 |
-
|
929 |
-
|
930 |
-
|
931 |
-
|
932 |
-
|
933 |
-
|
934 |
-
|
935 |
-
|
936 |
-
|
937 |
-
|
938 |
-
|
939 |
-
|
940 |
-
|
941 |
-
|
942 |
-
|
943 |
-
|
944 |
-
|
945 |
-
|
946 |
-
|
947 |
-
|
948 |
-
|
949 |
-
|
950 |
-
|
951 |
-
|
952 |
-
|
953 |
-
|
954 |
-
|
955 |
-
|
956 |
-
|
957 |
-
|
958 |
-
|
959 |
-
|
960 |
-
|
961 |
-
|
962 |
-
|
963 |
-
|
964 |
-
|
965 |
-
|
966 |
-
|
967 |
-
|
968 |
-
|
969 |
-
|
970 |
-
|
971 |
-
|
972 |
-
|
973 |
-
|
974 |
-
|
975 |
-
|
976 |
-
|
977 |
-
|
978 |
-
|
979 |
-
|
980 |
-
|
981 |
-
|
982 |
-
|
983 |
-
|
984 |
-
|
985 |
-
|
986 |
-
|
987 |
-
|
988 |
-
|
989 |
-
|
990 |
-
|
991 |
-
|
992 |
-
|
993 |
-
|
994 |
-
|
995 |
-
|
996 |
-
|
997 |
-
|
998 |
-
|
999 |
-
|
1000 |
-
|
1001 |
-
|
1002 |
-
|
1003 |
-
|
1004 |
-
|
1005 |
-
|
1006 |
-
|
1007 |
-
|
1008 |
-
|
1009 |
-
|
1010 |
-
|
1011 |
-
|
1012 |
-
|
1013 |
-
|
1014 |
-
|
1015 |
-
|
1016 |
-
|
1017 |
-
|
1018 |
-
|
1019 |
-
|
1020 |
-
|
1021 |
-
|
1022 |
-
|
1023 |
-
|
1024 |
-
|
1025 |
-
|
1026 |
-
|
1027 |
-
|
1028 |
-
|
1029 |
-
|
1030 |
-
$
|
1031 |
-
|
1032 |
-
|
1033 |
-
|
1034 |
-
|
1035 |
-
|
1036 |
-
|
1037 |
-
|
1038 |
-
|
1039 |
-
|
1040 |
-
$this->_update_stat_cache($
|
1041 |
-
}
|
1042 |
-
|
1043 |
-
|
1044 |
-
|
1045 |
-
|
1046 |
-
|
1047 |
-
|
1048 |
-
|
1049 |
-
|
1050 |
-
|
1051 |
-
|
1052 |
-
|
1053 |
-
|
1054 |
-
|
1055 |
-
|
1056 |
-
|
1057 |
-
|
1058 |
-
|
1059 |
-
|
1060 |
-
|
1061 |
-
|
1062 |
-
|
1063 |
-
|
1064 |
-
|
1065 |
-
|
1066 |
-
|
1067 |
-
|
1068 |
-
|
1069 |
-
|
1070 |
-
|
1071 |
-
|
1072 |
-
|
1073 |
-
|
1074 |
-
|
1075 |
-
|
1076 |
-
|
1077 |
-
|
1078 |
-
|
1079 |
-
|
1080 |
-
|
1081 |
-
*
|
1082 |
-
|
1083 |
-
|
1084 |
-
|
1085 |
-
|
1086 |
-
|
1087 |
-
|
1088 |
-
|
1089 |
-
|
1090 |
-
|
1091 |
-
|
1092 |
-
|
1093 |
-
|
1094 |
-
|
1095 |
-
|
1096 |
-
|
1097 |
-
|
1098 |
-
|
1099 |
-
|
1100 |
-
|
1101 |
-
|
1102 |
-
|
1103 |
-
|
1104 |
-
|
1105 |
-
|
1106 |
-
|
1107 |
-
|
1108 |
-
|
1109 |
-
|
1110 |
-
|
1111 |
-
|
1112 |
-
|
1113 |
-
|
1114 |
-
|
1115 |
-
|
1116 |
-
|
1117 |
-
|
1118 |
-
|
1119 |
-
|
1120 |
-
|
1121 |
-
|
1122 |
-
|
1123 |
-
|
1124 |
-
|
1125 |
-
case '
|
1126 |
-
$a[$
|
1127 |
-
$
|
1128 |
-
|
1129 |
-
|
1130 |
-
|
1131 |
-
|
1132 |
-
|
1133 |
-
|
1134 |
-
|
1135 |
-
|
1136 |
-
|
1137 |
-
|
1138 |
-
|
1139 |
-
|
1140 |
-
|
1141 |
-
|
1142 |
-
|
1143 |
-
|
1144 |
-
|
1145 |
-
*
|
1146 |
-
*
|
1147 |
-
*
|
1148 |
-
*
|
1149 |
-
*
|
1150 |
-
*
|
1151 |
-
*
|
1152 |
-
*
|
1153 |
-
*
|
1154 |
-
*
|
1155 |
-
*
|
1156 |
-
|
1157 |
-
|
1158 |
-
|
1159 |
-
|
1160 |
-
|
1161 |
-
|
1162 |
-
|
1163 |
-
|
1164 |
-
|
1165 |
-
|
1166 |
-
|
1167 |
-
|
1168 |
-
if (
|
1169 |
-
|
1170 |
-
}
|
1171 |
-
|
1172 |
-
|
1173 |
-
|
1174 |
-
|
1175 |
-
|
1176 |
-
|
1177 |
-
|
1178 |
-
|
1179 |
-
|
1180 |
-
|
1181 |
-
|
1182 |
-
|
1183 |
-
|
1184 |
-
|
1185 |
-
|
1186 |
-
|
1187 |
-
|
1188 |
-
|
1189 |
-
|
1190 |
-
|
1191 |
-
|
1192 |
-
|
1193 |
-
|
1194 |
-
|
1195 |
-
|
1196 |
-
|
1197 |
-
|
1198 |
-
|
1199 |
-
|
1200 |
-
|
1201 |
-
|
1202 |
-
|
1203 |
-
|
1204 |
-
|
1205 |
-
|
1206 |
-
|
1207 |
-
|
1208 |
-
|
1209 |
-
|
1210 |
-
|
1211 |
-
$
|
1212 |
-
|
1213 |
-
|
1214 |
-
|
1215 |
-
|
1216 |
-
|
1217 |
-
|
1218 |
-
|
1219 |
-
|
1220 |
-
|
1221 |
-
|
1222 |
-
|
1223 |
-
|
1224 |
-
|
1225 |
-
|
1226 |
-
|
1227 |
-
|
1228 |
-
|
1229 |
-
|
1230 |
-
|
1231 |
-
|
1232 |
-
|
1233 |
-
|
1234 |
-
|
1235 |
-
|
1236 |
-
|
1237 |
-
|
1238 |
-
|
1239 |
-
|
1240 |
-
|
1241 |
-
|
1242 |
-
|
1243 |
-
|
1244 |
-
|
1245 |
-
|
1246 |
-
|
1247 |
-
|
1248 |
-
|
1249 |
-
|
1250 |
-
|
1251 |
-
|
1252 |
-
|
1253 |
-
|
1254 |
-
|
1255 |
-
|
1256 |
-
|
1257 |
-
|
1258 |
-
|
1259 |
-
|
1260 |
-
$temp
|
1261 |
-
|
1262 |
-
|
1263 |
-
|
1264 |
-
|
1265 |
-
|
1266 |
-
|
1267 |
-
|
1268 |
-
|
1269 |
-
|
1270 |
-
|
1271 |
-
|
1272 |
-
|
1273 |
-
|
1274 |
-
|
1275 |
-
|
1276 |
-
|
1277 |
-
|
1278 |
-
|
1279 |
-
|
1280 |
-
|
1281 |
-
|
1282 |
-
|
1283 |
-
|
1284 |
-
|
1285 |
-
|
1286 |
-
|
1287 |
-
|
1288 |
-
|
1289 |
-
|
1290 |
-
|
1291 |
-
|
1292 |
-
|
1293 |
-
|
1294 |
-
|
1295 |
-
|
1296 |
-
|
1297 |
-
|
1298 |
-
|
1299 |
-
|
1300 |
-
|
1301 |
-
|
1302 |
-
|
1303 |
-
|
1304 |
-
|
1305 |
-
|
1306 |
-
|
1307 |
-
|
1308 |
-
|
1309 |
-
|
1310 |
-
|
1311 |
-
|
1312 |
-
|
1313 |
-
|
1314 |
-
|
1315 |
-
|
1316 |
-
|
1317 |
-
|
1318 |
-
|
1319 |
-
|
1320 |
-
|
1321 |
-
|
1322 |
-
|
1323 |
-
|
1324 |
-
|
1325 |
-
|
1326 |
-
|
1327 |
-
|
1328 |
-
}
|
1329 |
-
|
1330 |
-
$
|
1331 |
-
$stat
|
1332 |
-
|
1333 |
-
|
1334 |
-
|
1335 |
-
|
1336 |
-
|
1337 |
-
|
1338 |
-
|
1339 |
-
|
1340 |
-
|
1341 |
-
|
1342 |
-
|
1343 |
-
|
1344 |
-
|
1345 |
-
|
1346 |
-
|
1347 |
-
|
1348 |
-
|
1349 |
-
|
1350 |
-
|
1351 |
-
|
1352 |
-
|
1353 |
-
|
1354 |
-
|
1355 |
-
|
1356 |
-
|
1357 |
-
|
1358 |
-
|
1359 |
-
|
1360 |
-
|
1361 |
-
|
1362 |
-
|
1363 |
-
|
1364 |
-
|
1365 |
-
|
1366 |
-
|
1367 |
-
|
1368 |
-
|
1369 |
-
|
1370 |
-
|
1371 |
-
|
1372 |
-
|
1373 |
-
|
1374 |
-
|
1375 |
-
|
1376 |
-
|
1377 |
-
|
1378 |
-
|
1379 |
-
|
1380 |
-
|
1381 |
-
|
1382 |
-
|
1383 |
-
|
1384 |
-
|
1385 |
-
}
|
1386 |
-
|
1387 |
-
$
|
1388 |
-
|
1389 |
-
|
1390 |
-
|
1391 |
-
|
1392 |
-
|
1393 |
-
|
1394 |
-
|
1395 |
-
|
1396 |
-
|
1397 |
-
|
1398 |
-
|
1399 |
-
|
1400 |
-
|
1401 |
-
|
1402 |
-
|
1403 |
-
|
1404 |
-
|
1405 |
-
|
1406 |
-
|
1407 |
-
|
1408 |
-
|
1409 |
-
|
1410 |
-
|
1411 |
-
|
1412 |
-
|
1413 |
-
|
1414 |
-
|
1415 |
-
|
1416 |
-
|
1417 |
-
|
1418 |
-
|
1419 |
-
|
1420 |
-
|
1421 |
-
|
1422 |
-
|
1423 |
-
|
1424 |
-
|
1425 |
-
|
1426 |
-
|
1427 |
-
|
1428 |
-
|
1429 |
-
|
1430 |
-
|
1431 |
-
|
1432 |
-
|
1433 |
-
|
1434 |
-
|
1435 |
-
|
1436 |
-
|
1437 |
-
|
1438 |
-
|
1439 |
-
|
1440 |
-
|
1441 |
-
|
1442 |
-
|
1443 |
-
|
1444 |
-
|
1445 |
-
|
1446 |
-
|
1447 |
-
|
1448 |
-
|
1449 |
-
|
1450 |
-
|
1451 |
-
|
1452 |
-
|
1453 |
-
|
1454 |
-
|
1455 |
-
|
1456 |
-
|
1457 |
-
*
|
1458 |
-
*
|
1459 |
-
*
|
1460 |
-
*
|
1461 |
-
|
1462 |
-
|
1463 |
-
|
1464 |
-
|
1465 |
-
|
1466 |
-
|
1467 |
-
|
1468 |
-
|
1469 |
-
|
1470 |
-
|
1471 |
-
|
1472 |
-
|
1473 |
-
|
1474 |
-
|
1475 |
-
|
1476 |
-
|
1477 |
-
|
1478 |
-
|
1479 |
-
|
1480 |
-
|
1481 |
-
|
1482 |
-
|
1483 |
-
|
1484 |
-
|
1485 |
-
|
1486 |
-
$
|
1487 |
-
|
1488 |
-
|
1489 |
-
|
1490 |
-
|
1491 |
-
|
1492 |
-
|
1493 |
-
|
1494 |
-
|
1495 |
-
|
1496 |
-
|
1497 |
-
|
1498 |
-
|
1499 |
-
|
1500 |
-
|
1501 |
-
|
1502 |
-
|
1503 |
-
|
1504 |
-
|
1505 |
-
|
1506 |
-
|
1507 |
-
|
1508 |
-
|
1509 |
-
|
1510 |
-
|
1511 |
-
|
1512 |
-
|
1513 |
-
|
1514 |
-
|
1515 |
-
|
1516 |
-
|
1517 |
-
|
1518 |
-
|
1519 |
-
|
1520 |
-
|
1521 |
-
|
1522 |
-
|
1523 |
-
|
1524 |
-
|
1525 |
-
|
1526 |
-
|
1527 |
-
|
1528 |
-
*
|
1529 |
-
*
|
1530 |
-
|
1531 |
-
|
1532 |
-
|
1533 |
-
|
1534 |
-
|
1535 |
-
|
1536 |
-
|
1537 |
-
|
1538 |
-
|
1539 |
-
|
1540 |
-
|
1541 |
-
|
1542 |
-
|
1543 |
-
|
1544 |
-
|
1545 |
-
|
1546 |
-
*
|
1547 |
-
*
|
1548 |
-
*
|
1549 |
-
*
|
1550 |
-
|
1551 |
-
|
1552 |
-
|
1553 |
-
|
1554 |
-
|
1555 |
-
|
1556 |
-
|
1557 |
-
|
1558 |
-
|
1559 |
-
|
1560 |
-
|
1561 |
-
|
1562 |
-
|
1563 |
-
|
1564 |
-
|
1565 |
-
|
1566 |
-
|
1567 |
-
|
1568 |
-
|
1569 |
-
|
1570 |
-
|
1571 |
-
|
1572 |
-
|
1573 |
-
|
1574 |
-
|
1575 |
-
|
1576 |
-
|
1577 |
-
|
1578 |
-
|
1579 |
-
|
1580 |
-
|
1581 |
-
|
1582 |
-
|
1583 |
-
|
1584 |
-
|
1585 |
-
|
1586 |
-
|
1587 |
-
|
1588 |
-
|
1589 |
-
|
1590 |
-
|
1591 |
-
|
1592 |
-
|
1593 |
-
|
1594 |
-
|
1595 |
-
|
1596 |
-
|
1597 |
-
|
1598 |
-
|
1599 |
-
|
1600 |
-
|
1601 |
-
|
1602 |
-
|
1603 |
-
|
1604 |
-
|
1605 |
-
|
1606 |
-
|
1607 |
-
|
1608 |
-
|
1609 |
-
|
1610 |
-
|
1611 |
-
|
1612 |
-
|
1613 |
-
|
1614 |
-
|
1615 |
-
|
1616 |
-
|
1617 |
-
|
1618 |
-
|
1619 |
-
|
1620 |
-
|
1621 |
-
|
1622 |
-
|
1623 |
-
|
1624 |
-
|
1625 |
-
|
1626 |
-
|
1627 |
-
|
1628 |
-
|
1629 |
-
|
1630 |
-
|
1631 |
-
|
1632 |
-
|
1633 |
-
|
1634 |
-
|
1635 |
-
|
1636 |
-
|
1637 |
-
|
1638 |
-
|
1639 |
-
if
|
1640 |
-
|
1641 |
-
return false;
|
1642 |
-
}
|
1643 |
-
|
1644 |
-
|
1645 |
-
|
1646 |
-
|
1647 |
-
|
1648 |
-
|
1649 |
-
|
1650 |
-
|
1651 |
-
|
1652 |
-
|
1653 |
-
|
1654 |
-
|
1655 |
-
|
1656 |
-
|
1657 |
-
|
1658 |
-
|
1659 |
-
|
1660 |
-
|
1661 |
-
|
1662 |
-
|
1663 |
-
|
1664 |
-
|
1665 |
-
|
1666 |
-
|
1667 |
-
|
1668 |
-
|
1669 |
-
|
1670 |
-
|
1671 |
-
|
1672 |
-
|
1673 |
-
|
1674 |
-
|
1675 |
-
|
1676 |
-
|
1677 |
-
|
1678 |
-
|
1679 |
-
|
1680 |
-
|
1681 |
-
|
1682 |
-
|
1683 |
-
|
1684 |
-
|
1685 |
-
|
1686 |
-
|
1687 |
-
|
1688 |
-
|
1689 |
-
|
1690 |
-
|
1691 |
-
|
1692 |
-
|
1693 |
-
|
1694 |
-
|
1695 |
-
|
1696 |
-
|
1697 |
-
|
1698 |
-
|
1699 |
-
|
1700 |
-
|
1701 |
-
|
1702 |
-
|
1703 |
-
|
1704 |
-
|
1705 |
-
|
1706 |
-
|
1707 |
-
|
1708 |
-
}
|
1709 |
-
}
|
1710 |
-
|
1711 |
-
|
1712 |
-
|
1713 |
-
|
1714 |
-
|
1715 |
-
|
1716 |
-
|
1717 |
-
|
1718 |
-
|
1719 |
-
|
1720 |
-
|
1721 |
-
|
1722 |
-
|
1723 |
-
}
|
1724 |
-
|
1725 |
-
|
1726 |
-
|
1727 |
-
|
1728 |
-
|
1729 |
-
|
1730 |
-
|
1731 |
-
|
1732 |
-
|
1733 |
-
|
1734 |
-
|
1735 |
-
|
1736 |
-
|
1737 |
-
|
1738 |
-
|
1739 |
-
|
1740 |
-
|
1741 |
-
|
1742 |
-
|
1743 |
-
|
1744 |
-
|
1745 |
-
|
1746 |
-
|
1747 |
-
|
1748 |
-
|
1749 |
-
|
1750 |
-
|
1751 |
-
|
1752 |
-
|
1753 |
-
|
1754 |
-
|
1755 |
-
|
1756 |
-
|
1757 |
-
|
1758 |
-
|
1759 |
-
|
1760 |
-
|
1761 |
-
|
1762 |
-
|
1763 |
-
|
1764 |
-
|
1765 |
-
|
1766 |
-
|
1767 |
-
|
1768 |
-
|
1769 |
-
|
1770 |
-
}
|
1771 |
-
|
1772 |
-
|
1773 |
-
|
1774 |
-
|
1775 |
-
|
1776 |
-
|
1777 |
-
|
1778 |
-
|
1779 |
-
|
1780 |
-
|
1781 |
-
|
1782 |
-
|
1783 |
-
|
1784 |
-
|
1785 |
-
|
1786 |
-
|
1787 |
-
|
1788 |
-
|
1789 |
-
|
1790 |
-
|
1791 |
-
|
1792 |
-
|
1793 |
-
|
1794 |
-
|
1795 |
-
|
1796 |
-
|
1797 |
-
|
1798 |
-
|
1799 |
-
|
1800 |
-
if ($this->
|
1801 |
-
|
1802 |
-
|
1803 |
-
|
1804 |
-
|
1805 |
-
|
1806 |
-
|
1807 |
-
|
1808 |
-
|
1809 |
-
|
1810 |
-
|
1811 |
-
|
1812 |
-
|
1813 |
-
|
1814 |
-
|
1815 |
-
|
1816 |
-
|
1817 |
-
|
1818 |
-
|
1819 |
-
|
1820 |
-
|
1821 |
-
|
1822 |
-
|
1823 |
-
|
1824 |
-
|
1825 |
-
|
1826 |
-
|
1827 |
-
|
1828 |
-
|
1829 |
-
|
1830 |
-
|
1831 |
-
|
1832 |
-
|
1833 |
-
|
1834 |
-
|
1835 |
-
|
1836 |
-
|
1837 |
-
|
1838 |
-
|
1839 |
-
|
1840 |
-
|
1841 |
-
|
1842 |
-
|
1843 |
-
|
1844 |
-
|
1845 |
-
|
1846 |
-
|
1847 |
-
|
1848 |
-
|
1849 |
-
|
1850 |
-
|
1851 |
-
|
1852 |
-
|
1853 |
-
|
1854 |
-
|
1855 |
-
|
1856 |
-
|
1857 |
-
|
1858 |
-
|
1859 |
-
|
1860 |
-
|
1861 |
-
|
1862 |
-
|
1863 |
-
|
1864 |
-
|
1865 |
-
|
1866 |
-
|
1867 |
-
|
1868 |
-
|
1869 |
-
|
1870 |
-
|
1871 |
-
|
1872 |
-
|
1873 |
-
|
1874 |
-
|
1875 |
-
|
1876 |
-
|
1877 |
-
|
1878 |
-
|
1879 |
-
|
1880 |
-
|
1881 |
-
|
1882 |
-
|
1883 |
-
|
1884 |
-
|
1885 |
-
|
1886 |
-
|
1887 |
-
|
1888 |
-
|
1889 |
-
|
1890 |
-
|
1891 |
-
|
1892 |
-
|
1893 |
-
|
1894 |
-
|
1895 |
-
|
1896 |
-
|
1897 |
-
|
1898 |
-
|
1899 |
-
|
1900 |
-
|
1901 |
-
|
1902 |
-
|
1903 |
-
|
1904 |
-
|
1905 |
-
|
1906 |
-
|
1907 |
-
|
1908 |
-
return false;
|
1909 |
-
}
|
1910 |
-
|
1911 |
-
|
1912 |
-
|
1913 |
-
|
1914 |
-
|
1915 |
-
|
1916 |
-
|
1917 |
-
|
1918 |
-
|
1919 |
-
|
1920 |
-
|
1921 |
-
$this->
|
1922 |
-
|
1923 |
-
|
1924 |
-
|
1925 |
-
|
1926 |
-
|
1927 |
-
|
1928 |
-
|
1929 |
-
|
1930 |
-
|
1931 |
-
|
1932 |
-
|
1933 |
-
|
1934 |
-
|
1935 |
-
|
1936 |
-
|
1937 |
-
|
1938 |
-
|
1939 |
-
|
1940 |
-
|
1941 |
-
|
1942 |
-
|
1943 |
-
|
1944 |
-
|
1945 |
-
|
1946 |
-
*
|
1947 |
-
*
|
1948 |
-
*
|
1949 |
-
*
|
1950 |
-
*
|
1951 |
-
*
|
1952 |
-
*
|
1953 |
-
*
|
1954 |
-
*
|
1955 |
-
*
|
1956 |
-
*
|
1957 |
-
*
|
1958 |
-
*
|
1959 |
-
*
|
1960 |
-
*
|
1961 |
-
*
|
1962 |
-
*
|
1963 |
-
*
|
1964 |
-
*
|
1965 |
-
*
|
1966 |
-
*
|
1967 |
-
*
|
1968 |
-
*
|
1969 |
-
*
|
1970 |
-
*
|
1971 |
-
*
|
1972 |
-
*
|
1973 |
-
*
|
1974 |
-
*
|
1975 |
-
*
|
1976 |
-
|
1977 |
-
|
1978 |
-
|
1979 |
-
|
1980 |
-
|
1981 |
-
|
1982 |
-
|
1983 |
-
|
1984 |
-
|
1985 |
-
|
1986 |
-
|
1987 |
-
|
1988 |
-
|
1989 |
-
|
1990 |
-
|
1991 |
-
|
1992 |
-
|
1993 |
-
|
1994 |
-
|
1995 |
-
|
1996 |
-
|
1997 |
-
|
1998 |
-
|
1999 |
-
|
2000 |
-
|
2001 |
-
}
|
2002 |
-
|
2003 |
-
|
2004 |
-
|
2005 |
-
|
2006 |
-
|
2007 |
-
|
2008 |
-
|
2009 |
-
|
2010 |
-
|
2011 |
-
|
2012 |
-
|
2013 |
-
|
2014 |
-
|
2015 |
-
|
2016 |
-
|
2017 |
-
|
2018 |
-
|
2019 |
-
|
2020 |
-
|
2021 |
-
|
2022 |
-
|
2023 |
-
|
2024 |
-
|
2025 |
-
|
2026 |
-
|
2027 |
-
|
2028 |
-
|
2029 |
-
|
2030 |
-
|
2031 |
-
|
2032 |
-
|
2033 |
-
|
2034 |
-
|
2035 |
-
|
2036 |
-
|
2037 |
-
|
2038 |
-
|
2039 |
-
|
2040 |
-
|
2041 |
-
|
2042 |
-
|
2043 |
-
|
2044 |
-
|
2045 |
-
|
2046 |
-
|
2047 |
-
|
2048 |
-
|
2049 |
-
|
2050 |
-
$
|
2051 |
-
|
2052 |
-
|
2053 |
-
|
2054 |
-
|
2055 |
-
|
2056 |
-
|
2057 |
-
|
2058 |
-
|
2059 |
-
|
2060 |
-
|
2061 |
-
|
2062 |
-
|
2063 |
-
|
2064 |
-
|
2065 |
-
|
2066 |
-
|
2067 |
-
|
2068 |
-
|
2069 |
-
|
2070 |
-
|
2071 |
-
|
2072 |
-
|
2073 |
-
|
2074 |
-
|
2075 |
-
|
2076 |
-
|
2077 |
-
|
2078 |
-
|
2079 |
-
|
2080 |
-
|
2081 |
-
|
2082 |
-
|
2083 |
-
|
2084 |
-
|
2085 |
-
|
2086 |
-
|
2087 |
-
|
2088 |
-
|
2089 |
-
|
2090 |
-
|
2091 |
-
|
2092 |
-
|
2093 |
-
|
2094 |
-
|
2095 |
-
|
2096 |
-
|
2097 |
-
|
2098 |
-
|
2099 |
-
|
2100 |
-
|
2101 |
-
|
2102 |
-
|
2103 |
-
|
2104 |
-
|
2105 |
-
|
2106 |
-
|
2107 |
-
|
2108 |
-
|
2109 |
-
|
2110 |
-
|
2111 |
-
|
2112 |
-
|
2113 |
-
|
2114 |
-
|
2115 |
-
|
2116 |
-
|
2117 |
-
|
2118 |
-
$
|
2119 |
-
|
2120 |
-
|
2121 |
-
|
2122 |
-
|
2123 |
-
|
2124 |
-
|
2125 |
-
|
2126 |
-
|
2127 |
-
|
2128 |
-
|
2129 |
-
|
2130 |
-
|
2131 |
-
|
2132 |
-
|
2133 |
-
|
2134 |
-
|
2135 |
-
|
2136 |
-
|
2137 |
-
|
2138 |
-
|
2139 |
-
|
2140 |
-
|
2141 |
-
|
2142 |
-
|
2143 |
-
|
2144 |
-
|
2145 |
-
|
2146 |
-
|
2147 |
-
|
2148 |
-
|
2149 |
-
|
2150 |
-
|
2151 |
-
|
2152 |
-
|
2153 |
-
|
2154 |
-
|
2155 |
-
|
2156 |
-
|
2157 |
-
|
2158 |
-
|
2159 |
-
|
2160 |
-
|
2161 |
-
|
2162 |
|