{"id":1468,"date":"2008-11-01T16:00:00","date_gmt":"2008-11-01T08:00:00","guid":{"rendered":"http:\/\/www.liuwenhao.me\/?p=1468"},"modified":"2021-06-16T02:57:00","modified_gmt":"2021-06-15T18:57:00","slug":"ip%e5%9c%b0%e5%9d%80%e6%9f%a5%e7%9c%8b%e5%99%a8-%e6%88%91%e6%9c%89%e5%8f%b2%e4%bb%a5%e6%9d%a5%e5%81%9a%e5%be%97%e6%9c%80%e5%bf%ab%e3%80%81%e5%81%9a%e5%be%97%e6%9c%80%e9%b9%be%e7%9a%84%e4%b8%80","status":"publish","type":"post","link":"https:\/\/www.liuwenhao.me\/?p=1468","title":{"rendered":"\u3010\u8fc1\u79fb\u81ea\u4eba\u4eba\u7f51\u3011IP\u5730\u5740\u67e5\u770b\u5668-\u6211\u6709\u53f2\u4ee5\u6765\u505a\u5f97\u6700\u5feb\u3001\u505a\u5f97\u6700\u9e7e\u7684\u4e00\u4e2a\u8f6f\u4ef6"},"content":{"rendered":"<p>&nbsp;&nbsp; IP\u5730\u5740\u67e5\u770b\u5668\uff0c\u6709\u53f2\u4ee5\u6765\u7528\u65f6\u6700\u77ed\u4e00\u4e2a\u8f6f\u4ef6\u3002<\/p>\n<p>&nbsp;&nbsp; \u751a\u81f3\u53ef\u4ee5\u8fd9\u4e48\u8bf4\uff0c\u6709\u53ef\u80fd\u6bd4\u6211\u5f53\u5e74\u5199hello\uff0cworld \u7684\u7a0b\u5e8f\u82b1\u7684\u65f6\u95f4\u8fd8\u5c11\u3002\u3002\u3002\u771f\u7684\uff0c\u6240\u4ee5\u6ca1\u6709\u591a\u5c11\u6280\u672f\u542b\u91cf\u3002\u5c31\u662f\u4e3a\u4e86\u65b9\u4fbf\u4e00\u4e0b\u5927\u5bb6\u7684\u4f7f\u7528\u3002\u3002\u3002<\/p>\n<p>&nbsp; \u5176\u5b9e\u6ca1\u6709\u4ec0\u4e48\u6280\u672f\u542b\u91cf\uff0c\u66f4\u51c6\u786e\u7684\u8bf4\u8fd9\u4e2a\u5e94\u8be5\u662f\u53eb\u505aIP\u5730\u5740\u67e5\u8be2\u5668\u3002\u3002\u3002\u5c31\u662f\u67e5\u627e\u73b0\u6709\u7684IP\u5730\u5740\u5c31\u662f\u4e86\u3002\u3002\u3002\u3002\u77e5\u9053\u8fd9\u4e2a\u7a0b\u5e8f\u7684\u539f\u7406\u4e4b\u540e\u80af\u5b9a\u4f1a\u8ba9\u6240\u6709\u7684\u4eba\u5927\u5931\u6240\u671b\u7684\uff0c\u63d0\u524d\u8bf4\u58f0\u62b1\u6b49\u4e86\u5475\u5475\u3002<\/p>\n<p>\u4e0b\u8f7d\u5730\u5740\uff1a<\/p>\n<p>http:\/\/sti.hust.edu.cn\/uploadfile\/qsb\/iplookup.exe<\/p>\n<p>\u4f7f\u7528\u4e0a\u6ca1\u6709\u4ec0\u4e48\u8981\u6c42\uff0c\u5c31\u662f\u76f4\u63a5\u53cc\u51fb\u5c31\u53ef\u4ee5\u8bd5\u7528\u4e86\u3002\u3002\u3002<\/p>\n<p>&nbsp;&nbsp; \u6b22\u8fce\u5927\u5bb6\u6311\u9aa8\u5934\u2026\u2026<\/p>\n<p>&nbsp;&nbsp; \u6b22\u8fce\u4ea4\u6d41\u3002\u3002\u3002\u3002\u3002<\/p>\n<p>&nbsp; \u4e0b\u9762\u662f\u6211\u7684\u6e90\u4ee3\u7801\uff1a<\/p>\n<p>#include&lt;stdio.h&gt;<br \/>\n#include&lt;dos.h&gt;<br \/>\n#include&lt;io.h&gt;<br \/>\n#include&lt;string.h&gt;<br \/>\n#include&lt;math.h&gt;<br \/>\n#include &lt;dos.h&gt;<br \/>\n#include &lt;io.h&gt;<br \/>\n#include &lt;stdlib.h&gt;<br \/>\n#include&lt;stdio.h&gt;<br \/>\n#include&lt;string.h&gt;<br \/>\n#include&lt;math.h&gt;<br \/>\n#include&lt;time.h&gt;<br \/>\n#include&lt;ctype.h&gt;<br \/>\nvoid display(void);<br \/>\nint maxline;<br \/>\nchar xx[1000][251];<br \/>\nvoid main()<br \/>\n{<br \/>\nint i;<br \/>\nchar aa[100],bb[300];<br \/>\nwhile(1)<br \/>\n{<br \/>\nsystem(&#8220;color f0&#8221;);<br \/>\nsystem(&#8220;title \u6b22\u8fce\u8fdb\u5165IP\u5730\u5740\u67e5\u8be2\u7cfb\u7edf&#8221;);<\/p>\n<p>display();<br \/>\nprintf(&#8220;\u672c\u7cfb\u7edf\u641c\u522e\u4e8640\u4f59\u4e07\u6761\u5168\u7403\u8303\u56f4\u5185\u7684IP\u8bb0\u5f55\\n\u8bf7\u8f93\u5165\u60a8\u8981\u67e5\u8be2\u7684IP\u5730\u5740\u6216\u8005\u7269\u7406\u5730\u5740\uff1a\\n&#8221;);<br \/>\ngets(aa);<br \/>\ndisplay();<br \/>\nprintf(&#8220;\u6b63\u5728\u67e5\u8be2\uff0c\u8bf7\u7b49\u5f85\u5927\u7ea610\u79d2&#8221;);<br \/>\nsprintf(bb,&#8221;find \\&#8221;%s\\&#8221; D:\\\\ipdata\\\\data\\\\ipdata.dat&gt;D:\\\\ipdata\\\\data\\\\nowdat.dat&#8221;,aa);<br \/>\nsystem(bb);<br \/>\ndisplay();<br \/>\nif (dakaidat())<br \/>\n{<br \/>\n&nbsp; display();<br \/>\n&nbsp; printf(&#8220;\u8bfb\u53d6\u6587\u4ef6\u6545\u969c!&#8221;);<br \/>\n}<br \/>\nfor (i=2;i&lt;maxline;i++)<br \/>\n{<br \/>\n&nbsp; puts(xx[i]);<\/p>\n<p>}<br \/>\nprintf(&#8220;\u8bf7\u6309\u4efb\u610f\u952e\u8fd4\u56de\uff0c&#8221;);<br \/>\nsystem(&#8220;pause&#8221;);<br \/>\n}<\/p>\n<p>}<br \/>\nvoid display()<br \/>\n{<br \/>\nsystem(&#8220;cls&#8221;);<br \/>\nprintf(&#8220;\\n\\t\\t********\u6b22\u8fce\u8fdb\u5165IP\u5730\u5740\u67e5\u8be2\u7cfb\u7edf**********\\n\\n\\n&#8221;);<br \/>\n}<\/p>\n<p>int dakaidat()\/*\u672c\u7a0b\u5e8f\u7684\u76ee\u7684\u662f\u628a\u6b63\u786e\u7684\u7b54\u6848\u5b58\u5230\u6570\u7ec4xx\u91cc\u9762*\/<br \/>\n{<br \/>\nFILE *fp;<br \/>\n&nbsp;&nbsp;&nbsp; int i=0;<br \/>\n&nbsp;&nbsp;&nbsp; char *p;<br \/>\n&nbsp;&nbsp;&nbsp; if((fp=fopen(&#8220;D:\\\\ipdata\\\\data\\\\nowdat.dat&#8221;,&#8221;r&#8221;))==NULL) return 1;<br \/>\n&nbsp;&nbsp;&nbsp; while(fgets(xx[i],250,fp)!=NULL)<br \/>\n&nbsp;&nbsp;&nbsp; {<br \/>\n&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; p=strchr(xx[i],&#8217;\\n&#8217;);<br \/>\n&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; if(p)*p=0;<br \/>\n&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; i++;<br \/>\n&nbsp;&nbsp;&nbsp; }<br \/>\n&nbsp;&nbsp;&nbsp; maxline=i;<br \/>\n&nbsp;&nbsp;&nbsp; fclose(fp);<br \/>\nreturn 0;<br \/>\n}<\/p>\n<p>\u56e0\u4e3a\u6700\u8fd1\u6709\u70b9\u5fd9\uff0c\u6240\u4ee5\u6ca1\u6709\u65f6\u95f4\u5355\u72ec\u7684\u7406\u987a\u90a3\u4e00\u5806\u5934\u6587\u4ef6\u4e86\uff0c\u76f4\u63a5\u628a\u6240\u6709\u53ef\u80fd\u7528\u4e0a\u7684\u5934\u6587\u4ef6\u76f4\u63a5\u7c98\u8d34\u8fc7\u6765\u4e86\uff0c\u5927\u5bb6\u7406\u89e3\u4e00\u4e0b\u5475\u5475\u3002\u3002\u3002\u3002\u3002<\/p>\n<p>&nbsp; \u82b1\u7684\u65f6\u95f4\u5f88\u5c11\u4e5f\u5c31\u662f\u610f\u5473\u7740\u8fd9\u4e2a\u8f6f\u4ef6\u5f88\u9e7e\u3002\u3002\u3002\u3002\u5927\u7ea6\u4e00\u5171\u82b1\u4e86\u5927\u7ea610\u5206\u949f\u7684\u65f6\u95f4\u5427\u3002\u3002\u5176\u4e2d\u7684\u4e00\u6bb5\u4ee3\u7801\u8fd8\u662f\u4ece\u6211\u505a\u7684\u4e0a\u4e00\u4e2a\u7a0b\u5e8f\u201c\u751f\u5b58\u6311\u6218\u8d5b\u7b54\u9898\u7cfb\u7edf\u201d\u4e2d\u7c98\u8d34\u8fc7\u6765\u7684\u3002\u3002\u3002\u3002\u6240\u4ee5\u65f6\u95f4\u6ca1\u6709\u82b1\u8d39\u591a\u5c11\u3002\u3002\u3002<\/p>\n<p>&nbsp;&nbsp; \u8fd8\u662f\u90a3\u53e5\u8bdd\uff0c\u6b22\u8fce\u591a\u591a\u4ea4\u6d41\u5566\u3002<\/p>\n","protected":false},"excerpt":{"rendered":"<p>&nbsp;&nbsp; IP\u5730\u5740\u67e5\u770b\u5668\uff0c\u6709\u53f2\u4ee5\u6765\u7528\u65f6\u6700\u77ed\u4e00\u4e2a\u8f6f\u4ef6\u3002 &nbsp;&nbsp; \u751a\u81f3\u53ef\u4ee5\u8fd9\u4e48\u8bf4\uff0c\u6709\u53ef\u80fd\u6bd4\u6211\u5f53\u5e74\u5199hello\uff0cworld \u7684\u7a0b\u5e8f\u82b1\u7684\u65f6\u95f4\u8fd8\u5c11\u3002\u3002\u3002\u771f\u7684\uff0c\u6240\u4ee5\u6ca1\u6709\u591a\u5c11\u6280\u672f\u542b\u91cf\u3002\u5c31\u662f\u4e3a\u4e86\u65b9\u4fbf\u4e00\u4e0b\u5927\u5bb6\u7684\u4f7f\u7528\u3002\u3002\u3002 &nbsp; \u5176\u5b9e\u6ca1\u6709\u4ec0\u4e48\u6280\u672f\u542b\u91cf\uff0c\u66f4\u51c6\u786e\u7684\u8bf4\u8fd9\u4e2a\u5e94\u8be5\u662f\u53eb\u505aI&#46;&#46;&#46;<\/p>\n","protected":false},"author":1,"featured_media":-1468,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":[],"categories":[2],"tags":[],"views":583,"_links":{"self":[{"href":"https:\/\/www.liuwenhao.me\/index.php?rest_route=\/wp\/v2\/posts\/1468"}],"collection":[{"href":"https:\/\/www.liuwenhao.me\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.liuwenhao.me\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.liuwenhao.me\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.liuwenhao.me\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=1468"}],"version-history":[{"count":2,"href":"https:\/\/www.liuwenhao.me\/index.php?rest_route=\/wp\/v2\/posts\/1468\/revisions"}],"predecessor-version":[{"id":5047,"href":"https:\/\/www.liuwenhao.me\/index.php?rest_route=\/wp\/v2\/posts\/1468\/revisions\/5047"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/www.liuwenhao.me\/index.php?rest_route=\/"}],"wp:attachment":[{"href":"https:\/\/www.liuwenhao.me\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=1468"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.liuwenhao.me\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=1468"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.liuwenhao.me\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=1468"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}