<?xml version="1.0" encoding="utf-8" standalone="yes"?><rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:content="http://purl.org/rss/1.0/modules/content/"><channel><title>Lifehack on sysarcher/@ich_code</title><link>https://sysarcher.github.io/categories/lifehack/</link><description>Recent content in Lifehack on sysarcher/@ich_code</description><generator>Hugo</generator><language>en-us</language><lastBuildDate>Tue, 30 Mar 2021 21:22:37 +0200</lastBuildDate><atom:link href="https://sysarcher.github.io/categories/lifehack/index.xml" rel="self" type="application/rss+xml"/><item><title>RegEx Search for Youtube Ads</title><link>https://sysarcher.github.io/posts/youtube-ads-list/</link><pubDate>Tue, 30 Mar 2021 21:22:37 +0200</pubDate><guid>https://sysarcher.github.io/posts/youtube-ads-list/</guid><description>&lt;p&gt;&lt;em&gt;Strategy:&lt;/em&gt; What I&amp;rsquo;m doing is unblock/whitelist any domain that causes video playback issues.&lt;/p&gt;
&lt;p&gt;&lt;em&gt;(Credits for the original list @beshrkayali)&lt;/em&gt;&lt;/p&gt;
&lt;p&gt;I have started to add to a blacklist here:&lt;/p&gt;
&lt;script src="https://gist.github.com/sysarcher/aea195d78f6ed5e3ca815a999f8707a7.js"&gt;&lt;/script&gt;
&lt;p&gt;I also created a regex which I&amp;rsquo;m experimenting with: &lt;code&gt;^r[0-9]{1,2}-{3}sn-h0je[a-z0-9]*.googlevideo.com&lt;/code&gt;&lt;/p&gt;
&lt;p&gt;I tested this RegEx on &lt;a href="https://regex101.com"&gt;regex101.com&lt;/a&gt; with the following data:&lt;/p&gt;
&lt;pre tabindex="0"&gt;&lt;code&gt;r4---sn-h0jeener.googlevideo.com
r4---sn-h0jeener.googlevideo.com
r4---sn-h0jeln7l.googlevideo.com
r1---sn-h0jelne7.googlevideo.com
r2---sn-h0jeln7e.googlevideo.com
r1---sn-h0jeln7e.googlevideo.com
r3---sn-h0jeenle.googlevideo.com
r1---sn-h0jeenle.googlevideo.com
r5---sn-h0jeened.googlevideo.com
r1---sn-h0jeenek.googlevideo.com
r5---sn-h0jeln7l.googlevideo.com
r2---sn-h0jeenle.googlevideo.com
r1---sn-h0jeln7e.googlevideo.com
r5---sn-h0jeen76.googlevideo.com
r5---sn-h0jeln7y.googlevideo.com
r5---sn-h0jeenek.googlevideo.com
r5---sn-h0jeened.googlevideo.com
r5---sn-h0jelne7.googlevideo.com
r1---sn-h0jeener.googlevideo.com
r4---sn-h0jeln7l.googlevideo.com
r1---sn-h0jelne7.googlevideo.com
r4---sn-h0jeln7r.googlevideo.com
r2---sn-h0jeenek.googlevideo.com
r6---sn-h0jeen76.googlevideo.com
r3---sn-h0jeener.googlevideo.com
r1---sn-h0jelne7.googlevideo.com
&lt;/code&gt;&lt;/pre&gt;</description><content:encoded><![CDATA[<p><em>Strategy:</em> What I&rsquo;m doing is unblock/whitelist any domain that causes video playback issues.</p>
<p><em>(Credits for the original list @beshrkayali)</em></p>
<p>I have started to add to a blacklist here:</p>
<script src="https://gist.github.com/sysarcher/aea195d78f6ed5e3ca815a999f8707a7.js"></script>
<p>I also created a regex which I&rsquo;m experimenting with: <code>^r[0-9]{1,2}-{3}sn-h0je[a-z0-9]*.googlevideo.com</code></p>
<p>I tested this RegEx on <a href="https://regex101.com">regex101.com</a> with the following data:</p>
<pre tabindex="0"><code>r4---sn-h0jeener.googlevideo.com
r4---sn-h0jeener.googlevideo.com
r4---sn-h0jeln7l.googlevideo.com
r1---sn-h0jelne7.googlevideo.com
r2---sn-h0jeln7e.googlevideo.com
r1---sn-h0jeln7e.googlevideo.com
r3---sn-h0jeenle.googlevideo.com
r1---sn-h0jeenle.googlevideo.com
r5---sn-h0jeened.googlevideo.com
r1---sn-h0jeenek.googlevideo.com
r5---sn-h0jeln7l.googlevideo.com
r2---sn-h0jeenle.googlevideo.com
r1---sn-h0jeln7e.googlevideo.com
r5---sn-h0jeen76.googlevideo.com
r5---sn-h0jeln7y.googlevideo.com
r5---sn-h0jeenek.googlevideo.com
r5---sn-h0jeened.googlevideo.com
r5---sn-h0jelne7.googlevideo.com
r1---sn-h0jeener.googlevideo.com
r4---sn-h0jeln7l.googlevideo.com
r1---sn-h0jelne7.googlevideo.com
r4---sn-h0jeln7r.googlevideo.com
r2---sn-h0jeenek.googlevideo.com
r6---sn-h0jeen76.googlevideo.com
r3---sn-h0jeener.googlevideo.com
r1---sn-h0jelne7.googlevideo.com
</code></pre>]]></content:encoded></item><item><title>Some nice Hacks</title><link>https://sysarcher.github.io/posts/nice-hacks/</link><pubDate>Wed, 24 Feb 2021 21:22:37 +0200</pubDate><guid>https://sysarcher.github.io/posts/nice-hacks/</guid><description>&lt;p&gt;&lt;em&gt;Linux only&lt;/em&gt;&lt;/p&gt;
&lt;p&gt;&lt;em&gt;DISCLAIMER: THE FOLLOWING CAN LEAD TO CREATING SECURITY HOLES IN THE VPN-PROTECTED NETWORK&amp;hellip; BE VERY CAREFUL. MAKE SURE YOU KNOW WHAT YOU&amp;rsquo;RE DOING. IF YOU DON&amp;rsquo;T UNDERSTAND WHAT YOU&amp;rsquo;RE DOING, &lt;strong&gt;DO NOT PROCEED&lt;/strong&gt;&lt;/em&gt;&lt;/p&gt;
&lt;p&gt;VPNs are a pain in the neck. I managed to find a way to have VPN traffic limited to some sites instead of routing everything through your corporate network.&lt;/p&gt;
&lt;p&gt;Routing everything through corporate network is also a cause of load on the company&amp;rsquo;s servers. Imagine a ton of people watching Youtube over VPN. Now, I&amp;rsquo;m talking about traditional VPN here, not p2p stuff.&lt;/p&gt;</description><content:encoded><![CDATA[<p><em>Linux only</em></p>
<p><em>DISCLAIMER: THE FOLLOWING CAN LEAD TO CREATING SECURITY HOLES IN THE VPN-PROTECTED NETWORK&hellip; BE VERY CAREFUL. MAKE SURE YOU KNOW WHAT YOU&rsquo;RE DOING. IF YOU DON&rsquo;T UNDERSTAND WHAT YOU&rsquo;RE DOING, <strong>DO NOT PROCEED</strong></em></p>
<p>VPNs are a pain in the neck. I managed to find a way to have VPN traffic limited to some sites instead of routing everything through your corporate network.</p>
<p>Routing everything through corporate network is also a cause of load on the company&rsquo;s servers. Imagine a ton of people watching Youtube over VPN. Now, I&rsquo;m talking about traditional VPN here, not p2p stuff.</p>
<h2 id="use-vpn-slice">Use <code>vpn-slice</code></h2>
<p><a href="https://github.com/dlenski/vpn-slice"><code>vpn-slice</code></a> is an awesome tool that allows you to use the VPN for only a certain few websites. I used <code>vpn-slice</code> along with <code>openconnect</code>.</p>
<p>Installation is pretty straightforward if you follow the documentation. Just make sure the <code>root</code> user sees the binary. I installed <code>pyenv</code> seperately for the <code>root</code> user and configured the global python env to be 3.9.2 (<code>pyenv global 3.9.2</code>).</p>
<p>That&rsquo;s it. Now install <code>vpn-slice</code>:</p>
<div class="highlight"><pre tabindex="0" style="color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4;-webkit-text-size-adjust:none;"><code class="language-console" data-lang="console"><span style="display:flex;"><span>$ pyenv global 3.9.2  <span style="color:#75715e"># or whatever version you want</span>
</span></span><span style="display:flex;"><span>$ pip install --upgrade pip
</span></span><span style="display:flex;"><span>$ pip install dnspython  <span style="color:#75715e"># recommended in project README</span>
</span></span><span style="display:flex;"><span>$ pip install vpn-slice
</span></span></code></pre></div><h2 id="usage-with-openconnect">Usage with <code>openconnect</code></h2>
<div class="highlight"><pre tabindex="0" style="color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4;-webkit-text-size-adjust:none;"><code class="language-bash" data-lang="bash"><span style="display:flex;"><span><span style="color:#75715e"># Source: https://docs.microsoft.com/en-us/microsoft-365/enterprise/urls-and-ip-address-ranges?view=o365-worldwide#skype-for-business-online-and-microsoft-teams</span>
</span></span><span style="display:flex;"><span>MSFT<span style="color:#f92672">=</span><span style="color:#e6db74">&#34;teams.microsoft.com login.microsoftonline.com microsoftstreams.com 13.107.64.0/18, 52.112.0.0/14, 52.120.0.0/14&#34;</span>
</span></span><span style="display:flex;"><span>MYCOMPANY<span style="color:#f92672">=</span><span style="color:#e6db74">&#34;&#34;</span>  <span style="color:#75715e"># Your company&#39;s domains, IP addr etc.</span>
</span></span><span style="display:flex;"><span>
</span></span><span style="display:flex;"><span>openconnect <span style="color:#ae81ff">\
</span></span></span><span style="display:flex;"><span>  -c /home/$USER/.cert/CERT.crt <span style="color:#ae81ff">\
</span></span></span><span style="display:flex;"><span>  -k /home/$USER/.cert/private.key --key-password-from-fsid <span style="color:#ae81ff">\
</span></span></span><span style="display:flex;"><span>  -s <span style="color:#e6db74">&#34;vpn-slice </span>$MSFT<span style="color:#e6db74"> </span>$MYCOMPANY<span style="color:#e6db74">&#34;</span> <span style="color:#ae81ff">\
</span></span></span><span style="display:flex;"><span>  vpn.company.com
</span></span></code></pre></div>]]></content:encoded></item></channel></rss>