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! 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). 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? Link to comment https://forums.phpfreaks.com/topic/266566-running-netcat-with-php/#findComment-1366108 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.