What does this malicious PHP do? [closed] - php

Closed. This question is not reproducible or was caused by typos. It is not currently accepting answers.
This question was caused by a typo or a problem that can no longer be reproduced. While similar questions may be on-topic here, this one was resolved in a way less likely to help future readers.
Closed 8 years ago.
Improve this question
My site was hacked and I found on it the
<?php
echo eval(base64_decode(str_replace('*','a',str_replace('%','B',str_replace('~','F',str_replace('_','z',str_replace('$','x',str_replace('#','d',str_replace('^','3','SOMEVERYLONGTEXT')))))))));
if I decode base64 without executing, I got some script, starting with:
$__authentication_pass = "52b1d005abc139cc281a32d8aa7cd1c2";
$color = "#df5";
$__default__action = 'FilesMan';
$default_use_ajax = true;
$default_charset = 'Windows-1251';
if (!empty($_SERVER['HTTP_USER_AGENT'])) {
$userAgents = array("Google", "Slurp", "MSNBot", "ia_archiver", "Yandex", "Rambler");
if (preg_match('/' . implode('|', $userAgents) . '/i', $_SERVER['HTTP_USER_AGENT'])) {
header('HTTP/1.0 404 Not Found');
exit;
}
}
#ini_set('error_log', NULL);
.... and many lines below ....
I this file manager? Can it be identified somehow (name, author and so on)?

Related

How can I parse markdown inside json [closed]

Closed. This question is not reproducible or was caused by typos. It is not currently accepting answers.
This question was caused by a typo or a problem that can no longer be reproduced. While similar questions may be on-topic here, this one was resolved in a way less likely to help future readers.
Closed 1 year ago.
Improve this question
I have a JSON like below format.
{
"title": "Title",
"content": "Content in **Markdown**"
}
Which could be queried if decoded as $json->title; and $json->content;,
I want to turn the content which is in Markdown to HTML,
I use Parsedown for this work.
<?php
include 'Parsedown.php';
$Parsedown = new Parsedown();
$file = file_get_contents('file.json');
$file = json_decode($file);
$Parsedown->text($file->content);
echo $file->content;
But still things appear not as expected.
If you are still not working then you are still not calling it correctly
$Parsedown = new Parsedown();
$file = file_get_contents('file.json');
$file = json_decode($file);
$file->content = $Parsedown->text($file->content);
echo $file->content;
The RESULT
<p>Content in <strong>Markdown</strong></p>

how to add string to variable in php? [closed]

Closed. This question is not reproducible or was caused by typos. It is not currently accepting answers.
This question was caused by a typo or a problem that can no longer be reproduced. While similar questions may be on-topic here, this one was resolved in a way less likely to help future readers.
Closed 6 years ago.
Improve this question
i just need on small info i want just add '#' to one variable and and put add thing into one variable. i am adding small php code to here please suggest me.
<?php
$email34 = $row['email'];
$rem = '#gmail.com';
$trim_email = str_replace($rem ,'', $email34);
$tag_name ="#".$trim_emial.;
echo $tag_name;
?>
but i am getting only # as output;
but my out should be "#mahesh1" if any have idea about this code please help me. thank you advanced.
there is so much spelling mistakes in the variables... try below given code
<?php $email34 = $row['email'];
$rem = '#gmail.com';
$trim_email = str_replace($rem ,'', $email34);
$tag_name ="#".$trim_email;
echo $tag_name;
?>

PHP String Replace for BBCode [closed]

Closed. This question is not reproducible or was caused by typos. It is not currently accepting answers.
This question was caused by a typo or a problem that can no longer be reproduced. While similar questions may be on-topic here, this one was resolved in a way less likely to help future readers.
Closed 7 years ago.
Improve this question
I want to make a custom BBCode for my forum site, but I've run into an issue, and I'm having a hard time fixing it.
This is what's in the database for the body of the thread "[b]Bold[/b][i]Italic[/i][strike]Strike[/strike]".
However the output is displayed like this "[i]Italic[/i][strike]Strike[/strike]".
So, I'm guessing it's an issue with echoing it out, but i'm not sure how to fix it. Here's the current code:
function bbcode($input) {
$input = strip_tags($input);
$input = htmlentities($input);
$search = array('/\[b\](.*?)\[\/b\]/is');
$replace = array('<b>$body</b>');
return preg_replace($search, $preg_replace, $input);
}
while($row = mysql_fetch_array($threadquery, MYSQL_ASSOC)) {
$body = str_replace("\n",'<br>', $row['body']);
}
echo bbcode($body);
proper code should be:
$replace = array('<b>$1</b>');
return preg_replace($search, $replace, $input);

file_get_contents don't work [closed]

Closed. This question is not reproducible or was caused by typos. It is not currently accepting answers.
This question was caused by a typo or a problem that can no longer be reproduced. While similar questions may be on-topic here, this one was resolved in a way less likely to help future readers.
Closed 8 years ago.
Improve this question
I've written a small code that get $_GET["page"] and if this exists, write the page $_GET["page"] . ".html" into a div (with echo). If this not exists, the page is "about.html". The problem is that and I've searched but I don't find the solution...
Fatal error: Function name must be a string in index.php on line 63.
If i go into a page that don't exists (for exampleindex.php?page=test) work (print "NOT FOUND") but if I go into a page that exists (for example index.php?page=about or simply index.php) don't work.
This is the code:
$page = "about";
if (isset($_GET["page"]))
if (!empty($_GET["page"]))
$page = $_GET["page"];
$page .= ".html";
$result = "NOT FOUND";
if (file_exists($page))
$result = $file_get_contents($page); //line 63
echo $result;
file_get_contents() not $file_get_contents()

Comparison Operators 'equal' is not working [closed]

Closed. This question is not reproducible or was caused by typos. It is not currently accepting answers.
This question was caused by a typo or a problem that can no longer be reproduced. While similar questions may be on-topic here, this one was resolved in a way less likely to help future readers.
Closed 8 years ago.
Improve this question
I am validating a condition for
$time = $user['time_send'];
$chk_date = date('Y-m-d H:i');
var_dump($time == $chk_date);
But I am getting bool(false) as output.
$time = '2014-03-7 15:14';
$chk_date = '2014-03-07 15:14';
if(strtotime($time) == strtotime($chk_date)){
echo 'hola';
}else{
echo 'hello';
}

Categories