定制 smhtet/laravel-obfuscator 二次开发

按需修改功能、优化性能、对接业务系统,提供一站式技术支持

邮箱:yvsm@zunyunkeji.com | QQ:316430983 | 微信:yvsm316

smhtet/laravel-obfuscator

最新稳定版本:v1.0.0

Composer 安装命令:

composer require smhtet/laravel-obfuscator

包简介

Reversible identifier obfuscation for Laravel projects (obfuscate locally, deobfuscate on trusted server with same key).

README 文档

README

This package provides reversible PHP identifier obfuscation for Laravel projects.

Scope (what it actually obfuscates)

  • Local variable names everywhere.
  • Private members (methods/properties) and their self/static/parent and $this->... references.
  • With --aggressive, protected members too.

It does not rename public APIs/classes/interfaces/traits, because Laravel (container bindings, reflection, route/model conventions) will break.

Install (into a Laravel app)

Add it as a path repository (for local dev in this mono-repo):

{
  "repositories": [
    {
      "type": "path",
      "url": "../laravel-obfuscator"
    }
  ],
  "require": {
    "Php/laravel-obfuscator": "*"
  }
}

Then:

composer update Php/laravel-obfuscator

Laravel auto-discovers the service provider. If you have discovery disabled, register: Php\LaravelObfuscator\LaravelObfuscatorServiceProvider.

Use (Artisan)

Obfuscate (writes .php_obfuscation_key_hash):

php artisan code:obfuscate "YOUR_KEY" --path=app

Deobfuscate:

php artisan code:deobfuscate "YOUR_KEY" --path=app

Options

  • --dry-run: show which files would be processed.
  • --aggressive: also rename protected members (higher risk).
  • --path=... repeatable: scan multiple directories.
  • --include-vendor: off by default. Do not enable unless you know exactly what you're doing.

Use (vendor/bin CLI, no Laravel boot)

vendor/bin/php-obfuscate obfuscate "YOUR_KEY" --root=/path/to/project --path=app --path=routes
vendor/bin/php-obfuscate deobfuscate "YOUR_KEY" --root=/path/to/project --path=app --path=routes

php-obfuscator

统计信息

  • 总下载量: 2
  • 月度下载量: 0
  • 日度下载量: 0
  • 收藏数: 0
  • 点击次数: 5
  • 依赖项目数: 0
  • 推荐数: 0

GitHub 信息

  • Stars: 0
  • Watchers: 0
  • Forks: 0
  • 开发语言: PHP

其他信息

  • 授权协议: MIT
  • 更新时间: 2026-03-23

承接程序开发

PHP开发

VUE

Vue开发

前端开发

小程序开发

公众号开发

系统定制

数据库设计

云部署

网站建设

安全加固