snipt

Ctrl+h for KB shortcuts

Bash

Download a local copy of a whole website

wget -H -N -k -p --exclude-domains quantserve.com --no-check-certificate -U "Mozilla/5.0 (Windows NT 6.1; WOW64; rv:6.0a2) Gecko/20110613 Firefox/6.0a2" <FULL_HTTP_URL>
https://snipt.net/embed/3e47ca3f7da22c51faf9a1e951cd3e58/
https://snipt.net/raw/3e47ca3f7da22c51faf9a1e951cd3e58/
3e47ca3f7da22c51faf9a1e951cd3e58
bash
Bash
1
2016-09-29T14:42:21
True
False
False
Apr 16, 2014 at 03:45 AM
/api/public/snipt/130426/
download-a-local-copy-of-a-whole-website
<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 id="L-1"><a name="L-1"></a>wget -H -N -k -p --exclude-domains quantserve.com --no-check-certificate -U <span class="s2">&quot;Mozilla/5.0 (Windows NT 6.1; WOW64; rv:6.0a2) Gecko/20110613 Firefox/6.0a2&quot;</span> &lt;FULL_HTTP_URL&gt; </span></pre></div> </td></tr></table>
download, site, wget

Bash

Search Access Logs

grep -h "?*=http://" ../../logs/access_log*| awk '$9 !~/^4/ && $7 ~/\?*\=http\:\/\// && /Feb/'|egrep -v '\/(.+)\/.*\?.*\=http\:\/\/\1' > ac.txt
https://snipt.net/embed/b8a4c1d7a2df69f6e5833db9cc1aa7d6/
https://snipt.net/raw/b8a4c1d7a2df69f6e5833db9cc1aa7d6/
b8a4c1d7a2df69f6e5833db9cc1aa7d6
bash
Bash
1
2016-09-26T04:05:15
True
False
False
/api/public/snipt/13557/
search-access-logs
<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 id="L-1"><a name="L-1"></a>grep -h <span class="s2">&quot;?*=http://&quot;</span> ../../logs/access_log*<span class="p">|</span> awk <span class="s1">&#39;$9 !~/^4/ &amp;&amp; $7 ~/\?*\=http\:\/\// &amp;&amp; /Feb/&#39;</span><span class="p">|</span>egrep -v <span class="s1">&#39;\/(.+)\/.*\?.*\=http\:\/\/\1&#39;</span> &gt; ac.txt </span></pre></div> </td></tr></table>
dv, gs, hacked, site

Bash

wget an entire site

wget --recursive --no-clobber --page-requisites --html-extension --convert-links --restrict-file-names=windows --domains domain.com --no-parent domain.com
https://snipt.net/embed/ea0dcd9e2f93e8c3318423c2ae186d8d/
https://snipt.net/raw/ea0dcd9e2f93e8c3318423c2ae186d8d/
ea0dcd9e2f93e8c3318423c2ae186d8d
bash
Bash
1
2016-09-22T19:37:39
True
False
False
/api/public/snipt/12105/
wget-an-entire-site
<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 id="L-1"><a name="L-1"></a>wget --recursive --no-clobber --page-requisites --html-extension --convert-links --restrict-file-names<span class="o">=</span>windows --domains domain.com --no-parent domain.com </span></pre></div> </td></tr></table>
rip, site, wget

ApacheConf

apache .htaccess code to load site with www prefix at all times

1
2
3
4
5
6
7
# this code in your .htaccess file makes sure that the url loads 
# with the 'www.' subdomain in place...
# 
Options +FollowSymLinks
RewriteEngine On
RewriteCond %{http_host} ^yourdomain.com [nc]
RewriteRule ^(.*)$ http://www.yourdomain.com/$1 [R=301,nc,L]
https://snipt.net/embed/8bbfa2939b5478163efabbc0da9ae4fc/
https://snipt.net/raw/8bbfa2939b5478163efabbc0da9ae4fc/
8bbfa2939b5478163efabbc0da9ae4fc
apacheconf
ApacheConf
7
2016-09-29T06:44:10
True
False
False
/api/public/snipt/3171/
apache-htaccess-code-to-load-site-with-www-prefix-at-all-times
<table class="highlighttable"><tr><td class="linenos"><div class="linenodiv"><pre><a href="#L-1">1</a> <a href="#L-2">2</a> <a href="#L-3">3</a> <a href="#L-4">4</a> <a href="#L-5">5</a> <a href="#L-6">6</a> <a href="#L-7">7</a></pre></div></td><td class="code"><div class="highlight"><pre><span id="L-1"><a name="L-1"></a><span class="c"># this code in your .htaccess file makes sure that the url loads </span> </span><span id="L-2"><a name="L-2"></a><span class="c"># with the &#39;www.&#39; subdomain in place...</span> </span><span id="L-3"><a name="L-3"></a><span class="c"># </span> </span><span id="L-4"><a name="L-4"></a><span class="nb">Options</span> +FollowSymLinks </span><span id="L-5"><a name="L-5"></a><span class="nb">RewriteEngine</span> <span class="k">On</span> </span><span id="L-6"><a name="L-6"></a><span class="nb">RewriteCond</span> %{http_host} ^yourdomain.com [nc] </span><span id="L-7"><a name="L-7"></a><span class="nb">RewriteRule</span> ^(.*)$ http://www.yourdomain.com/$1 [R=301,nc,L] </span></pre></div> </td></tr></table>
.htaccess, always, apache, conf, config, htaccess, load, site, subdomain, www
Copyrighted, illegal, or inappropriate content? Email support@snipt.net.