I am using netcat to run a file over a network like so
nc -lvnp 1111 -e file
on the client machine, the connection is empty and I only get an output after I enter an input.
How to show the output of the program before asking for input, the program is a c code
printf("Enter name");
scanf("%s", user);
the program shows Enter name
only after I enter something to user
fflush(stdout);
right after theprintf
call? – thrig Aug 23 '22 at 20:39pty
it's normal to getInput a number:
only after you actually provided input blindly". I'm not sure what you can do withnc
though. – Kamil Maciorowski Aug 23 '22 at 20:53