Login

Navigation

This articles is published 1040 days ago and last updated 1038 days ago, some information may be out of date.

IP資訊的最佳工具--ifconfig.co

iptool_cover.jpg

前言:

除可到網站 http://ifconfig.co/ 查看所有IP相關資訊,還可以利用這個IP資訊工具(*不需要安裝),只要透過curl命令存取就可以獲取IP的資訊。

基礎使用:

  • 獲取外網IP (Public IP)
curl ifconfig.co/
  • 獲取IP地址的國家資訊
curl ifconfig.co/country
  • 獲取IP地址的國家地區代碼
curl ifconfig.co/country-iso
  • 獲取IP地址的城市資訊
curl ifconfig.co/city
  • json文件格式顯示IP的所有資訊
curl ifconfig.co/json
  • 查看IP地址的指定Port位是否開放
curl ifconfig.co/port/8080
curl ifconfig.co/port/8080
{
"ip": "221.126.123.456",
"port": 8080,
"reachable": false
curl ifconfig.co/port/80
{
"ip": "221.126.123.456",
"port": 80,
"reachable": true

結語:

工具需小,但大大提升了執行效率。