You are tasked with logging into to the sandb0x
user with 4-letter password starting with p
. pwny
seems like a good guess.
They want us to call syscall 14 with any argument. We assemble mov eax, 14; int 0x80
to b80e000000cd80
.
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 |
{-# LANGUAGE ExplicitForAll #-} | |
{-# LANGUAGE FlexibleInstances #-} | |
{-# LANGUAGE MultiParamTypeClasses #-} | |
{-# LANGUAGE RankNTypes #-} | |
module Data.As | |
( As(..) | |
) where | |
import Data.Functor.Const |
{-# 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 #-} |