Are you looking for my non-technical blog?

This is now my technical-only blog, my non-technical blog is here.

31 December 2005

4 Hours to 2006

The year 2006 will start here after four hours, so I'd like to wish you all best of luck and a happy new year. Tags: , ,

Python IDE

You may try Eric as a free Python Integrated Development Environment. It is a full featured Python (and Ruby) IDE that is written by Detlev Offenbach using PyQt. URL: Eric3 Python IDE Tags: , ,

Male Domination of the Internet Is Over, Study Finds.

The days of men dominating the Internet may be over, a new study finds. But, according to the study, the two sexes use the Web for very different things. The study says 68 percent of men and 66 percent of women now go online. Since women make up a larger portion of the population, that means they outnumber men in cyberspace. The research suggests men largely go online to pursue solitary pursuits, while women use the Internet to enrich their existing relationships. Men go online to further their hobbies, for example. They are much more likely to use the Internet to read online, take Web classes and take part in sports-fantasy leagues. More men than women will download software and music or use a Web cam. By contrast, 94 percent of women who go online do so for e-mail. Women see e-mail as a way to nurture friendships. They'll write to family and friends to share news and stories, ask for advice and discuss plans. When men use e-mail, it tends to be for work-related activities or for forwarding jokes or humorous stories. Believe it or not, women are just as likely as men to use the Internet to play games, listen to music, watch videos and share files. And both sexes are equally likely to gamble online. In fact, 4 percent of the population surveyed gambled online. Source: ABC News Tags: , ,

27 December 2005


Today I've passed the JNCIS-FWV exam. The JNCIS-FWV is designed for networking professionals with advanced knowledge of, and experience with, Juniper Firewall/VPN products and ScreenOS software. The JNCIS-FWV exam tests for a wider and deeper level of knowledge than does the JNCIA-FWV exam.
JNCIS-FWV Exam Objectives (Exam: JN0-530)

Tags: , , , , ,

25 December 2005


SQLite is a small C library that implements a self-contained, embeddable, zero-configuration SQL database engine. While pysqlite is a Python DB-API 2.0 interface for it. So in order to install pysqlite you have to have sqlite installed. But unfortunately when trying to install sqlite using apt-get it seems that some header files were missing that prevented pysqlite from being installed properly. So after installing sqlite from source, I was able to install pysqlite successfully.

Tags: , ,

24 December 2005

Kubuntu = Ubuntu + KDE

Ubuntu is a Linux distro based on Debian and uses Gnome as Desktop Manager (GDM), and there is a branch of Ubuntu that uses KDE (KDM) instead called Kubuntu. So today I tried to install KDesktop on Ubuntu, but unfortunately I was not satisfied with it. I think it is too heavy and crashes all the time. May be I was supposed to install Kubuntu in the first place, and may be it's new KDE versions that suck. Tags: , ,

Ubuntu Synaptic Without CD

Sometimes when using Ubuntu "Synaptic Package Manager" or the command line "apt-get" to install a certain application, they ask you to insert the Ubunut CD in order to continue. So, in order to let them search online and skip looking in the cdrom you can go to "/etc/apt/sources.list" and comment the following line "deb cdrom: ...etc." to look like this "#deb cdrom: ...etc." Tags: , ,

23 December 2005

GMailRCS - Version 1.00

GmailRCS is a way to use your Gmail account as a lightweight Revision Control System (RCS) in order to backup and restore the different versions of your source code. The software is written in Python, using libgmail

Tags: , ,

Using Autoconf for Phun and Profit

This page attempts to give an overview on how to use Autoconf and make to build a software package, autoconf.php Tags: , ,

22 December 2005

Linux Run Levels

Like most of the UNIX like operating systems, linux has different Run Levels, one for running as a single user, one for multi-user, may be one for GUI, even one for reboot and another one for halt. In the file "/etc/inittab" you can find the default Run Level, eg:
You can find there also the different Run Levels on your system and which is which. In Ubuntu for example it will look like this:
# /etc/init.d executes the S and K scripts upon change # of runlevel. # # Runlevel 0 is halt. # Runlevel 1 is single-user. # Runlevels 2-5 are multi-user. # Runlevel 6 is reboot.
Then in the "/etc" you may find different folders "rc1.d", "rc2.d", and so on. Each folder contains the different scripts to be executed whenver the system enters its equivalent Run Level. Tags: , ,

21 December 2005

Foundry IEEE 802.1x

To configure a foundry switch in order to authenticate people using their IEEE 802.1x clients on their PCs.

You need to enable the RADIUS authentication on the switch first
BigIron(config)# aaa authentication dot1x default radius
Then you net to tell it the RADIUS server's IP and other parameters
radius-server host auth-port 1812 acct-port 1813 default key abc123 dot1x
Now let only one user has access to ethernet port "3/2"
BigIron(config)# int e 3/2
BigIron(config-if-e100-3/2)# port security
BigIron(config-port-security-e100-3/2)# maximum 2
BigIron(config-port-security-e100-3/2)# exit
Then enable the 802.1x on the switch, and enable multi-user policy
BigIron#(config) dot1x enable
BigIron#(config-dot1x)# multi-user-policy enable
And enable flow-based ACL
BigIron#(config) interface e 3/11
BigIron#(config-if-e1000-3/11)# ip access-group flow-mode
Configure place holder ACL, just a fake ACL with fake IP in it to redirect the first packet of the session to the CPU

BigIron(config)# access-list 131 deny tcp host any
BigIron(config)# access-list 131 deny udp host any
BigIron(config)# access-list 131 deny icmp host any
BigIron(config)# access-list 131 permit ip any any

BigIron(config) interface e 3/11
BigIron#(config-if-e1000-3/11)# ip access-group flow-mode
BigIron#(config-if-e1000-3/11)# ip access-group 131 in
BigIron#(config-if-e1000-3/11)# ip access-group 131 out
BigIron#(config-if-e1000-3/11)# exit

So, if the source MAC address of the flow is already associated with a successfully authenticated 802.1X host that has a dynamically assigned IP ACL applied to it, then that dynamically assigned IP ACL is applied to the flow. When a port is authenticated using 802.1X security, an IP ACL or MAC address filter that exists in the running-config on the Foundry device can be dynamically applied to the port. To do this, you configure the Filter-ID (type 11) attribute on the RADIUS server. The Filter-ID attribute specifies the name or number of the Foundry IP ACL or MAC address filter. For example, "", applies the specified numbered ACL to the 802.1X authenticated port in the inbound direction.

So to configure a dynamic ACL to permit incoming traffic from then add the following command to the switch: " access-list 2 permit host", and then make the RADIUS send the following attribute value ""
You may do the same but with a MAC filter by applying the following command on the switch: " mac filter 2 permit 3333.3333.3333 ffff.ffff.ffff any etype eq 0800" and let the RADIUS send this: ""

Foundry, Configuring 802.1X Port Security
Foundry, Software-Based IP Access Control Lists (ACLs)

Tags: , , ,

19 December 2005

Top 12 Languages @

These are the top 12 languages used at and the number of projects written in them.
  1. Java: 17,120 // I just hate this one
  2. C++: 17,049 // It's ok, but I prefer C more
  3. C: 16,171 // This one is my favorite, simply the best out there
  4. PHP: 12,511 // The best in web programming, however I dun like web programming
  5. Perl: 6,280 // I tried it but I didn't like it
  6. Python: 4,633 // Now I am learning it, and I am about to fall in love with it
  7. C#: 3,023 // What's that !? Yet another Microsoft crap !
  8. JavaScrip: 2,891 // Sucks, just like Java
  9. Visual Basic: 2,221 // See C#
  10. Delpi: 1,959 // Dunno it, sounds like some old fashion language
  11. Unix Shell: 1,885 // It's fine, but I think Python is enough
Tags: , ,

17 December 2005

Ubuntu - XMMS Freezes

I've noticed that whenever you try to run XMMS on Ubuntu it freezes, but finally I've found the solution for that ... To install it:
apt-get install xmms apt-get install xmms-mp3 apt-get install xmms-mad
Then go to "Options->Preferences->Audio I/O Plugin->Output Plugin" and set it to "eSound Output Plugin..." The last trick helps in Beep-Media-Player too. Tags: , ,

16 December 2005

Python - libgmail Tutorial

This is a short tutorla about libgmail. Which is a Library to provide access to Gmail via Python. Tabs are important in python as they indicate the different code blocks, since they do not have "{" and "}" like those in C and C++. So I'll replace the tabs here with [TAB], since it's hard to write the proper format in HTML.

First of all lets see how can we get the libgmail help, a.k.a man pages:
>>>import libgmail
Then lets see how can we retrieve the messages in our the inbox:
>>>import libgmail
>>>ga = libgmail.GmailAccount("", "password")
>>>folder = ga.getMessagesByFolder("inbox", True)
>>>for thread in folder:
>>>[TAB]print "Thread:",, "Subject:", thread.subject
>>>[TAB]for msg in thread:
>>>[TAB][TAB]print "Msg:",, ",Author",, ",Subject:", msg.subject
Now lets say we want to print all the attached files in all the messages labled by "projectx"
>>>import libgmail
>>>ga = libgmail.GmailAccount("", "password")
>>>folder = ga.getMessagesByLabel("projectx", True)
>>>for tread in folder:
>>>[TAB]for msg in thread:
>>>[TAB][TAB]for attach in msg.attachments:
>>>[TAB][TAB][TAB]print attach._getContent()
You may also send a message this way:
>>>import libgmail
>>>ga = libgmail.GmailAccount("", "password")
>>>msg=libgmail.GmailComposedMessage("", "SubjectHere", "BodyHere")
To send attachmented files into the message:
>>>import libgmail
>>>ga = libgmail.GmailAccount("", "password")
>>>myFiles = ["/file1", "/file2", "/file3"]
>>>msg=libgmail.GmailComposedMessage("", "SubjectHere", "BodyHere", filenames=myFiles)
Finally I've noticed that sometimes the sendMessage() function fails - returns "HTTP Error 404: Not Found", and hope that they are going fix it soon. Actually the function fails on the first time but when you call it again it works, so you may use a "try-except" statement like the one below:

Tags: , ,

15 December 2005

C - Hex Dump Function

Every sniffer has a hex dump function in order to print the captured packets to the user, so this is a hex dump function I made ... mycap_dump()

Tags: , ,

Better Check For Your Sanity

It doesn't hurt to take a hard look at yourself from time to time, and this should help get you started During a visit to the mental asylum, a visitor asked the director what the criterion was which defined whether or not a patient should be institutionalized. "Well," said the director, "We fill up a bathtub, then we offer a teaspoon, a teacup and a bucket to the patient and ask him or her to empty the bathtub." "Oh, I understand," said the visitor. "A normal person would use the bucket because it's bigger than the spoon or the teacup." "No." said the director, "A normal person would pull the plug." Do you want a room with or without a view? Tags: , ,

Bluetooth programming on GNU/Linux

This is a nice tutorial on Bluetooth Programming (Bluez) on GNU/Linux. But please notice that you must have a Linux with BlueZ Kernel Modules (Linux 2.4 and 2.6). And also you will need to install Bluez libraries and tools (For the minimal functionality the bluez-libs and bluez-utils are needed) for header files and userland API's Tags: , ,

14 December 2005

ISO/IEC 17799

ISO/IEC 17799 is an information security standard published in December 2000 by the International Organization for Standardization and the International Electrotechnical Commission in 2000 entitled Information technology - Code of practice for information security management. ISO 17799 was revised and re-issued in June 2005. ISO/IEC 17799 provides best practice recommendations on information security management for use by those who are responsible for initiating, implementing or maintaining information security management systems. Information security is defined within the standard as the preservation of confidentiality (ensuring that information is accessible only to those authorised to have access), integrity (safeguarding the accuracy and completeness of information and processing methods) and availability (ensuring that authorised users have access to information and associated assets when required). Source: Tags: , ,

Code Snippets - Python for S60

Python for Series60 Code Examples: Big Bold Code Snippets Some other Python for Series 60 Resources Eriksmartt Python for Series 60 Resources You may also see this if you are tired of writing on the mobile's keypad: Python - Mobile Bluetooth Console Tags: , ,

12 December 2005

IEEE OUI & Company ID's

The MAC address is six bytes (48 bits) long, where the first three bytes (OUI) represent the manufacturer of the Network Card. And here is a link from IEEE in order to search for the different OUI's and their equivalent Companies.

One nice trick to know the manufacturer of a certain host is to "ping" it (it has to be in the same subnet with you), and then type "arp -a" to get his MAC address.

Tags: , ,

11 December 2005

Do You Spleak English?

Spleak is a virtual buddy that you can add to your MSN messenger ( After adding her to your MSN contacts, She can manage your time, take notes, do spell checks for you or alert you of deadlines and events. She also knows whole dictionaries, and encyclopedias by heart, and offers a variety of fun activities as well.
But it's really fishy that she does all of this for free! I think there is some hidden agenda out there. May be they have some plans to charge people for such services. Or may be they collect some date about people's behavior etc.

Tags: , , , ,

04 December 2005 Python Popular Links

Want to stay on the cutting edge of what’s hot in the Python community? This is the way to do it. The site tracks the most popular URLs tagged with Python, so you get a continuous feed of interesting and helpful links. I’ve added the RSS feed for the page as a Live Bookmark in Firefox, making it easy to skim the list. If you don’t already have a account, go get one now (although you don’t need one just to view other people’s links).

Source: Import This @ Think Hole Labs

Tags: , , ,

Where the Heck is Miss Mabrouk !?

I am really wondering where have she gone!?
Ritzy Mabrouk, the owner of a very famous blog in Egypt ( has disappeared. Her last post was on November 10, 2005 @ 5:00AM. Miss Mabrouk is a foreigner that lives in Maadi, Cairo. No one knows her real identity. Readers who loved reading her blog wondering "Where could she go?" Source: Ikhnaton2 - A Whisper
Hope she - She is one of my favorite bloggers - is fine.

Tags: , ,

Photo Quiz

Can you tell where is this Photo taken !? Ok, It's just written on the sign ... It's here in Cairo, in down town, in a street called Sheik Reihan ... But it doesn't look like Cairo or Egypt at all. This house looks as if it is in some European Village.
Tags: , ,

03 December 2005

Python Mobile Bluetooth Console

So, now you wanna write Python scripts on your phone, but you are sick of the phone keyboard. Then it is time for BTConsole (Bluetooth Console), where you can have a console connection to the Mobile Phone from your PC using the Bluetooth connection as a Serial Port Emulator. This can be done on both Windows or Linux, but I am going to describe the Linux part as I don't like Windows and also I failed to set it up on it. First of all you have to have the Bluetooth Protocol Stack (BlueZ) installed on your machine. You may also use an "ipconfig" or "ifconfig" like command on you Computer to get information about your Computer's Bluetooth Address (It looks like the MAC Address) and so ... this command is called "hciconfig" Also to discover the Bluetooth devices near you, use "hcitool scan" Now create a Virtual Port (/dev/rfcomm0) on your Linux Machine for the Bluetoot connection and start listening on that port ... Type the following two commands on you computer:
"sdptool add-channel=2 SP" (It shall tell you someting like "Serial Port service registered" now) "rfcomm listen /dev/rfcomm0 2" (It shall tell you something like "Waiting for connection on Channel2")
Then on you Mobile Phone, go to Python (You have Python for Series60 installed on your phone, don't you !?). And choose Bluetooth Console from the Options menu. It should connect to the computer now. And the following will be shown on you computer "Connection from AA:BB:CC:DD:EE:FF to /dev/rfcomm0" then "Press CTRL-C for hangup", where AA:BB:CC:DD:EE:FF is your Mobile's Bluetoot Address The Linux equivalent to HyperTerminal is called minicom, so it's time to use it to open a console connection to the mobile phone. To run minicom type "minicom -s -m" then choose "Serial Port Setup" and set the Serial Device to "/dev/rfcomm0" and leave the rest as it is. Now press escape and exit the Serial Port Setup Menu. Here we go, you are now connected to the Python Shell on your Mobile Phone. If you'd like you may use this to send an SMS from your PC:
>>> import messaging
>>> messaging.sms_send("+20101234567",u"Hello World")
Where +20101234567 is the phone number you want to send your SMS to. Resources:
By the way if this doesn't work, try the following howto by Dankoozy: HOWTO: Use the Bluetooth console in PyS60

Tags: , , , , ,

Views from Dubai Trip

These are some photos took during y last trip to Dubai ...
Sheik Zayed's Road Dubai Trade Center Emirates Mall, Ice Skiing
Tags: , ,

Python for Nokia Series60

It is really interesting to write you own Softwares for your Mobile Phone. When I decided to write code using C++ (C and C++ are my favorites), I was shocked to find that Nokia has released a Windows SDK only, and it is limited to some creepy and non-free IDE's like MS Visual Studio and so. On the other hand I hate Java, and can never be used to it. So I was finally happy to find that there is a Python interpreter for Nokia Series 60 Phones. I've installed the Python for Nokia interpreter (PyreplForSeries60.SIS) a couple of days ago, and here I am starting to learn Python, which seems to be a very nice scripting language so far. For further info:,,034-821,00.html

Tags: , , , , , ,