snipt

Ctrl+h for KB shortcuts

Bash

timthumb.php find and replace (mt) Media Temple (gs) Grid-Service

cd ~/data/tmp; wget -O timthumb.php http://timthumb.googlecode.com/svn/trunk/timthumb.php && chmod 644 timthumb.php && find ~/domains/ -maxdepth 10 \( -name "timthumb.php" -o -name "thumb.php" \) -exec cp {} {}.bak \; -exec cp timthumb.php {} \; find ~/domains/ -name "*thumb.php" -type f -print -exec egrep "'VERSION'|\"VERSION\"" '{}' \;
https://snipt.net/embed/99e0e9c80a5363674b18d59a3984530e/
/raw/99e0e9c80a5363674b18d59a3984530e/
99e0e9c80a5363674b18d59a3984530e
bash
Bash
1
2019-06-04T09:43:42
True
False
False
/api/public/snipt/33746/
timthumbphp-find-and-replace
<table class="highlighttable"><tr><td class="linenos"><div class="linenodiv"><pre><a href="#L-1">1</a></pre></div></td><td class="code"><div class="highlight"><pre><span></span><span id="L-1"><a name="L-1"></a><span class="nb">cd</span> ~/data/tmp<span class="p">;</span> wget -O timthumb.php http://timthumb.googlecode.com/svn/trunk/timthumb.php <span class="o">&amp;&amp;</span> chmod <span class="m">644</span> timthumb.php <span class="o">&amp;&amp;</span> find ~/domains/ -maxdepth <span class="m">10</span> <span class="se">\(</span> -name <span class="s2">&quot;timthumb.php&quot;</span> -o -name <span class="s2">&quot;thumb.php&quot;</span> <span class="se">\)</span> -exec cp <span class="o">{}</span> <span class="o">{}</span>.bak <span class="se">\;</span> -exec cp timthumb.php <span class="o">{}</span> <span class="se">\;</span> find ~/domains/ -name <span class="s2">&quot;*thumb.php&quot;</span> -type f -print -exec egrep <span class="s2">&quot;&#39;VERSION&#39;|\&quot;VERSION\&quot;&quot;</span> <span class="s1">&#39;{}&#39;</span> <span class="se">\;</span> </span></pre></div> </td></tr></table>
timthumb