mirror of
https://github.com/Telecominfraproject/wlan-ap.git
synced 2025-10-29 09:32:34 +00:00
12 lines
322 B
Bash
Executable File
12 lines
322 B
Bash
Executable File
#!/usr/bin/lua
|
|
local block = 16
|
|
while true do
|
|
local bytes = io.read(block)
|
|
if not bytes then break end
|
|
for b in string.gfind(bytes, ".") do
|
|
io.write(string.format("%02X ", string.byte(b)))
|
|
end
|
|
io.write(string.rep(" ", block - string.len(bytes) + 1))
|
|
io.write(string.gsub(bytes, "%c", "."), "\n")
|
|
end
|