Thinksns V3 (open-source Weibo System) getshell

Source: Internet
Author: User

Attachaction. class. php

 

Public function capture () {error_reporting (0); // resolution upload method $ query_string = t ($ _ SERVER ['query _ string']); parse_str ($ query_string, $ query_data); // overwrite the data variable $ log_file = time().'_'.rand(0, 10002.16.'.txt '; $ log_path = RUNTIME_PATH. '/logs /'. date ('y/md/H/'); if (! Is_dir ($ log_path) mkdir ($ log_path, 0777, true); $ file_path = '. /data/uploads /'. date ('y/md/H/'); if (! Is_dir ($ file_path) mkdir ($ file_path, 0777, true); file_put_contents ($ log_path. $ log_file, var_export ($ query_data, true); // button: FileType = img if ($ query_data ['filetype'] = 'img ') {$ file_name = 'capture_'.time().'.jpg ';} // upload the Attachment: FileType = Attachment & FileName=xxx.jpg // you have written it by yourself .. If ($ query_data ['filetype'] = 'attachment') {$ file_name = $ query_data ['filename']; // The name of the file to be overwritten} // process the data stream if ($ stream = fopen ('php: // input', 'R ')) {// post get content // print all the page starting at the offset 10 // echo stream_get_contents ($ stream,-1, 10); $ content = stream_get_contents ($ stream ); file_put_contents ($ file_path. $ file_name, $ content); // This is written .. Fclose ($ stream);} // include 'uploadfile. class. php '; // $ up = new UploadFile (); // $ up-> upload ('. /uploads/'); // $ info = $ up-> getUploadFileInfo (); // echo "<pre>"; // var_dump ($ _ SERVER ); // var_dump ($ info); // echo "</pre>"; // output file echo SITE_URL.ltrim ($ file_path. $ file_name ,'. ');}

 

Test:

 

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.