miércoles, 12 de noviembre de 2008

H2HC Brazil

I'm back for a 4 days trip to Brazil for the H2HC conference.
This year was held on the beatiful city of Sao Paulo, which turn out to be huge, with about 11 millions in 1500 km square kilometers.
Sao Paulo is well known for the street art, they have graphitys all around the city and apparently the thing there is who made the graphity in the most extreme place, so they go from your regular Joe's house to the 8th floor front of a big builiding, they even paint on churches and big publicity signs (Although usually the most extreme ones are just letters in black).

Anyways, I gave a keynote for the first time in my life and I believe it work out pretty well, people seems to have fun even tho they didnt laugh at my "simpsons taught me you speak spanish" joke to break the ice. A lot of people notice the effort I did on the design and congrats me on that, it worth the effort for sure! If you want to take a look at it, it can be downloaded HERE.

After me, Edgard Barbosa talk about the new framework they are releasing for Hypervisor and seems pretty nice, I'll be waiting for the binary release (Check the COSEINC website for more info).

Steve Adegbite gave a presentation about the new Microsoft program, I was too far from the speakers and couldn't get the whole presentation. I know he talked about MS Ecosystem, which i'm suscribed too, so I will get the scoop from there.

Pablo's presentation on DEP rocks! I'm not sure if everyone got the idea of how cool and useful is the project he had been working on. He gave all the insight info, and I recommend to check out his slides for the whole thing.

Thats the last presentation I could see, since I spent my whole time on the Immunity booth we had at the H2HC:

But I did escape for a little peek at:
Francisco Amato's on Evilgrade:

Felibre Nobrega's Security on USB

And Julio Auto's Reverse Engineer (Which I finally met. Its a great and smart guy, too bad the presentation was in Portuguese):

The conference was really good, I get to practice my non-existance portuguese with two TV Station that make me an interview (Which was basically me showing how to own machines with CANVAS) and spent good times with a lot of new friends.

I would like to thanks Rodrigo "BSDaemon" Rubira Branco and Felipe Balestra for inviting us to the conference. They did an amazing job and I bet people will appreciate it.


sábado, 1 de noviembre de 2008

Caipirinha and Python tricks

Yes, I don't have anything to blog about. And I know the rule, "If you are not better than the silence, then shut up".
But here I'm been part of the interweb, where everyone show and nobody watch.

Anyways, been doing a lot django development lately (yeah, that's -how- flexible my work is) and since we have to do a lot of things dynamic, I will show you a couple of tricks that might be useful.

First, I have been learning lisp on my free time, and that is why lately my code is all one liners:

if a ? b : c
in python:
( b, c)[ a ]
("bigger", "smaller or equal") [ a <20 ]

dynamic arguments:
function( *a, **b)
function( **{ 'name': 'nico'} )
is the same as: function(name="nico")

django's trick:
Model's OR search:
from django.db.models import Q
model.objects.filter( Q(name="nico") | Q(lastname="waisman") )

COUNT and GROUP BY (undocumented):
Find the names that get more repeated:
c = model.objects.extra( select = {'entry_count': "count(name)"} )
c.query.group_by = ['name']

The information can get for the result object by accesing the "entry_count" fields. This will be unsorted, if you want to get the top 5 then (i wish there were another way, but couldn't find it):
names = sorted( c, lambda x,y: cmp( y.entry_count, x.entry_count) )

Don't you love lambda? Once you get used to the whole map, filter and reduce is like heroin, impossible to quit, unless you get into religion.

Now the Caipirinha part of the post: Next thursday Pablo Solé and I will be flying to the beatiful city of Sao Paulo in Brazil to present at the H2HC conference. Immunity will have a booth, so please came by to said hi so we don't feel lonely :).
We will be doing the NOP certification for the first time in latin america, so if you are around and hungry for stack overflows, contact us!