資源簡介
c# 寫的 socket抓包 還有一種模式是 pcap模式 這種模式要安裝wincap
代碼片段和文件信息
using?System;
using?System.Collections.Generic;
using?System.Text;
using?System.IO;
namespace?Alibaba.Security.HttpWatch
{
?public???class?Chunk
????{
????????public?static?byte[]?doUnchunk(byte[]?writeData)
????????{
????????????if?((writeData?==?null)?||?(writeData.Length?==?0))
????????????{
????????????????return?new?byte[0];
????????????}
????????????MemoryStream?stream?=?new?MemoryStream(writeData.Length);
????????????int?index?=?0;
????????????bool?flag?=?false;
????????????while?(!flag?&&?(index?<=?(writeData.Length?-?3)))
????????????{
????????????????string?s?=?Encoding.ASCII.GetString(writeData?index?Math.Min(0x20?writeData.Length?-?index));
????????????????int?length?=?s.IndexOf(“\r\n“?StringComparison.Ordinal);
????????????????if?(length?<=?0)
????????????????{
????????????????????throw?new?InvalidDataException(“HTTP?Error:?The?chunked?entity?body?is?corrupt.?Cannot?find?Chunk-Length?in?expected?location.?Offset:?“?+?index.ToString());
?????
?屬性????????????大小?????日期????時間???名稱
-----------?---------??----------?-----??----
?????目錄???????????0??2014-08-08?10:31??\
?????文件????????2535??2014-08-08?10:31??\16Aspx源碼必讀.txt
?????文件?????????144??2014-08-08?10:31??\app.config
?????文件???????86358??2014-08-08?10:31??\Burn.ico
?????文件????????2120??2014-08-08?10:31??\Chunk.cs
?????文件?????????251??2014-08-08?10:31??\Config.cs
?????文件???????10208??2014-08-08?10:31??\DataChart.cs
?????文件????????5814??2014-08-08?10:31??\DataChart.resx
?????文件???????20867??2014-08-08?10:31??\DoneWincap.cs
?????文件???????37893??2014-08-08?10:31??\Frm_main.cs
?????文件???????31962??2014-08-08?10:31??\Frm_main.Designer.cs
?????文件??????138625??2014-08-08?10:31??\Frm_main.resx
?????文件????????2753??2014-08-08?10:31??\from.gif
?????文件?????????661??2014-08-08?10:31??\HttpSession.cs
?????文件????????8061??2014-08-08?10:31??\HttpWatch.csproj
?????文件?????????774??2014-08-08?10:31??\HttpWatch.csproj.user
?????文件?????????907??2014-08-08?10:31??\httpwatch.sln
?????文件???????26624??2014-08-08?10:31??\httpwatch.suo
?????文件????????9109??2014-08-08?10:31??\IPHeader.cs
?????文件???????15199??2014-08-08?10:31??\PkFunction.cs
?????文件?????????501??2014-08-08?10:31??\Program.cs
?????文件????????4833??2014-08-08?10:31??\TCPHeader.cs
?????文件????????2819??2014-08-08?10:31??\UDPHeader.cs
?????文件?????????177??2014-08-08?10:31??\最新Asp.Net源碼下載.url
?????目錄???????????0??2014-08-08?10:31??Be\
?????目錄???????????0??2014-08-08?10:31??Be\Windows\
?????目錄???????????0??2014-08-08?10:31??Be\Windows\Forms\
?????文件????????1953??2014-08-08?10:31??Be\Windows\Forms\ByteCollection.cs
?????文件?????????742??2014-08-08?10:31??Be\Windows\Forms\BytePositionInfo.cs
?????文件????????2619??2014-08-08?10:31??Be\Windows\Forms\DynamicByteProvider.cs
?????文件????????4424??2014-08-08?10:31??Be\Windows\Forms\FileByteProvider.cs
............此處省略41個文件信息
- 上一篇:C#+SQL做的圖書管理系統
- 下一篇:循環賽日程表(C#)
評論
共有 條評論