part 8 linux commands

Basic Linux Commands for Hackers | Part 8

Introduction

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 ????????

Video

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. ????????

https://discord.gg/uekQW7RQZ8

https://odysee.com/@techyrick:d

https://twitter.com/HacklikeHacker

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.

./<file>
./bash

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
./bash

Conclusion

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

 

Scroll to Top