ie page 24 - Dave's Blog

Search
My timeline on Mastodon

Capturing HTTPS with FiddlerCore

2011 Apr 6, 10:00

I used FiddlerCore in GeolocMock to edit HTTPS responses and ran into two stumbling blocks that I'll document here. The first is that I didn't check if the Fiddler root cert existed or was installed, which of course is necessary to edit HTTPS traffic. The following is my code where I check for the certs.

    if (!Fiddler.CertMaker.rootCertExists())
{
if (!Fiddler.CertMaker.createRootCert())
{
throw new Exception("Unable to create cert for FiddlerCore.");
}
}

if (!Fiddler.CertMaker.rootCertIsTrusted())
{
if (!Fiddler.CertMaker.trustRootCert())
{
throw new Exception("Unable to install FiddlerCore's cert.");
}
}

The second problem I had (which would have been solved had I read all the sample code first) was that my changes weren't being applied. In my app I only need the BeforeResponse but in order to modify the response I must also sign up for the BeforeRequest event and mark the bBufferResponse flag on the session before the response comes back. For example:

    Fiddler.FiddlerApplication.BeforeRequest += new SessionStateHandler(FiddlerApplication_BeforeRequest);
Fiddler.FiddlerApplication.BeforeResponse += new SessionStateHandler(FiddlerApplication_BeforeResponse);
...
private void FiddlerApplication_BeforeRequest(Session oSession)
{
if (IsInterestingSession(oSession))
{
oSession.bBufferResponse = true;
}
}
PermalinkCommentshttp fiddler technical https geolocmock programming fiddlercore

RFC 6202 - Known Issues and Best Practices for the Use of Long Polling and Streaming in Bidirectional HTTP

2011 Apr 5, 3:23Best practices for Comet style polling in HTTP.PermalinkCommentstechnical rfc ietf http streaming polling

Using client-side storage, today. ✩ Mozilla Hacks – the Web developer blog

2011 Apr 5, 5:14A JS wrapper script that lets you use storage in IE6/7 via userData or localStorage every where else.PermalinkCommentsjavascript html web webbrowser storage technical userdata localstorage

Schneier on Security: Ebook Fraud

2011 Apr 4, 11:18Two eBook frauds involving the automated creation and publishing of books in order to make money off the long tail. The spam of books.PermalinkCommentsebook fraud bruce-schneier security amazon copyright publishing

IE9 Document Mode in WebOC

2011 Apr 4, 10:00

Working on GeolocMock it took me a bit to realize why my HTML could use the W3C Geolocation API in IE9 but not in my WebBrowser control in my .NET application. Eventually I realized that I was getting the wrong IE doc mode. Reading this old More IE8 Extensibility Improvements IE blog post from the IE blog I found the issue is that for app compat the WebOC picks older doc modes but an app hosting the WebOC can set a regkey to get different doc modes. The IE9 mode isn't listed in that article but I took a guess based on the values there and the decimal value 9999 gets my app IE9 mode. The following is the code I run in my application to set its regkey so that my app can get the IE9 doc mode and use the geolocation API.



        static private void UseIE9DocMode()
{
RegistryKey key = null;
try
{
key = Registry.CurrentUser.OpenSubKey("Software\\Microsoft\\Internet Explorer\\Main\\FeatureControl\\FEATURE_BROWSER_EMULATION", true);
}
catch (Exception)
{
key = Registry.CurrentUser.CreateSubKey("Software\\Microsoft\\Internet Explorer\\Main\\FeatureControl\\FEATURE_BROWSER_EMULATION");
}
key.SetValue(System.Diagnostics.Process.GetCurrentProcess().MainModule.ModuleName, 9999, RegistryValueKind.DWord);
key.Close();
}
PermalinkCommentsweboc fck ie document mode technical ie9

GeolocMock Tool - Tell IE9 Where You Are

2011 Apr 3, 12:00

I've made GeolocMock. If your PC has no geolocation devices, IE9 uses a webservice to determine your location. GeolocMock uses FiddlerCore to intercept the response from the webservice and allows the user to replace the location in the response with another. This was a fun weekend project in order to play with FiddlerCore, the W3C Geoloc APIs in IE9, hosting the IE9 WebOC in a .NET app, and the Bing Maps APIs.

PermalinkCommentsfiddler technical geoloc ie9 fiddlercore

Internet Explorer team sent us cake for shipping Firefox 4 #fx4 on Twitpic

2011 Mar 22, 12:51We've now got IE9 and FF4 which means time for more cake!PermalinkCommentshumor browser webbrowser firefox ie ie9 ff4 mozilla microsoft

BBC News - Polar bears get the better of spy cameras

2011 Mar 10, 6:14Polar bears destroy hiddern cameras (filming them for Science!) It is a well known fact that polar bears are very protective of their rights to privacy.
PermalinkCommentsvideo science nature animals bbc humor

Bluetooth Glove: Talk to the Hand!

2011 Mar 7, 9:13Instructions for a DIY bluetooth glove with mic in pinky and earpiece in thumb.
PermalinkCommentsbluetooth humor awesome phone diy

YouTube - Minecraft Experiments in Animal Sacrifice #3: Double Slit Experiment

2011 Mar 3, 5:53PermalinkCommentsminecraft humor video chicken science

Listen to Max Tannone and Watch Moon

2011 Feb 23, 1:13
Max Tannone does awesome remix albums:


Also, the movie Moon is really good on a variety of points. Sam Rockwell and the voice of Kevin Spacey! Its available on Netflix Watch Instantly so you have no excuse!
PermalinkComments

Mind vs. Machine - Magazine - The Atlantic

2011 Feb 17, 1:01Brian Christian on his involvement in the 2009 Turing Test and his goal of winning Most Human Human.PermalinkCommentshistory ai science

IE9 on Windows Phone - IEBlog - Site Home - MSDN Blogs

2011 Feb 14, 6:57PermalinkCommentswindows ie mobile ie9 technical

"Space is meaningless": Hazard is indie, non-Euclidean, brilliant

2011 Feb 11, 5:43PermalinkCommentsgame indie hazard video

IE9 RC Minor Changes List - EricLaw's IEInternals - Site Home - MSDN Blogs

2011 Feb 11, 5:37PermalinkCommentsie9 development technical ie browser web eric-lawrence

Managing the browser viewport in Windows Phone 7 - IE for Windows Phone Team Weblog - Site Home - MSDN Blogs

2011 Jan 23, 4:44PermalinkCommentsmobile windows ie wp7 windows-phone-7 blog technical browser html viewport

Back to the Future (1985) - a set on Flickr

2011 Jan 23, 3:26Personal photos from the Back to the Future set during filming taken by a Universal security guard.
PermalinkCommentsphotos bttf backtothefuture movies

Reviewing the winners of the Design Julian Assange's Next Hairstyle competition. - Boing Boing

2011 Jan 19, 7:44Lol at Team Rocket Julian Assange.
PermalinkCommentsjulian-assange humor image photo photoshop

Ratatat Rocks

2010 Dec 28, 10:42
I just found out that I like the group Ratatat. I'd first heard them way back when the Zune was first released as the backing for Los Corazones on the zune-arts.net website.




But I didn't know who they were until today when I watched this Filmography 2010 video (via Kottke)



Until about 1:16 in, the music is Ratatat's Nostrand. On the first viewing it drove me crazy because I could only vaguely recall hearing something like that music before. I tracked it down via the zune-arts thing above and eventually found my way to the Nostrand video. Funny, all the recent comments on that one are from people who also just watched the Filmography video.
PermalinkComments

draft-ietf-oauth-v2 - The OAuth 2.0 Protocol Framework

2010 Dec 15, 10:02The OAuth 2 spec still in progress.PermalinkCommentsspecification reference ietf spec oauth technical
Older EntriesNewer Entries Creative Commons License Some rights reserved.