------------------------------------------------------------

Q1:

echo -ne 'abc\xff\xfe\xfc' | xargs touch
/seccon2018/Q1 ~/abc�・

Q2:

PYTHONINSPECT=yes /seccon2018/Q2 /seccon2018/q2.txt
print(open(file, 'rb').read(1024))

Q3:

/usr/local/lib64/ld-linux-x86-64.so.2 /seccon2018/Q3

Q4:

truncate -s 9223372036854775807 file1
truncate -s 1 file2
truncate -s 1234 file3
/seccon2018/Q4 ~/file1 ~/file2 ~/file1 ~/file3

Q5:

truncate -s 4294967296 file
/seccon2018/Q5 < file 3>&1 1>&2 | cat > /dev/null

Q6:

for i in `seq 0 65535`; do echo 1; done | /seccon2018/Q6

Q7:

gcc -Wall -O3 -o Q7-solver -x c - << "EOF"
#include <stdio.h>
#include <stdlib.h>
#include <time.h>

int main(int argc, char *argv[])
{
    int i;
    srand(time(NULL));
    for (i = 0; i < 8; i++)
        printf("%u\n", ((rand() % 3) + 2) % 3);
    return 0;
}
EOF
./Q7-solver | /seccon2018/Q7

------------------------------------------------------------
