-
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
-
qks
When I wrote this function my problem was to replace one color by an other on transparent bitmaps My
- 2018-09-29 15:06:30下载
- 积分:1
-
ssocks-0.0.14.tar
sSocks是一个socks代理工具套装,可用来开启socks代理服务,支持socks5验证,支持IPV6和UDP,并提供反向socks代理服务,即将远程计算机作为socks代理服务端,反弹回本地,极大方便内网的渗透测试,其最新版为0.0.13(sSocks is a socks proxy tool sets, can be used to open the socks proxy services, support socks5 authentication, support for IPV6 and UDP, and to provide reverse socks proxy services, about the remote computer as socks proxy server, bounce back to the local, which greatly facilitates network penetration testing, and its latest version is 0.0.13,)
- 2020-12-10 16:09:19下载
- 积分:1
-
ntpclient_2015_365.tar
基于ntp协议的网络时间服务程序在linux平台下的客户端实现(Client implementation of network time service program based on ntp on linux platform)
- 2018-08-23 17:16:38下载
- 积分:1
-
选择重传
说明: 实现计算机网络中的选择重传协议,并且采用了滑动窗口。(Implementation of selective retransmission protocol)
- 2020-06-24 02:43:21下载
- 积分:1
-
TraceRoute
用VC语言开发的traceroute,深层次的socket编程(traceroute)
- 2010-11-18 16:59:46下载
- 积分:1
-
new-touchscreen
HELLO HOW ARE YOU
THIS SOURCE MSTAR IC.
- 2013-07-11 12:58:16下载
- 积分:1
-
TCPIP_Code
在VS2010平台下使用MFC开发的TCP/IP通信应用,里面拥有详细的代码注释,并且支持16进制接受和发送,支持TCP/UCP通信,以及服务器server和客户端client模式选择(TCP/IP communication applications developed using MFC in VS2010 platform, which has a detailed code comments, and support for hexadecimal to receive and send, support TCP/UCP communication, as well as server server and client client mode selection)
- 2013-01-16 14:01:12下载
- 积分:1
-
C#网络调试助手源码(TCP/UDP)
基于C#的以太网通信
- 2019-03-05下载
- 积分:1
-
DDOS-scr
提供了各种拒绝服务攻击方式的算法,封装成了各种函数,调用很方便。(Offers a variety of denial of service attack algorithm, the package into various functions, call it convenient.)
- 2011-06-08 16:53:15下载
- 积分:1