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;
}
}
http fiddler technical https geolocmock programming fiddlercore 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.
fiddler technical geoloc ie9 fiddlercore 2011 Mar 28, 4:06"ILSpy is the open-source .NET assembly browser and decompiler. Development started after Red Gate announced that the free version of .NET Reflector would cease to exist by end of February 2011."
.net tools reflector c# development csharp dotnet technical tool 2010 Dec 28, 10:42 2010 Dec 14, 11:21Documentary on WikiLeaks: "From summer 2010 until now, Swedish Television has been following the secretive media network WikiLeaks and its enigmatic Editor-in-Chief Julian Assange."
wikileaks technical video 2010 Dec 6, 12:17Ye olde DoS: "The Berners Street Hoax was perpetrated by Theodore Hook in the City of Westminster, London, in 1809. Hook had made a bet with his friend, Samuel Beazley, that he could transform any
house in London into the most talked-about address in a week, which he achieved by sending out thousands of letters in the name of Mrs Tottenham, who lived at 54 Berners Street, requesting
deliveries, visitors, and assistance."
humor history prank 2010 Sep 27, 3:15This is awesome and similar to something I got a cube for. Wikipedia runs its videos through a service that sets up torrents for arbitrary URLs. So awesome! Now if only this were built into the user
agent rather than requiring hardcoding the sites to use it...
technical p2p wikipedia network networking torrent web 2010 Aug 14, 5:34pInvoke.net is a wiki for the C# interop declarations for various Win32 functions.
pinvoke c# csharp consle api windows reference wiki technical 2010 May 6, 7:25Another subset of javascript and DOM access to make a sandbox: "FBJS is Facebook's solution for developers who want to use JavaScript in their Facebook applications. We built FBJS to empower
developers with all the functionality they need, and to protect our users' privacy at the same time."
sandbox web browser facebook html javascript technical security web-sandbox 2010 Mar 12, 11:11"All of the sculpted noses on the planet Viltvodle VI were fashioned after Douglas Adams' own. The creators used a 3D model he had created for the game Starship Titanic." The noses mentioned in the
previous sentence were depicted in the movie in a church. The religion of this church maintains that the universe was created by their god sneezing out the universe and so they have statues of their
god's nose throughout the church. Of course this is intended to seem absurd, however based on the previous sentence -- that the nose belonged to Douglas Adams -- then they really were worshping the
nose of their creator.
douglas-adams book hhgttg movie religion nose 2010 Mar 5, 10:21Document explaining the relationship between the various web storage APIs coming out of HTML 5. To summarize:
Web Storage (aka DOM Storage) - simple key/value pairs API.
WebSimple DB API - now called Indexed Database API.
Indexed Database API and Web SQL Database - competing database APIs.
Application Cache - Storage of HTTP resources for offline apps.
DataCache API - A programmatically modifiable Application Cache.
html html5 standard programming technical wiki w3c database storage web 2010 Jan 20, 8:56I had no idea of the amount of variation: "The Tetris Guideline is the current specification that The Tetris Company enforces for making all new (2001 and later) Tetris game products alike in form."
Covers things like piece color, vocabulary, speeds, rotation system etc etc etc. I'll be adopting some of this in Polytope Tetris...
tetris wiki reference game videogame 2010 Jan 18, 3:24"UVB-76 is the callsign of a shortwave radio station that usually broadcasts on the frequency 4625 kHz (AM full carrier). It's known among radio listeners by the nickname The Buzzer. It features a
short, monotonous buzz tone (help·info), repeating at a rate of approximately 25 tones per minute, for 24 hours per day. The station has been observed since around 1982.[1] In rare occasions, the
buzzer signal is interrupted and a voice transmission in Russian takes place. Only four such events have been noted. There is much speculation; however, the actual purpose of this station remains
unknown." Inspiration for Lost?
radio russia mystery 2010 Jan 5, 7:42
I've made a WPAD server Fiddler extension and in a fit of creativity I've named it: WPAD Server Fiddler
Extension.
Of course you know about Fiddler, Eric's awesome HTTP debugger tool, the HTTP proxy that lets you inspect, visualize and modify the
HTTP traffic that flows through it. And on the subject you've probably definitely heard of WPAD, the Web Proxy Auto Discovery protocol
that allows web browsers like IE to use DHCP or DNS to automatically discover HTTP proxies on their network. While working on a particularly nasty WPAD bug towards the end of IE8 I really wished I
had a way to see the WPAD requests and responses and modify PAC responses in Fiddler. Well the wishes of me of the past are now fulfilled by present day me as this Fiddler extension will respond to
WPAD DHCP requests telling those clients (by default) that Fiddler is their proxy.
When I started working on this project I didn't really understand how DHCP worked especially with respect to WPAD. I won't bore you with my misconceptions: it works by having your one DHCP server
on your network respond to regular DHCP requests as well as WPAD DHCP requests. And Windows I've found runs a DHCP client service (you can start/stop it via Start|Run|'services.msc', scroll to DHCP
Client or via the command line with "net start/stop 'DHCP Client'") that caches DHCP server responses making it just slightly more difficult to test and debug my extension. If a Windows app uses
the DHCP client APIs to ask for the WPAD option, this service will send out a DHCP request and take the first DHCP server response it gets. That means that if you're on a network with a DHCP
server, my extension will be racing to respond to the client. If the DHCP server wins then the client ignores the WPAD response from my extension.
Various documents and tools I found useful while working on this:
proxy fiddler http technical debug wpad pac tool dhcp 2009 Sep 10, 6:42"Although HTML and XHTML appear to have similarities in their syntax, they are significantly different in many ways."
html html5 xml xhtml whatwg wiki technical