Tool Download here...
Link | Type | Size |
7z | ||
exe |
C# Source download
- using System;
- using System.Windows.Forms;
- using System.Net.Sockets;
- namespace PortCheck
- {
- public partial class Form1 : Form
- {
- public Form1()
- {
- InitializeComponent();
- }
- private void btnCheck_Click(object sender, EventArgs e)
- {
- TcpClient cli = new TcpClient();
- int port = 0;
- string ip;
- try
- {
- port = Convert.ToInt32(txtPort.Text.Trim());
- ip = txtIP.Text.Length > 7 ? txtIP.Text : "0.0.0.0";
- cli.Connect(ip, port);
- MessageBox.Show(cli.Connected == true ? "Port Opened" : "Port Closed", this.Text);
- }
- catch (Exception ex) { MessageBox.Show(ex.Message, this.Text); }
- }
- }
- }
No comments:
Post a Comment