Answer the question
In order to leave comments, you need to log in
What can I do if I can write any php code to someone else's server and execute it?
This code writes any file to the server. I can easily do it.
What is the best way to take advantage of the situation?
Connect to mysql database for example, if it is without a password or admin admin.
I don’t know Php and its features, and I rarely use sql databases. That's why I'm asking.
Interested in all the possible actions that I can take.
$name = uniqid();
$name .= ".php";
file_put_contents($name, base64_decode($_POST['data']));
echo json_encode(array("src" => $name));
Answer the question
In order to leave comments, you need to log in
It all depends on what the task is.
It's elementary, if you can execute the script, and if you have access to the database, you can get all the necessary data from the same database.
From simply accessing a server on which there is no valuable information - there is no point.
Or, if a site with good traffic is spinning on this server, then you can set hidden links to your resources, etc.
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question