Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

Awesome Lists | Featured Topics | Projects

https://github.com/splitline/PHPFuck

PHPFuck: ([+.^]) / Using only 7 different characters to write and execute php.
https://github.com/splitline/PHPFuck

obfuscator php phpfuck

Last synced: about 2 months ago
JSON representation

PHPFuck: ([+.^]) / Using only 7 different characters to write and execute php.

Awesome Lists containing this project

README

        

# PHPFuck: ([+.^])
Using only 7 different characters to write and execute php.

Only support PHP 7+ currently.

## Example Code
The following source will execute `phpinfo();`:

```php

```

## Usage

```
usage: phpfuck.py [-h] [-O FILE] [-P] [-E {assert,create_function}] code

positional arguments:
code any string to encode.

optional arguments:
-h, --help show this help message and exit
-O FILE, --output-file FILE
write encoded string into some file.
-P, --plain-string encode as plain string (without eval it).
-E {assert,create_function}, --eval {assert,create_function}
choose eval mode. (`assert` mode only support PHP < 7.1)
```

You can just use it like this: `python3 phpfuck.py "system('id');"`

### Arguments
- code (required)
- Any string or php code to encode.
- -O, --output-file
- Write encoded string into some file.
- -P, --plain-string
- Encode as plain string (without eval it).
- With this argument, I will not wrap your code into `assert` or `create_function` to eval.
- -E, --eval
- You can choose your eval mode!
- `create_function` mode (default)
- `create_function('', YOUR_CODE)();`
- `assert` mode
- Only support PHP < 7.1 (=7.0.x).
- `assert( '(function(){ YOUR_CODE; return 1; })()' );`

## TODO
- [x] Support characters other than ASCII range.
- [ ] Don't use deprecated feature. (`create_function` has been DEPRECATED)
- [x] Web interface. (https://splitline.github.io/PHPFuck/)
- [ ] Compatible with PHP 8
- Maybe string mode only, since the `create_function` has been removed from PHP 8 :(