I am using Catfish to find files containing certain text. Some of the files found instead of plain text contain something which looks like a hex dump:
3c3f 7068 700a 0a66 756e 6374 696f 6e20
7573 6572 5f65 7869 7374 7328 2475 6e29
207b 0a09 7265 7475 726e 2074 7275 653b
0a7d 0a0a 0a3f 3e00 0000 0000 0000 0000
I.e. always 8 columns and each row containing 16 bytes. Line one above should be
<?php function
Is there a command to unhex the file and print the content?
Use xxd
with the revert option -r
xxd -p -r file.txt
gives a result of
<?php
function user_exists($un) {
return true;
}
?>
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With