懒人精灵获取外网ip

[复制链接]
查看2563 | 回复8 | 2022-4-8 12:22:51 | 显示全部楼层 |阅读模式
local res, code = httpGet("https://www.882667.com/");--如果此网址无反应,请尝试替换其他网址
if code == 200 then
        local i,j = string.find(res, "%d+%.%d+%.%d+%.%d+")
        local ipaddr =string.sub(res,i,j)
        print(ipaddr)
        ip=ipaddr
end

回复

使用道具 举报

lcbnore | 2022-4-12 00:03:34 | 显示全部楼层
感谢分享
回复

使用道具 举报

1534245922 | 2022-4-13 09:40:56 | 显示全部楼层
6666666666666666
回复

使用道具 举报

lyxqge | 2022-4-16 00:40:03 | 显示全部楼层
路过飘过不放过
回复

使用道具 举报

yuan71058 | 2022-5-23 06:19:52 | 显示全部楼层
感谢楼主分享
回复

使用道具 举报

allyn | 2022-5-27 14:24:54 | 显示全部楼层
不错不错
回复

使用道具 举报

woshisheiwo4 | 2022-7-1 18:30:20 | 显示全部楼层

只好不得已灌水
回复

使用道具 举报

firhb | 2022-7-11 15:12:15 | 显示全部楼层
回复

使用道具 举报

bjsgsswg | 2024-8-25 15:13:42 | 显示全部楼层
不用这么麻烦吧
exec('ifconfig')
回复

使用道具 举报

您需要登录后才可以回帖 登录 | 立即注册

本版积分规则

3

主题

43

帖子

3454

积分

论坛元老

Rank: 8Rank: 8

积分
3454