Skip to content

Commit

Permalink
add param identifier_flag
Browse files Browse the repository at this point in the history
  • Loading branch information
lissettecarlr committed Jun 24, 2024
1 parent f8f267f commit 59dd81f
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions ncmdump/core.py
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
from Crypto.Util.strxor import strxor
from mutagen import mp3, flac, id3

def dump(input_path, output_path = None, skip = True):
def dump(input_path, output_path = None, skip = True,identifier_flag=False):

output_path = (lambda path, meta: os.path.splitext(path)[0] + '.' + meta['format']) if not output_path else output_path
output_path_generator = (lambda path, meta: output_path) if not callable(output_path) else output_path
Expand Down Expand Up @@ -57,7 +57,10 @@ def dump(input_path, output_path = None, skip = True):
if meta_length:
meta_data = bytearray(f.read(meta_length))
meta_data = bytes(bytearray([byte ^ 0x63 for byte in meta_data]))
identifier = meta_data.decode('utf-8')
if identifier_flag == True:
identifier = meta_data.decode('utf-8')
else:
identifier = ""
meta_data = base64.b64decode(meta_data[22:])

cryptor = AES.new(meta_key, AES.MODE_ECB)
Expand Down

0 comments on commit 59dd81f

Please sign in to comment.