The Official Radare2 Book | страница 73



0x00000050 7500 00e1 ffe8 58fe 4dc4 00e0 dbc8 b885

[0x08049790]> e zoom.byte=p

[0x08049790]> pz // or pzp

0x00000000 2f47 0609 070a 0917 1e9e a4bd 2a1b 2c27

0x00000010 322d 5671 8788 8182 5679 7568 82a2 7d89

0x00000020 8173 7f7b 727a 9588 a07b 5c7d 8daf 836d

0x00000030 b167 6192 a67d 8aa2 6246 856e 8c9b 999f

0x00000040 a774 96c3 b1a4 6c8e a07c 6a8f 8983 6a62

0x00000050 7d66 625f 7ea4 7ea6 b4b6 8b57 a19f 71a2

[0x08049790]> eval zoom.byte = flags

[0x08049790]> pz // or pzf

0x00406e65 48d0 80f9 360f 8745 ffff ffeb ae66 0f1f

0x00406e75 4400 0083 f801 0f85 3fff ffff 410f b600

0x00406e85 3c78 0f87 6301 0000 0fb6 c8ff 24cd 0026

0x00406e95 4100 660f 1f84 0000 0000 0084 c074 043c

0x00406ea5 3a75 18b8 0500 0000 83f8 060f 95c0 e9cd

0x00406eb5 feff ff0f 1f84 0000 0000 0041 8801 4983

0x00406ec5 c001 4983 c201 4983 c101 e9ec feff ff0f

[0x08049790]> e zoom.byte=F

[0x08049790]> pO // or pzF

0x00000000 0000 0000 0000 0000 0000 0000 0000 0000

0x00000010 0000 2b5c 5757 3a14 331f 1b23 0315 1d18

0x00000020 222a 2330 2b31 2e2a 1714 200d 1512 383d

0x00000030 1e1a 181b 0a10 1a21 2a36 281e 1d1c 0e11

0x00000040 1b2a 2f22 2229 181e 231e 181c 1913 262b

0x00000050 2b30 4741 422f 382a 1e22 0f17 0f10 3913

You can limit zooming to a range of bytes instead of the whole bytespace. Change zoom.from and zoom.to eval variables:

[0x00003a04]> e? zoom.

zoom.byte: Zoom callback to calculate each byte (See pz? for help)

zoom.from: Zoom start address

zoom.in: Specify boundaries for zoom

zoom.maxsz: Zoom max size of block

zoom.to: Zoom end address

[0x00003a04]> e zoom.

zoom.byte = h

zoom.from = 0

zoom.in = io.map

zoom.maxsz = 512

zoom.to = 0

Radare2 has an internal clipboard to save and write portions of memory loaded from the current io layer.

This clipboard can be manipulated with the y command.

The two basic operations are

   • copy (yank)

   • paste

The yank operation will read N bytes (specified by the argument) into the clipboard. We can later use the yy command to paste what we read before into a file.

You can yank/paste bytes in visual mode selecting them with the cursor mode (Vc) and then using the y and Y key bindings which are aliases for y and yy commands of the command-line interface.

[0x00000000]> y?

Usage: y[ptxy] [len] [[@]addr] # See wd? for memcpy, same as 'yf'.

| y! open cfg.editor to edit the clipboard

| y 16 0x200 copy 16 bytes into clipboard from 0x200

| y 16 @ 0x200 copy 16 bytes into clipboard from 0x200