Today, at the urging of Apache, "We recommend you use a mirror to download our release builds, but you must verify the integrity of the downloaded files using signatures downloaded from our main distribution directories." [their emphasis] Oh I must, must I? Well then okay.
I found the checksum of the package I wanted to download, the org.apache.commons.io package, MD5:
da4d3ca0be4afeb78e6fde2047bad281(from here: http://commons.apache.org/io/download_io.cgi)
I then downloaded the io zipped package, then Googled how to do that with Python...turns out, it's pretty easy and fun.
This guy's blog had the simplest and easiest version:
http://abstracthack.wordpress.com/2007/10/19/calculating-md5-checksum/
He says, do this:
So I did this:from md5 import md5 fname = "my file path" s = md5(open(fname, "rb").read()).hexdigest() print "md5 checksum: %s" % s
and got this:from md5 import md5 fname =
"D:\\Downloads\\Win\\commons-io-2.1-bin.zip"s = md5(open(fname, "rb").read()).hexdigest() print "md5 checksum: %s" % s
Hooray! So now I've done that.md5 checksum: da4d3ca0be4afeb78e6fde2047bad281
No comments:
Post a Comment