- rem 另存为 ANSI 编码 bat
- ' & cls & cscript.exe /nologo /e:vbscript "%~f0" %* & exit /b
-
- S = "192.168.0.254" '教师机的IP或计算机名
- U = "administrator" '用户名
- P = "12345678" '密码
-
- t = ""
- Set oWMI = GetObject("Winmgmts:\\.\Root\Cimv2")
- For Each i In oWMI.InstancesOf("Win32_PhysicalMemory")
- t = t & CInt(i.Capacity / 1024 ^ 3) & "G" & "&"
- Next
- For Each i In oWMI.InstancesOf("Win32_DiskDrive")
- t = t & CInt(i.Size / 1024 ^ 3) & "G" & "&"
- Next
- For Each i In oWMI.InstancesOf("Win32_OperatingSystem")
- n = i.CSName
- Next
- Set oFSO = CreateObject("Scripting.FileSystemObject")
- Set oTextStream = oFSO.OpenTextFile(t & n & ".txt", 2, True)
- oTextStream.Write t & n
- oTextStream.Close()
- Set oWshShell = CreateObject("WScript.Shell")
- Randomize
- s = Int(10 * Rnd() + 1)
- oWshShell.Run "ping 127.0.0.1 -n " & s, 0, True
- oWshShell.Run "net use \\" & S & " " & P & " /user:" & U, 0, True
- oFSO.CopyFile t & n & ".txt", "\\" & S & "\Y\"
- oWshShell.Run "net use \\" & S & " /delete", 0, True
复制代码 随机延时 1 ~ 10 秒再连接服务器,然后断开连接,这样试试看 |