nc963y Posted January 31, 2012 Share Posted January 31, 2012 OK so I am working on a default response command prompt that will display X:\XOS(root)>user entered text 'user entered text' is not recognized as an internal or external command, operable program or batch file. However so far when i do this it distorts the response. See pictures. <?php function stripslashes_deep($value) { $value = is_array($value) ? array_map('stripslashes_deep', $value) : stripslashes($value); return $value; } if (get_magic_quotes_gpc()) { $_GET = stripslashes_deep($_GET); } if (!isset($_GET['idx'])) { $idx = 115; $text = "XOS [Version 0.2.13]\n"; $text .= "Copyright (c) 2012 RedLine Services, LLC. All rights reserved.\n"; } else { $idx = $_GET['idx'] + 3; $input = $_GET['text']; $text = substr($input, 0, $idx); $user_input = substr($input, $idx); $text .= "\n '$user_input' is not recognized as an internal or external command,\noperable program or batch file.\n"; } $text .= "\n"; $text .= "X:\XOS(root)>"; $idx = strlen($text); //echo strlen($text); //$fn = "text.txt"; //$file = fopen($fn, "a"); //fwrite($file, "$msg2"); //fclose($file); ?> <html> <style> body{ background-color:#000000;color:#ffffff } textarea { background-color:#000000; color:#ffffff; width:100%; height:400px; } </style> <body> <form method="GET"> <textarea name="text"><?php echo $text; ?></textarea> <input type="text" name="idx" value=""> <button type="submit" name="submit">Submit</button> </form> </body> </html> Quote Link to comment https://forums.phpfreaks.com/topic/256089-command-prompt-fake-response/ Share on other sites More sharing options...
nc963y Posted January 31, 2012 Author Share Posted January 31, 2012 rls-hosting.com Quote Link to comment https://forums.phpfreaks.com/topic/256089-command-prompt-fake-response/#findComment-1312824 Share on other sites More sharing options...
nc963y Posted January 31, 2012 Author Share Posted January 31, 2012 No luck getting this to work, any thoughts? Quote Link to comment https://forums.phpfreaks.com/topic/256089-command-prompt-fake-response/#findComment-1313083 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.