Skip to content

Instantly share code, notes, and snippets.

@cauethenorio
Created January 29, 2016 11:10
Show Gist options
  • Save cauethenorio/582aa14e4f7b2af61f02 to your computer and use it in GitHub Desktop.
Save cauethenorio/582aa14e4f7b2af61f02 to your computer and use it in GitHub Desktop.
recusively remove back door malicious code from infected php files
# Remove linha com codigo malicioso de arquivos php hackeados (sed para linux)
find . -name "*.php" -exec sed -i '1s/^<?php if(!isset(\$GLOBALS\["\\x61\\156\\x75\\156\\x61.*-1; ?>//' {} \;
# Remove linha com codigo malicioso de arquivos php hackeados (sed para mac)
find . -name "*.php" -exec sed -i '1s/^<\?php if(!isset(\$GLOBALS\["\\\x61\\\156\\\x75\\\156\\\x61.*-1; \?>//' {} \;
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment