All Projects → lihancong → Tonyenc

lihancong / Tonyenc

高性能、跨平台的 PHP7 代码加密扩展 (A high performance and cross-platform encrypt extension for PHP source code)

Programming Languages

c
50402 projects - #5 most used programming language

Projects that are alternatives of or similar to Tonyenc

Gem Release
Release your ruby gems with ease.
Stars: ✭ 448 (-21.27%)
Mutual labels:  extension
Vue Perf Devtool
Vue Performance Devtool is a browser extension for inspecting the performance of Vue Components.
Stars: ✭ 510 (-10.37%)
Mutual labels:  extension
Chrome Extension Cli
🚀 The CLI for your next Chrome Extension
Stars: ✭ 536 (-5.8%)
Mutual labels:  extension
Mimetype
A fast golang library for MIME type and file extension detection, based on magic numbers
Stars: ✭ 452 (-20.56%)
Mutual labels:  extension
Metamask Extension
🌐 🔌 The MetaMask browser extension enables browsing Ethereum blockchain enabled websites
Stars: ✭ 6,585 (+1057.29%)
Mutual labels:  extension
Atom Plugins
some awesome atom-plugins !
Stars: ✭ 526 (-7.56%)
Mutual labels:  extension
Upmgitextension
This package extends the UI of Unity Package Manager (UPM) for the packages installed from git repository.
Stars: ✭ 438 (-23.02%)
Mutual labels:  extension
Safari2aria
safari extension for use aria2 to replace safari default download
Stars: ✭ 563 (-1.05%)
Mutual labels:  extension
Stowaway
👻Stowaway -- Multi-hop Proxy Tool for pentesters
Stars: ✭ 500 (-12.13%)
Mutual labels:  encrypt
Pgaudit
PostgreSQL Audit Extension
Stars: ✭ 532 (-6.5%)
Mutual labels:  extension
Hexcolors
HexColors is an extension for UIColor and NSColor to support for creating colors from a hex strings
Stars: ✭ 454 (-20.21%)
Mutual labels:  extension
Yomichan
Japanese pop-up dictionary extension for Chrome and Firefox.
Stars: ✭ 464 (-18.45%)
Mutual labels:  extension
Web Developer
A browser extension that adds various web developer tools to a browser.
Stars: ✭ 532 (-6.5%)
Mutual labels:  extension
Sieve
Sieve Script Editor
Stars: ✭ 452 (-20.56%)
Mutual labels:  extension
Bettertweetdeck
A browser extension to improve TweetDeck with a lot of features
Stars: ✭ 558 (-1.93%)
Mutual labels:  extension
Vscode Es7 Javascript React Snippets
Extension for Javascript/React snippets with search supporting ES7 and babel features
Stars: ✭ 435 (-23.55%)
Mutual labels:  extension
Coyim
coyim - a safe and secure chat client
Stars: ✭ 513 (-9.84%)
Mutual labels:  encrypt
Cp Ddd Framework
A lightweight flexible development framework for complex business architecture with full ecosystem!轻量级业务中台开发框架,中台架构的顶层设计和完整解决方案!
Stars: ✭ 566 (-0.53%)
Mutual labels:  extension
Minerblock
An efficient browser extension to block browser-based cryptocurrency miners all over the web.
Stars: ✭ 563 (-1.05%)
Mutual labels:  extension
Xcodeway
⛵️ An Xcode Source Editor Extension that helps navigating to many places easier
Stars: ✭ 530 (-6.85%)
Mutual labels:  extension

介绍

  • 一个简洁、高性能、跨平台的 PHP7 代码加密扩展,当前版本为 0.2.2
  • 对 PHP7.3 的支持在 dev 分支,还没测试,感谢 @toxmc

特点

  • 简单快速,经实测,几乎不影响性能
  • 兼容 OPcache、Xdebug 等其他扩展
  • 兼容 Linux、macOS、Windows 等系统
  • 兼容 Apache、Nginx + PHP-fpm、命令行等运行模式
  • 加密算法较简单,这是出于速度考虑,但仍不易解密
  • 若项目的 php 文件很多,建议只加密部分重要代码文件
  • 要求 PHP >= 7.0,对 PHP7.3 的支持在 dev 分支,还没测试

加密前记得备份!!!

安装

编译前请在 core.h 中做如下修改:

/* 这里定制你的加密特征头,不限长度,十六进制哦 */
const u_char tonyenc_header[] = {
        0x66, 0x88, 0xff, 0x4f,
        0x68, 0x86, 0x00, 0x56,
        0x11, 0x16, 0x16, 0x18,
};

/* 这里指定密钥,长一些更安全 */
const u_char tonyenc_key[] = {
        0x9f, 0x49, 0x52, 0x00,
        0x58, 0x9f, 0xff, 0x21,
        0x3e, 0xfe, 0xea, 0xfa,
        0xa6, 0x33, 0xf3, 0xc6,
};

在 Linux、macOS 上编译

git clone https://github.com/lihancong/tonyenc.git
cd tonyenc
phpize
./configure
make

将编译好的文件 modules/tonyenc.so 加入到配置项 extension=tonyenc.so,重启 PHP 服务

在 Windows 上编译

已编译了以下模块,可供测试(这里的密钥与源代码中的不同,需要安装有 VC14 运行库):

# php7.0 64位 线程安全版
php_tonyenc_php70_ts_VC14_x64.dll
# php7.0 64位 线程非安全版
php_tonyenc_php70_nts_VC14_x64.dll

手动编译方法见 issues

加密

代码中的 tonyenc.php 是加密工具:

php tonyenc.php example.php dir/

这样即可加密 example.phpdir 目录下的所有 php 文件,PHP 在运行它们时会自动解密,够简单吧!

版权

允许转载、修改、商用

这是我开发的第一个扩展,如有不足欢迎指正 :)

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].