Skip to content

Instantly share code, notes, and snippets.

View recolic's full-sized avatar
🏠
Working from home

Recolic recolic

🏠
Working from home
View GitHub Profile
@recolic
recolic / forked_udpfwd.cc
Created December 14, 2018 04:18
naive udp forwarder with naive encryption. copied from an unknown guy. the code style is extremely horrible but it's good enough to fuck GFW.
#include<stdio.h>
#include<string.h>
#include<sys/socket.h>
#include<arpa/inet.h>
#include<stdlib.h>
#include<getopt.h>
#include <unistd.h>
#include<errno.h>
#include <fcntl.h>
@recolic
recolic / py3in2.py
Created February 10, 2019 00:00
Run python3 in a python2 code.
import tempfile, subprocess
def py3in2(func_text, arg):
# escape char in arg should be escaped twice.
payload = ['#/usr/bin/env python3', 'def _func(arg):']
for line in func_text.split('\n'):
payload.append(' ' + line)
payload.append('with open("/dev/fd/1", "w") as f:\n f.write(_func(\''+arg+'\'))\n')
payload = '\n'.join(payload)
@recolic
recolic / fuckboc.user.js
Last active March 7, 2019 05:15
[tampermonkey] SB中国银行网银购汇不用等30秒看sb购汇申请书。一键安装:https://openuserjs.org/users/recolic/scripts
// ==UserScript==
// @name FUCK BankOfChina By USD from CNY 30 seconds wait.
// @namespace https://recolic.net/
// @version 0.1
// @description If you buy other concurrency on www.boc.cn, you have to wait 30 seconds to read a document. I fucked it.
// @author Recolic Keghart <root@recolic.net>
// @match https://ebsnew.boc.cn/boc15/welcome.html*
// @grant none
// ==/UserScript==
@recolic
recolic / hackQQ.sh
Created March 21, 2019 01:29 — forked from kookxiang/hackQQ.sh
一键得到一个精简版的手机QQ(Android)
#!/system/bin/sh
# 使用方法:
# adb shell "curl -Ssl https://gist.githubusercontent.com/kookxiang/1104e898f270c9a7a0784f70979ec532/raw/hackQQ.sh | su"
# 使用方法 (手动):
# 0.确保你手机 Root 了
# 1.下载这个脚本到某个地方
# 2.下载 Android SDK(需要其中的 adb)
# 3.在命令行运行 adb devices,确保能看到你的手机
@recolic
recolic / rlib.min.hpp
Created May 14, 2019 01:12
C++11 minified rlib. usually used while writing ALG solutions.
/*
*
* string.hpp: string process utility.
* Recolic Keghart <root@recolic.net>
* MIT License
*
* Minified version: works on C++11.
*
*/
@recolic
recolic / README.md
Last active January 20, 2023 11:14
android qq 聊天记录导出

android qq聊天记录导出大致流程

tested on android 6 tencent qq

  1. 设法将/data/data/com.tencent.*/databases目录拷贝出来,我假设你了解如何做到这一点。

  2. 运行以下命令。我假设你了解如何安装/使用sqlite,我假设你了解linux基本知识。

$ sqlite3 872222222-IndexQQMsg.db
@recolic
recolic / README.md
Last active October 14, 2023 10:35
适合华科校园卡的MIFARE卡复制教程

MIFARE GUIDE FOR HUST

整理了可行的MIFARE卡复制方法/工具。使用ACR122U A9工具。复制卡只含有UID,因此只能进图书馆/宿舍楼,不能消费。

Linux

安装libnfc. sudo pacman -S libnfc。下面的教程在ArchLinux (Linux 5.1.4)测试好用。

如果命令失败了,提示找不到NFC设备之类的话,你可以sudo或者重新插拔一下就好了。

#!/bin/bash
# Prevent the fucking wine to add mime file association.
# Implements https://askubuntu.com/questions/323437/how-to-prevent-wine-from-adding-file-associations
set -o xtrace
rm -f ~/.local/share/mime/packages/x-wine*
rm -f ~/.local/share/applications/wine-extension*
rm -f ~/.local/share/icons/hicolor/*/*/application-x-wine-extension*
rm -f ~/.local/share/mime/application/x-wine-extension*
@recolic
recolic / README.md
Created April 10, 2020 09:32
Install ArchLinux without MONITOR

Install ArchLinux without MONITOR and SERIAL

I bought a cheap motherboard and realized that, I have no cable for 10pin(motherboard) to 15pin vga. And things went worse after I realized that my USB2TTL cable is not working for RS232 serial port.

Then... I have to install archlinux WITHOUT monitor. But, fortunately, I have a KEYBOARD!

ArchISO

I was too lazy to modify ArchISO. I just plug the ARCHISO usb stick and a blank harddisk, and boot,