Bash - Find all files using eval(base64_decode and delete them

# show in context grep -rnw . -e 'base64_decode' # show filename only grep -rnwl . -e 'eval' # show files with term in the name grep -rnwl . -e 'eval(base64_decode' | grep .INFECTED # add bad files to an array infected=($(grep -rnwl . -e 'eval(base64_decode' | grep .INFECTED)) # output the file list for file in "${infected[@]}"; do echo $file; done; # delete all files in list for file in "${infected[@]}"; do rm $file; done;

Be the first to comment

You can use [html][/html], [css][/css], [php][/php] and more to embed the code. Urls are automatically hyperlinked. Line breaks and paragraphs are automatically generated.