Skip to content

Instantly share code, notes, and snippets.

View taoky's full-sized avatar
🔬
Rebooting...

taoky taoky

🔬
Rebooting...
  • University of Science and Technology of China
  • on USTC campus
  • 10:41 (UTC +08:00)
View GitHub Profile
package main
import (
"bufio"
"flag"
"fmt"
"log"
"os"
"os/exec"
"strings"
@taoky
taoky / framebuffer.cpp
Created July 9, 2020 15:01
Printing a 800x600 XPM image to framebuffer
// Modified from https://gist.github.com/FredEckert/3425429, with some bug fixes
// This following program requires at least 800x600, 32bpp to run
#include <fcntl.h>
#include <linux/fb.h>
#include <stdio.h>
#include <stdlib.h>
#include <sys/ioctl.h>
#include <sys/mman.h>
#include <unistd.h>
@taoky
taoky / keybase.md
Last active March 10, 2020 09:38
keybase.md

Keybase proof

I hereby claim:

  • I am taoky on github.
  • I am taoky (https://keybase.io/taoky) on keybase.
  • I have a public key ASC4zasMLGpbMhJDVIbJ2f5IdI5AQszvf9tJuKJRP4vhfgo

To claim this, I am signing this object:

@taoky
taoky / exp6.asm
Created February 9, 2020 09:49
FTOA and ATOF procedure assembly for 80387
.model SMALL
.386
.STACK 100H
.DATA
TEMP DW ?
NUMB REAL4 ?
STRING DB 1024 DUP(0)
WHOLE DD ?
FRACT DD ?
@taoky
taoky / decode.c
Last active September 27, 2019 11:24
Malware "送给最好的TA" Analysis
#include <stdio.h>
char * load(char *a2, size_t size)
{
char *v9; // r0
int v10; // r1
signed int v11; // r2
char *v13; // [sp+8h] [bp-28h]
size_t v14; // [sp+Ch] [bp-24h]
@taoky
taoky / extract.py
Last active November 26, 2020 06:44
help extract BGMs from "a game" (whose abbreviation is "SP")
import os
files = os.listdir(".")
files = [i for i in files if i[-4:] == ".owp"] # filter all owp files
for i in files:
with open(i, "rb") as fin:
fout = open(i[:-4] + ".ogg", "wb")
data = fin.read()
for j in data:
@taoky
taoky / AltChanger.js
Last active August 15, 2019 09:41
MSSSC-07 Img Alt Changer (2019)
// ==UserScript==
// @name MSSSC-07 Img Alt Changer
// @version 0.1
// @description Powered by Azure
// @run-at document-end
// @author MSSSC-07 Group
// @match *://cuteserver.taoky.moe/*
// @grant none
// @require https://cdn.bootcss.com/jquery/3.4.1/jquery.min.js
// @license MIT
@taoky
taoky / keygen-me-1.py
Created February 15, 2019 06:03
picoCTF 2018 "keygen-me-1" z3 solution
from z3 import *
serial = [Int("s[%d]" % i) for i in range(16)]
s = Solver()
for i in serial:
s.add(Or(And(i > 47, i <= 57), And(i > 64, i <= 90)))
def fun(x):
@taoky
taoky / ecb.py
Created February 14, 2019 09:30
picoCTF 2018 "SpyFi" exp
from pwn import *
from textwrap import wrap
from string import printable
context.log_level = "error"
def msg(s):
print s
r = remote("2018shell3.picoctf.com", 34490) # you may need to run this script several times, as the EOFError is quite disturbing.
r.recvuntil("report: ")
@taoky
taoky / lc3.tex
Created November 24, 2018 02:22
A small \lstdefinelanguage example of LC-3 assembly
%!TEX encoding = UTF-8 Unicode
%!TEX program = xelatex
\documentclass{article}
\title{Typesetting LC-3 Assembly with \LaTeX}
\author{@taoky}
\date{\today}
\usepackage{xcolor}