Take the 2-minute tour ×
Unix & Linux Stack Exchange is a question and answer site for users of Linux, FreeBSD and other Un*x-like operating systems. It's 100% free, no registration required.

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

For example:

nc 192.168.1.1 1234

dGhpcyBpcyBhIHNhbXBsZSBzdHJpbmc=

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

How can this be done?

share|improve this question

1 Answer 1

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

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

share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

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