• Log in or sign up for an account here: https://www.sythe.org/login

VB Ping

syth4

Active Member
Joined
Jan 28, 2007
Sythe Gold
1
Messages
173
Discord Verified
Hi,
In my last topic I didn't get my question answered...
how do I make a VB Pinger that pings up to 10 ip speeds then pauses for 15 min then starts again outputting it in a textbox and saving it to a textfile on a shared folder and on the local harddrive. If someone could help me that would be great :)
Thanks
 
One could only wonder why you would want that :P
 
Discord Verified
I'm the admin of a big network and I need to know the speeds of the connections...
 
admin of a big network eh? i would of though u would know how to do this

anyway just do a google search and u should get some tuts on how to make a trojan :)
 
um well you can always acces the router :) (right click the internet thingy at the start menu and below the ip theres some number like 192.157.2.1 or something like that that copy and paste it to the webbrowser and done
 
Member of the Month Winner
Sythe's 10th Anniversary
<3 Mvps :d
 
Two Factor Authentication User
I've had to do things like this before, so I made this quickly. This is a console application, but it will work faster than a windows form application.
This can also only ping computers inside your network.

To use, make a new console application, an replace all code with this.

To save to the file, you need to exit it by pressing a key on the keyboard.

Code:
Module Module1

    Sub Main()
        Dim Ping As New System.Net.NetworkInformation.Ping
        Dim PingList As New List(Of String)

        '' Add all addresses you want to ping. This will only work for computers inside your network. Not online.
        PingList.Add("10.10.10.1")
        PingList.Add("10.10.10.2")
        PingList.Add("10.10.10.3")
        PingList.Add("localhost")

        '' Set where you want to save here!
        Dim OutputPath As String = "C:\PingOut.txt"

        '' Set how often you want to ping (default 15 minutes)
        Dim PingFrequency As New TimeSpan(0, 15, 0)

        '' This part will write to the file. Press any key to end this and save the file.
        Dim Output As New IO.StreamWriter(OutputPath, True)
        Console.WriteLine("Saving to " & OutputPath)
        Dim ToOutput As String = String.Format("{0}|{1}|{2}|{3}", _
            FormatString(13, "Time of ping"), _
            FormatString(13, "Address"), _
            FormatString(13, "Time (ms)"), _
            "Status")
        Output.WriteLine(ToOutput)
        Console.WriteLine(ToOutput)
        Output.WriteLine("{0}|{0}|{0}|{0}", FormatString(13, "", "-"))
        Console.WriteLine("{0}|{0}|{0}|{0}", FormatString(13, "", "-"))
        Dim LastTime As Date = Now - PingFrequency - New TimeSpan(0, 1, 0)
        Do
            If Console.KeyAvailable Then Exit Do
            If Now - PingFrequency < LastTime Then Continue Do
            For Each Address As String In PingList
                Dim Result As Net.NetworkInformation.PingReply = Ping.Send(Address)
                ToOutput = String.Format("{0}|{1}|{2}|{3}", _
                    FormatString(13, Now.Hour & ":" & Now.Minute & ":" & Now.Second), _
                    FormatString(13, Result.Address.ToString), _
                    FormatString(13, Result.RoundtripTime), _
                    FormatString(13, Result.Status.ToString))
                Console.WriteLine(ToOutput)
                Output.WriteLine(ToOutput)
            Next
            Output.WriteLine("{0}|{0}|{0}|{0}", FormatString(13, "", "-"))
            Console.WriteLine("{0}|{0}|{0}|{0}", FormatString(13, "", "-"))
            LastTime = Now
        Loop
        Output.Close()
    End Sub
    Function FormatString(ByVal Count As Integer, ByVal Text As String, Optional ByVal Formater As Char = " ") As String
        For X As Integer = Text.Length To Count
            Text &= Formater
        Next
        Return Text
    End Function

End Module
This is how it will write to the text file and console:
Code:
Time of ping  |Address       |Time (ms)     |Status
--------------|--------------|--------------|--------------
2:54:41       |10.10.10.1    |1             |Success       
2:54:41       |10.10.10.2    |2             |Success       
2:54:41       |10.10.10.3    |1             |Success       
2:54:41       |::1           |0             |Success       
--------------|--------------|--------------|--------------
 
Discord Verified
Hey Flaming Idiots...
Your source didn't work it said:



Thanks :)
 
Runescape Gamblingrunescape gambling
Back
Top