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;
}