Basic Linux Commands for Hackers | Part 8


In the previous post, You must have learned about some of the basic commands related to process management. In this post let’s learn about scripting.

Below is the video format of the post, Do check that also ????????


Let’s start ????

If you have any doubts you can watch the video above or you can ask questions in Discord I have given my Twitter profile link so you can ask there. ????????

Your First Bash Script

To begin, you must inform your operating system of the script interpreter you intend to employ. To do this, add a shebang, which is a hash mark and an exclamation point together, like in the example below:


And then after the shebang we need to enter /bin/bash telling your OS to use bash shell interpreter.

#! /bin/bash

Now lets just enter a echo command with a comment and give the file execute permission.

#! /bin/bash
echo "Hello, Techyrick"

Now enter chmod 777 and the file name to give execute permission and run the file.


Scanner using Script

Let’s create a script to scan for HTTP ports alone. Or if we want add scan for the full port we can specify that too.

#! /bin/bash
#This script is designed to find hosts with http installed
nmap -p 0-65535 > result.txt


Guess that’s it for part 8 see you in the next part. Hope you like it ❤️

Ads Blocker Image Powered by Code Help Pro

Ads Blocker Detected!!!

We have detected that you are using extensions or brave browser to block ads. Please support us by disabling these ads blocker.Our website is made possible by displaying Ads hope you whitelist our site. We use very minimal Ads in our site