自动检查md5sums,检查md5sums,#! /usr/loca


#! /usr/local/bin/pythonimport commandsfile = raw_input("Enter the filename: ")sum = raw_input("Enter the md5sum: ")md = "md5sum " + fileprint mdcheck = str(commands.getoutput(md))checksum = sum + "  " + file#print checksumprint checkif check == checksum: print "Sums OK"else: print "Sums are not the same!"

评论关闭