[HELP] Decode \\x61s\\

I need to know how to decode it :frowning:

<?php 
echo "\\x61s\\144as\\x61s\\x64";
?>

This is what was encoded:

<?php 
echo "asdasasd";
?>

\x61 - would be hexadecimal value 61 which in ascii is the character ‘a’.
Similarly \x64 is the hexadecimal value for the letter ‘d’.

I have no idea where the \144 comes in. From what you have showing it also corresponds to ‘d’ and presumably since it doesn’t have the x in front it is decimal rather than hexadecimal but since it is over 127 it is outside the standard ascii characters and so the value it actually represents would depend on which characterset is being used.

\144 is the PCRE octal escape for “d”

need to know why it not works … :frowning: it works only on localhost :frowning:

<html>
<body>

<form action="index.php" method="post">
Code: <input type="text" name="code" />
<input type="submit" />
</form>

</body>
</html>
<?php
echo	printf("&#37;s" ,$_POST["code"]);
?>

and

<form method="post" enctype="multipart/form-data">
<textarea style="width:640;height:200" name="tobase"><?= stripslashes($_POST['tobase']) ?></textarea>
  <br><br>  <input name="base64" type="submit" id="button" value="Decode" />
</div>
</form>
</div>
<?php

if(isset($_POST['base64']))
{
	$result=$_POST['tobase'];

$content = highlight_string(stripcslashes(($result)));
echo $content 
}
?>

not works :frowning:

Hi scriptzteam, welcome to the forums,

I’m confused.

If you know what it was before it was encoded, why do you need to decode it?

If you know how to encode it, can’t you just “reverse” the process to decode it back?

I should have realised that 144 is the octal value for ascii ‘d’ but it is a while since I last used any octal values.