Advertisement
Vladimir_Pruskalyow

HEX

Mar 20th, 2016
70
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Lua 0.30 KB | None | 0 0
  1. local f = io.open("test.lua", "rb")
  2. local block = 16
  3. for bytes in f:lines(block) do
  4.     for c in string.gmatch(bytes, ".")do
  5.         io.write(string.format("%02X ", string.byte(c)))
  6.     end
  7.     io.write (string.rep(" ", block - string.len (bytes)))
  8.     --io.write(" ", string.gsub(bytes, "%c", "\n"))
  9.     io.write("\n")
  10. end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement