Bharpinder Singh
asked on
c# Record outgoing http(s) requests from system/browser
I want a simple c# code which logs or retrieve last requested url by any of browser in the system.
As per my knowledge (correct me if its wrong) any url requested in browser went to TCP , so any way we tracked before initiated by TCP.
As per my knowledge (correct me if its wrong) any url requested in browser went to TCP , so any way we tracked before initiated by TCP.
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
try
{
byte[] input = BitConverter.GetBytes(1);
byte[] buffer = new byte[4096];
Socket s = new Socket(AddressFamily.Inter
s.Bind(new IPEndPoint(IPAddress.Parse
s.IOControl(IOControlCode.
int bytes = 0;
do
{
bytes = s.Receive(buffer);
if (bytes > 0)
{
if(Encoding.UTF8.GetString
}
}
} while (bytes > 0);
}
catch (Exception ex)
{
File.WriteAllText("C:/Hlog
}