phin3has / mailoney

An SMTP Honeypot
254 stars 71 forks source link

IOError: [Errno 2] No such file or directory: 'logs/credentials.log' #1

Closed Bifrozt closed 9 years ago

Bifrozt commented 9 years ago

Nice job! :)

Just found a minor issue in postfix_creds.py that occurs at line 35.

if os.path.exists('logs/credentials.log'):
    logfile = open('logs/credentials.log', 'a')
else:
    logfile = open('logs/credentials.log', 'w')

When mailoney starts it will look for the 'logs/credentials.log', but it will fail if the 'logs' directory is missing. If you add the following code block

if not os.path.isdir('logs'):
    os.mkdir('logs')

and let that execute before checking the 'credentials.log' it should work fine.

I hope you keep working on this as its a very interesting project you have here.

Cheers!

phin3has commented 9 years ago

Fixed and released. Thanks again bifrozt!