Hi,
What can be a best way of doing Http redirection: Whether should I go for Layered Service Provider or use Libpcap for this?
Thanks
-Munir
8 replies to this topic
#1
Posted 23 February 2011 - 07:30 PM
|
|
|
#2
Posted 23 February 2011 - 07:41 PM
Sorry for the questions, but what are Layered Service Provider and Libpcap?
#3
Posted 24 February 2011 - 02:17 AM
@RR, LSP and libpcap are libraries that insert itself in to the TCP/IP stack for example to capture data or manipulate traffic (wireshark or traffic spectrum analysers often use libpcap for example)
@Munir
From what I can see LSP SPI is fairly undocumented, this is especially true because it is a more unused part of the Winsock API, although I think it is what you need to use as libpcap was made with analysing in mind rather than modifying inbound or outbound traffic. (if I get what you are wanting to do)
@Munir
From what I can see LSP SPI is fairly undocumented, this is especially true because it is a more unused part of the Winsock API, although I think it is what you need to use as libpcap was made with analysing in mind rather than modifying inbound or outbound traffic. (if I get what you are wanting to do)
Be sure to read the updated FAQ! || Health is achieved through the same 10,000 steps.
If a suggested code/method fails, informing us is less important than telling us why or what errors occurred.
If a suggested code/method fails, informing us is less important than telling us why or what errors occurred.
#4
Posted 25 February 2011 - 04:03 AM
You can do this with pcap, and you should.
Developing lsp can be tedious, as you will most likely corrupt your tcp/ip stack more than once.
Developing lsp can be tedious, as you will most likely corrupt your tcp/ip stack more than once.
std::string s("oberq zhpu?");std::for_each(s.begin(),s.end(),[&](char&c){c=~c;c=~c-0x01/(~(c|0x20)/0x0D*0x02-0x0B)*0x0D;});std::cout<<s;
#5
Posted 26 February 2011 - 07:29 AM
Hi,
I did it using LSP: I thought its more easy than using pCap: as I simply added my code to WSPSend/WSRecv function to stop or redirect http request.
Thanks
-Munir
I did it using LSP: I thought its more easy than using pCap: as I simply added my code to WSPSend/WSRecv function to stop or redirect http request.
Thanks
-Munir
#6
Posted 28 March 2011 - 02:28 PM
Hi Munir,
I have attempted to add http redirection as well using the LSP WSPSend/WSPRecv functions. The redirection works fine in IE/Firefox, but fails in Chrome. Any thoughts? Does your redirection work in all browsers? Would you be willing to share your code?
Thanks,
Jared
I have attempted to add http redirection as well using the LSP WSPSend/WSPRecv functions. The redirection works fine in IE/Firefox, but fails in Chrome. Any thoughts? Does your redirection work in all browsers? Would you be willing to share your code?
Thanks,
Jared
#7
Posted 28 March 2011 - 04:24 PM
Do you guys actually send HTTP code (as in socket programming), or are those pCap/LSP high-level function libraries?
#8
Posted 29 March 2011 - 12:14 AM
Hi,
Chrome uses overlapped you have to wait within WSPRecv for the overlapped io to get completed.
BTW, I'm having performance issue: can you share with me your code: I ll add code for Chrome so it helps both of us :-)
-Munir
Chrome uses overlapped you have to wait within WSPRecv for the overlapped io to get completed.
BTW, I'm having performance issue: can you share with me your code: I ll add code for Chrome so it helps both of us :-)
-Munir
#9
Posted 29 March 2011 - 09:03 PM
mnirahd said:
Hi,
What can be a best way of doing Http redirection: Whether should I go for Layered Service Provider or use Libpcap for this?
What can be a best way of doing Http redirection: Whether should I go for Layered Service Provider or use Libpcap for this?
I was really confused there for a minute... "HTTP redirection" usually means handling 3xx return codes... but you're talking about LSP and pcap, so I assume you're really trying to listen in on http traffic, right?
Looking for a job that doesn't suck? Try not getting hired to make posts with a spam-sig!
1 user(s) are reading this topic
0 members, 1 guests, 0 anonymous users


Sign In
Create Account


Back to top









