-
-
Save tibu/9b43b4cf4dd8d4f80c962f2a4603d266 to your computer and use it in GitHub Desktop.
command for finding phpmailer files and line of code and change it to the latest version
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 | |
wget https://raw.githubusercontent.com/PHPMailer/PHPMailer/master/class.phpmailer.php | |
for file in $(find /var/www/ -name 'class.phpmailer.php' -print) ; do | |
echo $file | |
cp $file $file.bak | |
cp ./class.phpmailer.php $file | |
# dir=$(dirname $file) | |
# chown $(stat -c '%U' $dir):$(stat -c '%G' $dir) $file | |
done |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
https://isc.sans.edu/forums/diary/Critical+security+update+PHPMailer+5218+CVE201610033/21855/ finds also really old versions, e.g. 2.0.4. and change