Haven't written a blog for a long time, today, a whim, record a problem solved today.After Curl set the curlopt_accept_encoding (7.21.8 before curlopt_encoding ) , according to the official saying, Is can automatically respond to the gzip compressed content decompression, but my project did not decompress, and online A search is also a large number of people ask this question, and the answer is actually said can be automatically extracted. I was bored.The Curl library in my project was compiled
In VBA Engineering, VBA code is stored in a composite document in a compressed form.The extracted code is as follows: Public FunctionDecompression (Arrbyte () as Byte) as Byte() 'unzip the VBA stream 'Algorithm Description: https://msdn.microsoft.com/en-us/library/cc313094 (v=office.12). aspx DimCompressedcontainer () as Byte DimSignaturebyte as Byte DimCompressedheader as Integer DimCompressedchunksize as Integer DimCompressedchu
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
Install MySQL in Ubuntu and unzip tumysql
Enter sudo apt-get install mysql-server mysql-client on the terminal
During the installation process, you will be asked to enter the password of the root user (the user managing the MySQL database, not the user of the Linux system) and enter the password as required.
Enter mysql-uroot-p on the terminal and then prompt you to enter the correct password.
Some simple MySQL management:
Start MySQL service
Install Samba in Ubuntu and add an account; unzip tusamba accountInstall Samba in Ubuntu and add an account: 1. update Source: sudo apt-get update2. install Samba: sudo apt-get install samba samba-common3. create a shared directory and Set permissions 3.1 create a shared directory share in the home directory enter sudo mkdir/home/share 3.2 in the terminal to set the shared directory permissions (read and write permissions) enter sudo chmod 777/home/in
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
Linux/unzip tusudo Elevation of Privilege without entering a passwordPreface The sudo permission is required for zip packaging during the process of writing an automated packaging script, but it is too troublesome to enter the password each time. Therefore, we will introduce the method for sudo to escalate permissions without entering a password.Modify/etc/sudoers. If our current user is "wzy", add the following statement to the/etc/sudoers file:
# N
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
Ubuntu installation SVN server step tutorial, unzip tusvn
Apache Subversion (SVN for short) is an open-source version control system. It uses a branch management system relative to the Cross-node Scripting (RCS) and CVS. Its design goal is to replace CVS. More and more control services on the Internet are transferred from CVS to Subversion.
First, download and install the svn server from the image:
[Plain] view plaincopy
Sudo apt-get install subversi
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
My zip file content is a Chinese name, there are passwords, find several solutions on the Internet only one can, so here's a record:The first is to install 7zip to decompress, 7zip solution here, but can't solve my problem, still have garbled problemFinally, the solution is found here.The process is as follows:1,Lsar test.zipAll files are listed (lsar-list archive file contents) and the file names listed are correct, then you can proceed to the next step.2,unar-p my_password test.zipYou can extr
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
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.