Home General Computer Multimedia Business Lounge
|
How to Translate your perl script into c and assembly
|
|
10-24-2011, 02:20 AM
(This post was last modified: 10-24-2011 03:54 AM by ev1lut10n.)
|
|||
|
|||
|
How to Translate your perl script into c and assembly
How to Translate your perl script into c and assembly
by: ev1lut10n "sp3c14l fvck t0 3lz th3 gr34t35t k1d 1n pl8" "sp3c14l fvck t0 ch41n th3 4bs0lut3 l4m3r 1n pl8" love ALL KIDDIOT WHO TRY TO INSULT ME as example from here : http://jasaplus.com/backup.txt we may see it's a very 2 long code of perl , ok today we're gonna translate a sub into c and asm (32 bit) check this sub on line 9074: ============================= sub linux_udev_smaller_elf_binary { eval { if (-e "/etc/udev/rules.d/95-udev-late.rules") { our $lanjutkan="ya"; } else { if (-e "/lib/udev/rules.d/95-udev-late.rules") { our $lanjutkan="ya"; } else { our $lanjutkan="tidak"; } } } } ============================= considering the code on the sub here's what it will do: 1. the script will check the existence of 95-udev-late.rules at /etc/udev/rules.d if there's 95-udev-late.rules then the global variable $lanjutkan will be filled with string "ya" 2. otherwise if the script can not found /etc/udev/rules.d/95-udev-late.rules it will check on /lib/udev/rules.d/95-udev-late.rules if found the global variable $lanjutkan will be filled with string "ya" otherwise the global variable will be filled with the string "tidak" ok the first one we'll translate it into c it will be something like this: ================= char linux_udev_smaller_elf_binary() { struct stat bufer; char lanjutkan[20]; if(stat("/etc/udev/rules.d/95-udev-late.rules",&bufer)==0) { strcpy(lanjutkan,"ya"); } else { if(stat("/lib/udev/rules.d/95-udev-late.rules",&bufer)==0) { strcpy(lanjutkan,"ya"); } else { strcpy(lanjutkan,"tidak"); } } return lanjutkan; } ================ ok next we're translate it into assembly: ==================== section .data udev1 db "/etc/udev/rules.d/95-udev-late.rules",0x00 udev2 db "/lib/udev/rules.d/95-udev-late.rules",0x00 section .bss file: resd 1 section .text global _start _start: push ebp mov ebp,esp call the_cek mov ebx,udev1 int 0x80 mov dword [file],eax cmp dword [file],0 jle dont_continue continue: mov esp,ebp pop ebp keluar: push byte 0x01 pop eax int 80h dont_continue: call the_cek mov ebx,udev2 int 0x80 mov dword [file],eax cmp dword [file],0 jle dont_continue2 je continue dont_continue2: mov esp,ebp pop ebp jmp keluar the_cek: mov eax,5 xor ecx,0 mov edx,0x100 ret ==================== |
|||
|
10-24-2011, 02:50 AM
|
|||
|
|||
|
RE: How to Translate your perl script into c and assembly
wah mang keren dh ente om
![]() baru j belajar ma om ttg perl eh da yg baru nie ![]() ntr private agy ea om
|
|||
|
10-24-2011, 03:12 AM
|
|||
|
|||
|
RE: How to Translate your perl script into c and assembly
emang ajib bener ente om,
trima aku menjadi muridmu
|
|||
|
10-24-2011, 02:49 PM
|
|||
|
|||
|
RE: How to Translate your perl script into c and assembly
mantap master... ada programnya yg bisa langsung translate otomatis gitu gak yah??
thx.
|
|||
|
10-24-2011, 03:11 PM
|
|||
|
|||
|
RE: How to Translate your perl script into c and assembly
Wah keren banget thax om, nice share kang
|
|||
|
10-24-2011, 08:15 PM
|
|||
|
|||
|
RE: How to Translate your perl script into c and assembly
kakak ev1lut10n ~# mantap kakak,, perl ditranslate ke assembly....
kakak ev1lut10n keren banget...
|
|||
|
« Next Oldest | Next Newest »
|
| Topic Tools | ||||||
| ||||||
| Users Browsing |
| 1 Guest(s) |















