Skip to content

Instantly share code, notes, and snippets.

hikalium

Block or report user

Report or block hikalium

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
@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,
View check.v
module check();
reg signed [15:0] a,b,c;
initial begin
b = 16'hffdd; // -35
c = 16'h02;
a = b >>> c; // c will be -9 = 16'fff7
$display("%x", a);
$finish;
end
endmodule
View nvmememo.md
@hikalium
hikalium / led.v
Created May 21, 2017
verilog sample 001
View led.v
module led (led1,led2,clk,btn);
input clk;
input btn;
output led1;
output led2;
reg[24:0]count;
assign led1 = count[24];
assign led2 = btn;
always @(posedge(clk)) begin
if(btn == 0) count <= count + 1;
You can’t perform that action at this time.