详解几种Linux查询外网出口IP命令的方法

阅读: 评论:0

机器人移动底盘详解⼏种Linux查询外⽹出⼝IP命令的⽅法Curl 纯⽂本格式输出:
curl icanhazip
curl curlmyip
curl ip.appspot
curl ipinfo.io/ip
curl ipecho/plain
ackip/i
curl JSON格式输出:
curl ipinfo.io//all.ackip/ip?json
陶瓷运输curl XML格式输出:
/l
curl 得到所有IP细节(挖掘机)
/all屋顶融雪装置
虹吸式咖啡壶
使⽤ DYDNS (当你使⽤ DYDNS 服务时有⽤)
rc延时电路图curl -s '' | sed 's/.*Current IP Address: \([0-9\.]*\).*/\1/g'
vb连接sql数据库curl -s / | grep -o "[[:digit:].]\+"
使⽤ Wget 代替 Curl
wget ipecho/plain -O - -q ; echo
wget observebox/ip -O - -q ; echo
使⽤ host 和 dig 命令
如果有的话,你也可以直接使⽤ host 和 dig 命令。
host -t a dartsclink | sed 's/.*has address //'
dig +short myip.opendns @resolver1.opendns
bash 脚本⽰例:
#!/bin/bash
PUBLIC_IP=`wget ipecho/plain -O - -q ; echo`
echo $PUBLIC_IP
以上就是本⽂的全部内容,希望对⼤家的学习有所帮助,也希望⼤家多多⽀持。

本文发布于:2023-06-30 18:07:30,感谢您对本站的认可!

本文链接:https://patent.en369.cn/patent/2/158691.html

版权声明:本站内容均来自互联网,仅供演示用,请勿用于商业和其他非法用途。如果侵犯了您的权益请与我们联系,我们将在24小时内删除。

标签:细节   格式   底盘   希望   有所
留言与评论(共有 0 条评论)
   
验证码:
Copyright ©2019-2022 Comsenz Inc.Powered by © 369专利查询检索平台 豫ICP备2021025688号-20 网站地图