{"id":901,"date":"2014-08-07T12:51:18","date_gmt":"2014-08-07T12:51:18","guid":{"rendered":"http:\/\/ixyzero.com\/blog\/?p=901"},"modified":"2014-08-07T12:51:18","modified_gmt":"2014-08-07T12:51:18","slug":"%e5%a6%82%e4%bd%95%e5%ae%9e%e6%97%b6%e6%9b%b4%e6%96%b0%e4%b8%80%e4%ba%9b%e6%95%b0%e6%8d%ae%e6%96%87%e4%bb%b6%ef%bc%9f","status":"publish","type":"post","link":"https:\/\/ixyzero.com\/blog\/archives\/901.html","title":{"rendered":"\u5982\u4f55\u5b9e\u65f6\u66f4\u65b0\u4e00\u4e9b\u6570\u636e\u6587\u4ef6\uff1f"},"content":{"rendered":"<p>\u4e4b\u524d\u60f3\u8fc7\u7684\u4e00\u4e2a\u95ee\u9898\u201c\u5982\u4f55\u4fdd\u6301\u7cfb\u7edf\u4e0a\u7684\u67d0\u4e9b\u6570\u636e\u6587\u4ef6\u4e3a\u6700\u65b0\u7248\u672c\uff1f\u201d\uff0c\u5f53\u65f6\u5f00\u4e86\u4e2a\u5934\u4e4b\u540e\u5c31\u6ca1\u6709\u7ee7\u7eed\u4e0b\u53bb\uff0c\u4eca\u5929\u53c8\u56de\u60f3\u8d77\u6765\u4e86\uff0c\u7136\u540e\u53c8\u7ecf\u8fc7\u8fd9\u4e48\u591a\u5929\u7684\u4e00\u4e9b\u201c\u6697\u65f6\u95f4\u201d\u7684\u601d\u8003\uff0c\u5927\u6982\u7684\u601d\u8def\u5c31\u6709\u4e86\uff1a<\/p>\n<p>\u4e4b\u524d\u5728\u4e3aVPS\u89e3\u6790IP\u5bf9\u5e94\u7684\u5730\u7406\u4f4d\u7f6e\u65f6\uff0c\u4f7f\u7528\u4e86\u7eaf\u771f\u6570\u636e\u5e93\uff0c\u4f46\u90a3\u90fd\u5df2\u7ecf\u662f\u51e0\u4e2a\u6708\u4e4b\u524d\u7684\u95ee\u9898\u4e86\uff0c\u867d\u7136\u4e00\u76f4\u4ee5\u6765\u6548\u679c\u4ec0\u4e48\u7684\u4e5f\u8fd8\u884c\uff0c\u6ca1\u4ec0\u4e48\u5927\u95ee\u9898\uff0c\u4f46\u662f\u6709\u65f6\u5019\u5728\u67e5\u770bNginx\u7684\u65e5\u5fd7\u6587\u4ef6\u65f6\u89c9\u5f97IP\u5b9a\u4f4d\u4ec0\u4e48\u7684\u8fd8\u53ef\u4ee5\u518d\u51c6\u4e00\u4e9b\uff08\u5c24\u5176\u662f\u90a3\u4e9b\u626b\u63cf\u4ec0\u4e48\u7684\u6700\u53ef\u6076\u4e86\uff09\uff0c\u6240\u4ee5\u9700\u8981\u6709\u4e2a\u80fd\u591f\u5b9e\u65f6\u66f4\u65b0\u670d\u52a1\u5668\u4e0a\u7684qqwry.dat\u6587\u4ef6\u7684\u65b9\u6cd5\uff0c\u60f3\u4e86\u60f3\uff0c\u5982\u679c\u662f\u5728\u5168\u5929\u8fd0\u884c\u7684\u670d\u52a1\u5668\u4e0a\uff0c\u53ef\u4ee5\u901a\u8fc7\u6bcf\u9694\u4e00\u6bb5\u65f6\u95f4\uff08cron\uff09\u53bb\u8bbf\u95ee\/\u8bfb\u53d6\uff08curl\/wget\uff09\u8be5\u6587\u4ef6\u7684\u5927\u5c0f\uff08Content-Length\uff09\uff0c\u82e5\u5927\u5c0f\u53d1\u751f\u53d8\u5316\uff08if\u5224\u65ad\uff09\uff0c\u5219\u4e0b\u8f7d\u8be5\u6587\u4ef6\u5e76\u66ff\u6362\u672c\u5730\u6587\u4ef6\uff0c\u8fd9\u6837\u7684\u8bdd\u5c31\u53ef\u4ee5\u4fdd\u6301\u8be5\u6587\u4ef6\u5904\u4e8e\u6700\u65b0\u72b6\u6001\u4e86\u3002<\/p>\n<p>\u4e0e\u6b64\u5bf9\u5e94\u7684\u8fd8\u6709Exploit-db\u7684\u6570\u636e\u5e93\uff08\u7ecf\u5e38\u66f4\u65b0\uff09{ <a href=\"http:\/\/www.exploit-db.com\/archive.tar.bz2\" target=\"_blank\">http:\/\/www.exploit-db.com\/archive.tar.bz2<\/a> }\uff0c\u53ef\u4ee5\u53c2\u8003\u4e4b\u524d\u5199\u8fc7\u7684\u4e00\u7bc7\u6587\u7ae0\uff1a<a href=\"http:\/\/ixyzero.com\/blog\/archives\/318.html\" target=\"_blank\">\u5173\u4e8eExploit-DB\u6f0f\u6d1e\u5e93\u7684\u4f7f\u7528<\/a>\u3002<\/p>\n<h6>\u4e0b\u9762\u5c31\u4ee5QQwry.dat\u8fd9\u4e2a\u7eaf\u771f\u6570\u636e\u5e93\u7684\u6587\u4ef6\u66f4\u65b0\u4e3a\u4f8b\u8bf4\u4e00\u4e0b\uff1a<\/h6>\n<p><span style=\"color: #ff0000;\">1.\u83b7\u53d6qqwry.dat.zip\u6587\u4ef6\u7684\u5927\u5c0f<\/span>\uff08\u8fd4\u56de\u503c\u4e2d\u7684 Content-Length\uff09\uff1a<br \/>\n# curl -I http:\/\/www.newxing.com\/D6C47427E608\/qqwry.dat<br \/>\n\u901a\u8fc7\u547d\u4ee4\u7ec4\u5408\u83b7\u53d6\u672c\u5730qqwry.dat.zip\u6587\u4ef6\u7684\u5927\u5c0f\uff0c\u7136\u540e\u548c\u7f51\u7ad9\u4e0a\u63d0\u4f9b\u7684\u6587\u4ef6\u7684\u5927\u5c0f\u8fdb\u884c\u6bd4\u8f83\uff0c\u4ece\u800c\u5224\u65ad\u662f\u5426\u9700\u8981\u4e0b\u8f7d\u5e76\u66f4\u65b0\u3002<\/p>\n<pre class=\"lang:default decode:true\">oldSize=`ls -l qqwry.dat.zip | awk '{print $5}'`\nnewSize=`curl -s -I http:\/\/www.newxing.com\/D6C47427E608\/qqwry.dat | grep Content-Length`\nif [$oldSize != $newSize];then\t#\u8fd9\u91cc\u5176\u5b9e\u65e2\u53ef\u4ee5\u4f5c\u4e3a\u5b57\u7b26\u4e32\u6bd4\u8f83\u4e5f\u53ef\u4ee5\u4f5c\u4e3a\u6570\u5b57\u8fdb\u884c\u6bd4\u8f83{\u53ea\u8981\u4e24\u8005\u4e0d\u540c\u5373\u53ef}\n\twget -O qqwry.dat.zip http:\/\/www.newxing.com\/D6C47427E608\/qqwry.dat\n\tunzip -o qqwry.dat.zip\nfi<\/pre>\n<p>####<\/p>\n<pre class=\"lang:default decode:true \">\u6574\u6570\u53d8\u91cf\u8868\u8fbe\u5f0f\nif [ int1 -eq int2 ] #\u5982\u679cint1\u7b49\u4e8eint2\nif [ int1 -ne int2 ] #\u5982\u679c\u4e0d\u7b49\u4e8e\n\n\u5b57\u7b26\u4e32\u53d8\u91cf\u8868\u8fbe\u5f0f\nif [ $a = $b ] #\u5982\u679cstring1\u7b49\u4e8estring2{\u5b57\u7b26\u4e32\u5141\u8bb8\u4f7f\u7528\u8d4b\u503c\u53f7\u505a\u7b49\u53f7}\nif [ $a == $b ] #\u5982\u679cstring1\u7b49\u4e8estring2{\u4e5f\u5141\u8bb8\u4f7f\u7528\u53cc\u7b49\u53f7}\nif [ $string1 != $string2 ] #\u5982\u679cstring1\u4e0d\u7b49\u4e8estring2<\/pre>\n<p>####<\/p>\n<p><span style=\"color: #ff0000;\">2.\u4e0b\u8f7dqqwry.dat\u6587\u4ef6<\/span>\uff1a<br \/>\n# wget http:\/\/www.newxing.com\/D6C47427E608\/qqwry.dat<\/p>\n<p>\u8981\u6ce8\u610f\u7684\u4e00\u70b9\u5c31\u662f\u76f4\u63a5wget\u7684\u8bdd\u4e0b\u8f7d\u7684\u6587\u4ef6\u540d\u5c31\u662fqqwry.dat\uff0c\u4f46\u4f60\u7528file\u547d\u4ee4\u8fdb\u884c\u67e5\u770b\u7684\u8bdd\u5c31\u4f1a\u77e5\u9053\u8be5\u6587\u4ef6\u5176\u5b9e\u662f\u4e2azip\u683c\u5f0f\u7684\u538b\u7f29\u6587\u4ef6\uff1a<br \/>\n# <span style=\"color: #0000ff;\"><strong>file qqwry.dat<\/strong><\/span><br \/>\nqqwry.dat: Zip archive data, at least v2.0 to extract<\/p>\n<p><span style=\"color: #ff0000;\">3.\u4fee\u6539\u540e\u7f00<\/span>\uff08\u5176\u5b9e\u4e5f\u53ef\u4ee5\u4e0d\u7528\u6539\uff0c\u4f46\u4e3a\u4e86\u76f4\u89c2\u663e\u793a\u6587\u4ef6\u683c\u5f0f\uff0c\u8fd8\u662f\u5efa\u8bae\u4fee\u6539\uff09\uff1a<br \/>\n# mv qqwry.dat qqwry.dat.zip<\/p>\n<p><span style=\"color: #ff0000;\">4.unzip\u89e3\u538b<\/span>\uff1a<br \/>\n# unzip qqwry.dat.zip #\u9ed8\u8ba4\u60c5\u51b5\u4e0bunzip\u4f1a\u8be2\u95ee\u662f\u5426\u66ff\u6362\u5df2\u5b58\u5728\u7684\u6587\u4ef6\uff0c\u6240\u4ee5\u53ef\u4ee5\u5e26\u4e0a&#8221;-o&#8221;\u9009\u9879\u76f4\u63a5overwrite\u800c\u4e0d\u7ed9\u63d0\u793a\u4ee5\u514d\u811a\u672c\u6267\u884c\u4e2d\u65ad<\/p>\n<h6>\u4e5f\u53ef\u4ee5\u5728wget\u7684\u65f6\u5019\u5c31\u6539\u540d\u7136\u540e\u76f4\u63a5unzip\u5373\u53ef\uff1a<\/h6>\n<p>1.\u83b7\u53d6\u6587\u4ef6\u5927\u5c0f\uff0c\u5224\u65ad\u662f\u5426\u9700\u8981\u8fdb\u884c\u66f4\u65b0\uff1b<br \/>\n2.\u4e0b\u8f7d\u7684\u540c\u65f6\u8bbe\u7f6e\u6587\u4ef6\u540d\uff1a# wget -O qqwry.dat.zip http:\/\/www.newxing.com\/D6C47427E608\/qqwry.dat<br \/>\n3.\u89e3\u538b\uff1a# unzip qqwry.dat.zip #{\u5982\u679c\u5f53\u524d\u6587\u4ef6\u5939\u4e2d\u5df2\u5b58\u5728qqwry.dat\u5219\u9700\u8981\u6dfb\u52a0-o\u9009\u9879\u5f3a\u5236\u8986\u76d6\u5e76\u4e0d\u7ed9\u51fa\u63d0\u793a}<\/p>\n<p>PS\uff1a\u624d\u53d1\u73b0EditPlus\u539f\u6765\u6709\u4e2ahex viewer\u7684\u529f\u80fd\uff0c\u8fd8\u662f\u5f88\u4e0d\u9519\u7684{\u8981\u662f\u8fd9\u6837\u7684\u8bdd\u5c31\u53ef\u4ee5\u4e0d\u7528\u53d7\u5230WinHex\u7684\u6587\u4ef6\u5927\u5c0f\u9650\u5236\u4e86}<\/p>\n<h6>wget\u7684-o\u548c-O\u9009\u9879\u7684\u8fa8\u522b\uff1a<\/h6>\n<h6><span style=\"color: #ff0000;\"><strong>\u5373\uff0c-o\u662f\u6307\u5b9alog\u6587\u4ef6\u5b58\u653e\u7684\u540d\u79f0\u7684\uff1b-O\u662f\u6307\u5b9a\u4e0b\u8f7d\u7684\u6587\u4ef6\u5185\u5bb9\u8981\u5b58\u653e\u7684\u6587\u4ef6\u540d\u7684\u3002<\/strong><\/span><\/h6>\n<h6>curl\u7684\u9009\u9879\u590d\u4e60\uff1a<\/h6>\n<p>-I, &#8211;head Show document info only #\u4ec5\u663e\u793a\u5934\u90e8\u4fe1\u606f<br \/>\n-s, &#8211;silent Silent mode. Don&#8217;t output anything #\u9759\u9ed8\u6a21\u5f0f<\/p>\n<h6>unzip\u547d\u4ee4\u7684\u6837\u4f8b\uff1a<\/h6>\n<pre class=\"lang:default decode:true\">unzip data1.zip -x joe =&gt; \u89e3\u538bdata1.zip\u538b\u7f29\u5305\u4e2d\u9664\u4e86joe\u4e4b\u5916\u7684\u6240\u6709\u6587\u4ef6\nunzip -p foo.zip | more =&gt;\u89e3\u538bfoo.zip\u538b\u7f29\u5305\u4e2d\u7684\u5185\u5bb9\u5e76\u4f20\u7ed9\u7ba1\u9053\nunzip -fo foo.zip ReadMe =&gt; \u5982\u679c\u538b\u7f29\u5305\u4e2d\u7684ReadMe\u6587\u4ef6\u6bd4\u5916\u90e8\u7684\u8981\u65b0\u5219\u8fdb\u884c\u63d0\u53d6\u5e76\u66ff\u6362<\/pre>\n<p>#update @ 20160808<\/p>\n<p>\u6700\u8fd1\u53d1\u73b0\u6709\u4e9bIP\u7684\u4f4d\u7f6e\u89e3\u6790\u4e0d\u592a\u51c6\uff0c\u60f3\u4e86\u60f3\u5e94\u8be5\u662f\u7eaf\u771fIP\u5e93\u7684\u6570\u636e\u592a\u8001\u4e86\uff0c\u6240\u4ee5\u51b3\u5b9a\u66f4\u65b0\u4e00\u4e0b\u7eaf\u771fIP\u5e93\uff0c\u53d1\u73b0\u4e0b\u8f7d\u5730\u5740\u4e5f\u53d8\u4e86\uff0c\u6240\u4ee5\u4e0a\u9762\u7684\u5185\u5bb9\u5df2\u7ecf\u4e0d\u9002\u7528\u4e86\uff0c\u4e0d\u8fc7\u601d\u8def\u8fd8\u662f\u4e00\u6837\u7684\uff0c\u4e0b\u9762\u66f4\u65b0\u4e00\u4e0b\u73b0\u5728\u53ef\u7528\u7684\u4e0b\u8f7d\u548c\u66f4\u65b0\u65b9\u5f0f\uff1a<\/p>\n<pre class=\"lang:default decode:true \">file_name=\"QQwry.dat.$(date +%F).rar\"\nwget -O \"$file_name\" \"http:\/\/www.newxing.com\/Code\/download.asp?softid=608&amp;downid=8&amp;id=611\"\nif [ $? -eq 0 ]; then\n    calc_md5=$(md5sum \"$file_name\" | awk '{print $1}')\n    file_md5=$(curl -s \"http:\/\/www.newxing.com\/Code\/tool\/QQwry.dat_608.html\" | grep -oE 'var md5=\"\\w+\"' | awk -F\\\" '{print $2}')\n    if [ \"$calc_md5\" == \"$file_md5\" ]; then\n        echo \"OK.\"\n    fi\nfi\n\n#\u89e3\u538brar\u6587\u4ef6\u81f3\u5f53\u524d\u76ee\u5f55\nunrar e -f QQwry.dat.$(date +%F).rar    #\u5c1d\u8bd5\u66f4\u65b0\nunrar e -y QQwry.dat.$(date +%F).rar    #\u5f3a\u5236\u66f4\u65b0<\/pre>\n<p>=END=<\/p>\n","protected":false},"excerpt":{"rendered":"<p>\u4e4b\u524d\u60f3\u8fc7\u7684\u4e00\u4e2a\u95ee\u9898\u201c\u5982\u4f55\u4fdd\u6301\u7cfb\u7edf\u4e0a\u7684\u67d0\u4e9b\u6570\u636e\u6587\u4ef6\u4e3a\u6700\u65b0\u7248\u672c\uff1f\u201d\uff0c\u5f53\u65f6\u5f00\u4e86\u4e2a\u5934\u4e4b\u540e\u5c31\u6ca1\u6709\u7ee7\u7eed\u4e0b\u53bb\uff0c\u4eca\u5929\u53c8\u56de\u60f3\u8d77\u6765 [&hellip;]<\/p>\n","protected":false},"author":2,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[23,12],"tags":[84,66],"class_list":["post-901","post","type-post","status-publish","format-standard","hentry","category-knowledgebase-2","category-tools","tag-curl","tag-wget"],"views":4342,"_links":{"self":[{"href":"https:\/\/ixyzero.com\/blog\/wp-json\/wp\/v2\/posts\/901","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/ixyzero.com\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/ixyzero.com\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/ixyzero.com\/blog\/wp-json\/wp\/v2\/users\/2"}],"replies":[{"embeddable":true,"href":"https:\/\/ixyzero.com\/blog\/wp-json\/wp\/v2\/comments?post=901"}],"version-history":[{"count":0,"href":"https:\/\/ixyzero.com\/blog\/wp-json\/wp\/v2\/posts\/901\/revisions"}],"wp:attachment":[{"href":"https:\/\/ixyzero.com\/blog\/wp-json\/wp\/v2\/media?parent=901"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/ixyzero.com\/blog\/wp-json\/wp\/v2\/categories?post=901"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/ixyzero.com\/blog\/wp-json\/wp\/v2\/tags?post=901"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}