From 2dce97d800eadab378c0342b56a3b4725cce1a5b Mon Sep 17 00:00:00 2001 From: KongValley Date: Tue, 9 Apr 2019 15:41:02 +0800 Subject: [PATCH] =?UTF-8?q?=E6=B7=BB=E5=8A=A0=E6=89=8B=E6=9C=BA=E5=8F=B7?= =?UTF-8?q?=E6=B3=A8=E5=86=8C,=E6=A3=80=E9=AA=8C=E9=AA=8C=E8=AF=81?= =?UTF-8?q?=E7=A0=81,=E6=A0=A1=E9=AA=8C=E7=94=A8=E6=88=B7=E5=90=8D?= =?UTF-8?q?=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 } + ) +}