Skip to content

Instantly share code, notes, and snippets.

View segfault-bilibili's full-sized avatar

segfault-bilibili

View GitHub Profile
#!/bin/bash
# workaround audio bug since Magia Record 3.0.1
# author: segfault-bilibili
# English README
#
# Since Magia Record 3.0.1, there appears to be a bug affecting minor fraction of players.
#
# Such bug makes the game audio (including BGM, sound effects etc) sound strange:
# (1) the pitch sounds to be lower than normal;
@segfault-bilibili
segfault-bilibili / audiofix.js
Last active July 8, 2023 02:05
workaround audio bug since Magia Record 3.0.1
const fs = require("fs");
const path = require("path");
// workaround audio bug since Magia Record 3.0.1
// author: segfault-bilibili
// English README
//
// Since Magia Record 3.0.1, there appears to be a bug affecting minor fraction of players.
//
@segfault-bilibili
segfault-bilibili / gist:ccb96d888da9e8108deb4e92befff0cb
Created May 9, 2023 05:12 — forked from strazzere/gist:506a592b44c9d228d697
Attaching to fast loading JNI/native code from an Android app without debugging the Dalvik code
The original issue was that some applications (ex. packers) launch the JNI/native code too fast for a person
to attach an IDA Pro instance to the process. The original solution was wrapping the jni code with your own
"surrogate" application so you could load it slower.
New process is to launch the Android/Dalvik activity with the debugger flag;
# adb shell am start -D com.play.goo_w/com.android.netservice.MainActivity
Which will cause the "Waiting for debugger..." mode to start. This starts the process, allowing you to
attach IDA Pro to the process for the native code.
@segfault-bilibili
segfault-bilibili / clash-naiveproxy.yaml
Last active March 1, 2024 02:32
Clash config which makes use of naiveproxy
# 这个配置可以让Clash将naiveproxy作为上游代理,尤其是可以利用它的tun模式方便地实现全局透明代理
# 但很显然,必须额外跑一个naiveproxy客户端,不能做到简单拖动Clash配置后立即可用
# 注意:务必按下述示例把naiveproxy服务器的IPv4/v6地址以及域名加入直连规则
mixed-port: 7890
allow-lan: false
bind-address: '127.0.0.1'
mode: rule
log-level: info
external-controller: '127.0.0.1:9090'
dns:
@segfault-bilibili
segfault-bilibili / fetch-event-scenario.js
Last active October 2, 2023 13:42
fetch magia record jp event scenario json
"use strict";
const path = require('path');
const fs = require("fs");
const scenarioNum = 518320;
const outDir = `F:\\scenario_${scenarioNum}`;
const startNum = 1, endNum = 20;
const suffix = "cyov4";
#!/system/bin/sh
set -e
REGEX="[0-9a-f]{72}"
SAVED_DEV_ID_FILE="/data/adb/magireco_$2.txt"
COCOS_FILE="/data/data/com.aniplex.magireco/shared_prefs/Cocos2dxPrefsFile.xml"
DEV_ID_FILE="/data/data/com.aniplex.magireco/files/madomagi/C5XyOsaM.json"
UNFINISHED_QUEST_FILE="/data/data/com.aniplex.magireco/files/madomagi/data.bin"
check_unfinished_quest() {
var fs = require('fs')
function convertSub(jsonobj) {
//let result = fs.readFileSync("head.ass");
let result = "[Script Info]\n";
result += "; Script generated by Aegisub 3.2.2\n";
result += "; http://www.aegisub.org/\n";
result += "Title: Default Aegisub file\n";
result += "ScriptType: v4.00+\n";
result += "WrapStyle: 0\n";
diff --git a/package/network/services/dropbear/Makefile b/package/network/services/dropbear/Makefile
index 8bbb26f829..8456703eef 100644
--- a/package/network/services/dropbear/Makefile
+++ b/package/network/services/dropbear/Makefile
@@ -8,14 +8,14 @@
include $(TOPDIR)/rules.mk
PKG_NAME:=dropbear
-PKG_VERSION:=2020.81
+PKG_VERSION:=2022.82
@segfault-bilibili
segfault-bilibili / freednsv2.sh
Last active July 24, 2022 06:48
Ugly DDNS script for Huawei ONT's built-in OpenWrt
#!/bin/sh
mkdir -p /tmp/freednsv2
exec_wget() {
wget --no-hsts -O - $@ 2>&1 | head -c4096
}
wait_for_internet() {
echo $(date) "Wait for Internet connection..."
seq 0 300 | while read line; do
/* scrcap2bmp - convert Android screencap raw data to Windows BMP
Author: segfault
https://space.bilibili.com/15209122
*/
#include <stdio.h>
#include <string.h>
#include <stdlib.h>
#include <unistd.h>
#include <errno.h>