BBC IPlayer XOR Decryption

June 11th, 2008

As has been widely reported, it is still possible to successfully download the x264 MPEG streams of BBC programmes from the BBC IPlayer service but that they are now XOR “encrypted” in such a way that they will only play on Apple mobile devices.

BBC IPlayer XOR Decryption

It’s not really encryption, is it

Long story short, the streams are XOR’d with a two-byte repeating pattern. It’s not yet clear how the iPhone picks up the two-byte key for this XOR scheme, or what kind of inside knowledge was needed to discover the capability (collusion?), but it’s rumoured that the XOR scheme has actually broken the iPod Touch functionality. If this is true it’s a massive WTF and probably rules out any idea of the BBC colluding with Apple over this.

Putting the moral arguments for the BBC’s latest move aside for a second. It’s fairly simple to deXOR the files and there are already a handful of pre-written scripts for doing just that.

So, What Are The Options?

Paul Battley has patched his iplayer-dl script so that it will continue to function in light of the XOR encryption. He’s also planning on patching the Windows GUI version for n00bs.

There’s a nice little perl script which should prove pretty useful for those of use already using one of the perl based solutions to access the TV shows we’re forced to pay for.

Most interestingly i’ve found some C++ code for decrypting the streams which is available at beebhack along with simple instructions for how to compile it for use.

The cat and mouse game continues. Yawn.

Update: June 12th 2008 Paul Battley has released updated versions of both his ruby command line tool and the Windows GUI download client. Not only that but this morning, new releases of both have appeared which utilise faster XOR decryption. His blog post details the changes.

The new project page for iPlayer Downloader is at http://po-ru.com/projects/iplayer-downloader/

Posted in Rants | 3 Comments »

Tips for Using JQuery with ASP.NET Ajax

June 9th, 2008

Dave Ward has put together an excellent and extensive post on his experiences integrating jQuery with ASP.NET

There are the usual number of pitfalls you’d expect when integrating [insert widely-used microsoft technology here] with [insert useful open source technology here]

Want to consume a JSON Web Service with jQuery? Sounds simple. That’s kinda the point of JSON right? Well yeah, but no. Everything’s workaroundable and to be fair it isn’t all Microsoft’s fault… ok so most of it is.

I’m gonna be starting a large scale ASP.NET / jQuery / ExtJS project in the very near future and Dave’s short guide has probably just saved me several hours if not a whole day of figuring out all the lumps and bumps myself.

Posted in Web | No Comments »

Microsoft SQL Server Vs MySQL

June 6th, 2008

A collegaue of mine - a VB developer - sent me a link to this page on the Microsoft website which attempts to comapre MySQL to their own SQL Server by drawing some.. shall we say creative comparisons.

By no means is the article completely factually inaccurately. There are many valid points which no one would argue with and SQL Server does offer many advantages over MySQL in many of the areas they have highlighted.

But thrown in amongst the facts are some pretty wild innacuracies. Mostly of the usual “let’s confuse people that don’t really understand how open source software works” variety. Let’s have a look:

MySQL currently has approximately 70 developers and 50 support staff members

They say this like 70 is not a large number of developers, then don’t offer an insight into how many developers they have working full time on SQL Server. I wonder why?

Unproven performance and limited scalability

Google use MySQL. If that’s not proof of performance and scalability then I don’t know what is.

MySQL has many security challenges (which means you may, too)

Windows Media player has “many security challenges”. Yes MySQL has “security challenges” but name me one piece of software (especially from the boys at Redmond) that doesn’t.

MySQL is free—until you need support, advice, alerts, and regularly scheduled updates

Maybe I’m missing the point but I don’t see this as a negative. It’s free. If you need support you can pay for it. On the other hand Microsoft SQL Server is a commercial product which you must pay for from the outset. It’s like comparing a badger to a chocolate cake and saying the cake is better cause it tastes more like chocolate.

In fact I believe I have hit the nail squarely on the head.

Comparing MySQL to SQL Server is like comparing a badger to a chocolate cake and saying the cake is better cause it tastes more like chocolate.

and you can quote me on that.

Posted in Web | 1 Comment »

imagettfbbox() Could not find/open font

June 4th, 2008

This evening I noticed a problem with the script which generates the image headings for this site. It had stopped working. I hadn’t noticed until now because the process caches all previously generated images and as such it hadn’t actually run for a while.

The error

imagettfbbox() [function.imagettfbbox]: Could not find/open font

The specified font file existed and was readable. I was in fact testing for this eventuality using is_readable() prior to the the imagettfbbox call. After some poking around and a bit of googling I narrowed the problem down to a bug.. or feature in PHP > 4.3.0

The solution

It’s a simple fix, but what worked for me was to pass imagettfbbox an absolute path to the font. This is with PHP 5.2.0. I’ve read of this working for lots of people using various versions of PHP from 4.3.0 onwards, but it also seems that this isn’t always the solution, so your mileage may vary. As usual, it probably depends on a magic combination of seven million random compile flags.

So to sum up. Using imagettfbbox with relative font paths in PHP >= 4.3.0 may result in an error. A solution seems to be to use absolute paths. If this isn’t the issue, it could be spaces in the filename? Your really shouldn’t put spaces in filenames, what are you a windows user?

Official bug report here: http://bugs.php.net/bug.php?id=22092

Sometimes* PHP just sucks

* all the time

Posted in Web | No Comments »

The Semantic Web On The Horizon?

May 21st, 2008

It’s all to easy to dismiss the concept of the semantic web as just another one of Tim Berners-Lee’s “look at me i invented the Internet don’t you know” attempts not fall into obscurity, but today I was pointed this morning in the direction of an open email from a developer working within the BBC about the BETA BBC Programmes service, which provides listings for all BBC channels.

We updated the /programmes site today and there are some new views
that might be of use…

See all programmes on a service with broadcasts +/- 7 days from now at
/:service/programmes/a-z
http://www.bbc.co.uk/bbcfour/programmes/a-z
http://www.bbc.co.uk/6music/programmes/a-z

Add /all to remove the 7 day restriction, or /player to show just the
programmes with episodes available in iPlayer:
http://www.bbc.co.uk/radio1/programmes/a-z/all
http://www.bbc.co.uk/radio3/programmes/a-z/player

Search within a service by adding “/by/:search” after “/a-z”:
http://www.bbc.co.uk/radio4/programmes/a-z/by/e
http://www.bbc.co.uk/bbcone/programmes/a-z/by/doctor
http://www.bbc.co.uk/bbctwo/programmes/a-z/by/food/all

Or search within all radio, all tv (soon), or all BBC services:
http://www.bbc.co.uk/radio/programmes/a-z/by/chris/player
http://www.bbc.co.uk/tv/programmes/a-z/by/east (soon)
http://www.bbc.co.uk/programmes/a-z/by/skating/all

With one known and soon to be fixed exception, all the /programmes
pages should be valid XML (and XHTML!), and hopefully easy to process
with XPath etc.

Not new, but you can fetch schedule data through the /programmes site.
Today’s schedules:
http://www.bbc.co.uk/radio4/programmes/schedules/fm
http://www.bbc.co.uk/bbc7/programmes/schedules

Or a schedule for a particular date:
http://www.bbc.co.uk/bbcfour/programmes/schedules/2008/04/28
http://www.bbc.co.uk/bbctwo/programmes/schedules/england/2008/05/22

(Unfortunately, BBC One and BBC Two data outside the London and
England regions can be patchy; we’re working on improving that.)

Add .xml to the end of a schedule URL to get an XML representation, or
.json for JSON. The format of the .xml and .json representations
isn’t fixed yet, but we’re interested in any feedback from people
using them.

I think this is a promising step forward. They know people have been screenscraping their HTML output for years and they’ve responded by providing direct access to the data that people. Of course, there will never be a true Semantic Web until all content providers release the 20th century style stanglehold they like to keep on their content.

Posted in Web | No Comments »

« Older Entries Newer Entries »