Linux and Unix Scripting

Linux – Bash -DDOS Checker, Check if your website is under attack Script.

DDOS Checker, Check if your website is under attack Script. ——————– #!/bin/bash clear if ! [ $1 ];then echo “Usage: ${0##/} [URL]” exit 1 fi url=$(echo $1 | sed ‘s!.*/!!g’) # remove https if included down=$(curl -s “https://api.downfor.cloud/httpcheck/$url” -H “User-Agent: Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/74.0.3729.169 Safari/537.36” -H “Referer: https://downforeveryoneorjustme.com/$url” -H “Origin: […]

Linux and Unix

Shell programming with bash

The bash shell in Linux can be run from the command line or in executable files, due to one command per line. These command files are called scripts, and usually the scripts contain more than just command estates. In fact, we can add control structures to control the execution flow. Control structures Control structures are […]

Linux and Unix

Linux files and Directory Structure, Explained

In Linux, everything is a file. The files are designated by their path; This represents the position of the file in the directory hierarchy. At the top of this hierarchy is the root, designated by « / ». For Example: /var/log/btmp This path designates the btmp file or directory contained in the log directory, itself […]

Linux and Unix

Linux Tutorial : Understand Permissions on files and directories

All files and directories created in a UNIX/Linux file system will be assigned a set of permissions. These permissions affect three sets of users: The owner user The owner group Other users and groups The rights of each user on the files consist of being able to read, modify or execute. For example, if we […]

Linux and Unix

Linux Disk Management

In Linux there is only one file system; so storage devices are not a root in itself, as is the case in Windows systems. However each storage hardware device corresponds to an object in the/dev directory; However, we cannot access the data that it contains from there. Hardware devices are identified by two names: first, […]

Linux and Unix Scripting

Linux script (Scan and Port monitoring)

This script will allow you to process 4 things. 1- Scan a domain name 2- Scan scan domain and port 3- Scan a list of port 4- Monitoring port and black IP address and send alarm alert by mail (sendgrid) ————————————————————————————-   #!/bin/bash clear green=’\033[1;32m’ red=’\e[1;31m’ reset=’\033[0m’ SENDGRID_API_KEY=”<API KEY HERE>” EMAIL_TO=”<YOUR EMAIL>” FROM_EMAIL=”<ANYTHING YOU WANT>” […]

Linux and Unix

6 Useful advanced grep options like grep -v ftpd, grep -rl

Usually, grep command is used for searching a string or regular expression against a file or files or an input stream. Here I am discussing the advanced grep options used for grep command, like grep -rl, grep -v ftpd, which is helpful for the system admin to get filtered results from the logs and other command outputs. Counting […]

Linux and Unix Scripting

Learn Cron job on Linux – CronTab – Cron Task – Linux – bash script | Audain.net

Linux Linux Cron program allows you to save a list of tasks that will be executed periodically thru the Cron job rules. You can create a bash script to process your Cron task or only use the bash commands. [[email protected] ~] # crontab audain.cron First of all this is the options list: -l : Displays the list […]