diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml new file mode 100644 index 0000000..d0b06b1 --- /dev/null +++ b/.github/workflows/build.yml @@ -0,0 +1,44 @@ +name: Build + +on: + push: + paths: + - '*.c' + - '*.h' + - 'Android.mk' + - '.github/workflows/build.yml' + workflow_dispatch: + inputs: + abi: + type: string + description: ABI + default: armeabi-v7a + required: true + platform: + type: string + description: PLATFORM + default: "19" + required: true + +jobs: + build: + name: Build + runs-on: ubuntu-latest + + steps: + - name: Checkout + uses: actions/checkout@v4 + + - name: Compile + run: | + if [ ${{ github.event_name }} != "push" ]; then + $ANDROID_HOME/ndk/24.0.8215888/ndk-build NDK_PROJECT_PATH=. APP_BUILD_SCRIPT=./Android.mk APP_ABI=${{ inputs.abi }} APP_PLATFORM=android-${{ inputs.platform }} + else + $ANDROID_HOME/ndk/24.0.8215888/ndk-build NDK_PROJECT_PATH=. APP_BUILD_SCRIPT=./Android.mk APP_ABI=armeabi-v7a APP_PLATFORM=android-19 + fi + + - name: Uplaod + uses: actions/upload-artifact@v4 + with: + name: CVE-2016-5195(dirtycow) + path: libs/${{ inputs.abi }}/* diff --git a/.gitignore b/.gitignore index 83ad9c3..130e906 100644 --- a/.gitignore +++ b/.gitignore @@ -1,28 +1,3 @@ -# files for diffutils -*.orig -*.rej - -# built application files -*.apk -*.ap_ - -# files for the dex VM -*.dex - -# Java class files -*.class - # generated files -bin/ -gen/ libs/ obj/ - -# Local configuration file (sdk path, etc) -local.properties -build.prop -build.prop.bak - -# Eclipse project files -.classpath -.project diff --git a/test.sh b/test.sh deleted file mode 100644 index 6a1a0c7..0000000 --- a/test.sh +++ /dev/null @@ -1,17 +0,0 @@ - -if [ -f /data/local/tmp/test ]; then - chmod 777 /data/local/tmp/test - rm /data/local/tmp/test -fi - -if [ -f /data/local/tmp/test2 ]; then - chmod 777 /data/local/tmp/test2 - rm /data/local/tmp/test2 -fi - -echo vulnerable!!!!!!! > /data/local/tmp/test -echo yournotvulnerable > /data/local/tmp/test2 - -chmod 444 /data/local/tmp/test2 -ls -l /data/local/tmp/test* -