Created
February 2, 2016 11:19
-
-
Save whiolf/bbeb14481358d94ce810 to your computer and use it in GitHub Desktop.
Just a quick shell script to unserialize php. If you don't send the string as an argument, it tries OS X clipboard.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #!/usr/bin/env bash | |
| if [[ $1 ]]; | |
| then | |
| php -r " echo var_dump(unserialize('"$1"')); echo \"\\n\";" | |
| else | |
| STRING=`pbpaste` | |
| php -r " echo var_dump(unserialize('"$STRING"')); echo \"\\n\";" | |
| fi |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment