Story
Tired from all of the craziness in the Inner Sanctum, you decide to venture out to the beach to relax. You doze off in the sand only to be awoken by the loud “reee” of an osprey. A shell falls out of its talons and lands right where your head was a moment ago. No rest for the weary, huh? It looks a little funny, so you pick it up and realize that it’s backwards. I guess you’ll have to reverse it.
Problem details
Hint: The flag format is
pctf{$FLAG}
. This constraint should resolve any ambiguities in solutions.
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
# Quick implementation of ITU's recommendation P.676 (current v13, 8/2022) | |
# Please note: I'm not a python programmer (I prefer C/asm), so there probably | |
# are ways to minimize the loss of precission that I don't know of | |
import numpy as np | |
def _gaspl(d, f, T, p, den): | |
d = d / 1000 # km | |
f = f / 1e9 # GHz | |
T = 273.15 + T # K |
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
#include <stdio.h> | |
#include <sys/mman.h> | |
#include <unistd.h> | |
int main(int _, char** argv) | |
{ | |
FILE* f; | |
munmap((void*) ((long)argv[0] & ~0xfff), 1); | |
if(f = fopen("flag", "rb")) |
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
#include <stdio.h> | |
#include <unistd.h> | |
#include <stdlib.h> | |
#include <stdint.h> | |
#include <sys/types.h> | |
#include <sys/stat.h> | |
#include <fcntl.h> | |
#include <err.h> | |
#include <sys/ioctl.h> | |
#include <string.h> |
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
/* Compile with -znow */ | |
#include <stdlib.h> | |
#include <stdio.h> | |
#include <unistd.h> | |
#include <fcntl.h> | |
#include <string.h> | |
#include <sys/mman.h> | |
#include <sys/stat.h> | |
#include <sys/wait.h> | |
#include <elf.h> |
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 python3 | |
from os import * | |
from mmap import PROT_EXEC, PROT_READ | |
from sys import argv | |
key = 0xa3 | |
ELF_READ = 4 | |
ELF_WRITE = 2 | |
ELF_EXEC = 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
from pwn import * | |
# CONFIG # | |
## Basic stuff | |
rhost = "localhost" # Remote host | |
rport = 1234 # Remote port | |
fname = "a.bin" # Output filename | |
## Address where the binary is loaded |
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
/** | |
Name : Asteroids | |
Author : Arget | |
Version : 1.4 | |
Date : 16/11/2017 | |
Description : A simple implementation of asteroids game for modern terminals. | |
Notes : Compile with `gcc -o asteroids asteroids.c' | |
*/ | |
#include <stdio.h> /* printf(), putchar() */ |