Archive for the 'Misc' Category

I found the secret behind the Guido job at Google

This is a bit funny, but all is on the GoogleMasterPlan . As you can see to hire Guido, they decided to send spam. Hum, really happy to find Python on this stuff :)

admin November 26th, 2006

Howto to spam-protect your python-based blog with bayesian filter.

As severall people, I run into issue with some spammer using my comment system to spam, and post backlinks. (Even using some funny stuffs)
I ‘m already using a good email spam filter: SpamBayes, so I decided to test bayesian filtering for the spam on this blog too.
I decided to give Reverend a try:
from reverend.thomas import [...]

admin November 17th, 2006

Python powered Tux ?

Not really, but this nice Tux droid, can be pluged in USB, and the commands are sent via a Python DBUS binding. Hum a stupid question, can we use the Python USB API directly ?
With time, Python really became a powerfull tool for hardware hackers :) That’s perhaps why I like it so much ?

admin August 10th, 2006

Python blackhat tools ?

Yesterday, somebody send me a link to some really interesting slides: Silver Needle in the Skype. This really impress me, how much energy Skype spent to hide his code, and protect their buisness. But on the other side, the work done to dissect the binary and the protocols is even more surprising. (What a great [...]

admin March 29th, 2006

Playing with Realtime with Python

For a little app, I need to send stream over UDP at a fixed rate. I have done severals tests w/ some buffers and sleep(), but I can’t achieve the desired speed. Mainly because sleep() doesn’t provide a stable enought result.
I decided to look at this a little deeply, and decided to use /dev/rtc to [...]

admin January 24th, 2006

Playing with binary in Python

While debuging an AVR microcontroller, you need to play with bits. After playing with my calculator I decided to find another way to decode bin/hex etc .. I found a good recipe on ASPN.
Now, this is a little reminder for people (like me) which doesn’t read binary op fluently.
# This will off the bits [...]

admin December 15th, 2005

Python on Rails: The bazzar

Everybody know Ruby on Rails right now. There is a lot of post all over the web, showing us the new latest new web programming style. This is a little funny because in a past life (4 years ago), I worked on something quite similar for Zope, name ZModeling. And I guess a lot of [...]

admin September 18th, 2005

Howto to Talk with GoogleTalk in Python

I guess everybody know GoogleTalk right now. Linux users like me knows that it ’s only a Jabber server with SIP extension. Like a lot of people seems to use this, I decided to switch from MSN(suxTm) to this Jabber server, beside it lacks a lot of Jabber features (like offline messaging )
But, how can [...]

admin August 31st, 2005

Hacking your window manager with Python

I was looking for a way to hack my window manager in Python. I want to use special piece of code to handle the window placement, or display stuffs in the background..
It looks like pyxfce meet my needs, so I decided to give it a try. The first thing to do is to build the [...]

admin June 27th, 2005

Extract GPS from Kismet log with ElementTree

I have read a lot of noise about ElementTree but never really used it. Tonight i need to extract a bunch of GPS data from a kismet log file. Let’s give it a try
from elementtree import ElementTree

data = open(’Kismet-May-22-2005-4.xml’,'r’).read()

detection = ElementTree.XML(data)

for node in detection.getchildren():
try:
print “SSID: ” + node.find(’SSID’).text,
except AttributeError:pass #hidden SSID
print “BSSID: ” + [...]

admin May 23rd, 2005