{"id":48634,"date":"2020-03-09T12:54:25","date_gmt":"2020-03-09T04:54:25","guid":{"rendered":"http:\/\/4563.org\/?p=48634"},"modified":"2020-03-09T12:54:25","modified_gmt":"2020-03-09T04:54:25","slug":"loc%e7%ad%be%e5%88%b0%e8%84%9a%e6%9c%ac-bash-%e7%89%88","status":"publish","type":"post","link":"http:\/\/4563.org\/?p=48634","title":{"rendered":"loc\u7b7e\u5230\u811a\u672c bash \u7248"},"content":{"rendered":"\n<p>  \t\t\t\t\t<strong>A23187<\/strong>  \t\t\t\t\u5927\u4f6c\u6709\u8bdd\u8bf4 : \t<\/p>\n<h3>loc\u7b7e\u5230\u811a\u672c bash \u7248<\/h3>\n<p>  \t\t \u672c\u5e16\u6700\u540e\u7531 A23187 \u4e8e 2020-3-9 12:41 \u7f16\u8f91 <\/p>\n<p> \u770b\u5230\u6709\u4eba\u53d1\u8fc7python\u7b49\u5176\u4ed6\u7684\u7248\u672c\uff0c\u81ea\u5df1\u5728\u7528\u7684\u5c31\u4e00\u4e2a bash\uff0c\u518d\u914d\u5408 cronrtab \u5c31\u53ef\u4ee5\u81ea\u52a8\u5237\u4e86<\/p>\n<p>  #!\/bin\/bash<\/p>\n<p>  cookie=&#8217;\u8fd9\u91cc\u653e\u4f60\u7684cookie&#8217;<\/p>\n<p>  err() {<br \/>  &nbsp; &nbsp; &nbsp; &nbsp; echo $1 | mailx -s &#8216;\u3010\u9519\u8bef\u3011\u5168\u7403\u4e3b\u673a\u4ea4\u6d41\u8bba\u575b&#8217; $recipient <br \/>  }<br \/>  log() {<br \/>  &nbsp; &nbsp; &nbsp; &nbsp; # echo $1 | mailx -s &#8216;\u3010\u6210\u529f\u3011\u5168\u7403\u4e3b\u673a\u4ea4\u6d41\u8bba\u575b&#8217; $recipient<br \/>  &nbsp; &nbsp; echo $1<br \/>  }<\/p>\n<p>  # \u7b7e\u5230<br \/>  curl -s &#8216;https:\/\/www.hostloc.com\/forum.php&#8217; -H &#8216;authority: www.hostloc.com&#8217; -H &#8216;upgrade-insecure-requests: 1&#8217; -H &#8216;sec-fetch-user: ?1&#8217; <br \/>  &nbsp; &nbsp; &nbsp; &nbsp; -H &#8216;accept: text\/html,application\/xhtml+xml,application\/xml;q=0.9,image\/webp,image\/apng,*\/*;q=0.8,application\/signed-exchange;v=b3;q=0.9&#8217; <br \/>  &nbsp; &nbsp; &nbsp; &nbsp; -H &#8216;sec-fetch-site: none&#8217; -H &#8216;sec-fetch-mode: navigate&#8217; -H &#8216;accept-encoding: gzip, deflate, br&#8217; -H &#8216;accept-language: zh-CN,zh;q=0.9&#8217; <br \/>  &nbsp; &nbsp; &nbsp; &nbsp; -H &quot;$cookie&quot; &#8211;compressed &#8211;output \/dev\/null<br \/>  if [[ $? -ne 0 ]]; then<br \/>  &nbsp; &nbsp; &nbsp; &nbsp; err &#8216;\u7b7e\u5230\u5931\u8d25\uff0c\u53ef\u80fd\u9700\u8981\u66f4\u65b0 cookie&#8217;<br \/>  &nbsp; &nbsp; &nbsp; &nbsp; exit 1<br \/>  fi<br \/>  sleep 2<\/p>\n<p>  # \u8bbf\u95ee\u4ed6\u4eba\u7a7a\u95f4 10 \u6b21<br \/>  n=10<br \/>  while [[ $n -gt 0 ]]; do<br \/>  &nbsp; &nbsp; &nbsp; &nbsp; uid=$RANDOM<br \/>  &nbsp; &nbsp; &nbsp; &nbsp; if [[ ${uids} -eq 1 ]]; then<br \/>  &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; continue<br \/>  &nbsp; &nbsp; &nbsp; &nbsp; fi<br \/>  &nbsp; &nbsp; &nbsp; &nbsp; uids=1<br \/>  &nbsp; &nbsp; &nbsp; &nbsp; curl -s &quot;https:\/\/www.hostloc.com\/space-uid-$uid.html&quot; -H &#8216;authority: www.hostloc.com&#8217; -H &#8216;upgrade-insecure-requests: 1&#8217; -H &#8216;sec-fetch-user: ?1&#8217; <br \/>  &nbsp; &nbsp; &nbsp; &nbsp; -H &#8216;accept: text\/html,application\/xhtml+xml,application\/xml;q=0.9,image\/webp,image\/apng,*\/*;q=0.8,application\/signed-exchange;v=b3;q=0.9&#8217; <br \/>  &nbsp; &nbsp; &nbsp; &nbsp; -H &#8216;sec-fetch-site: none&#8217; -H &#8216;sec-fetch-mode: navigate&#8217; -H &#8216;accept-encoding: gzip, deflate, br&#8217; -H &#8216;accept-language: zh-CN,zh;q=0.9&#8217; <br \/>  &nbsp; &nbsp; &nbsp; &nbsp; -H &quot;$cookie&quot; &#8211;compressed &#8211;output \/dev\/null<br \/>  &nbsp; &nbsp; &nbsp; &nbsp; if [[ $? -eq 0 ]]; then<br \/>  &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; n=$((n-1))<br \/>  &nbsp; &nbsp; &nbsp; &nbsp; else<br \/>  &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; err &#8216;\u5237\u79ef\u5206\u5931\u8d25\uff0c\u53ef\u80fd\u9700\u8981\u66f4\u65b0 cookie&#8217;<br \/>  &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; exit 2<br \/>  &nbsp; &nbsp; &nbsp; &nbsp; fi<br \/>  &nbsp; &nbsp; &nbsp; &nbsp; sleep 2<br \/>  done<\/p>\n<p>  log &#8216;\u6210\u529f\u7b7e\u5230 + \u5237\u79ef\u5206&#8217;<br \/>  exit 0<\/p>\n<p>  \u811a\u672c\u4e3b\u8981\u662f\u5148\u767b\u5f55\u7b7e\u5230\uff0c\u7136\u540e\u968f\u673a\u8bbf\u95ee\u4ed6\u4eba\u7a7a\u95f4\uff0c\u517110\u6b21\u3002\u5931\u8d25\u65f6\u4f1a\u53d1\u90ae\u4ef6\u7ed9\u81ea\u5df1\u63d0\u793a\u8981\u66f4\u65b0 cookie<\/p>\n<p>  \u81f3\u4e8e\u7ed3\u5408 crontab\uff0c\u6211\u60f3\u4e5f\u4e0d\u7528\u6211\u591a\u8bf4\u5427\u3002\t\t\t\t<\/p>\n<p>  \t\t\t\t\t<strong>\u661f\u6708\u4e91<\/strong>  \t\t\t\t\u5927\u4f6c\u6709\u8bdd\u8bf4 : \t<\/p>\n<h3><\/h3>\n<p>  \t\t\u4e00\u5929\u591a\u5c11\u79ef\u5206\u5440\t\t\t\t<\/p>\n<p>  \t\t\t\t\t<strong>inkedus<\/strong>  \t\t\t\t\u5927\u4f6c\u6709\u8bdd\u8bf4 : \t<\/p>\n<h3><\/h3>\n<p>  \t\t\u5927\u4f6c\u725b\u903c<br \/>  &#8211;&lt; \u9082\u9005\u672c\u8eab\uff0c\u5c31\u662f\u4e00\u79cd\u5947\u8ff9\u554a\u3002\u2014\u2014\u300a\u6e38\u9b42\u300b &gt;&#8211;\t\t\t\t<\/p>\n<p>  \t\t\t\t\t<strong>\u6c11\u5de5\u4e09\u4ee3<\/strong>  \t\t\t\t\u5927\u4f6c\u6709\u8bdd\u8bf4 : \t<\/p>\n<h3><\/h3>\n<p>  \t\t \u6211\u770b\u4e0d\u61c2\uff01@\u770b\u56fe\u7eb8\u6bd4\u770b\u7740\u7b80\u5355\t\t\t\t<\/p>\n<p>  \t\t\t\t\t<strong>Mr.Bean<\/strong>  \t\t\t\t\u5927\u4f6c\u6709\u8bdd\u8bf4 : \t<\/p>\n<h3><\/h3>\n<p>  \t\t\u5728\u505a\u8bf8\u4f4d\u90fd\u662f\u79d2\u7537:lol\t\t\t\t<\/p>\n<p>  \t\t\t\t\t<strong>zdszf<\/strong>  \t\t\t\t\u5927\u4f6c\u6709\u8bdd\u8bf4 : \t<\/p>\n<h3><\/h3>\n<p>  \t\thttps:\/\/raw.githubusercontent.com\/mixool\/script\/debian-9\/hostloc_mu.sh\t\t\t\t<\/p>\n<p>  \t\t\t\t\t<strong>\u574f\u9c7c\u7092\u5e74\u7cd5<\/strong>  \t\t\t\t\u5927\u4f6c\u6709\u8bdd\u8bf4 : \t<\/p>\n<h3><\/h3>\n<p>  \t\t\u76f4\u63a5\u7528github\u7248 \u670d\u52a1\u5668\u90fd\u4e0d\u8981\t\t\t\t<\/p>\n<p>  \t\t\t\t\t<strong>bot<\/strong>  \t\t\t\t\u5927\u4f6c\u6709\u8bdd\u8bf4 : \t<\/p>\n<h3><\/h3>\n<p>  \t\t\u5404\u7248\u672c\u7b7e\u5230\u4e92\u76f8pk\t\t\t\t<\/p>\n<p>  \t\t\t\t\t<strong>Init<\/strong>  \t\t\t\t\u5927\u4f6c\u6709\u8bdd\u8bf4 : \t<\/p>\n<h3><\/h3>\n<p>  \t\t\u9876\u5927\u4f6c\uff01\t\t\t\t<\/p>\n<p>  \t\t\t\t\t<strong>lpssxs<\/strong>  \t\t\t\t\u5927\u4f6c\u6709\u8bdd\u8bf4 : \t<\/p>\n<h3><\/h3>\n<p>  \t\t\u574f\u9c7c\u7092\u5e74\u7cd5 \u5927\u4f6c\u6709\u8bdd\u8bf4 : 2020-3-9 12:51<br \/>  \u76f4\u63a5\u7528github\u7248 \u670d\u52a1\u5668\u90fd\u4e0d\u8981<\/p>\n<p> \u5927\u4f6c\u7ed9\u4e2a\u94fe\u63a5~\t\t\t  <\/p>\n","protected":false},"excerpt":{"rendered":"<p>A23187 \u5927\u4f6c\u6709\u8bdd\u8bf4 : lo&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\/48634"}],"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=48634"}],"version-history":[{"count":0,"href":"http:\/\/4563.org\/index.php?rest_route=\/wp\/v2\/posts\/48634\/revisions"}],"wp:attachment":[{"href":"http:\/\/4563.org\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=48634"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"http:\/\/4563.org\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=48634"},{"taxonomy":"post_tag","embeddable":true,"href":"http:\/\/4563.org\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=48634"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}