<?xml version="1.0" encoding="UTF-8"?><rss xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:atom="http://www.w3.org/2005/Atom" version="2.0" xmlns:cc="http://cyber.law.harvard.edu/rss/creativeCommonsRssModule.html">
    <channel>
        <title><![CDATA[Stories by sysxplore on Medium]]></title>
        <description><![CDATA[Stories by sysxplore on Medium]]></description>
        <link>https://medium.com/@sysxplore?source=rss-de1b88fe9a30------2</link>
        <image>
            <url>https://cdn-images-1.medium.com/fit/c/150/150/1*A4FLM0aRSx2lZDwmVYYkzg.png</url>
            <title>Stories by sysxplore on Medium</title>
            <link>https://medium.com/@sysxplore?source=rss-de1b88fe9a30------2</link>
        </image>
        <generator>Medium</generator>
        <lastBuildDate>Fri, 20 Nov 2026 17:10:39 GMT</lastBuildDate>
        <atom:link href="https://medium.com/@sysxplore/feed" rel="self" type="application/rss+xml"/>
        <webMaster><![CDATA[yourfriends@medium.com]]></webMaster>
        <atom:link href="http://medium.superfeedr.com/" rel="hub"/>
        <item>
            <title><![CDATA[Portswigger web security academy — Blind SQL injection with conditional responses.]]></title>
            <link>https://medium.com/@sysxplore/portswigger-web-security-academy-blind-sql-injection-with-conditional-responses-1b1f7de35bf5?source=rss-de1b88fe9a30------2</link>
            <guid isPermaLink="false">https://medium.com/p/1b1f7de35bf5</guid>
            <category><![CDATA[portswigger-lab]]></category>
            <category><![CDATA[portswigger]]></category>
            <category><![CDATA[sql-injection]]></category>
            <category><![CDATA[sql]]></category>
            <category><![CDATA[cybersecurity]]></category>
            <dc:creator><![CDATA[sysxplore]]></dc:creator>
            <pubDate>Sat, 29 Oct 2022 17:53:36 GMT</pubDate>
            <atom:updated>2022-10-29T17:53:36.101Z</atom:updated>
            <content:encoded><![CDATA[<h3>Portswigger web security academy — Blind SQL injection with conditional responses.</h3><figure><img alt="" src="https://cdn-images-1.medium.com/max/807/1*uBk3Yka3pFShx159QeCU0Q.png" /></figure><h3>Lab description</h3><p>This lab contains a <a href="https://portswigger.net/web-security/sql-injection/blind">blind SQL injection</a> vulnerability. The application uses a tracking cookie for analytics and performs an SQL query containing the value of the submitted cookie.</p><p>The results of the SQL query are not returned, and no error messages are displayed. But the application includes a “Welcome back” message on the page if the query returns any rows.</p><p>The database contains a different table called users, with columns called username and password. You need to exploit the blind<a href="https://portswigger.net/web-security/sql-injection"> SQL injection</a> vulnerability to find out the password of the administrator user.</p><p>To solve the lab, log in as the administrator user.</p><h3>Solution</h3><p>In this lab, the vulnerable parameter is the <em>TrackingId </em>cookie. The results of the SQL query are not returned, and no error messages are displayed, so that means we can not use UNION-based attacks. But the application includes a “<em>Welcome back!</em>” message on the page if the query returns any rows, but if there are no rows returned, the application will not include a “<em>Welcome back!</em>” message on the page.</p><p><strong>Our end goal for this lab is to</strong></p><ol><li>Determine the administrator&#39;s password.</li><li>Sign in as the administrator.</li></ol><h4>Analysis:</h4><ol><li><strong>First, we need to confirm that the parameter is vulnerable to Blind SQL Injection.</strong></li></ol><p>Assume the query would look like this in the back end:</p><pre>select TrackingId from tracking-id table where TrackingId=&#39;EK8BmVEsxZsP2f0z&#39;</pre><p>So if the<em> TrackingId</em> already existed in the database because we have already visited the page, then the query would return the <em>TrackingId</em> and you would see the ‘<em>Welcome back!</em>’ message.</p><p>To confirm that this is vulnerable to Blind SQL Injection we need to submit boolean conditions such as <strong>AND 1=1 </strong>and <strong>AND 1=0</strong>, and look for differences in the application’s responses.</p><p>So let’s first enforce a true boolean condition and check if the application returns the ‘<strong>Welcome back!</strong>’ message so using our query above the new SQL query would look like this:</p><pre>SELECT TrackingId FROM tracking-id-table WHERE TrackingId=&#39;EK8BmVEsxZsP2f0z&#39; AND 1=1 --&#39;</pre><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*duEuORKLlEYYLsSyCth8CQ.png" /></figure><p>As you can see the application returned the ‘<em>Welcome back!</em>’ message, lets now enforce a false boolean expression and see how the application behaves:</p><pre>SELECT TrackingId FROM tracking-id-table WHERETrackingId=’EK8BmVEsxZsP2f0z’ AND 1=0 --‘</pre><p>In this case, the application didn’t return a ‘<em>Welcome back!</em>’ message meaning it’s vulnerable to SQL injection.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*l_cipG0nVICFGHP6FN2zkw.png" /></figure><p>So we have proved the application respond differently on whether we asked it a <strong>true</strong> or <strong>false</strong> question. So the question is, how do we make use of this behavior? So a simple use case is to check if the user table exists in the databases.</p><p><strong>2. Confirm that we have the users table</strong></p><p>So to cofirm this we gonna enforce some bolean conditions again. If the application returns the ‘<em>Welcome back!</em>’ message that measns the table exists, if it doesn’t that means the users table is not available in the database. So to do that our query would look like this:</p><pre>SELECT TrackingId FROM tracking-id-table WHERE TrackingId=&#39;EK8BmVEsxZsP2f0z&#39; AND (SELECT &#39;x&#39; FROM users LIMIT 1)=&#39;x&#39; --&#39;</pre><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*jiAYjBrLhHmRy2t8smSUsw.png" /></figure><p><strong>Let’s break down the above query:</strong><br>In the above query, we embedded a subquery <em>(SELECT ‘x’ from users LIMIT 1)=’x’ </em>to our main query. In case you don’t know, a subquery is a SQL query nested inside a larger query. For more information on this check out this <a href="https://www.w3resource.com/sql/subqueries/understanding-sql-subqueries.php">article</a>.</p><p>So what this subquery does, is it says if there is a table “user” output the value “x” for each entry in the table. For example, If the “users” table has 4 users we should get 4 rows with “x” in them. But, this might destroy our query so we have to limit our output to one row and then check if the returned row with the value “x” is equal to “x”. This statement will evaluate to “true” if the “users” table exists and the whole query will also evaluate to “true” otherwise it will return “false” and the whole query will evaluate to “false” and we will not get a “<em>Welcome back!</em>” message from our application.</p><blockquote>Note that:<br>x is an arbitrary value, you can use any value you want.</blockquote><p>The next thing is to confirm if the user <em>administrator </em>exists in the user table</p><p><strong>3. Confirm the user administrator exists in the user table</strong></p><pre>SELECT TrackingId FROM tracking-id-table WHERE TrackingId=&#39;EK8BmVEsxZsP2f0z&#39; AND (SELECT username from users where username=&#39;administrator&#39;)=&#39;administrator&#39; --&#39;</pre><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*fbFpdwe8V305HNGTC0zYqQ.png" /></figure><p>Again we used a subquery <em>(SELECT username FROM users WHERE username=’administrator’)=’administrator’ </em>with our main query, so what this query does is that it selects the username from the user table where the username is equal to <em>administrator </em>this will return a row which contains the string with the value <em>administrator</em> that’s if the username exists, we then compare if the string in the returned row is equal to <em>administrator</em>. If they’re equal the whole query will evaluate to “true” otherwise it will return false and the whole query will evaluate to “false” and we shouldn’t get a “<em>Welcome back!</em>” message from our application.</p><p>We still get a match, which means the username “administrator” exists.</p><p><strong>4. Enumerate the password for the administrator user</strong></p><p>What we can do is select the password from the user table where the username is the <em>administrator</em> and check if that password is equal to the arbitrary string for example <em>secret</em>. However, this is not a clever way of doing it, because all you are doing is literally brute-forcing the password.</p><pre>SELECT TrackingId FROM tracking-id-table WHERE TrackingId=&#39;EK8BmVEsxZsP2f0z&#39; AND (SELECT password from users where username=&#39;administrator&#39;)=&#39;secret&#39; --&#39;</pre><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*D4V2xirbqPKTzp25ZhBMgg.png" /></figure><p>But what we can do is ask the application “true” or “false” questions, for example, we ask the application if the first character of the password is equal to “a”. If it doesn’t return a “<em>Welcome back!</em>” message we try other characters (b, c, d, 1, 2, and so on) until we get the “<em>Welcome back!</em>” message. Once we get the “<em>Welcome back!</em>” message we then move on to the second character of the password and repeat the procedure until we reach the last password character.</p><p>Before we proceed with the preceding procedure, we must first determine the length of the administrator password. The query to do so would be as follows:</p><pre>SELECT TrackingId FROM tracking-id-table WHERE TrackingId=&#39;EK8BmVEsxZsP2f0z&#39; AND (SELECT username from users where username=&#39;administrator&#39; AND LENGTH(password)&gt;1)=&#39;administrator&#39; --&#39;</pre><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*a2GQBGOxBxJdTN_uum8ihA.png" /></figure><p>The above query will evaluate to “true” and the application will return the “<em>Welcome back!</em>” message, confirming that the password is greater than 1 character in length.</p><p>The next thing is sending a series of follow-up values to test different password lengths:</p><pre>SELECT TrackingId FROM tracking-id-table WHERE TrackingId=’EK8BmVEsxZsP2f0z’ AND (SELECT username from users where username=’administrator’ AND LENGTH(password)&gt;2)=’administrator’ --‘</pre><p>We increment the length again to 3</p><pre>SELECT TrackingId FROM tracking-id-table WHERE TrackingId=’EK8BmVEsxZsP2f0z’ AND (SELECT username from users where username=’administrator’ AND LENGTH(password)&gt;3)=’administrator’ --‘</pre><p>and so on. Because the length of the password is likely to be short, you can do this manually with Burp Repeater. When the condition no longer holds true (i.e. when the “<em>Welcome back!</em>” message disappears), you have determined the password length, which is in this case 20 characters.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*_2Cz5isGVLw0v3ZGokyB0g.png" /></figure><p>After determining the password length, we can begin to ask the application ‘true’ or ‘false’ questions to test the character at each position to determine its value. Because this involves a much larger number of requests, you must use Burp Intruder.</p><p>So enumerate the characters the first character of the password we are going to use the “<a href="https://www.w3schools.com/sql/func_sqlserver_substring.asp">substring</a>” method in our SQL subquery:</p><pre>SELECT TrackingId FROM tracking-id-table WHERE TrackingId=’EK8BmVEsxZsP2f0z’ AND (SELECT SUBSTRING(password,1,1) from users where username=’administrator’)=’a’ --‘</pre><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*-_6ha6PYszVyTaTP2tpcXg.png" /></figure><p>From the above query, we used the <a href="https://www.w3schools.com/sql/func_sqlserver_substring.asp">SUBSTRING()</a> function to extract a single character at position 1 from the password and checked to see if that character is equal to the value “a”. If we get the “<em>Welcome back!</em>” message that means the first character of the password is equal to “a”. If we don’t that means it’s not, so we continue to try other alphanumeric characters.</p><p>As I have mentioned, this involves a much larger number of requests, so you need to send the request to the burp intruder. In the intruder window select “Sniper” as the attack type and add the payload position shown below:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*411a-zmQmZw_ZzUOVqnkoQ.png" /></figure><p>Go to the Payloads tab, check that the “Brute forcer” payload type is selected, and under “Payload Options” add the min and max length to 1 since we want to try one character at a time.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*N7cKlLF_7VXOlB2f1wk7bA.png" /></figure><p>To determine when the correct character was submitted, grep each response for the phrase “Welcome back!” To do so, navigate to the Options tab and then to the “Grep — Match” section. Remove any existing entries from the list, and then enter the value “Welcome back!”</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*95LUUQGTZ6_9E0bGrLcLsQ.png" /></figure><p>Once this is all set launch the attack by clicking the “Start attack” button or selecting “Start attack” from the Intruder menu.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*PR15BBwqZt2OmClZYX0ysw.png" /></figure><p>After the attack is complete you can clearly see we were able to determine the value of the first character of the password in my case it’s “u” but this might be different from yours since the password for this lab is randomly generated. You can then repeat the above procedure for the remaining positions.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*EStzrsjld4hkIqariQ6LOA.png" /></figure><p>This method is inefficient, and it becomes tedious to keep changing the password position value. Fortunately, there is a better way of doing it. Instead of using the “Sniper” attack, we will use the “Cluster bomb” attack which allows us to add multiple payload positions.</p><p>In the intruder window select “Cluster bomb” as the attack type and add the payload positions shown below:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*IlJ3XyOJ8dfXCyjMKsaODA.png" /></figure><p>Go to the Payloads tab, make sure “1” is selected for the payload set and “Numbers” is selected as the payload type, and under “Payload Options,” enter 1, 20, and 1 in the <strong>From:</strong>, <strong>To:</strong>, and <strong>Step:</strong> textboxes, respectively, because we want to go from 1 to 20 in steps of 1.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*TVkxzxvrkTW3cJbezadWRg.png" /></figure><p>Again, in the payloads tab, select “2: for the payload set and “Brute forcer” for the payload type, and under “Payload Options” add the min and max length to 1 since we want to try one character at a time for each password character position.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*Vg11dkq2ihWL6moZ5BnNkg.png" /></figure><p>To also determine when the correct character was submitted, grep each response for the phrase “Welcome back!” To do so, navigate to the Options tab and then to the “Grep — Match” section. Remove any existing entries from the list, and then enter the value “Welcome back!”</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*t0qpFRFiCY7kb3ON9l9OYA.png" /></figure><p>Finally, once this is all set launch the attack by clicking the “Start attack” button or selecting “Start attack” from the Intruder menu.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*60sfB_nJa1Jut5jEms_xhA.png" /></figure><p>Following the completion of the attack, we must begin looking for responses with the ‘Welcome back!’ message and begin mapping the password character position (payload1) with its value (payload2) to get the complete password. The above output clearly shows that the first character of the password is ’n’, as is the fifth character.</p><p>With the complete password you have found, you can then go to “My account” on the password and log in as the administrator to complete the challenge.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*__Ix-X6UaV3_itGghZI-uw.png" /></figure><h3>Conclusion</h3><p>Thank you for making it this far &amp; hopefully you found this article helpful. Feedback is really appreciated 💜.</p><p><strong>I can be found </strong><a href="http://twitter.com/xtremepentest"><strong>@xtremepentest</strong></a><strong> on Twitter or </strong><a href="https://www.linkedin.com/in/xtremepentest"><strong>LinkedIn</strong></a><strong>.</strong></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=1b1f7de35bf5" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Linux fundamentals — Everything you need to know about copying files.]]></title>
            <link>https://medium.com/@sysxplore/linux-fundamentals-everything-you-need-to-know-about-copying-files-a0434b73e2a9?source=rss-de1b88fe9a30------2</link>
            <guid isPermaLink="false">https://medium.com/p/a0434b73e2a9</guid>
            <dc:creator><![CDATA[sysxplore]]></dc:creator>
            <pubDate>Sun, 26 Jun 2022 14:46:14 GMT</pubDate>
            <atom:updated>2022-06-26T14:46:14.856Z</atom:updated>
            <content:encoded><![CDATA[<p>You will frequently need to copy files and directories from one location in the filesystem to another as a system administrator. This is made possible by the cp command.</p><p>The cp command, in its most basic form, takes two parameters: the source object and the destination object:</p><figure><img alt="" src="https://cdn-images-1.medium.com/proxy/0*NcD5hfRFIK7vYMTg" /></figure><p>If both the source and the destination parameters are filenames instead of a directory, the cp command copies the source file to a new destination file. After that, the destination file modification time is then updated.</p><figure><img alt="" src="https://cdn-images-1.medium.com/proxy/0*qf6h8gxpxxEdT8JT" /></figure><p>If the destination file already exists, the cp command may not notify you; this can be dangerous because you may accidentally replace the contents of an important file. To force the shell to ask whether you want to overwrite a file, use the -i option:</p><figure><img alt="" src="https://cdn-images-1.medium.com/proxy/0*1PPMmXDprmX5RoH5" /></figure><p>If you answer y, the file copy will continue; if you answer n, it will stop.</p><p>A file can also be copied into an already existing directory:</p><figure><img alt="" src="https://cdn-images-1.medium.com/proxy/0*9A6FuURRxMTrbdSO" /></figure><p>Tip💡<br><br>You should a trailing forward slash (/) at the end of directory name. The slash indicates that the projects is a directory not a filename. This is useful for clarity and is essential when copying single files.</p><p>If no forward slash is used and the subdirectory</p><p>/home/traw/linux/projects does not exist, a file called projects is created in the current directory and no error message is displayed.</p><p>So you should always use forward slashes to denote directory names.</p><p>Note that, you can also copy a file at the same time changing it’s name.</p><figure><img alt="" src="https://cdn-images-1.medium.com/proxy/0*pvTCo4r4ZIoW20ei" /></figure><p>In the last examples we have been using absolute directory paths, but we can just use relative paths.</p><figure><img alt="" src="https://cdn-images-1.medium.com/proxy/0*bzuf9MUStnbNQnux" /></figure><p>You can also use cp with a single dot (.). Keep in mind that the single dot denotes your current working directory. When copying a file with a long source object name to your current working directory, the single dot can help.</p><figure><img alt="" src="https://cdn-images-1.medium.com/proxy/0*wn55Rt_D-kRpJYuT" /></figure><p>The -R option is a powerful cp command parameter. It allows you to copy the contents of an entire directory recursively in a single command:</p><figure><img alt="" src="https://cdn-images-1.medium.com/proxy/0*75gIzPS1v5vGDVvH" /></figure><p>Notice, If the destination directory does not already exist, the cp -R command will create it before copying the contents of the source directory into it.</p><figure><img alt="" src="https://cdn-images-1.medium.com/proxy/0*xEFuUmfeO5CqxGxy" /></figure><p>This command copied any files that started with my to MyPets. Now the directory contains three pets images instead of being empty.</p><p>Tip💡</p><p>There are numerous other cp command parameters besides those I have talked about.</p><p>Remember that by typing ‘man cp’ or ‘cp — help’, you can see all of the different parameters available for the cp command.</p><p>That’s it for today’s thread!</p><p>Thank you for taking the time to read my brief Linux thread!</p><p>If you enjoyed this thread, follow me <a href="https://twitter.com/xtremepentest">@xtremepentest</a> for future Linux posts, which I will be posting on a daily basis.</p><p><em>Read this post and more on my </em><a href="https://typeshare.co/traw/posts/linux-fundamentals---everything-you-need-to-know-about-copying-files-7prh"><em>Typeshare Social Blog</em></a></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=a0434b73e2a9" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Linux fundamentals — Everything you need to know about copying files.]]></title>
            <link>https://medium.com/@sysxplore/linux-fundamentals-everything-you-need-to-know-about-copying-files-a963c60cd99a?source=rss-de1b88fe9a30------2</link>
            <guid isPermaLink="false">https://medium.com/p/a963c60cd99a</guid>
            <dc:creator><![CDATA[sysxplore]]></dc:creator>
            <pubDate>Sun, 26 Jun 2022 14:45:24 GMT</pubDate>
            <atom:updated>2022-06-26T14:45:24.532Z</atom:updated>
            <content:encoded><![CDATA[<p>You will frequently need to copy files and directories from one location in the filesystem to another as a system administrator. This is made possible by the cp command.</p><p>The cp command, in its most basic form, takes two parameters: the source object and the destination object:</p><figure><img alt="" src="https://cdn-images-1.medium.com/proxy/0*DfKvy75sb3-dTxG-" /></figure><p>If both the source and the destination parameters are filenames instead of a directory, the cp command copies the source file to a new destination file. After that, the destination file modification time is then updated.</p><figure><img alt="" src="https://cdn-images-1.medium.com/proxy/0*wsDey3LsKDgx4uqu" /></figure><p>If the destination file already exists, the cp command may not notify you; this can be dangerous because you may accidentally replace the contents of an important file. To force the shell to ask whether you want to overwrite a file, use the -i option:</p><figure><img alt="" src="https://cdn-images-1.medium.com/proxy/0*_Atibh4dzXpzKD52" /></figure><p>If you answer y, the file copy will continue; if you answer n, it will stop.</p><p>A file can also be copied into an already existing directory:</p><figure><img alt="" src="https://cdn-images-1.medium.com/proxy/0*5ePA-og5adsVcufy" /></figure><p>Tip💡<br><br>You should a trailing forward slash (/) at the end of directory name. The slash indicates that the projects is a directory not a filename. This is useful for clarity and is essential when copying single files.</p><p>If no forward slash is used and the subdirectory</p><p>/home/traw/linux/projects does not exist, a file called projects is created in the current directory and no error message is displayed.</p><p>So you should always use forward slashes to denote directory names.</p><p>Note that, you can also copy a file at the same time changing it’s name.</p><figure><img alt="" src="https://cdn-images-1.medium.com/proxy/0*iHDjzJC10SIbuY7w" /></figure><p>In the last examples we have been using absolute directory paths, but we can just use relative paths.</p><figure><img alt="" src="https://cdn-images-1.medium.com/proxy/0*oWDAX_IVHULYRZ_D" /></figure><p>You can also use cp with a single dot (.). Keep in mind that the single dot denotes your current working directory. When copying a file with a long source object name to your current working directory, the single dot can help.</p><figure><img alt="" src="https://cdn-images-1.medium.com/proxy/0*gp2u3oRM9l-Xsrqh" /></figure><p>The -R option is a powerful cp command parameter. It allows you to copy the contents of an entire directory recursively in a single command:</p><figure><img alt="" src="https://cdn-images-1.medium.com/proxy/0*a4KJgKYwQJZzTkZn" /></figure><p>Notice, If the destination directory does not already exist, the cp -R command will create it before copying the contents of the source directory into it.</p><figure><img alt="" src="https://cdn-images-1.medium.com/proxy/0*OKFRd3-HM14m4-DF" /></figure><p>This command copied any files that started with my to MyPets. Now the directory contains three pets images instead of being empty.</p><p>Tip💡</p><p>There are numerous other cp command parameters besides those I have talked about.</p><p>Remember that by typing ‘man cp’ or ‘cp — help’, you can see all of the different parameters available for the cp command.</p><p>That’s it for today’s thread!</p><p>Thank you for taking the time to read my brief Linux thread!</p><p>If you enjoyed this thread, follow me <a href="https://twitter.com/xtremepentest">@xtremepentest</a> for future Linux posts, which I will be posting on a daily basis.</p><figure><img alt="" src="https://cdn-images-1.medium.com/proxy/0*i-PXh40NkB79Q5qy" /></figure><p><em>Read this post and more on my </em><a href="https://typeshare.co/traw/posts/linux-fundamentals---everything-you-need-to-know-about-copying-files-7prh"><em>Typeshare Social Blog</em></a></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=a963c60cd99a" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Linux Fundamentals — Creating files, a short and simple article]]></title>
            <link>https://medium.com/@sysxplore/linux-fundamentals-creating-files-a-short-and-simple-article-df55a10982ce?source=rss-de1b88fe9a30------2</link>
            <guid isPermaLink="false">https://medium.com/p/df55a10982ce</guid>
            <dc:creator><![CDATA[sysxplore]]></dc:creator>
            <pubDate>Sat, 25 Jun 2022 10:44:47 GMT</pubDate>
            <atom:updated>2022-06-25T10:44:47.665Z</atom:updated>
            <content:encoded><![CDATA[<p>As a Linux user, you may find yourself in a situation where you need to create an empty file.</p><p>For example, some applications require the presence of a log file before they can write to it. In these cases, the touch command can be used to quickly create an empty file:</p><figure><img alt="" src="https://cdn-images-1.medium.com/proxy/0*2XznmTlZs7lDmCPc" /></figure><p>The touch command creates the new file you specify and makes you the file’s owner.</p><p>The file size in the preceding snippet is zero because the touch command simply created an empty file.</p><p>The touch command can also be used to modify the time of an existing file, without even changing the file’s contents:</p><figure><img alt="" src="https://cdn-images-1.medium.com/proxy/0*3NxsMJcrE-imy7hM" /></figure><p>Notice, the log.txt file’s modification time has been changed from 12:18 to 12:25.</p><p>Creating empty files and changing file time stamps is not something you will do on a regular basis on a Linux system, but it is useful to know that it is possible.</p><p>That’s it for today’s article!</p><p>Thank you for taking the time to read my brief Linux article!</p><p>If you enjoyed this thread, follow me @xtremepentest for future Linux posts, which I will be posting on a daily basis.</p><p><em>Read this post and more on my </em><a href="https://typeshare.co/traw/posts/linux-fundamentals---creating-files-a-short-and-simple-thread-565z"><em>Typeshare Social Blog</em></a></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=df55a10982ce" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[The Top 17 Python Libraries for Ethical Hacking with explanation↓]]></title>
            <link>https://medium.com/@sysxplore/the-top-17-python-libraries-for-ethical-hacking-with-explanation-a224cfb543eb?source=rss-de1b88fe9a30------2</link>
            <guid isPermaLink="false">https://medium.com/p/a224cfb543eb</guid>
            <dc:creator><![CDATA[sysxplore]]></dc:creator>
            <pubDate>Mon, 20 Jun 2022 14:52:27 GMT</pubDate>
            <atom:updated>2022-06-20T14:52:27.098Z</atom:updated>
            <content:encoded><![CDATA[<p>Python is a popular choice among security professionals and ethical hackers due to its versatility and extensive library of libraries that may be utilized to aid in ethical hacking.</p><p>Ethical hacking, also known as penetration testing, is the technique of breaking into computers and devices lawfully in order to assess the security of computer programs, networks, and data.</p><p>As a hacker, you may easily create your own ethical hacking tools to automate certain task using python.</p><p>Furthermore, hackers and cybersecurity professionals utilize Python scripts to analyze malware and uncover vulnerabilities, though some use Python to develop exploit programs.</p><p>In this thread, we will look at the top 17 Python libraries for ethical hacking or penetration testing.</p><ul><li>Scapy</li><li>Requests</li><li>Beautiful Soup 4</li><li>Socket</li><li>pwntools</li><li>IMpacket</li><li>Paramiko</li><li>Pexpect</li><li>selenium</li><li>Faker</li><li>pylibnet</li><li>RawSocketPy</li><li>Twisted</li><li>Pymetasploit3</li><li>Cryptography</li><li>python-map</li><li>Mechanize</li></ul><p>𝗦𝗰𝗮𝗽𝘆</p><p>Scapy is a complete interactive packet manipulation tool written in Python by Philippe Biondi. The tool is used to manipulate network packets, which aids in network discovery, probing, tracing, routing, and scanning.</p><p>It is a strong interactive packet manipulation tool and library written in Python</p><p>𝗥𝗲𝗾𝘂𝗲𝘀𝘁𝘀<br><br>The requests library is a fantastically useful and adaptable tool for developing Python programs that interface with online services.</p><p>This module makes HTTP requests more user-friendly by including intuitive features like automated content decompression and decoding, connection timeouts, authentication, and so on.</p><p>𝗕𝗲𝗮𝘂𝘁𝗶𝗳𝘂𝗹 𝗦𝗼𝘂𝗽 𝟰</p><p>Beautiful Soup is a Python package for parsing HTML and XML documents. It creates a parse tree for parsed pages that can be used to extract data from HTML, which is useful for web scraping.</p><p>𝗦𝗼𝗰𝗸𝗲𝘁</p><p>The socket module <strong>defines how server and client machines can communicate at hardware level using socket endpoints on top of the operating system</strong>. The ‘socket’ API supports both connection-oriented and connectionless network protocols.</p><p>𝗽𝘄𝗻𝘁𝗼𝗼𝗹𝘀</p><p>pwntools is a Python-based CTF (Capture-the-Flag) framework and exploit development package. It is intended to aid in rapid prototyping and development.</p><p>pwntools includes a variety of useful tools for penetration testing, reversing engineering automation, developing exploits, fuzzing programs, and more.</p><p>pwntools allows users to quickly design exploits for CTF challenges.</p><p>𝗜𝗠𝗽𝗮𝗰𝗸𝗲𝘁</p><p>Used for interacting with network protocols. Currently, the library focuses on supporting low-level socket programming, TCP/IP, and a variety of higher-level protocols. It’s a Python package that allows programmers to easily construct and decode network packets.</p><p>Many hackers and penetration testers utilize Impacket to create unique network-based intrusion attacks such as man in the middle and session hijacking. It was created as an internal testing tool but has evolved into a strong hacker’s tool that may be used against networks.</p><p>𝗣𝗮𝗿𝗮𝗺𝗶𝗸𝗼</p><p>Paramiko is <strong>a Python library that makes a connection with a remote device through SSh</strong>. Paramiko is using SSH2 as a replacement for SSL to make a secure connection between two devices. It also supports the SFTP client and server model.</p><p>𝗣𝗲𝘅𝗽𝗲𝗰𝘁</p><p>A Python module for automatically spawning and controlling child apps. Pexpect can be used to automate interactive programs like ssh, ftp, passwd, telnet, and so on. It can be used to automate setup scripts for installing software packages on multiple servers.</p><p>𝗦𝗲𝗹𝗲𝗻𝗶𝘂𝗺</p><p>Selenium is <strong>a powerful tool for controlling web browsers through programs and performing browser automation</strong>. It is functional for all browsers and works on all major OS.</p><p>𝗙𝗮𝗸𝗲𝗿</p><p>Faker is a Python package that creates fictitious data. It can generate anything from fake texts, bibliography entries, XML documents, and so on. Faker is extremely simple to use.</p><p>Simply call ‘<a href="http://faker.name/">faker.name</a>()’ to get a random name, and ‘faker.address()’ to get a fake address. It includes a plethora of other functions for creating bogus data. There are a number of reasons why you might want to use Faker.</p><p>Perhaps you need to populate a database with fictitious data for a prototype, or you want to remain anonymous online by using fictitious credentials or addresses.</p><p>𝗽𝘆𝗹𝗶𝗯𝗻𝗲𝘁</p><p>Pylibnet is a python module for the libnet packet injection library. It provides a python API for libnet, and provides functionality for sending packets, sniffing frames, and displaying libpcap traces.</p><p>𝗥𝗮𝘄𝗦𝗼𝗰𝗸𝗲𝘁𝗣𝘆</p><p>Raw socket is a layer 2 python library for communication using the MAC addresses only. This library allows you to implement a custom layer 2 communication using raw sockets in Python, synchronous and asynchronous.</p><p>𝗧𝘄𝗶𝘀𝘁𝗲𝗱</p><p>Twisted is an event-driven networking engine written in Python. It provides an abstraction of the TCP protocol that makes it easy to write network clients and servers.</p><p>It is particularly notable for its broad support of SSL, IPv6, and a large number of protocols including the following: HTTP, IRC, NNTP, SMTP, POP3, IMAP, SSHv2, and DNS. Twisted supports both synchronous and asynchronous networking paradigm.</p><p>𝗣𝘆𝗺𝗲𝘁𝗮𝘀𝗽𝗹𝗼𝗶𝘁𝟯</p><p>Pymetasploit3 is a full-fledged Python3 Metasploit automation library. It can interact with Metasploit either through msfrpcd or the msgrpc plugin in msfconsole.</p><p>𝗖𝗿𝘆𝗽𝘁𝗼𝗴𝗿𝗮𝗽𝗵𝘆</p><p>Cryptography is a Python package that provides cryptographic recipes and primitives. Encryption, hashing, random number generation, signatures, and ciphers for block and stream ciphers are all included.</p><p>It provides a higher-level API to cryptographically strong algorithms such as digital signatures, as well as low-level cryptographic building blocks optimized for performance.</p><p>This functionality is used in ethical hacking to encrypt and decrypt sensitive information shared on the internet. In general, cryptography serves as the foundation of a secure internet.</p><p>𝗽𝘆𝘁𝗵𝗼𝗻-𝗻𝗺𝗮𝗽</p><p>is a python library that helps in using Nmap port scanner. Nmap is a network administration and security auditing tool. It is typically used to discover hosts and services available on a network, although it can also be used to examine a single host.</p><p>The python-nmap library serves as a python wrapper for the Nmap tool allowing you to easily access, use and manipulate the features and functionality of Nmap in python. The library does not replace the Nmap tool but only provides an interface to interact with Nmap.</p><p>It offers a rich set of features for port scanning, host discovery, and TCP/IP fingerprinting. This library is a perfect tool for hackers and systems administrators who want to automate network scanning tasks and reports. It also supports nmap script outputs.</p><p>𝗠𝗲𝗰𝗵𝗮𝗻𝗶𝘇𝗲</p><p>The mechanize module in Python is similar to perl WWW:Mechanize.</p><p>It gives you a browser like object to interact with web pages.</p><p>That’s it! <br><br>Thank you for making it this far. Hopefully you will find this thread useful.</p><p>Additions are welcomed.<br><br><br>Check me out <a href="https://twitter.com/xtremepentest">@xtremepentest</a> if you liked this thread!! <br><br>I’m gonna be tweeting more about Linux, networking, security etc.</p><p><em>Read this post and more on my </em><a href="https://typeshare.co/traw/posts/the-top-17-python-libraries-for-ethical-hacking-with-explanation"><em>Typeshare Social Blog</em></a></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=a224cfb543eb" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Basic Linux Utilities Every User Should Know]]></title>
            <link>https://medium.com/@sysxplore/basic-linux-utilities-every-user-should-know-f26a85cf0416?source=rss-de1b88fe9a30------2</link>
            <guid isPermaLink="false">https://medium.com/p/f26a85cf0416</guid>
            <dc:creator><![CDATA[sysxplore]]></dc:creator>
            <pubDate>Tue, 17 May 2022 13:33:55 GMT</pubDate>
            <atom:updated>2022-05-17T13:33:55.033Z</atom:updated>
            <content:encoded><![CDATA[<p>Linux has a command for almost every task, and the majority of them are simple and easy to understand. In this thread, I’ve gathered 17 useful utilities for Linux users that you’ll find useful if you use Linux as your daily driver🧵👇</p><h4>🐧 Getting Help in Linux</h4><ul><li>man — used to display the user manual of any command that we can run on the terminal. for more details on this command checkout it’s man pages.</li><li>help — in Bash shell, without any parameters the command will display the list of all available built-in bash commands. If you specify the command name as a parameter it will display the info about the bash command you specify.</li><li>whatis command — display a one-line description of the command you specify.</li><li>command — help — display usage information about the command. Sometimes command -h also works, but not for all commands.</li></ul><h4>🐧 User identification and who is who in Linux world</h4><ul><li>hostname — used to check the system name that is assigned to a Linux machine. However, this command can also be paired up with other different flags for getting different outputs.</li><li>passwd — Change password of current user. To change a specific user password you have to add the username as a argument ex: passwd username.</li><li>whoami — <strong>whoami</strong> command is used both in <em>Unix Operating System</em> and as well as in <em>Windows Operating System</em>. It displays the username of the current user.</li><li>who — displays a list of users who are currently logged into the computer. The who command is related to the command w, which provides the same information but also displays additional data and statistics.</li><li>w — display current system status, time, duration, list of users currently logged in on system and other user information.</li><li>last — shows who recently used the system.</li><li>last root — dsiplays when was the last time root logged in as user.</li><li>lastb — shows all bad login attempts into the system.</li><li>chmod — changing permissions — read,write,execute of a file or directory.</li></ul><h4>🐧 Process related information</h4><ul><li>top — list all processes sorted by their current system resource usage. Displays a continually updated list of processes (By default 3 seconds). Use q key to exit top.</li><li>ps — List processes currently running on current shell session.</li><li>ps -u root — List all of the processes and commands root is running.</li><li>ps aux — List all the processes by all users on the current system.</li></ul><h4>Conclusion</h4><p>Basic Linux utilities enable you to complete tasks quickly and efficiently. Some of these commands may take some time to remember, but nothing is impossible with lots of practice.</p><p>Finally, knowing and mastering these fundamental Linux commands will undoubtedly help you manage your Linux desktop. Best wishes!</p><p>That’s it for today’s thread. Glad you have reached this far. If you found this thread valuable:</p><ol><li>Toss me a follow for more threads on Linux and Security → @xtremepentest</li><li>Like &amp; RT the first tweet so other Linux folks can find it too</li><li>And be sure to add more utilities</li></ol><p><em>Read this post and more on my </em><a href="https://typeshare.co/traw/posts/basic-linux-utilities-every-user-should-know"><em>Typeshare Social Blog</em></a></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=f26a85cf0416" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[33 Linux Terminal Shortcuts Every Power Linux User Must Know↓]]></title>
            <link>https://medium.com/@sysxplore/33-linux-terminal-shortcuts-every-power-linux-user-must-know-f59a496c60ac?source=rss-de1b88fe9a30------2</link>
            <guid isPermaLink="false">https://medium.com/p/f59a496c60ac</guid>
            <dc:creator><![CDATA[sysxplore]]></dc:creator>
            <pubDate>Mon, 16 May 2022 09:43:27 GMT</pubDate>
            <atom:updated>2022-05-16T09:43:27.648Z</atom:updated>
            <content:encoded><![CDATA[<p>A novice Linux user may find the Linux terminal interface difficult to grasp, especially because it relies heavily on the arrow keys to move around. Furthermore, constantly retyping the commands, each with a slight variation, can be tedious.</p><p>Bash, on the other hand, includes a plethora of simple keyboard shortcuts and history functions that ensure efficient terminal use.</p><p>Having these terminal shortcut keyboard key combinations memorized will save you a lot of time.</p><p>To help you make better use of your time, I’ve compiled a list of the most commonly used Bash keyboard shortcuts.👇</p><p>I’d like to point out that some of these shortcuts may be dependent on the Shell you’re using. Because Bash is the most popular shell, the list is centered on it. I also tested the majority of them on ZSH and found them to be compactible.</p><h4>📜 Cursor Movement</h4><p>→ Ctrl + A Go to the beginning of the line you are currently typing on.</p><p>→ Ctrl + E Go to the end of the line you are currently typing on.</p><p>→ Ctrl + XX Move between the beginning of the line and the current position of the cursor.</p><p>→ Alt + F Move cursor forward one word on the current line.</p><p>→ Alt + B Move cursor backward one word on the current line.</p><p>→ Ctrl + F Move cursor forward one character on the current line.</p><p>→ Ctrl + B Move cursor backward one character on the current line.</p><h4>📜 Text manipulation</h4><p>→ Ctrl + U Cut the line from the current position to the beginning of the line, adding it to the clipboard. If you are at the end of the line, it cuts the entire line.</p><p>→ Ctrl + K Cut the line from the current position to the end of the line, adding it to the clipboard. If you are at the beginning of the line, cut the entire line.</p><p>→ Ctrl + W Delete the word before the cursor, adding it to the clipboard.</p><p>→ Ctrl + Y Paste the last thing from the clipboard that you cut recently (undo the last delete at the current cursor position).</p><h4>📜 History access</h4><p>→ Ctrl + R Lets you search through previously used commands.</p><p>→ Ctrl + G Leave history searching mode without running a command.</p><p>→ Ctrl + J Lets you copy current matched command to command line without running it, allowing you to make modifications before running the command.</p><p>→ Alt + R Revert any changes to a command you’ve pulled from your history, if you’ve edited it.</p><p>→ Ctrl + P Shows last executed command, i.e. walk back through the command history (Similar to up arrow).</p><p>→ Ctrl + N Shows next executed command, i.e. walk forward through the command history (Similar to down arrow).</p><h4>📜 Terminal/Process control</h4><p>→ Ctrl + L Clears the screen, similar to the clear command.</p><p>→ Ctrl + S Stop all output to the screen. This is useful when running commands with lots of long output. But this doesn’t stop the running command.</p><p>→ Ctrl + Q Resume output to the screen after stopping it with Ctrl+S.</p><p>→ Ctrl + C End currently running process and return the prompt.</p><p>→ Ctrl + D Log out of the current shell session, similar to the exit or logout command. In some commands, acts as End of File signal to indicate that a file end has been reached.</p><p>→ Ctrl + Z Suspends (pause) currently running foreground process, which return shell prompt. You can then use bg command allowing that process to run in the background. To again bring that process to foreground, use fg command. To view all background processes, use jobs command.</p><p>→ Tab Auto-complete files and directory names.</p><p>→ Tab Tab Shows all possibilities, when typed characters doesn’t uniquely match to a file or directory name.</p><p>→ Ctrl + S Gets the next most recent command</p><p>→ Ctrl + O Runs and re-enters the command found via Ctrl + S and Ctrl + R</p><p>→ Ctrl + G Exits history search mode</p><h4>📜 <strong>Bash Information</strong></h4><p>→ ~TAB TAB List all Linux users</p><p>→ Ctrl + I Completes the command like TAB</p><p>→ Alt + ? Display files/folders in the current path for help</p><p>→ Alt + * Display files/folders in the current path as parameter</p><h4>📜 Close Terminal</h4><p>→ Ctrl + Shift + W To close terminal tab.</p><p>→ Ctrl + Shift + Q To close entire terminal.</p><p>That’s for today’s blog, be sure to try out these shortcuts and be amazed.</p><p>The shortcuts above are only a tip of an iceberg. The more you learn about Linux terminal commands and Bash shortcuts, the more simple and interesting Linux becomes.</p><p>If you found this blog valuable:</p><p>1. Toss me a follow for more threads on Linux and Security → <a href="https://twitter.com/xtremepentest">@xtremepentest</a></p><p>2. Share so other Linux folks can find it too.</p><p><em>Read this post and more on my </em><a href="https://typeshare.co/traw/posts/33-linux-terminal-shortcuts-every-power-linux-user-must-know--p23j"><em>Typeshare Social Blog</em></a></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=f59a496c60ac" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[10 grep command usage examples that every Linux user, sysadmin and developer should be familiar…]]></title>
            <link>https://medium.com/@sysxplore/10-grep-command-usage-examples-that-every-linux-user-sysadmin-and-developer-should-be-familiar-a2db8bec58bc?source=rss-de1b88fe9a30------2</link>
            <guid isPermaLink="false">https://medium.com/p/a2db8bec58bc</guid>
            <dc:creator><![CDATA[sysxplore]]></dc:creator>
            <pubDate>Thu, 28 Apr 2022 15:02:28 GMT</pubDate>
            <atom:updated>2022-04-28T15:02:28.667Z</atom:updated>
            <content:encoded><![CDATA[<h3>10 grep command usage examples that every Linux user, sysadmin and developer should be familiar with</h3><p>The grep command is powerful utility for searching text within files in the Linux command line.</p><p>Here are 10 grep command usage examples that every Linux user, sysadmin and developer should be familiar with.</p><p>If you’re wondering, grep stands for <em>global regular expression print</em>.</p><p>You can use grep to search in files, or combine it with pipes to filter the output of another command.</p><p>Once you’ve mastered it, you’ll find it quite useful in your day-to-day work as a Linux user.</p><p>In the examples that follow, I will use a file called ‘quotes.txt’ to demonstrate how to use the commands.</p><p>This file’s contents are listed below:<br><br><a href="https://pastebin.com/uUgZUGBB%EF%BF%BC">https://pastebin.com/uUgZUGBB</a></p><figure><img alt="" src="https://cdn-images-1.medium.com/proxy/0*sZob9_FYdimDBoCP" /></figure><h4>1. Finding all occurrences of a string in the given file.</h4><p>This example we tell grep to search for (God) and we provide the place to look for it (quotes.txt)</p><p>If there are spaces in the string you want to search, you must put quotes around it:</p><figure><img alt="" src="https://cdn-images-1.medium.com/proxy/0*lf0LznD6OTdkGXHQ" /></figure><h4>2. Filtering/Searching output of another command</h4><p>As previously stated, grep can be used to filter/search the output of another command. We may replicate the functionality shown above by using:</p><figure><img alt="" src="https://cdn-images-1.medium.com/proxy/0*y2sE3fwNJZaX501h" /></figure><h4>3. Display Line Numbers Containing Matches</h4><p>Using the -n option together with grep it will show the line numbers:</p><figure><img alt="" src="https://cdn-images-1.medium.com/proxy/0*NGRV76lmytzHG-QP" /></figure><h4>4. Making grep search case insensitive</h4><p>Grep search is case sensitive by default. You want the search to be case insensitive you can use -i flag.</p><figure><img alt="" src="https://cdn-images-1.medium.com/proxy/0*RhXeBHptAashPpmP" /></figure><h4>5. Using regular expressions</h4><p>The search string can be a regular expression, which makes grep quite strong. However, I will not go into detail on how to use regex with grep in this thread.</p><figure><img alt="" src="https://cdn-images-1.medium.com/proxy/0*oya_SGwcbd43kmyl" /></figure><p>You can boost the power of your search by employing a regex pattern. There is a special option -e that allows you to use a regex pattern. Option -E enables the use of extended regex patterns.</p><figure><img alt="" src="https://cdn-images-1.medium.com/proxy/0*2o43WHsyZubdNlOK" /></figure><h4>6. Displaying all the lines that DO NOT match the given pattern.</h4><p>Another thing you might find useful is to use the -v option to reverse the result, eliminating the lines that match a specific string:</p><figure><img alt="" src="https://cdn-images-1.medium.com/proxy/0*FTLMXLACBIJJOQ4v" /></figure><h4>7. Find Exact Match Words</h4><p>If you search for the phrase ‘ice,’ grep will also return lines containing the words ‘dice’ or ‘prejudice.’</p><p>Fortunately, grep has option -w: which allows it search and match the exact whole words only.</p><figure><img alt="" src="https://cdn-images-1.medium.com/proxy/0*_p-f0bk1-PDXqhB4" /></figure><h4>8. Searching in all files recursively</h4><p>With the grep option -r, you can execute a recursive search. It will look for the specified pattern in all files in the current directory and its sub-directories</p><figure><img alt="" src="https://cdn-images-1.medium.com/proxy/0*PB-req5hM7InS0Qu" /></figure><h4>9. Print only names of FILEs with selected lines</h4><p>Grep displays the matching lines by default. If you only want to know which files contain the string, use the following command:</p><figure><img alt="" src="https://cdn-images-1.medium.com/proxy/0*fN6I99WI3hCWL1Vp" /></figure><h4>10. Print only names of FILEs with no selected lines</h4><p>If you only want to know which files do contain the string, use the following command:</p><figure><img alt="" src="https://cdn-images-1.medium.com/proxy/0*-8rR40wH82WwdOg_" /></figure><p>Those were some simple examples for using grep.</p><p>If you read its man page, you will notice plenty of additional parameters and uses for this handy command.</p><p>If you found this artile valuable:</p><p>1. Toss me a follow for more threads on Linux and Security → @xtremepentest <br>2. Consider sharing this article with other Linux folks.</p><p><em>Read this post and more on my </em><a href="https://typeshare.co/traw/posts/10-grep-command-usage-examples-that-every-linux-user-sysadmin-and-developer-should-be-familiar-with"><em>Typeshare Social Blog</em></a></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=a2db8bec58bc" width="1" height="1" alt="">]]></content:encoded>
        </item>
    </channel>
</rss>