Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Added docker container for quick review of an application. #6

Merged
merged 3 commits into from
Feb 9, 2018
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 9 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -94,6 +94,15 @@ __Linux__

`python3 -m PyInstaller main.py --onefile -p jadx --icon icon.ico --name stacoan --clean`

### Running the Docker container

`cd docker`

`docker build . -t stacoan`

`docker run -p 8000:8000 -v /yourappsfolder:/tmp -i -t stacoan /tmp/com.myapk.apk`

Wait for it to be analysed and the open your browser in http://localhost:8000

## Contributing
This entire program's value is depending on the wordlists it is using. In the end, the final result is what matters. It is easy to build a wordlist (in comparison to writing actual code), but it has the biggest impact on the end result. You can help the community the most with making wordlists.
Expand Down
12 changes: 12 additions & 0 deletions docker/Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
FROM python:3

RUN apt-get update && apt-get install upx -y

RUN git clone https://github.com/vincentcox/StaCoAn/
WORKDIR /StaCoAn
RUN pip3 install -r requirements.txt && chmod u+rwx /StaCoAn/jadx/bin/jadx

COPY stacoan.sh /stacoan.sh

EXPOSE 8000
ENTRYPOINT ["/bin/bash", "/stacoan.sh"]
16 changes: 16 additions & 0 deletions docker/stacoan.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
#!/bin/bash

# https://unix.stackexchange.com/questions/25945/how-to-check-if-there-are-no-parameters-provided-to-a-command
if [ $# -eq 0 ]; then
echo "[!] Pass at least the name of the app to be analysed."
echo -e "\t - Remember to mount the volume and pass the container path to the app."
exit 1
fi

python /StaCoAn/main.py $@
# https://stackoverflow.com/questions/90418/exit-shell-script-based-on-process-exit-code
rc=$?; if [[ $rc != 0 ]]; then exit $rc; fi

# Redirect to start.html
echo '<meta http-equiv="refresh" content="0; url=/start.html" />' > /StaCoAn/report/index.html
cd /StaCoAn/report/ && python -m http.server