有GPT4.0的 18CM帮个忙?

查看 35|回复 0
作者:jazzdon   
有没有18Cm 有GPT4啊?帮忙叫他写一个一个routeros dnspod  ddns脚本行不行
下面这个脚本能更新IPV4但获取不了IPV6,找GPT4.0帮忙问问?
:local pppoe "pppoe-out1"
:local token "123456,gkdfkfgkdkdkfj"
:local domain "551.xyz"
:local subdomains {"ros"}
:local ipadd [/ip address get [/ip address find interface=$pppoe] address]
:set ipadd [:pick $ipadd 0 ([len $ipadd] -3)]
:local dname
:local record
:local recordid
:local recordip
:foreach i in=$subdomains do={
:set record [/tool fetch url="https://dnsapi.cn/Record.List" http-data="login_token=$token&format=json&domain=$domain&sub_domain=$i&record_type=A" as-value output=user]
:set record ($record->"data")
:set record [:pick $record [:find $record ""records":"] [:len $record]]
:set recordid [:pick $record ([:find $record ""id":""]+6) [:find $record "","ttl"]]
:set recordip [:pick $record ([:find $record ""value":""]+9) [:find $record "","en"]]
:if ($recordip!=$ipadd) do={
:set record [/tool fetch url="https://dnsapi.cn/Record.Ddns" http-data="login_token=$token&format=json&domain=$domain&sub_domain=$i&record_id=$recordid&record_line_id=0&value=$ipadd" as-value output=user]
:log info ("[$i.$domain]成功更新IP为ipadd")
} else={
:log info ("[$i.$domain]无需更新IP")
}
}

脚本, 他写, 无需

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

返回顶部