[Share] Belajar Bahasa C part 3
#1
Lightbulb 
Function & Recursif , Parsing parameter by value dan Parsing parameter by location ( reference )


di bahasa c kita juga bisa membuat function untuk mempermudah dan menghemat tenaga untuk coding karena hanya di tulis 1x dan bisa di gunakan seterusnya contohnya fungsi seperti ini


Code:
// tipedata namafunction(Parameter (tipedata namaparameter),(tipedata namaparameter)){
//block statement
}
int functionCoba(int angka){
//Block statement
//Return namavariable atau angka
}

untuk function bisa menggunakan semua tipe data termasuk void tapi kalau void tidak dapat mengembalikan nilai dan tidak dapat menggunakan return coba kita buat function sederhana untuk menghitung selisih nilai anda dengan nilai teman


Code:
#include <stdio.h>
int hitungSelisihNilai(int nilaiSaya,int nilaiTeman){
    int selisih = nilaiSaya - nilaiTeman;
    return selisih;
}

int main(){
int nilaiSaya,nilaiTeman;
printf("masukan nilai anda : ");
scanf("%d",&nilaiSaya);
fflush(stdin);

printf("masukan nilai teman : ");
scanf("%d",&nilaiTeman);
fflush(stdin);

printf("Selisih Nilai Anda Dengan Teman : %d ",hitungSelisihNilai(nilaiSaya,nilaiTeman));

return 0;
getchar();
}

dan kemudian kita buat contoh parsing parameter with value dan parsing parameter with reference


Code:
void ubahNilaiByValue(int nilai){
    nilai = nilai + 11;
    
}

void ubahNilaiByRef(int *nilai){
    *nilai = *nilai + 22;
}

int main(){
//Parsing parameter by value
int number = 50;
printf("Number Before : %d \n",number);
ubahNilaiByValue(number);
printf("Number After : %d \n",number);

//Parsing parameter by refference / addres / location
int number2 = 30;
printf("Number2 Before : %d \n",number2);
ubahNilaiByRef(&number2);
printf("Number2 After : %d \n",number2);
}

Parsing parameter by value number akan tetap 50 setelah atau sebelum di masukan ke function karena function tidak mengetahui adress dari number tersebut kecuali yang menggunakan parsing parameter by reference kita memberikan “&number2″ yang berarti kita memberikan adress kita maka function dapat merubah value kita tambahan ini ada contoh untuk parsing array


Code:
void printArray(int arr[] , int index){
printf("Array ke %d Adalah %d \n",index,arr[index]);
}

int main(){
//parsing parameter array
 int numb_arr[] = {10,15,20,25,30};
 printArray(numb_arr,0); // Maka akan keluar array index ke [0] = 10
 return 0;
 getchar();
}

Kemudian contoh rekrusif function yaitu function yang dapat memanggil dirinya sendiri di dalam function itu
Code:
int faktorial(int angka){

    if(angka <= 1)
        return 1;
    else
        return angka * faktorial(angka-1);
}

int main(){
    printf("Faktorial dari 6 : %d\n",faktorial(6));
       return 0;
       getchar();
 

Selengkapnya : http://www.hasnydes.us/2014/12/belajar-bahasa-c-part-3/

#2
Mau share-share source code yg aku kerjakan, lumayan untuk bikin forum tambah rame.... juga untuk arsip ilmu di forum. daripada saya bikin thread baru, nanti malah jadi kebanyakan thread. sehingga yg membutuhkan jadi mudah mencarinya. sedikit jumlah threadnya yg penting di update terus. Smile)



Latihan10.c
Spoiler! :

#include<stdio.h>

int main()

{

    int x;

    x = 0;

    do{
        printf("Hello , world !\n");
    } while (x != 0);

    getchar();
}


Latihan9.c
Spoiler! :

#include <stdio.h>

int main()

{
int x = 0;

while(x < 10) {

printf("%d\n", x);

x++;
}

getchar();
}



Latihan8.c
Spoiler! :

#include<stdio.h>

int main()

{
int x;

for (x = 0; x < 10; x++) {

printf("%d\n", x);

}

getchar();

}


=)) yg rajin ya buka spoiler nya....

Latihan7.c
Spoiler! :

# include <stdio.h>

int main()
{
   /* code */

   int usia;

   printf("Silahkan Masukan Usia Anda ");

   scanf("%d", &usia);

   if (usia < 100 ) {

       printf("Anda cukup muda\n");


   }

   else if (usia == 100){

       printf("anda sudah tua\n");


   }

   else{

       printf("Anda sangat tua\n");
   }

   return 0;
}



Latihan6.c
Spoiler! :

# include <stdio.h>

int main()

{
int x;

printf("Nyatakan x terlebih dahulu" );

return 0;
}


pass2.c
Spoiler! :

#include <stdio.h>
#include <string.h>
#include <stdlib.h>

int
main(int argc, char **argv)

{

char password[]="yomama";

if(argc<2)

{

printf("Usage: %s<password>n", argv[0]);

exit(1);


}

if(strncmp(argv[1],password,strlen(password)))

{
printf("FAILn");

exit(1);

}else{

printf("WINn");

return(0);
}

return(0); // never reached
}


Untuk pass2.c itu saya membuat sebuah file binary yg programnya akan meminta password. jika salah memasukan password maka program akan memberitahu, namun jika benar juga akan diberitahu. passwordnya tersimpan didalam file binary tersebut. jadi untuk mengetahui passwordnya maka kita harus melakukan reverse enginering.

ilmunya didapat dari sini:
https://brundlelab.wordpress.com/2010/06...-your-way/

Jadi untuk tutorial selengkapnya & cara penyelesaian masalahnya hingga tuntas bisa melihat pada link diatas. kita compile source code bahasa C (pass2.c) dengan menggunakan perintah:

gcc -o pass2 pass2.c

kemudian file binary dari hasil kompilasi itu kita pelajari dengan menggunakan perintah:

objdump -h pass2

maka di dapatkan hasil

hasil objdump pass2
Spoiler! :

pass2:     file format elf32-i386

Sections:
Idx Name          Size      VMA       LMA       File off  Algn
 0 .interp       00000013  08048134  08048134  00000134  2**0
                 CONTENTS, ALLOC, LOAD, READONLY, DATA
 1 .note.ABI-tag 00000020  08048148  08048148  00000148  2**2
                 CONTENTS, ALLOC, LOAD, READONLY, DATA
 2 .note.gnu.build-id 00000024  08048168  08048168  00000168  2**2
                 CONTENTS, ALLOC, LOAD, READONLY, DATA
 3 .hash         00000034  0804818c  0804818c  0000018c  2**2
                 CONTENTS, ALLOC, LOAD, READONLY, DATA
 4 .gnu.hash     00000020  080481c0  080481c0  000001c0  2**2
                 CONTENTS, ALLOC, LOAD, READONLY, DATA
 5 .dynsym       00000080  080481e0  080481e0  000001e0  2**2
                 CONTENTS, ALLOC, LOAD, READONLY, DATA
 6 .dynstr       00000060  08048260  08048260  00000260  2**0
                 CONTENTS, ALLOC, LOAD, READONLY, DATA
 7 .gnu.version  00000010  080482c0  080482c0  000002c0  2**1
                 CONTENTS, ALLOC, LOAD, READONLY, DATA
 8 .gnu.version_r 00000020  080482d0  080482d0  000002d0  2**2
                 CONTENTS, ALLOC, LOAD, READONLY, DATA
 9 .rel.dyn      00000008  080482f0  080482f0  000002f0  2**2
                 CONTENTS, ALLOC, LOAD, READONLY, DATA
10 .rel.plt      00000030  080482f8  080482f8  000002f8  2**2
                 CONTENTS, ALLOC, LOAD, READONLY, DATA
11 .init         00000026  08048328  08048328  00000328  2**2
                 CONTENTS, ALLOC, LOAD, READONLY, CODE
12 .plt          00000070  08048350  08048350  00000350  2**4
                 CONTENTS, ALLOC, LOAD, READONLY, CODE
13 .text         00000200  080483c0  080483c0  000003c0  2**4
                 CONTENTS, ALLOC, LOAD, READONLY, CODE
14 .fini         00000017  080485c0  080485c0  000005c0  2**2
                 CONTENTS, ALLOC, LOAD, READONLY, CODE
15 .rodata       00000028  080485d8  080485d8  000005d8  2**2
                 CONTENTS, ALLOC, LOAD, READONLY, DATA
16 .eh_frame_hdr 0000001c  08048600  08048600  00000600  2**2
                 CONTENTS, ALLOC, LOAD, READONLY, DATA
17 .eh_frame     00000060  0804861c  0804861c  0000061c  2**2
                 CONTENTS, ALLOC, LOAD, READONLY, DATA
18 .init_array   00000004  0804967c  0804967c  0000067c  2**2
                 CONTENTS, ALLOC, LOAD, DATA
19 .fini_array   00000004  08049680  08049680  00000680  2**2
                 CONTENTS, ALLOC, LOAD, DATA
20 .jcr          00000004  08049684  08049684  00000684  2**2
                 CONTENTS, ALLOC, LOAD, DATA
21 .dynamic      000000f0  08049688  08049688  00000688  2**2
                 CONTENTS, ALLOC, LOAD, DATA
22 .got          00000004  08049778  08049778  00000778  2**2
                 CONTENTS, ALLOC, LOAD, DATA
23 .got.plt      00000024  0804977c  0804977c  0000077c  2**2
                 CONTENTS, ALLOC, LOAD, DATA
24 .data         00000008  080497a0  080497a0  000007a0  2**2
                 CONTENTS, ALLOC, LOAD, DATA
25 .bss          00000004  080497a8  080497a8  000007a8  2**2
                 ALLOC
26 .comment      00000038  00000000  00000000  000007a8  2**0
                 CONTENTS, READONLY


Hasil perintah objdump -T pass2 :

Spoiler! :

pass2:     file format elf32-i386

DYNAMIC SYMBOL TABLE:
00000000      DF *UND* 00000000  GLIBC_2.0   printf
00000000  w   D  *UND* 00000000              __gmon_start__
00000000      DF *UND* 00000000  GLIBC_2.0   exit
00000000      DF *UND* 00000000  GLIBC_2.0   strlen
00000000      DF *UND* 00000000  GLIBC_2.0   __libc_start_main
00000000      DF *UND* 00000000  GLIBC_2.0   strncmp
080485dc g    DO .rodata 00000004  Base        _IO_stdin_used


kalau hasil perintah :

hexdump -C -s 0x400 pass2|less

adalah
Spoiler! :

000003c0  31 ed 5e 89 e1 83 e4 f0  50 54 52 68 50 85 04 08  |1.^.....PTRhP...|
000003d0  68 60 85 04 08 51 56 68  ac 84 04 08 e8 bf ff ff  |h`...QVh........|
000003e0  ff f4 90 90 90 90 90 90  90 90 90 90 90 90 90 90  |................|
000003f0  b8 ab 97 04 08 2d a8 97  04 08 83 f8 06 77 02 f3  |.....-.......w..|
00000400  c3 b8 00 00 00 00 85 c0  74 f5 55 89 e5 83 ec 18  |........t.U.....|
00000410  c7 04 24 a8 97 04 08 ff  d0 c9 c3 90 8d 74 26 00  |..$..........t&.|
00000420  b8 a8 97 04 08 2d a8 97  04 08 c1 f8 02 89 c2 c1  |.....-..........|
00000430  ea 1f 01 d0 d1 f8 75 02  f3 c3 ba 00 00 00 00 85  |......u.........|
00000440  d2 74 f5 55 89 e5 83 ec  18 89 44 24 04 c7 04 24  |.t.U......D$...$|
00000450  a8 97 04 08 ff d2 c9 c3  90 8d b4 26 00 00 00 00  |...........&....|
00000460  80 3d a8 97 04 08 00 75  13 55 89 e5 83 ec 08 e8  |.=.....u.U......|
00000470  7c ff ff ff c6 05 a8 97  04 08 01 c9 f3 c3 66 90  ||.............f.|
00000480  a1 84 96 04 08 85 c0 74  1e b8 00 00 00 00 85 c0  |.......t........|
00000490  74 15 55 89 e5 83 ec 18  c7 04 24 84 96 04 08 ff  |t.U.......$.....|
000004a0  d0 c9 e9 79 ff ff ff e9  74 ff ff ff 55 89 e5 83  |...y....t...U...|
000004b0  e4 f0 83 ec 20 c7 44 24  19 79 6f 6d 61 66 c7 44  |.... .D$.yomaf.D|
000004c0  24 1d 6d 61 c6 44 24 1f  00 83 7d 08 01 7f 21 8b  |$.ma.D$...}...!.|
000004d0  45 0c 8b 00 89 44 24 04  c7 04 24 e0 85 04 08 e8  |E....D$...$.....|
000004e0  7c fe ff ff c7 04 24 01  00 00 00 e8 90 fe ff ff  ||.....$.........|
000004f0  8d 44 24 19 89 04 24 e8  94 fe ff ff 8b 55 0c 83  |.D$...$......U..|
00000500  c2 04 8b 12 89 44 24 08  8d 44 24 19 89 44 24 04  |.....D$..D$..D$.|
00000510  89 14 24 e8 98 fe ff ff  85 c0 74 18 c7 04 24 f5  |..$.......t...$.|
00000520  85 04 08 e8 38 fe ff ff  c7 04 24 01 00 00 00 e8  |....8.....$.....|
00000530  4c fe ff ff c7 04 24 fb  85 04 08 e8 20 fe ff ff  |L.....$..... ...|
00000540  b8 00 00 00 00 c9 c3 90  90 90 90 90 90 90 90 90  |................|
00000550  55 89 e5 5d c3 8d 74 26  00 8d bc 27 00 00 00 00  |U..]..t&...'....|
00000560  55 89 e5 57 56 53 e8 4f  00 00 00 81 c3 11 12 00  |U..WVS.O........|
00000570  00 83 ec 1c e8 af fd ff  ff 8d bb 04 ff ff ff 8d  |................|
00000580  83 00 ff ff ff 29 c7 c1  ff 02 85 ff 74 24 31 f6  |.....)......t$1.|
00000590  8b 45 10 89 44 24 08 8b  45 0c 89 44 24 04 8b 45  |.E..D$..E..D$..E|
000005a0  08 89 04 24 ff 94 b3 00  ff ff ff 83 c6 01 39 fe  |...$..........9.|
000005b0  72 de 83 c4 1c 5b 5e 5f  5d c3 8b 1c 24 c3 90 90  |r....[^_]...$...|
000005c0  55 89 e5 53 83 ec 04 e8  00 00 00 00 5b 81 c3 b0  |U..S........[...|
000005d0  11 00 00 59 5b c9 c3 00  03 00 00 00 01 00 02 00  |...Y[...........|
000005e0  55 73 61 67 65 3a 20 25  73 3c 70 61 73 73 77 6f  |Usage: %s<passwo|
000005f0  72 64 3e 6e 00 46 41 49  4c 6e 00 57 49 4e 6e 00  |rd>n.FAILn.WINn.|
00000600  01 1b 03 3b 18 00 00 00  02 00 00 00 50 fd ff ff  |...;........P...|
00000610  34 00 00 00 ac fe ff ff  58 00 00 00 14 00 00 00  |4.......X.......|
00000620  00 00 00 00 01 7a 52 00  01 7c 08 01 1b 0c 04 04  |.....zR..|......|
00000630  88 01 00 00 20 00 00 00  1c 00 00 00 14 fd ff ff  |.... ...........|
00000640  70 00 00 00 00 0e 08 46  0e 0c 4a 0f 0b 74 04 78  |p......F..J..t.x|
00000650  00 3f 1a 3b 2a 32 24 22  1c 00 00 00 40 00 00 00  |.?.;*2$"....@...|
00000660  4c fe ff ff 9b 00 00 00  00 41 0e 08 85 02 42 0d  |L........A....B.|
00000670  05 02 97 c5 0c 04 04 00  00 00 00 00 80 84 04 08  |................|
00000680  60 84 04 08 00 00 00 00  01 00 00 00 10 00 00 00  |`...............|
00000690  0c 00 00 00 28 83 04 08  0d 00 00 00 c0 85 04 08  |....(...........|
000006a0  19 00 00 00 7c 96 04 08  1b 00 00 00 04 00 00 00  |....|...........|
000006b0  1a 00 00 00 80 96 04 08  1c 00 00 00 04 00 00 00  |................|
000006c0  04 00 00 00 8c 81 04 08  f5 fe ff 6f c0 81 04 08  |...........o....|
000006d0  05 00 00 00 60 82 04 08  06 00 00 00 e0 81 04 08  |....`...........|
000006e0  0a 00 00 00 60 00 00 00  0b 00 00 00 10 00 00 00  |....`...........|
000006f0  15 00 00 00 00 00 00 00  03 00 00 00 7c 97 04 08  |............|...|
00000700  02 00 00 00 30 00 00 00  14 00 00 00 11 00 00 00  |....0...........|
00000710  17 00 00 00 f8 82 04 08  11 00 00 00 f0 82 04 08  |................|
00000720  12 00 00 00 08 00 00 00  13 00 00 00 08 00 00 00  |................|
00000730  fe ff ff 6f d0 82 04 08  ff ff ff 6f 01 00 00 00  |...o.......o....|
00000740  f0 ff ff 6f c0 82 04 08  00 00 00 00 00 00 00 00  |...o............|
00000750  00 00 00 00 00 00 00 00  00 00 00 00 00 00 00 00  |................|
*
00000770  00 00 00 00 00 00 00 00  00 00 00 00 88 96 04 08  |................|
00000780  00 00 00 00 00 00 00 00  66 83 04 08 76 83 04 08  |........f...v...|
00000790  86 83 04 08 96 83 04 08  a6 83 04 08 b6 83 04 08  |................|
000007a0  00 00 00 00 00 00 00 00  47 43 43 3a 20 28 44 65  |........GCC: (De|
000007b0  62 69 61 6e 20 34 2e 37  2e 32 2d 35 29 20 34 2e  |bian 4.7.2-5) 4.|
000007c0  37 2e 32 00 47 43 43 3a  20 28 44 65 62 69 61 6e  |7.2.GCC: (Debian|
000007d0  20 34 2e 34 2e 37 2d 32  29 20 34 2e 34 2e 37 00  | 4.4.7-2) 4.4.7.|
000007e0  00 2e 73 79 6d 74 61 62  00 2e 73 74 72 74 61 62  |..symtab..strtab|
000007f0  00 2e 73 68 73 74 72 74  61 62 00 2e 69 6e 74 65  |..shstrtab..inte|
00000800  72 70 00 2e 6e 6f 74 65  2e 41 42 49 2d 74 61 67  |rp..note.ABI-tag|
00000810  00 2e 6e 6f 74 65 2e 67  6e 75 2e 62 75 69 6c 64  |..note.gnu.build|
00000820  2d 69 64 00 2e 67 6e 75  2e 68 61 73 68 00 2e 64  |-id..gnu.hash..d|
00000830  79 6e 73 79 6d 00 2e 64  79 6e 73 74 72 00 2e 67  |ynsym..dynstr..g|
00000840  6e 75 2e 76 65 72 73 69  6f 6e 00 2e 67 6e 75 2e  |nu.version..gnu.|
00000850  76 65 72 73 69 6f 6e 5f  72 00 2e 72 65 6c 2e 64  |version_r..rel.d|
00000860  79 6e 00 2e 72 65 6c 2e  70 6c 74 00 2e 69 6e 69  |yn..rel.plt..ini|
00000870  74 00 2e 74 65 78 74 00  2e 66 69 6e 69 00 2e 72  |t..text..fini..r|
00000880  6f 64 61 74 61 00 2e 65  68 5f 66 72 61 6d 65 5f  |odata..eh_frame_|
00000890  68 64 72 00 2e 65 68 5f  66 72 61 6d 65 00 2e 69  |hdr..eh_frame..i|
000008a0  6e 69 74 5f 61 72 72 61  79 00 2e 66 69 6e 69 5f  |nit_array..fini_|
000008b0  61 72 72 61 79 00 2e 6a  63 72 00 2e 64 79 6e 61  |array..jcr..dyna|
000008c0  6d 69 63 00 2e 67 6f 74  00 2e 67 6f 74 2e 70 6c  |mic..got..got.pl|
000008d0  74 00 2e 64 61 74 61 00  2e 62 73 73 00 2e 63 6f  |t..data..bss..co|
000008e0  6d 6d 65 6e 74 00 00 00  00 00 00 00 00 00 00 00  |mment...........|
000008f0  00 00 00 00 00 00 00 00  00 00 00 00 00 00 00 00  |................|
*
00000910  1b 00 00 00 01 00 00 00  02 00 00 00 34 81 04 08  |............4...|
00000920  34 01 00 00 13 00 00 00  00 00 00 00 00 00 00 00  |4...............|
00000930  01 00 00 00 00 00 00 00  23 00 00 00 07 00 00 00  |........#.......|
00000940  02 00 00 00 48 81 04 08  48 01 00 00 20 00 00 00  |....H...H... ...|
00000950  00 00 00 00 00 00 00 00  04 00 00 00 00 00 00 00  |................|
00000960  31 00 00 00 07 00 00 00  02 00 00 00 68 81 04 08  |1...........h...|
00000970  68 01 00 00 24 00 00 00  00 00 00 00 00 00 00 00  |h...$...........|
00000980  04 00 00 00 00 00 00 00  48 00 00 00 05 00 00 00  |........H.......|
00000990  02 00 00 00 8c 81 04 08  8c 01 00 00 34 00 00 00  |............4...|
000009a0  06 00 00 00 00 00 00 00  04 00 00 00 04 00 00 00  |................|
000009b0  44 00 00 00 f6 ff ff 6f  02 00 00 00 c0 81 04 08  |D......o........|
000009c0  c0 01 00 00 20 00 00 00  06 00 00 00 00 00 00 00  |.... ...........|
000009d0  04 00 00 00 04 00 00 00  4e 00 00 00 0b 00 00 00  |........N.......|
000009e0  02 00 00 00 e0 81 04 08  e0 01 00 00 80 00 00 00  |................|
000009f0  07 00 00 00 01 00 00 00  04 00 00 00 10 00 00 00  |................|
00000a00  56 00 00 00 03 00 00 00  02 00 00 00 60 82 04 08  |V...........`...|
00000a10  60 02 00 00 60 00 00 00  00 00 00 00 00 00 00 00  |`...`...........|
00000a20  01 00 00 00 00 00 00 00  5e 00 00 00 ff ff ff 6f  |........^......o|
00000a30  02 00 00 00 c0 82 04 08  c0 02 00 00 10 00 00 00  |................|
00000a40  06 00 00 00 00 00 00 00  02 00 00 00 02 00 00 00  |................|
00000a50  6b 00 00 00 fe ff ff 6f  02 00 00 00 d0 82 04 08  |k......o........|
00000a60  d0 02 00 00 20 00 00 00  07 00 00 00 01 00 00 00  |.... ...........|
00000a70  04 00 00 00 00 00 00 00  7a 00 00 00 09 00 00 00  |........z.......|
00000a80  02 00 00 00 f0 82 04 08  f0 02 00 00 08 00 00 00  |................|
00000a90  06 00 00 00 00 00 00 00  04 00 00 00 08 00 00 00  |................|
00000aa0  83 00 00 00 09 00 00 00  02 00 00 00 f8 82 04 08  |................|
00000ab0  f8 02 00 00 30 00 00 00  06 00 00 00 0d 00 00 00  |....0...........|
00000ac0  04 00 00 00 08 00 00 00  8c 00 00 00 01 00 00 00  |................|
00000ad0  06 00 00 00 28 83 04 08  28 03 00 00 26 00 00 00  |....(...(...&...|
00000ae0  00 00 00 00 00 00 00 00  04 00 00 00 00 00 00 00  |................|
00000af0  87 00 00 00 01 00 00 00  06 00 00 00 50 83 04 08  |............P...|
00000b00  50 03 00 00 70 00 00 00  00 00 00 00 00 00 00 00  |P...p...........|
00000b10  10 00 00 00 04 00 00 00  92 00 00 00 01 00 00 00  |................|
00000b20  06 00 00 00 c0 83 04 08  c0 03 00 00 00 02 00 00  |................|
00000b30  00 00 00 00 00 00 00 00  10 00 00 00 00 00 00 00  |................|
00000b40  98 00 00 00 01 00 00 00  06 00 00 00 c0 85 04 08  |................|
00000b50  c0 05 00 00 17 00 00 00  00 00 00 00 00 00 00 00  |................|
00000b60  04 00 00 00 00 00 00 00  9e 00 00 00 01 00 00 00  |................|
00000b70  02 00 00 00 d8 85 04 08  d8 05 00 00 28 00 00 00  |............(...|
00000b80  00 00 00 00 00 00 00 00  04 00 00 00 00 00 00 00  |................|
00000b90  a6 00 00 00 01 00 00 00  02 00 00 00 00 86 04 08  |................|
00000ba0  00 06 00 00 1c 00 00 00  00 00 00 00 00 00 00 00  |................|
00000bb0  04 00 00 00 00 00 00 00  b4 00 00 00 01 00 00 00  |................|
00000bc0  02 00 00 00 1c 86 04 08  1c 06 00 00 60 00 00 00  |............`...|
00000bd0  00 00 00 00 00 00 00 00  04 00 00 00 00 00 00 00  |................|
00000be0  be 00 00 00 0e 00 00 00  03 00 00 00 7c 96 04 08  |............|...|
00000bf0  7c 06 00 00 04 00 00 00  00 00 00 00 00 00 00 00  ||...............|
00000c00  04 00 00 00 00 00 00 00  ca 00 00 00 0f 00 00 00  |................|
00000c10  03 00 00 00 80 96 04 08  80 06 00 00 04 00 00 00  |................|
00000c20  00 00 00 00 00 00 00 00  04 00 00 00 00 00 00 00  |................|
00000c30  d6 00 00 00 01 00 00 00  03 00 00 00 84 96 04 08  |................|
00000c40  84 06 00 00 04 00 00 00  00 00 00 00 00 00 00 00  |................|
00000c50  04 00 00 00 00 00 00 00  db 00 00 00 06 00 00 00  |................|
00000c60  03 00 00 00 88 96 04 08  88 06 00 00 f0 00 00 00  |................|
00000c70  07 00 00 00 00 00 00 00  04 00 00 00 08 00 00 00  |................|
00000c80  e4 00 00 00 01 00 00 00  03 00 00 00 78 97 04 08  |............x...|
00000c90  78 07 00 00 04 00 00 00  00 00 00 00 00 00 00 00  |x...............|
00000ca0  04 00 00 00 04 00 00 00  e9 00 00 00 01 00 00 00  |................|
00000cb0  03 00 00 00 7c 97 04 08  7c 07 00 00 24 00 00 00  |....|...|...$...|
00000cc0  00 00 00 00 00 00 00 00  04 00 00 00 04 00 00 00  |................|
00000cd0  f2 00 00 00 01 00 00 00  03 00 00 00 a0 97 04 08  |................|
00000ce0  a0 07 00 00 08 00 00 00  00 00 00 00 00 00 00 00  |................|
00000cf0  04 00 00 00 00 00 00 00  f8 00 00 00 08 00 00 00  |................|
00000d00  03 00 00 00 a8 97 04 08  a8 07 00 00 04 00 00 00  |................|
00000d10  00 00 00 00 00 00 00 00  04 00 00 00 00 00 00 00  |................|
00000d20  fd 00 00 00 01 00 00 00  30 00 00 00 00 00 00 00  |........0.......|
00000d30  a8 07 00 00 38 00 00 00  00 00 00 00 00 00 00 00  |....8...........|
00000d40  01 00 00 00 01 00 00 00  11 00 00 00 03 00 00 00  |................|
00000d50  00 00 00 00 00 00 00 00  e0 07 00 00 06 01 00 00  |................|
00000d60  00 00 00 00 00 00 00 00  01 00 00 00 00 00 00 00  |................|
00000d70  01 00 00 00 02 00 00 00  00 00 00 00 00 00 00 00  |................|
00000d80  c0 0d 00 00 60 04 00 00  1e 00 00 00 2d 00 00 00  |....`.......-...|
00000d90  04 00 00 00 10 00 00 00  09 00 00 00 03 00 00 00  |................|
00000da0  00 00 00 00 00 00 00 00  20 12 00 00 88 02 00 00  |........ .......|
00000db0  00 00 00 00 00 00 00 00  01 00 00 00 00 00 00 00  |................|
00000dc0  00 00 00 00 00 00 00 00  00 00 00 00 00 00 00 00  |................|
00000dd0  00 00 00 00 34 81 04 08  00 00 00 00 03 00 01 00  |....4...........|
00000de0  00 00 00 00 48 81 04 08  00 00 00 00 03 00 02 00  |....H...........|
00000df0  00 00 00 00 68 81 04 08  00 00 00 00 03 00 03 00  |....h...........|
00000e00  00 00 00 00 8c 81 04 08  00 00 00 00 03 00 04 00  |................|
00000e10  00 00 00 00 c0 81 04 08  00 00 00 00 03 00 05 00  |................|
00000e20  00 00 00 00 e0 81 04 08  00 00 00 00 03 00 06 00  |................|
00000e30  00 00 00 00 60 82 04 08  00 00 00 00 03 00 07 00  |....`...........|
00000e40  00 00 00 00 c0 82 04 08  00 00 00 00 03 00 08 00  |................|
00000e50  00 00 00 00 d0 82 04 08  00 00 00 00 03 00 09 00  |................|
00000e60  00 00 00 00 f0 82 04 08  00 00 00 00 03 00 0a 00  |................|
00000e70  00 00 00 00 f8 82 04 08  00 00 00 00 03 00 0b 00  |................|
00000e80  00 00 00 00 28 83 04 08  00 00 00 00 03 00 0c 00  |....(...........|
00000e90  00 00 00 00 50 83 04 08  00 00 00 00 03 00 0d 00  |....P...........|
00000ea0  00 00 00 00 c0 83 04 08  00 00 00 00 03 00 0e 00  |................|
00000eb0  00 00 00 00 c0 85 04 08  00 00 00 00 03 00 0f 00  |................|
00000ec0  00 00 00 00 d8 85 04 08  00 00 00 00 03 00 10 00  |................|
00000ed0  00 00 00 00 00 86 04 08  00 00 00 00 03 00 11 00  |................|
00000ee0  00 00 00 00 1c 86 04 08  00 00 00 00 03 00 12 00  |................|
00000ef0  00 00 00 00 7c 96 04 08  00 00 00 00 03 00 13 00  |....|...........|
00000f00  00 00 00 00 80 96 04 08  00 00 00 00 03 00 14 00  |................|
00000f10  00 00 00 00 84 96 04 08  00 00 00 00 03 00 15 00  |................|
00000f20  00 00 00 00 88 96 04 08  00 00 00 00 03 00 16 00  |................|
00000f30  00 00 00 00 78 97 04 08  00 00 00 00 03 00 17 00  |....x...........|
00000f40  00 00 00 00 7c 97 04 08  00 00 00 00 03 00 18 00  |....|...........|
00000f50  00 00 00 00 a0 97 04 08  00 00 00 00 03 00 19 00  |................|
00000f60  00 00 00 00 a8 97 04 08  00 00 00 00 03 00 1a 00  |................|
00000f70  00 00 00 00 00 00 00 00  00 00 00 00 03 00 1b 00  |................|
00000f80  01 00 00 00 00 00 00 00  00 00 00 00 04 00 f1 ff  |................|
00000f90  0c 00 00 00 84 96 04 08  00 00 00 00 01 00 15 00  |................|
00000fa0  19 00 00 00 f0 83 04 08  00 00 00 00 02 00 0e 00  |................|
00000fb0  2e 00 00 00 20 84 04 08  00 00 00 00 02 00 0e 00  |.... ...........|
00000fc0  41 00 00 00 60 84 04 08  00 00 00 00 02 00 0e 00  |A...`...........|
00000fd0  57 00 00 00 a8 97 04 08  01 00 00 00 01 00 1a 00  |W...............|
00000fe0  66 00 00 00 80 96 04 08  00 00 00 00 01 00 14 00  |f...............|
00000ff0  8d 00 00 00 80 84 04 08  00 00 00 00 02 00 0e 00  |................|
00001000  99 00 00 00 7c 96 04 08  00 00 00 00 01 00 13 00  |....|...........|
00001010  b8 00 00 00 00 00 00 00  00 00 00 00 04 00 f1 ff  |................|
00001020  01 00 00 00 00 00 00 00  00 00 00 00 04 00 f1 ff  |................|
00001030  c0 00 00 00 78 86 04 08  00 00 00 00 01 00 12 00  |....x...........|
00001040  ce 00 00 00 84 96 04 08  00 00 00 00 01 00 15 00  |................|
00001050  da 00 00 00 80 96 04 08  00 00 00 00 00 00 13 00  |................|
00001060  eb 00 00 00 88 96 04 08  00 00 00 00 01 00 16 00  |................|
00001070  f4 00 00 00 7c 96 04 08  00 00 00 00 00 00 13 00  |....|...........|
00001080  07 01 00 00 7c 97 04 08  00 00 00 00 01 00 18 00  |....|...........|
00001090  1d 01 00 00 50 85 04 08  05 00 00 00 12 00 0e 00  |....P...........|
000010a0  2d 01 00 00 ba 85 04 08  00 00 00 00 12 02 0e 00  |-...............|
000010b0  44 01 00 00 00 00 00 00  00 00 00 00 20 00 00 00  |D........... ...|
000010c0  60 01 00 00 a0 97 04 08  00 00 00 00 20 00 19 00  |`........... ...|
000010d0  6b 01 00 00 00 00 00 00  00 00 00 00 12 00 00 00  |k...............|
000010e0  7d 01 00 00 a8 97 04 08  00 00 00 00 10 00 f1 ff  |}...............|
000010f0  84 01 00 00 c0 85 04 08  00 00 00 00 12 00 0f 00  |................|
00001100  8a 01 00 00 a0 97 04 08  00 00 00 00 10 00 19 00  |................|
00001110  97 01 00 00 00 00 00 00  00 00 00 00 20 00 00 00  |............ ...|
00001120  a6 01 00 00 00 00 00 00  00 00 00 00 12 00 00 00  |................|
00001130  b6 01 00 00 a4 97 04 08  00 00 00 00 11 02 19 00  |................|
00001140  c3 01 00 00 dc 85 04 08  04 00 00 00 11 00 10 00  |................|
00001150  d2 01 00 00 00 00 00 00  00 00 00 00 12 00 00 00  |................|
00001160  e4 01 00 00 00 00 00 00  00 00 00 00 12 00 00 00  |................|
00001170  01 02 00 00 60 85 04 08  5a 00 00 00 12 00 0e 00  |....`...Z.......|
00001180  11 02 00 00 ac 97 04 08  00 00 00 00 10 00 f1 ff  |................|
00001190  16 02 00 00 c0 83 04 08  00 00 00 00 12 00 0e 00  |................|
000011a0  1d 02 00 00 d8 85 04 08  04 00 00 00 11 00 10 00  |................|
000011b0  24 02 00 00 a8 97 04 08  00 00 00 00 10 00 f1 ff  |$...............|
000011c0  30 02 00 00 ac 84 04 08  9b 00 00 00 12 00 0e 00  |0...............|
000011d0  35 02 00 00 00 00 00 00  00 00 00 00 20 00 00 00  |5........... ...|
000011e0  49 02 00 00 a8 97 04 08  00 00 00 00 11 02 19 00  |I...............|
000011f0  55 02 00 00 00 00 00 00  00 00 00 00 20 00 00 00  |U........... ...|
00001200  6f 02 00 00 00 00 00 00  00 00 00 00 12 00 00 00  |o...............|
00001210  82 02 00 00 28 83 04 08  00 00 00 00 12 00 0c 00  |....(...........|
00001220  00 63 72 74 73 74 75 66  66 2e 63 00 5f 5f 4a 43  |.crtstuff.c.__JC|
00001230  52 5f 4c 49 53 54 5f 5f  00 64 65 72 65 67 69 73  |R_LIST__.deregis|
00001240  74 65 72 5f 74 6d 5f 63  6c 6f 6e 65 73 00 72 65  |ter_tm_clones.re|
00001250  67 69 73 74 65 72 5f 74  6d 5f 63 6c 6f 6e 65 73  |gister_tm_clones|
00001260  00 5f 5f 64 6f 5f 67 6c  6f 62 61 6c 5f 64 74 6f  |.__do_global_dto|
00001270  72 73 5f 61 75 78 00 63  6f 6d 70 6c 65 74 65 64  |rs_aux.completed|
00001280  2e 35 37 33 30 00 5f 5f  64 6f 5f 67 6c 6f 62 61  |.5730.__do_globa|
00001290  6c 5f 64 74 6f 72 73 5f  61 75 78 5f 66 69 6e 69  |l_dtors_aux_fini|
000012a0  5f 61 72 72 61 79 5f 65  6e 74 72 79 00 66 72 61  |_array_entry.fra|
000012b0  6d 65 5f 64 75 6d 6d 79  00 5f 5f 66 72 61 6d 65  |me_dummy.__frame|
000012c0  5f 64 75 6d 6d 79 5f 69  6e 69 74 5f 61 72 72 61  |_dummy_init_arra|
000012d0  79 5f 65 6e 74 72 79 00  70 61 73 73 32 2e 63 00  |y_entry.pass2.c.|
000012e0  5f 5f 46 52 41 4d 45 5f  45 4e 44 5f 5f 00 5f 5f  |__FRAME_END__.__|
000012f0  4a 43 52 5f 45 4e 44 5f  5f 00 5f 5f 69 6e 69 74  |JCR_END__.__init|
00001300  5f 61 72 72 61 79 5f 65  6e 64 00 5f 44 59 4e 41  |_array_end._DYNA|
00001310  4d 49 43 00 5f 5f 69 6e  69 74 5f 61 72 72 61 79  |MIC.__init_array|
00001320  5f 73 74 61 72 74 00 5f  47 4c 4f 42 41 4c 5f 4f  |_start._GLOBAL_O|
00001330  46 46 53 45 54 5f 54 41  42 4c 45 5f 00 5f 5f 6c  |FFSET_TABLE_.__l|
00001340  69 62 63 5f 63 73 75 5f  66 69 6e 69 00 5f 5f 69  |ibc_csu_fini.__i|
00001350  36 38 36 2e 67 65 74 5f  70 63 5f 74 68 75 6e 6b  |686.get_pc_thunk|
00001360  2e 62 78 00 5f 49 54 4d  5f 64 65 72 65 67 69 73  |.bx._ITM_deregis|
00001370  74 65 72 54 4d 43 6c 6f  6e 65 54 61 62 6c 65 00  |terTMCloneTable.|
00001380  64 61 74 61 5f 73 74 61  72 74 00 70 72 69 6e 74  |data_start.print|
00001390  66 40 40 47 4c 49 42 43  5f 32 2e 30 00 5f 65 64  |f@@GLIBC_2.0._ed|
000013a0  61 74 61 00 5f 66 69 6e  69 00 5f 5f 64 61 74 61  |ata._fini.__data|
000013b0  5f 73 74 61 72 74 00 5f  5f 67 6d 6f 6e 5f 73 74  |_start.__gmon_st|
000013c0  61 72 74 5f 5f 00 65 78  69 74 40 40 47 4c 49 42  |art__.exit@@GLIB|
000013d0  43 5f 32 2e 30 00 5f 5f  64 73 6f 5f 68 61 6e 64  |C_2.0.__dso_hand|
000013e0  6c 65 00 5f 49 4f 5f 73  74 64 69 6e 5f 75 73 65  |le._IO_stdin_use|
000013f0  64 00 73 74 72 6c 65 6e  40 40 47 4c 49 42 43 5f  |d.strlen@@GLIBC_|
00001400  32 2e 30 00 5f 5f 6c 69  62 63 5f 73 74 61 72 74  |2.0.__libc_start|
00001410  5f 6d 61 69 6e 40 40 47  4c 49 42 43 5f 32 2e 30  |_main@@GLIBC_2.0|
00001420  00 5f 5f 6c 69 62 63 5f  63 73 75 5f 69 6e 69 74  |.__libc_csu_init|
00001430  00 5f 65 6e 64 00 5f 73  74 61 72 74 00 5f 66 70  |._end._start._fp|
00001440  5f 68 77 00 5f 5f 62 73  73 5f 73 74 61 72 74 00  |_hw.__bss_start.|
00001450  6d 61 69 6e 00 5f 4a 76  5f 52 65 67 69 73 74 65  |main._Jv_Registe|
00001460  72 43 6c 61 73 73 65 73  00 5f 5f 54 4d 43 5f 45  |rClasses.__TMC_E|
00001470  4e 44 5f 5f 00 5f 49 54  4d 5f 72 65 67 69 73 74  |ND__._ITM_regist|
00001480  65 72 54 4d 43 6c 6f 6e  65 54 61 62 6c 65 00 73  |erTMCloneTable.s|
00001490  74 72 6e 63 6d 70 40 40  47 4c 49 42 43 5f 32 2e  |trncmp@@GLIBC_2.|
000014a0  30 00 5f 69 6e 69 74 00                           |0._init.|
000014a8



lanjut lagi nih komen nan panjang lebar =))

sekarang ada lagi bikin program password juga, yg bisa di disassembly lagi.

Tutorial lengkapnya ada disini:
http://regnartstranger.blogspot.com/2012...linux.html

ini source code nya:

Latihan4.c
Spoiler! :

#include<stdio.h>

int main()

{

int password;

printf("Enter Password : -");

scanf("%d",&password);

if(password==1024)

printf("correct!\n");

else

printf("wrong\n");

return 0;

}



Hasil Hexdump file binary nya:

Spoiler! :

00000400  c7 04 24 5c 97 04 08 ff  d0 c9 c3 90 8d 74 26 00  |..$\.........t&.|
00000410  b8 5c 97 04 08 2d 5c 97  04 08 c1 f8 02 89 c2 c1  |.\...-\.........|
00000420  ea 1f 01 d0 d1 f8 75 02  f3 c3 ba 00 00 00 00 85  |......u.........|
00000430  d2 74 f5 55 89 e5 83 ec  18 89 44 24 04 c7 04 24  |.t.U......D$...$|
00000440  5c 97 04 08 ff d2 c9 c3  90 8d b4 26 00 00 00 00  |\..........&....|
00000450  80 3d 5c 97 04 08 00 75  13 55 89 e5 83 ec 08 e8  |.=\....u.U......|
00000460  7c ff ff ff c6 05 5c 97  04 08 01 c9 f3 c3 66 90  ||.....\.......f.|
00000470  a1 3c 96 04 08 85 c0 74  1e b8 00 00 00 00 85 c0  |.<.....t........|
00000480  74 15 55 89 e5 83 ec 18  c7 04 24 3c 96 04 08 ff  |t.U.......$<....|
00000490  d0 c9 e9 79 ff ff ff e9  74 ff ff ff 55 89 e5 83  |...y....t...U...|
000004a0  e4 f0 83 ec 20 c7 04 24  90 85 04 08 e8 af fe ff  |.... ..$........|
000004b0  ff 8d 44 24 1c 89 44 24  04 c7 04 24 a3 85 04 08  |..D$..D$...$....|
000004c0  e8 db fe ff ff 8b 44 24  1c 3d 00 04 00 00 75 0e  |......D$.=....u.|
000004d0  c7 04 24 a6 85 04 08 e8  94 fe ff ff eb 0c c7 04  |..$.............|
000004e0  24 af 85 04 08 e8 86 fe  ff ff b8 00 00 00 00 c9  |$...............|
000004f0  c3 90 90 90 90 90 90 90  90 90 90 90 90 90 90 90  |................|
00000500  55 89 e5 5d c3 8d 74 26  00 8d bc 27 00 00 00 00  |U..]..t&...'....|
00000510  55 89 e5 57 56 53 e8 4f  00 00 00 81 c3 19 12 00  |U..WVS.O........|
00000520  00 83 ec 1c e8 fb fd ff  ff 8d bb 04 ff ff ff 8d  |................|
00000530  83 00 ff ff ff 29 c7 c1  ff 02 85 ff 74 24 31 f6  |.....)......t$1.|
00000540  8b 45 10 89 44 24 08 8b  45 0c 89 44 24 04 8b 45  |.E..D$..E..D$..E|
00000550  08 89 04 24 ff 94 b3 00  ff ff ff 83 c6 01 39 fe  |...$..........9.|
00000560  72 de 83 c4 1c 5b 5e 5f  5d c3 8b 1c 24 c3 90 90  |r....[^_]...$...|
00000570  55 89 e5 53 83 ec 04 e8  00 00 00 00 5b 81 c3 b8  |U..S........[...|
00000580  11 00 00 59 5b c9 c3 00  03 00 00 00 01 00 02 00  |...Y[...........|
00000590  45 6e 74 65 72 20 50 61  73 73 77 6f 72 64 20 3a  |Enter Password :|
000005a0  20 2d 00 25 64 00 63 6f  72 72 65 63 74 21 00 77  | -.%d.correct!.w|
000005b0  72 6f 6e 67 00 00 00 00  01 1b 03 3b 18 00 00 00  |rong.......;....|
000005c0  02 00 00 00 98 fd ff ff  34 00 00 00 e4 fe ff ff  |........4.......|
000005d0  58 00 00 00 14 00 00 00  00 00 00 00 01 7a 52 00  |X............zR.|
000005e0  01 7c 08 01 1b 0c 04 04  88 01 00 00 20 00 00 00  |.|.......... ...|
000005f0  1c 00 00 00 5c fd ff ff  60 00 00 00 00 0e 08 46  |....\...`......F|
00000600  0e 0c 4a 0f 0b 74 04 78  00 3f 1a 3b 2a 32 24 22  |..J..t.x.?.;*2$"|
00000610  1c 00 00 00 40 00 00 00  84 fe ff ff 55 00 00 00  |[email protected]...|
00000620  00 41 0e 08 85 02 42 0d  05 02 51 c5 0c 04 04 00  |.A....B...Q.....|
00000630  00 00 00 00 70 84 04 08  50 84 04 08 00 00 00 00  |....p...P.......|
00000640  01 00 00 00 10 00 00 00  0c 00 00 00 24 83 04 08  |............$...|
00000650  0d 00 00 00 70 85 04 08  19 00 00 00 34 96 04 08  |....p.......4...|
00000660  1b 00 00 00 04 00 00 00  1a 00 00 00 38 96 04 08  |............8...|
00000670  1c 00 00 00 04 00 00 00  04 00 00 00 8c 81 04 08  |................|
00000680  f5 fe ff 6f bc 81 04 08  05 00 00 00 4c 82 04 08  |...o........L...|
00000690  06 00 00 00 dc 81 04 08  0a 00 00 00 6a 00 00 00  |............j...|
000006a0  0b 00 00 00 10 00 00 00  15 00 00 00 00 00 00 00  |................|
000006b0  03 00 00 00 34 97 04 08  02 00 00 00 28 00 00 00  |....4.......(...|
000006c0  14 00 00 00 11 00 00 00  17 00 00 00 fc 82 04 08  |................|
000006d0  11 00 00 00 f4 82 04 08  12 00 00 00 08 00 00 00  |................|
000006e0  13 00 00 00 08 00 00 00  fe ff ff 6f c4 82 04 08  |...........o....|
000006f0  ff ff ff 6f 01 00 00 00  f0 ff ff 6f b6 82 04 08  |...o.......o....|
00000700  00 00 00 00 00 00 00 00  00 00 00 00 00 00 00 00  |................|
*
00000730  00 00 00 00 40 96 04 08  00 00 00 00 00 00 00 00  |....@...........|
00000740  66 83 04 08 76 83 04 08  86 83 04 08 96 83 04 08  |f...v...........|
00000750  a6 83 04 08 00 00 00 00  00 00 00 00 47 43 43 3a  |............GCC:|
00000760  20 28 44 65 62 69 61 6e  20 34 2e 37 2e 32 2d 35  | (Debian 4.7.2-5|
00000770  29 20 34 2e 37 2e 32 00  47 43 43 3a 20 28 44 65  |) 4.7.2.GCC: (De|
00000780  62 69 61 6e 20 34 2e 34  2e 37 2d 32 29 20 34 2e  |bian 4.4.7-2) 4.|
00000790  34 2e 37 00 00 2e 73 79  6d 74 61 62 00 2e 73 74  |4.7...symtab..st|
000007a0  72 74 61 62 00 2e 73 68  73 74 72 74 61 62 00 2e  |rtab..shstrtab..|
000007b0  69 6e 74 65 72 70 00 2e  6e 6f 74 65 2e 41 42 49  |interp..note.ABI|
000007c0  2d 74 61 67 00 2e 6e 6f  74 65 2e 67 6e 75 2e 62  |-tag..note.gnu.b|
000007d0  75 69 6c 64 2d 69 64 00  2e 67 6e 75 2e 68 61 73  |uild-id..gnu.has|
000007e0  68 00 2e 64 79 6e 73 79  6d 00 2e 64 79 6e 73 74  |h..dynsym..dynst|
000007f0  72 00 2e 67 6e 75 2e 76  65 72 73 69 6f 6e 00 2e  |r..gnu.version..|
00000800  67 6e 75 2e 76 65 72 73  69 6f 6e 5f 72 00 2e 72  |gnu.version_r..r|
00000810  65 6c 2e 64 79 6e 00 2e  72 65 6c 2e 70 6c 74 00  |el.dyn..rel.plt.|
00000820  2e 69 6e 69 74 00 2e 74  65 78 74 00 2e 66 69 6e  |.init..text..fin|
00000830  69 00 2e 72 6f 64 61 74  61 00 2e 65 68 5f 66 72  |i..rodata..eh_fr|
00000840  61 6d 65 5f 68 64 72 00  2e 65 68 5f 66 72 61 6d  |ame_hdr..eh_fram|
00000850  65 00 2e 69 6e 69 74 5f  61 72 72 61 79 00 2e 66  |e..init_array..f|
00000860  69 6e 69 5f 61 72 72 61  79 00 2e 6a 63 72 00 2e  |ini_array..jcr..|
00000870  64 79 6e 61 6d 69 63 00  2e 67 6f 74 00 2e 67 6f  |dynamic..got..go|
00000880  74 2e 70 6c 74 00 2e 64  61 74 61 00 2e 62 73 73  |t.plt..data..bss|
00000890  00 2e 63 6f 6d 6d 65 6e  74 00 00 00 00 00 00 00  |..comment.......|
000008a0  00 00 00 00 00 00 00 00  00 00 00 00 00 00 00 00  |................|
*
000008c0  00 00 00 00 1b 00 00 00  01 00 00 00 02 00 00 00  |................|
000008d0  34 81 04 08 34 01 00 00  13 00 00 00 00 00 00 00  |4...4...........|
000008e0  00 00 00 00 01 00 00 00  00 00 00 00 23 00 00 00  |............#...|
000008f0  07 00 00 00 02 00 00 00  48 81 04 08 48 01 00 00  |........H...H...|
00000900  20 00 00 00 00 00 00 00  00 00 00 00 04 00 00 00  | ...............|
00000910  00 00 00 00 31 00 00 00  07 00 00 00 02 00 00 00  |....1...........|
00000920  68 81 04 08 68 01 00 00  24 00 00 00 00 00 00 00  |h...h...$.......|
00000930  00 00 00 00 04 00 00 00  00 00 00 00 48 00 00 00  |............H...|
00000940  05 00 00 00 02 00 00 00  8c 81 04 08 8c 01 00 00  |................|
00000950  30 00 00 00 06 00 00 00  00 00 00 00 04 00 00 00  |0...............|
00000960  04 00 00 00 44 00 00 00  f6 ff ff 6f 02 00 00 00  |....D......o....|
00000970  bc 81 04 08 bc 01 00 00  20 00 00 00 06 00 00 00  |........ .......|
00000980  00 00 00 00 04 00 00 00  04 00 00 00 4e 00 00 00  |............N...|
00000990  0b 00 00 00 02 00 00 00  dc 81 04 08 dc 01 00 00  |................|
000009a0  70 00 00 00 07 00 00 00  01 00 00 00 04 00 00 00  |p...............|
000009b0  10 00 00 00 56 00 00 00  03 00 00 00 02 00 00 00  |....V...........|
000009c0  4c 82 04 08 4c 02 00 00  6a 00 00 00 00 00 00 00  |L...L...j.......|
000009d0  00 00 00 00 01 00 00 00  00 00 00 00 5e 00 00 00  |............^...|
000009e0  ff ff ff 6f 02 00 00 00  b6 82 04 08 b6 02 00 00  |...o............|
000009f0  0e 00 00 00 06 00 00 00  00 00 00 00 02 00 00 00  |................|
00000a00  02 00 00 00 6b 00 00 00  fe ff ff 6f 02 00 00 00  |....k......o....|
00000a10  c4 82 04 08 c4 02 00 00  30 00 00 00 07 00 00 00  |........0.......|
00000a20  01 00 00 00 04 00 00 00  00 00 00 00 7a 00 00 00  |............z...|
00000a30  09 00 00 00 02 00 00 00  f4 82 04 08 f4 02 00 00  |................|
00000a40  08 00 00 00 06 00 00 00  00 00 00 00 04 00 00 00  |................|
00000a50  08 00 00 00 83 00 00 00  09 00 00 00 02 00 00 00  |................|
00000a60  fc 82 04 08 fc 02 00 00  28 00 00 00 06 00 00 00  |........(.......|
00000a70  0d 00 00 00 04 00 00 00  08 00 00 00 8c 00 00 00  |................|
00000a80  01 00 00 00 06 00 00 00  24 83 04 08 24 03 00 00  |........$...$...|
00000a90  26 00 00 00 00 00 00 00  00 00 00 00 04 00 00 00  |&...............|
00000aa0  00 00 00 00 87 00 00 00  01 00 00 00 06 00 00 00  |................|
00000ab0  50 83 04 08 50 03 00 00  60 00 00 00 00 00 00 00  |P...P...`.......|
00000ac0  00 00 00 00 10 00 00 00  04 00 00 00 92 00 00 00  |................|
00000ad0  01 00 00 00 06 00 00 00  b0 83 04 08 b0 03 00 00  |................|
00000ae0  c0 01 00 00 00 00 00 00  00 00 00 00 10 00 00 00  |................|
00000af0  00 00 00 00 98 00 00 00  01 00 00 00 06 00 00 00  |................|
00000b00  70 85 04 08 70 05 00 00  17 00 00 00 00 00 00 00  |p...p...........|
00000b10  00 00 00 00 04 00 00 00  00 00 00 00 9e 00 00 00  |................|
00000b20  01 00 00 00 02 00 00 00  88 85 04 08 88 05 00 00  |................|
00000b30  2d 00 00 00 00 00 00 00  00 00 00 00 04 00 00 00  |-...............|
00000b40  00 00 00 00 a6 00 00 00  01 00 00 00 02 00 00 00  |................|
00000b50  b8 85 04 08 b8 05 00 00  1c 00 00 00 00 00 00 00  |................|
00000b60  00 00 00 00 04 00 00 00  00 00 00 00 b4 00 00 00  |................|
00000b70  01 00 00 00 02 00 00 00  d4 85 04 08 d4 05 00 00  |................|
00000b80  60 00 00 00 00 00 00 00  00 00 00 00 04 00 00 00  |`...............|
00000b90  00 00 00 00 be 00 00 00  0e 00 00 00 03 00 00 00  |................|
00000ba0  34 96 04 08 34 06 00 00  04 00 00 00 00 00 00 00  |4...4...........|
00000bb0  00 00 00 00 04 00 00 00  00 00 00 00 ca 00 00 00  |................|
00000bc0  0f 00 00 00 03 00 00 00  38 96 04 08 38 06 00 00  |........8...8...|
00000bd0  04 00 00 00 00 00 00 00  00 00 00 00 04 00 00 00  |................|
00000be0  00 00 00 00 d6 00 00 00  01 00 00 00 03 00 00 00  |................|
00000bf0  3c 96 04 08 3c 06 00 00  04 00 00 00 00 00 00 00  |<...<...........|
00000c00  00 00 00 00 04 00 00 00  00 00 00 00 db 00 00 00  |................|
00000c10  06 00 00 00 03 00 00 00  40 96 04 08 40 06 00 00  |........@...@...|
00000c20  f0 00 00 00 07 00 00 00  00 00 00 00 04 00 00 00  |................|
00000c30  08 00 00 00 e4 00 00 00  01 00 00 00 03 00 00 00  |................|
00000c40  30 97 04 08 30 07 00 00  04 00 00 00 00 00 00 00  |0...0...........|
00000c50  00 00 00 00 04 00 00 00  04 00 00 00 e9 00 00 00  |................|
00000c60  01 00 00 00 03 00 00 00  34 97 04 08 34 07 00 00  |........4...4...|
00000c70  20 00 00 00 00 00 00 00  00 00 00 00 04 00 00 00  | ...............|
00000c80  04 00 00 00 f2 00 00 00  01 00 00 00 03 00 00 00  |................|
00000c90  54 97 04 08 54 07 00 00  08 00 00 00 00 00 00 00  |T...T...........|
00000ca0  00 00 00 00 04 00 00 00  00 00 00 00 f8 00 00 00  |................|
00000cb0  08 00 00 00 03 00 00 00  5c 97 04 08 5c 07 00 00  |........\...\...|
00000cc0  04 00 00 00 00 00 00 00  00 00 00 00 04 00 00 00  |................|
00000cd0  00 00 00 00 fd 00 00 00  01 00 00 00 30 00 00 00  |............0...|
00000ce0  00 00 00 00 5c 07 00 00  38 00 00 00 00 00 00 00  |....\...8.......|
00000cf0  00 00 00 00 01 00 00 00  01 00 00 00 11 00 00 00  |................|
00000d00  03 00 00 00 00 00 00 00  00 00 00 00 94 07 00 00  |................|
00000d10  06 01 00 00 00 00 00 00  00 00 00 00 01 00 00 00  |................|
00000d20  00 00 00 00 01 00 00 00  02 00 00 00 00 00 00 00  |................|
00000d30  00 00 00 00 74 0d 00 00  50 04 00 00 1e 00 00 00  |....t...P.......|
00000d40  2d 00 00 00 04 00 00 00  10 00 00 00 09 00 00 00  |-...............|
00000d50  03 00 00 00 00 00 00 00  00 00 00 00 c4 11 00 00  |................|
00000d60  80 02 00 00 00 00 00 00  00 00 00 00 01 00 00 00  |................|
00000d70  00 00 00 00 00 00 00 00  00 00 00 00 00 00 00 00  |................|
00000d80  00 00 00 00 00 00 00 00  34 81 04 08 00 00 00 00  |........4.......|
00000d90  03 00 01 00 00 00 00 00  48 81 04 08 00 00 00 00  |........H.......|
00000da0  03 00 02 00 00 00 00 00  68 81 04 08 00 00 00 00  |........h.......|
00000db0  03 00 03 00 00 00 00 00  8c 81 04 08 00 00 00 00  |................|
00000dc0  03 00 04 00 00 00 00 00  bc 81 04 08 00 00 00 00  |................|
00000dd0  03 00 05 00 00 00 00 00  dc 81 04 08 00 00 00 00  |................|
00000de0  03 00 06 00 00 00 00 00  4c 82 04 08 00 00 00 00  |........L.......|
00000df0  03 00 07 00 00 00 00 00  b6 82 04 08 00 00 00 00  |................|
00000e00  03 00 08 00 00 00 00 00  c4 82 04 08 00 00 00 00  |................|
00000e10  03 00 09 00 00 00 00 00  f4 82 04 08 00 00 00 00  |................|
00000e20  03 00 0a 00 00 00 00 00  fc 82 04 08 00 00 00 00  |................|
00000e30  03 00 0b 00 00 00 00 00  24 83 04 08 00 00 00 00  |........$.......|
00000e40  03 00 0c 00 00 00 00 00  50 83 04 08 00 00 00 00  |........P.......|
00000e50  03 00 0d 00 00 00 00 00  b0 83 04 08 00 00 00 00  |................|
00000e60  03 00 0e 00 00 00 00 00  70 85 04 08 00 00 00 00  |........p.......|
00000e70  03 00 0f 00 00 00 00 00  88 85 04 08 00 00 00 00  |................|
00000e80  03 00 10 00 00 00 00 00  b8 85 04 08 00 00 00 00  |................|
00000e90  03 00 11 00 00 00 00 00  d4 85 04 08 00 00 00 00  |................|
00000ea0  03 00 12 00 00 00 00 00  34 96 04 08 00 00 00 00  |........4.......|
00000eb0  03 00 13 00 00 00 00 00  38 96 04 08 00 00 00 00  |........8.......|
00000ec0  03 00 14 00 00 00 00 00  3c 96 04 08 00 00 00 00  |........<.......|
00000ed0  03 00 15 00 00 00 00 00  40 96 04 08 00 00 00 00  |........@.......|
00000ee0  03 00 16 00 00 00 00 00  30 97 04 08 00 00 00 00  |........0.......|
00000ef0  03 00 17 00 00 00 00 00  34 97 04 08 00 00 00 00  |........4.......|
00000f00  03 00 18 00 00 00 00 00  54 97 04 08 00 00 00 00  |........T.......|
00000f10  03 00 19 00 00 00 00 00  5c 97 04 08 00 00 00 00  |........\.......|
00000f20  03 00 1a 00 00 00 00 00  00 00 00 00 00 00 00 00  |................|
00000f30  03 00 1b 00 01 00 00 00  00 00 00 00 00 00 00 00  |................|
00000f40  04 00 f1 ff 0c 00 00 00  3c 96 04 08 00 00 00 00  |........<.......|
00000f50  01 00 15 00 19 00 00 00  e0 83 04 08 00 00 00 00  |................|
00000f60  02 00 0e 00 2e 00 00 00  10 84 04 08 00 00 00 00  |................|
00000f70  02 00 0e 00 41 00 00 00  50 84 04 08 00 00 00 00  |....A...P.......|
00000f80  02 00 0e 00 57 00 00 00  5c 97 04 08 01 00 00 00  |....W...\.......|
00000f90  01 00 1a 00 66 00 00 00  38 96 04 08 00 00 00 00  |....f...8.......|
00000fa0  01 00 14 00 8d 00 00 00  70 84 04 08 00 00 00 00  |........p.......|
00000fb0  02 00 0e 00 99 00 00 00  34 96 04 08 00 00 00 00  |........4.......|
00000fc0  01 00 13 00 b8 00 00 00  00 00 00 00 00 00 00 00  |................|
00000fd0  04 00 f1 ff 01 00 00 00  00 00 00 00 00 00 00 00  |................|
00000fe0  04 00 f1 ff c3 00 00 00  30 86 04 08 00 00 00 00  |........0.......|
00000ff0  01 00 12 00 d1 00 00 00  3c 96 04 08 00 00 00 00  |........<.......|
00001000  01 00 15 00 dd 00 00 00  38 96 04 08 00 00 00 00  |........8.......|
00001010  00 00 13 00 ee 00 00 00  40 96 04 08 00 00 00 00  |........@.......|
00001020  01 00 16 00 f7 00 00 00  34 96 04 08 00 00 00 00  |........4.......|
00001030  00 00 13 00 0a 01 00 00  34 97 04 08 00 00 00 00  |........4.......|
00001040  01 00 18 00 20 01 00 00  00 85 04 08 05 00 00 00  |.... ...........|
00001050  12 00 0e 00 30 01 00 00  6a 85 04 08 00 00 00 00  |....0...j.......|
00001060  12 02 0e 00 47 01 00 00  00 00 00 00 00 00 00 00  |....G...........|
00001070  20 00 00 00 63 01 00 00  54 97 04 08 00 00 00 00  | ...c...T.......|
00001080  20 00 19 00 6e 01 00 00  00 00 00 00 00 00 00 00  | ...n...........|
00001090  12 00 00 00 80 01 00 00  5c 97 04 08 00 00 00 00  |........\.......|
000010a0  10 00 f1 ff 87 01 00 00  70 85 04 08 00 00 00 00  |........p.......|
000010b0  12 00 0f 00 8d 01 00 00  54 97 04 08 00 00 00 00  |........T.......|
000010c0  10 00 19 00 9a 01 00 00  00 00 00 00 00 00 00 00  |................|
000010d0  12 00 00 00 aa 01 00 00  00 00 00 00 00 00 00 00  |................|
000010e0  20 00 00 00 b9 01 00 00  58 97 04 08 00 00 00 00  | .......X.......|
000010f0  11 02 19 00 c6 01 00 00  8c 85 04 08 04 00 00 00  |................|
00001100  11 00 10 00 d5 01 00 00  00 00 00 00 00 00 00 00  |................|
00001110  12 00 00 00 f2 01 00 00  10 85 04 08 5a 00 00 00  |............Z...|
00001120  12 00 0e 00 02 02 00 00  60 97 04 08 00 00 00 00  |........`.......|
00001130  10 00 f1 ff 07 02 00 00  b0 83 04 08 00 00 00 00  |................|
00001140  12 00 0e 00 0e 02 00 00  88 85 04 08 04 00 00 00  |................|
00001150  11 00 10 00 15 02 00 00  5c 97 04 08 00 00 00 00  |........\.......|
00001160  10 00 f1 ff 21 02 00 00  9c 84 04 08 55 00 00 00  |....!.......U...|
00001170  12 00 0e 00 26 02 00 00  00 00 00 00 00 00 00 00  |....&...........|
00001180  20 00 00 00 3a 02 00 00  00 00 00 00 00 00 00 00  | ...:...........|
00001190  12 00 00 00 54 02 00 00  5c 97 04 08 00 00 00 00  |....T...\.......|
000011a0  11 02 19 00 60 02 00 00  00 00 00 00 00 00 00 00  |....`...........|
000011b0  20 00 00 00 7a 02 00 00  24 83 04 08 00 00 00 00  | ...z...$.......|
000011c0  12 00 0c 00 00 63 72 74  73 74 75 66 66 2e 63 00  |.....crtstuff.c.|
000011d0  5f 5f 4a 43 52 5f 4c 49  53 54 5f 5f 00 64 65 72  |__JCR_LIST__.der|
000011e0  65 67 69 73 74 65 72 5f  74 6d 5f 63 6c 6f 6e 65  |egister_tm_clone|
000011f0  73 00 72 65 67 69 73 74  65 72 5f 74 6d 5f 63 6c  |s.register_tm_cl|
00001200  6f 6e 65 73 00 5f 5f 64  6f 5f 67 6c 6f 62 61 6c  |ones.__do_global|
00001210  5f 64 74 6f 72 73 5f 61  75 78 00 63 6f 6d 70 6c  |_dtors_aux.compl|
00001220  65 74 65 64 2e 35 37 33  30 00 5f 5f 64 6f 5f 67  |eted.5730.__do_g|
00001230  6c 6f 62 61 6c 5f 64 74  6f 72 73 5f 61 75 78 5f  |lobal_dtors_aux_|
00001240  66 69 6e 69 5f 61 72 72  61 79 5f 65 6e 74 72 79  |fini_array_entry|
00001250  00 66 72 61 6d 65 5f 64  75 6d 6d 79 00 5f 5f 66  |.frame_dummy.__f|
00001260  72 61 6d 65 5f 64 75 6d  6d 79 5f 69 6e 69 74 5f  |rame_dummy_init_|
00001270  61 72 72 61 79 5f 65 6e  74 72 79 00 4c 61 74 69  |array_entry.Lati|
00001280  68 61 6e 34 2e 63 00 5f  5f 46 52 41 4d 45 5f 45  |han4.c.__FRAME_E|
00001290  4e 44 5f 5f 00 5f 5f 4a  43 52 5f 45 4e 44 5f 5f  |ND__.__JCR_END__|
000012a0  00 5f 5f 69 6e 69 74 5f  61 72 72 61 79 5f 65 6e  |.__init_array_en|
000012b0  64 00 5f 44 59 4e 41 4d  49 43 00 5f 5f 69 6e 69  |d._DYNAMIC.__ini|
000012c0  74 5f 61 72 72 61 79 5f  73 74 61 72 74 00 5f 47  |t_array_start._G|
000012d0  4c 4f 42 41 4c 5f 4f 46  46 53 45 54 5f 54 41 42  |LOBAL_OFFSET_TAB|
000012e0  4c 45 5f 00 5f 5f 6c 69  62 63 5f 63 73 75 5f 66  |LE_.__libc_csu_f|
000012f0  69 6e 69 00 5f 5f 69 36  38 36 2e 67 65 74 5f 70  |ini.__i686.get_p|
00001300  63 5f 74 68 75 6e 6b 2e  62 78 00 5f 49 54 4d 5f  |c_thunk.bx._ITM_|
00001310  64 65 72 65 67 69 73 74  65 72 54 4d 43 6c 6f 6e  |deregisterTMClon|
00001320  65 54 61 62 6c 65 00 64  61 74 61 5f 73 74 61 72  |eTable.data_star|
00001330  74 00 70 72 69 6e 74 66  40 40 47 4c 49 42 43 5f  |t.printf@@GLIBC_|
00001340  32 2e 30 00 5f 65 64 61  74 61 00 5f 66 69 6e 69  |2.0._edata._fini|
00001350  00 5f 5f 64 61 74 61 5f  73 74 61 72 74 00 70 75  |.__data_start.pu|
00001360  74 73 40 40 47 4c 49 42  43 5f 32 2e 30 00 5f 5f  |ts@@GLIBC_2.0.__|
00001370  67 6d 6f 6e 5f 73 74 61  72 74 5f 5f 00 5f 5f 64  |gmon_start__.__d|
00001380  73 6f 5f 68 61 6e 64 6c  65 00 5f 49 4f 5f 73 74  |so_handle._IO_st|
00001390  64 69 6e 5f 75 73 65 64  00 5f 5f 6c 69 62 63 5f  |din_used.__libc_|
000013a0  73 74 61 72 74 5f 6d 61  69 6e 40 40 47 4c 49 42  |start_main@@GLIB|
000013b0  43 5f 32 2e 30 00 5f 5f  6c 69 62 63 5f 63 73 75  |C_2.0.__libc_csu|
000013c0  5f 69 6e 69 74 00 5f 65  6e 64 00 5f 73 74 61 72  |_init._end._star|
000013d0  74 00 5f 66 70 5f 68 77  00 5f 5f 62 73 73 5f 73  |t._fp_hw.__bss_s|
000013e0  74 61 72 74 00 6d 61 69  6e 00 5f 4a 76 5f 52 65  |tart.main._Jv_Re|
000013f0  67 69 73 74 65 72 43 6c  61 73 73 65 73 00 5f 5f  |gisterClasses.__|
00001400  69 73 6f 63 39 39 5f 73  63 61 6e 66 40 40 47 4c  |isoc99_scanf@@GL|
00001410  49 42 43 5f 32 2e 37 00  5f 5f 54 4d 43 5f 45 4e  |IBC_2.7.__TMC_EN|
00001420  44 5f 5f 00 5f 49 54 4d  5f 72 65 67 69 73 74 65  |D__._ITM_registe|
00001430  72 54 4d 43 6c 6f 6e 65  54 61 62 6c 65 00 5f 69  |rTMCloneTable._i|
00001440  6e 69 74 00                                       |nit.|
00001444



Hasil disassembly file binary nya:

Spoiler! :

pass1:     file format elf32-i386


Disassembly of section .init:

08048324 <_init>:
 8048324:    55                       push   %ebp
 8048325:    89 e5                    mov    %esp,%ebp
 8048327:    53                       push   %ebx
 8048328:    83 ec 04                 sub    $0x4,%esp
 804832b:    e8 00 00 00 00           call   8048330 <_init+0xc>
 8048330:    5b                       pop    %ebx
 8048331:    81 c3 04 14 00 00        add    $0x1404,%ebx
 8048337:    8b 93 fc ff ff ff        mov    -0x4(%ebx),%edx
 804833d:    85 d2                    test   %edx,%edx
 804833f:    74 05                    je     8048346 <_init+0x22>
 8048341:    e8 3a 00 00 00           call   8048380 <__gmon_start__@plt>
 8048346:    58                       pop    %eax
 8048347:    5b                       pop    %ebx
 8048348:    c9                       leave  
 8048349:    c3                       ret    

Disassembly of section .plt:

08048350 <printf@plt-0x10>:
 8048350:    ff 35 38 97 04 08        pushl  0x8049738
 8048356:    ff 25 3c 97 04 08        jmp    *0x804973c
 804835c:    00 00                    add    %al,(%eax)
    ...

08048360 <printf@plt>:
 8048360:    ff 25 40 97 04 08        jmp    *0x8049740
 8048366:    68 00 00 00 00           push   $0x0
 804836b:    e9 e0 ff ff ff           jmp    8048350 <_init+0x2c>

08048370 <puts@plt>:
 8048370:    ff 25 44 97 04 08        jmp    *0x8049744
 8048376:    68 08 00 00 00           push   $0x8
 804837b:    e9 d0 ff ff ff           jmp    8048350 <_init+0x2c>

08048380 <__gmon_start__@plt>:
 8048380:    ff 25 48 97 04 08        jmp    *0x8049748
 8048386:    68 10 00 00 00           push   $0x10
 804838b:    e9 c0 ff ff ff           jmp    8048350 <_init+0x2c>

08048390 <__libc_start_main@plt>:
 8048390:    ff 25 4c 97 04 08        jmp    *0x804974c
 8048396:    68 18 00 00 00           push   $0x18
 804839b:    e9 b0 ff ff ff           jmp    8048350 <_init+0x2c>

080483a0 <__isoc99_scanf@plt>:
 80483a0:    ff 25 50 97 04 08        jmp    *0x8049750
 80483a6:    68 20 00 00 00           push   $0x20
 80483ab:    e9 a0 ff ff ff           jmp    8048350 <_init+0x2c>

Disassembly of section .text:

080483b0 <_start>:
 80483b0:    31 ed                    xor    %ebp,%ebp
 80483b2:    5e                       pop    %esi
 80483b3:    89 e1                    mov    %esp,%ecx
 80483b5:    83 e4 f0                 and    $0xfffffff0,%esp
 80483b8:    50                       push   %eax
 80483b9:    54                       push   %esp
 80483ba:    52                       push   %edx
 80483bb:    68 00 85 04 08           push   $0x8048500
 80483c0:    68 10 85 04 08           push   $0x8048510
 80483c5:    51                       push   %ecx
 80483c6:    56                       push   %esi
 80483c7:    68 9c 84 04 08           push   $0x804849c
 80483cc:    e8 bf ff ff ff           call   8048390 <__libc_start_main@plt>
 80483d1:    f4                       hlt    
 80483d2:    90                       nop
 80483d3:    90                       nop
 80483d4:    90                       nop
 80483d5:    90                       nop
 80483d6:    90                       nop
 80483d7:    90                       nop
 80483d8:    90                       nop
 80483d9:    90                       nop
 80483da:    90                       nop
 80483db:    90                       nop
 80483dc:    90                       nop
 80483dd:    90                       nop
 80483de:    90                       nop
 80483df:    90                       nop

080483e0 <deregister_tm_clones>:
 80483e0:    b8 5f 97 04 08           mov    $0x804975f,%eax
 80483e5:    2d 5c 97 04 08           sub    $0x804975c,%eax
 80483ea:    83 f8 06                 cmp    $0x6,%eax
 80483ed:    77 02                    ja     80483f1 <deregister_tm_clones+0x11>
 80483ef:    f3 c3                    repz ret
 80483f1:    b8 00 00 00 00           mov    $0x0,%eax
 80483f6:    85 c0                    test   %eax,%eax
 80483f8:    74 f5                    je     80483ef <deregister_tm_clones+0xf>
 80483fa:    55                       push   %ebp
 80483fb:    89 e5                    mov    %esp,%ebp
 80483fd:    83 ec 18                 sub    $0x18,%esp
 8048400:    c7 04 24 5c 97 04 08     movl   $0x804975c,(%esp)
 8048407:    ff d0                    call   *%eax
 8048409:    c9                       leave  
 804840a:    c3                       ret    
 804840b:    90                       nop
 804840c:    8d 74 26 00              lea    0x0(%esi,%eiz,1),%esi

08048410 <register_tm_clones>:
 8048410:    b8 5c 97 04 08           mov    $0x804975c,%eax
 8048415:    2d 5c 97 04 08           sub    $0x804975c,%eax
 804841a:    c1 f8 02                 sar    $0x2,%eax
 804841d:    89 c2                    mov    %eax,%edx
 804841f:    c1 ea 1f                 shr    $0x1f,%edx
 8048422:    01 d0                    add    %edx,%eax
 8048424:    d1 f8                    sar    %eax
 8048426:    75 02                    jne    804842a <register_tm_clones+0x1a>
 8048428:    f3 c3                    repz ret
 804842a:    ba 00 00 00 00           mov    $0x0,%edx
 804842f:    85 d2                    test   %edx,%edx
 8048431:    74 f5                    je     8048428 <register_tm_clones+0x18>
 8048433:    55                       push   %ebp
 8048434:    89 e5                    mov    %esp,%ebp
 8048436:    83 ec 18                 sub    $0x18,%esp
 8048439:    89 44 24 04              mov    %eax,0x4(%esp)
 804843d:    c7 04 24 5c 97 04 08     movl   $0x804975c,(%esp)
 8048444:    ff d2                    call   *%edx
 8048446:    c9                       leave  
 8048447:    c3                       ret    
 8048448:    90                       nop
 8048449:    8d b4 26 00 00 00 00     lea    0x0(%esi,%eiz,1),%esi

08048450 <__do_global_dtors_aux>:
 8048450:    80 3d 5c 97 04 08 00     cmpb   $0x0,0x804975c
 8048457:    75 13                    jne    804846c <__do_global_dtors_aux+0x1c>
 8048459:    55                       push   %ebp
 804845a:    89 e5                    mov    %esp,%ebp
 804845c:    83 ec 08                 sub    $0x8,%esp
 804845f:    e8 7c ff ff ff           call   80483e0 <deregister_tm_clones>
 8048464:    c6 05 5c 97 04 08 01     movb   $0x1,0x804975c
 804846b:    c9                       leave  
 804846c:    f3 c3                    repz ret
 804846e:    66 90                    xchg   %ax,%ax

08048470 <frame_dummy>:
 8048470:    a1 3c 96 04 08           mov    0x804963c,%eax
 8048475:    85 c0                    test   %eax,%eax
 8048477:    74 1e                    je     8048497 <frame_dummy+0x27>
 8048479:    b8 00 00 00 00           mov    $0x0,%eax
 804847e:    85 c0                    test   %eax,%eax
 8048480:    74 15                    je     8048497 <frame_dummy+0x27>
 8048482:    55                       push   %ebp
 8048483:    89 e5                    mov    %esp,%ebp
 8048485:    83 ec 18                 sub    $0x18,%esp
 8048488:    c7 04 24 3c 96 04 08     movl   $0x804963c,(%esp)
 804848f:    ff d0                    call   *%eax
 8048491:    c9                       leave  
 8048492:    e9 79 ff ff ff           jmp    8048410 <register_tm_clones>
 8048497:    e9 74 ff ff ff           jmp    8048410 <register_tm_clones>

0804849c <main>:
 804849c:    55                       push   %ebp
 804849d:    89 e5                    mov    %esp,%ebp
 804849f:    83 e4 f0                 and    $0xfffffff0,%esp
 80484a2:    83 ec 20                 sub    $0x20,%esp
 80484a5:    c7 04 24 90 85 04 08     movl   $0x8048590,(%esp)
 80484ac:    e8 af fe ff ff           call   8048360 <printf@plt>
 80484b1:    8d 44 24 1c              lea    0x1c(%esp),%eax
 80484b5:    89 44 24 04              mov    %eax,0x4(%esp)
 80484b9:    c7 04 24 a3 85 04 08     movl   $0x80485a3,(%esp)
 80484c0:    e8 db fe ff ff           call   80483a0 <__isoc99_scanf@plt>
 80484c5:    8b 44 24 1c              mov    0x1c(%esp),%eax
 80484c9:    3d 00 04 00 00           cmp    $0x400,%eax
 80484ce:    75 0e                    jne    80484de <main+0x42>
 80484d0:    c7 04 24 a6 85 04 08     movl   $0x80485a6,(%esp)
 80484d7:    e8 94 fe ff ff           call   8048370 <puts@plt>
 80484dc:    eb 0c                    jmp    80484ea <main+0x4e>
 80484de:    c7 04 24 af 85 04 08     movl   $0x80485af,(%esp)
 80484e5:    e8 86 fe ff ff           call   8048370 <puts@plt>
 80484ea:    b8 00 00 00 00           mov    $0x0,%eax
 80484ef:    c9                       leave  
 80484f0:    c3                       ret    
 80484f1:    90                       nop
 80484f2:    90                       nop
 80484f3:    90                       nop
 80484f4:    90                       nop
 80484f5:    90                       nop
 80484f6:    90                       nop
 80484f7:    90                       nop
 80484f8:    90                       nop
 80484f9:    90                       nop
 80484fa:    90                       nop
 80484fb:    90                       nop
 80484fc:    90                       nop
 80484fd:    90                       nop
 80484fe:    90                       nop
 80484ff:    90                       nop

08048500 <__libc_csu_fini>:
 8048500:    55                       push   %ebp
 8048501:    89 e5                    mov    %esp,%ebp
 8048503:    5d                       pop    %ebp
 8048504:    c3                       ret    
 8048505:    8d 74 26 00              lea    0x0(%esi,%eiz,1),%esi
 8048509:    8d bc 27 00 00 00 00     lea    0x0(%edi,%eiz,1),%edi

08048510 <__libc_csu_init>:
 8048510:    55                       push   %ebp
 8048511:    89 e5                    mov    %esp,%ebp
 8048513:    57                       push   %edi
 8048514:    56                       push   %esi
 8048515:    53

#3
@stevennathaniel
pass2 bisa ketauan passwordnya walau udah di compile , pake ltrace , karena dia pake perbandingan standar library c

Spoiler! :

root@hasnydes:/home/abdilahrf/Documents# ./pass2 wew
FAILn

root@hasnydes:/home/abdilahrf/Documents# ltrace ./pass2 wew
__libc_start_main(0x4005f4, 2, 0x7fffeb14bc48, 0x4006e0, 0x400770 <unfinished ...>
strncmp("wew", "yomama", 6) = -2
printf("FAILn") = 5
exit(1FAILn <unfinished ...>
+++ exited (status 1) +++

root@hasnydes:/home/abdilahrf/Documents# ./pass2 yomama
WINn


next jadi setiap pebandingan kalau di compile sebenernya nga boleh muncul kalo di ltrace

#4
wah hebat mas @abdilahrf ayo dilanjut dong share ilmu pemrograman C nya. kita bikin rame ini thread. biar kayak Kaskus. Jangan lupa yg baca share cendol yg segar segar ya Smile) =))

#5
Share lagi source code C . lumayan buat coba-coba:

Latihan3.c
Spoiler! :

#include <stdio.h>

/* mencetak nilai tabel Fahrenheit - Celcius untuk sobat Fahrenheit = 0,20,..,30 */

main()

{

    int fahr, celsius;

    int terendah, tertinggi, ukuran;

    terendah = 0;    /* Batas sobat terendah*/

    tertinggi = 300;    /*Batas sobat tertinggi*/

    ukuran = 20;    /*Ukuran*/


fahr = terendah;

while (fahr <= tertinggi){

    celsius = 5 * (fahr-32) / 9;

printf("%d\t%d\n",fahr, celsius);


}
}

Nah kalau ini yg paling sederhana, Hello World :

Latihan2.c
Spoiler! :

/*
 * HelloWorld.c
 *
 *  Created on: Jul 10, 2015
 *      Author: steven
 */

#include<stdio.h>

int main()

{

    printf("Hello World");

}

#6
share source buat ngitung umur dalam tahun, bulan dan hari

Spoiler! :

Code:
#include <stdio.h>

int main()
{
    int m1,m2,d1,d2,y1,y2, bln1, bln2, day1, day2, bedatgl, bedabln, bedathn, a1, a2, b1, b2, c1, c2, hasil1, hasil2, hslakhir, bedahari,
            kabisat, tanggal, bulan, tahun;

    printf("Menghitung Usia\n");
    printf("Masukkan tanggal lahir  Anda (dd-mm-yyyy) : ");
    scanf("%d-%d-%d", &d1, &m1, &y1);

    printf("Masukkan sampai tanggal berapa (dd-mm-yyyy) : ");
    scanf("%d-%d-%d", &d2, &m2, &y2);

    bln1 =  m1 == 1 ? bln1=365 - (365 - d1) : m1 == 2 ? bln1=59 - (28 - d1) : m1 == 3 ? bln1=90 - (31 - d1) : m1 == 4 ? bln1=120 -
                    (30 - d1) :
                    m1 == 5 ? bln1=151 - (31 - d1) : m1 == 6 ? bln1=181 - (30 - d1) : m1 == 7 ? bln1=212 - (31 - d1) : m1 == 8 ? bln1=243 -
                    (31 - d1) :
                    m1 == 9 ? bln1=273 - (30 - d1) : m1 == 10 ? bln1=304 - (31 - d1): m1 == 11 ? bln1=334 - (30 - d1) : m1 == 12 ? bln1=365 -
                    (31 - d1) : 0;

    bln2 =  m2 == 1 ? bln2=365 - (365 - d2) : m2 == 2 ? bln2=59 - (28 - d2) : m2 == 3 ? bln2=90 - (31 - d2) : m2 == 4 ? bln2=120 -
                    (30 - d2) :
                    m2 == 5 ? bln2=151 - (31 - d2) : m2 == 6 ? bln2=181 - (30 - d2) : m2 == 7 ? bln2=212 - (31 - d2) : m2 == 8 ? bln2=243 -
                    (31 - d2) :
                    m2 == 9 ? bln2=273 - (30 - d2) : m2 == 10 ? bln2=304 - (31 - d2): m2 == 11 ? bln2=334 - (30 - d2) : m2 == 12 ? bln2=365 -
                    (31 - d2) : 0;


    day1 = (y1 * 365) + bln1;
    day2 = (y2 * 365) + bln2;

    bulan = d2 < d1 ? m2-1:m2;
    tahun = bulan < m1 ? y2-1:y2;
    bulan = bulan < m1 ? bulan+12:bulan;

    bedatgl = (d2-d1+30)%30;
    bedabln = bulan - m1;
    bedathn = tahun - y1;

    y1-=1;

    a1 = y1 / 4;
    a2 = y2 / 4;

    b1 = y1 / 100;
    b2 = y2 / 100;

    c1 = y1 / 400;
    c2 = y2 / 400;

    hasil1 = a1 - b1 + c1;
    hasil2 = a2 - b2 + c2;

    hslakhir = hasil2 - hasil1;

    bedahari = day2 - day1;


    kabisat = m2 <=2 && d2 <=28 ? hslakhir-0:hslakhir;
    kabisat = m1 > 2 ? hslakhir-1:hslakhir;

    printf("Anda telah menjumpai %d tahun kabisat\n",kabisat);
    printf("Umur Anda sampai %02d-%02d-%04d adalah : %d tahun, %d bulan, %d hari\n", d2, m2, y2, bedathn, bedabln, bedatgl);

    printf("Setara dengan %d hari\n", bedahari+kabisat);

    return 0;

}


#7
@Boltzman : sampai tanggal berapa itu maksudnya tanggal sekarang kali ya , kalo iya di bikin auto aja

#8
(09-05-2015, 01:31 AM)abdilahrf Wrote: @Boltzman : sampai tanggal berapa itu maksudnya tanggal sekarang kali ya , kalo iya di bikin auto aja

gak cuma untuk tanggal sekarang, mungkin aja mau ngitung buat tahun lalu atau beberapa tahun kedepan,
kalo pengen buat auto current date bisa di ganti dikit codingnya

Spoiler! :

#include <time.h> // tambah diatas

hapus line 12 - 13 terus ganti sama yang ini

time_t date = time(NULL);
struct tm cur = *localtime(&date);

d2 = cur.tm_mday;
m2 = cur.tm_mon + 1;
y2 = cur.tm_year + 1900;


#9
mas @Boltzman nggak bisa di kasih cendol padahal mau ku kasih cendol . soalnya akun nya belum di aktivasi. tapi terimakasih udah ikutan sharing Smile

#10
(09-03-2015, 12:02 PM)abdilahrf Wrote: @stevennathaniel
pass2 bisa ketauan passwordnya walau udah di compile , pake ltrace , karena dia pake perbandingan standar library c

Spoiler! :

root@hasnydes:/home/abdilahrf/Documents# ./pass2 wew
FAILn

root@hasnydes:/home/abdilahrf/Documents# ltrace ./pass2 wew
__libc_start_main(0x4005f4, 2, 0x7fffeb14bc48, 0x4006e0, 0x400770 <unfinished ...>
strncmp("wew", "yomama", 6)                      = -2
printf("FAILn")                                  = 5
exit(1FAILn <unfinished ...>
+++ exited (status 1) +++

root@hasnydes:/home/abdilahrf/Documents# ./pass2 yomama
WINn


next jadi setiap pebandingan kalau di compile sebenernya nga boleh muncul kalo di ltrace

Ini kok gak keliatan ya perbandingannya ?
[Image: Screenshot_from_2015_09_20_20_49_56.png]
Jika kamu tidak sanggup menanggung lelahnya belajar, maka kamu akan menanggung perihnya kebodohan (Imam Syafii)






Users browsing this thread: 1 Guest(s)