Block any IP on a computer by coding in .Net (C#)

I am playing around with a way to kick cheaters in Modern Warfare 2 (when you are the host). I have been able to use winpcap to sniff packages to identify the player names and their IPs. I need a way to block all traffic (or just the target IPs UDP traffic to my machine). Hence the player will timeout/lagout. Does anyone know of an available library that lets me do this easily. I could go about doing this the hard way and install Windows DDK and mess around in C++ to create a low level NDIS driver, but being überly rusty on C++ and all the typical compile issues that comes when compiling template code for this, I prefer some ready coded library for this. Or maybe someone has a better idea that would work? Solution: Use Windows Firewall. Easy API to create and remove rules on the fly. And a a test program that does this now works. I kicked 2 people out of the game.
If the player is behind an Internet proxy, then you'll be blocking all traffic from anyone on the same proxy server.

以上就是Block any IP on a computer by coding in .Net (C#)的详细内容,更多请关注web前端其它相关文章!

赞(0) 打赏
未经允许不得转载:web前端首页 » JavaScript 答疑

评论 抢沙发

  • 昵称 (必填)
  • 邮箱 (必填)
  • 网址

前端开发相关广告投放 更专业 更精准