Skip to content

Commit

Permalink
yay
Browse files Browse the repository at this point in the history
  • Loading branch information
ken-gannon-ncc committed May 4, 2023
1 parent 5b98a31 commit 7d31b9f
Show file tree
Hide file tree
Showing 4 changed files with 11 additions and 8 deletions.
1 change: 1 addition & 0 deletions build.py
Original file line number Diff line number Diff line change
Expand Up @@ -82,6 +82,7 @@ def getLastGithubRelease(yayrepoyay):
zip_object.write('./META-INF/com/google/android/update-binary')
zip_object.write('./META-INF/com/google/android/updater-script')
zip_object.write('./system/etc/security/cacerts/yayplaceholderyay')
zip_object.write('./system/bin/yayplaceholderyay')
zip_object.write('./module.prop')
zip_object.write('./post-fs-data.sh')
zip_object.write('./service.sh')
4 changes: 2 additions & 2 deletions module.prop.gold
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
id=YayPentestMagiskModuleYay
name=YayPentestMagiskModuleYay
version=1.0
versionCode=1
version=1.1
versionCode=2
author=Yogehi
description=Magisk Module to configure a device specifically for pentesting
13 changes: 7 additions & 6 deletions post-fs-data.sh
Original file line number Diff line number Diff line change
Expand Up @@ -22,9 +22,11 @@ rm $MODDIR/system/etc/security/cacerts/yayplaceholderyay

# put frida-server on device

ARCH=$(/data/adb/magisk/busybox arch)

case $ARCH in
arm64) YayArchYay=$ARCH;;
arm) YayArchYay=$ARCH;;
aarch64) YayArchYay=arm64;;
aarch32) YayArchYay=arm;;
x64) YayArchYay=x86_64;;
x86) YayArchYay=$ARCH;;
*) YayArchYay=yayunsupportedyay;;
Expand All @@ -34,16 +36,15 @@ if [ $YayArchYay = "yayunsupportedyay" ]; then
ui_print "[-] Unsupported architecture, Frida will not work"
ui_print "[-] Manually download and run frida-server from https://github.com/frida/frida/releases"
else
YayTargetDirYay="$MODPATH/system/bin"
YayTargetDirYay="$MODDIR/system/bin"
YayUnzipYay="/data/adb/magisk/busybox unzip"
YayXzYay="/data/adb/magisk/busybox xz"

mkdir -p "$YayTargetDirYay"
$YayUnzipYay -qq -o "$ZIPFILE" "files/frida-server-$YayArchYay.xz" -j -d "$YayTargetDirYay"
cp -f $MODDIR/files/frida-server-$YayArchYay.xz "$YayTargetDirYay"

$YayXzYay -d "$YayTargetDirYay/frida-server-$YayArchYay.xz"

mv "$YayTargetDirYay/frida-server-$YayArchYay" "$YayTargetDirYay/frida-server"

set_perm $YayTargetDirYay/frida-server 0 2000 0755 u:object_r:system_file:s0
chmod 755 $YayTargetDirYay/frida-server
fi
1 change: 1 addition & 0 deletions system/bin/yayplaceholderyay
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
yayplaceholderyay

0 comments on commit 7d31b9f

Please sign in to comment.