forked from smlie-cyber/faker2
-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
shufflewzc
committed
Sep 29, 2021
1 parent
70514ba
commit 89c1b49
Showing
1 changed file
with
36 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,36 @@ | ||
/* | ||
此文件为Node.js专用。其他用户请忽略 | ||
*/ | ||
//此处填写京东账号cookie。 | ||
let CookieJDs = [ | ||
|
||
'' | ||
|
||
] | ||
// 判断环境变量里面是否有京东到家ck | ||
if (process.env.JDDJ_COOKIE) { | ||
if (process.env.JDDJ_COOKIE.indexOf('&') > -1) { | ||
console.log(`您的cookie选择的是用&隔开\n`) | ||
CookieJDs = process.env.JDDJ_COOKIE.split('&'); | ||
} else if (process.env.JDDJ_COOKIE.indexOf('\n') > -1) { | ||
console.log(`您的cookie选择的是用换行隔开\n`) | ||
CookieJDs = process.env.JDDJ_COOKIE.split('\n'); | ||
} else { | ||
CookieJDs = [process.env.JDDJ_COOKIE]; | ||
} | ||
} | ||
if (JSON.stringify(process.env).indexOf('GITHUB') > -1) { | ||
console.log(`请勿使用github action运行此脚本,无论你是从你自己的私库还是其他哪里拉取的源代码,都会导致我被封号\n`); | ||
!(async () => { | ||
await require('./sendNotify').sendNotify('提醒', `请勿使用github action、滥用github资源会封我仓库以及账号`) | ||
await process.exit(0); | ||
})() | ||
} | ||
CookieJDs = [...new Set(CookieJDs.filter(item => item !== "" && item !== null && item !== undefined))] | ||
console.log(`\n====================共有${CookieJDs.length}个京东账号Cookie=========\n`); | ||
console.log(`==================脚本执行- 北京时间(UTC+8):${new Date(new Date().getTime() + new Date().getTimezoneOffset() * 60 * 1000 + 8 * 60 * 60 * 1000).toLocaleString()}=====================\n`) | ||
for (let i = 0; i < CookieJDs.length; i++) { | ||
const index = (i + 1 === 1) ? '' : (i + 1); | ||
exports['CookieJD' + index] = CookieJDs[i].trim(); | ||
} | ||
//exports['CookieJDs'] = CookieJDs; |