Hello anyone know how encode a script like this? <?php
$_obfuscatedFF66756E6374696F6E = function ($f, $d) {
$lines = @file($f);
$c = @count($lines) - 2;
$lines[$c] = @strtok($lines[$c], "\");
$head = (int) @base64_decode(@strtok(@end($lines), "\")) - 161803;
$code = @join("", @array_slice($lines, $head, -1));
$code = @openssl_decrypt($code, "AES-128-CBC", "ioncube is so easy to decode these days...", false, "1!2@3#4$5%6^7&8*");
$idx = @base64decode(@strtok("\"));
if (!defined("__FILE" . $idx . "")) {
define("FILE" . $idx . "", $f);
define("DIR" . $idx . "",
retur
retur

?>

Recommended Answers

All 6 Replies

That looks coded to me. Can you explain further what your goal here is? I would be guessing you were trying to ask about encrypting and hiding PHP code but picked the wrong word. If that was your question then why didn't prior discussions work for you?

commented: I want to know how i can encode a file like that +0

You're going to have to explain yourself. You have coded the above and so that's done. What more is to be done?

commented: I got that from internet and i want to know how i can encode like that +0

You already have code so that's done. Maybe you meant to ask how to encrypt a file but didn't know the word until now. I will not guess what you want. Even if the question was how to encrypt a file, the code appears to do that.

-> Write clearly what your questions are.

Remember, you have the code above so I take it you read PHP docs and discovered https://www.php.net/manual/en/function.base64-encode.php

commented: I want to know can encode php files +0

Here's that google for you. The problem of encrypting PHP files is your host might not know how to use them.
https://www.google.com/search?q=encrypt+php+source+code

Again, your question is not clear. I will not guess what you want. You have to explain it or my guess will be a bad guess.

If you want to learn how to program in PHP (which I think is what you really mean), then you would want to find a good book or tutorial on the topic. It isn't really something you can just pick up, even if you are familiar with other programming languages.

I am by no means an expert in PHP, but I would recommend as a starting point the book Learning PHP, MySQL & JavaScript: A Step-by-Step Guide to Creating Dynamic Websites by Robin Nixon. There are also several free online tutorials on the topic, but I don't know personally which ones are worth your trouble.

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.