How to upload files in a forum that does not support file uploading

Source: Internet
Author: User
How to upload files in a forum that does not support file uploading

To achieve this goal, you must ensure that the Forum can upload images. The commonly used image format is generally jpeg. This format uses ffd9 as the end mark of the file. It doesn't matter what is stored afterwards, therefore, we can append the file we want to upload to this end without affecting the display of this image. The same is true for the BMP format, because there is a location in the format that stores the file size, and it does not matter what is after the determined size. During promotion, additional data after all files with the end mark or equivalent to the end mark (such as BMP format) does not affect the use of the original files.

Based on the above principle, I have created a packaging tool. I just need to first mark the image and then input the file I want to upload. Then, I can upload the added image. Others download this image and use this tool to retrieve the file.

This tool is only used to upload small files. I hope you will not abuse it. In fact, this tool can also be used to package files and transmit hidden messages. For example, you can send a love letter to XX in your own photo, but it is estimated that when XX sees it, I don't know if it's a monkey year or a month.

In order to get this tool from the image below, I hope you can read the following code. Of course, direct replication can also run, remember to copy the image to the directory where the compiled executable file is located. The name must be correct.

# Include "windows. H"

# Include "tchar. H"

 

Const DWORD size = 23940;

Const DWORD startpos = 3235;

 

Int main ()

{

Handle hrfile = createfile (_ T ("lookinside.jpg"), generic_read, file_share_read, null, open_existing, file_attribute_normal, null );

Handle hwfile = createfile (_ T ("packfiles.rar"), generic_write, file_share_write, null, open_always, file_attribute_normal, null );

Setfilepointer (hrfile, startpos, null, file_begin );

Setendoffile (hwfile );

Char Buf [size];

Dword rb, WB;

Readfile (hrfile, Buf, size, & RB, null );

Writefile (hwfile, Buf, size, & WB, null );

Closehandle (hrfile );

Closehandle (hwfile );

Return 0;

}

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.