{"id":25430,"date":"2020-02-15T21:40:34","date_gmt":"2020-02-15T13:40:34","guid":{"rendered":"http:\/\/4563.org\/?p=25430"},"modified":"2020-02-15T21:40:34","modified_gmt":"2020-02-15T13:40:34","slug":"%e6%b2%a1%e6%9c%89%e6%83%b3%e8%a6%81%e7%9a%84%e8%84%9a%e6%9c%ac%ef%bc%8c%e6%89%8b%e6%92%95%e4%ba%86%e4%b8%80%e4%b8%aa","status":"publish","type":"post","link":"http:\/\/4563.org\/?p=25430","title":{"rendered":"\u6ca1\u6709\u60f3\u8981\u7684\u811a\u672c\uff0c\u624b\u6495\u4e86\u4e00\u4e2a"},"content":{"rendered":"\n<p>  \t\t\t\t\t<strong>ywly<\/strong>  \t\t\t\t\u5927\u4f6c\u6709\u8bdd\u8bf4 : 2&nbsp;\u5206\u949f\u524d\t<\/p>\n<h3>\u6ca1\u6709\u60f3\u8981\u7684\u811a\u672c\uff0c\u624b\u6495\u4e86\u4e00\u4e2a<\/h3>\n<p>  \t\t\u4e0a\u5348\u8bf4\u60f3\u8981\u4e00\u4e2a\u68c0\u6d4b\u516c\u7f51\u63a8\u9001tg\u7684\u811a\u672c\uff0c\u4e00\u76f4\u6ca1\u627e\u5230\uff0c\u770b\u5230mjj\u63a8\u8350\u7684\u5927\u4f6c\u811a\u672c\u51b3\u5b9a\u81ea\u5df1\u624b\u6495<br \/>  \u672c\u4ebashell\u811a\u672c\u5c0f\u767d\uff0c\u4eca\u5929\u662f\u7b2c\u4e00\u6b21\u4e86\u89e3shell\uff0c\u5199\u7684\u4e0d\u597d\u8bf7\u52ff\u55b7\uff0c\u5982\u6709\u9519\u8bef\u865a\u5fc3\u63a5\u53d7\u6307\u70b9<br \/>  \u6b64\u811a\u672c\u901a\u8fc7\u4e24\u4e2a\u811a\u672c\u6539\u7684\uff0c\u518d\u6b21\u611f\u8c22https:\/\/www.hostloc.com\/thread-591273-1-1.html\u548chttps:\/\/raw.githubusercontent.com\/yulewang\/cloudflare-api-v4-ddns\/master\/cf-v4-ddns.sh<br \/>  \u6b64\u811a\u672c\u52a1\u5fc5\u88c5curl\u548cPython\uff0c\u4ee3\u7801\u4e2d\u6240\u6709xxxxx\u5168\u90e8\u6539\u6210\u81ea\u5df1\u7684<br \/>  set -o errexit<br \/>  set -o nounset<br \/>  set -o pipefail<\/p>\n<p>  VPS_NAME=xxxxxx<\/p>\n<p>  tg_bot_api=&quot;xxxxxx&quot;<br \/>  tg_chat_id=&quot;xxxxxx&quot;<\/p>\n<p>  WANIPSITE=&quot;http:\/\/icanhazip.com&quot;<br \/>  WANIPFILE=$HOME\/ip_$VPS_NAME.txt<br \/>  WAN_IP=`curl -s ${WANIPSITE}`<\/p>\n<p>  maketext(){<br \/>  &nbsp; &nbsp; &nbsp; &nbsp; time=$(date &quot;+%Y-%m-%d-%H:%M:%S&quot;)<br \/>  &nbsp; &nbsp; &nbsp; &nbsp; msg_templete=&quot;***\u68c0\u6d4b\u65f6\u95f4-${time}***<br \/>  `\u65b0\u7684ip\uff1a`<br \/>  $WAN_IP&quot;<br \/>  }<\/p>\n<p>  teleGram_push(){<br \/>  &nbsp; &nbsp; text=$(echo &quot;${msg_templete}&quot;|python -c &#8216;import sys;import urllib; print(urllib.quote_plus(sys.stdin.read()))&#8217;)<br \/>  &nbsp; &nbsp; curl -s &#8211;connect-timeout 5 &#8211;retry 2 &#8211;request GET &#8211;url &#8216;https:\/\/api.telegram.org\/bot&#8217;${tg_bot_api}&#8217;\/sendMessage?chat_id=&#8217;${tg_chat_id}&#8217;&amp;text=&#8217;${text}&#8217;&amp;parse_mode=markdown&#8217;<br \/>  &nbsp; &nbsp; <br \/>  }<\/p>\n<p>  if [ -f &quot;$WANIPFILE&quot; ]; then<br \/>  OLD_IP=`cat $WANIPFILE`<\/p>\n<p>  &nbsp; &nbsp; &nbsp; &nbsp; if [ &quot;$WAN_IP&quot; = &quot;$OLD_IP&quot; ]; then<br \/>  &nbsp; &nbsp; &nbsp; &nbsp; time=$(date &quot;+%Y-%m-%d-%H:%M:%S&quot;)<br \/>  &nbsp; &nbsp; &nbsp; &nbsp; echo &quot;${time} : WAN IP Unchanged&quot;<br \/>  &nbsp; &nbsp; &nbsp; &nbsp; exit 0<br \/>  &nbsp; &nbsp; &nbsp; &nbsp; else<br \/>  &nbsp; &nbsp; &nbsp; &nbsp; rm -rf $WANIPFILE<br \/>  &nbsp; &nbsp; &nbsp; &nbsp; echo &quot;${WAN_IP}&quot; &gt; $WANIPFILE<br \/>  &nbsp; &nbsp; &nbsp; &nbsp; maketext<br \/>  &nbsp; &nbsp; &nbsp; &nbsp; teleGram_push<br \/>  &nbsp; &nbsp; &nbsp; &nbsp; fi<br \/>  &nbsp; &nbsp; &nbsp; &nbsp; <br \/>  &nbsp; &nbsp; &nbsp; &nbsp; else<br \/>  &nbsp; &nbsp; &nbsp; &nbsp; echo &quot;${WAN_IP}&quot; &gt; $WANIPFILE<br \/>  &nbsp; &nbsp; &nbsp; &nbsp; maketext<br \/>  &nbsp; &nbsp; &nbsp; &nbsp; teleGram_push<br \/>  fi\t\t\t  <\/p>\n","protected":false},"excerpt":{"rendered":"<p>ywly \u5927\u4f6c\u6709\u8bdd\u8bf4 : 2&#038;nb&hellip;<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":[],"categories":[],"tags":[],"_links":{"self":[{"href":"http:\/\/4563.org\/index.php?rest_route=\/wp\/v2\/posts\/25430"}],"collection":[{"href":"http:\/\/4563.org\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"http:\/\/4563.org\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"http:\/\/4563.org\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"http:\/\/4563.org\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=25430"}],"version-history":[{"count":0,"href":"http:\/\/4563.org\/index.php?rest_route=\/wp\/v2\/posts\/25430\/revisions"}],"wp:attachment":[{"href":"http:\/\/4563.org\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=25430"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"http:\/\/4563.org\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=25430"},{"taxonomy":"post_tag","embeddable":true,"href":"http:\/\/4563.org\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=25430"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}