Last active
December 18, 2015 16:09
-
-
Save ncherro/5809330 to your computer and use it in GitHub Desktop.
script to recursively removed $zend_framework hacks from php files
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
#!/bin/bash | |
# this recursively loops through all files ending in .php, then removes the | |
# zend framework hack code. tested on Ubuntu using sed v 4.2.1 | |
# | |
# best to run this as root so there aren't any permissions issues | |
find . -type f -name "*.php" -print | xargs sed -i.hacked 's/^<?php $zend_framework="\\x63\\162\\x65.*?>//g' | |
# now remove the hacked files | |
find . -type f -name "*.php.hacked" -exec rm -f {} \; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
you can use this to search for hacked files