当您启动利用dirtycow错误时,弹出目录名命令未找到

时间:2018-12-11 15:05:18

标签: android bash compiler-errors android-ndk

我想在Linux上启动一个exploitdunkcow。当我运行make root命令时,出现错误:

/home/olegratnikov/android-ndk-r18b/build/ndk-build: line 40: dirname: command not found
/home/olegratnikov/android-ndk-r18b/build/ndk-build: line 122: uname: command not found
ERROR: Unknown host operating system: 
Makefile:8: recipe execution error for "build" target
make: *** [build] Mistake 1

Makefile:

ARCH := $(shell adb shell getprop ro.product.cpu.abi)
SDK_VERSION := $(shell adb shell getprop ro.build.version.sdk)
PATH :=/home/olegratnikov/android-ndk-r18b/build
all: build

build:
    ndk-build NDK_PROJECT_PATH=$(PATH) APP_BUILD_SCRIPT=./Android.mk APP_ABI=$(ARCH) APP_PLATFORM=android-$(SDK_VERSION)



 push: build
        adb push libs/$(ARCH)/dirtycow /data/local/tmp/dcow
        adb shell 'chmod 777 /data/local/tmp/dcow'
test: push
    adb push test.sh /data/local/tmp/test.sh
    adb shell 'chmod 777 /data/local/tmp/dcow'
    adb shell 'chmod 777 /data/local/tmp/test.sh'
    adb shell '/data/local/tmp/test.sh'
    adb shell '/data/local/tmp/dcow /data/local/tmp/test /data/local/tmp/test2'
    adb shell 'cat /data/local/tmp/test2'
    adb shell 'cat /data/local/tmp/test2' | xxd

0 个答案:

没有答案