Are you looking for my non-technical blog?
This is now my technical-only blog, my non-technical blog is here.
09 January 2006
Online Pharmacies ... F**K **u!
I am totally pissed off of these spammers who keep on sending me bzillions of mails everyday about drugs, Rolex watches, low prices softwares, or even some cryptica mails written in Turkish.
I've switched from MS Outlook to Thunderbird because it supposed to be able to categorize spam mails better, also Evolution on Linux claims that it can fight spam, but it seems that these mother f**kers like to play seek and hide with me.
Tags: Spam, Mail, Gr33n Data
Egyptian Python Lovers
Here are the essentials:
- Group name: python-eg
- Group home page: http://groups.google.com/group/python-eg
07 January 2006
Writing Arabic on Ubuntu
بسم الله الرحمن الرحيم
To write Arabic on Ubuntu, first make sure that you have Arabic Language Pack (use Synaptic Package Manager to find "language-pack-ar", and "language-pack-ar-base") I also have "ttf-arabeyes" and "libfribidi0" installed here. By the way there is a package called "language-support-ar" that I think it includes all of the above stuff. Then go to System->Preferences->Keyboard and from the "Layouts" tab add the "Arabi/qwerty" layout. Now right click on an empty area in the "Panel" (The bar at the bottom of your screen) and choose "Add to Pannel" and add the "Keyboard Indicator" and here you go.Tags: Linux, Arabic, Gr33n Data
PyFusker
Python implementation of Fusker
Introduction:
Most probably you are redirected from Wikipedia to this page, so please if you have any comment on the code just leave it here so that I can improve it. Also if you can help me know why are people interested in the fusker technology that much, and what web sites do you usually fusker.
The Python CodeTags: Python, Fusker, Gr33n Data
#!/usr/bin/python
""" PyFusker """
""" Author: Tarek Amr """
""" Version: 0.1 """
""" File: pyfusker.py """
""" Date: 07 January 2006 """
""" Replce [TAB] with \t """
class Fusker:
[TAB]def __init__(self, url):
[TAB][TAB]self.url = url
[TAB][TAB]self.urls = []
[TAB][TAB]self._generate()
[TAB]def _generate(self):
[TAB][TAB]comp = re.compile("\\[.+\\]")
[TAB][TAB]x = comp.findall(self.url)
[TAB][TAB]if not x:
[TAB][TAB][TAB]print "Url parsing error!"
[TAB][TAB][TAB]sys.exit()
[TAB][TAB]try:
[TAB][TAB][TAB]x[0] = x[0].strip("[")
[TAB][TAB][TAB]x[0] = x[0].strip("]")
[TAB][TAB][TAB]x1,x2 = x[0].split("-")
[TAB][TAB][TAB]x1 = string.atoi(x1)
[TAB][TAB][TAB]x2 = string.atoi(x2)
[TAB][TAB]except:
[TAB][TAB][TAB]print "Url parsing error!"
[TAB][TAB][TAB]sys.exit()
[TAB][TAB]if x1 > x2:
[TAB][TAB][TAB]print "Invalid range"
[TAB][TAB][TAB]sys.exit()
[TAB][TAB]temp_url = comp.split(url)
[TAB][TAB]i = x1
[TAB][TAB]while i < x2 :
[TAB][TAB][TAB]self.urls.append(string.join(temp_url,"%s" % i))
[TAB][TAB][TAB]i = i + 1
[TAB][TAB]return self.urls
[TAB]def list_urls(self):
[TAB][TAB]print self.urls
[TAB]def download_urls(self):
[TAB][TAB]for u in self.urls:
[TAB][TAB][TAB]try:
[TAB][TAB][TAB][TAB]print "Downloading ... ", u
[TAB][TAB][TAB][TAB]os.system("wget %s" % u)
[TAB][TAB][TAB]except:
[TAB][TAB][TAB][TAB]print "Wget Error!"
[TAB][TAB][TAB][TAB]continue
if __name__ == "__main__":
[TAB]try:
[TAB][TAB]url = sys.argv[1]
[TAB]except:
[TAB][TAB]print "Usage: python fusker.py http://www.website.com/img[01-06].jpg"
[TAB][TAB]sys.exit()
[TAB]f = Fusker(url)
[TAB]f.download_urls()
Pyblish
It is hard to write programs source code on your own blog or webpage especially when writing a language like Python where tabs and white spaces do matter. However blogs are the best place to share your coding ideas and receive comments and bugs fixes on them. So one nice idea is to replace the tab or "\t" with [TAB], and since it is really hard to do it by hand this is a python proggie to replace them automatically.
Tags: Python, Blog, Gr33n Data
''' Pyblish - Python Publisher '''By the way this code has nothing to do with that web server and application framework hosted at sourceforge and called Pyblish too
''' Author: Tarek Amr '''
''' Version: 0.1'''
''' File: pyblish.py'''
''' Date: 07 Jan 2006 '''
import string, sys
if __name__ == "__main__":
[TAB]try:
[TAB][TAB]filein = sys.argv[2]
[TAB][TAB]mode = sys.argv[1]
[TAB]except:
[TAB][TAB]print "Usage: python pyblish [ --decode | --encode ] INPUT_FILE_NAME"
[TAB][TAB]sys.exit()
[TAB]if mode == "--decode":
[TAB][TAB]temp = filein.split(".")
[TAB][TAB]temp[-1] = ".txt"
[TAB][TAB]fileout = string.join(temp)
[TAB]elif mode == "--encode":[TAB]
[TAB][TAB]temp = filein.split(".")
[TAB][TAB]temp[-1] = ".py"
[TAB][TAB]fileout = string.join(temp)
[TAB]else:
[TAB][TAB]print "Usage: python pyblish [ --decode | --encode ] INPUT_FILE_NAME"
[TAB][TAB]sys.exit()
[TAB]fdin = open(filein,"r")
[TAB]fdout = open(fileout,"w")
[TAB]for line in fdin.readlines():
[TAB][TAB]if mode == "--decode":
[TAB][TAB][TAB]line = line.replace("\t","[TAB]")
[TAB][TAB]elif mode == "--encode":
[TAB][TAB][TAB]line = line.replace("[TAB]","\t")
[TAB][TAB]fdout.write(line)
[TAB]fdin.close()
[TAB]fdout.close()
Tags: Python, Blog, Gr33n Data
04 January 2006
Eid El Adha
Within few days it will be Eid El Adha (Al Adha Feast), which is also known as the Major Feast as it is 4 days while Eid El Fetr (the Minor Feast) is on the other hand 3 days only. One of the main things that people do in Eid El Adha is el Adheya (eating sheep meat) which is done as a celebration for what Prophet Ibrahim (PBUH) had done when he was ordered by Allah to kill his own son Ismael, then Allah sent him a sheep to kill instead of Ismael when he was about to do it. Also people go to pilgrimage during that time in Mecca.
Tags: Religion, Culture, Gr33n Data
03 January 2006
Juniper NetScreen IDP to Block Shareaza
The signatures in the IDP are capable of blocking P2P and IM applications when they use standard ports, but sometimes these applications use non-standard ports nor protocols especially when the signatures are bound to specific protocols/ports.
For example the signature to block eDonkey "P2P:EDONKEY:CLIENT-HELLO" is bound to the TCP port range 4242-4662, so in order to completely block eDonkey you can bind it to any.
Similarly the signatures for Gnutella "P2P:GNUTELLA:CONNECT", "P2P:GNUTELLA:CONNECTION-OK", and "P2P:GNUTELLA:CONNECTION-OK-V06", they can be bound to any protocol/port range instead of a specific ones.
And that's why I prefer using Juniper IDP as it gives you the flexibility to edit the different attack signatures to meet your custom needs. However I think that they have to stop binding the P2P and IM related signatures from the beginning as people are not supposed to do such stuff by hand every time they install a new IDP.
Tags: Security, Juniper, Gr33n Data
For example the signature to block eDonkey "P2P:EDONKEY:CLIENT-HELLO" is bound to the TCP port range 4242-4662, so in order to completely block eDonkey you can bind it to any.
Similarly the signatures for Gnutella "P2P:GNUTELLA:CONNECT", "P2P:GNUTELLA:CONNECTION-OK", and "P2P:GNUTELLA:CONNECTION-OK-V06", they can be bound to any protocol/port range instead of a specific ones.
And that's why I prefer using Juniper IDP as it gives you the flexibility to edit the different attack signatures to meet your custom needs. However I think that they have to stop binding the P2P and IM related signatures from the beginning as people are not supposed to do such stuff by hand every time they install a new IDP.
Tags: Security, Juniper, Gr33n Data
Juniper NetScreen IDP GUI - Demo Mode
In orde to loging to the IDP GUI in an offline demo mode - i.e. without the need to have a real management server - just login as "admin" and use any password and type "/demo" in the Host Name field.
Tags: Juniper, Security, Gr33n Data
Cyber Friendship is Void
I think after more than 10 years of introducing the Internet to Egypt it has been proven that Cyber friendship is a big fake. It's next to impossible to get a friend from IM programs or web forums. Just talk to people you know or else you'll get stuck with desperate ill minded people online.
Tags: Cyber, Social, Gr33n Data
01 January 2006
NS-5GT, Switch from ADSL to Untrust
The NS-5GT with ADSL interface has the ADSL port active by default, and the Untrust interface is down. So in order to failover to the Untrust interface instead of the ADSL you can use the following command.
exec failover forceTags: NetScreen, ADSL, Gr33n Data
Subscribe to:
Posts (Atom)