找回密码
 注册

QQ登录

只需一步,快速开始

搜索
查看: 4478|回复: 11

[脚本] 每步DDNS.5.X版本测试成功!

  [复制链接]
发表于 2011-5-5 22:06:12 | 显示全部楼层 |阅读模式

马上注册,结交更多好友,享用更多功能,让你轻松玩转社区。

您需要 登录 才可以下载或查看,没有账号?注册

×
本帖最后由 hainanmm 于 2011-5-8 11:49 编辑

每步DDNS.5.X版本测试成功!
自己改改。没想到,能用了。哈哈!!
水平小菜,搞了一个通宵!
收点小板,不要见怪!

:local ednsuser "user"
:local ednspass "password"
:local ednshost "user.meibu.com"
:local ednsinterface "adsl1"
:local members "http://main.meibu.com/ip/login.asp?"
:local status
:local status [/interface get [/interface find  name=$ednsinterface] running]
:if ($status!=false) do={
:local ednslastip [:resolve $ednshost]
:if ([ :typeof $ednslastip ] = nil ) do={ :local ednslastip "0" }
:local ednsiph [ /ip address get [/ip address find interface=$ednsinterface ] address ]
:local ednsip [:pick $ednsiph 0 [:find $ednsiph "/"]]
:local ednsstr "name=$ednshost&pwd=$ednspass&userip=$ednsip"
:if ($ednslastip != $ednsip) do={/tool fetch url=($members . $ednsstr) mode=http  dst-path=$ednshost
:delay 2
:local result [/file get $ednshost contents]
:log info ($ednshost . " " .$result)
/file remove $ednshost ;
}
}

注意修改蓝色部分![/free]
routeros
 楼主| 发表于 2011-5-5 22:11:24 | 显示全部楼层
此帖仅作者可见
routeros

使用道具 举报

发表于 2011-5-5 23:37:28 | 显示全部楼层
此帖仅作者可见
routeros

使用道具 举报

 楼主| 发表于 2011-5-5 23:41:34 | 显示全部楼层
此帖仅作者可见
routeros

使用道具 举报

发表于 2011-5-6 07:46:38 | 显示全部楼层
此帖仅作者可见
routeros

使用道具 举报

发表于 2011-5-6 08:10:23 | 显示全部楼层
此帖仅作者可见
routeros

使用道具 举报

 楼主| 发表于 2011-5-6 16:58:15 | 显示全部楼层
此帖仅作者可见
routeros

使用道具 举报

发表于 2011-5-8 11:40:14 | 显示全部楼层
此帖仅作者可见
routeros

使用道具 举报

发表于 2011-5-8 23:03:21 | 显示全部楼层
此帖仅作者可见
routeros

使用道具 举报

 楼主| 发表于 2011-5-9 00:23:48 | 显示全部楼层
此帖仅作者可见
routeros

使用道具 举报

发表于 2011-5-9 21:16:16 | 显示全部楼层
此帖仅作者可见
routeros

使用道具 举报

发表于 2011-5-9 21:26:03 | 显示全部楼层
此帖仅作者可见
routeros

使用道具 举报

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

本版积分规则

QQ|Archiver|手机版|小黑屋|软路由 ( 渝ICP备15001194号-1|渝公网安备 50011602500124号 )

GMT+8, 2024-5-3 22:41 , Processed in 0.196506 second(s), 3 queries , Gzip On, Redis On.

Powered by Discuz! X3.5 Licensed

© 2001-2023 Discuz! Team.

快速回复 返回顶部 返回列表