This forum uses cookies
This forum makes use of cookies to store your login information if you are registered, and your last visit if you are not. Cookies are small text documents stored on your computer; the cookies set by this forum can only be used on this website and pose no security risk. Cookies on this forum also track the specific topics you have read and when you last read them. Please confirm whether you accept or reject these cookies being set.

A cookie will be stored in your browser regardless of choice to prevent you being asked this question again. You will be able to change your cookie settings at any time using the link in the footer.

How to stop hide php command
#7
RE: How to stop hide php command
i am working on windows XP . i can successfully run a system() command through my browser by calling a TCL script that automates a ssh session. I also return a value from the script. however my problem is that the script dumps the entire ssh session in the browser.

my php script looks like :

$lastline=system('"C:\tcl\bin\tclsh.exe" \path to file\filename.tcl '.$username.' '.$pass,$val);

filename.tcl:

spawn plink -ssh $user@$host
expect "assword:"
send "$pass\r"
expect "\prompt:/->"
set $return_value [string compare /..string../ $expect_out(buffer)]
/...some code...this runs fine/
exit $return_value

everything runs fine and i get $return_value back correctly but the php file prints the result of the execution of the entire ssh session in my browser which looks like:

Using username "admin". admin@10.135.25.150's password: === /*some text*/ === \prompt:/->.../some text/

i want to prevent the system() function from printing this in my browser
i have used the shell_exec() function but it returns the entire ssh session result (which i have parsed in the tcl script and got a precise value to return to the php script) is there a way i can do this without using shell_exec() but using system() instead

thanks in advance
Reply
Thanks given by:


Messages In This Thread
How to stop hide php command - by varun.naharia - 06-13-2017, 03:08 AM
RE: How to stop hide php command - by TGates - 06-17-2017, 10:37 PM
RE: How to stop hide php command - by jennie - 08-20-2017, 09:04 PM
RE: How to stop hide php command - by Me.B - 08-22-2017, 11:14 PM
RE: How to stop hide php command - by Thewarofdestiny - 03-07-2019, 12:08 AM
RE: How to stop hide php command - by andykimpe - 07-08-2020, 09:01 PM

Possibly Related Threads…
Thread Author Replies Views Last Post
[split] How to stop hide php command trucdev88 4 11 ,340 12-09-2020, 08:38 AM
Last Post: ccr1969

Forum Jump:


Users browsing this thread: 1 Guest(s)