Skip to content

Instantly share code, notes, and snippets.

🏠
Working from home

zc zckevin

🏠
Working from home
  • China
Block or report user

Report or block zckevin

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
View handle.js
// 1. filter out toxic function
let _key = userFns.filter(key=> {
let fn = window[key]
if (testHack(fn)) return key
return false
})[1];
window[_key] = function() {}
// 2. then, wrap all functions
function _wrap(k) {
View raw.js
var _$gm = function _$gm(_$tM, _$rZ) {
var _$de;
return function(_$vl, _$aZ) {
if (_$de === _$yV) {
_$de = _$ar(_$wL(_$tM), _$wL(_$rZ));
}
return _$de;
};
}
var _$xa = function _$xa(_$rZ) {
@zckevin
zckevin / runtime-debug.db22c3fb5c.patch
Last active Jul 7, 2019
Accessing variables trapped by JavaScript closure using V8 runtime functions.
View runtime-debug.db22c3fb5c.patch
diff --git a/src/runtime/runtime-debug.cc b/src/runtime/runtime-debug.cc
index 98aa3b98e7..2e424ead9e 100644
--- a/src/runtime/runtime-debug.cc
+++ b/src/runtime/runtime-debug.cc
@@ -322,18 +322,19 @@ RUNTIME_FUNCTION(Runtime_GetGeneratorScopeDetails) {
HandleScope scope(isolate);
DCHECK_EQ(2, args.length());
- if (!args[0]->IsJSGeneratorObject()) {
- return ReadOnlyRoots(isolate).undefined_value();
@zckevin
zckevin / map_gen.js
Created Jul 6, 2019
Generate prepack input for xxx.
View map_gen.js
var m = {}
Object.getOwnPropertyNames(window).filter(key => {
let s = window[key] && window[key].toString()
return !key.startsWith("_$") && s && s.indexOf("native code") != -1
}).map(key => {
let fn = window[key]
let ownKeys = [], protoKeys = []
if (fn) {
ownKeys = Object.getOwnPropertyNames(fn).filter(s => {
if (s === "caller" || s === "callee" || s === "arguments" || s === "constructor") return false
@zckevin
zckevin / run.sh
Created Jul 4, 2019
Phicomm N1 as router
View run.sh
#!/bin/bash
nohup /root/ssr/installed/bin/ss-local -u -c /root/shadowsocksr.json >/dev/null 2>&1 &
nohup /root/overture/overture-linux-arm64 -c /root/overture/config.json >/dev/null 2>&1 &
nohup /root/tun2socks-linux-arm64 \
-proxyType socks \
-proxyServer localhost:12345 \
-tunName tun0 \
-tunAddr 241.0.0.2 -tunGw 241.0.0.1 \
-loglevel debug \
You can’t perform that action at this time.