When dealing with signal interrupt issues, the Ctrl-C SIGINT
would close my ssh session. (I'm sure you've all heard this before, and I'm certainly sick of it too - so I won't bother explaining that further.) In short, I could achieve the desired result by using the SendKeys
function.
Now many people discourage using SendKeys unless it is absolutely necessary. The method is often bashed for security flaws, but the only viable reason I see (but don't fully grasp) was that it could fill the keyboard buffer - which if poorly handled, could lead to undesired system results.
Every other reason was just the generic "It causes security issues. Don't use it." I read that it could significantly help to block both mouse and keyboard interaction during the process, such as using BlockInput.
I feel that undesired system results could result from nearly anything these days. I want to know, specifically, why it is such a "bad practice" to use this approach when programming, and to actually understand these security flaws.