 |
|
|
|
| |
|
Total Source Downloaded: 139,678 |
| |
|
Total Snippet Views: 74,256 |
| |
|
New Member: chaitanya |
| |
|
|
|
|
|
|
|
| Site Information |
 |
Members |
471 |
 |
Total Downloads |
99 |
 |
Total Snippets |
90 |
|
|
|
|
|
|
|
 |
| Submit your source code and code snippets to Cy2online and
help build an archive of source code. Click here
register or login if you are a member.
|
 |
Submit Snippets |
|
|
 |
|
| Viewed: 1167 |
| Version: Framework 2.0 |
| The following code snippet is a simple console port scanner, which can scan a given host using a range of ports. |
| Import/Using Directives |
| Imports System.Net.Sockets |
Module Module1
Sub Main()
Dim tcp As New TcpClient
Console.WriteLine("Enter Host Name")
Dim txtHost = Console.ReadLine()
Console.WriteLine("Enter Start Port")
Dim txtPortStart = Console.ReadLine()
Console.WriteLine("Enter Stop Port")
Dim txtPortStop = Console.ReadLine()
Dim startPort As Integer = Convert.ToInt32(txtPortStart)
Dim stopPort As Integer = Convert.ToInt32(txtPortStop)
Dim port As Integer
For port = startPort To stopPort
Try
tcp.Connect(txtHost, port)
If (tcp.Connected) Then
Console.WriteLine(port & " : Port Open")
End If
Catch e As Exception
Console.WriteLine(port & " : Port Closed")
End Try
Next
tcp.Close()
Console.WriteLine("Scan Finished")
Console.ReadKey()
End Sub
End Module
|
|
|
|
|
|
|
 |
| 1 |
Simple DataGridView Example - C# |
| This example demonstrates how to load data into the DataGridView control using string array's. |
| 2 |
A Custom Message Box - C# |
| This example source code demonstrates how you can develop your own messages box. |
| 3 |
Custom MessageBox 2 - C# |
| This example source code builds on a previous example of creating a custom MessageBox. New features in this example include different types of buttons and displaying an icon. Also uses different message beep tones for standard MessageBox's and warring MessageBox's. |
| 4 |
Connect To MSN Messenger Using The MSN Protocol - C# |
| This sample application demonstrates how to connect to MSN Messenger using the MSN Protocol. It also includes how to generate a Ticket that is used with the ChallengeString. This is a simple authentication example. |
| 5 |
Send Messages Using The Net Send Command - C# |
| This sample program demonstrates how to send messages in a network using the Windows Messenger service. |
|
|
|
|
|
|
CY2 Online2.net | CopyRight 2005 - 2007 | All Rights Reserved
|
|