Fixing a simple python script

Suoritettu Julkaistu Jan 27, 2016 Maksettu toimituksen yhteydessä
Suoritettu Maksettu toimituksen yhteydessä

I use a simple python script, which receives an inconing email via stdin and extracts all attachments. It then calculates the md5 value of them and hands them over to an online virus scanner.

You can see the code at

[url removed, login to view]

It's only 1 file with about 100 lines of code.

However, the current version is broken: Some attachments are not extracted correctly and as far as I can see it has to do with multipart emails.

I'm not a python developer, so I need someone who can fix the script.

Currently, the problematic point looks like this:

...

for part in [url removed, login to view]() : # iterate through all the MIME-parts

pl = part.get_payload(decode=True) # get the "body" of the MIME-part

if isinstance(pl, str) : # is there a real payload?

...

This seems to not catch all attachments.

If you agree then you need to fix the script and I need to check if it works and that's it. :-)

Python

Projektin tunnus: #9486193

Tietoa projektista

7 ehdotusta Etäprojekti Aktiivinen Jan 27, 2016

Myönnetty käyttäjälle:

tatauroff

Hello! I have expirience working with email in Python, I worked in project that parses emails and hands them over to other services. It would be really great if you could provide examples of emails, where attachments Lisää

$32 USD 1 päivässä
(1 arvostelu)
1.0

7 freelanceria on tarjonnut keskimäärin $31 tähän työhön

koulanurag

Hi, I am an expert Python Developer and can help you to fix issues in your python script. Please, have a look at my profile. Regards, Anurag Koul

$50 USD 1 päivässä
(8 arvostelua)
3.7
kaloyan13

Hello, I have done a few python programs. Can start working on your task immediately. If you give some samples, it would be great.

$30 USD 1 päivässä
(14 arvostelua)
3.9
lkhelladi

Hello, i'll be glad to fix the problem for you . As you can see in my profile , i have an experience with python programming . please refer to my previous projects feedbacks to have an idea about my work quality. l Lisää

$40 USD 1 päivässä
(1 arvostelu)
1.8
AlexeiBo

A proposal has not yet been provided

$45 USD 1 päivässä
(0 arvostelua)
0.0
proplm

<<<< i can help you low budget PLEASE CHAT ME >>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>> ___________________________________________________________________________________________________________________

$10 USD 1 päivässä
(0 arvostelua)
0.0