Last active
August 29, 2015 14:19
-
-
Save pbsds/4ce7d36785824f5fc4e3 to your computer and use it in GitHub Desktop.
Computes a md5 hash from the bgm data of a flipnote
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import PPM, sys, hashlib, warnings | |
warnings.filterwarnings("ignore")#disables the futurewarnings from numpy, bad practice! | |
if len(sys.argv) < 2: | |
print "error, no ppm filepath provided" | |
sys.exit(1) | |
flip = PPM.PPM().ReadFile(sys.argv[1], ReadFrames=False, ReadSound=True) | |
if not flip.SoundData[0]: | |
print "No BGM" | |
else: | |
print hashlib.md5(flip.SoundData[0]).hexdigest() |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment