-
在线人数统计的网页程序
在线人数统计的网页程序-Statistics Online website procedures
- 2023-02-28 20:00:03下载
- 积分:1
-
c# 扫描IP Http Header
c# 扫描IP Http Headerusing System;using System.Collections.Generic;using System.ComponentModel;using System.Data;using System.Drawing;using System.Linq;using System.Text;using System.Windows.Forms;using System.Threading;using System.IO;namespace HScan{ public partial class Form1 : Form { int _currentThreads = 0; int _maxThreads = 100; Thread main = null; Thread mt = null; List threads = new List(); public Form1() { InitializeComponent(); Control.CheckForIllegalCrossThreadCalls = false; } private void btnStart_Click(object sender, EventArgs e) { btnStart.Enabled = false; if (txtStart.Text.Trim() == "") { MessageBox.Show("起始IP不能为空."); return; } if (txtEnd.Text.Trim() == "") { MessageBox.Show("结束IP不能为空."); return; } int ts = Convert.ToInt32(txtThreads.Text); _maxThreads = ts; string startIp = txtStart.Text; string endIp = txtEnd.Text; TParameter tp=new TParameter(); tp.StartIp=startIp; tp.EndIp=endIp; tp.ThreadCount=ts; main = new Thread(new ParameterizedThreadStart(StartMe)); main.Start(tp); } protected void ThreadManage() { Thread c=null; while (true) { System.Object lockThis = new System.Object(); lock (lockThis) { for (int i = 0; i < threads.Count; i ) { if (threads[i] != null && !threads[i].IsAlive) { c = threads[i]; break; } } if (c != null) { threads.Remove(c); } } } } protected void StartMe(object ob) { mt = new Thread(new ThreadStart(ThreadManage)); mt.Start(); TParameter p = ob as TParameter; string curIp = p.StartIp; while (true) { for (int i = 0; i < _maxThreads; i ) { if (curIp != "") { if (_currentThreads >= _maxThreads) break; System.Object lockThis = new System.Object(); lock (lockThis) { _currentThreads ; if (_currentThreads > _maxThreads) _currentThreads = _maxThreads; string tip = curIp; Thread t = new Thread(new ParameterizedThreadStart(Run)); t.Start(tip); threads.Add(t); curIp = IPUtility.getLastIp(curIp, p.EndIp, 1); } } else { break; } } } } protected void Run(object ob) { string ip = ob.ToString(); SocketGetHead h = new SocketGetHead(); string ret = h.GetHtml(ip, 80); if (ret.IndexOf("DVRDVS-Webs") > 0) { ListViewItem item = new ListViewItem(); item.SubItems[0].Text = (listView1.Items.Count 1).ToString(); ListViewItem.ListViewSubItem lvSubItem = new ListViewItem.ListViewSubItem(); lvSubItem.Text = ip; item.SubItems.Add(lvSubItem); lvSubItem = new ListViewItem.ListViewSubItem(); lvSubItem.Text = "DVRDVS-Webs"; item.SubItems.Add(lvSubItem); listView1.Items.Add(item); } System.Object lockThis = new System.Object(); lock(lockThis) { lblCurIp.Text = ip; _currentThreads--; if (_currentThreads < 0) _currentThreads = 0; } } private void tsmCopy_Click(object sender, EventArgs e) { if (listView1.SelectedItems.Count > 0) { string ip = listView1.SelectedItems[0].SubItems[1].Text; Clipboard.SetText(ip); } } private void tsmExport_Click(object sender, EventArgs e) { StreamWriter writer = new StreamWriter(AppDomain.CurrentDomain.BaseDirectory "\export.txt",true); foreach (ListViewItem item in listView1.Items) { string ip=item.SubItems[1].Text; writer.WriteLine(ip); writer.Flush(); } writer.Flush(); writer.Close(); MessageBox.Show("导出成功!"); } private void Form1_FormClosing(object sender, FormClosingEventArgs e) { try { if (mt != null) { mt.Interrupt(); mt.Abort(); } foreach (Thread t in threads) { t.Interrupt(); t.Abort(); } if (main != null) { main.Interrupt(); main.Abort(); } } catch { } Thread.Sleep(5000); } private void btnStop_Click(object sender, EventArgs e) { try { if (mt != null) { mt.Interrupt(); mt.Abort(); } foreach (Thread t in threads) { t.Interrupt(); t.Abort(); } if (main != null) { main.Interrupt(); main.Abort(); } } catch { } btnStart.Enabled = true; } }}
- 2014-06-23下载
- 积分:1
-
Xmail是Internet和Intranet邮件服务器具有一个SMTP服务器,POP3服务…
XMail is an Internet and intranet mail server featuring an SMTP server, POP3 server, finger server, multiple domains, no need for users to have a real system account, SMTP relay checking, RBL/RSS/ORBS/DUL and custom ( IP based and address based ) spam protection, SMTP authentication ( PLAIN LOGIN CRAM-MD5 POP3-before-SMTP and custom ), a POP3 account syncronizer with external POP3 accounts, account aliases, domain aliases, custom mail processing, direct mail files delivery, custom mail filters, mailing lists, remote administration, custom mail exchangers, logging, and multi-platform code. XMail sources compile under GNU/Linux, FreeBSD, OpenBSD, NetBSD, OSX, Solaris and NT/2K/XP.
- 2022-10-05 02:55:03下载
- 积分:1
-
双人聊天室
局域网聊天,可在同一个网络下进行聊天,自定义端口(LAN chat, can be chatted under the same network, custom port)
- 2020-06-17 00:00:01下载
- 积分:1
-
在CB中用socket api来写网络通讯程序 在CB中用socket api来写网络通讯程序...
在CB中用socket api来写网络通讯程序 在CB中用socket api来写网络通讯程序 -In the CB using socket api to write network communication program in CB using socket api to write network communication program in CB using socket api to write network communication program
- 2023-08-31 12:55:03下载
- 积分:1
-
网络编程,入门书籍,供网络编者从入门、掌握、熟悉的一本好书籍。...
网络编程,入门书籍,供网络编者从入门、掌握、熟悉的一本好书籍。-Network programming, book entry for the network from entry editor, master, familiar with a good book.
- 2023-04-14 06:40:03下载
- 积分:1
-
汽车牌识别
halcon 汽车车牌识别 Hdevelop编写(Halcon License Plate Recognition Hdevelopment)
- 2020-06-20 15:40:01下载
- 积分:1
-
111186731IEEE_39bus_PI_Pooya_mask
ieee 39 节点,用于电力系统网络测试(ieee 39-bus test system, used to test the electricity system)
- 2020-06-16 05:00:01下载
- 积分:1
-
不好意思,是DOTNET版本的,感兴趣的可以将其改成VisualC++的代码...
不好意思,是DOTNET版本的,感兴趣的可以将其改成VisualC++的代码-sorry, yes DOTNET version, interest can be changed Visual C code
- 2022-12-11 01:00:03下载
- 积分:1
-
ping 功能实现
实现PING功能,可以检查网络延时,确定网络性能,但目前未支持DNS方式,只能对IP进行PING 处理。
- 2022-01-25 19:24:35下载
- 积分:1