This file contains hidden or 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
| const dgram = require('dgram') | |
| const crypto = require('crypto') | |
| function udpPing (server, port = 11451, timeout = 1000) { | |
| return new Promise((resolve, reject) => { | |
| const socket = dgram.createSocket('udp4') | |
| const myReject = (err) => { | |
| socket.close() | |
| reject(err) | |
| } |
This file contains hidden or 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
| { | |
| "update_time": 153916320, | |
| "list": [{ | |
| "name": "服务器1", | |
| "address": "0.0.0.0:1234", | |
| "description": "服务器描述, 比如服务器官网之类的" | |
| }] | |
| } |
This file contains hidden or 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
| from idaapi import * | |
| from idc import * | |
| from idautils import * |
This file contains hidden or 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
| pkg install -y cmake make clang libpcap-dev git | |
| git clone https://github.com/spacemeowx2/switch-lan-play.git | |
| mkdir switch-lan-play/build | |
| pushd switch-lan-play/build | |
| cmake .. | |
| make | |
| popd | |
| cp ./switch-lan-play/build/src/lan-play . |
This file contains hidden or 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
| alias mcpeserver=docker run -p 19132:19132/udp -d mcpeserver | |
| alias project=cd /d D:\project\ | |
| alias run-daemon=docker run -p 127.0.0.1:5666:5666 -p 6881:6881 -p 6882:6882/udp -v E:\downloads:/downloads -d space-daemon | |
| set TERM=xterm-256color |
This file contains hidden or 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
| ((async () => { | |
| const sleep = ms => new Promise(r => setTimeout(r, ms)) | |
| class IdleUnload { | |
| /** | |
| * @param obj Unloadable 对象 | |
| * @param idleTime 超时时间 单位为秒 | |
| */ | |
| constructor(obj, idleTime) { | |
| this.obj = obj; | |
| this.loaded = false; |
This file contains hidden or 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
| # /lib/firmware/brcm/brcmfmac43340-sdio.txt works on my CHUWI Hibox | |
| # previous version 5G does not work | |
| manfid=0x2d0 | |
| prodid=0x0653 | |
| vendid=0x14e4 | |
| devid=0x4386 | |
| boardtype=0x0653 | |
| boardrev=0x1203 | |
| boardnum=22 | |
| macaddr=02:0A:F7:2A:3B:4C |
This file contains hidden or 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
| const axios = require('axios').default | |
| const http = require('http') | |
| const https = require('https') | |
| const path = require('path') | |
| const fs = require('fs') | |
| const Transform = require('stream').Transform | |
| const promisePipe = require('promisepipe') | |
| const mkdirp = require('mkdirp') | |
| const SpaceProgress = require('./space-progress') | |
| const spaceProgress = new SpaceProgress(process.stderr) |
This file contains hidden or 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
| 15 00 01 00 00 // X = 0x100 | |
| LABEL: | |
| 0E // X++ | |
| 12 // A = [X] | |
| 0B // putchar(A) | |
| 0C 00 01 00 00 // loop | |
| 15 10 01 00 00 | |
| 0E // X++ |
This file contains hidden or 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
| 0x05, 0x01, // Usage Page (Generic Desktop Ctrls) | |
| 0x15, 0x00, // Logical Minimum (0) | |
| 0x09, 0x04, // Usage (Joystick) | |
| 0xA1, 0x01, // Collection (Application) | |
| 0x85, 0x30, // Report ID (48) | |
| 0x05, 0x01, // Usage Page (Generic Desktop Ctrls) | |
| 0x05, 0x09, // Usage Page (Button) | |
| 0x19, 0x01, // Usage Minimum (0x01) | |
| 0x29, 0x0A, // Usage Maximum (0x0A) | |
| 0x15, 0x00, // Logical Minimum (0) |