darknessomi / musicbox

网易云音乐命令行版本
MIT License
9.81k stars 1.58k forks source link

登录接口对 `password` 添加了加密 #588

Open hldh214 opened 7 years ago

hldh214 commented 7 years ago

js 版算法 https://gist.github.com/hldh214/e5d5d8eda6cde9c1d800218cb805940a

hldh214 commented 7 years ago

邮箱登录使用了 yidun + md5 多加了一个 clientToken 字段

http://nos.netease.com/yidun/res-wm-1.0.js?t=0

手机登录暂时只有对 password 字段的裸 md5

hldh214 commented 7 years ago

https://gist.github.com/Rocket1184/41220aa11a812641de8d7fc6be40c243 https://github.com/Binaryify/NeteaseCloudMusicApi/issues/46

Binaryify commented 7 years ago

@hldh214 你这个算法能解决邮箱登录问题吗

hldh214 commented 7 years ago

@Binaryify 能, 但是可能会使用到 js 引擎

Binaryify commented 7 years ago

@hldh214 但是我试了不行

hldh214 commented 7 years ago

@Binaryify 贴代码

hldh214 commented 7 years ago

手机登录

import hashlib
import requests

phone = ''
password = ''

print(requests.post('http://music.163.com/api/login/cellphone', data={
    'phone': phone,
    'password': hashlib.md5(password.encode()).hexdigest()
}).text)
Binaryify commented 7 years ago

image image

hldh214 commented 7 years ago

邮箱登录使用了 yidun + md5 你可误会了我的意思, 这里的 clientToken 是动态生成的 文档 http://support.dun.163.com/login/api/ 祝你好运

2017-08-14 19:43 GMT+08:00 阿发 notifications@github.com:

[image: image] https://user-images.githubusercontent.com/12221718/29270311-c4ec2fa0-8128-11e7-9198-ccfa2a5af243.png [image: image] https://user-images.githubusercontent.com/12221718/29270315-ca0b9980-8128-11e7-86ce-68bacbc66bd9.png

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/darknessomi/musicbox/issues/588#issuecomment-322168955, or mute the thread https://github.com/notifications/unsubscribe-auth/AFPzk0JEq1NMHc64zUpueUOVG2dqtUUGks5sYDLRgaJpZM4OgI9N .

Binaryify commented 7 years ago

@hldh214 我试试

shengchaojie commented 7 years ago

有什么好的方式修复这个邮箱登陆么。。

hldh214 commented 7 years ago

邮箱登录面对的是网易成熟产品 yidun , 对于开源项目来说不太合适

2017-08-22 19:49 GMT+08:00 shengchaojie notifications@github.com:

有什么好的方式修复这个邮箱登陆么。。

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/darknessomi/musicbox/issues/588#issuecomment-324002593, or mute the thread https://github.com/notifications/unsubscribe-auth/AFPzk4VkCpYgrOOejcfr6UAIg6gdm99vks5sasBHgaJpZM4OgI9N .