#!/usr/bin/python # Copyright (c) 2007, Sofian Brabez , # All rights reserved. # # Redistribution and use in source and binary forms, with or without # modification, are permitted provided that the following conditions # are met: # 1. Redistributions of source code must retain the above copyright # notice, this list of conditions and the following disclaimer # in this position and unchanged. # 2. Redistributions in binary form must reproduce the above copyright # notice, this list of conditions and the following disclaimer in the # documentation and/or other materials provided with the distribution. # 3. The name(s) of the author(s) may not be used to endorse or promote # products derived from this software without specific prior written # permission. # # THIS SOFTWARE IS PROVIDED BY THE AUTHOR(S) ``AS IS'' AND ANY EXPRESS OR # IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES # OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. # IN NO EVENT SHALL THE AUTHOR(S) BE LIABLE FOR ANY DIRECT, INDIRECT, # INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT # NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, # DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY # THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT # (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF # THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. # # $Id$ - python cgi script for my homepage (need to refactor it) # import glob, os, re, string, sys, traceback, random sys.path.append(os.getcwd() + '/usr/local/lib/python2.5/') from stat import * import feedparser print "Content-Type: text/html; charset=ISO-8859-1\n" try: lang = '0' dbentry = os.getenv('DBENTRY') if dbentry: m = re.search(r'#LANG (\d+)', dbentry) if m: lang = m.group(1) quotes = ("Windows makes some noise, Linux plays music, but BSD ROCKS !", "People who can't read manual pages are called losers...", "Hana wa sakuragi hito wa bushi", "What is essential in war is victory, not prolonged operations", "Buttons are for idiots", "One Ring to rule them all, One Ring to find them, One Ring to bring them all and in the darkness bind them", "The Superior Man is all-embracing and not partial. The inferior man is partial and not all-embracing" ) advisories = { 'FreeBSD' : feedparser.parse('http://www.freebsd.org/security/advisories.rdf'), 'NetBSD' : feedparser.parse('http://www.netbsd.org/support/security/rss-advisories.xml'), } print ''' Sofian "sbz" Brabez

Sofian "sbz" Brabez

''' print "-- %s --" % random.choice(quotes) print '''

Whoami

I'm a french student in computer science major in network and developpement. The weblog which returns to the life.

Wishes

I would like enter in FreeBSD Member project to work on security aspect, maintain some ports related to Perl, Python, security and others.

Advisories

''' print "
    " keys = advisories.keys() keys.sort() for key in keys: print "
  • %s

  • " % key for i in range(6): print "
  • %s
  • " % (advisories[key].entries[i]['link'], advisories[key].entries[i]['title']) print '''

Software

Code

  • [pl] new-version - a single perl one-liner to get the new version of Linux kernel
  • [sh] battery - script to run on screen(1) to get my laptop battery lifetime
  • [pl] opendns - script to configure client nameserver from opendns
  • [c] modinfo - a C program to use FreeBSD module(1) api and get informations on a loaded module
  • [diff] patches - my patch related to FreeBSD, Perl and more in future

Project

School Project

  • gcalendar - a Java swing calendar using the google Gdata API and manage webservice Google Calendar (share code soon)

Documentation

Publication

  • GNU Linux Magazine France 100 - Perles de Mongueurs 100 oneliners

Interest

  • Free Software : FreeBSD, BSD, BSD, and BSD
  • Computer Science: POO, Theory, Operating System
  • System Administration: Hosting, Services, Monitoring, Automaton
  • Computer Security: Network, Kernel, Knowledge
  • Coding: C, Perl, Python, Shell, LaTeX more others ...
  • Window Manager: Gnome, Wmii, Fluxbox
  • Maemo project for my Nokia N800
  • Japanese Culture: Mangas and Animations, Literature Zen and Bushido
  • Martial Arts : Ju-Jitsu, my club

Affilation

Contact

  • irc:// freenode.net, geeknode.net, perl.org nickname "sbz" or "katan"
  • xmpp:// sbz@jabber.fr
  • wikipedia:// sbz
  • last.fm:// sbzz
  • facebook:// sbrabez
  • linkedin:// sbrabez
  • mailto:// sb(?:z\@(?:(?:ornorm|6dev).net|(cpan.org|gcu.info)|rabez\@gmail.com))

Valid XHTML 1.0 Transitional

''' except: tb = traceback.format_exception(sys.exc_type, sys.exc_value, sys.exc_traceback) tb = string.join(tb, "") print '
%s
' % tb