encoder with the /go/encoder Command

/go/encoder replaces the contents of .php and .inc files with an encrypted blob and a small loader, so the original source is no longer readable on disk. The files still run normally, because GoAdmio's decoder.so extension decrypts them at request time (PHP 8 or higher). This is meant for distributing PHP code without exposing its source, not as a security boundary: anyone who can run PHP on the server can still make it echo its own decoded source. The call is appended to /var/log/go/encoder.log. Every admin action in GoAdmio has a matching /go/ command, so anything you can click you can also script.

Quick start

# Encode one account's www folder, after backing up the source elsewhere
/go/encoder example.com

Options

Argument Required Notes
<domain> or <path> Yes A hosted domain, all, or any file or folder path on the server.
<skip> No A plain substring matched against each file’s full path, not a glob or regex. Slashes are escaped automatically. Comma-separate several patterns.

Examples

# One account
/go/encoder example.com

# One file
/go/encoder /home/example.com/www/config.php

# Every account on the server
/go/encoder all

# One account, leaving out the uploads folder
/go/encoder example.com /home/example.com/www/wp-content/uploads

# One account, leaving out two folders
/go/encoder example.com "wp-content/uploads,vendor"

# Mark a file to never be encoded
echo "// skip encoder" >> /home/example.com/www/license.php

Output

Encoder: /home/example.com/www
[1/42] Encoding /home/example.com/www/config.php...
[2/42] Encoding /home/example.com/www/index.php...
Error: <?php not closed in file /home/example.com/www/broken.php

Message Meaning
Domain name does not exist No arguments were given. The command does not stop here (see Troubleshooting).
<value> does not exist The path or domain couldn’t be found. The command stops.
[n/total] Encoding <file>... That file was encoded.
Error: <?php not closed in file <file> The file’s <?php and ?> tag counts don’t match. Left unchanged.

A file is skipped with no message when it already contains decoder::Code (already encoded), contains the text skip encoder, matches a <skip> pattern, or has no <?php tag at all.

See the full reference at /go/encoder and the GoAdmio command index.

GoAdmio is free and open source, with no license fees and no account limits. Read the GoAdmio docs, or see why it is a free cPanel alternative at goadmio.com.

By:

Posted in:


Leave a Reply

Your email address will not be published. Required fields are marked *