Skip to content

ganlvtech/php-enphp-decoder

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

37 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

EnPHP Decoder

Build Status

EnPHP Decoder written in PHP. Powered by PHP-Parser.

Try it online

Check the link in repository description.

Installation

Get It By Git Clone

You can get the code by git clone. And then install the dependencies by yourserlf with Composer.

git clone https://github.com/ganlvtech/php-enphp-decoder.git
cd php-enphp-decoder
composer install

Download From GitHub Release

You can also download it from GitHub Release.

Download the zip file and unzip them into a folder. All dependencies have been installed.

Usage

Decode by Web UI

cd public/
php -S 127.0.0.1:8000

Visit https://127.0.0.1:8000/ on Browser. You can select a file to upload, and you will download a decoded file.

Deploy to Web Server

Serve by Nginx and php-fpm.

server {
	listen 80;
	# listen 443 ssl;
	root /home/ubuntu/php-enphp-decoder/public;
	index index.php index.html index.htm;
	server_name enphp.ganlvtech.cn;

	location / {
		try_files $uri $uri/ =404;
	}

	location ~ \.php$ {
		fastcgi_pass unix:/run/php/php7.0-fpm.sock;
		include snippets/fastcgi-php.conf;
	}
}

You may need to change port, root, server_name and php version.

Decode One File

php bin/decode.php input.php output.php

Call bin/decode.php decode input.php and save it to output.php.

Decode All Files in A Directory

php bin/decodeRecursive.php dir/

Call bin/decodeRecursive.php decode all php files in dir/ recursively and save it to its original path.

You can use absolute path like /path/to/your/dir/.

CAUTION: This will OVERWRITE all php files! If any error happened with the decoder, your files MAY NOT BE RECOVERED! Please backup your files!

About EnPHP Bugs

See docs/enphp_bugs.md.

License

GNU GENERAL PUBLIC LICENSE Version 3

EnPHP Decoder
Copyright (C) 2019  Ganlv

This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation, either version 3 of the License, or
(at your option) any later version.

This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
GNU General Public License for more details.

You should have received a copy of the GNU General Public License
along with this program.  If not, see <https://www.gnu.org/licenses/>.