diff --git a/arrayaddition/Dockerfile b/arrayaddition/Dockerfile new file mode 100644 index 0000000..939a39b --- /dev/null +++ b/arrayaddition/Dockerfile @@ -0,0 +1,6 @@ +FROM --platform=linux/amd64 ubuntu:latest + +RUN apt-get update -y && apt-get install -y gcc && rm -rf /var/lib/apt/lists/* + +COPY main.c . +RUN gcc -o arrayaddition main.c diff --git a/arrayaddition/chall.yaml b/arrayaddition/chall.yaml new file mode 100644 index 0000000..88d6717 --- /dev/null +++ b/arrayaddition/chall.yaml @@ -0,0 +1,20 @@ +name: Array Addition +categories: + - rev +value: 25 +flag: bcactf{w0W_cHa4aCt3R_aDD} +description: |- + Someone asked how well I could add ASCII characters. Please help. +hints: + - What values are ASCII characters stored in? + - Is it possible there's a relation between the character and its position? +files: + - src: ./arrayaddition + container: static +authors: + - Joshua Peisach (ItzSwirlz) +visible: true +deploy: + static: + build: . +# TODO: deployment diff --git a/arrayaddition/flag.txt b/arrayaddition/flag.txt new file mode 100644 index 0000000..c8388dc --- /dev/null +++ b/arrayaddition/flag.txt @@ -0,0 +1 @@ +bcactf{w0W_cHa4aCt3R_aDD} diff --git a/arrayaddition/main.c b/arrayaddition/main.c new file mode 100644 index 0000000..b6f5111 --- /dev/null +++ b/arrayaddition/main.c @@ -0,0 +1,20 @@ +// flag is this +// bcactf{w0W_cHa4aCt3R_aDD} +#include + +char arr[30] = {'b', 'b', '_', '`', 'p', 'a', 'u', 'p', '(', 'N', 'U', 'X', '<', 'T', '&', 'R', '3', 'c', '!', '?', 'K', 'L', '.', '-', 'e'}; +int main() { + // this will show how the text was generated which you can find w/ strings + // for(int i = 0; i < 25; i++) { + // printf("%c", arr[i] + i); + // } + + // solution: + // the same as above but subtract i instead of add + + printf("Alright, here's the deal:\n"); + printf("There is an array hiding somewhere in this program..\n"); + printf("But it is a little bit odd.\n"); + printf("I think there's a correlation between the individual data in the array's placement and what the data actually means."); + return 0; +}