-
Notifications
You must be signed in to change notification settings - Fork 47
/
Copy pathMakefile
42 lines (30 loc) · 1.07 KB
/
Makefile
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
OUTPUT="./bin"
XPC=$(OUTPUT)/xpc.dylib
ROOT=$(OUTPUT)/root.dylib
.PHONY: bin/xpc.dylib bin/root.dylib
dylib: xpc root
download:
./getpkg.sh
xpc: xpc.mm
$(CC) $(CFLAGS) $(C_INCLUDES) -framework Foundation \
-dynamiclib xpc.mm \
-o $(XPC)
root: root.mm
$(CC) $(CFLAGS) -m32 $(C_INCLUDES) -framework Foundation \
-dynamiclib root.mm \
-o $(ROOT)
run: dylib
# first round, create required directory and change its permission:
# /Library/Application Support/Microsoft/PlayReady/
DYLD_INSERT_LIBRARIES="$(XPC)" \
"/Library/Application Support/Microsoft/MAU2.0/Microsoft AutoUpdate.app/Contents/MacOS/Microsoft AutoUpdate"
mkdir -p "/Library/Application Support/Microsoft/PlayReady/mspr.hds"
mkdir -p "/Library/Application Support/Microsoft/PlayReady/Cache/"
cp $(ROOT) "/Library/Application Support/Microsoft/PlayReady/Cache/exp.key"
# round two, get root
DYLD_INSERT_LIBRARIES="$(XPC)" \
"/Library/Application Support/Microsoft/MAU2.0/Microsoft AutoUpdate.app/Contents/MacOS/Microsoft AutoUpdate"
clean:
rm -rf $(OUTPUT)/*
format:
clang-format -i xpc.mm root.mm