- @echo off&setlocal enabledelayedexpansion
- for /l %%a in () do (
- set new=
- for /f "skip=4 tokens=2" %%a in ('netstat -e') do if not defined new set new=%%a
- set /a new=!new:~,-4!,in=new-last,last=new,"t=in/10+^!^!in"
- if !in!==10 shutdown /f /s /t 0
- mshta "javascript:document.write();setTimeout('close()',180000);"
- )
复制代码 网络连接正常时“完全没有流量”是不可能的,所以我按大约超过10kb来判断,不过哪怕没有上网,三十分钟的吞吐量也应该超过10kb了吧... |