Skip to content

Instantly share code, notes, and snippets.

@taozhiyu
taozhiyu / console.image.js
Created November 5, 2022 02:02
print image in console
console.image = function(url, scale) {
scale = scale || 1;
const img = new Image(),
canvas = document.createElement('CANVAS');
img.crossOrigin = 'Anonymous';
img.onload = function() {
const {width, height} = img;
canvas.height = height;
canvas.width = width;
@taozhiyu
taozhiyu / colorful.prototype.js
Last active December 11, 2022 17:15
generate `"words".colorful` ansi formatted text
String.prototype.colorful = function(...colors) {
const text = this,
// ======================================= Core codes below from: ansi-style =======================================
colorTypes = ['color', 'bgColor'],
{
styles,
colorNames,
modifierNames
} = function() {
const ANSI_BACKGROUND_OFFSET = 10;
@taozhiyu
taozhiyu / maoerFM_subtitle_downloader.py
Last active July 30, 2023 07:17
download 猫耳FM subtitles
# !/usr/bin/python3
# -*- coding: UTF-8 -*-
# 成品&说明:
# https://www.52pojie.cn/thread-1688300-1-1.html
import xml.etree.ElementTree as ETree
import requests
import re
@taozhiyu
taozhiyu / wechat_debugger.js
Created July 22, 2022 02:12
launch wechat debugger page
// frida -U 微信 -l wechat_debugger.js --no-pause
// 上面的【微信】使用frida-ps -U命令查看系统显示的是包名还是应用名
// 附上微信的包名:com.tencent.mm
if(Java.available) {
Java.perform(function(){
const Ordinary_Class = Java.use("com.tencent.mm.plugin.biz.b.c");
if(Ordinary_Class != undefined) {
Ordinary_Class.cXc.implementation = ()=>!0
const context = Java.use("android.app.ActivityThread").currentApplication().getApplicationContext();
Java.scheduleOnMainThread(function() {