如何在C#中欺骗TCP/HTTP响应 [英] How to spoof a tcp/http response in C#

查看:60
本文介绍了如何在C#中欺骗TCP/HTTP响应的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有一个向服务器发出请求并获得身份验证的应用程序.我想知道是否有可能编写一个侦听器来监听请求,并且如果有任何请求与该特定请求匹配,则该监听器会发回一条消息,而实际上不会到达服务器.

I have an app that makes a request to a server and gets authenticated. I'm wondering if it is a possible to write a listener that listens for requests and if any request matches that particular request the listener sends back a message, without it actually getting to the server.

本质上,我想制作应用程序.认为它实际上已经通过了验证.

In essence I want to make the app. think it has been authenticated when it actually hasn't.

这是WireShack上tcp流的外观.突出显示的响应正是我希望我的代码响应的.

This is what the tcp stream looks like on WireShack. The highlighted response is exactly what I want my code to respond to.

这可能吗?

推荐答案

是.它称为代理",您可以在C#中通过使用 System.Net.Sockets 命名空间来实现.或者,您可以使用提琴手,而根本不用编程.:)(顺便说一句-AFAIK Fiddler也是用C#编写的)

Yes. It's called a "proxy", and you can do that in C# by using System.Net.Sockets namespace. Or you can use Fiddler and forget about programming at all. :) (Btw - AFAIK Fiddler is written in C# too)

这篇关于如何在C#中欺骗TCP/HTTP响应的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆