#!/bin/bash # # GoDaddy is offering to fix the ImageMagick # vulnerability for the totally reasonable price # of $79. Here's everything they would do in # 1 line that you can just paste into your terminal. # It’s $0 because it took 15 minutes on a phone. # # P.s. If a complete stranger cares more about your # website's security that your hosting provider, you # might want to find a better one. for d in `find / -type d -name "ImageMagick*"`; do if [ -f $d/policy.xml ]; then mv $d/policy.xml $d/policy.backup.xml; cat $d/policy.backup.xml | sed -s 's//<\/policy> <\/policy> <\/policy> <\/policy> <\/policy> <\/policy> <\/policy> <\/policy> <\/policy>/g' >> $d/policy.xml; fi; done