You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
PHP Obfuscator is a command-line tool to obfuscate PHP source code files using YAK Pro - Php Obfuscator and PHP-Parser. The tool aims to protect the intellectual property of your PHP project by making it more difficult for others to understand or reverse-engineer your code. The tool can be used to obfuscate single files, multiple files, or an entire project directory.
// User comment to insert inside each obfuscated file
56
+
$conf->user_comment = false;
57
+
```
58
+
59
+
4. Install PHP-Parser
60
+
61
+
You need to install this in to the **yakpro-po** directory in to the project directory **_php-obfuscator > yakpro-po_**
62
+
63
+
```
64
+
git clone https://github.com/nikic/PHP-Parser.git
65
+
```
66
+
5. Install the required Python packages
67
+
68
+
**From the project directory, you need to run this command:**
69
+
70
+
```
71
+
pip install -r requirements.txt
72
+
```
73
+
74
+
## Usage
75
+
76
+
1. Ensure you are in the project directory.
77
+
2. Run the script
78
+
79
+
```
80
+
python main.py
81
+
```
82
+
83
+
or
84
+
85
+
```
86
+
bash start.sh
87
+
```
88
+
89
+
**Note:** Don't forget to change the path to the script in to the `start.sh` bash file.
90
+
91
+
3. Follow the prompts to configure the obfuscation settings, including:
92
+
- Mode (single file, multiple files, or entire project directory)
93
+
- Output directory path
94
+
- File or directory paths to exclude
95
+
- Whether to create backups of original PHP files
96
+
97
+
4. After the obfuscation process is completed, you can find the obfuscated files in the specified output directory.
98
+
99
+
## Used Libraries
100
+
101
+
### Python
102
+
103
+
-**os**, **sys**, **shutil**, and **re** - standard Python libraries for working with the file system and regular expressions
104
+
-**logging** - standard Python library for logging
105
+
-**concurrent.futures** - standard Python library for parallel processing
106
+
-**tqdm** - external library for progress bars
107
+
108
+
### PHP
109
+
110
+
-[YAK Pro - a PHP library for obfuscating PHP code](https://github.com/pk-fr/yakpro-po)
111
+
-[PHP-Parser - a PHP library to parse and traverse PHP code](https://github.com/nikic/PHP-Parser/tree/4.x/)
112
+
113
+
## Troubleshooting
114
+
115
+
If you encounter issues after obfuscating your PHP project, you may need to revert your files to the original (non-obfuscated) versions and reevaluate your obfuscation strategy. Always keep backups of your original code before applying obfuscation, as it can be difficult or impossible to reverse the process and recover the original code.
0 commit comments