2013년 7월 16일 화요일

rva of entry point

C:\work>dumpbin /summary notepad.exe Microsoft (R) COFF Binary File Dumper Version 6.00.8168 Copyright (C) Microsoft Corp 1992-1998. All rights reserved. Dump of file notepad.exe File Type: EXECUTABLE IMAGE Summary 2000 .data 9000 .rsrc 8000 .text E000 PEinject C:\work>dumpbin /headers notepad.exe Microsoft (R) COFF Binary File Dumper Version 6.00.8168 Copyright (C) Microsoft Corp 1992-1998. All rights reserved. Dump of file notepad.exe PE signature found File Type: EXECUTABLE IMAGE FILE HEADER VALUES 14C machine (i386) 4 number of sections 10F8E time date stamp Fri Jan 02 04:18:38 1970 0 file pointer to symbol table 0 number of symbols E0 size of optional header 10F characteristics Relocations stripped Executable Line numbers stripped Symbols stripped 32 bit word machine OPTIONAL HEADER VALUES 10B magic # 7.10 linker version 14E00 size of code 16200 size of initialized data 0 size of uninitialized data 14000 RVA of entry point 1000 base of code 9000 base of data 1000000 image base 1000 section alignment 200 file alignment 5.01 operating system version 5.01 image version 4.00 subsystem version 0 Win32 version 21600 size of image 400 size of headers 126CE checksum 2 subsystem (Windows GUI) 8000 DLL characteristics RESERVED - UNKNOWN 40000 size of stack reserve 11000 size of stack commit 100000 size of heap reserve 1000 size of heap commit 0 loader flags 10 number of directories 0 [ 0] RVA [size] of Export Directory 14873 [ 61] RVA [size] of Import Directory B000 [ 8304] RVA [size] of Resource Directory 0 [ 0] RVA [size] of Exception Directory 0 [ 0] RVA [size] of Certificates Directory 0 [ 0] RVA [size] of Base Relocation Directory 1350 [ 1C] RVA [size] of Debug Directory 0 [ 0] RVA [size] of Architecture Directory 0 [ 0] RVA [size] of Special Directory 0 [ 0] RVA [size] of Thread Storage Directory 18A8 [ 40] RVA [size] of Load Configuration Directory 0 [ 0] RVA [size] of Bound Import Directory 1000 [ 348] RVA [size] of Import Address Table Directory 0 [ 0] RVA [size] of Delay Import Directory 0 [ 0] RVA [size] of Reserved Directory 0 [ 0] RVA [size] of Reserved Directory SECTION HEADER #1 .text name 7748 virtual size 1000 virtual address 7800 size of raw data 400 file pointer to raw data 0 file pointer to relocation table 0 file pointer to line numbers 0 number of relocations 0 number of line numbers E0000020 flags Code Execute Read Write Debug Directories Type Size RVA Pointer ------ -------- -------- -------- cv 24 000018F0 CF0 Format: RSDS SECTION HEADER #2 .data name 1BA8 virtual size 9000 virtual address 800 size of raw data 7C00 file pointer to raw data 0 file pointer to relocation table 0 file pointer to line numbers 0 number of relocations 0 number of line numbers C0000040 flags Initialized Data Read Write SECTION HEADER #3 .rsrc name 8304 virtual size B000 virtual address 8400 size of raw data 8400 file pointer to raw data 0 file pointer to relocation table 0 file pointer to line numbers 0 number of relocations 0 number of line numbers C0000040 flags Initialized Data Read Write Summary 2000 .data 9000 .rsrc 8000 .text E000 PEinject

[perl]한라인씩 읽어 특정 문자열 제거

use strict; use warnings; my $filename = 'target.txt'; open(my $fh, '<', $filename) or die "Could not open file '$filename' $!"; while (my $row = <$fh>) { # print "$row\n"; $row =substr $row, index($row, 'nbsp;')+7; print "$row\n"; }

[perl]디렉토리 내 특정 포멧의 파일에서 문자열 검색

use strict; use warnings; use Cwd; use File::Find; my $search_pattern=$ARGV[0]; my $file_pattern =$ARGV[1]; find(\&d, cwd); sub d { my $file = $File::Find::name; $file =~ s,/,\\,g; return unless -f $file; return unless $file =~ /$file_pattern/; open F, $file or print "couldn't open $file\n" && return; while () { if (my ($found) = m/($search_pattern)/o) { print "found $found in $file\n"; last; } } close F; }

2013년 7월 14일 일요일

전기장 vector field

전기력선은 등전위면의 gradient 임


CentOS6.4 APM 설치 인터넷 디스커넥트 제로보드 XE 설치용

download CentOS DVD1.iso

su root

mkdir /mnt/disk
mount -o loop CentOS.DVD1.iso /mnt/disk


####

rpm -ivh php-*

php-mysql 반드시 포함되어야 함.

####

rpm -ivh mysql*

####

아파치는 설치되어 있음 따로 설치 안 해도 됨.