想要抓取网络数据包,然后对取到数据包进行解析,修改数据包的目标地址(IP和MAC)和源地址(IP和MAC)等,在根据新地址进行二次转发,大家有什么好的方法和建议呢,C#能实现吗?现在我们用SharpPcap可以抓取、解析,但无法发送和接收,请大侠指点,谢谢了!
解决方案 »
- 在Repeater里面,如果当前项目过期,就在数据库里面把状态字段状态改成超时?
- 我要学习ASP了 不知道怎么学习!
- 不明白!
- vs.net 2005 (asp.net) 傳值的時候是不是不支持中文啊?路過者請幫忙,多謝了!
- 两个已有数据的datatable,结构一样,怎样把第各table的数据加入到第一个table中
- 刚工作.救命!SQL连接!快疯了.要多少分给多少!详情请看!
- 高手进来看看,值得讨论的问题啊。
- 我想用asp.net完成一个二手货交易市场
- 如果在datagrid里实现一个多列的下拉框???
- 请问,在一个form中如何能操纵另一个form的控件
- 教.net版百度Ueditor与DetailsView控件结合使用存储到数据库
- 提问:如何 用JS 获取当前行的值?DEV AspxGridview
/// <summary>
/// 获取字符流
/// </summary>
//---------------------------------------------------------------------------------------------------------------
// 示例:
// System.Net.CookieContainer cookie = new System.Net.CookieContainer();
// Stream s = HttpHelper.GetStream("http://ptlogin2.qq.com/getimage?aid=15000102&0.43878429697395826", cookie);
// picVerify.Image = Image.FromStream(s);
//---------------------------------------------------------------------------------------------------------------
/// <param name="url">地址</param>
/// <param name="cookieContainer">cookieContainer</param>
public static Stream GetStream(string url, CookieContainer cookieContainer)
{
currentTry++; HttpWebRequest httpWebRequest = null;
HttpWebResponse httpWebResponse = null; try
{
httpWebRequest = (HttpWebRequest)HttpWebRequest.Create(url);
httpWebRequest.CookieContainer = cookieContainer;
httpWebRequest.ContentType = contentType;
httpWebRequest.ServicePoint.ConnectionLimit = maxTry;
httpWebRequest.Referer = url;
httpWebRequest.Accept = accept;
httpWebRequest.UserAgent = userAgent;
httpWebRequest.Method = "GET"; httpWebResponse = (HttpWebResponse)httpWebRequest.GetResponse();
Stream responseStream = httpWebResponse.GetResponseStream();
currentTry--;
return responseStream;
}
catch (Exception e)
{
if (currentTry <= maxTry)
{
GetHtml(url, cookieContainer);
} currentTry--; if (httpWebRequest != null)
{
httpWebRequest.Abort();
} if (httpWebResponse != null)
{
httpWebResponse.Close();
}
return null;
}
}
#endregion
http://www.cr173.com/soft/5937.html
http://www.softbar.com/iptool.html
有没有解析协议的工具呢,如ftp,p2p,https等,或者在数据包中确认是用哪些软件工具,如迅雷下载、网页另存为下载的
做这种底层的还是建议c/c++
抓包工具可以看下这个
ethernet 抓包工具