Yes i am sorry for my lack of communication in my post.. but yes you are correct. this happends only when the user hits enter (as in submit) then me using the get method the url will encode.. for example
ls /home/xlordt
now.. in the example above the space will turn in to + and the / will encode its self in the url to %2F that is the encoded value that i get once a user enters a backslash .. so see what im tring to do is get the command witch its.. ls and the directory that they want to go to (or view)
just in case here is my script
$dir_name = array('bin'=>array('ls'=>$unix,
'cd'=>$unix,
'pwd'=>$unix, 'rm'=>$unix, 'dir'),
'home'=>array(
'xlordt'=>array('test'),
'users'=>array('boo'),
'test',),
'etc'=>array('passwd','shadow'),);
$shell = "[" .$_USER['username']. "@colledgeunix/$dir_name[$unix]]$ ".$unix;
$pwd = $dir_name['unix'];
$unix = str_replace($dir_name['unix'], $dir_name[$key]['unix'], $unix);
if(array_key_exists($unix, $dir_name["bin"])){
switch($_POST['unix']){
case 'ls':
ksort($dir_name);
$unix = "";
foreach(array_keys($dir_name) as $k){
$unix .= "$k ";
}
break;
case 'cd':
ksort($dir_name[$unix][$pwd]);
$unix = "";
foreach(array_keys($dir_name['unix']) as $k){
$unix .= "$k " ;
}
break;
default:
$unix = "Command not found";
}
}
echo "<center><form method=\"POST\" action=\"$PHP_SELF\">
<table width=\"100%\" height=\"100%\" bgcolor=\"#000000\" >
<tr ><td>
<font color=\"FFFFFF\">$shell <br>$unix</td></tr>
</td></tr><tr><td><br><br><br><Br><br><br><Br><br>
<br><br><br><br><br>
CMD
<input type=\"text\" name=\"unix\" size=\"95\" >
</td></tr>
<tr><td>
<inpyt type=\"hidden\" name=\"pwd\" value=\"$dir_name\">
</td></tr>
</table></form>
";