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.
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 192.168.65.25 -p 0-65535 > result.txt
Guess that’s it for part 8 see you in the next part. Hope you like it ❤️