Archive for October, 2007
I have a curious problem with Python 2.5′s SQL support. OK, so we import sqlite3 and create a connection object to an existing sql file. It happens. Then we call the connection’s cursor method. OK.
Now, if you look up the sqlite documentation, the most important command is cursor.execute(), where your SQL command goes in the brackets as a triple-quoted multiline statement. Having done your SELECT FROM or whatever, you get back a result set object which you can either fetch bits from with the cursor’s fetch() method or iterate through in a loop of some kind.
But I can’t find any documentation for the case when you get back an AttributeError saying that the method cursor doesn’t have an attribute called ‘execute’. WTF? Can anyone explain this?
Bonus Pathetic: Offtopic, I was recently looking something up on the mod_python documentation site when I noticed a GoogleAd eyeing me – “Hacking All Day Won’t Get You A Girlfriend! Don’t Let Time Pass -” and then the URL of a dating agency. Made me laugh, at least.
Update: Woo. Incredibly pathetic error…
Great Britain 20 New Zealand 14!
Well, at least they didn’t schedule it to clash with whatever it was the union people were doing. What a match, though – like inhaling espresso compared to the ‘tothersiders. It had it all – tension! speed! spectacle! Sam Burgess, the 18-year old bolter, had a damn good game and eventually scored a crash-over try charging onto a pop up from Leon Pryce….but also very nearly did an Adrian Morley, being put on report for a sickening neck tackle immediately before scoring.
Speaking of Adrian Morley, he had a storming game. As did Sean O’Loughlin, standing in for Kevin Sinfield. And Gareth Raynor, who scored a positively illegal try, racing 50 yards to touch down a kick from Rob Burrow under the Kiwi fullback’s fingers. In fact, GB rather reminded me of the sort of New Zealand team I remember; bloody good, if in a sort of chaotic way.
What was a small British company doing importing vast quantities of arms from Bosnia? More importantly, what was it doing telling lies about their destination in order to clear Bosnian customs? What was it doing contracting with Tomislav Damjanovic, possibly Viktor Bout, and disgraced Iraqi minister Ziad Cattan to ship them to Iraq when the Bosnian government export licence stated specifically that they would be shipped to the UK?
TYR has obtained some interesting documents through a NATO source that shed light on these fascinating questions. Everyone’s now heard of the famous 99 tonnes of AKs that were exported from Bosnia aboard Aerocom and Jet Line International Ilyushin 76 aircraft towards Iraq, but which apparently never arrived in the Iraqi army’s arsenal. But there was much more activity in the arms export business from the former Yugoslavia back then; for instance, Damjanovic was also in on a KBR-managed contract to ship weapons from Bosnia to the US Army training team in Georgia, and so was Viktor Bout, as the weapons travelled in GST Aero’s Il-76 UN-76009.
Here’s the first document; a company based in Nottingham, Procurement Management Services Ltd, whose registration at Companies House describes it as offering business consultancy and warehousing (note that point), is the consignee, and the consignor is a local company called Unis Promex. Note that the licence is issued specifically for export to the UK. Despite the consultancy, the same address is also home to a registered gun dealer, and next door is a company dealing in “militaria”.
Here’s the end-user certificate; it specifically states that the weapons – 300 SGM-84 machine guns – are for sale to dealers in the UK and will not be re-exported in defiance of international sanctions or without the UK government’s express permission. But what dealers? Selling any such weapon in Britain would be highly illegal, to say the least. Realistically, the only reason to import Bosnian machine guns to the UK would be to re-export them.
But why, pray, does the document issued by PMS come from the fax number of York Guns Ltd? And why does this very respectable company also show up importing no less than 22,500 rifles on this further end-user cert? Between PMS and York Guns, no less than 58,000 rifles and several thousand heavier weapons were shipped out of Bosnia with an ostensible destination in the East Midlands.
Meanwhile, what happened to that shipment? Well, they never went anywhere near Nottinghamshire. Here is the air waybill, issued by Vega Aviation of Bulgaria – it clearly states that the aircraft carrying the shipment is to route direct from Tuzla to Baghdad, and the goods are for the account of Dr Ziad Cattan, Ministry of Defence, Republic of Iraq. He is the former pizzeria owner who spent a year acting as the professional head of the Ministry and then went back into exile, having been accused of embezzling the entire defence budget by his successor Ali Allawi.
TYR can reveal that some of the guns did indeed make it to Britain; perhaps a large percentage of the total. The 300 M84 machine guns detailed in the PMS documents were shipped, as detailed on the waybill, direct from Bosnia to Iraq in defiance of the end-user certificate; but much more may have passed through British hands. After all, some 7,639 pallets of “surplus weapons” also left Bosnia for PMS, travelling via the port of Ploce and the ship Sloman Traveller to Immingham docks in Lincolnshire.
The International Herald-Tribune has an interesting article about a Serbian gun-runner and colleague of Viktor Bout’s, one Tomislav Damjanovic. For some reason it’s in the Style section; most photos of Viktor would seem to rule that out, but the one of Damjanovic they supply does have a certain Balkan sharpness.
Anyway, the report is based on one prepared by the Belgrade-based South-Eastern European Small Arms Centre, which according to the IHT has been distributed among customs, law enforcement, and intelligence agencies. You’ll be pleased to know someone left a link to it in the comments; you can read it here (pdf).
Between them, they fill in a lot of gaps.
Fascinatingly, the SEESAC report tells us something about the development of the UAE’s arms-aviation black market; Damjanovic was present at the creation, so to speak, having been based there working for JAT when the Balkan wars broke out and then falling in with a group of Russian ex-spooks around one Igor Avdeev. This lot, it turns out, were the creators of Jet Line International; and haven’t we heard so much about them?
Damjanovic, having lost his job with JAT after the outbreak of war, specialised in running Jet Line’s Ilyushin 76 flights into ex-Yugoslavia, and soon drew the attention of the Milosevic government, for whom he smuggled cigarettes to Italy in order to pay for the arms he was importing, and then smuggled surplus arms out of Yugoslavia to pay for almost anything else. His partner was killed in a plane crash with a load of jet fighter parts for Libya after offering the crew a cash bonus to fly despite electrical problems on the plane.
Since 2003, however, he became something like the missing link in the Bout-in-Iraq story; it was Damjanovic who took on US military contracts to acquire arms in the Balkans and send them to Iraq, and some other places too. The now-infamous 99 tonnes of weapons that went missing between Tuzla and Baghdad? One of his jobs. Using various companies, including JLI, Aerocom, and Kosmas Air, he became a big player in War on Terror freight, including a contract to deliver cash (!) around Iraq. Kosmas Air, a Russian operator, was essentially taken over; he and his moved into the offices and muscled in, rather as the Viktor Bout team did with Deirdre Ward’s Norse Air in South Africa back in 1998.
Interestingly, the opportunities went beyond Iraq; an aircraft he chartered from GST Aero (them!) travelled from Baghdad via Sharjah to Oman, where it ostensibly “refuelled”, and then proceeded to be the famous first plane into Mogadishu. There was more, though; he was also flying guns from Bulgaria to Georgia under a US Army/KBR contract, using GST Aero’s UN-76009.
He is apparently now under pressure from the Serbian government to stop, and claims he’s going legit; we shall see.
The report also offers some interesting incidental data; a photo of an illegal arms delivery in progress in the Sudan in 2006, clearly showing Goliaf Air of Sao Tome’s Antonov 32 registered S9-PSV. Goliaf Air, you may recall, owned an Ilyushin 76, S9-DAE that was used in Iraq.
So what’s in the server log? Shall we look?
126.96.36.199 [entrypoint #437] 2007/10/october-08-and-out.html Oct 22, 12:07:51 [0:00:00] views: 1
Yahoo ! (where to apply for the assistance to iraqi locally engaged staff)
Yes; you read it all right. That’s someone searching Yahoo! for instructions on what to do if you worked for the British Army in Iraq.
Hopefully it’s a blogger researching a post, right? Or an MP preparing to speak on our Early Day Motion? Surely?
No. Here’s the WHOIS output.
inetnum: 188.8.131.52 – 184.108.40.206
descr: Horizon Satellite Services FZ LLC
descr: PROVIDER Local Registry
status: ALLOCATED PA
source: RIPE # Filtered
org-name: Horizon Satellite Services FZ LLC
address: P.O.Box 502343,Building No.14
address: Dubai Internet City
address: United Arab Emirates
phone: +971 4 391 5122
fax-no: +971 4 391 2906
source: RIPE # Filtered
So, whoever searched for that string was on a satellite link into a Dubai-based satellite operator. A traceroute confirms it; the tell-tale is the very high latency on the last hop via the distant satellite. Horizon’s business is centred in the Middle East and Africa.
And what did Yahoo! – it seems rather inappropriate – find? I’m the top result; there is absolutely nothing of any use. There are some delightful press releases from the White House about how well things are going in Iraq, though.
It would be nice if the government showed any sense of urgency about the whole affair, would it not?
Says Iranian foreign minister Manoucher Mottaki:
“America, today, in the international system is facing a serious challenge … Americans are in a very, very difficult situation.
“The people of Afghanistan would not allow America to use Afghanistan against any country. This is our … belief,” he said.
Mottaki said Tehran’s findings from three rounds of talks with U.S. officials on the situation in Iraq was that Washington was facing “very serious” difficulties there.
Washington has no exit strategy from Iraq and is bogged down in the conflict there. He said the U.S. had not managed to deliver on its promises to the Afghan people either.
“Therefore, we do not see such a probability that the Americans would want to attack … another country in the region. They are not in such a position.”
You can’t fault the guy for clarity. Or realism. Let’s cut to the carrierwatch, shall we? Here we are; Enterprise is on station, the only US carrier currently deployed. Hardly the Guns of August. The others? Kitty Hawk is back in Yokosuka; Ronald Reagan in San Diego catching up on her interrupted maintenance schedule. Washington is gradually working-up, having done her sea trials at the end of August. Lincoln‘s most recent task was Fleet Week in San Diego. Washington is doing a similarly steady return from dockyard hands. Vinson and Theodore Roosevelt are in deep refit. John C. Stennis has joined them, having returned from her short-notice deployment and gone straight into drydock. Nimitz is in Pearl Harbour after a long and slow return trip.
Harry Truman is probably the highest-readiness ship, having already done a COMPTUEX and a JTFEX over the summer; however, she’s currently employed doing carrier qualifications off the mid-Atlantic coast. Washington returned as late as the end of May.
So, yes – Mottaki is quite right. Enough for the description of things as they are, though; what about things as they should be? Daniel Levy, writing in Ha’aretz, is sensible. He points out that the US and Israeli strategy towards Iran is hopelessly confused; the aim is left open between regime change and nonproliferation. The chief motivation for investing in nuclear technology is to prevent regime change, but no-one is willing to offer the regime security in return for nonproliferation; so why would they stop proliferatin’? And if they don’t stop, where is your regime change then?
This is pretty basic international relations theory; it’s all about people, states, and fear. States invest in fearsome weapons because they believe that the fear of them increases their security (i.e. reduces their own fear); if you want them to abstain from these weapons, you need to offer a substitute form of insurance. In the Cold War this was thought of in terms of a combination of deterrence and reassurance; one version of reassurance being “self-deterrence”, making it clear that you yourself recognised the principle of non-provocation that you expected the other side to observe.
The Americans have frequently tried versions of this with Israel; trying to buy territorial concessions with substitute deliveries of weapons. So far as it goes, there is quite a lot to be said for this; it’s better that Israel should look to its wooden walls, or rather its aluminium walls, for security than that it should try to grab more and more territory as a static defence, which increases the chance it will need all those jets. The problem is that they never get to the flipside of this, which is that US military aid should come with conditions. The result is an unhealthy dependence of the Israelis on the Americans, and an American inability to insist on Israeli moderation for fear of weakening them. It’s a ratchet; the more people the Israelis alienate, the more arms they need to deal with the worst case scenario consequences. And the more arms they get, the more able the forward school in Israeli politics is to alienate more people.
Anyway, Levy proposes a twin-track diplomacy based precisely on these principles; one track would concern non-proliferation, the other a broad security agreement dealing with the entire perimeter around Iran. Essentially, each track addresses one party’s fears. This is roughly what the Baker -Hamilton commission recommended. Levy’s original contribution, however, is that the Israelis should press the Americans to open such talks. I think it’s an excellent idea, and Olmert is probably scared enough about his political future to be receptive.
The moment is also good; the British army’s move back in southern Iraq, as well as the relaxation in US naval operations, are all helpful in reducing the degree of fear.
Meanwhile, we have an amusing study in outdated thinking. Via Yglesias, a thinktank suggestion that “an Islamic Republic accountable to its citizens would not divert billions into uranium enrichment and ballistic missiles”; so, of course, we’ve got to fight them because of the corruption/malinvestment/whatever. This is silly, but it was very common in 2003-2005; such and such a country’s government was corrupt, and the oil (or whatever) money was being wasted, so call forward the Marines! It goes without saying that this sort of thing is fear-generating, in so far as anyone takes it at all seriously.
It’s especially stupid, because we know what Iranians do when they believe their government to be corrupt; they change it. That was how Khatami got elected; it was also how Ahmadinejad got elected. And that was also how the revolution got started.
I is a linux lappeh…at least for the time being!
Am running Mandriva Linux on the Q45; off the live cd at the moment.
I can report that the boot is reasonably painless, although I had to put it in acpi=off mode. It detected the Intel wireless LAN card without difficulty and played nicely with my Linksys box. And, fuck me, this is QUICK! I chose the KDE version and the Metisse 3D desktop, which is pretty graphics intensive…but it’s still rapid.
And I could get used to working in three windows at once…perhaps.
Update: Installed, and it works! Not only that, but I can see my Windows drive from in here and get stuff out of it. Have already installed the NTFS plugin. The install went OK, too; reasonably quick and unsporky. Better yet, I’ve added the shebang lines to various python thingies and they all run blisteringly fast.
Here’s the proof, running in the fortified TYR data centre:
Why not Pakistan? The fix is in, as they say – Musharraf safely re-elected by crook more than by hook, pesky corruption charges disposed of, Nawaz Sharif shouldered out of the way, time for the great heroine’s return. The enemy, of course, always has a vote; not only did they threaten to send suicide bombers to kill Benazir Bhutto, but they did. (“The thing about al-Qa’ida is that they tell you what they’re going to do…and then they do it.”)
In a gruesome way, I reckon they – whoever “they” are – have suffered a major defeat. Blowing her to pieces along with divers citizens wouldn’t have been subtle, but it would have kiboshed Musharraf’s exit strategy, and it would make sense in a kind of Iraqi, revolutionary terror way. Blowing up 126 random civilians and not getting her puts the perpetrators out there as both brutal and bungling, to say nothing of the martyr image propaganda she’ll doubtless make out of it.
The blame game is in full swing; she claims “followers of General Zia” dunnit, which is smart because it doesn’t blame any current faction in Pakistan and incorporates it in her own family myth, and is also partly true – whether it was the jihadis or the ISI, they’re in a sense followers of Zia. He was responsible for encouraging them and letting the ISI do what it liked.
Meanwhile, her husband, Asif “Mr 10%” Zardari is pouring petrol on any fires he can find; in his view it’s the fault of the ISI. Again, it’s possible; but you don’t say things like that, and I suspect that had they wanted rid of her they’d have arranged something less dramatic and more certain. However, a team of unwitting jihadi fall-guys sounds plausible. Not clear what his game is; although the whole point of Bhutto’s return is to replace the military government with a military-approved anti-military government.
I’ve recently been experimenting with various ways of automatically gathering information about Viktor Bout’s airlines; you’ve probably noticed the resumption of Pathetic Python Blogging. Anyway, though the project is far from ready, enough of it
now works to produce some useful results. For example, who the hell are “Asia Airways”, who regularly fly between Sharjah and destinations in Iraq and Afghanistan – using the ICAO code ASW, which is actually the well-known US lowcost carrier Southwest Airlines? (Southwest might want to know, as if someone else is using their call sign they could find themselves paying the air traffic control charges.)
Another is the surprisingly large number of aircraft that frequent SHJ without stating where they come from or where they are going; filtering this morning’s output for “route==’Unknown’” gives you a list of some 10 arrivals. Some five of which
were due to malformed data messing with my script, but the rest are correct. And the rest includes companies like Flying Dolphin (ICAO: FDN), a very longstanding Viktor Bout operation indeed and one that ought not to exist, South Airlines of the Ukraine,
a regular on the Baghdad run, and something called “Maximus Air Cargo”, apparently a division of the UAE Ministry of Defence.
There’s also a lot of fairly foul operators like Avient, Click (both versions), and our old friends British Gulf International. You may recall that this company had supposedly been set up in Sao Tome, before transferring to the Kyrgyz registry; a new firm was formed with the old facilities, staff and aircraft. But, we learned from a contact there, the Sao Tome firm had never existed as a company. Fascinatingly, despite this, it’s back; the old BGK code has vanished and been replaced by the new one, BGI, for “British Gulf International Company” rather than “British Gulf International Airlines”
And the EX-registered Antonov 12s have all followed it back into the Sao Tome registry. Curious.
S9-SAJ An-12TB 401901 British Gulf Int’l AL ex EX-160 @ British Gulf Int’l AL
S9-SAM An-12BP 3341408 British Gulf Int’l AL ex EX-162 @ British Gulf Int’l AL
S9-SAO An-12BP 346908 British Gulf Int’l AL ex EX-165 @ British Gulf Int’l
S9-SAP An-12BP 5343305 British Gulf Int’l AL ex EX-161 @ British Gulf Int’l AL
S9-SAV An-12BP 2340602 British Gulf Int’l AL ex EX-045 @ British Gulf Int’l AL
S9- An-12V 1347704 British Gulf Int’l AL ex EX-163 @ British Gulf S9-SAH ?
S9- An-12V 5343703 British Gulf Int’l AL ex EX-164 @ British Gulf Int’l AL
The story that Israeli satellite TV viewers have been experiencing constant interference for several weeks is an interesting one. As has been pointed out, it can’t be the jamming presumably employed during the Deir ez-Zor raid, which would have been over weeks ago. According to the Israeli government it’s all the fault of the Germans! More specifically they claim it’s the air warning radar on one of the German (or perhaps Dutch) ships in the UN task force off Lebanon. Well, perhaps. Warships have been known to do weird things with radio in the past; but it’s not as if they never exercise the radars in the North Sea.
I wonder if it had anything to do with this story from April this year? (I’d link to my own report on it for MCI Telecoms.com, but their website is still very ungooglable.) The summary is that the pan-Arab satellite operator Thuraya, whose satellite mobile telephony and data service is found across the Middle East, Central Asia, and Africa, had been experiencing serious radio interference for most of 2006.
Intensive efforts to explain it failed; management blamed Israel, but eventually, the engineers decided to have the satellite revolve slowly around its axes in orbit while they logged the strength of the interfering signal. Essentially, it was the same way they used to do radio direction-finding by hand back in the day; that is to say, the second world war. Knowing its azimuth and elevation relative to the satellite, and that it would be coming from a point on the side of the earth facing it (and thank God it wasn’t coming from the reciprocal..), they were therefore able to plot the source of the signal on a globe. It was somewhere in the Libyan desert.
Two engineers flew to Libya at once and headed for the lat and long position; not very surprisingly, they were arrested by machine gun totin’ secret police agents before reaching their goal. Which seemed to lurk somewhere in an antenna farm surrounded by wire and goons and cameras and the like. Case closed. Eventually, the UAE ambassador to Libya secured their release.
It turned out the Libyans were having trouble with Touareg rebels and smugglers and bandits way down south, who tend to pack a Thuraya unit next to their Kalashnikovs; after all, at least one of the groups has got a blog to look after. But this is where it gets, well, Libyan; Libya is one of the countries that jointly own the Thuraya system. They are a shareholder. But for some reason they decided just to point a big dish antenna at the satellite and start frying pigeons.
There have been reports over the summer of disruption to Thuraya and also INMARSAT BGAN satellite-IP service in the Middle East, which could well explain it. Thuraya’s satellite is stationed at 44 degrees East.