0

First, why do I need that? I have Wifi network. I want everyone that just connected to wifi first to redirect to login page and then if login is successful - redirect to the page requested. I thought to do that using PCap. But since WinPCap allows just to monitor packets, I can't stop packet from being sent to destination host. So the question is how can I sniff packet and change it content? As of beginning i want to capture HTTP packets only from specified network adapter.

John Arlen
  • 6,539
  • 2
  • 33
  • 42
seeker
  • 3,255
  • 7
  • 36
  • 68
  • 2
    Most routers will have a built in mechanism for authentication. Why are you trying to do all of this manually? – Servy Nov 08 '12 at 17:17
  • because I want to control authorization process on my server, not router. – seeker Nov 08 '12 at 17:18
  • 1
    Your question and intent do not match. Your intent seem to be "how to implement gateway/proxy" but question is "how to modify network packets". You need either to learn more about TCP routing OR change the reason in the question. – Alexei Levenkov Nov 08 '12 at 17:24
  • Yes, I need a kind of proxy, but i want to redirect to that proxy packets, which come from wifi adapter. Is that possible without client machines configuration? – seeker Nov 08 '12 at 17:27

1 Answers1

2

That's really hard to do the way you describe - doing this on "packet level" will present several problems (among others performance!).

To achieve what you want you have several easier and better suited options:

  • use a proxy which handles the autentication part

  • build a proxy (see this for C# source code etc.)

For the proxy-based options you just need to configure the network in a way that all outbound traffic must use that proxy...

Community
  • 1
  • 1
Yahia
  • 69,653
  • 9
  • 115
  • 144