Skip to content

xljiulang/WindivertDotnet

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

33 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

WindivertDotnet

面向对象的Windivert的dotnet封装

如何使用

using var divert = new WinDivert("true", WinDivertLayer.Network);
using var packet = new WinDivertPacket();
var addr = new WinDivertAddress();

// 读包
divert.Recv(packet, ref addr);

// 解包
var result = packet.GetParseResult();

// 改包
result.TcpHeader->DstPort = 443; 

// 重算checksums
packet.CalcChecksums(ref addr);

// 修改后发出
divert.Send(packet, ref addr);

About

面向对象的WinDivert的dotnet异步封装

Topics

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages