| | |
| | | grep = subprocess.Popen(["grep","-a", "hex"], stdin=cmd.stdout,stdout=subprocess.PIPE) |
| | | key,stderr = grep.communicate() |
| | | key = key.split() |
| | | return key[2].split(':')[1] |
| | | for x in key: |
| | | if "hex" in x: |
| | | return x.split(':')[1] |
| | | |
| | | |
| | | def checkagainstexisting(abytes,aaxfile): |
| | | ret = subprocess.Popen(["ffprobe","-activation_bytes", abytes ,"-hide_banner" , os.path.abspath(aaxfile)], stderr=subprocess.PIPE) |
| | |
| | | authcodes = readauthcode() |
| | | abyte = '' |
| | | for x in authcodes: |
| | | if (checkagainstexisting(x,aaxfile) == '0'): |
| | | if checkagainstexisting(x, aaxfile) == '0': |
| | | abyte = x |
| | | return abyte |
| | | if (abyte == ''): |
| | | if abyte == '': |
| | | csum = filechecksum(aaxfile) |
| | | abyte = newauthcode(csum) |
| | | writeauthcode(abyte) |