{"id":362,"date":"2014-07-03T12:58:48","date_gmt":"2014-07-03T12:58:48","guid":{"rendered":"http:\/\/ixyzero.com\/blog\/?p=362"},"modified":"2014-07-03T12:58:48","modified_gmt":"2014-07-03T12:58:48","slug":"%e8%bd%ac%e5%88%a9%e7%94%a8bing%e8%bf%9b%e8%a1%8c%e7%9a%84c%e6%ae%b5%e6%97%81%e7%ab%99%e6%9f%a5%e8%af%a2%e8%84%9a%e6%9c%ac","status":"publish","type":"post","link":"https:\/\/ixyzero.com\/blog\/archives\/362.html","title":{"rendered":"[collect]\u5229\u7528Bing\u8fdb\u884c\u7684C\u6bb5\/\u65c1\u7ad9\u67e5\u8be2\u811a\u672c"},"content":{"rendered":"<p>\u4ee3\u7801\u5982\u4e0b\uff1a<\/p>\n<pre class=\"lang:php decode:true  \">&lt;?php\nprint_r(\n\"\n+------------------------------------+\n\u65c1\u7ad9 and C\u6bb5\u67e5\u8be2\nBy :Sunshie\nBlog:http:\/\/phpinfo.me\/\nExample:\nphp.exe $argv[0] -p ip\u5730\u5740(\u67e5\u8be2\u65c1\u7ad9)\nphp.exe $argv[0] -c ip\u5730\u5740(\u67e5\u8be2C\u6bb5)\n\u7ed3\u679c\u4fdd\u5b58\u5728ok.txt\u91cc\u9762\uff01\n+------------------------------------+\nrnrnrn\"\n);\nif(empty($argv[2])) exit(\"ip\u5730\u5740\u5462\");\n$ip=gethostbyname($argv[2]);\nswitch($argv[1]){\ncase \"-p\":\n\tbing($ip);\n\tbreak;\ncase \"-c\":\n\tc($ip);\n\tbreak;\ndefault:\n\techo \"\u9519\u8bef\uff1a[ -p ip]\u5730\u5740\u4e3a\u67e5\u8be2\u65c1\u7ad9\uff0c[-c ip]\u5730\u5740\u4e3a\u67e5\u8be2C\u6bb5\";\n}\nfunction c($sb){\n\t$str=(explode(\".\",$sb));\n\tfor($vip=1;$vip&lt;=255;$vip++){\n\t\t$ip_range=$str[0].\".\".$str[1].\".\".$str[2].\".\".$vip;\n\t\techo \"\u6b63\u5728\u67e5\u8be2$ip_range-------------rn\";\n\t\tbing($ip_range);\n\t}\n}\n$file=file(\"ok.txt\");\necho \"rnok.txt\u67e5\u8be2\u5230\".count($file).\"\u4e2a\";\nfunction bing($ip){\n\t$first=1;\n\tdo {\n\t\tini_set('user_agent', 'Baiduspider');\n\t\t$a=file_get_contents(\"http:\/\/www.bing.com\/search?count=50&amp;q=ip%3a$ip&amp;qs=n&amp;pq=ip%3a$ip&amp;sc=0-0&amp;sp=-1&amp;sk=&amp;first=\".$first.\"&amp;FORM=PQRE\");\n\t\t$a=mb_convert_encoding($a, \"GBK\", \"UTF-8\");\n\t\t$first+=50;\n\t\tpreg_match_all(\"\/&lt;h3&gt;&lt;a href=\"(.*)&lt;\/a&gt;&lt;\/h3&gt;\/isU\",$a,$arr);\n\t\tpreg_match_all(\"\/&lt;h3&gt;&lt;a href=\"(.*)\" target=\"_blank\/isU\",$a,$urlarr);\n\t\t$arr[1] = preg_replace('\/\" target=\"_blank\"(.*).1\"&gt;\/isU','-----------',$arr[1]);\n\t\tunset($arr[0]);\n\t\tforeach ($arr as $key=&gt;$r){\n\t\t\tforeach ($r as $k=&gt;$rc){\n\t\t\t\t\/\/$ab=mb_convert_encoding($rc, \"GBK\", \"UTF-8\");\n\t\t\t\t\/\/echo \"$rcrn\";\n\t\t\t\t\/\/file_put_contents(\"ok.txt\", $rc.\"rn\",FILE_APPEND);\n\t\t\t\t\/\/echo $first.\"n\";\n\t\t\t\t$arrs = parse_url($rc);\n\t\t\t\techo $arrs['host'].\"rn\";\n\t\t\t\tfile_put_contents(\"ok.txt\", $arrs['host'].\"rn\",FILE_APPEND);\n\t\t\t}\n\t\t}\n\t} while (strpos($a,\"&gt;\u4e0b\u4e00\u9875&lt;\/a&gt;&lt;\/li&gt;&lt;\/ul&gt;&lt;\/div&gt;\"));\n}\n?&gt;<\/pre>\n<p>\u4f7f\u7528\u6548\u679c\u8fd8\u662f\u4e0d\u9519\u7684~<\/p>\n<p><strong>\u539f\u6587\u5730\u5740<\/strong>\uff1a<a href=\"http:\/\/phpinfo.me\/\" target=\"_blank\">http:\/\/phpinfo.me\/<\/a><\/p>\n","protected":false},"excerpt":{"rendered":"<p>\u4ee3\u7801\u5982\u4e0b\uff1a &lt;?php print_r( &#8221; +&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;- [&hellip;]<\/p>\n","protected":false},"author":2,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[7,25,12],"tags":[176,48,105],"class_list":["post-362","post","type-post","status-publish","format-standard","hentry","category-programing","category-security","category-tools","tag-gethostbyname","tag-php","tag-preg_match_all"],"views":2896,"_links":{"self":[{"href":"https:\/\/ixyzero.com\/blog\/wp-json\/wp\/v2\/posts\/362","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=362"}],"version-history":[{"count":0,"href":"https:\/\/ixyzero.com\/blog\/wp-json\/wp\/v2\/posts\/362\/revisions"}],"wp:attachment":[{"href":"https:\/\/ixyzero.com\/blog\/wp-json\/wp\/v2\/media?parent=362"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/ixyzero.com\/blog\/wp-json\/wp\/v2\/categories?post=362"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/ixyzero.com\/blog\/wp-json\/wp\/v2\/tags?post=362"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}