Advertisement
dpeca

PHPMailer patcher through whole /home folder

Dec 26th, 2016
300
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Bash 0.75 KB | None | 0 0
  1. #!/bin/bash
  2.  
  3. mkdir /root/phpmailer
  4. wget https://raw.githubusercontent.com/PHPMailer/PHPMailer/master/class.phpmailer.php -O /root/phpmailer/class.phpmailer.php
  5. wget https://raw.githubusercontent.com/PHPMailer/PHPMailer/master/class.smtp.php -O /root/phpmailer/class.smtp.php
  6.  
  7. grep -rl --include \class.phpmailer.php --include \class-phpmailer.php 'Brent' /home > /root/phpmailer/list-class.phpmailer.txt
  8. grep -rl --include \class.smtp.php --include \class-smtp.php 'Brent' /home > /root/phpmailer/list-class.smtp.txt
  9.  
  10. for i in `cat /root/phpmailer/list-class.phpmailer.txt`; do cp -ar $i $i.bak; cp /root/phpmailer/class.phpmailer.php $i; done
  11. for i in `cat /root/phpmailer/list-class.smtp.txt`; do cp -ar $i $i.bak; cp /root/phpmailer/class.smtp.php $i; done
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement