diff --git a/README.md b/README.md index c667c92..f172a60 100644 --- a/README.md +++ b/README.md @@ -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. diff --git a/docker/Dockerfile b/docker/Dockerfile new file mode 100644 index 0000000..b85a10b --- /dev/null +++ b/docker/Dockerfile @@ -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"] diff --git a/docker/stacoan.sh b/docker/stacoan.sh new file mode 100644 index 0000000..9852a91 --- /dev/null +++ b/docker/stacoan.sh @@ -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 '' > /StaCoAn/report/index.html +cd /StaCoAn/report/ && python -m http.server