public Form1() { InitializeComponent(); Control.CheckForIllegalCrossThreadCalls =false; } Thread Th = null; public void scan(string subnet) { Ping myping; PingReply reply; IPAddress adr; IPHostEntry host; for (int i = 1; i < 255; i++) { string subnetnt = "." + i.ToString(); myping = new Ping(); reply = myping.Send(subnet+subnetnt,10); if (reply.Status == IPStatus.Success) { try { adr = IPAddress.Parse(subnet + subnetnt); host = Dns.GetHostEntry(adr); textBox1.AppendText(subnet+subnetnt +" "+ host.HostName.ToString()+" " + "Up" + "\n"); } catch { } } } }
20 thg 5, 2019
C# - SubnetScanner - Scan your (local) Network
A network scanner written in C# to identify hosts in your local network.
Download Project: http://s000.tinyupload.com/index.php?...
public Form1() { InitializeComponent(); Control.CheckForIllegalCrossThreadCalls =false; } Thread Th = null; public void scan(string subnet) { Ping myping; PingReply reply; IPAddress adr; IPHostEntry host; for (int i = 1; i < 255; i++) { string subnetnt = "." + i.ToString(); myping = new Ping(); reply = myping.Send(subnet+subnetnt,10); if (reply.Status == IPStatus.Success) { try { adr = IPAddress.Parse(subnet + subnetnt); host = Dns.GetHostEntry(adr); textBox1.AppendText(subnet+subnetnt +" "+ host.HostName.ToString()+" " + "Up" + "\n"); } catch { } } } }
tham khảo video tại đây.
public Form1() { InitializeComponent(); Control.CheckForIllegalCrossThreadCalls =false; } Thread Th = null; public void scan(string subnet) { Ping myping; PingReply reply; IPAddress adr; IPHostEntry host; for (int i = 1; i < 255; i++) { string subnetnt = "." + i.ToString(); myping = new Ping(); reply = myping.Send(subnet+subnetnt,10); if (reply.Status == IPStatus.Success) { try { adr = IPAddress.Parse(subnet + subnetnt); host = Dns.GetHostEntry(adr); textBox1.AppendText(subnet+subnetnt +" "+ host.HostName.ToString()+" " + "Up" + "\n"); } catch { } } } }
Related Articles :
WINDOWS FORMS: CHANGE CONNECTIONSTRING AT RUNTIME WITH APP.CONFIG IN C# How to change ConnectionString dynamically in C# Step 1: Click New Project, then select Visual C# on the left, then&nbs ...
Tìm tất cả thiết bị trong cùng lớp mạng Lan xcxcxccxzcxzcxzcXin chào các bạn, bài viết hôm nay mình sẻ hướng dẫn các bạn cách tìm các thiết bị trong mạng LAN, để tìm các th ...
Đoạn code C# với phần nhập câu hỏi tự động. đoạn code tách các câu hỏi:static void Main(string[] args){ string chuoi = "#. Cau ...
Chia sẽ tool POCO tạo class object từ table Sqlserver Trong lập trình ứng dụng, nếu bạn nào đang sử dụng Entity Framework để phát triển cho dự án của mình thì trong Entity đã có sẵn ...
Extract Word Document Data And Insert Into SQL Database Example of Word documentA 1. Name of House: Aasleagh Lodge Townland: Srahatloe Near: Killary Harbour, LeenaneSource Codes after ...