本帖最后由 bailong360 于 2016-3-27 19:19 编辑
天涯VPN试用源- 1>1/* :
- ::本代码仅作交流学习之用,下载之后请于24小时之内删除,严禁用于其他用途!
- ::对使用本代码造成的任何后果,作者概不负责
- @echo off
- title 按Q退出连接
- mode con: lines=2 cols=25
- echo 连接中...
- for /f %%i in ('cscript -nologo -e:jscript "%~f0" "%AppData%"') do set User=%%i
- :loop
- rasdial|findstr "没有连接" >nul&&rasdial vpn %User% vpntm >nul||echo 已连接
- choice /c nq /t 3 /d n /n >nul
- if %errorlevel%==2 (
- echo 正在退出...
- rasdial /d >nul
- ) else goto loop
- exit */
- var FSO = new ActiveXObject('Scripting.FileSystemObject');
- var XMLHTTP = new ActiveXObject('Microsoft.XMLHTTP');
- var ADODB = new ActiveXObject('ADODB.Stream');
- var WShell = new ActiveXObject('WScript.Shell');
- XMLHTTP.Open('GET', 'http://www.tyvpncn.com/page/testvpn.html', 0);
- XMLHTTP.Send();
- with (ADODB) {
- Type = 1;
- Mode = 3;
- Open();
- Write(XMLHTTP.responseBody);
- Position = 0;
- Type = 2;
- CharSet = 'UTF-8';
- }
-
- var HTML = ADODB.ReadText();
- var DIV = HTML.match(/testvpnitem'>[^:]+?<\/div>/m)[0];
- var IP = DIV.match(/[0-9.]+(?=<\/span>)/);
- var User = DIV.match(/vpn\d+/);
- var File = FSO.OpenTextFile(WScript.Arguments.Item(0) + '\\Microsoft\\Network\\Connections\\Pbk\\rasphone.pbk', 2, true);
-
- File.Write('[VPN]\r\nMEDIA=rastapi\r\nPort=VPN4-0\r\nDevice=WAN Miniport (L2TP)\r\nDEVICE=vpn\r\nPhoneNumber=' + IP);
- WShell.Run('rasdial vpn ' + User + ' vpntm', 0, true);
- WSH.Echo(User);
复制代码 一小时VPN的资源- 1>1/* :
- ::本代码仅作交流学习之用,下载之后请于24小时之内删除,严禁用于其他用途!
- ::对使用本代码造成的任何后果,作者概不负责
- @echo off
- title 按Q退出连接
- mode con: lines=2 cols=25
- echo 连接中...
- for /f "tokens=1,2 delims=|" %%i in ('cscript -nologo -e:jscript "%~f0" "%AppData%"') do (
- set User=%%i
- set PSW=%%j
- )
- :loop
- rasdial|findstr "没有连接" >nul&&rasdial vpn %User% %PSW% >nul||echo 已连接
- choice /c nq /t 10 /d n /n >nul
- if %errorlevel%==2 (
- echo 正在退出...
- rasdial /d >nul
- ) else goto loop
- exit */
- var FSO = new ActiveXObject('Scripting.FileSystemObject');
- var WShell = new ActiveXObject('WScript.Shell');
- var HTML = GetURL('http://free.vpn.58tt.net/index.html');
- var IP = HTML.match(/IP地址:[0-9.]+/)[0].match(/[0-9.]+/);
- var User = HTML.match(/用户名:.+?(?=<\/p>)/)[0].replace(/用户名:/, '');
- var PSW = GetURL('http://' + IP + '/mm.txt');
- var File = FSO.OpenTextFile(WScript.Arguments.Item(0) + '\\Microsoft\\Network\\Connections\\Pbk\\rasphone.pbk', 2, true);
- File.Write('[VPN]\r\nMEDIA=rastapi\r\nPort=VPN4-0\r\nDevice=WAN Miniport (L2TP)\r\nDEVICE=vpn\r\nPhoneNumber=' + IP);
- WShell.Run('rasdial vpn ' + User + PSW, 0, true);
- WSH.Echo(User + '|' + PSW);
- function GetURL(URL) {
- var ADODB = new ActiveXObject('ADODB.Stream');
- var XMLHTTP = new ActiveXObject('Microsoft.XMLHTTP');
- XMLHTTP.Open('GET', URL, 0);
- XMLHTTP.Send();
- with (ADODB) {
- Mode = 3;
- Type = 1;
- Open();
- Write(XMLHTTP.responseBody);
- Position = 0;
- Type = 2;
- CharSet = 'UTF-8';
- }
- return ADODB.ReadText();
- }
复制代码
|