I'll assume the pattern was equal or less than “20280” and we are looking for “9Ak0” pattern characters. The pattern_create should be initialized from above
Note: This does not consider the Little-endian format, for that there is extra code that should be written. For more info, please take a look at the following [code][1].
Generate all hexadecimal values from \x00 to \xff
1
puts (0..255).map {|b|('\x%02X'% b)}
Copied!
To change value presentation from (\xea to 0xea), change \x%x to 0x%x
To make all letters capital (\xea to \xEA) , change \x%x to \x%X