I want to do the following in Python:
- Take a binary (executable) file
- Turn it into a zip file with gzip (gz extension)
- Then put the jpg extension
Later again the desire to recover the original (without the gz extension or jpg).
The idea is to send binary files through GMail SMTP to recover and then get them over IMAP and process them in ehtir original form (1).
The python
gzipandshutillibraries can do what you need.To gzip the executable.
And then to get the original back.
That being said, gmail’s MIME filters look at content, not extension, so it may still block the new file.