とにかく進むねん。
勉強サークルのブログです。 もがきながらでも進むこと。 これがモットーです。
ブログ内検索
リンク
管理画面
新しい記事を書く
カレンダー
03
2025/04
05
S
M
T
W
T
F
S
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
アーカイブ
2012 年 12 月 ( 3 )
2012 年 11 月 ( 11 )
2012 年 10 月 ( 4 )
2012 年 09 月 ( 5 )
2012 年 08 月 ( 4 )
プロフィール
HN:
betweens
性別:
非公開
カウンター
カテゴリー
宿題 ( 10 )
colinux 設定 ( 16 )
colinux network設定 ( 4 )
検索エンジン付き合い方 ( 9 )
C++ ( 2 )
未選択 ( 102 )
shell script ( 1 )
code golf ( 66 )
Haskell ( 14 )
Python Challenge ( 2 )
Project Euler ( 2 )
Python Study ( 3 )
英語 ( 1 )
JAVA ( 3 )
ゴミ情報 ( 1 )
RSS
RSS 0.91
RSS 1.0
RSS 2.0
最新CM
無題
[11/07 betweens]
無題
[11/07 元左席人]
無題
[08/30 betweens]
無題
[08/30 元左席人]
無題
[10/02 元左席人]
最新TB
最新記事
anarchy golf (Haskell) [Number lines]
(12/13)
anarchy golf (Haskell) [spirals] 【Vol.4】
(12/06)
anarchy golf (Haskell) [ two kinds of digit ] 読解
(12/05)
anarchy golf (Haskell) [Reduce fractions]
(11/13)
anarchy golf (Haskell) [Fill in the blanks]
(11/11)
最古記事
宿題 [2008.01a] colinux をインストールしよう
(05/10)
[2008.01a] colinux をインストールしよう(解答編1)
(05/15)
[2008.01a] colinux をインストールしよう(解答編2)
(05/17)
[2008.01a] colinux をインストールしよう(解答編3)
(05/18)
Google のノウハウ
(05/19)
フリーエリア
2025
04,21
07:36
[PR]
CATEGORY[]
×
[PR]上記の広告は3ヶ月以上新規記事投稿のないブログに表示されています。新しい記事を書く事で広告が消えます。
2009
09,11
07:06
バイナリハックス(#4) お勉強
CATEGORY[未選択]
man od で調べてみた。
http://www.linux.or.jp/JM/html/gnumaniak/man1/od.1.html
user@localhost ~ $ od /etc/ld.so.cache | head -5
0000000 062154 071456 026557 027061 027067 000060 000530 000000
0000020 000003 000000 020130 000000 020142 000000 000003 000000
0000040 020161 000000 020171 000000 000003 000000 020206 000000
0000060 020223 000000 000003 000000 020251 000000 020264 000000
0000100 000003 000000 020310 000000 020326 000000 000003 000000
★ 本に従って、以下のように 実行してみた。
★ -t でいろいろ表現が出来ると言うわけか
user@localhost ~ $ od -t a /etc/ld.so.cache | head -5
user@localhost ~ $ od -t c /etc/ld.so.cache | head -5
user@localhost ~ $ od -t d /etc/ld.so.cache | head -5
user@localhost ~ $ od -t f /etc/ld.so.cache | head -5
user@localhost ~ $ od -t o /etc/ld.so.cache | head -5
user@localhost ~ $ od -t u /etc/ld.so.cache | head -5
user@localhost ~ $ od -t x /etc/ld.so.cache | head -5
user@localhost ~ $ od -t d1 /etc/ld.so.cache | head -5
user@localhost ~ $ od -t d2 /etc/ld.so.cache | head -5
user@localhost ~ $ od -t dC /etc/ld.so.cache | head -5
user@localhost ~ $ od -t dS /etc/ld.so.cache | head -5
user@localhost ~ $ od -t fF /etc/ld.so.cache | head -5
user@localhost ~ $ od -t f /etc/ld.so.cache | head -5
user@localhost ~ $ od -t fD /etc/ld.so.cache | head -5
★ なるほど、バイトごとに16進数で表示する場合は以下のようにするわけか。
user@localhost ~ $ od -t x1 -A x /etc/ld.so.cache | head -5
000000 6c 64 2e 73 6f 2d 31 2e 37 2e 30 00 58 01 00 00
000010 03 00 00 00 58 20 00 00 62 20 00 00 03 00 00 00
000020 71 20 00 00 79 20 00 00 03 00 00 00 86 20 00 00
000030 93 20 00 00 03 00 00 00 a9 20 00 00 b4 20 00 00
000040 03 00 00 00 c8 20 00 00 d6 20 00 00 03 00 00 00
★ x1 にしなければ、以下のようになっていた。
user@localhost ~ $ od -t x -A x /etc/ld.so.cache | head -5
000000 732e646c 2e312d6f 00302e37 00000158
000010 00000003 00002058 00002062 00000003
000020 00002071 00002079 00000003 00002086
000030 00002093 00000003 000020a9 000020b4
000040 00000003 000020c8 000020d6 00000003
★ -A x は基数オフセットの設定って。。。
user@localhost ~ $ od -t x1 /etc/ld.so.cache | head -5
0000000 6c 64 2e 73 6f 2d 31 2e 37 2e 30 00 58 01 00 00
0000020 03 00 00 00 58 20 00 00 62 20 00 00 03 00 00 00
0000040 71 20 00 00 79 20 00 00 03 00 00 00 86 20 00 00
0000060 93 20 00 00 03 00 00 00 a9 20 00 00 b4 20 00 00
0000100 03 00 00 00 c8 20 00 00 d6 20 00 00 03 00 00 00
★ ↑
★ この列が変わってる!!
★ 以下は、ひたすら実行してみることに。
user@localhost ~ $ od -t x1z /etc/ld.so.cache | head -5
user@localhost ~ $ od -t x1c /etc/ld.so.cache | head -5
★ sed が出てきたので調べてみた。
★
http://www.pinkdragon.net/DocumentsLibrary/contents/ja/Linux_man/sed.1.html
★ "45,49p" って何だ??
★
http://d.hatena.ne.jp/tanakaBox/20070308
★ 45~49 行目まで出力
user@localhost ~ $ diff -u =(od -An -s /etc/ld.so.cache) =(strings /etc/ld.so.cache ) | head
-bash: syntax error near unexpected token `('
★うーん、だめだ。 これはわからん。。。
PR
コメント[0]
TB[]
<<
バイナリハックス(#5) お勉強
|
HOME
|
バイナリハックス(#3) お勉強
>>
コメント
コメント投稿
NAME:
MAIL:
URL:
COLOR:
Black
LimeGreen
SeaGreen
Teal
FireBrick
Tomato
IndianRed
BurlyWood
SlateGray
DarkSlateBlue
LightPink
DeepPink
DarkOrange
Gold
DimGray
Silver
SUBJECT:
COMMENT:
PASS:
trackback
トラックバックURL
<<
バイナリハックス(#5) お勉強
|
HOME
|
バイナリハックス(#3) お勉強
>>
忍者ブログ
[PR]