summaryrefslogtreecommitdiff
path: root/md/writeup/h64e.md
blob: 6b6c3203e8ca93406e2368f16b5ab82a7cacd7e8 (plain) (blame)
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
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
title: h64d - hexdump replacment

# h64d - hexdump replacment

small hexdump like tool currently supports:

```text
./h64d: invalid option -- '-'
Usage: ./h64d [OPTS] <filename>

 -a - asciimode
 -b - show offset adress
 -o - file offset
 -i - output hex
 -l - length of output

Version: 0.1beta
```
more stuff will be added if there will be some nice use cases.

## Examples


### Usual dump
```
./h64d -l 16 /dev/urandom
```
<pre>
a8af99260cce4d51e725b0471b7f3766
</pre>

### Ascii and hexdata

```
./h64d -l 128 -a /dev/urandom
```
<pre>
e9fabc476dac7843625c4ee21cb8888d...Gm.xCb\N.....
3be87033fc079cd637f74c9dde4a8f4e;.p3....7.L..J.N
7eeed6f53a18ad0c72bf9e431140f552~...:...r..C.@.R
250965909eab9bd8cc3afc9cf9a841f9%.e......:....A.
fd9d74b944c885ac5c3b5f7df9320d83..t.D...\;_}.2..
071e85d942cfec6481c2853637cddb02....B..d...67...
0d65469425553f4182ca88f7a97c19a8.eF.%U?A.....|..
86ff0c013978389f7335099bf984884b....9x8.s5.....K
</pre>

### Hex seperated

```
./h64d -l 128 -i /dev/urandom
```

<pre>
6d 78 b4 94 f3 34 df 2a 7c 18 1e 5b a5 e2 e3 68 
c2 66 67 63 97 09 93 d8 0d 32 70 47 32 34 c9 8f 
57 2b 5c 16 7b 9f 1f 1d 12 a9 2a 61 d1 a9 e0 12 
c8 d7 11 cf 41 a7 e8 5f 10 5e fa 28 ec 80 7f 7c 
a9 21 0d 97 c0 36 f8 53 d3 30 a9 2c 73 51 96 70 
a4 43 ae 9d 0e 87 44 da b2 71 dd 40 5a 4b f3 fd 
c5 79 fc 96 d0 41 f9 4c 00 18 1b ea 5a a6 2f 1c 
55 66 05 ca 7f a3 9d e8 d3 76 b0 22 0e 83 a7 5e	
</pre>

### Seperated hex and characters

```
./h64d -l 128 -a -i /dev/urandom
```
<pre>
89 0d f1 01 81 6d 9b de 1e 10 3e dc 79 bd 65 ac .....m....>.y.e.
eb 3b 2c 3c 60 f1 c7 d0 cf dc 19 aa 66 6d be ed .;,<`.......fm..
99 a2 00 19 50 b9 8c 49 95 bc 9c 4d df a9 c0 6c ....P..I...M...l
8f 41 14 67 2a 59 f0 9c f4 be 41 9b 6b 1c 28 98 .A.g*Y....A.k.(.
42 36 70 62 e3 4b a1 50 af 19 a9 ed 84 dc 21 c6 B6pb.K.P......!.
72 2a dd 18 72 f9 2d 31 a0 16 fc ee ad 64 0b fa r*..r.-1.....d..
15 24 54 69 03 b3 19 bd 6b 3e a7 28 7b 2a e4 ca .$Ti....k>.({*..
db cb 4d 17 a6 16 99 a7 51 b2 b8 3d 14 c7 aa 71 ..M.....Q..=...q
</pre>

### Offset,hex,ascii output

```
./h64d -l 128 -b -i -a  /dev/urandom
```
<pre>
00000000 38 65 e6 6b 4e 43 15 e7 17 2c 5e 96 fe f0 b6 17 8e.kNC...,^.....
00000010 ec b2 85 64 70 7f 88 b2 ad ba 7d 5c 4f 2a ba 30 ...dp.....}\O*.0
00000020 1b 43 1d 6e 98 f7 28 0f 9f 9c 6d 1e 2c 80 31 e9 .C.n..(...m.,.1.
00000030 ba 9d 37 30 59 11 58 a5 80 84 2e b0 8d 96 f9 20 ..70Y.X........ 
00000040 5a 6b 17 71 eb e4 15 00 7f 7f 95 4d 19 51 da 04 Zk.q.......M.Q..
00000050 24 87 a5 97 b5 41 cc 89 f4 f0 e1 ff 8a 62 2d 73 $....A.......b-s
00000060 64 eb 8b e3 84 2c a8 a3 b5 61 6e c7 89 58 c0 46 d....,...an..X.F
00000070 a8 bd ec 67 23 69 80 dd bd 98 14 a0 00 b2 12 eb ...g#i..........	
</pre>

## Tested

| OS | Arch |
|---|---|
| Linux | 32/64bit intel |
| NetBSD | 32bit intel |

## Source

```
git clone http://git.main.lv/cgit.cgi/h64.git
```

## Compile

just 

```
make
```

should be enought