netcat Stderr

General support questions
Post Reply
Posts: 30
Joined: 2018/09/20 18:30:00

netcat Stderr

Post by bencp » 2018/11/09 15:33:04

Hello all
why to send output of netcat we have to use stderr + stdout ?
the command for explain : nc -lvp 80 >> netcat.txt 2>&1

please explain.

Posts: 1651
Joined: 2015/02/17 15:14:33
Location: Bulgaria

Re: netcat Stderr

Post by hunter86_bg » 2018/11/10 02:56:48

You have several 'streams' , one for standard output (redirected by '>') and standard error (redirected by '2>').
In newer systems you can redirect both via '&>'.
When using 'nc' and 'ncat' , I have never redirected stderr. Of course, you need to verify file integrity - if nc was used for transfering (faster but not in encrypted format).

Post Reply