Skip to content

Instantly share code, notes, and snippets.

import math
l = 1050
for i in range(500):
a = i + 1
print(a, end=", ")
b = (5/4 * l ** 2 - 3 * a * l + a ** 2) / (2 * l)
print(b)
@saru2017
saru2017 / pwn05.py
Created June 16, 2019 14:40
CTF: pwn05
#!/usr/bin/python3
import sys, os, tempfile, subprocess
data = input(">").strip()
if len(data) > 12:
print("too large file")
exit(-1)
with tempfile.TemporaryDirectory() as dirname:
name = os.path.join(dirname, "user")
@saru2017
saru2017 / pwn04.c
Last active June 16, 2019 14:33
CTF: pwn04
#include <stdio.h>
#include <stdlib.h>
int main()
{
char pass[32];
setvbuf(stdout, NULL, _IONBF, 0);
setvbuf(stdin, NULL, _IONBF, 0);
puts("Welcome to Pwn04!!!");
@saru2017
saru2017 / pwn03.c
Created June 16, 2019 14:26
CTF: pwn03
#include <stdio.h>
#include <stdlib.h>
int main()
{
char pass[32];
setvbuf(stdout, NULL, _IONBF, 0);
setvbuf(stdin, NULL, _IONBF, 0);
puts("Welcome to Pwn03!!!");
@saru2017
saru2017 / pwn02.c
Created June 16, 2019 14:17
CTF: pwn02
#include <stdio.h>
#include <stdlib.h>
int main()
{
FILE *fp;
char pass_stdin[32];
char pass_file[32];
int ret;
@saru2017
saru2017 / pwn01.c
Created June 16, 2019 14:00
CTF: pwn01
#include <stdio.h>
#include <stdlib.h>
int main()
{
char pass[32];
setvbuf(stdout, NULL, _IONBF, 0);
setvbuf(stdin, NULL, _IONBF, 0);
puts("Welcome to Pwn01!!!");
@saru2017
saru2017 / pwn05.py
Created June 16, 2019 09:04
CTF: pwn05
#!/usr/bin/python3
import sys, os, tempfile, subprocess
data = input(">").strip()
if len(data) > 12:
print("too large file")
exit(-1)
with tempfile.TemporaryDirectory() as dirname:
name = os.path.join(dirname, "user")
@saru2017
saru2017 / misc04.txt
Created June 16, 2019 03:13
CTF: misc04
SlpXSEcyQ1ZMQkVYU1VUTFBCQ0dDUkNPSUpIRk1RVFpLSkxVRVVEQ1BKVlRRVVNET1JJV0dNQ09ORk5IVU9EWUtOQ0RLU1NYSTVVRVVUVFpIQjVGTVZETE81TVhVMlpOS0laVU1WMlhJTlhUR1QzTkpVPT09PT09
@saru2017
saru2017 / misc03_correct_table.txt
Created June 16, 2019 03:11
CTF: misc03: 正しいテーブル
ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/
@saru2017
saru2017 / misc03_wront_table.txt
Created June 16, 2019 03:09
CTF: misc03: 間違ったテーブル
0NwDgMEhHysJvTtdaKcAjR/16U2Ye4p3mXrz9qQZFGiuVnOlf+SWCob5xB8kPL7I