import ftplib
import hashlib
import httplib
import pytz
import datetime
localtime = datetime.datetime.now(pytz.timezone('Asia/Singapore')).isoformat()
cam = "hi5"
lscam = localtime + cam
ftp = ftplib.FTP('localhost','username','password')
ftp.cwd('Server')
m=hashlib.md5()
file = open('Desktop/frame00000.png','rb')
m.update(lscam)
dd=m.hexdigest()
ftp.storbinary('STOR '+dd, file)
file.close()
ftp.quit()
How can i generate the actual MD5 hash for "lscam" as this code above keep giving me "weird" md5 hash code and that is not even the actual hash for "lscam". Anybody can help?