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-08-20T00:23:30
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

Bash

WP install via SSH on Plesk

wget http://wordpress.org/wordpress-3.3.tar.gz && tar -zxvf wordpress-3.3.tar.gz && cd wordpress/ && cp -rpf * ../ && cd .. && rm -rf ./wordpress && rm -f wordpress-3.3.tar.gz && USERS=`ls -ld ../. | awk '{ print $3 }'` && chown -R $USERS:psacln * && clear && echo "Wordpress is now installed with FastCGI friendly ownerships"
https://snipt.net/embed/115cad59060de6cafc0074098f7bfe14/
/raw/115cad59060de6cafc0074098f7bfe14/
115cad59060de6cafc0074098f7bfe14
bash
Bash
1
2019-08-18T08:35:28
True
False
False
/api/public/snipt/33745/
wp-install-ssh
<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>wget http://wordpress.org/wordpress-3.3.tar.gz <span class="o">&amp;&amp;</span> tar -zxvf wordpress-3.3.tar.gz <span class="o">&amp;&amp;</span> <span class="nb">cd</span> wordpress/ <span class="o">&amp;&amp;</span> cp -rpf * ../ <span class="o">&amp;&amp;</span> <span class="nb">cd</span> .. <span class="o">&amp;&amp;</span> rm -rf ./wordpress <span class="o">&amp;&amp;</span> rm -f wordpress-3.3.tar.gz <span class="o">&amp;&amp;</span> <span class="nv">USERS</span><span class="o">=</span><span class="sb">`</span>ls -ld ../. <span class="p">|</span> awk <span class="s1">&#39;{ print $3 }&#39;</span><span class="sb">`</span> <span class="o">&amp;&amp;</span> chown -R <span class="nv">$USERS</span>:psacln * <span class="o">&amp;&amp;</span> clear <span class="o">&amp;&amp;</span> <span class="nb">echo</span> <span class="s2">&quot;Wordpress is now installed with FastCGI friendly ownerships&quot;</span> </span></pre></div> </td></tr></table>
wordpress