Skip to content

Commit

Permalink
Update android-release.yml
Browse files Browse the repository at this point in the history
  • Loading branch information
dogi authored Jan 26, 2024
1 parent 5bb91ab commit 7128c6c
Showing 1 changed file with 18 additions and 22 deletions.
40 changes: 18 additions & 22 deletions .github/workflows/android-release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -83,28 +83,24 @@ jobs:
# releaseName: "${{ env.ANDROID_VERSION_CODE }} (${{ env.ANDROID_VERSION_NAME }})"
# status: completed

- name: mobile security framework
run: |
docker pull opensecurity/mobile-security-framework-mobsf
docker run -itd -p 8000:8000 opensecurity/mobile-security-framework-mobsf:latest
cd output
ls -al
wget http://localhost:8000/api_docs
MOBSF_API_KEY=$(grep 'Api Key' api_docs)
echo MOBSF_API_KEY
MOBSF_API_KEY=${MOBSF_API_KEY:37:64}
echo MOBSF_API_KEY
rm api_docs
HASH=$(md5sum remote.apk)
echo 6
HASH=${HASH:0:32}
echo 7
curl -F "[email protected]" http://localhost:8000/api/v1/upload -H "Authorization:$MOBSF_API_KEY"
echo 8
curl -X POST --url http://localhost:8000/api/v1/scan --data "scan_type=apk&file_name=remote.apk&hash=$HASH" -H "Authorization:$MOBSF_API_KEY"
echo 9
curl -X POST --url http://localhost:8000/api/v1/download_pdf --data "hash=$HASH" -H "Authorization:$MOBSF_API_KEY" --output remote-${{ steps.version.outputs.id }}.pdf
ls -al
# - name: mobile security framework
# run: |
# docker pull opensecurity/mobile-security-framework-mobsf
# docker run -itd -p 8000:8000 opensecurity/mobile-security-framework-mobsf:latest
# cd output
# ls -al
3 wget http://localhost:8000/api_docs
# MOBSF_API_KEY=$(grep 'Api Key' api_docs)
# echo MOBSF_API_KEY
# MOBSF_API_KEY=${MOBSF_API_KEY:42:64}
# echo MOBSF_API_KEY
# rm api_docs
# HASH=$(md5sum remote.apk)
# HASH=${HASH:0:32}
# curl -F "[email protected]" http://localhost:8000/api/v1/upload -H "Authorization:$MOBSF_API_KEY"
# curl -X POST --url http://localhost:8000/api/v1/scan --data "scan_type=apk&file_name=remote.apk&hash=$HASH" -H "Authorization:$MOBSF_API_KEY"
# curl -X POST --url http://localhost:8000/api/v1/download_pdf --data "hash=$HASH" -H "Authorization:$MOBSF_API_KEY" --output remote-${{ steps.version.outputs.id }}.pdf
# ls -al

- name: rename APK and AAB with version and branch for artifact
if: github.ref != 'refs/heads/master'
Expand Down

0 comments on commit 7128c6c

Please sign in to comment.