Skip to content

Commit

Permalink
extract binary
Browse files Browse the repository at this point in the history
  • Loading branch information
ignisco committed Jul 19, 2024
1 parent 660558f commit f85b2c4
Show file tree
Hide file tree
Showing 5 changed files with 4 additions and 16 deletions.
2 changes: 1 addition & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -59,5 +59,5 @@ dkms.conf

# Data in both service and checker
service/data

service_source/data
checker/data
7 changes: 1 addition & 6 deletions service/dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -2,12 +2,7 @@
FROM ubuntu:22.04

# Install necessary packages
RUN apt-get update && apt-get install -y gcc python3 python3-pip make gdb cron libssl-dev file curl
RUN pip3 install pwntools


# Install GEF for GDB
RUN bash -c "$(curl -fsSL https://gef.blah.cat/sh)"
RUN apt-get update && apt-get install -y gcc cron libssl-dev

# Create a separate user and chown new directories if necessary
RUN addgroup --system service
Expand Down
11 changes: 2 additions & 9 deletions service/entrypoint.sh
Original file line number Diff line number Diff line change
Expand Up @@ -14,12 +14,5 @@ chown -R service:service "/data/"
# Start cron service
cron

# Build the project
make -C /src

# Launch our service as user 'service' and run 'run' within gdb
# exec su -s /bin/sh -c 'gdb -ex "set follow-fork-mode child" -ex run -ex quit /src/piratesay' service
exec su -s /bin/sh -c '/src/piratesay' service

# Keep the container running
# tail -f /dev/null
# Launch our service as user 'service'
exec su -s /bin/sh -c '/src/piratesay' service
Binary file added service/src/piratesay
Binary file not shown.
Binary file added service_source/src/piratesay_x86
Binary file not shown.

0 comments on commit f85b2c4

Please sign in to comment.