added more code
This commit is contained in:
BIN
CPE455/lab03/enigma
Executable file
BIN
CPE455/lab03/enigma
Executable file
Binary file not shown.
476
CPE455/lab03/enigma.txt
Normal file
476
CPE455/lab03/enigma.txt
Normal file
@ -0,0 +1,476 @@
|
||||
Script started on Thu 03 Mar 2022 10:33:44 AM CST
|
||||
[?1034hbash-4.2$ chmod 755 ./enigma
|
||||
bash-4.2$ ld[Ks =[K-l
|
||||
total 16
|
||||
-rwxr-xr-x 1 anw0044 student 9888 Feb 28 2021 enigma
|
||||
-rw------- 1 anw0044 student 0 Mar 3 10:33 enigma.txt
|
||||
-rw------- 1 anw0044 student 3266 Mar 3 10:31 enigma.zip
|
||||
bash-4.2$ file
|
||||
file filefrag file-roller
|
||||
bash-4.2$ file ./enigma
|
||||
./enigma: ELF 64-bit LSB executable, x86-64, version 1 (SYSV), dynamically linked (uses shared libs), for GNU/Linux 2.6.32, BuildID[sha1]=c7a8237c624481a50e6b5d824e109b71838dd18b, not stripped
|
||||
bash-4.2$ readelf -a ./enigma
|
||||
ELF Header:
|
||||
Magic: 7f 45 4c 46 02 01 01 00 00 00 00 00 00 00 00 00
|
||||
Class: ELF64
|
||||
Data: 2's complement, little endian
|
||||
Version: 1 (current)
|
||||
OS/ABI: UNIX - System V
|
||||
ABI Version: 0
|
||||
Type: EXEC (Executable file)
|
||||
Machine: Advanced Micro Devices X86-64
|
||||
Version: 0x1
|
||||
Entry point address: 0x400520
|
||||
Start of program headers: 64 (bytes into file)
|
||||
Start of section headers: 7648 (bytes into file)
|
||||
Flags: 0x0
|
||||
Size of this header: 64 (bytes)
|
||||
Size of program headers: 56 (bytes)
|
||||
Number of program headers: 9
|
||||
Size of section headers: 64 (bytes)
|
||||
Number of section headers: 35
|
||||
Section header string table index: 34
|
||||
|
||||
Section Headers:
|
||||
[Nr] Name Type Address Offset
|
||||
Size EntSize Flags Link Info Align
|
||||
[ 0] NULL 0000000000000000 00000000
|
||||
0000000000000000 0000000000000000 0 0 0
|
||||
[ 1] .interp PROGBITS 0000000000400238 00000238
|
||||
000000000000001c 0000000000000000 A 0 0 1
|
||||
[ 2] .note.ABI-tag NOTE 0000000000400254 00000254
|
||||
0000000000000020 0000000000000000 A 0 0 4
|
||||
[ 3] .note.gnu.build-i NOTE 0000000000400274 00000274
|
||||
0000000000000024 0000000000000000 A 0 0 4
|
||||
[ 4] .gnu.hash GNU_HASH 0000000000400298 00000298
|
||||
000000000000001c 0000000000000000 A 5 0 8
|
||||
[ 5] .dynsym DYNSYM 00000000004002b8 000002b8
|
||||
00000000000000a8 0000000000000018 A 6 1 8
|
||||
[ 6] .dynstr STRTAB 0000000000400360 00000360
|
||||
0000000000000053 0000000000000000 A 0 0 1
|
||||
[ 7] .gnu.version VERSYM 00000000004003b4 000003b4
|
||||
000000000000000e 0000000000000002 A 5 0 2
|
||||
[ 8] .gnu.version_r VERNEED 00000000004003c8 000003c8
|
||||
0000000000000020 0000000000000000 A 6 1 8
|
||||
[ 9] .rela.dyn RELA 00000000004003e8 000003e8
|
||||
0000000000000018 0000000000000018 A 5 0 8
|
||||
[10] .rela.plt RELA 0000000000400400 00000400
|
||||
0000000000000090 0000000000000018 AI 5 23 8
|
||||
[11] .init PROGBITS 0000000000400490 00000490
|
||||
000000000000001a 0000000000000000 AX 0 0 4
|
||||
[12] .plt PROGBITS 00000000004004b0 000004b0
|
||||
0000000000000070 0000000000000010 AX 0 0 16
|
||||
[13] .text PROGBITS 0000000000400520 00000520
|
||||
0000000000000212 0000000000000000 AX 0 0 16
|
||||
[14] .fini PROGBITS 0000000000400734 00000734
|
||||
0000000000000009 0000000000000000 AX 0 0 4
|
||||
[15] .rodata PROGBITS 0000000000400740 00000740
|
||||
0000000000000042 0000000000000000 A 0 0 8
|
||||
[16] .eh_frame_hdr PROGBITS 0000000000400784 00000784
|
||||
0000000000000034 0000000000000000 A 0 0 4
|
||||
[17] .eh_frame PROGBITS 00000000004007b8 000007b8
|
||||
00000000000000f4 0000000000000000 A 0 0 8
|
||||
[18] .init_array INIT_ARRAY 0000000000600e10 00000e10
|
||||
0000000000000008 0000000000000008 WA 0 0 8
|
||||
[19] .fini_array FINI_ARRAY 0000000000600e18 00000e18
|
||||
0000000000000008 0000000000000008 WA 0 0 8
|
||||
[20] .jcr PROGBITS 0000000000600e20 00000e20
|
||||
0000000000000008 0000000000000000 WA 0 0 8
|
||||
[21] .dynamic DYNAMIC 0000000000600e28 00000e28
|
||||
00000000000001d0 0000000000000010 WA 6 0 8
|
||||
[22] .got PROGBITS 0000000000600ff8 00000ff8
|
||||
0000000000000008 0000000000000008 WA 0 0 8
|
||||
[23] .got.plt PROGBITS 0000000000601000 00001000
|
||||
0000000000000048 0000000000000008 WA 0 0 8
|
||||
[24] .data PROGBITS 0000000000601048 00001048
|
||||
0000000000000018 0000000000000000 WA 0 0 8
|
||||
[25] .bss NOBITS 0000000000601060 00001060
|
||||
0000000000000008 0000000000000000 WA 0 0 1
|
||||
[26] .comment PROGBITS 0000000000000000 00001060
|
||||
000000000000005a 0000000000000001 MS 0 0 1
|
||||
[27] .debug_aranges PROGBITS 0000000000000000 000010ba
|
||||
0000000000000030 0000000000000000 0 0 1
|
||||
[28] .debug_info PROGBITS 0000000000000000 000010ea
|
||||
00000000000000f4 0000000000000000 0 0 1
|
||||
[29] .debug_abbrev PROGBITS 0000000000000000 000011de
|
||||
000000000000007e 0000000000000000 0 0 1
|
||||
[30] .debug_line PROGBITS 0000000000000000 0000125c
|
||||
000000000000005e 0000000000000000 0 0 1
|
||||
[31] .debug_str PROGBITS 0000000000000000 000012ba
|
||||
00000000000000ec 0000000000000001 MS 0 0 1
|
||||
[32] .symtab SYMTAB 0000000000000000 000013a8
|
||||
00000000000006d8 0000000000000018 33 51 8
|
||||
[33] .strtab STRTAB 0000000000000000 00001a80
|
||||
0000000000000216 0000000000000000 0 0 1
|
||||
[34] .shstrtab STRTAB 0000000000000000 00001c96
|
||||
0000000000000148 0000000000000000 0 0 1
|
||||
Key to Flags:
|
||||
W (write), A (alloc), X (execute), M (merge), S (strings), I (info),
|
||||
L (link order), O (extra OS processing required), G (group), T (TLS),
|
||||
C (compressed), x (unknown), o (OS specific), E (exclude),
|
||||
l (large), p (processor specific)
|
||||
|
||||
There are no section groups in this file.
|
||||
|
||||
Program Headers:
|
||||
Type Offset VirtAddr PhysAddr
|
||||
FileSiz MemSiz Flags Align
|
||||
PHDR 0x0000000000000040 0x0000000000400040 0x0000000000400040
|
||||
0x00000000000001f8 0x00000000000001f8 R E 8
|
||||
INTERP 0x0000000000000238 0x0000000000400238 0x0000000000400238
|
||||
0x000000000000001c 0x000000000000001c R 1
|
||||
[Requesting program interpreter: /lib64/ld-linux-x86-64.so.2]
|
||||
LOAD 0x0000000000000000 0x0000000000400000 0x0000000000400000
|
||||
0x00000000000008ac 0x00000000000008ac R E 200000
|
||||
LOAD 0x0000000000000e10 0x0000000000600e10 0x0000000000600e10
|
||||
0x0000000000000250 0x0000000000000258 RW 200000
|
||||
DYNAMIC 0x0000000000000e28 0x0000000000600e28 0x0000000000600e28
|
||||
0x00000000000001d0 0x00000000000001d0 RW 8
|
||||
NOTE 0x0000000000000254 0x0000000000400254 0x0000000000400254
|
||||
0x0000000000000044 0x0000000000000044 R 4
|
||||
GNU_EH_FRAME 0x0000000000000784 0x0000000000400784 0x0000000000400784
|
||||
0x0000000000000034 0x0000000000000034 R 4
|
||||
GNU_STACK 0x0000000000000000 0x0000000000000000 0x0000000000000000
|
||||
0x0000000000000000 0x0000000000000000 RW 10
|
||||
GNU_RELRO 0x0000000000000e10 0x0000000000600e10 0x0000000000600e10
|
||||
0x00000000000001f0 0x00000000000001f0 R 1
|
||||
|
||||
Section to Segment mapping:
|
||||
Segment Sections...
|
||||
00
|
||||
01 .interp
|
||||
02 .interp .note.ABI-tag .note.gnu.build-id .gnu.hash .dynsym .dynstr .gnu.version .gnu.version_r .rela.dyn .rela.plt .init .plt .text .fini .rodata .eh_frame_hdr .eh_frame
|
||||
03 .init_array .fini_array .jcr .dynamic .got .got.plt .data .bss
|
||||
04 .dynamic
|
||||
05 .note.ABI-tag .note.gnu.build-id
|
||||
06 .eh_frame_hdr
|
||||
07
|
||||
08 .init_array .fini_array .jcr .dynamic .got
|
||||
|
||||
Dynamic section at offset 0xe28 contains 24 entries:
|
||||
Tag Type Name/Value
|
||||
0x0000000000000001 (NEEDED) Shared library: [libc.so.6]
|
||||
0x000000000000000c (INIT) 0x400490
|
||||
0x000000000000000d (FINI) 0x400734
|
||||
0x0000000000000019 (INIT_ARRAY) 0x600e10
|
||||
0x000000000000001b (INIT_ARRAYSZ) 8 (bytes)
|
||||
0x000000000000001a (FINI_ARRAY) 0x600e18
|
||||
0x000000000000001c (FINI_ARRAYSZ) 8 (bytes)
|
||||
0x000000006ffffef5 (GNU_HASH) 0x400298
|
||||
0x0000000000000005 (STRTAB) 0x400360
|
||||
0x0000000000000006 (SYMTAB) 0x4002b8
|
||||
0x000000000000000a (STRSZ) 83 (bytes)
|
||||
0x000000000000000b (SYMENT) 24 (bytes)
|
||||
0x0000000000000015 (DEBUG) 0x0
|
||||
0x0000000000000003 (PLTGOT) 0x601000
|
||||
0x0000000000000002 (PLTRELSZ) 144 (bytes)
|
||||
0x0000000000000014 (PLTREL) RELA
|
||||
0x0000000000000017 (JMPREL) 0x400400
|
||||
0x0000000000000007 (RELA) 0x4003e8
|
||||
0x0000000000000008 (RELASZ) 24 (bytes)
|
||||
0x0000000000000009 (RELAENT) 24 (bytes)
|
||||
0x000000006ffffffe (VERNEED) 0x4003c8
|
||||
0x000000006fffffff (VERNEEDNUM) 1
|
||||
0x000000006ffffff0 (VERSYM) 0x4003b4
|
||||
0x0000000000000000 (NULL) 0x0
|
||||
|
||||
Relocation section '.rela.dyn' at offset 0x3e8 contains 1 entries:
|
||||
Offset Info Type Sym. Value Sym. Name + Addend
|
||||
000000600ff8 000600000006 R_X86_64_GLOB_DAT 0000000000000000 __gmon_start__ + 0
|
||||
|
||||
Relocation section '.rela.plt' at offset 0x400 contains 6 entries:
|
||||
Offset Info Type Sym. Value Sym. Name + Addend
|
||||
000000601018 000100000007 R_X86_64_JUMP_SLO 0000000000000000 putchar@GLIBC_2.2.5 + 0
|
||||
000000601020 000200000007 R_X86_64_JUMP_SLO 0000000000000000 puts@GLIBC_2.2.5 + 0
|
||||
000000601028 000300000007 R_X86_64_JUMP_SLO 0000000000000000 printf@GLIBC_2.2.5 + 0
|
||||
000000601030 000400000007 R_X86_64_JUMP_SLO 0000000000000000 __libc_start_main@GLIBC_2.2.5 + 0
|
||||
000000601038 000500000007 R_X86_64_JUMP_SLO 0000000000000000 strcmp@GLIBC_2.2.5 + 0
|
||||
000000601040 000600000007 R_X86_64_JUMP_SLO 0000000000000000 __gmon_start__ + 0
|
||||
|
||||
The decoding of unwind sections for machine type Advanced Micro Devices X86-64 is not currently supported.
|
||||
|
||||
Symbol table '.dynsym' contains 7 entries:
|
||||
Num: Value Size Type Bind Vis Ndx Name
|
||||
0: 0000000000000000 0 NOTYPE LOCAL DEFAULT UND
|
||||
1: 0000000000000000 0 FUNC GLOBAL DEFAULT UND putchar@GLIBC_2.2.5 (2)
|
||||
2: 0000000000000000 0 FUNC GLOBAL DEFAULT UND puts@GLIBC_2.2.5 (2)
|
||||
3: 0000000000000000 0 FUNC GLOBAL DEFAULT UND printf@GLIBC_2.2.5 (2)
|
||||
4: 0000000000000000 0 FUNC GLOBAL DEFAULT UND __libc_start_main@GLIBC_2.2.5 (2)
|
||||
5: 0000000000000000 0 FUNC GLOBAL DEFAULT UND strcmp@GLIBC_2.2.5 (2)
|
||||
6: 0000000000000000 0 NOTYPE WEAK DEFAULT UND __gmon_start__
|
||||
|
||||
Symbol table '.symtab' contains 73 entries:
|
||||
Num: Value Size Type Bind Vis Ndx Name
|
||||
0: 0000000000000000 0 NOTYPE LOCAL DEFAULT UND
|
||||
1: 0000000000400238 0 SECTION LOCAL DEFAULT 1
|
||||
2: 0000000000400254 0 SECTION LOCAL DEFAULT 2
|
||||
3: 0000000000400274 0 SECTION LOCAL DEFAULT 3
|
||||
4: 0000000000400298 0 SECTION LOCAL DEFAULT 4
|
||||
5: 00000000004002b8 0 SECTION LOCAL DEFAULT 5
|
||||
6: 0000000000400360 0 SECTION LOCAL DEFAULT 6
|
||||
7: 00000000004003b4 0 SECTION LOCAL DEFAULT 7
|
||||
8: 00000000004003c8 0 SECTION LOCAL DEFAULT 8
|
||||
9: 00000000004003e8 0 SECTION LOCAL DEFAULT 9
|
||||
10: 0000000000400400 0 SECTION LOCAL DEFAULT 10
|
||||
11: 0000000000400490 0 SECTION LOCAL DEFAULT 11
|
||||
12: 00000000004004b0 0 SECTION LOCAL DEFAULT 12
|
||||
13: 0000000000400520 0 SECTION LOCAL DEFAULT 13
|
||||
14: 0000000000400734 0 SECTION LOCAL DEFAULT 14
|
||||
15: 0000000000400740 0 SECTION LOCAL DEFAULT 15
|
||||
16: 0000000000400784 0 SECTION LOCAL DEFAULT 16
|
||||
17: 00000000004007b8 0 SECTION LOCAL DEFAULT 17
|
||||
18: 0000000000600e10 0 SECTION LOCAL DEFAULT 18
|
||||
19: 0000000000600e18 0 SECTION LOCAL DEFAULT 19
|
||||
20: 0000000000600e20 0 SECTION LOCAL DEFAULT 20
|
||||
21: 0000000000600e28 0 SECTION LOCAL DEFAULT 21
|
||||
22: 0000000000600ff8 0 SECTION LOCAL DEFAULT 22
|
||||
23: 0000000000601000 0 SECTION LOCAL DEFAULT 23
|
||||
24: 0000000000601048 0 SECTION LOCAL DEFAULT 24
|
||||
25: 0000000000601060 0 SECTION LOCAL DEFAULT 25
|
||||
26: 0000000000000000 0 SECTION LOCAL DEFAULT 26
|
||||
27: 0000000000000000 0 SECTION LOCAL DEFAULT 27
|
||||
28: 0000000000000000 0 SECTION LOCAL DEFAULT 28
|
||||
29: 0000000000000000 0 SECTION LOCAL DEFAULT 29
|
||||
30: 0000000000000000 0 SECTION LOCAL DEFAULT 30
|
||||
31: 0000000000000000 0 SECTION LOCAL DEFAULT 31
|
||||
32: 0000000000000000 0 FILE LOCAL DEFAULT ABS crtstuff.c
|
||||
33: 0000000000600e20 0 OBJECT LOCAL DEFAULT 20 __JCR_LIST__
|
||||
34: 0000000000400550 0 FUNC LOCAL DEFAULT 13 deregister_tm_clones
|
||||
35: 0000000000400580 0 FUNC LOCAL DEFAULT 13 register_tm_clones
|
||||
36: 00000000004005c0 0 FUNC LOCAL DEFAULT 13 __do_global_dtors_aux
|
||||
37: 0000000000601060 1 OBJECT LOCAL DEFAULT 25 completed.6355
|
||||
38: 0000000000600e18 0 OBJECT LOCAL DEFAULT 19 __do_global_dtors_aux_fin
|
||||
39: 00000000004005e0 0 FUNC LOCAL DEFAULT 13 frame_dummy
|
||||
40: 0000000000600e10 0 OBJECT LOCAL DEFAULT 18 __frame_dummy_init_array_
|
||||
41: 0000000000000000 0 FILE LOCAL DEFAULT ABS enigma.c
|
||||
42: 0000000000000000 0 FILE LOCAL DEFAULT ABS crtstuff.c
|
||||
43: 00000000004008a8 0 OBJECT LOCAL DEFAULT 17 __FRAME_END__
|
||||
44: 0000000000600e20 0 OBJECT LOCAL DEFAULT 20 __JCR_END__
|
||||
45: 0000000000000000 0 FILE LOCAL DEFAULT ABS
|
||||
46: 0000000000600e18 0 NOTYPE LOCAL DEFAULT 18 __init_array_end
|
||||
47: 0000000000600e28 0 OBJECT LOCAL DEFAULT 21 _DYNAMIC
|
||||
48: 0000000000600e10 0 NOTYPE LOCAL DEFAULT 18 __init_array_start
|
||||
49: 0000000000400784 0 NOTYPE LOCAL DEFAULT 16 __GNU_EH_FRAME_HDR
|
||||
50: 0000000000601000 0 OBJECT LOCAL DEFAULT 23 _GLOBAL_OFFSET_TABLE_
|
||||
51: 0000000000400730 2 FUNC GLOBAL DEFAULT 13 __libc_csu_fini
|
||||
52: 0000000000000000 0 FUNC GLOBAL DEFAULT UND putchar@@GLIBC_2.2.5
|
||||
53: 0000000000601048 0 NOTYPE WEAK DEFAULT 24 data_start
|
||||
54: 0000000000000000 0 FUNC GLOBAL DEFAULT UND puts@@GLIBC_2.2.5
|
||||
55: 0000000000601060 0 NOTYPE GLOBAL DEFAULT 24 _edata
|
||||
56: 0000000000400734 0 FUNC GLOBAL DEFAULT 14 _fini
|
||||
57: 0000000000000000 0 FUNC GLOBAL DEFAULT UND printf@@GLIBC_2.2.5
|
||||
58: 0000000000000000 0 FUNC GLOBAL DEFAULT UND __libc_start_main@@GLIBC_
|
||||
59: 0000000000601048 0 NOTYPE GLOBAL DEFAULT 24 __data_start
|
||||
60: 0000000000000000 0 FUNC GLOBAL DEFAULT UND strcmp@@GLIBC_2.2.5
|
||||
61: 0000000000000000 0 NOTYPE WEAK DEFAULT UND __gmon_start__
|
||||
62: 0000000000400748 0 OBJECT GLOBAL HIDDEN 15 __dso_handle
|
||||
63: 0000000000400740 4 OBJECT GLOBAL DEFAULT 15 _IO_stdin_used
|
||||
64: 00000000004006c0 101 FUNC GLOBAL DEFAULT 13 __libc_csu_init
|
||||
65: 0000000000601068 0 NOTYPE GLOBAL DEFAULT 25 _end
|
||||
66: 0000000000400520 0 FUNC GLOBAL DEFAULT 13 _start
|
||||
67: 0000000000601060 0 NOTYPE GLOBAL DEFAULT 25 __bss_start
|
||||
68: 000000000040060d 175 FUNC GLOBAL DEFAULT 13 main
|
||||
69: 0000000000601050 8 OBJECT GLOBAL DEFAULT 24 USER
|
||||
70: 0000000000601060 0 OBJECT GLOBAL HIDDEN 24 __TMC_END__
|
||||
71: 0000000000400490 0 FUNC GLOBAL DEFAULT 11 _init
|
||||
72: 0000000000601058 8 OBJECT GLOBAL DEFAULT 24 PASSWORD
|
||||
|
||||
Version symbols section '.gnu.version' contains 7 entries:
|
||||
Addr: 00000000004003b4 Offset: 0x0003b4 Link: 5 (.dynsym)
|
||||
000: 0 (*local*) 2 (GLIBC_2.2.5) 2 (GLIBC_2.2.5) 2 (GLIBC_2.2.5)
|
||||
004: 2 (GLIBC_2.2.5) 2 (GLIBC_2.2.5) 0 (*local*)
|
||||
|
||||
Version needs section '.gnu.version_r' contains 1 entries:
|
||||
Addr: 0x00000000004003c8 Offset: 0x0003c8 Link: 6 (.dynstr)
|
||||
000000: Version: 1 File: libc.so.6 Cnt: 1
|
||||
0x0010: Name: GLIBC_2.2.5 Flags: none Version: 2
|
||||
|
||||
Displaying notes found at file offset 0x00000254 with length 0x00000020:
|
||||
Owner Data size Description
|
||||
GNU 0x00000010 NT_GNU_ABI_TAG (ABI version tag)
|
||||
OS: Linux, ABI: 2.6.32
|
||||
|
||||
Displaying notes found at file offset 0x00000274 with length 0x00000024:
|
||||
Owner Data size Description
|
||||
GNU 0x00000014 NT_GNU_BUILD_ID (unique build ID bitstring)
|
||||
Build ID: c7a8237c624481a50e6b5d824e109b71838dd18b
|
||||
bash-4.2$
|
||||
[Kbash-4.2$
|
||||
[Kbash-4.2$ nm ./enigma
|
||||
0000000000601060 B __bss_start
|
||||
0000000000601060 b completed.6355
|
||||
0000000000601048 D __data_start
|
||||
0000000000601048 W data_start
|
||||
0000000000400550 t deregister_tm_clones
|
||||
00000000004005c0 t __do_global_dtors_aux
|
||||
0000000000600e18 t __do_global_dtors_aux_fini_array_entry
|
||||
0000000000400748 R __dso_handle
|
||||
0000000000600e28 d _DYNAMIC
|
||||
0000000000601060 D _edata
|
||||
0000000000601068 B _end
|
||||
0000000000400734 T _fini
|
||||
00000000004005e0 t frame_dummy
|
||||
0000000000600e10 t __frame_dummy_init_array_entry
|
||||
00000000004008a8 r __FRAME_END__
|
||||
0000000000601000 d _GLOBAL_OFFSET_TABLE_
|
||||
w __gmon_start__
|
||||
0000000000400784 r __GNU_EH_FRAME_HDR
|
||||
0000000000400490 T _init
|
||||
0000000000600e18 t __init_array_end
|
||||
0000000000600e10 t __init_array_start
|
||||
0000000000400740 R _IO_stdin_used
|
||||
0000000000600e20 d __JCR_END__
|
||||
0000000000600e20 d __JCR_LIST__
|
||||
0000000000400730 T __libc_csu_fini
|
||||
00000000004006c0 T __libc_csu_init
|
||||
U __libc_start_main@@GLIBC_2.2.5
|
||||
000000000040060d T main
|
||||
0000000000601058 D PASSWORD
|
||||
U printf@@GLIBC_2.2.5
|
||||
U putchar@@GLIBC_2.2.5
|
||||
U puts@@GLIBC_2.2.5
|
||||
0000000000400580 t register_tm_clones
|
||||
0000000000400520 T _start
|
||||
U strcmp@@GLIBC_2.2.5
|
||||
0000000000601060 D __TMC_END__
|
||||
0000000000601050 D USER
|
||||
bash-4.2$ gdb ./enigma
|
||||
[?1034hGNU gdb (GDB) Red Hat Enterprise Linux 7.6.1-120.el7
|
||||
Copyright (C) 2013 Free Software Foundation, Inc.
|
||||
License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html>
|
||||
This is free software: you are free to change and redistribute it.
|
||||
There is NO WARRANTY, to the extent permitted by law. Type "show copying"
|
||||
and "show warranty" for details.
|
||||
This GDB was configured as "x86_64-redhat-linux-gnu".
|
||||
For bug reporting instructions, please see:
|
||||
<http://www.gnu.org/software/gdb/bugs/>...
|
||||
Reading symbols from /home/student/anw0044/CPE455/lab03/enigma...done.
|
||||
(gdb) break main
|
||||
Breakpoint 1 at 0x40061c: file enigma.c, line 12.
|
||||
(gdb) \[Kset args hello world
|
||||
(gdb) run
|
||||
Starting program: /home/student/anw0044/CPE455/lab03/./enigma hello world
|
||||
|
||||
Breakpoint 1, main (argc=3, argv=0x7fffffffe158) at enigma.c:12
|
||||
12 enigma.c: No such file or directory.
|
||||
Missing separate debuginfos, use: debuginfo-install glibc-2.17-325.el7_9.x86_64
|
||||
(gdb) print argc
|
||||
$1 = 3
|
||||
(gdb) print argc[Kv[0]
|
||||
$2 = 0x7fffffffe524 "/home/student/anw0044/CPE455/lab03/./enigma"
|
||||
(gdb) print argv[0][1P]1]
|
||||
$3 = 0x7fffffffe550 "hello"
|
||||
(gdb) print argv[1][1P]2]
|
||||
$4 = 0x7fffffffe556 "world"
|
||||
(gdb) print argv[2][1P]3]
|
||||
$5 = 0x0
|
||||
(gdb) print USER
|
||||
$6 = 0x400750 "CPEX55"
|
||||
(gdb) print USER[K[K[K[KPASSWORD
|
||||
$7 = 0x400757 "qwerty"
|
||||
(gdb) info files
|
||||
Symbols from "/home/student/anw0044/CPE455/lab03/enigma".
|
||||
Unix child process:
|
||||
Using the running image of child process 19311.
|
||||
While running this, GDB does not access memory from...
|
||||
Local exec file:
|
||||
`/home/student/anw0044/CPE455/lab03/enigma', file type elf64-x86-64.
|
||||
Entry point: 0x400520
|
||||
0x0000000000400238 - 0x0000000000400254 is .interp
|
||||
0x0000000000400254 - 0x0000000000400274 is .note.ABI-tag
|
||||
0x0000000000400274 - 0x0000000000400298 is .note.gnu.build-id
|
||||
0x0000000000400298 - 0x00000000004002b4 is .gnu.hash
|
||||
0x00000000004002b8 - 0x0000000000400360 is .dynsym
|
||||
0x0000000000400360 - 0x00000000004003b3 is .dynstr
|
||||
0x00000000004003b4 - 0x00000000004003c2 is .gnu.version
|
||||
0x00000000004003c8 - 0x00000000004003e8 is .gnu.version_r
|
||||
0x00000000004003e8 - 0x0000000000400400 is .rela.dyn
|
||||
0x0000000000400400 - 0x0000000000400490 is .rela.plt
|
||||
0x0000000000400490 - 0x00000000004004aa is .init
|
||||
0x00000000004004b0 - 0x0000000000400520 is .plt
|
||||
0x0000000000400520 - 0x0000000000400732 is .text
|
||||
0x0000000000400734 - 0x000000000040073d is .fini
|
||||
0x0000000000400740 - 0x0000000000400782 is .rodata
|
||||
0x0000000000400784 - 0x00000000004007b8 is .eh_frame_hdr
|
||||
0x00000000004007b8 - 0x00000000004008ac is .eh_frame
|
||||
0x0000000000600e10 - 0x0000000000600e18 is .init_array
|
||||
0x0000000000600e18 - 0x0000000000600e20 is .fini_array
|
||||
0x0000000000600e20 - 0x0000000000600e28 is .jcr
|
||||
0x0000000000600e28 - 0x0000000000600ff8 is .dynamic
|
||||
0x0000000000600ff8 - 0x0000000000601000 is .got
|
||||
0x0000000000601000 - 0x0000000000601048 is .got.plt
|
||||
0x0000000000601048 - 0x0000000000601060 is .data
|
||||
0x0000000000601060 - 0x0000000000601068 is .bss
|
||||
0x00007ffff7ddb1c8 - 0x00007ffff7ddb1ec is .note.gnu.build-id in /lib64/ld-linux-x86-64.so.2
|
||||
0x00007ffff7ddb1f0 - 0x00007ffff7ddb2ac is .hash in /lib64/ld-linux-x86-64.so.2
|
||||
0x00007ffff7ddb2b0 - 0x00007ffff7ddb390 is .gnu.hash in /lib64/ld-linux-x86-64.so.2
|
||||
0x00007ffff7ddb390 - 0x00007ffff7ddb630 is .dynsym in /lib64/ld-linux-x86-64.so.2
|
||||
0x00007ffff7ddb630 - 0x00007ffff7ddb7cf is .dynstr in /lib64/ld-linux-x86-64.so.2
|
||||
0x00007ffff7ddb7d0 - 0x00007ffff7ddb808 is .gnu.version in /lib64/ld-linux-x86-64.so.2
|
||||
0x00007ffff7ddb808 - 0x00007ffff7ddb8ac is .gnu.version_d in /lib64/ld-linux-x86-64.so.2
|
||||
0x00007ffff7ddb8b0 - 0x00007ffff7ddb9e8 is .rela.dyn in /lib64/ld-linux-x86-64.so.2
|
||||
0x00007ffff7ddb9e8 - 0x00007ffff7ddba78 is .rela.plt in /lib64/ld-linux-x86-64.so.2
|
||||
0x00007ffff7ddba80 - 0x00007ffff7ddbaf0 is .plt in /lib64/ld-linux-x86-64.so.2
|
||||
0x00007ffff7ddbaf0 - 0x00007ffff7df7060 is .text in /lib64/ld-linux-x86-64.so.2
|
||||
0x00007ffff7df7060 - 0x00007ffff7df9da0 is .rodata in /lib64/ld-linux-x86-64.so.2
|
||||
0x00007ffff7df9da0 - 0x00007ffff7df9da1 is .stapsdt.base in /lib64/ld-linux-x86-64.so.2
|
||||
0x00007ffff7df9da4 - 0x00007ffff7dfa418 is .eh_frame_hdr in /lib64/ld-linux-x86-64.so.2
|
||||
0x00007ffff7dfa418 - 0x00007ffff7dfc960 is .eh_frame in /lib64/ld-linux-x86-64.so.2
|
||||
0x00007ffff7ffcb40 - 0x00007ffff7ffcdfc is .data.rel.ro in /lib64/ld-linux-x86-64.so.2
|
||||
0x00007ffff7ffce00 - 0x00007ffff7ffcf90 is .dynamic in /lib64/ld-linux-x86-64.so.2
|
||||
0x00007ffff7ffcf90 - 0x00007ffff7ffcff0 is .got in /lib64/ld-linux-x86-64.so.2
|
||||
0x00007ffff7ffd000 - 0x00007ffff7ffdf78 is .data in /lib64/ld-linux-x86-64.so.2
|
||||
0x00007ffff7ffdf80 - 0x00007ffff7ffe150 is .bss in /lib64/ld-linux-x86-64.so.2
|
||||
0x00007ffff7a0d270 - 0x00007ffff7a0d294 is .note.gnu.build-id in /lib64/libc.so.6
|
||||
0x00007ffff7a0d294 - 0x00007ffff7a0d2b4 is .note.ABI-tag in /lib64/libc.so.6
|
||||
0x00007ffff7a0d2b8 - 0x00007ffff7a10d84 is .gnu.hash in /lib64/libc.so.6
|
||||
0x00007ffff7a10d88 - 0x00007ffff7a1dfd0 is .dynsym in /lib64/libc.so.6
|
||||
0x00007ffff7a1dfd0 - 0x00007ffff7a23acd is .dynstr in /lib64/libc.so.6
|
||||
0x00007ffff7a23ace - 0x00007ffff7a24c54 is .gnu.version in /lib64/libc.so.6
|
||||
0x00007ffff7a24c58 - 0x00007ffff7a24f60 is .gnu.version_d in /lib64/libc.so.6
|
||||
0x00007ffff7a24f60 - 0x00007ffff7a24f90 is .gnu.version_r in /lib64/libc.so.6
|
||||
0x00007ffff7a24f90 - 0x00007ffff7a2c7d8 is .rela.dyn in /lib64/libc.so.6
|
||||
0x00007ffff7a2c7d8 - 0x00007ffff7a2c910 is .rela.plt in /lib64/libc.so.6
|
||||
0x00007ffff7a2c910 - 0x00007ffff7a2c9f0 is .plt in /lib64/libc.so.6
|
||||
---Type <return> to continue, or q <return> to quit---
|
||||
0x00007ffff7a2c9f0 - 0x00007ffff7b7cb6f is .text in /lib64/libc.so.6
|
||||
0x00007ffff7b7cb70 - 0x00007ffff7b7e5d9 is __libc_freeres_fn in /lib64/libc.so.6
|
||||
0x00007ffff7b7e5e0 - 0x00007ffff7b7e8e2 is __libc_thread_freeres_fn in /lib64/libc.so.6
|
||||
0x00007ffff7b7e900 - 0x00007ffff7b9bc50 is .rodata in /lib64/libc.so.6
|
||||
0x00007ffff7b9bc50 - 0x00007ffff7b9bc51 is .stapsdt.base in /lib64/libc.so.6
|
||||
0x00007ffff7b9bc60 - 0x00007ffff7b9bc7c is .interp in /lib64/libc.so.6
|
||||
0x00007ffff7b9bc7c - 0x00007ffff7ba2778 is .eh_frame_hdr in /lib64/libc.so.6
|
||||
0x00007ffff7ba2778 - 0x00007ffff7bccc2c is .eh_frame in /lib64/libc.so.6
|
||||
0x00007ffff7bccc2c - 0x00007ffff7bcd015 is .gcc_except_table in /lib64/libc.so.6
|
||||
0x00007ffff7bcd018 - 0x00007ffff7bd0310 is .hash in /lib64/libc.so.6
|
||||
0x00007ffff7dd06f0 - 0x00007ffff7dd0700 is .tdata in /lib64/libc.so.6
|
||||
0x00007ffff7dd0700 - 0x00007ffff7dd0790 is .tbss in /lib64/libc.so.6
|
||||
0x00007ffff7dd0700 - 0x00007ffff7dd0710 is .init_array in /lib64/libc.so.6
|
||||
0x00007ffff7dd0710 - 0x00007ffff7dd0810 is __libc_subfreeres in /lib64/libc.so.6
|
||||
0x00007ffff7dd0810 - 0x00007ffff7dd0818 is __libc_atexit in /lib64/libc.so.6
|
||||
0x00007ffff7dd0818 - 0x00007ffff7dd0838 is __libc_thread_subfreeres in /lib64/libc.so.6
|
||||
0x00007ffff7dd0840 - 0x00007ffff7dd15a8 is __libc_IO_vtables in /lib64/libc.so.6
|
||||
0x00007ffff7dd15c0 - 0x00007ffff7dd3b60 is .data.rel.ro in /lib64/libc.so.6
|
||||
0x00007ffff7dd3b60 - 0x00007ffff7dd3d50 is .dynamic in /lib64/libc.so.6
|
||||
0x00007ffff7dd3d50 - 0x00007ffff7dd3ff0 is .got in /lib64/libc.so.6
|
||||
0x00007ffff7dd4000 - 0x00007ffff7dd4080 is .got.plt in /lib64/libc.so.6
|
||||
0x00007ffff7dd4080 - 0x00007ffff7dd58a0 is .data in /lib64/libc.so.6
|
||||
0x00007ffff7dd58a0 - 0x00007ffff7dda200 is .bss in /lib64/libc.so.6
|
||||
(gdb)
|
||||
(gdb)
|
||||
(gdb) info args
|
||||
argc = 3
|
||||
argv = 0x7fffffffe158
|
||||
(gdb) info locals
|
||||
k = 0
|
||||
(gdb) imf[K[Knfo breakpoints [K[K[K[K[K[K[K
|
||||
Num Type Disp Enb Address What
|
||||
1 breakpoint keep y 0x000000000040061c in main at enigma.c:12
|
||||
breakpoint already hit 1 time
|
||||
(gdb) c
|
||||
Continuing.
|
||||
Authentication error
|
||||
[Inferior 1 (process 19311) exited normally]
|
||||
(gdb) quit
|
||||
bash-4.2$ exit
|
||||
exit
|
BIN
CPE455/lab03/enigma.zip
Normal file
BIN
CPE455/lab03/enigma.zip
Normal file
Binary file not shown.
Reference in New Issue
Block a user