Archive for November, 2007


The Register has been having fun with a script that removes all mention of the word “iPhone” from webpages; a necessary function these days. Better, they developed it to work on an iPhone; but just check out the code.

// JavaScript here

//This one thinks it's an object
var myRequest = new XMLHttpRequest();

//This is the text we're going to change the word "iPhone" to
var changeTo = "";

//This is our home page, and the site that leaving will unload the app
var home = '';

function startUp() {
changeTo = readCookie("newName")
if (changeTo == null) {
changeTo = window.prompt("So what would better suit the iPhone?");
createCookie("newName", changeTo, 1);

function loadRegister(targetURL) {

//targetDomain is set to a string containing the site (but not directories or file) that the user clicked on
var targetDomain = targetURL.substring(targetURL.indexOf(".", 8)+1, targetURL.indexOf("/", 8));

//We compare that to our home page
if (home.indexOf(targetDomain) == -1) {
alert("Moving Off Site: " + targetDomain);
//This line unloads this application, as the targetURL replaces this document

//Then we load the page"GET", targetURL);
myRequest.onload = targetLoaded;

function targetLoaded() {
var loadedSite = myRequest.responseText;

loadedSite = loadedSite.replace(/iPhone /g, changeTo + " ");
loadedSite = loadedSite.replace(/ iPhone/g, " " + changeTo);

var counter;

var loadedDocument = parent.frames[0].document;;
//This is our horrible bodge which waits 10 seconds for the page to load
setTimeout('pageLoaded()', 10000);

function pageLoaded() {
//This loops through every link on the page (241 on the El Reg home page when we were testing this) and adds an "onclick" even listener
for (i=0; i < parent.frames[0].document.links.length; i++) {
parent.frames[0].document.links[i].onclick = linkClicked;

function linkClicked() {
//We return "false" so the browser dosen't attempt to load the link clicked on.
return false;

function returnHome() {

function changeName() {
changeTo = window.prompt("So what would better suit the iPhone?");
createCookie("newName", changeTo, 1);

function createCookie(name,value,days) {
if (days) {
var date = new Date();
var expires = "; expires="+date.toGMTString();
else var expires = "";
document.cookie = name+"="+value+expires+"; path=/";
function readCookie(name) {
var nameEQ = name + "=";
var ca = document.cookie.split(';');
for(var i=0;i < ca.length;i++) {
var c = ca[i];
while (c.charAt(0)==' ') c = c.substring(1,c.length);
if (c.indexOf(nameEQ) == 0) return c.substring(nameEQ.length,c.length);
return null;
function eraseCookie(name) {

Nurgs! My brane! Now this is why I like Python…

#! usr/bin/env/ python

import string
import urllib
import webbrowser

print ('Enter a URL for de-iPhoning')

input = raw_input()
url = urllib.urlopen(input)
data =
snip = input.replace('http://www.', '')
fname =('/home/yorksranter/.mozilla/firefox/ydirmggn.default/Cache/'+snip)
f = open(fname, 'w')
d = data.replace('iPhone', '')


Obviously you’ll want to replace the file path with your own browser cache, unless you like this blog so much you named your user account after it. Windows users should do the same and remove the first line.

No wonder the Reg guy ended up saying this:

We also decided that we’re not going to develop anything else for the iPhone until there’s a proper development kit, allowing the use of a proper programming language, and some decent documentation too.

All TYR Labs code in this post has passed the rigorous Atwood Certification Test.


Sun Microsystems is building a data centre in an abandoned Japanese coal mine using 30 of their data-centre-in-a-shipping-container boxes. Of course, the ostensible reason is that it’s always 15 degrees down there, so they expect to save 50 per cent of the electricity requirement, and further it’s as secure as you like.

But seriously, this has to be the secret base for a sci-fi villain, no? No mention of a white cat, but you bet there’s one in there.

Everyone was all over this NYT story about those vanishing cargoes of guns in Iraq. It’s nothing new if you’ve been reading this blog; we’ve been concerned about this ever since 2005. And, unlike Spencer Ackerman, we’ve got the whole supply chain; those guns didn’t come on no C-17, Spence, but on JLI and Aerocom Il-76s ex-Tuzla, some of which may not even have gone to Baghdad at all but instead filed new flight plans enroute and continued to Dubai, Djibouti, the Yemen, and many other locations.

However, the report does sharpen up our knowledge of what happened when guns did arrive in Iraq; I suspected that any vaguely official looking party might have been able to make off with them, especially the fake policemen so common in Iraq, and it looks like that’s precisely what happened. Apparently, US and Iraqi officers would rush to the airport when they heard a shipment had arrived in order to grab it before anyone else did, and no documentation was checked or indeed presented.

Further, weapons were being misappropriated and sold both by Iraqi contractors and US officers; it’s also certain that the insurgents were acquiring arms from the shipments, as the guns kept turning up in captured caches and stocks turned in under a buy-back program. However, much of the materiel was impossible to trace as the shippers didn’t have to provide lists of serial numbers; it seems the US recipients didn’t bother to catalogue them either.

We also know that the Bosnian authorities were systematically deceived about the contents of shipments leaving Tuzla; as were the British authorities in the Sloman Traveller case. It is literally impossible to say how many weapons were loaded in the Balkans, how many were unloaded in Baghdad, or what happened to any balance. (Although we do have a reasonable idea where to start looking for some of them at least.)

It may also be significant that the corruption the NYT describes began just as the involvement with Viktor Bout did.

Right: it’s time for a final desperate push before the MPA meets on Thursday.

So far, we can update our lists as follows:

5 declared Labour members.
1 Green, Jenny Jones, still hanging on for the decentralised, human-scale virtues of ecologically plugging random electricians on the tube. But we’re getting in touch…
7 Tories and Liberals.
Cindy Butts, Faith Boardman, and Richard Sumray, who are all for various reasons parti pris for the Government.
Damien Hockney is voting no confidence in Sir Ian Blair.
Karim Murji, I’m informed, is voting the Government ticket.

That’s 10 members of the Glock 17 caucus to 8 in the Axis of Reason. Who’s left?

Now see this: looks like MPA e-mail addresses are

Aneeta Prem,, webform; “has the top electrical consultants to build your home’s intelligent lighting system,” apparently.
Reshard Auladin: Has “a keen interest in British Muslim affairs” according to the MPA.
Rachel Whittaker;, 020 7202 0223. Not this one.
Kirsten Hearn “Wishes to describe herself as a stroppy, blind dyke, and proud of it”, apparently, not to mention a professional troublemaker. Surely, surely, surely this woman cannot be planning to vote in favour of the cops randomly shooting people?
John Roberts. Has “14 years of experience of working with London’s hard to reach communities”, apparently.

And Peter Herbert of the Society of Black Lawyers, we think, is sound.

If you have any spare time this week at all, and especially if you live in London; can you please take the time to contact one of these people? And if you’ve got a blog, can you please reproduce this? Remember that in a two-horse race like this, every swinger counts double; not just a vote for our side, but one less for them. We’re now 10-9, with 5 votes in play; play up, play up, and play the game.

They switched it on… and the Internet vanished!

Target for Tonight

The Metropolitan Police Authority meets on the 22nd November to discuss Sir Ian Blair’s case; they cannot be left uninformed.

This body consists of members from the London Assembly, magistrates, and “independent members”. Their details are here. The balance is as follows – 7 Conservatives and Liberal Democrats, who can be expected to vote no confidence in Blair out of partisanship. There are 5 Labour members, including Deputy Mayor Nicky Gavron and MPA Chair Len Duvall, all of whom can be expected to back him. There is Green Jenny Jones, who has gone public supporting Blair. Anti-hierarchical ecofeminism, right?

Then there are 9 independent and magistrates; out of these, Cindy Butts is an ex-researcher to the Economic Sec of the Treasury and therefore must be considered a Government vote, and Richard Sumray is an Olympic bid official and therefore is also captured. Considering the certainties, the vote breaks 50-50.

Then there is Faith Boardman, who is an independent member, ex-Lambeth Council CEO; i.e. probably Labour, and anyway as the former head of the CSA she cannot be expected to oppose public incompetence. 9-7 to Killer of the Yard.

Now we have Aneeta Prem (07958 737491., Rachel Whittaker, Peter Herbert, Karim Murji, John Roberts, Kirsten Hearn, Reshard Auladi, and that titan of statesmanship Damian Hockney, the “One London” man and ex-UKIPper.

We need to get 2 more votes than t’othersiders out of this group. Hockney has gone public supporting Blair, but with him anything is possible. Assuming he votes with the Government, they have a 3 vote lead; we need to get 6 of the remaining indies on board to fire the fucker. I want a full-dress blogswarm on this; think of the Iraqi employees’ campaign and square it. In fact, think of Josh Marshall’s US social security drive.

The IPCC report is, first of all, a cracking job of work, despite that the Met did its level best to dodge the investigators. They have established a lot of facts, and carried out a mass of interviews, and come up with sensible conclusions; I’d like to recommend again that you read it, as it is likely to be the Rosetta stone of the anti-terrorism state in the late Blair period.

For example, we learn the details of Operation KRATOS and its twin, Operation C. KRATOS and C were plans drawn up to deal with the possibility of a suicide bomber being spotted in London, and that it might be necessary to shoot them. C, hitherto unknown to the public at large, was intended to deal with a bomber spotted at a major public event, when the police response would be largely pre-planned and under central command and control. C foresaw that if some conditions were fulfilled, a designated senior officer (DSO) at Scotland Yard would be able to order a sniper to shoot them.

KRATOS, meanwhile, was intended to deal with the (much more likely) situation in which the suspect was at large in the streets, and therefore that no prior planning would be possible. Quite wisely, the KRATOS procedures put a much greater emphasis on local control. The role of the DSO still existed, as did a set of rules demanding that all intelligence sources must be reviewed, that the police should try to confront the suspect in the open, or at a moment that would keep them away from the public, so that negotiation or a nonlethal weapon could be tried. But the silver commander, the field commander, rather than Scotland Yard was in charge.

Operation THESEUS 2, the operation launched after the discovery of Hussain Osman’s gym card, didn’t fit either of these very well. The plan Thomas MacDowell prepared fit them even less – it foresaw that the occupants of the flats would be allowed to leave, watched, and approached by police out of sight from the building, which meant it was neither a set piece nor a mobile operation. It was also half a surveillance operation and half an arrest. Cressida Dick, who was bugled out of bed to run a possible KRATOS operation at 0100 that morning, designed a command structure that was half KRATOS, half C.

Had it been a KRATOS, there would have been an operations room at Scotland Yard monitoring the whole operation, with a gold commander in overall charge and a DSO who would be responsible for the decision to authorise lethal force or not, and a firearms specialist as tactical adviser to these. There would have been a silver commander in command on the scene, with his or her own tactical adviser, with direct communications to all the teams involved in the operation and to Scotland Yard, which would also be receiving information from the surveillance team and the arrest team. The silver commander would have been in full charge, with the exception that the DSO only could authorise the use of a gun outside direct self defence.

Had it been a C, the key command would have been at Scotland Yard or perhaps at a forward command post, and the DSO would have been in direct control of the possible shooter. One roughly matches the army’s idea of Mission Command – Auftragstaktik for Germans, who invented it – and the other Befehlstaktik, “orders tactics”. Mission command implies that orders to subordinate units specify objectives, and that their commanders are given total discretion to achieve them, excepting only any restrictions specified with their objectives. The German army traditionally thought it was appropriate for offensive operations or other manoeuvres when it would be important to be able to respond to opportunities quickly. Befehlstaktik was the opposite – everyone does precisely what they are told and nothing else. This was traditionally thought appropriate for defence up to the moment when a counterattack was launched.

So what did Dick and MacDowell come up with? A weird hybrid of the two. Dick took over as gold commander, but McDowell remained so in form throughout; why? Similarly, the silver commander, DCI “C” and his tactical adviser, TROJAN 80, were co-located with the firearms squad and were in command on the scene; that’s what a silver commander means. But the surveillance squad were under the direct control of Scotland Yard, and “C” was never with them. The practical implementation of this was no better – there was direct radio communication from Dick to “C” and from TROJAN 84 in Scotland Yard to TROJAN 80 in “C”‘s car, and from “C” to the CO19 men. There was direct radio communication from the surveillance group to Scotland Yard, but not to Cressida Dick, who was meant to be in direct command of them; she got reports from DCI Jon Boutcher, monitoring the radios. “C” was sometimes able to hear the crosstalk on the surveillance group’s radio network, but not always, and he had no command authority over them. The Met’s planning meant that neither the commander at headquarters, nor the commander in the field, would have full information. Nobody would.

Neither was the commander on the scene ever on the scene; his command element was with the famously late firearms squad, and then behind them. He was reliant on what was heard over the surveillance net, and what came down from headquarters, much of which was information from the surveillance team that had come via the surveillance team leader, Boucher, and Dick. And he had been told to “trust the intelligence”; which he also told the CO19 men. One of the reasons for the choice of the operations room at Scotland Yard was the presence of “other agencies” – that is, the secret services.

Here we hit the damning detail; nobody ever identified Jean Charles de Menezes as the bomber, but this information never reached anyone in a position to act on it. Yes, several of the surveillance officers were at different times of the opinion that he might perhaps be; but no-one who thought so had seen his face. The only member of the surveillance team who did thought he wasn’t.

But as the information went up the creaky structure, uncertainty mutated into certainty. Boucher never seems to have told Dick that nobody had identified de Menezes; Dick asked for a judgment in terms of a percentage from the surveillance team, but they thought such a judgment would be meaningless. Even that appears to have been taken as evidence that he might be the man. Let us remember that the surveillance team was meant to watch everyone leaving the block so further cops could stop them all and ask questions; it was because he left the building and the surveillance team didn’t identify him as a suspect that he was shot.

The command structure appears to have become a machine generating confirmation bias. Imagine the position in the police car barging towards Stockwell that morning with “C”, the CO19 leader and TROJAN 80; as the car lunges over the traffic islands, occasional voices on the surveillance radio are saying “No; I didn’t see him..yes, he looks quite like him”, and a clear strong voice on the main set is saying “Suspect is getting off a bus; he must not get on the tube”. The second voice is the chief commander, and is a sight more certain (she isn’t fully informed) and clearer (she has the better bandwidth), and anyway she isn’t driving over dogs in south London and therefore sounds a sight calmer and hence more authoritative. TROJAN 80 is talking to TROJAN 84 on his mobile phone and is probably getting the paranoia in the rest of the ops room direct. The Commander is not only senior-ranking, but is also meant to be clued in on all kinds of other secret spook stuff. And you can’t ask the surveillance group yourself, or actually see what is going on.

This is what is known as the cross-cockpit gradient; it’s not healthy to depend on information that comes from someone who is too authoritative to question, and the same thing applies to information that comes from sources too secret to question. In the end, several of the CO19 men seem to have believed that the KRATOS codeword had been given; they differed on whether it came from “C” or from the DSO and relayed by “C”. “C”, it turns out, was the mystery “senior colleague”, which is interesting because he was a junior colleague.

Sir Ian Blair must go.

Update: Interesting read here.

The IPCC seems to be clueless about running a website, so here’s a direct link to the Stockwell I report (PDF, 1.35MB): link.

Much more later.

Readers are strongly requested to read this, as well as explanations here, and then vote for Sadly No here.

That is all.

OK, so by chance we have some real data to put into the sums in this post. The head of MI5 has just announced that we should all be very scared, because he reckons there may be 2,000 people in Britain who pose a threat to national security because of their support for terrorism.

So let’s run the Terroriser. 59 million people; 2,000 terrorists. So there’s a 0.0034% chance of any given citizen being a terrorist. Remember that the Terroriser will catch 99 per cent of the real terrorists – so that’s all but 20 terrorists. Now, the Terrorist will also miss 98 per cent of the non-terrorists – but that means we’ll get some 1,180,000 false positives. 1,980 terrorists plus 1,180,000 false positives = 1,181,980 suspects. (1,980/1,181,980)x100=0.1675155. There is a 0.167 per cent chance that any one of the suspects is a terrorist.

And there are still 20 terrorists out there; easily enough for a major terrorist attack. Now consider this hilarious report; apparently the FBI mined supermarket sales figures in the hope that sales of falafels would indicate the presence of Iranian terrorists! As well as, ah, Israelis, presumably. Note the involvement of half-arsed fearmonger Steven Emerson, and also old TYR butt Yossef Bodansky.