Software Terminal Security Management System File Download Vulnerability (one-click Download of the entire website)
Rt
Due to this vulnerabilityHttp: // **. **/bugs/wooyun-2015-0159690Directly drop the keywords of the question (chinansoft unified terminal security management system) to dumb,
Check the source code, and the Arbitrary
When using struts2 to do file download, we may use most of the configuration in the struts.xml inside, in fact, we use annotations in the same way
can do file download.
Add the following two methods to the action:
Private String filename;//plus get and set methods
Public String DownloadFile () {return "
Here is the configuration file I modified under Nginx
Nginx and PHP-FPM can normally boot 9000 port is also normal, can access HTML files, cannot access PHP files,
To access PHP files directly download, this is my nginx.conf configuration
Location/{
root HTML;
index.html index index.htm index.php;
45}
Location ~. php$ {
root/usr/html;
Fastcgi_pass 127.0.0.1:9000;
Fastcgi_index index.php;
Fastcgi_param Scrip
This example for you to share the two Java ftp file upload to download the way for you to refer to, the specific content as follows
The first way:
Package com.cloudpower.util;
Import Java.io.File;
Import Java.io.FileInputStream;
Import Java.io.FileOutputStream;
Import java.io.IOException;
Import Sun.net.TelnetInputStream;
Import Sun.net.TelnetOutputStream;
Import sun.net.ftp.FtpClient; /** * Java-br
One, the remote file download two ways: FTP command + SCP command FTP command: Server if FTP server is installed, another Linux can use the FTP client program for remote copy of the file to read the download and write upload.1. Connect to the FTP serverFormat: FTP [hostname| ip-address]A) under Linux command line input
PrepareThis article will use a NuGet exposed component technology to implement a server-side file management engine that provides a few simple APIs to facilitate the implementation of the file engine to manage the files of your own software system.You can download the installation in the NuGet Manager in Visual Studio, or you can enter the following instructions
Java file download is garbled in two cases:1, Chinese file name garbled when downloading2, download because the path contains Chinese file name garbled, the prompt cannot find the fileThe workaround is shown in the following section of codeResponse.setcontenttype ("Multipart
PHP file packaging and downloading: Use the ZipArchive zip file that comes with PHP and download the packaged file. Summary:
Four headers () are required for downloading files using PHP. For more information, see my another blog post: how PHP implements the download functio
"Unexpected compressed file end" appears in the compressed file is not downloaded, due to the server is unresponsive, causing the system mistakenly thought the file has been downloaded, the incomplete file as a complete. It is recommended to remove the file and re-
about Java File download file name garbled problem solutionAs a programmer, we should all have encountered the problem of garbled! This article is self-addressed about the handling of Java file download file name garbled problem:S
Let's talk about the environment.Easyui+springmvc+mybatisBecause by normal means, can not use Ajax to submit a form containing files, so think of using Easyui form to submit, Easyui form encapsulated a set of pseudo-Ajax submission method, so can play the role of the Ajax file form!However, when the file submitted successfully, back to the back of the background a JSON to prompt the upload success!But in ot
field. int Getcontentlength () returns the value of the Content-length header field. String getContentType () returns the value of the Content-type header field. Long GetDate () returns the value of the Date header field.
public class InetAddress {public
static void Main (string[] args) {
try {
System.out
. println (" Use the URL class to download the Shenzhen University homepage http://www.szu.edu.cn, and statistics
command.This completes the method of comparing the local file time. Next, determine the file time for the remote host.5, FTP command log on to the remote host, and filter the contents of the file to be queriedFtp_cmd () {ftp -i-n Open $ftp _ipuser $get _user $get _pwdbinarycd ${get_dir}lcd ${local_dir}$*bye! }Pattern= "${month}.*.dat$"Files=$ (Ftp_cmdls-LRT |awk
Public Function Download ($currdir = null) { $file = UrlDecode ($currdir); $file = Iconv (' UTF-8 ', "GB2312", $file); if (!file_exists ($file)) { $this->error ("file does not exist"); } BASENAMECN is a metho
File downloads typically require a File selection dialog box to choose where to store the files. We can do it ourselves, but the simple thing is to take advantage of the out-of-the-box capabilities of the browser.
All browsers include file downloads, but the File selection dialog box is not available in every browser.
Client | Downloads when the server sends data to the browser, the header data in the HTTP protocol is sent first
To have the client download a text file instead of displaying it in the browser
The header data will be changed, as in the following example:
Fn= "Thefilenametosave"
Response.AddHeader "Content-disposition:", "Attachment;filename=" fn
%>
where FN is the filename, which is the default fi
PHP file packaging and downloading: Use the ZipArchive zip file that comes with PHP and download the packaged file. Summary:
Four headers () are required for downloading files using PHP. For more information, see my another blog post: how PHP implements the download functio
J2EE file upload and download summary, j2ee File Upload SummaryI. File Upload
Upload process:
1. upload files on jsp pages
2. Obtain the file stream in the background (the principles are the same and the implementation methods are different.
Sevelet is generally obtained fro
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.