Skip to content

Commit 59dd81f

Browse files
committed
add param identifier_flag
1 parent f8f267f commit 59dd81f

File tree

1 file changed

+5
-2
lines changed

1 file changed

+5
-2
lines changed

ncmdump/core.py

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@
1414
from Crypto.Util.strxor import strxor
1515
from mutagen import mp3, flac, id3
1616

17-
def dump(input_path, output_path = None, skip = True):
17+
def dump(input_path, output_path = None, skip = True,identifier_flag=False):
1818

1919
output_path = (lambda path, meta: os.path.splitext(path)[0] + '.' + meta['format']) if not output_path else output_path
2020
output_path_generator = (lambda path, meta: output_path) if not callable(output_path) else output_path
@@ -57,7 +57,10 @@ def dump(input_path, output_path = None, skip = True):
5757
if meta_length:
5858
meta_data = bytearray(f.read(meta_length))
5959
meta_data = bytes(bytearray([byte ^ 0x63 for byte in meta_data]))
60-
identifier = meta_data.decode('utf-8')
60+
if identifier_flag == True:
61+
identifier = meta_data.decode('utf-8')
62+
else:
63+
identifier = ""
6164
meta_data = base64.b64decode(meta_data[22:])
6265

6366
cryptor = AES.new(meta_key, AES.MODE_ECB)

0 commit comments

Comments
 (0)