IRED(1)

NAME
ired - interactive raw editor

SYNOPSIS
ired [-hnv] [-i script] file ...

DESCRIPTION
Simple and minimal hexadecimal editor based on radare concepts

The program arguments are:

-h  Show help message

-v  Show version information

-n  Do not be verbose

-i script
    Interpret a script file as ired commands.

    Same as "ired file < script"

COMMANDS

s[+-addr]
    seek to relative or absolute address

    > s 0x400 # seek to offset 0x400

    > s+20 # seek 20 bytes forward

b[+-size]
    change block size

    > b 5 # set block size to 5 bytes

    > b +128 # increase block size in 128 bytes

w[hex|"str"]
    write hexpair or string

    > w 001122 # write 0x00 0x11 0x22

    > w"Hello World" # write "Hello World" string without quotes

/[hex|"str"]
    search hexpair or string

    > /894722 # search bytes 0x89 0x47 0x22

    > /"lib" # search string 'lib'

x[size]
    hexdump

    > x 256 # dump 256 bytes in hexadecimal

X[size]
    hexpair dump

    > X 0x100 # dump 256 bytes in hexpairs

p[fmt]
    print formatted current block ('p' for help)

    ob/wW/dD/qQ byte (oct,hex), word, dword, qword (lil, big endian)

    i/I/f/F int32 (lil, big), float (lil, big)

    s/S short int16 (lil, big)

    z/Z zero-terminatted string (ascii, wide-ascii)

r[-[num]]
    truncate or -remove N bytes

    > r 1024 # resize file to 1024 bytes

    > r-10 # remove 10 bytes from current seek and shrink file

.[file]
    interpret file

    > .script # run file 'script'

<[file]
    load file in current seek

    > <curblock.bin # load blocksize bytes from file

>[file]
    dump current block to file

    > >curblock.bin # dump current block to a file

!cmd
    run shell command

    The following environment variables are defined when found in the command string:

    FILE is the filename of the current working file

    BLOCK points to the temporal filename with the current block dump

    OFFSET and XOFFSET are decimal and hexadecimal values of the current seek

    > !cp $BLOCK $FILE-$XOFFSET.curblock # save current block

?expr
    calculate numeric expression

    > ?1024

    0x400 1024 02000

q   quit

SEE ALSO

vired(1)

AUTHORS
pancake <@nopcode.org>