Project Description
This library provides a mechanism of accessing Internet Explorer's low-integrity cookies from a regular process.

On Vista and Windows 7, Internet Explorer runs in Protected Mode. As a result the cookies it stores aren't easily accessible via the normal API's. They're only accessible by a process running in low integrity mode.

This library with it's helper process allows access to these cookies. It checks to see what OS is running and whether the requested URI is in proteced mode before spawning its helper process, so the library can be used on both XP and Vista.

The library was built using .NET 3.5, though it could easily be made to run on .NET 3.0. WCF Named Pipes are used for inter-process communication.

To use it, you could use something like:

using (CookieManager cm = new CookieManager())
{
Uri req = new Uri("http://www.nytimes.com");
CookieContainer container = cm.GetCookieContainerUri(req);

PrintCookies(container, req);

Console.ReadKey();
}

You can optionally set an IdleTimeOut property on the CookieManager to indicate how long the helper process should stay alive after the last request. The default is 10 min. If the process is killed prior to the timeout, it's automatically restarted.

One of the classes, LowIntegrityProcess, might be useful for other applications too. It uses the Win32 Token and CreateProcessAsUser APIs to modify a copy of the current process token for launching the child with lower integrity.

If you run into bugs, please post them.

Thanks,
--Oren

Last edited Nov 23, 2009 at 12:31 PM by onovotny, version 6