N
N
nvrask2018-04-01 19:42:42
linux
nvrask, 2018-04-01 19:42:42

How to send a response to a request to the linux console from a c++ program?

I execute the command system("nc random_url random_port"). In response to this, I receive a request for a password. How can I answer this request? (I use the cstdlib library)

Answer the question

In order to leave comments, you need to log in

2 answer(s)
A
Antony, 2018-04-01
@nvrask

Alternatively, use popen

R
res2001, 2018-04-01
@res2001

Generate random_port > 1024 and there will be no password prompt.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question