Skip to content

Instantly share code, notes, and snippets.

Avatar

hikalium hikalium

View GitHub Profile
View gist:c1824cda8b87a5d084a31e088ef7f01b
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
View check_mmap_jit_behaviour.c
#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");
}
View keybase.md

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 Dec 22, 2019
Parser for SECCON 2019 final q4 box4
View print.js
// 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 Oct 20, 2019
AVI file reader for SECCON 2019 Online CTF
View reader.c
#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
.config for UEFI boot + SMP Support on qemu-system-x86_64
View .config
#
# 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
View osgirls_support.md

OS Girlsのサポートページ

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

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

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

2019-11-19

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

@hikalium
hikalium / getroot.c
Created Dec 3, 2018
Compute (inaccurate) square root (2012)
View getroot.c
#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 Jul 24, 2018
minimal settings with webapi for deborah
View settings.json
{
"interfaces": [
{
"type": "stdio"
},
{
"type": "webapi"
}
],
"profile": {
@hikalium
hikalium / trace.js
Created Dec 10, 2017
seccon 2017 online CTF writeup (Remote debugging of a micro computer)
View trace.js
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,