See this article about zip bombs on hackernews http://news.ycombinator.com/item?id=4 ...
I think, if users upload a zip to the server, the server silly to understand the pressure, it would not be a crash
After the user uploads the zip file, how should be detected before the decompression to prevent a repetition of the tragedy?It's best to use Python, PHP as an example, and I think the Web language should have this kind of risk.
Reply content:
See this article about zip bombs on hackernews
Tar is commonly used on Linux packaging, compression, compression tools, he has a lot of parameters, folding only to enumerate the commonly used compression and decompression parametersParameters:-c:create set up the parameters of compressed archives;-X: Extracting parameters of compressed archives;-Z: Whether to use gzip compression;-V: Files are displayed during compression;-F: The top document name, immediately after F to answer the file name, can not add parametersExample: First, the entire/
Zip can compress directories and filesZip compressed files, zip compressed files, and keep the source files. The compressed file name must be specifiedzip-r 1.zip 2 3 4 recursive compression 3 directories, compressed file name 1.zip without-R compression only one directoryzip-d/home filename. zip Extract to the specified directoryUnzip file name. zip extract to current directoryunzip-v file name. zip View Compressed Package Contents-V Details-l simple information1.8-zip and
Trusted CT is said to be a highly interactive scripting language. I wanted to install it and try it. I didn't expect it to make me tangle with it for two days. It was just because the trusted CT relied on TCL, however, in Linux systems, Tcl is not installed on its own and must be manually installed.
Secondary CT version 5.43
Http://download.chinaunix.net/download/0003000/2845.shtml
TCL 8.4.19
Http://sourceforge.net/projects/tcl/files/Tcl/8.4.19/tcl8.4.19-src.tar.gz/download
Download two pac
CEN decompress the. ZIP file and search a lot of methods on the Internet, using System. IO. compression. GZipStream uses the J # library function and the Java-based library function. However, many of them are not very good. In the end, it is still the System function System. shell. folder. copyHere (oItem [, intOptions]) is the best choice. The specific method is as follows:
1. Add the reference Shell32.dll, which can be found in Windows \ system32.2. Add the method.Static void
Unzip Tomcat 7 and ubuntuat7 in Ubuntu1. Download the compressed package
Here, we use the Ubuntu Wget tool to download the tomcat core package.The wget parameter is the URL address of the compressed package.
wget http://apache.claz.org/tomcat/tomcat-8/v8.0.21/bin/apache-tomcat-7.0.59.tar.gz
After the scripts are executed, an apache-atat-7.0.59.tar.gz compressed package is generated.2. decompress the compressed package
Run the following command in the
Install the unzip tuserver method on a USB flash drive that does not need to be decompressed or written into the image
In this way, you do not need to decompress Or write the downloaded ISO installation image file to a USB flash drive or hard disk. If the U disk is already the latest boot menu of old peach WinPE (which is often used by network administrators to directly restore GHO to install Windows), it does not need to be damaged. This is great.The
Install unzip CT on CentOS
CT is created on the basis of tcl, so you need to install tcl before installing CT
Install TCL
: Http://www.tcl.tk/software/tcltk/download.html
[Root @ test ~] # Cd/tools/
[Root @ test tools] # wget http://prdownloads.sourceforge.net/tcl/tcl8.5.19-src.tar.gz
[Root @ test tools] # tar xftcl8.5.19-src.tar.gz
[Root @ test tools] # cdtcl8.5.19/unix/
[Root @ test unix] #./configure
[Root @ test unix] # make
[Root @ test unix] # m
Unzip the rar compressed package in Linux
First download winrar for Linux: http://www.rarlab.com/download.htm at this URL
Extract the rar folder and enter the rar folder in the terminal,
Run the make command,
Then you can decompress the package.
Rar e aa.rar decompress the aa.rar compressed file to the current directory, which contains no directories. Rar x aa.rar decompress the aa.rar compressed file to the aa directory, and maintain the dir
The compressed zip package in Windows is garbled after being decompressed In ubuntu.
1.zip file unzippered with garbled characters:
Step 1 first install 7zip and convmv (if not installed before)Run the following command on the command line:Sudo apt-Get install p7zip-full convmvStep 2. Set the ZIP file name to y05document. Zip. First, enter the directory where the ZIP file is located, and then run the command lineLang = C 7z x y05document. ZipConvmv-F cp936-T utf8-r -- notest *
2. garbled File
Linux decompression widows compressed files are likely to encounter garbled problems, did not find a good way to temporarily put together a curve to the salvation of the method used.For example, unzip the zip file and use the following command:Unzip-o Character Set Xxxx.zipThe character set can be gb18030,cp936Extracted files If there is garbled, with the configuration of vim to open it, if not garbled, then the modified encoding method is utf-8:: Set
god!Originally I started to use the method, is the decompression under Windows, and then copied into the directory I created, so I lost a connection file (you can check it yourself)Therefore, this error occurs, and if the compressed package is copied first, there will be no loss of the soft connection file.Crossing do not believe, you can try it yourself, in the shared folder, unzip a compressed package and then copy to another directory, and then co
Unzip Direct Overlay DecompressionWhen extracting unzip, it is sometimes necessary to directly overwrite the extracted files, especially when installing the deployment in an automated script.# #在unzip命令后, increase the parameters of-O, then no longer ask, directly overwrite the original file decompression, save a lot of things.
Unzip the image with PHP, press directly to the 8k size behind the full display.
Who can tell me where to set the size or solve it in other ways?
Reply to discussion (solution)
What unzip the picture?? Speak clearly.
I compress all the JPG images first, then upload the compressed package to the server on the webpage, unzip and put it under the directory I w
Run the following commands in the/home directory:Cd/home # enter the/home Directory1. compress the mydatafile under the/home directory as mydata.zip.Zip-rmydata.zipmydata # compressing mydata Directories2. Decompress mydata.zip in the/homecatalog to the mydatabak directory.Unzipmydata.zip-dmydatabak3. compress the abcfolder and 123.txtfile under the/Home Directory into abc123.zip
Zip-rabc123.zipabc123.txt4. Extract the wwwroot.zip file in the/homedirectory to the/home directory.
Unzipwwwroot.zip
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.