ctrlaltcasper Posted August 1, 2012 Share Posted August 1, 2012 I'm trying to execute netcat using PHP. I've been stuck in this for hours, tried many different combination such as passthru, exec, system, and shell_exec. I searched Google but no luck so far. I'm just testing to see if I can do anything with netcat sush as tranfering files and reverse shell. I'm able to execute other commands such as ping, ls, whoami, etc. but not netcat. This is what I have so far: exec ('nc ip port < file'); I have shell listening for connections but nothing happens. Any help would be really appreciated, thanks in advance! Quote Link to comment https://forums.phpfreaks.com/topic/266566-running-netcat-with-php/ Share on other sites More sharing options...
requinix Posted August 1, 2012 Share Posted August 1, 2012 Check for errors with nc ip port &1 Make sure you're capturing the output (which you aren't doing right now). Quote Link to comment https://forums.phpfreaks.com/topic/266566-running-netcat-with-php/#findComment-1366107 Share on other sites More sharing options...
Christian F. Posted August 1, 2012 Share Posted August 1, 2012 Why use netcat, instead of the existing PHP libraries? Quote Link to comment https://forums.phpfreaks.com/topic/266566-running-netcat-with-php/#findComment-1366108 Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.