-
Notifications
You must be signed in to change notification settings - Fork 5
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Implement builder on the server side
- Loading branch information
Showing
10 changed files
with
85 additions
and
47 deletions.
There are no files selected for viewing
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
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,15 +1,18 @@ | ||
#!/bin/bash | ||
|
||
# Check if the RELEASE_OUTFILE variable is set | ||
if [ -z "$RELEASE_OUTFILE" ]; then | ||
RELEASE_OUTFILE=implant_release.exe | ||
fi | ||
|
||
# Make a copy of the src directory | ||
cp -r src/ src_copy/ | ||
|
||
# Find all .cpp files in the copied directory and replace the text | ||
find src_copy/ -name "*.cpp" -exec sed -i 's/DEBUG_PRINTF(/\/\/ DEBUG_PRINTF(/g' {} \; | ||
|
||
|
||
# Build the implant | ||
make release | ||
BUILDER_OPTS=$BUILDER_OPTS RELEASE_OUTFILE=$RELEASE_OUTFILE make release | ||
|
||
# Remove the copied directory | ||
rm -rf src_copy/ | ||
rm -rf src_copy/ |
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
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
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,10 +1,14 @@ | ||
FROM python:3.11 | ||
ADD . /app | ||
ADD ./server /app | ||
ADD ./implant/ /implant | ||
WORKDIR /app | ||
ENV DEBUG=True | ||
ENV PORT=5000 | ||
ENV BIND=0.0.0.0 | ||
ENV WORKERS=1 | ||
RUN pip install -r requirements.txt | ||
RUN apt update | ||
RUN apt install g++-mingw-w64 -y | ||
#CMD python make_db.py && python app.py --start-operator -p ${PORT} ${DEBUG} | ||
CMD gunicorn "app:operator_app" --bind ${BIND}:${PORT} --workers ${WORKERS} --reload | ||
# Need long timeout here for compilation of the implant | ||
CMD gunicorn "app:operator_app" --bind ${BIND}:${PORT} --workers ${WORKERS} --reload --timeout 120 |
Empty file.
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
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
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
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