반응형
Transform a hex info to binary using linux command
I have this binary file on my linux system ..
udit@udit-Dabba ~ $ cat file.enc
Salted__s�bO��<0�F���Jw!���]�:`C�LKȆ�l
Using hexdump command I see its information like this ..
udit@udit-Dabba ~ $ hexdump -C file.enc
00000000 53 61 6c 74 65 64 5f 5f 1b 73 a1 62 4f 15 be f6 |Salted__.s.bO...|
00000010 3c 30 cc 46 ee 10 13 11 84 bf 4a 77 21 a4 84 99 |<0.F......Jw!...|
00000020 0e 5d ef 11 18 3a 60 43 a0 4c 4b 1e c8 86 e6 6c |.]...:`C.LK....l|
00000030
Now I am given a file on some other system whose contents are like this ..
53 61 6c 74 65 64 5f 5f 1b 73 a1 62 4f 15 be f6
3c 30 cc 46 ee 10 13 11 84 bf 4a 77 21 a4 84 99
0e 5d ef 11 18 3a 60 43 a0 4c 4b 1e c8 86 e6 6c
and I need to find out that same exact binary information from this hexdump.
How to proceed for that?
If there is no switch for that then a C code will also work fine.
(but a linux command with some switch is preferable)
LIMITATION:
The binary information in the file is output of an encryption algo so contents should exactly match ..
As @user786653 suggested, use the xxd(1)
program:
xxd -r -p input.txt output.bin
참고URL : https://stackoverflow.com/questions/7826526/transform-a-hex-info-to-binary-using-linux-command
반응형
'IT TIP' 카테고리의 다른 글
Linking a static library to an iOS project in Xcode 4 (0) | 2020.10.21 |
---|---|
Create a nonclustered non-unique index within the CREATE TABLE statement with SQL Server (0) | 2020.10.21 |
Is there a srcset equivalent for css background image (0) | 2020.10.21 |
How can I recover from an erronous git push -f origin master? (0) | 2020.10.21 |
Correct way to animate box-shadow with jQuery (0) | 2020.10.21 |