mirror of
https://github.com/Majjcom/ncmDumper.git
synced 2026-09-27 19:48:12 +08:00
Compare commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
2f6f20db02 | ||
|
|
c5a0a7451e | ||
|
|
8102ebdb47 | ||
|
|
5fb37056aa | ||
|
|
50e07068c9 |
@@ -2,12 +2,25 @@
|
|||||||
解锁网易云ncm文件
|
解锁网易云ncm文件
|
||||||
|
|
||||||
## 特色
|
## 特色
|
||||||
使用多线程进行解锁,速度更快
|
- 使用多线程进行解锁,速度更快
|
||||||
|
|
||||||
|
**现在推荐使用解密速度更快的[ncmpp](https://github.com/Majjcom/ncmpp)和[ncmppGui](https://github.com/Majjcom/ncmppGui)**
|
||||||
|
|
||||||
## 使用
|
## 使用
|
||||||
在音乐目录下运行代码,将自动解锁该目录下的所有ncm文件,并存放在`./unlock`目录下
|
在音乐目录下运行代码,将自动解锁该目录下的所有ncm文件,并存放在`./unlock`目录下
|
||||||
|
|
||||||
|
#### 快速使用
|
||||||
|
|
||||||
|
下载 `Latest Release` 中的可执行文件,将其放在存放 `ncm` 文件的目录下,然后运行应用即可开始解锁
|
||||||
|
|
||||||
|
解锁后的音频文件存放在 `./unlock` 目录下
|
||||||
|
|
||||||
|
------
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
## 注意
|
## 注意
|
||||||
|
|
||||||
你可以使用release中提供的exe文件运行,也可以直接使用源代码文件运行程序
|
你可以使用release中提供的exe文件运行,也可以直接使用源代码文件运行程序
|
||||||
|
|
||||||
- 使用源代码文件时,请确保你的控制台运行目录与待解锁文件目录相同
|
- 使用源代码文件时,请确保你的控制台运行目录与待解锁文件目录相同
|
||||||
|
|||||||
+16
-7
@@ -1,4 +1,5 @@
|
|||||||
# -*- coding: utf-8 -*-
|
# -*- coding: utf-8 -*-
|
||||||
|
from multiprocessing import cpu_count
|
||||||
import threading
|
import threading
|
||||||
import binascii
|
import binascii
|
||||||
import struct
|
import struct
|
||||||
@@ -78,7 +79,7 @@ def dump(file_path):
|
|||||||
return file_name
|
return file_name
|
||||||
|
|
||||||
|
|
||||||
class dumper(threading.Thread):
|
class Dumper(threading.Thread):
|
||||||
def __init__(self, fpath, basket):
|
def __init__(self, fpath, basket):
|
||||||
super().__init__()
|
super().__init__()
|
||||||
self._fpath = fpath
|
self._fpath = fpath
|
||||||
@@ -119,9 +120,7 @@ def printBar(now:int, total:int, threads:int):
|
|||||||
print(bar_text, end='', flush=True)
|
print(bar_text, end='', flush=True)
|
||||||
|
|
||||||
|
|
||||||
if __name__ == '__main__':
|
def main():
|
||||||
if not os.path.exists('./unlock'):
|
|
||||||
os.mkdir('./unlock')
|
|
||||||
dirs = os.listdir()
|
dirs = os.listdir()
|
||||||
musicFiles = dict()
|
musicFiles = dict()
|
||||||
for i in dirs:
|
for i in dirs:
|
||||||
@@ -129,18 +128,24 @@ if __name__ == '__main__':
|
|||||||
if os.path.splitext(i)[1] == '.ncm':
|
if os.path.splitext(i)[1] == '.ncm':
|
||||||
musicFiles[os.path.abspath(i)] = 0
|
musicFiles[os.path.abspath(i)] = 0
|
||||||
totalCount = len(musicFiles)
|
totalCount = len(musicFiles)
|
||||||
|
if totalCount == 0:
|
||||||
|
print('\033[33m未找到需要解密的文件 nothing to do...\033[0m')
|
||||||
|
input('按下回车继续...')
|
||||||
|
return
|
||||||
process = [0, 0, 0]
|
process = [0, 0, 0]
|
||||||
|
if not os.path.exists('./unlock'):
|
||||||
|
os.mkdir('./unlock')
|
||||||
|
maxCount = cpu_count()
|
||||||
while True:
|
while True:
|
||||||
count = 0
|
count = 0
|
||||||
tmp = None
|
tmp = None
|
||||||
for key in musicFiles:
|
for key in musicFiles:
|
||||||
if musicFiles[key] == 1:
|
if musicFiles[key] == 1:
|
||||||
count += 1
|
count += 1
|
||||||
if count < 5 and musicFiles[key] == 0:
|
if count < maxCount and musicFiles[key] == 0:
|
||||||
upperPrint('解密中...\t{}'.format(key))
|
upperPrint('解密中...\t{}'.format(key))
|
||||||
musicFiles[key] = 1
|
musicFiles[key] = 1
|
||||||
tmp = dumper(key, musicFiles)
|
Dumper(key, musicFiles).start()
|
||||||
tmp.start()
|
|
||||||
count += 1
|
count += 1
|
||||||
fcount = 0
|
fcount = 0
|
||||||
for key in musicFiles:
|
for key in musicFiles:
|
||||||
@@ -154,3 +159,7 @@ if __name__ == '__main__':
|
|||||||
|
|
||||||
print('\n\033[32m解密完成,存放在unlock目录中\033[0m')
|
print('\n\033[32m解密完成,存放在unlock目录中\033[0m')
|
||||||
input('按下回车继续...')
|
input('按下回车继续...')
|
||||||
|
|
||||||
|
|
||||||
|
if __name__ == '__main__':
|
||||||
|
main()
|
||||||
|
|||||||
Reference in New Issue
Block a user