How can I use the file command on an output from netcat?

For example:

nc 1234


dGhpcyBpcyBhIHNhbXBsZSBzdHJpbmc= being the output, (sample base64 for the purpose of the example).

How can this be done?


Pipe the result through file -. Like most programs, - can be used to refer to stdin.

But do note that base64 is just "ascii text".

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.