command for finding phpmailer files and line of code and change it to the latest version
#!/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
This comment has been minimized.
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