Packet Builder

Packet Builder

IO Ninja allows you to prepare packets for transmission in multiple ways.

Text Transmit

First of all, you can simply punch the text into the IO Ninja plain-text editor. In this mode, IO Ninja supports insertion of special characters via escape sequences (e.g., \r, \t \xff, and so on).

Sometimes you may have to prepare a text with lots of backslashes (e.g. a Windows file path); using escape sequences would be counter-productive in this case. No worries — you can switch the support for escape sequences ON or OFF depending on situation.

Binary Transmit

Binary packet transmission is where IO Ninja truly shines.

IO Ninja features a built-in modern hex-editor. This editor is Unicode-enabled, supports insert/overwrite modes, lets you edit nibbles, highlights the selected octet (so you can clearly see the mapping between a character and its code), shows the current offset and selected range.

More importantly, IO Ninja comes with the so-called packet template editor. What this thing does is allows describing a packet structure in Jancy language — so that you can conveniently edit individual fields later with a property grid!

Jancy is ABI-compatible with C, it supports structure packing, bit fields and even integers with inversed byte order, aka bigendians! So with Jancy you can describe any packet header, just like you would in C/C++ — and even better!

Yet another important thing about the packet template editor is that it allows you to describe actions such as update-length, calculate-checksum, encode-name, and then invoke those actions via hyperlinks in the property grid!

File Transmit

Sometimes, you may need to transmit the contents of a file. With IO Ninja, you can easily do that, too. The 3rd tab of the Transmit Pane is dedicated to file transmission. Just browse for a file and hit Send. You can even control the size of individual blocks!

Script Transmit

Finally, yet another unique transmit facility in IO Ninja is the script transmit pane. Here you can write a small program in Jancy to prepare and transmit packets programmatically.

To give you a taste of what this facility is capable of, here's a simple script:

main()
{
    for (size_t i = 0;; i++)
    {
        char const* p = $"packet $i\n"; // perl-like interpolating literals
        transmit(p); // omitting length means, use strlen ()
        sys.sleep(1000); // wait one second and repeat
    }
}

The example above defines an infinite loop which sends packets with ever-incrementing indices and with short one-second pauses between packets.

Don't let the "infinite" part scare you — you can always abort the execution of a script with the Stop button!

Gallery