Use -s option to specify the number of data bytes to be sent.
（-l on Windows）
$ ping -s 8184 example.com
The size specified with -s is combined with the 8 bytes of ICMP header data.
Usually the max is 8184 (which translates into 8192 bytes when combined with ICMP header data).
Open the file in hexl-mode.
Or you can open the file and enter hexl-mode.
Insert a byte with a code typed in hex.
B-LOG » Emacsのhexl-mode.
$ script [file]
Run `script` command and a new shell starts up and records the input/output in the specified file until the shell is terminated.
To exit, `exit`.
If file is omitted, input/output are recorded in the file named 'typescript' in the current directory.
By default the log file is overwritten. If you want to append it, add the -a option.