This is a tiny injector for extracting keys for encrypting DouyuTv URLs.
- A rooted Android device with libdvm.so as the default virtual machine
- A recent version of Linux with Android SDK and Android NDK installed
- fb-adb as a replacement of adb (Optional but recommended)
First, clone this repo and update submodules
git clone https://github.com/yan12125/douyu-hack
git submodule update --init --recursive
Then copy necessary binaries for build ddi and adbi. Connect your Android device and type the following commands:
cd ddi/dalvikhook/jni/
mkdir libs && cd libs
adb pull /system/lib/libdl.so
adb pull /system/lib/libdvm.so
Then build adbi and ddi respectively:
pushd adbi && bash ./build.sh && popd
pushd ddi && bash ./build.sh && popd
Finnaly, build douyu-hack:
ndk-build
Now push necessary files into the device:
adb push ./adbi/hijack/libs/armeabi/hijack /data/local/tmp/
adb push ./libs/armeabi/libdouyu-hack.so /data/local/tmp/
Run the Douyu App on the phone, click on any of the channels to make sure that the class to inject is already loaded
fb-adb shell
su
cd /data/local/tmp/
touch douyu-hack.log
chmod 777 douyu-hack.log
ps | grep douyu
./hijack -d -p PID -l /data/local/tmp/libdouyu-hack.so # PID is got in the previous command
Repeat the action of entering a channel, and view douyu-hack.log for the results.
Licensed under GPLv3. Visit http://opensource.org/licenses/gpl-3.0.html for more information