Skip to content
/ echow Public

echow is a small tool that generates echo commands to write binary files. echow 是一个生成 echo 命令来写入二进制文件的小工具。

Notifications You must be signed in to change notification settings

h0ny/echow

Repository files navigation

echow

echow is a small tool that generates echo commands to write binary file.

简体中文 | English

Usage

The usage of echow is very simple.

Basic usage

NAME:
   echow - Generate echo commands to write binary file

USAGE:
   echow [global options] [arguments...]

GLOBAL OPTIONS:
   --file file, -f file      file path
   --number value, -n value  split the file into the specified number of parts (default: 1)
   --format hex/oct          choose octal or hex format: hex/oct (default: "hex")
   --name value              specify the file name (default: -f parameter value)
   --help, -h                show help (default: false)

Run the Example

easy example

PS C:\> .\echow.exe -f .\Test.bin -n 3
echo -n -e "\x68\x65\x6c" >> Test.bin
echo -n -e "\x6c\x6f\x20" >> Test.bin
echo -n -e "\x77\x6f\x72\x6c\x64" >> Test.bin

Output the result to a file

Use > redirection symbol in CMD:

.\echow.exe -f .\Test.bin -n 2 > test.txt

If in PowerShell, the following command is recommended:

.\echow.exe -f .\Test.bin -n 2 | Out-File -Encoding ASCII test.txt

Tips

A problem occurred: extra data 0xFFFE in file header

This is because when you write to a file using the > redirection in PowerShell, it treats the file as Unicode. Therefore, 0xFFFE is automatically added to the header of the file, which is a Unicode byte order mark used to indicate the Unicode encoding scheme used in the file.

Solution

Using the Out-File redirection command in PowerShell instead of the > symbol, and using -Encoding ASCII to specify the encoding as ASCII will not cause this problem.

About

echow is a small tool that generates echo commands to write binary files. echow 是一个生成 echo 命令来写入二进制文件的小工具。

Resources

Stars

Watchers

Forks

Packages

No packages published

Languages