Jump to content

Command Prompt fake response


nc963y

Recommended Posts

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>

post-131327-13482403202153_thumb.png

post-131327-13482403202472_thumb.png

post-131327-1348240320268_thumb.png

Link to comment
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.