Use VBS to send a message pick a fast broiler do VPN's VBS code 1TH/2 page _vbs

Source: Internet
Author: User
Tags readline

A Pick fast chickens to do VPN.
When the young rookie transformation for the old rookie, you know to consider playing hacking while also try to ensure that not exposed
Myself. Everything, Safety first! Otherwise do not know which day play to play is the police uncle brought tea ^_^.
Therefore, as the old rookie of us, we should learn to hacking, more use vpn+ terminal and other springboard measures to protect themselves, as far as possible not to expose themselves directly to the place.
However, due to the increase in the springboard, the data transmission is slow. So it is absolutely necessary for us to find a fast-speed machine to do the VPN springboard. But if you allow yourself to do these repetitive operations (from a large number of chickens to choose the speed of good), then too ashamed of the old rookie this name. For a friend who has learned to program, that's a breeze. But for the side dishes, it may be a bit difficult. Therefore, today I would like to briefly introduce how to use VBS to help us pick fast chickens.

Copy Code code as follows:

On Error Resume Next
' Code by Netpatch
Set arg=wscript.arguments
' Declare external parameters
If Arg.count=0 then Wscript.Quit
' Exit the script if there are no parameters
Num=0

Szbuf = InputBox ("Enter the ping time value to find:", "input", "200")
' Call the pop-up message input box to get the time to find
Set fso=createobject ("Scripting.FileSystemObject")
' Declare the FSO component
Set gofile=fso.opentextfile (ARG (0), 1,false,-2)
' Open the file dragged in
Do While Gofile.atendofline <> True

Ip=gofile.readline

' Read a row

Set Oshell = WScript.CreateObject ("Wscript.Shell")

' Declare WSH component

Set oexec = oshell.exec ("Ping-n 1" &Ip& ")

' Execute the ping command and attach the result to the Oexec

Set File=fso. OpenTextFile (ARG (0) & ". txt", 8,true)

Do as not OExec.StdOut.AtEndOfStream

Strout = OExec.StdOut.ReadLine ()

If Oexec.stdout.line>4 Then Exit Do

' Read the specified number of rows by looping

Loop

If
Cint (Get_time (strout)) < Cint (szbuf) Then

File.writeline IP&AMP;CHR (9) & "Ping time value is:" &get_time (Strout) & "seconds"

' Find the machine that is less than the specified time and write the newly created text

Num=num+1

' After finding, count (after statistics)

End If
Loop
File.close
Gofile.close
Set fso=nothing

If num = 0 Then

WScript.Echo "Depressed! No one found @_@.
Else

WScript.Echo "Congratulations! Find "&num&"
End If

' The ping time value specified with a regular lookup
Function Get_time (ss)

Set re = New RegExp

Re. Pattern = "(. +from) (\d+.\d+.\d+.\d+): bytes=32 time= (\d+) MS (. +)"

Re. Global = True

Re. IgnoreCase = True

Re. MultiLine = True

Get_time = Re. Replace (SS, "$")
End Function

Pull your chicken IP list onto this VBS script, and then fill in the ping time value you want to find, you can quickly find out which broiler relatively fast (of course, the premise is that your broiler did not prevent ping! but then, if the ping, it is estimated that there is a firewall class of things, may also do not VPN. )。
Current 1/2 page 12 Next read the full text

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.