Return Styles: Pseud0ch, Terminal, Valhalla, NES, Geocities, Blue Moon. Entire thread

md5 shit in python

Name: Anonymous 2009-01-20 23:22

import os, md5;

for root, dirs, files in os.walk(os.path.abspath('')):
    for f in files:
        e = os.path.splitext(f)[1]
        if (e and e not in [".py",".db"]):
            h = md5.new(file(f,'rb').read()).hexdigest()
            n = h + e
            try:
                os.rename(f,n)
            except WindowsError:
                os.unlink(n)
                os.rename(f,n)
            print n + " " + f


How do I optimize this, I'm watching SICP right now

Name: Anonymous 2009-01-22 11:00

>>31
THE INSTRUCTION LEA DOES NOT CHANGE EIP BY ITSELF( EIP is incremented by instruction size, but so is true for most instructions which don't operate on eip (jumps,return,calls))

In the code you posted, there are 2 instances of using LEA:
    lea (EIP+4)(%esp),%eax  # don't forget about the return address.
    lea 52(%esp),%edx

In the second case it's just assigns edx with an address on the stack, so I'll assume that's not what you're talking about.
In the first case EIP+4 is actually a macro for a variable on the stack 
EIP             = 0x30

so it's nothing more than lea eax, dword ptr [esp+34h] no changing EIP there. The lea instruction cannot change EIP directly. What that example does is modify the context. The instruction which actually changes eip in that code is iret

FUCK OFF PLEASE

Newer Posts
Don't change these.
Name: Email:
Entire Thread Thread List