Skip to content

Instantly share code, notes, and snippets.

@michel47
Last active Aug 4, 2021
Embed
What would you like to do?
ikcandi
#
export EDITOR=gvim
domain=candiharvest.infomanihack.ch
url=https://$domain
candid=$(dig TXT $domain | grep -v -e '^;' -e '^$' | cut -d'"' -f2)
curl -H "X-Candidate-Id: $candid" $url > ikquestions.txt
contact=$(whois 185.181.161.1 | grep abuse-mailbox | sed -e 's/ */ /g' | cut -d' ' -f2) && echo "abuse-address: $contact"
stamp=$(date +%b%y | tr '[:upper:]' '[:lower:]')
# (re)generate resume
if [ ! -e michel.resume ]; then
git clone https://ipfs.blockring™.ml/ipns/$key$/michelc/resume-template.git michel.resume
cd michel.resume
else
cd michel.resume
git pull
fi
bundle install
bundle exec jekyll build
chromium --foreground --headless --disable-gpu --no-margins --print-to-pdf _site/index-en.html
sleep 10;
cp -f output.pdf mgc_resume-en.pdf
cp -p mgc_resume-en.pdf ../michel_resume_print.pdf
cp -p mgc_resume-en.pdf mgc_resume_$stamp.pdf
bundle exec jekyll build
qm=$(ipfs add -r _site -Q)
cd ..
echo "<script>location.href='https://ipfs.blockringtm.ml/ipfs/$qm'</script>" > resume-$candid.html
#rm -rf michel.resume
cat >ikanswers.yml <<EOF
--- # parameter
EDITOR: $EDITOR
gist: a50318fc7d7e43e2abd88bff5aa47d75
key: QmZjRH6Ht4sRGgnvXHYyJAdmi7QoCW2shBXXavWmjzZb8k
stamp: $stamp
domain: $domain
url: $url
candid: $candid
contact: $contact
qm: $qm
EOF
#sed -e "s/candid: .*/candid: $candid/" -e "s/qm: .*/qm: $qm/" index.md > README.md
pandoc --metadata-file=ikanswers.yml --template=index.md index.md | tee README.md | pandoc -o index.html
#pandoc --metadata-file=ikanswers.yml --template=index.md index.md | pandoc -o index.html
git add index.html
pandoc --metadata-file=ikanswers.yml --template=ikanswers.md ikanswers.md | pandoc -o ikanswers.html -
exit $?
true; # $Source: /my/shell/scripts/ikcandi_build.sh $
#
url=candiharvest.infomanihack.ch
candid=$(dig TXT $url | grep -v -e '^;' -e '^$' | cut -d'"' -f2)
curl -sL -H "X-Candidate-Id: $candid" $url | less
echo candid: $candid
<meta charset="utf8"/>
<h1 id="infomaniak-sysadmin-candidature-nedapcifbosadazciend">Infomaniak SysAdmin Candidature (NedApcifBosAdAzCiend)</h1>
<h2 id="answers-to-questions-from-candiharvest.infomanihack.churl">Answers to <a href="ikquestions.txt">questions</a> from <a href="https://candiharvest.infomanihack.ch">candiharvest.infomanihack.ch</a></h2>
<h3 id="what-is-the-list-of-ips-present-in-infomaniak-spf">1. What is the list of ips present in Infomaniak SPF (*) ?</h3>
<div class="sourceCode" id="cb1"><pre class="sourceCode sh"><code class="sourceCode bash"><span id="cb1-1"><a href="#cb1-1" aria-hidden="true"></a><span class="ex">dig</span> TXT infomaniak.com <span class="kw">|</span> <span class="fu">grep</span> -i SPF</span>
<span id="cb1-2"><a href="#cb1-2" aria-hidden="true"></a><span class="co">#infomaniak.com. 3600 IN TXT &quot;v=spf1 include:spf.infomaniak.ch include:_spf.mailrelay.rrpproxy.net -all&quot;</span></span>
<span id="cb1-3"><a href="#cb1-3" aria-hidden="true"></a><span class="ex">dig</span> TXT spf.infomaniak.com <span class="kw">|</span> <span class="fu">grep</span> -i SPF</span>
<span id="cb1-4"><a href="#cb1-4" aria-hidden="true"></a><span class="co">#spf.infomaniak.com. 86400 IN TXT &quot;v=spf1 ip4:84.16.68.96 ip4:84.16.68.94 include:relay.mail.infomaniak.ch include:app.mail.infomaniak.ch include:newsletter.infomaniak.com -all&quot;</span></span>
<span id="cb1-5"><a href="#cb1-5" aria-hidden="true"></a><span class="ex">dig</span> TXT _spf.mailrelay.rrpproxy.net</span>
<span id="cb1-6"><a href="#cb1-6" aria-hidden="true"></a><span class="co"># _spf.mailrelay.rrpproxy.net. 3600 IN TXT &quot;v=spf1 ip4:109.234.108.151 ip4:109.234.108.152 ip4:109.234.111.22 ~all&quot;</span></span>
<span id="cb1-7"><a href="#cb1-7" aria-hidden="true"></a><span class="ex">dig</span> TXT relay.mail.infomaniak.ch </span>
<span id="cb1-8"><a href="#cb1-8" aria-hidden="true"></a><span class="co"># ip4:45.157.188.8/29 ip4:185.125.25.8/29 ip4:83.166.143.168/29 ip4:84.16.66.168/29 ip6:2001:1600:3:17::/64 ip6:2001:1600:4:17::/64</span></span>
<span id="cb1-9"><a href="#cb1-9" aria-hidden="true"></a><span class="ex">dig</span> TXT app.mail.infomaniak.ch</span>
<span id="cb1-10"><a href="#cb1-10" aria-hidden="true"></a><span class="co"># ip4:84.16.68.109 ip4:84.16.68.110 ip4:84.16.68.111 ip4:84.16.68.112 ip4:185.125.25.16/29 ip4:45.157.188.16/29 ip4:84.16.66.176/29 ip4:83.166.143.176/29 ip6:2001:1600:3:17::/64 ip6:2001:1600:4:17::/64</span></span>
<span id="cb1-11"><a href="#cb1-11" aria-hidden="true"></a><span class="ex">dig</span> TXT newsletter.infomaniak.com</span>
<span id="cb1-12"><a href="#cb1-12" aria-hidden="true"></a><span class="co"># v=spf1 include:amazonses.com ?all</span></span>
<span id="cb1-13"><a href="#cb1-13" aria-hidden="true"></a><span class="ex">dig</span> TXT amazonses.com</span>
<span id="cb1-14"><a href="#cb1-14" aria-hidden="true"></a><span class="co">#amazonses.com. 900 IN TXT &quot;v=spf1 ip4:199.255.192.0/22 ip4:199.127.232.0/22 ip4:54.240.0.0/18 ip4:69.169.224.0/20 ip4:23.249.208.0/20 ip4:23.251.224.0/19 ip4:76.223.176.0/20 ip4:54.240.64.0/19 ip4:54.240.96.0/19 ip4:52.82.172.0/22 -all&quot;</span></span></code></pre></div>
<p>so the list of IPs are :</p>
<h4 id="ip4">IP4:</h4>
<ul>
<li>84.16.68.96</li>
<li>84.16.68.94</li>
<li>45.157.188.8/29 : 45.157.188.8 to 45.157.188.15</li>
<li>185.125.25.8/29 : 185.125.25.8 to 185.125.25.15</li>
<li>83.166.143.168/29 : 83.166.143.168 to 83.166.143.175</li>
<li>84.16.66.168/29 : 84.16.66.168 to 84.16.66.175</li>
<li>109.234.108.151</li>
<li>109.234.108.152</li>
<li>109.234.111.22</li>
<li>84.16.68.109</li>
<li>84.16.68.110</li>
<li>84.16.68.111</li>
<li>84.16.68.112</li>
<li>185.125.25.16/29 : 185.125.25.16 to 185.125.25.23</li>
<li>45.157.188.16/29 : 45.157.188.16 to 45.157.188.23</li>
<li>84.16.66.176/29 : 84.16.66.176 to 84.16.66.183</li>
<li>83.166.143.176/29 : 83.166.143.176 to 83.166.143.183</li>
<li>199.255.192.0/22 : 199.255.192.0 to 199.255.195.255</li>
<li>199.127.232.0/22 : 199.127.232.0 to 199.127.235.255</li>
<li>54.240.0.0/18 : 54.240.0.0 to 54.240.0.63.255</li>
<li>69.169.224.0/20 : 69.169.224.0 to 69.169.239.255</li>
<li>23.249.208.0/20 : 23.249.208.0 to 23.249.223.255</li>
<li>23.251.224.0/19 : 23.251.224.0 to 23.251.255.255</li>
<li>76.223.176.0/20 : 76.223.176.0 to 76.223.191.255</li>
<li>54.240.64.0/19 : 54.240.64.0 to 54.240.95.255</li>
<li>54.240.96.0/19 : 54.240.96.0 to 54.240.127.255</li>
<li>52.82.172.0/22 : 52.82.172.0 to 52.82.175.255</li>
</ul>
<h4 id="ip6">IP6:</h4>
<ul>
<li>2001:1600:3:17::/64 : 2001:1600:0003:0017:0000:0000:0000:0000 to 2001:1600:0003:0017:ffff:ffff:ffff:ffff</li>
<li>2001:1600:4:17::/64 : 2001:1600:0004:0017:0000:0000:0000:0000 to 2001:1600:0004:0017:ffff:ffff:ffff:ffff</li>
</ul>
<h3 id="dns-on-linux-system">2. DNS on linux system ?</h3>
<div class="sourceCode" id="cb2"><pre class="sourceCode sh"><code class="sourceCode bash"><span id="cb2-1"><a href="#cb2-1" aria-hidden="true"></a><span class="fu">cat</span> /etc/resolv.conf</span>
<span id="cb2-2"><a href="#cb2-2" aria-hidden="true"></a><span class="ex">systemd-resolve</span> --status</span>
<span id="cb2-3"><a href="#cb2-3" aria-hidden="true"></a><span class="ex">nmcli</span> dev show <span class="kw">|</span> <span class="fu">grep</span> DNS</span>
<span id="cb2-4"><a href="#cb2-4" aria-hidden="true"></a></span>
<span id="cb2-5"><a href="#cb2-5" aria-hidden="true"></a><span class="fu">cat</span> /etc/systemd/resolved.conf</span>
<span id="cb2-6"><a href="#cb2-6" aria-hidden="true"></a><span class="fu">sudo</span> systemctl status systemd-resolved.service</span></code></pre></div>
<h3 id="abuse-address-for-185.181.161.024">3. abuse address for 185.181.161.0/24 ?</h3>
<div class="sourceCode" id="cb3"><pre class="sourceCode sh"><code class="sourceCode bash"><span id="cb3-1"><a href="#cb3-1" aria-hidden="true"></a><span class="va">CIDR=</span>185.181.161.0/24 # <span class="ex">185.181.161.0</span> to 185.181.161.255</span>
<span id="cb3-2"><a href="#cb3-2" aria-hidden="true"></a><span class="fu">xdg-open</span> https://www.abuseipdb.com/check-block/<span class="va">$CIDR</span></span>
<span id="cb3-3"><a href="#cb3-3" aria-hidden="true"></a><span class="co">#sudo install whois</span></span>
<span id="cb3-4"><a href="#cb3-4" aria-hidden="true"></a><span class="ex">whois</span> 185.181.161.1 <span class="kw">|</span> <span class="fu">grep</span> -i abuse</span>
<span id="cb3-5"><a href="#cb3-5" aria-hidden="true"></a><span class="co"># Abuse contact for &#39;185.181.161.0 - 185.181.161.255&#39; is &#39;abuse@infomaniak.ch&#39;</span></span>
<span id="cb3-6"><a href="#cb3-6" aria-hidden="true"></a><span class="va">contact=$(</span><span class="ex">whois</span> 185.181.161.1 <span class="kw">|</span> <span class="fu">grep</span> abuse-mailbox <span class="kw">|</span> <span class="fu">sed</span> -e <span class="st">&#39;s/ */ /g&#39;</span> <span class="kw">|</span> <span class="fu">cut</span> -d<span class="st">&#39; &#39;</span> -f2<span class="va">)</span> <span class="kw">&amp;&amp;</span> <span class="bu">echo</span> <span class="st">&quot;abuse-address: </span><span class="va">$contact</span><span class="st">&quot;</span></span></code></pre></div>
<p>The abuse addres for the Infomaniak Network ~range <a href="https://dnschecker.org/ip-whois-lookup.php?query=185.181.161.1">185.181.161.0/24</a> is <a href="mailto:abuse@infomaniak.ch">abuse@infomaniak.ch</a></p>
<h3 id="editor-preference-gvim">4. $EDITOR preference : gvim</h3>
<p>my editor of choice is gvim</p>
<h3 id="get-resume">5. get resume</h3>
<div class="sourceCode" id="cb4"><pre class="sourceCode sh"><code class="sourceCode bash"><span id="cb4-1"><a href="#cb4-1" aria-hidden="true"></a><span class="kw">if</span><span class="bu"> [</span> <span class="ot">!</span> <span class="ot">-e</span> michel.resume<span class="bu"> ]</span>; <span class="kw">then</span></span>
<span id="cb4-2"><a href="#cb4-2" aria-hidden="true"></a> <span class="fu">git</span> clone https://ipfs.blockring™.ml/ipns/QmZjRH6Ht4sRGgnvXHYyJAdmi7QoCW2shBXXavWmjzZb8k/michelc/resume-template.git michel.resume</span>
<span id="cb4-3"><a href="#cb4-3" aria-hidden="true"></a> <span class="bu">cd</span> michel.resume</span>
<span id="cb4-4"><a href="#cb4-4" aria-hidden="true"></a><span class="kw">else</span> </span>
<span id="cb4-5"><a href="#cb4-5" aria-hidden="true"></a> <span class="bu">cd</span> michel.resume</span>
<span id="cb4-6"><a href="#cb4-6" aria-hidden="true"></a> <span class="fu">git</span> pull</span>
<span id="cb4-7"><a href="#cb4-7" aria-hidden="true"></a><span class="kw">fi</span></span>
<span id="cb4-8"><a href="#cb4-8" aria-hidden="true"></a><span class="ex">bundle</span> install</span>
<span id="cb4-9"><a href="#cb4-9" aria-hidden="true"></a><span class="ex">bundle</span> exec jekyll build</span>
<span id="cb4-10"><a href="#cb4-10" aria-hidden="true"></a></span>
<span id="cb4-11"><a href="#cb4-11" aria-hidden="true"></a><span class="ex">chromium</span> --foreground --headless --disable-gpu --no-margins --print-to-pdf _site/index-en.html</span>
<span id="cb4-12"><a href="#cb4-12" aria-hidden="true"></a><span class="fu">sleep</span> 10<span class="kw">;</span></span>
<span id="cb4-13"><a href="#cb4-13" aria-hidden="true"></a><span class="fu">cp</span> -f output.pdf mgc_resume-en.pdf</span>
<span id="cb4-14"><a href="#cb4-14" aria-hidden="true"></a></span>
<span id="cb4-15"><a href="#cb4-15" aria-hidden="true"></a><span class="va">stamp=$(</span><span class="fu">date</span> +%b%y <span class="kw">|</span> <span class="fu">tr</span> <span class="st">&#39;[:upper:]&#39;</span> <span class="st">&#39;[:lower:]&#39;</span><span class="va">)</span></span>
<span id="cb4-16"><a href="#cb4-16" aria-hidden="true"></a></span>
<span id="cb4-17"><a href="#cb4-17" aria-hidden="true"></a><span class="fu">cp</span> -p mgc_resume-en.pdf ../michel_resume_print.pdf</span>
<span id="cb4-18"><a href="#cb4-18" aria-hidden="true"></a><span class="fu">cp</span> -p mgc_resume-en.pdf mgc_resume_<span class="va">$stamp</span>.pdf</span>
<span id="cb4-19"><a href="#cb4-19" aria-hidden="true"></a></span>
<span id="cb4-20"><a href="#cb4-20" aria-hidden="true"></a><span class="ex">bundle</span> exec jekyll build</span>
<span id="cb4-21"><a href="#cb4-21" aria-hidden="true"></a><span class="va">qm=$(</span><span class="ex">ipfs</span> add -r _site -Q<span class="va">)</span></span>
<span id="cb4-22"><a href="#cb4-22" aria-hidden="true"></a><span class="bu">cd</span> ..</span>
<span id="cb4-23"><a href="#cb4-23" aria-hidden="true"></a><span class="bu">echo</span> <span class="st">&quot;&lt;script&gt;location.href=&#39;https://ipfs.blockringtm.ml/ipfs/</span><span class="va">$qm</span><span class="st">&#39;&lt;/script&gt;&quot;</span> <span class="op">&gt;</span> resume-NedApcifBosAdAzCiend.html</span>
<span id="cb4-24"><a href="#cb4-24" aria-hidden="true"></a></span>
<span id="cb4-25"><a href="#cb4-25" aria-hidden="true"></a><span class="fu">sed</span> -i -e <span class="st">&quot;s/candid: .*/candid: NedApcifBosAdAzCiend/&quot;</span> -e <span class="st">&quot;s/qm: .*/qm: </span><span class="va">$qm</span><span class="st">/&quot;</span> README.md</span>
<span id="cb4-26"><a href="#cb4-26" aria-hidden="true"></a><span class="ex">pandoc</span> --template=README.md README.md <span class="kw">|</span> <span class="ex">pandoc</span> -o README.html</span>
<span id="cb4-27"><a href="#cb4-27" aria-hidden="true"></a></span>
<span id="cb4-28"><a href="#cb4-28" aria-hidden="true"></a><span class="co">#rm -rf michel.resume</span></span></code></pre></div>
<ol start="3" type="1">
<li>uploaded files</li>
</ol>
<div class="sourceCode" id="cb5"><pre class="sourceCode sh"><code class="sourceCode bash"><span id="cb5-1"><a href="#cb5-1" aria-hidden="true"></a><span class="va">kdrive=</span>https://drive.infomaniak.com/app/collaborate/100338/3d62891e-6d35-4d8e-b3e7-39a47b50cf39</span>
<span id="cb5-2"><a href="#cb5-2" aria-hidden="true"></a><span class="co">#curl -X PUT -F -d @resume-NedApcifBosAdAzCiend.html</span></span>
<span id="cb5-3"><a href="#cb5-3" aria-hidden="true"></a><span class="fu">xdg-open</span> <span class="va">$kdrive</span></span></code></pre></div>
<p>files can be found here :</p>
<ul>
<li>answers: <a href="https://gist.github.com/a50318fc7d7e43e2abd88bff5aa47d75#file-ikanswers-html">ikanswers.md</a></li>
<li>script: <a href="https://gist.github.com/a50318fc7d7e43e2abd88bff5aa47d75#file-candid-sh">candid.sh</a></li>
<li>resume: <a href="https://gateway.ipfs.io/ipfs/QmX2VYXHfnMN4cPjEdQsqALqRU51AwxVyERxbWpkmxokHD/resume-NedApcifBosAdAzCiend.html">michel’s CV</a></li>
</ul>
<p>also on <a href="https://gist.github.com/a50318fc7d7e43e2abd88bff5aa47d75/">gist:a50318fc7d7e43e2abd88bff5aa47d75</a> or at <a href="https://cloudflare-ipfs.com/ipfs/QmX2VYXHfnMN4cPjEdQsqALqRU51AwxVyERxbWpkmxokHD/">/ipfs/QmX2VYXHfnMN4cPjEdQsqALqRU51AwxVyERxbWpkmxokHD</a></p>
# Infomaniak SysAdmin Candidature ($candid$)

Answers to questions from candiharvest.infomanihack.ch

1. What is the list of ips present in Infomaniak SPF (*) ?

dig TXT infomaniak.com | grep -i SPF
#infomaniak.com.		3600	IN	TXT	"v=spf1 include:spf.infomaniak.ch include:_spf.mailrelay.rrpproxy.net -all"
dig TXT spf.infomaniak.com | grep -i SPF
#spf.infomaniak.com.	86400	IN	TXT	"v=spf1 ip4:84.16.68.96 ip4:84.16.68.94 include:relay.mail.infomaniak.ch include:app.mail.infomaniak.ch include:newsletter.infomaniak.com -all"
dig TXT _spf.mailrelay.rrpproxy.net
# _spf.mailrelay.rrpproxy.net. 3600 IN	TXT	"v=spf1 ip4:109.234.108.151 ip4:109.234.108.152 ip4:109.234.111.22 ~all"
dig TXT relay.mail.infomaniak.ch 
# ip4:45.157.188.8/29 ip4:185.125.25.8/29 ip4:83.166.143.168/29 ip4:84.16.66.168/29 ip6:2001:1600:3:17::/64 ip6:2001:1600:4:17::/64
dig TXT app.mail.infomaniak.ch
# ip4:84.16.68.109 ip4:84.16.68.110 ip4:84.16.68.111 ip4:84.16.68.112 ip4:185.125.25.16/29 ip4:45.157.188.16/29 ip4:84.16.66.176/29 ip4:83.166.143.176/29 ip6:2001:1600:3:17::/64 ip6:2001:1600:4:17::/64
dig TXT newsletter.infomaniak.com
# v=spf1 include:amazonses.com ?all
dig TXT amazonses.com
#amazonses.com.		900	IN	TXT	"v=spf1 ip4:199.255.192.0/22 ip4:199.127.232.0/22 ip4:54.240.0.0/18 ip4:69.169.224.0/20 ip4:23.249.208.0/20 ip4:23.251.224.0/19 ip4:76.223.176.0/20 ip4:54.240.64.0/19 ip4:54.240.96.0/19 ip4:52.82.172.0/22 -all"

so the list of IPs are :

IP4:

  • 84.16.68.96
  • 84.16.68.94
  • 45.157.188.8/29 : 45.157.188.8 to 45.157.188.15
  • 185.125.25.8/29 : 185.125.25.8 to 185.125.25.15
  • 83.166.143.168/29 : 83.166.143.168 to 83.166.143.175
  • 84.16.66.168/29 : 84.16.66.168 to 84.16.66.175
  • 109.234.108.151
  • 109.234.108.152
  • 109.234.111.22
  • 84.16.68.109
  • 84.16.68.110
  • 84.16.68.111
  • 84.16.68.112
  • 185.125.25.16/29 : 185.125.25.16 to 185.125.25.23
  • 45.157.188.16/29 : 45.157.188.16 to 45.157.188.23
  • 84.16.66.176/29 : 84.16.66.176 to 84.16.66.183
  • 83.166.143.176/29 : 83.166.143.176 to 83.166.143.183
  • 199.255.192.0/22 : 199.255.192.0 to 199.255.195.255
  • 199.127.232.0/22 : 199.127.232.0 to 199.127.235.255
  • 54.240.0.0/18 : 54.240.0.0 to 54.240.0.63.255
  • 69.169.224.0/20 : 69.169.224.0 to 69.169.239.255
  • 23.249.208.0/20 : 23.249.208.0 to 23.249.223.255
  • 23.251.224.0/19 : 23.251.224.0 to 23.251.255.255
  • 76.223.176.0/20 : 76.223.176.0 to 76.223.191.255
  • 54.240.64.0/19 : 54.240.64.0 to 54.240.95.255
  • 54.240.96.0/19 : 54.240.96.0 to 54.240.127.255
  • 52.82.172.0/22 : 52.82.172.0 to 52.82.175.255

IP6:

  • 2001:1600:3:17::/64 : 2001:1600:0003:0017:0000:0000:0000:0000 to 2001:1600:0003:0017:ffff:ffff:ffff:ffff
  • 2001:1600:4:17::/64 : 2001:1600:0004:0017:0000:0000:0000:0000 to 2001:1600:0004:0017:ffff:ffff:ffff:ffff

2. DNS on linux system ?

cat /etc/resolv.conf
systemd-resolve --status
nmcli dev show | grep DNS

cat /etc/systemd/resolved.conf
sudo systemctl status systemd-resolved.service

3. abuse address for 185.181.161.0/24 ?

CIDR=185.181.161.0/24 # 185.181.161.0 to 185.181.161.255
xdg-open https://www.abuseipdb.com/check-block/$$CIDR
#sudo install whois
whois 185.181.161.1 | grep -i abuse
# Abuse contact for '185.181.161.0 - 185.181.161.255' is 'abuse@infomaniak.ch'
contact=$$(whois 185.181.161.1 | grep abuse-mailbox | sed -e 's/  */ /g' | cut -d' ' -f2) && echo "abuse-address: $$contact"

The abuse addres for the Infomaniak Network ~range 185.181.161.0/24 is $contact$

4. $$EDITOR preference : $EDITOR$

my editor of choice is $EDITOR$

5. get resume

if [ ! -e michel.resume ]; then
  git clone https://ipfs.blockring™.ml/ipns/$key$/michelc/resume-template.git michel.resume
  cd michel.resume
else 
  cd michel.resume
  git pull
fi
bundle install
bundle exec jekyll build

chromium --foreground --headless --disable-gpu --no-margins --print-to-pdf _site/index-en.html
sleep 10;
cp -f output.pdf mgc_resume-en.pdf

stamp=$$(date +%b%y | tr '[:upper:]' '[:lower:]')

cp -p mgc_resume-en.pdf ../michel_resume_print.pdf
cp -p mgc_resume-en.pdf mgc_resume_$$stamp.pdf

bundle exec jekyll build
qm=$$(ipfs add -r _site -Q)
cd ..
echo "<script>location.href='https://ipfs.blockringtm.ml/ipfs/$$qm'</script>" > resume-$candid$.html

sed -i -e "s/candid: .*/candid: $candid$/" -e "s/qm: .*/qm: $$qm/" README.md
pandoc --template=README.md README.md | pandoc -o README.html

#rm -rf michel.resume
  1. uploaded files
kdrive=https://drive.infomaniak.com/app/collaborate/100338/3d62891e-6d35-4d8e-b3e7-39a47b50cf39
#curl -X PUT  -F -d @resume-$candid$.html
xdg-open $$kdrive

files can be found here :

also on gist:$gist$ or at /ipfs/$qm$

Congratulations !! You unlocked the first level.
I) Please answer the following questions in a new text document:
- What is the list of ips present in Infomaniak SPF (*) ?
- Where can you usually find DNS information on a Linux system ?
- What is the abuse address of the 185.181.161.0/24 range (*) ?
- Do you prefer using Vim or Emacs ?
* please specify how you found the answer
II) Please write a small script that solves the first part:
- Gather the Candidate Id
- Call https://candiharvest.infomanihack.ch with the right Candidate Id
NB: You can use any of the following languages: Bash, Python, Perl, PHP
III) Upload your answers, script, CV to this URL:
https://drive.infomaniak.com/app/collaborate/100338/3d62891e-6d35-4d8e-b3e7-39a47b50cf39
Feel free to add any additional document if you want to (cover letter, work certificate...)
If you haven't received any response within 3 weeks or if you have any question you can reach us at:
candiharvest@infomanihack.ch
<meta charset="utf8"/>
<h3 id="readme.md5"><a href="https://gist.github.com/a50318fc7d7e43e2abd88bff5aa47d75#file-README-md">README.md</a></h3>
<ul>
<li>questions: <a href="#file-ikquestions-txt">ikquestions.txt</a> (<a href="https://gist.github.com/a50318fc7d7e43e2abd88bff5aa47d75#file-ikquestions-txt">gist</a>,<a href="https://bl.ocks.org/michel47/a50318fc7d7e43e2abd88bff5aa47d75#ikquestions.txt">bl.ocks</a>)</li>
<li>answers: <a href="https://bl.ocks.org/michel47/raw/a50318fc7d7e43e2abd88bff5aa47d75/ikanswers.html">ikanswers.md</a></li>
<li>script: <a href="https://gist.github.com/a50318fc7d7e43e2abd88bff5aa47d75#file-candid-sh">candid.sh</a></li>
<li>resume: <a href="https://bl.ocks.org/michel47/raw/a50318fc7d7e43e2abd88bff5aa47d75/resume-NedApcifBosAdAzCiend.html">michel’s CV</a> (<a href="https://ipfs.blockringtm.ml/ipfs/QmX2VYXHfnMN4cPjEdQsqALqRU51AwxVyERxbWpkmxokHD/mgc_resume-en.pdf">pdf</a>)</li>
</ul>
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
View raw

(Sorry about that, but we can’t show files that are this big right now.)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment