From 2dce97d800eadab378c0342b56a3b4725cce1a5b Mon Sep 17 00:00:00 2001 From: KongValley Date: Tue, 9 Apr 2019 15:41:02 +0800 Subject: [PATCH 1/2] =?UTF-8?q?=E6=B7=BB=E5=8A=A0=E6=89=8B=E6=9C=BA?= =?UTF-8?q?=E5=8F=B7=E6=B3=A8=E5=86=8C,=E6=A3=80=E9=AA=8C=E9=AA=8C?= =?UTF-8?q?=E8=AF=81=E7=A0=81,=E6=A0=A1=E9=AA=8C=E7=94=A8=E6=88=B7?= =?UTF-8?q?=E5=90=8D=E6=8E=A5=E5=8F=A3?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- module/captch_register.js | 17 +++++++++++++++++ module/captch_sent.js | 14 ++++++++++++++ module/captch_verify.js | 15 +++++++++++++++ 3 files changed, 46 insertions(+) create mode 100644 module/captch_register.js create mode 100644 module/captch_sent.js create mode 100644 module/captch_verify.js diff --git a/module/captch_register.js b/module/captch_register.js new file mode 100644 index 0000000..460f62c --- /dev/null +++ b/module/captch_register.js @@ -0,0 +1,17 @@ +// 注册账号 +const crypto = require('crypto') + +module.exports = (query, request) => { + const data = { + captcha: query.captcha, + phone: query.phone, + password: crypto.createHash('md5').update(query.password).digest('hex'), + nickname: query.nickname + } + return request( + 'POST', + `https://music.163.com/weapi/register/cellphone`, + data, + { crypto: 'weapi', cookie: query.cookie, proxy: query.proxy } + ) +} \ No newline at end of file diff --git a/module/captch_sent.js b/module/captch_sent.js new file mode 100644 index 0000000..a76e6ce --- /dev/null +++ b/module/captch_sent.js @@ -0,0 +1,14 @@ +// 发送验证码 + +module.exports = (query, request) => { + const data = { + ctcode: '86', + cellphone: query.cellphone, + } + return request( + 'POST', + `https://music.163.com/weapi/sms/captcha/sent`, + data, + { crypto: 'weapi', cookie: query.cookie, proxy: query.proxy } + ) +} diff --git a/module/captch_verify.js b/module/captch_verify.js new file mode 100644 index 0000000..efc6a1e --- /dev/null +++ b/module/captch_verify.js @@ -0,0 +1,15 @@ +// 发送验证码 + +module.exports = (query, request) => { + const data = { + ctcode: '86', + cellphone: query.cellphone, + captcha: query.captcha + } + return request( + 'POST', + `https://music.163.com/weapi/sms/captcha/verify`, + data, + { crypto: 'weapi', cookie: query.cookie, proxy: query.proxy } + ) +} From 74c19ecd0848b061c304c61d555a89490a910df9 Mon Sep 17 00:00:00 2001 From: KongValley Date: Tue, 9 Apr 2019 15:44:35 +0800 Subject: [PATCH 2/2] =?UTF-8?q?=E4=BF=AE=E6=94=B9=E6=B3=A8=E9=87=8A?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- module/captch_verify.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/module/captch_verify.js b/module/captch_verify.js index efc6a1e..af12721 100644 --- a/module/captch_verify.js +++ b/module/captch_verify.js @@ -1,4 +1,4 @@ -// 发送验证码 +// 校验验证码 module.exports = (query, request) => { const data = {