[doug@vinci .vnc]$ vncpasswdThat's a mess. How are we going to get that into an ASCII file?
Password: password
Verify: password
[doug@vinci .vnc]$ cat passwd
ÛØ<ýrzX
[doug@vinci .vnc]$ hexdump passwdOkay: that's hex. But how do we get it back to ASCII?
0000000 d8db fd3c 7a72 5814
0000008
[doug@vinci .vnc]$ for HEX in d8 db fd 3c 7a 72 58 14; do echo -en "\x$HEX" | awk '{printf "%c", $1}'; doneWith a few stategically placed spaces, it's back into hex.
ØÛý<zrX
Ah... It's not quite right. Look at the characters. They're out of order
[doug@vinci hexdump -C passwdMuch better. Dare I say perfect. And we don't even need to add the spaces.
00000000 db d8 3c fd 72 7a 14 58 |..<.rz.X|
00000008
[doug@vinci .vnc]$ for HEX in db d8 3c fd 72 7a 14 58; do echo -en "\x$HEX" | awk '{printf "%c", $1}'; done
ÛØ<ýrzX
No comments:
Post a Comment