PHP Encoder, protect PHP scripts in PHP 8 and PHP 7, High Performance, Compitable with X86_64, MIPS, ARM platform and Ubuntu/Centos/OpenWRT system.

Overview

What's FRICC2?

FRICC2 is a PHP Script encryption tool. When you are developing a commercial software using PHP, the script can be distributed as encrypted up until just before execution. Thanks for PHP-Screw.

中文版说明

Features

  1. Less file handle open or read.
  2. Compress supported, small size of target files.
  3. Fix serval memory Leak.
  4. More performance when php open files.
  5. Supported Bundle in PHP with static.
  6. Tested on Ubuntu / CentOS / Openwrt.
  7. Tested in x86_64 / MIPS / ARM Processors.
  8. Supported PHP 8(include JIT), Tested Memory Leak.
  9. Supported Sandbox Mode(uncomment in fricc2_lib.h to enable it), only encrypted source can be run.

Requirement

PHP Version

PHP Version Status Notice
PHP 8.X Static / Shared Recommend
PHP 7.4.X Static / Shared Recommend
PHP 7.0.X / 7.3.X Static / Shared Runtime Little Memory Leak (auto free when php exit)
Other Version NO TEST NO TEST

ZLIB Support in PHP

PHP must be compiled with the "--with-zlib" option.

Installation

Get Source

# git clone source
cd ~/
git clone https://github.com/hoowa/FRICC2.git

# optional init key (Set Better Secure different)
chmod +x ~/FRICC2/fricc2load/init_key
~/FRICC2/fricc2load/init_key

# optional enable sandbox mode to edit fricc2_lib.h
# uncomment FRICCSANDBOX_ENABLE

# Requirement Example CentOS 7.9
yum groupinstall "Development Tools"
yum install zlib-static zlib-devel

# Requirement Example Ubuntu 20.04
sudo apt install build-essential pkg-config autoconf zlib1g-dev

Build PHP Extension (Shared)

# Compile fricc2load
cd ~/FRICC2/fricc2load/
phpize
./configure
make
make install

# Append this line to php.ini
extension=fricc2load.so

# Test in CLI
php -m|grep fricc2load

# Restart the web server / your php daemon as you need

Build Encode Program

# Compile Encode Program
cd ~/FRICC2/fricc2/
make
cp fricc2 /usr/bin/

# Test Create test.php
<?php
	echo "hello fricc2\n";
?>
fricc2 -o test_new.php test.php
php ./test_new.php
# Screen output:
hello fricc2

Others

Optional Build PHP Extension (Static)

# example of your php source in ~/php-7.4.22/
cd ~/php-7.4.22
cp -avf ~/FRICC2/fricc2load/ ./ext/
./buildconf --force

# append --enable-fricc2load=static --with-zlib to configure (example):
./configure --enable-fricc2load=static --with-zlib
make
make install

# check modules
php -m|grep fricc2load

Author

Sun Bing [email protected]

You might also like...
Deepin Wine for Ubuntu/Debian
Deepin Wine for Ubuntu/Debian

Deepin wine for Ubuntu and Debian 一、项目介绍 Deepin-wine 环境的 Ubuntu/Debian 移植版 使用deepin原版二进制文件,解决依赖问题 仅供个人研究学习使用 刚刚适配debian,可能在安装或运行上还存在问题,欢迎反馈! Gitee用户遇到

A graphical application to enhance user experience with Ubuntu on WSL during the distro installation process.

Ubuntu WSL Splash TODO: Place a CI badge here. TODO: Put a nice screenshot here when we get one. A graphical application to enhance user experience wi

Yet another matrix client. Click packaging for locally running on Ubuntu Touch

Cinny Click Packaging Cinny is a Matrix client focusing primarily on simple, elegant and secure interface. License Cinny source package licensed under

An x86_64 operating system
An x86_64 operating system

Vigil Vigil is a x86_64 operating system. Features Booted by Limine using the stivale2 protocol Physical memory manager Virtual memory manager "Slab"

[redacted]os - a hobbyist x86_64 operating system kernel.

[redacted]os NOTE: This kernel is still in early stages of development - check back after a few months to see a potentially usable OS. It lacks proper

An eventing framework for building high performance and high scalability systems in C.

NOTE: THIS PROJECT HAS BEEN DEPRECATED AND IS NO LONGER ACTIVELY MAINTAINED As of 2019-03-08, this project will no longer be maintained and will be ar

An experimental operating system for x86 and ARM
An experimental operating system for x86 and ARM

Odyssey - an experimental operating system for x86 and ARM

A high performance, shared memory, lock free, cross platform, single file, no dependencies, C++11 key-value store
A high performance, shared memory, lock free, cross platform, single file, no dependencies, C++11 key-value store

SimDB A high performance, shared memory, lock free, cross platform, single file, no dependencies, C++11 key-value store. SimDB is part of LAVA (Live A

An x86_64 hobbyist OS written in C and Assembly
An x86_64 hobbyist OS written in C and Assembly

KnutOS An x86_64 hobbyist OS made for FUN and LEARNING! It is written in C and Assembly and features a monolithic kernel. Screenshots Features Limine

Comments
  • phar package encryption error cannot be executed

    phar package encryption error cannot be executed

    image

    I hope the author can support the encryption of phar packages. I'm using hyperf framework and I haven't been able to find an encryption protection scheme.

    I implore the author to consider helping.

    Thank you very much.

    opened by etjson 9
  • hoowa您好,有几点问题!

    hoowa您好,有几点问题!

    hoowa您好,有几点问题,希望抽空解答,谢谢! 1、多个PHP版本扩展的编译,要分别编译吗?比如我当前在php7.4下 ,编译成功了load.so文件,如果我想再编译一份其他版本的,还需要重新从头执行一次?或者有其他方法? 2、能否支持文件夹加密,即将目标文件夹内的所有文件批量加密? 3、怎样修改hellokitty?如果可以而且不影响版权的情况下! 4、能否在加密的时候生成指定的注释内容? 感谢

    opened by ScriptElite 4
  • fix: adjust warning ‘strstr’ from incompatible pointer type.

    fix: adjust warning ‘strstr’ from incompatible pointer type.

    Hello, I was compiling the extension for PHP 8.0 and the compiler was returning some warnings like below.

    /home/marcosmarcolin/PhpstormProjects/GitHub/marcosmarcolin-fricc2load/fricc2load/fricc2load.c:88:108: warning: passing argument 1 of ‘strstr’ from incompatible pointer type [-Wincompatible-pointer-types] 88 | if (!file_handle || !file_handle->filename || strstr(file_handle->filename, ".phar") || strstr(file_handle->filename, "phar://")) | ~~~~~~~~~~~^~~~~~~~~~ | | | zend_string * {aka struct _zend_string *}

    With that, I added a validation according to PHP 8.0.x changes, did some testing and it worked correctly.

    So I submitted a PR for review.

    opened by marcosmarcolin 1
  • fix: adjust warning result of not using fread() return for fricc2

    fix: adjust warning result of not using fread() return for fricc2

    Hello,

    I was compiling the extension for PHP 8.2 and it was generating a warning when using fread and not using its return.

    fricc2.c:45:10: warning: ignoring return value of ‘fread’, declared with attribute warn_unused_result [-Wunused-result] 45 | (void)fread(src_data_buf, src_data_len, 1, fp); | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

    I just made an adjustment to silence it.

    opened by marcosmarcolin 0
Owner
Hoowa Sun
Nothing
Hoowa Sun
conversion from absolute encoder and incremental encoder, control two robotis dynamixel motors, testing qserialport library in qt

Q_dxl This example is created for testing: Serial connection Testing two dynamixel motors (eg. MX-28AT) Doing the conversion from absolute encoder (of

ibov 1 Oct 30, 2021
OpenWrt Packages

NueXini_Packages 1.如何使用NueXini_Packages? / How to use NueXini_Packages? cd lede sed -i '$a src-git NueXini_Packages https://github.com/NueXini/NueXini

null 194 Jan 2, 2023
Hobbyist Operating System targeting x86_64 systems. Includes userspace, Virtual File System, An InitFS (tarfs), Lua port, easy porting, a decent LibC and LibM, and a shell that supports: piping, file redirection, and more.

SynnixOS Epic Hobby OS targeting x86_64 CPUs, it includes some hacked together functionality for most essential OSs although, with interactivity via Q

RaidTheWeb 42 Oct 28, 2022
Classified is an easy and handy encryptor and and decryptor which is can protect your file.

CLASSIFIED Classified is an encrypted and a decrypter. It can encrypt anykind of file with any extension. It is very secure. The thing only matters is

Shreejan Dolai 3 Feb 13, 2022
A Discord Bot to protect your server from spam, invitations, fake nitro ads and more written in C++

Antispambot An efficient Discord Bot to prevent spam written in C++. Tested on a large discord server and mitigates around 90% spam. Its well commente

Phil 9 Nov 5, 2022
dex-vm implementation, used to protect the classes.dex file

nmmp 基于dex-vm运行dalvik字节码从而对dex进行保护,增加反编译难度。 项目分为两部分nmm-protect是纯java项目,对dex进行转换,把dex里方法及各种数据转为c结构体,处理apk生成c项目,编译生成so,输出处理后的apk。nmmvm是一个安卓项目,包含dex-vm实现

mao 362 Jan 7, 2023
Protect your Discord token from malicious grabbers!

Discord Token Protector Protect your Discord token from malicious grabbers! This project is still under development! You might face some unstability i

Andro24 198 Jan 2, 2023
Protect files under a specific folder from deleting or moving by explorer.exe.

Explorer-Delete-Protection Protect files under a specific folder from deleting or moving by explorer.exe. Requierments: Microsoft Detours Library - ht

null 6 Nov 14, 2022
It's a simple and free x86_64 architecture operating system created by one person, GoofOS started since 2022

This project is while developing... GoofOS GoofOS is a text operating system for x86 computers. About This is a 32 bit x86_64 graphical operating syst

null 3 May 1, 2022
Make your Pop!_OS (Ubuntu Linux) shortcut key experience more like Mac OS

Meta Mac Enables a Mac OS-like shortcut key experience on Pop!_OS (and most Ubuntu-based Linux distros). Installation Download or git clone this repos

Duane Johnson 14 Dec 31, 2022