想要抓取网络数据包,然后对取到数据包进行解析,修改数据包的目标地址(IP和MAC)和源地址(IP和MAC)等,在根据新地址进行二次转发,大家有什么好的方法和建议呢,C#能实现吗?现在我们用SharpPcap可以抓取、解析,但无法发送和接收,请大侠指点,谢谢了!
解决方案 »
- SQL小问题,想不过来啦,各位帮帮忙...
- 网站配置到服务器上有些用户能访问而有些用户不能访问,这应该 是什么问题?
- Repeater 控制 LinkButton
- 想问一个web控件的名称
- 弹出窗口的问题,确定按钮关闭前先执行服务端程序?
- 我定义了一个用户控件,加了些属性,但是..
- 样式表CSS文件中可否加入服务器端脚本
- 请问做一个滚动的公告该如何做?使用什么控件好呢?先谢了啊!
- 新手遇到一个ASPNET的奇怪问题.
- 在.net中是否有采用NHibernate/ObjectSpaces等数据持久层的必要性?
- 教.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 抓包工具