Skip to content

Instantly share code, notes, and snippets.

View incertia's full-sized avatar
💭
KEKW

Will Song incertia

💭
KEKW
View GitHub Profile
@incertia
incertia / oodle.rs
Created February 8, 2023 00:03
oodle network decompression in rust
use ffi_opaque::opaque;
opaque! {
struct OodleNetwork1UDP_StateCompacted;
struct OodleNetwork1UDP_State;
struct OodleNetwork1_Shared;
}
#[link(name = "oo2netlinux64", kind = "static")]
extern "C" {
use std::ops::Deref;
trait Foo { fn foo(&self); }
struct Bar { }
impl Foo for Bar {
fn foo(&self) { }
}
fn baz<T: Foo> (_: &T) { }
{-# LANGUAGE DataKinds #-}
{-# LANGUAGE FlexibleContexts #-}
{-# LANGUAGE NoMonomorphismRestriction #-}
{-# LANGUAGE MultiParamTypeClasses #-}
{-# LANGUAGE OverloadedLists #-}
{-# LANGUAGE TupleSections #-}
{-# LANGUAGE TypeApplications #-}
module AOC008 () where
data CharacteristicType = DiffPresent | DiffData
deriving (Show, Eq)
type family DiffType (t :: CharacteristicType) where
DiffType 'DiffPresent = Bool
DiffType 'DiffData = Maybe LevelData
data LevelInfo t = (Show (DiffType t), Eq (DiffType t), FromJSON (DiffType t)) =>
LevelInfo
{ _infoEasy :: DiffType t
@incertia
incertia / As.hs
Last active November 26, 2020 05:53
{-# LANGUAGE ExplicitForAll #-}
{-# LANGUAGE FlexibleInstances #-}
{-# LANGUAGE MultiParamTypeClasses #-}
{-# LANGUAGE RankNTypes #-}
module Data.As
( As(..)
) where
import Data.Functor.Const

UIUCTF Kernel Challenges

Kernel::Time_To_Start

You are tasked with logging into to the sandb0x user with 4-letter password starting with p. pwny seems like a good guess.

Whats_A_Syscall?

They want us to call syscall 14 with any argument. We assemble mov eax, 14; int 0x80 to b80e000000cd80.

{-# LANGUAGE AllowAmbiguousTypes #-}
{-# LANGUAGE DataKinds #-}
{-# LANGUAGE FlexibleContexts #-}
{-# LANGUAGE GADTs #-}
{-# LANGUAGE KindSignatures #-}
{-# LANGUAGE LambdaCase #-}
{-# LANGUAGE PolyKinds #-}
{-# LANGUAGE ScopedTypeVariables #-}
{-# LANGUAGE TemplateHaskell #-}
{-# LANGUAGE TypeApplications #-}
{-# LANGUAGE AllowAmbiguousTypes #-}
{-# LANGUAGE DataKinds #-}
{-# LANGUAGE FlexibleContexts #-}
{-# LANGUAGE GADTs #-}
{-# LANGUAGE LambdaCase #-}
{-# LANGUAGE PolyKinds #-}
{-# LANGUAGE RankNTypes #-}
{-# LANGUAGE ScopedTypeVariables #-}
{-# LANGUAGE TemplateHaskell #-}
{-# LANGUAGE TypeApplications #-}
{-# LANGUAGE DataKinds #-}
{-# LANGUAGE FlexibleContexts #-}
{-# LANGUAGE GADTs #-}
{-# LANGUAGE LambdaCase #-}
{-# LANGUAGE PolyKinds #-}
{-# LANGUAGE ScopedTypeVariables #-}
{-# LANGUAGE TemplateHaskell #-}
{-# LANGUAGE TypeApplications #-}
{-# LANGUAGE TypeFamilies #-}
{-# LANGUAGE TypeOperators #-}
{-# LANGUAGE DataKinds #-}
{-# LANGUAGE FlexibleContexts #-}
{-# LANGUAGE GADTs #-}
{-# LANGUAGE LambdaCase #-}
{-# LANGUAGE PolyKinds #-}
{-# LANGUAGE ScopedTypeVariables #-}
{-# LANGUAGE TemplateHaskell #-}
{-# LANGUAGE TypeApplications #-}
{-# LANGUAGE TypeFamilies #-}
{-# LANGUAGE TypeOperators #-}