Recently, to the internal network for debugging and access, bought 3 peanuts can only map 6 ports, is not enough to meet the needs, just have a friend to me said Ngrok can also be carried through the intranet, research for a few days, light
In the shell (I'm bash here) there is no traditional "data type", and the values stored in any variable are "strings" of characters. Of course, you can declare a variable to be an integral type, an array, and so on by declare. Among them, the array
Suppose we are confronted with a problem like this, the company's key data copy to the test server, after it is deleted directly, still worry that the server vendor can restore it, even through Fdisk reformatting, there is still the risk of recovery,
I. Issues and needs:
For example, there is a aa.list file that reads:
1 2 3 4A B c D
For script reads a file, I want to read in one row, read one row at a time, like the first time is 1 2 3 4, the second is a B c DBut I wrote this.
For I in "$
Finally, came to the Shell 13 ask the last question ... Long Breath ~ ~ ~ ~ ~
The last thing to introduce is a common "loop" in shell script design.
The so-called loop is the code in the script that repeats itself under certain conditions.
The
Requirements: There are two pages in the program for a purpose, and now you need to count the number of visits per minute between the two pages, including total hits, number of successes (status code 200), and number of failures. Then write to MySQL.
The specific script content is as follows:
The code is as follows
Copy Code
$ vim/home/rainbow/sbin/block_attack_ips.sh #!/bin/bash Logfile=/webserver/blog/logs/rainbow_access.log function Check_root () {If [$EUID-ne 0];
Example 1
Typical operation, traversing all JS in the directory and using Yuicompressor compression
The code is as follows
Copy Code
For i in ' Find Asset/v2-name ' *.js ';Todoecho "Compress $i"Java-jar
Build a Php+mysql platform, the range for DVWA, set the SQL injection range level of low (easy to test use).Enter 1 in the Submit box, grab the package with Burp, copy the package data to the Cookies.txt document, and drag to the Kali
1. Create the executable file t2.sh and print "Hello world!"[Email protected] ~~ $ cd tscripts/'#!/bin/bash' >>' echo "Hello world!" ' >>~/tscripts $ chmod +x *~/tscripts $./t2.sh Helloworld!2. Methods to run the executable file in 3[Email
When you just learned to write shell batches, there is no need to base your logic operations on the basics: arithmetic, here's a simple implementation method in the Linux shell.1. Simple method$ b=$ ((5*5+5-3/2))$ echo $b29In the Linux shell, we can
Original file:Find/etc-name passwd 2>&1 | Tee Ee.log1. Cat-n The document contents of the E.log with the line number and enter E2.log in this document:[Email protected] ~/t2scripts $ cat-n E.log |Tee E2.log1/etc/passwd2 3 4Find:
ZshThe Mac system comes with zsh, which is generally not the latest version, and can be installed by Homebrew if requiredBrew Install Zshzsh --versionversion of Zsh can be viewed by commandUse echo $ZSH_VERSION the command to view the ZSH version
echo Display in shell script with color display, echo display with color, need to use parameter-EThe format is as follows:For example:Where 41 of the position represents the background, 36 of the position is the color of the wordNote:1, the word
First, the installation instructions for the CentOS 5 example1, install the necessary development kits [[email protected] ~]# yum install gcc gcc-c++ autoconf automake2. Download phddns-2.0.2.16556.tar.gz to a directory [[email protected] ~]# wget
Shc methodShc is a tool for encrypting shell scripts. It converts shell scripts into executable binary files.Automated maintenance of the system using shell scripts is simple, convenient, and portable.However, shell scripts can be read and written,
The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion;
products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the
content of the page makes you feel confusing, please write us an email, we will handle the problem
within 5 days after receiving your email.
If you find any instances of plagiarism from the community, please send an email to:
info-contact@alibabacloud.com
and provide relevant evidence. A staff member will contact you within 5 working days.