Skip to content

Instantly share code, notes, and snippets.

View ChenYFan's full-sized avatar

CyanFalse ChenYFan

View GitHub Profile
@ChenYFan
ChenYFan / WAFKV.js
Last active March 24, 2021 11:39
将WAF当作KV来存
const WAFKV = {
GET: async function (key) {
let item;
let filters = await WAFKV.FILTERS()
let result = (await filters.json()).result
for (let i = 0; i < result.length; i++) {
if (result[i].id && result[i].id == RULEID) {
item = result[i]
break
}
@ChenYFan
ChenYFan / index.js
Last active March 12, 2021 07:53
CloudFlare无服务器学历验证
/*两个密码子,建议手滚键盘*/
const privatek = ""
const privatepass = ""
/*前端处理区域,将征用三个目录*/
if (rp(path) == "/getaccesstoken" || rp(path) == "/getcap" || rp(path) == '/getcapimg') {
try { await JSON.parse(Decrypt(urlObj.searchParams.get('refreshtoken'), privatek)) } catch (e) { return returnc(0) }
const RToken = urlObj.searchParams.get('refreshtoken')
const _RT = await JSON.parse(Decrypt(RToken, privatek))
if (checktime(_RT)) {
if (await checkban(RToken, privatek)) {
@ChenYFan
ChenYFan / index.js
Last active February 25, 2021 06:06
ChenYFanのAPI部分开源
function getJsonLength(jsonData) {
var jsonLength = 0;
for (var item in jsonData) {
jsonLength++;
}
return jsonLength;
}
async function handleRequest(request) {
const req = request
const urlStr = req.url
! wget https://raw.githubusercontent.com/ChenYFan/GoogleColabRDP/main/install.sh &> /dev/null
! chmod +x install.sh
! ./install.sh