本帖最后由 pcl_test 于 2015-5-20 19:06 编辑
vbs- Set fso = CreateObject("Scripting.FileSystemObject")
- Set file = fso.OpenTextFile("./测试.conf", 8, True)
- url =InputBox("请输入域名网址(多个以英文逗号,分隔)")
- If url = "" Then
- WScript.quit
- End If
- Set re = New RegExp
- '包括了常见的国际顶级域名,没有的自行在下面一行代码添加
- domains = "com|net|org|gov|edu|info|mobi"
- re.Pattern = "[\w\-]+?\.(" & domains & ")(\.[a-z]{2})?"
- re.IgnoreCase = True
- re.Global = True
- arr = split(url,",")
- For i=0 to ubound(arr)
- Set matches = re.Execute(arr(i))
- s=""
- For Each match in matches
- s=s&match
- Next
- file.Write "server=/"&s&"/114.114.114.114"&Chr(10)&"ipset=/"&s&"/ss"&Chr(10)
- Next
- file.Close
复制代码
|