Skip to content

Instantly share code, notes, and snippets.

View hikalium's full-sized avatar

hikalium hikalium

View GitHub Profile
SeaBIOS (version rel-1.14.0-0-g155821a1990b-prebuilt.qemu.org)
iPXE (http://ipxe.org) 00:03.0 CA00 PCI2.10 PnP PMM+7FF8EE80+7FEEEE80 CA00
Booting from Hard Disk...
Redox Loader - Stage One
00000001#007F 0000:7E00
#include <errno.h>
#include <stdio.h>
#include <string.h>
#include <sys/mman.h>
void print_prot_bits(int prot) {
printf((prot & PROT_READ) == 0 ? "-" : "R");
printf((prot & PROT_WRITE) == 0 ? "-" : "W");
printf((prot & PROT_EXEC) == 0 ? "-" : "X");
}

Keybase proof

I hereby claim:

  • I am hikalium on github.
  • I am hikalium (https://keybase.io/hikalium) on keybase.
  • I have a public key ASCf_RxDN_pFv5akQqZYNoTRu93wHW6xsd9KrEym-hjQJwo

To claim this, I am signing this object:

@hikalium
hikalium / print.js
Created December 22, 2019 14:04
Parser for SECCON 2019 final q4 box4
// box4
const fs = require('fs');
const filename = process.argv[2];
const parseTrace =
(fileName) => {
const trace = JSON.parse(fs.readFileSync(fileName, 'utf-8'));
const base_addr = parseInt(trace[0].base_addr, 16);
const branches = trace.filter(e => (e.inst_addr != undefined)).map(e => {
if (e.event === 'call') {
@hikalium
hikalium / reader.c
Created October 20, 2019 06:29
AVI file reader for SECCON 2019 Online CTF
#include <stdint.h>
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
char buf[1024 * 1024 * 4];
typedef struct _avimainheader {
uint32_t fcc;
uint32_t cb;
@hikalium
hikalium / .config
Created May 20, 2019 22:54
.config for UEFI boot + SMP Support on qemu-system-x86_64
#
# Automatically generated file; DO NOT EDIT.
# Linux/x86 5.2.0-rc1 Kernel Configuration
#
#
# Compiler: gcc (Ubuntu 5.4.0-6ubuntu1~16.04.10) 5.4.0 20160609
#
CONFIG_CC_IS_GCC=y
CONFIG_GCC_VERSION=50400

OS Girlsのサポートページ

このページは、技術書典6にて頒布した、OS Girlsを購入してくださった皆さま向けに情報を提供するページです。

pdf版の書籍は、BOOTHで販売しています。

かんたん後払いで購入いただいたみなさまは、技術書典のマイページからpdfをダウンロードできるはずです。詳細は、技術書典運営による案内ツイートを参考にしてください。

2019-11-19

「そういえば先輩、今まで教えていただいたプログラムなんですけど、家に帰ってからちょっと遊んでみたいなあって思ったんですが、データをいただけたりしますか?」

@hikalium
hikalium / getroot.c
Created December 3, 2018 02:25
Compute (inaccurate) square root (2012)
#include <stdio.h>
#include <stdlib.h>
typedef struct MATH_BIGNUMBER {
unsigned int size_word; //value size in unsigned short(word).
unsigned short *value; //pointer to value array in unsigned short.
} MATH_BigNumber;
typedef union MATH_BIGNUMBER_WORK32 {
@hikalium
hikalium / settings.json
Created July 24, 2018 16:36
minimal settings with webapi for deborah
{
"interfaces": [
{
"type": "stdio"
},
{
"type": "webapi"
}
],
"profile": {
@hikalium
hikalium / trace.js
Created December 10, 2017 10:49
seccon 2017 online CTF writeup (Remote debugging of a micro computer)
var fs = require('fs');
var regNames = {
0: "PC",
1: "SP",
};
var prevRegs = [
0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0,