Giter Site home page Giter Site logo

takiyasha's Introduction

Takiyasha v0.2.1

The Takiyasha is an unlocker for DRM protected music file.

The QMC decryption is partly derived from this project: Unlock Music 音乐解锁

Supported encryption format

  • NCM files (.ncm)
  • QMCv1 files (.qmc*)
  • QMCv2 files (.mflac/.mflac*/.mgg/.mgg*)
  • Moo Music format files (.bkc*)

Install

  • Dependencies:

    • Python version: At least Python 3.8 or above

    • Required Python packages:

  • Install Takiyasha from this repository:

    • pip install -U git+https://github.com/nukemiko/takiyasha

    WARNING: Existing repositories are in an unstable state of continuous updates, and the content of modules you download may become outdated at any time. If you need to use a certain version continuously, please select the version on the release page and install it as follows.

  • Install Takiyasha via wheel (.whl) package:

Usage

In Terminal / CMD / Powershell

  • Directly execute the command: takiyasha [OPTIONS] [/PATH/TO/INPUT]...

  • Run the module: python -m takiyasha [OPTIONS] [/PATH/TO/INPUT]...

    Argument:
        [PATHS/TO/INPUT]          Paths to input file or directory.
    
    Options:
        -o, --output PATH         Path to output file or dir.  [default: (current directory)]
        -r, --recursive           Also unlock supported files in subdirectories
                                  during unlocking.  [default: False]
        -n, --without-metadata    Do not embed metadata found in the source file
                                  into the unlocked file.  [default: False]
        -q, --quiet               Don't print OK for each unlocked file.  [default: False]
        --exts, --supported-exts  Show supported file extensions and exit.
        -V, --version             Show the version information and exit.
        -h, --help                Show this message and exit.
    

Import and use it as a python module

  • General usage

    1. Create a Decrypter instance by file encryption type

      from takiyasha import new_decrypter
      
      qmcflac_dec = new_decrypter('test.qmcflac')
      mflac_dec = new_decrypter('test.mflac')
      ncm_dec = new_decrypter('test.ncm')
      
      print(qmcflac_dec, mflac_dec, ncm_dec)

      Output:

      <takiyasha.algorithms.qmc.QMCDecrypter object at 0x7f013116f670>
      <takiyasha.algorithms.qmc.QMCDecrypter object at 0x7f01311c0b80>
      <takiyasha.algorithms.ncm.NCMDecrypter object at 0x7f01311c0fd0>
      
    2. Decrypt and save data to file

      for idx, decrypter in enumerate([qmcflac_dec, mflac_dec, ncm_dec]):
          audio_format = decrypter.audio_format
          save_filename = f'test{idx}.{audio_format}'
      
          with open(save_filename, 'wb') as f:
              decrypter.reset_buffer_offset()
              f.write(decrypter.read())
      
              print(save_filename)

      Output:

      test0.flac
      test1.flac
      test2.flac
      

      Use the shell command file to verify that the output file is correct:

      > file test0.flac test1.flac test2.flac
      test0.flac: FLAC audio bitstream data, 16 bit, stereo, 44.1 kHz, 14232044 samples
      test1.flac: FLAC audio bitstream data, 16 bit, stereo, 44.1 kHz, 11501280 samples
      test2.flac: FLAC audio bitstream data, 16 bit, stereo, 44.1 kHz, 9907800 samples
      

takiyasha's People

Contributors

nukemiko avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.