diff --git a/assets/PTFM.VolumeIcon.icns b/assets/PTFM.VolumeIcon.icns new file mode 100644 index 0000000..38d1ff0 Binary files /dev/null and b/assets/PTFM.VolumeIcon.icns differ diff --git a/assets/PTFM.background.png b/assets/PTFM.background.png new file mode 100644 index 0000000..a747306 Binary files /dev/null and b/assets/PTFM.background.png differ diff --git a/crack/LicenseServices b/crack/LicenseServices new file mode 100755 index 0000000..925dd26 Binary files /dev/null and b/crack/LicenseServices differ diff --git a/crack/LicenseServices.crack.md b/crack/LicenseServices.crack.md new file mode 100644 index 0000000..2c15083 --- /dev/null +++ b/crack/LicenseServices.crack.md @@ -0,0 +1,121 @@ +# Crack For Parallels Toolbox + +crack for 6.0.0-4536 + +## 1. LicenseServices + +Location: `Contents/Frameworks/LicenseServices.framework/Versions/A/LicenseServices` + +patch function `-[LICLicenseInfo rawStatus]` to `return 0` + +### x86_64 + +``` +__text:0000000000009AB4 ; int __cdecl -[LICLicenseInfo rawStatus](LICLicenseInfo *self, SEL) +__text:0000000000009AB4 __LICLicenseInfo_rawStatus_ proc near ; DATA XREF: __objc_const:00000000001570C0↓o +__text:0000000000009AB4 +__text:0000000000009AB4 var_30 = qword ptr -30h +__text:0000000000009AB4 +__text:0000000000009AB4 55 push rbp +__text:0000000000009AB5 48 89 E5 mov rbp, rsp +__text:0000000000009AB8 41 57 push r15 +__text:0000000000009ABA 41 56 push r14 +__text:0000000000009ABC 41 55 push r13 +__text:0000000000009ABE 41 54 push r12 +__text:0000000000009AC0 53 push rbx +__text:0000000000009AC1 50 push rax +__text:0000000000009AC2 49 89 FC mov r12, rdi +__text:0000000000009AC5 48 8B 7F 18 mov rdi, [rdi+18h] ; id +__text:0000000000009AC9 FF 15 01 27 13 00 call cs:_objc_retain_ptr +__text:0000000000009ACF 49 89 C7 mov r15, rax +__text:0000000000009AD2 48 89 C7 mov rdi, rax ; obj +__text:0000000000009AD5 E8 06 9D 0E 00 call _objc_sync_enter +__text:0000000000009ADA 49 8B 7C 24 18 mov rdi, [r12+18h] ; id +__text:0000000000009ADF 48 8B 35 9A 21 15 00 mov rsi, cs:selRef_count ; SEL +__text:0000000000009AE6 FF 15 D4 26 13 00 call cs:_objc_msgSend_ptr +__text:0000000000009AEC 48 85 C0 test rax, rax +__text:0000000000009AEF 0F 84 60 01 00 00 jz loc_9C55 +__text:0000000000009AF5 48 8B 3D 44 2B 15 00 mov rdi, cs:classRef_LICLicenseInfo ; id +__text:0000000000009AFC 49 8B 54 24 18 mov rdx, [r12+18h] +``` + +opcode + +``` +55 48 89 E5 41 57 41 56 41 55 41 54 53 50 49 89 +FC 48 8B 7F 18 FF 15 01 27 13 00 49 89 C7 48 89 +C7 E8 06 9D 0E 00 49 8B 7C 24 18 48 8B 35 9A 21 +15 00 FF 15 D4 26 13 00 48 85 C0 0F 84 60 01 00 +``` + +patch + +``` +48 31 C0 C3 +``` + +after + +``` +__text:0000000000009AB4 ; int __cdecl -[LICLicenseInfo rawStatus](LICLicenseInfo *self, SEL) +__text:0000000000009AB4 __LICLicenseInfo_rawStatus_ proc near ; DATA XREF: __objc_const:00000000001570C0↓o +__text:0000000000009AB4 48 31 C0 xor rax, rax +__text:0000000000009AB7 C3 retn +__text:0000000000009AB7 __LICLicenseInfo_rawStatus_ endp +``` + +### arm64 + +``` +__text:00000000000096F4 ; int __cdecl -[LICLicenseInfo rawStatus](LICLicenseInfo *self, SEL) +__text:00000000000096F4 __LICLicenseInfo_rawStatus_ ; DATA XREF: __objc_methlist:00000000000CD6BC↓o +__text:00000000000096F4 +__text:00000000000096F4 var_30 = -0x30 +__text:00000000000096F4 var_20 = -0x20 +__text:00000000000096F4 var_10 = -0x10 +__text:00000000000096F4 var_s0 = 0 +__text:00000000000096F4 +__text:00000000000096F4 F8 5F BC A9 STP X24, X23, [SP,#-0x10+var_30]! +__text:00000000000096F8 F6 57 01 A9 STP X22, X21, [SP,#0x30+var_20] +__text:00000000000096FC F4 4F 02 A9 STP X20, X19, [SP,#0x30+var_10] +__text:0000000000009700 FD 7B 03 A9 STP X29, X30, [SP,#0x30+var_s0] +__text:0000000000009704 FD C3 00 91 ADD X29, SP, #0x30 +__text:0000000000009708 F5 03 00 AA MOV X21, X0 +__text:000000000000970C 00 0C 40 F9 LDR X0, [X0,#0x18] ; id +__text:0000000000009710 8E 0C 03 94 BL _objc_retain +__text:0000000000009714 F3 03 00 AA MOV X19, X0 +__text:0000000000009718 9E 0C 03 94 BL _objc_sync_enter +__text:000000000000971C A0 0E 40 F9 LDR X0, [X21,#0x18] ; id +__text:0000000000009720 48 08 00 D0 ADRP X8, #selRef_count@PAGE +__text:0000000000009724 01 75 44 F9 LDR X1, [X8,#selRef_count@PAGEOFF] ; SEL +__text:0000000000009728 7F 0C 03 94 BL _objc_msgSend +__text:000000000000972C 80 09 00 B4 CBZ X0, loc_985C +__text:0000000000009730 48 08 00 F0 ADRP X8, #classRef_LICLicenseInfo@PAGE +__text:0000000000009734 00 55 41 F9 LDR X0, [X8,#classRef_LICLicenseInfo@PAGEOFF] ; id +__text:0000000000009738 A2 0E 40 F9 LDR X2, [X21,#0x18] +``` + +opcode + +``` +F8 5F BC A9 F6 57 01 A9 F4 4F 02 A9 FD 7B 03 A9 +FD C3 00 91 F5 03 00 AA 00 0C 40 F9 8E 0C 03 94 +F3 03 00 AA 9E 0C 03 94 A0 0E 40 F9 48 08 00 D0 +01 75 44 F9 7F 0C 03 94 80 09 00 B4 48 08 00 F0 +``` + +patch + +``` +00 00 80 D2 C0 03 5F D6 +``` + +after + +``` +__text:00000000000096F4 ; int __cdecl -[LICLicenseInfo rawStatus](LICLicenseInfo *self, SEL) +__text:00000000000096F4 __LICLicenseInfo_rawStatus_ ; DATA XREF: __objc_methlist:00000000000CD6BC↓o +__text:00000000000096F4 00 00 80 D2 MOV X0, #0 +__text:00000000000096F8 C0 03 5F D6 RET +__text:00000000000096F8 ; End of function -[LICLicenseInfo rawStatus] +``` diff --git a/entitlements/Airplane Mode.app.entitlements b/entitlements/Airplane Mode.app.entitlements new file mode 100644 index 0000000..0c67376 --- /dev/null +++ b/entitlements/Airplane Mode.app.entitlements @@ -0,0 +1,5 @@ + + + + + diff --git a/entitlements/Alarm.app.entitlements b/entitlements/Alarm.app.entitlements new file mode 100644 index 0000000..0c67376 --- /dev/null +++ b/entitlements/Alarm.app.entitlements @@ -0,0 +1,5 @@ + + + + + diff --git a/entitlements/Archive.app.entitlements b/entitlements/Archive.app.entitlements new file mode 100644 index 0000000..49ad0bb --- /dev/null +++ b/entitlements/Archive.app.entitlements @@ -0,0 +1,8 @@ + + + + + com.apple.security.automation.apple-events + + + diff --git a/entitlements/Barcode Generator.app.entitlements b/entitlements/Barcode Generator.app.entitlements new file mode 100644 index 0000000..0c67376 --- /dev/null +++ b/entitlements/Barcode Generator.app.entitlements @@ -0,0 +1,5 @@ + + + + + diff --git a/entitlements/Barcode Reader.app.entitlements b/entitlements/Barcode Reader.app.entitlements new file mode 100644 index 0000000..6cfee69 --- /dev/null +++ b/entitlements/Barcode Reader.app.entitlements @@ -0,0 +1,8 @@ + + + + + com.apple.security.device.camera + + + diff --git a/entitlements/Break Time.app.entitlements b/entitlements/Break Time.app.entitlements new file mode 100644 index 0000000..0c67376 --- /dev/null +++ b/entitlements/Break Time.app.entitlements @@ -0,0 +1,5 @@ + + + + + diff --git a/entitlements/CPU Temperature.app.entitlements b/entitlements/CPU Temperature.app.entitlements new file mode 100644 index 0000000..b259b1a --- /dev/null +++ b/entitlements/CPU Temperature.app.entitlements @@ -0,0 +1,8 @@ + + + + + com.apple.security.files.user-selected.read-only + + + diff --git a/entitlements/Capture Area.app.entitlements b/entitlements/Capture Area.app.entitlements new file mode 100644 index 0000000..0c67376 --- /dev/null +++ b/entitlements/Capture Area.app.entitlements @@ -0,0 +1,5 @@ + + + + + diff --git a/entitlements/Capture Screen.app.entitlements b/entitlements/Capture Screen.app.entitlements new file mode 100644 index 0000000..0c67376 --- /dev/null +++ b/entitlements/Capture Screen.app.entitlements @@ -0,0 +1,5 @@ + + + + + diff --git a/entitlements/Capture Window.app.entitlements b/entitlements/Capture Window.app.entitlements new file mode 100644 index 0000000..0c67376 --- /dev/null +++ b/entitlements/Capture Window.app.entitlements @@ -0,0 +1,5 @@ + + + + + diff --git a/entitlements/Clean Drive.app.entitlements b/entitlements/Clean Drive.app.entitlements new file mode 100644 index 0000000..49ad0bb --- /dev/null +++ b/entitlements/Clean Drive.app.entitlements @@ -0,0 +1,8 @@ + + + + + com.apple.security.automation.apple-events + + + diff --git a/entitlements/Clipboard History.app.entitlements b/entitlements/Clipboard History.app.entitlements new file mode 100644 index 0000000..0c67376 --- /dev/null +++ b/entitlements/Clipboard History.app.entitlements @@ -0,0 +1,5 @@ + + + + + diff --git a/entitlements/Convert Video.app.entitlements b/entitlements/Convert Video.app.entitlements new file mode 100644 index 0000000..49ad0bb --- /dev/null +++ b/entitlements/Convert Video.app.entitlements @@ -0,0 +1,8 @@ + + + + + com.apple.security.automation.apple-events + + + diff --git a/entitlements/Date Countdown.app.entitlements b/entitlements/Date Countdown.app.entitlements new file mode 100644 index 0000000..0c67376 --- /dev/null +++ b/entitlements/Date Countdown.app.entitlements @@ -0,0 +1,5 @@ + + + + + diff --git a/entitlements/Do Not Disturb.app.entitlements b/entitlements/Do Not Disturb.app.entitlements new file mode 100644 index 0000000..0c67376 --- /dev/null +++ b/entitlements/Do Not Disturb.app.entitlements @@ -0,0 +1,5 @@ + + + + + diff --git a/entitlements/Do Not Sleep.app.entitlements b/entitlements/Do Not Sleep.app.entitlements new file mode 100644 index 0000000..0c67376 --- /dev/null +++ b/entitlements/Do Not Sleep.app.entitlements @@ -0,0 +1,5 @@ + + + + + diff --git a/entitlements/Download Audio.app.entitlements b/entitlements/Download Audio.app.entitlements new file mode 100644 index 0000000..0c67376 --- /dev/null +++ b/entitlements/Download Audio.app.entitlements @@ -0,0 +1,5 @@ + + + + + diff --git a/entitlements/Download Video.app.entitlements b/entitlements/Download Video.app.entitlements new file mode 100644 index 0000000..0c67376 --- /dev/null +++ b/entitlements/Download Video.app.entitlements @@ -0,0 +1,5 @@ + + + + + diff --git a/entitlements/Eject Volumes.app.entitlements b/entitlements/Eject Volumes.app.entitlements new file mode 100644 index 0000000..0c67376 --- /dev/null +++ b/entitlements/Eject Volumes.app.entitlements @@ -0,0 +1,5 @@ + + + + + diff --git a/entitlements/Encrypt Files.app.entitlements b/entitlements/Encrypt Files.app.entitlements new file mode 100644 index 0000000..caddf8c --- /dev/null +++ b/entitlements/Encrypt Files.app.entitlements @@ -0,0 +1,12 @@ + + + + + com.apple.application-identifier + com.parallels.toolbox.EncryptFiles + keychain-access-groups + + com.parallels.toolbox.EncryptFiles + + + diff --git a/entitlements/Energy Saver.app.entitlements b/entitlements/Energy Saver.app.entitlements new file mode 100644 index 0000000..0c67376 --- /dev/null +++ b/entitlements/Energy Saver.app.entitlements @@ -0,0 +1,5 @@ + + + + + diff --git a/entitlements/Find Duplicates.app.entitlements b/entitlements/Find Duplicates.app.entitlements new file mode 100644 index 0000000..0c67376 --- /dev/null +++ b/entitlements/Find Duplicates.app.entitlements @@ -0,0 +1,5 @@ + + + + + diff --git a/entitlements/Focus on Window.app.entitlements b/entitlements/Focus on Window.app.entitlements new file mode 100644 index 0000000..0c67376 --- /dev/null +++ b/entitlements/Focus on Window.app.entitlements @@ -0,0 +1,5 @@ + + + + + diff --git a/entitlements/Free Memory.app.entitlements b/entitlements/Free Memory.app.entitlements new file mode 100644 index 0000000..0c67376 --- /dev/null +++ b/entitlements/Free Memory.app.entitlements @@ -0,0 +1,5 @@ + + + + + diff --git a/entitlements/Hidden Files.app.entitlements b/entitlements/Hidden Files.app.entitlements new file mode 100644 index 0000000..0c67376 --- /dev/null +++ b/entitlements/Hidden Files.app.entitlements @@ -0,0 +1,5 @@ + + + + + diff --git a/entitlements/Hide Desktop Files.app.entitlements b/entitlements/Hide Desktop Files.app.entitlements new file mode 100644 index 0000000..0c67376 --- /dev/null +++ b/entitlements/Hide Desktop Files.app.entitlements @@ -0,0 +1,5 @@ + + + + + diff --git a/entitlements/Hide Menu Icons.app.entitlements b/entitlements/Hide Menu Icons.app.entitlements new file mode 100644 index 0000000..49ad0bb --- /dev/null +++ b/entitlements/Hide Menu Icons.app.entitlements @@ -0,0 +1,8 @@ + + + + + com.apple.security.automation.apple-events + + + diff --git a/entitlements/Install Parallels Toolbox.app.entitlements b/entitlements/Install Parallels Toolbox.app.entitlements new file mode 100644 index 0000000..9a1200c --- /dev/null +++ b/entitlements/Install Parallels Toolbox.app.entitlements @@ -0,0 +1,18 @@ + + + + + com.apple.application-identifier + com.parallels.toolbox + com.apple.security.automation.apple-events + + com.apple.security.device.audio-input + + com.apple.security.device.camera + + keychain-access-groups + + com.parallels.toolbox + + + diff --git a/entitlements/Launch.app.entitlements b/entitlements/Launch.app.entitlements new file mode 100644 index 0000000..0c67376 --- /dev/null +++ b/entitlements/Launch.app.entitlements @@ -0,0 +1,5 @@ + + + + + diff --git a/entitlements/Lock Screen.app.entitlements b/entitlements/Lock Screen.app.entitlements new file mode 100644 index 0000000..0c67376 --- /dev/null +++ b/entitlements/Lock Screen.app.entitlements @@ -0,0 +1,5 @@ + + + + + diff --git a/entitlements/Make GIF.app.entitlements b/entitlements/Make GIF.app.entitlements new file mode 100644 index 0000000..0c67376 --- /dev/null +++ b/entitlements/Make GIF.app.entitlements @@ -0,0 +1,5 @@ + + + + + diff --git a/entitlements/Mute Microphone.app.entitlements b/entitlements/Mute Microphone.app.entitlements new file mode 100644 index 0000000..0c67376 --- /dev/null +++ b/entitlements/Mute Microphone.app.entitlements @@ -0,0 +1,5 @@ + + + + + diff --git a/entitlements/Network Usage.app.entitlements b/entitlements/Network Usage.app.entitlements new file mode 100644 index 0000000..b259b1a --- /dev/null +++ b/entitlements/Network Usage.app.entitlements @@ -0,0 +1,8 @@ + + + + + com.apple.security.files.user-selected.read-only + + + diff --git a/entitlements/Parallels Tool Launcher.app.entitlements b/entitlements/Parallels Tool Launcher.app.entitlements new file mode 100644 index 0000000..0c67376 --- /dev/null +++ b/entitlements/Parallels Tool Launcher.app.entitlements @@ -0,0 +1,5 @@ + + + + + diff --git a/entitlements/Presentation Mode.app.entitlements b/entitlements/Presentation Mode.app.entitlements new file mode 100644 index 0000000..0c67376 --- /dev/null +++ b/entitlements/Presentation Mode.app.entitlements @@ -0,0 +1,5 @@ + + + + + diff --git a/entitlements/Recognize Text.app.entitlements b/entitlements/Recognize Text.app.entitlements new file mode 100644 index 0000000..6cfee69 --- /dev/null +++ b/entitlements/Recognize Text.app.entitlements @@ -0,0 +1,8 @@ + + + + + com.apple.security.device.camera + + + diff --git a/entitlements/Record Area.app.entitlements b/entitlements/Record Area.app.entitlements new file mode 100644 index 0000000..b572d9c --- /dev/null +++ b/entitlements/Record Area.app.entitlements @@ -0,0 +1,8 @@ + + + + + com.apple.security.device.audio-input + + + diff --git a/entitlements/Record Audio.app.entitlements b/entitlements/Record Audio.app.entitlements new file mode 100644 index 0000000..b572d9c --- /dev/null +++ b/entitlements/Record Audio.app.entitlements @@ -0,0 +1,8 @@ + + + + + com.apple.security.device.audio-input + + + diff --git a/entitlements/Record Screen.app.entitlements b/entitlements/Record Screen.app.entitlements new file mode 100644 index 0000000..b572d9c --- /dev/null +++ b/entitlements/Record Screen.app.entitlements @@ -0,0 +1,8 @@ + + + + + com.apple.security.device.audio-input + + + diff --git a/entitlements/Record Window.app.entitlements b/entitlements/Record Window.app.entitlements new file mode 100644 index 0000000..b572d9c --- /dev/null +++ b/entitlements/Record Window.app.entitlements @@ -0,0 +1,8 @@ + + + + + com.apple.security.device.audio-input + + + diff --git a/entitlements/Resize Images.app.entitlements b/entitlements/Resize Images.app.entitlements new file mode 100644 index 0000000..0c67376 --- /dev/null +++ b/entitlements/Resize Images.app.entitlements @@ -0,0 +1,5 @@ + + + + + diff --git a/entitlements/Screenshot Page.app.entitlements b/entitlements/Screenshot Page.app.entitlements new file mode 100644 index 0000000..0c67376 --- /dev/null +++ b/entitlements/Screenshot Page.app.entitlements @@ -0,0 +1,5 @@ + + + + + diff --git a/entitlements/Show Desktop.app.entitlements b/entitlements/Show Desktop.app.entitlements new file mode 100644 index 0000000..0c67376 --- /dev/null +++ b/entitlements/Show Desktop.app.entitlements @@ -0,0 +1,5 @@ + + + + + diff --git a/entitlements/Sleep Timer.app.entitlements b/entitlements/Sleep Timer.app.entitlements new file mode 100644 index 0000000..0c67376 --- /dev/null +++ b/entitlements/Sleep Timer.app.entitlements @@ -0,0 +1,5 @@ + + + + + diff --git a/entitlements/Stopwatch.app.entitlements b/entitlements/Stopwatch.app.entitlements new file mode 100644 index 0000000..0c67376 --- /dev/null +++ b/entitlements/Stopwatch.app.entitlements @@ -0,0 +1,5 @@ + + + + + diff --git a/entitlements/Switch Resolution.app.entitlements b/entitlements/Switch Resolution.app.entitlements new file mode 100644 index 0000000..0c67376 --- /dev/null +++ b/entitlements/Switch Resolution.app.entitlements @@ -0,0 +1,5 @@ + + + + + diff --git a/entitlements/Take Photo.app.entitlements b/entitlements/Take Photo.app.entitlements new file mode 100644 index 0000000..6cfee69 --- /dev/null +++ b/entitlements/Take Photo.app.entitlements @@ -0,0 +1,8 @@ + + + + + com.apple.security.device.camera + + + diff --git a/entitlements/Take Video.app.entitlements b/entitlements/Take Video.app.entitlements new file mode 100644 index 0000000..97c1f6d --- /dev/null +++ b/entitlements/Take Video.app.entitlements @@ -0,0 +1,10 @@ + + + + + com.apple.security.device.audio-input + + com.apple.security.device.camera + + + diff --git a/entitlements/Timer.app.entitlements b/entitlements/Timer.app.entitlements new file mode 100644 index 0000000..0c67376 --- /dev/null +++ b/entitlements/Timer.app.entitlements @@ -0,0 +1,5 @@ + + + + + diff --git a/entitlements/ToolboxInstaller.entitlements b/entitlements/ToolboxInstaller.entitlements new file mode 100644 index 0000000..0c67376 --- /dev/null +++ b/entitlements/ToolboxInstaller.entitlements @@ -0,0 +1,5 @@ + + + + + diff --git a/entitlements/Transform Text.app.entitlements b/entitlements/Transform Text.app.entitlements new file mode 100644 index 0000000..0c67376 --- /dev/null +++ b/entitlements/Transform Text.app.entitlements @@ -0,0 +1,5 @@ + + + + + diff --git a/entitlements/Unarchive.app.entitlements b/entitlements/Unarchive.app.entitlements new file mode 100644 index 0000000..0c67376 --- /dev/null +++ b/entitlements/Unarchive.app.entitlements @@ -0,0 +1,5 @@ + + + + + diff --git a/entitlements/Uninstall Apps.app.entitlements b/entitlements/Uninstall Apps.app.entitlements new file mode 100644 index 0000000..0c67376 --- /dev/null +++ b/entitlements/Uninstall Apps.app.entitlements @@ -0,0 +1,5 @@ + + + + + diff --git a/entitlements/Unit Converter.app.entitlements b/entitlements/Unit Converter.app.entitlements new file mode 100644 index 0000000..0c67376 --- /dev/null +++ b/entitlements/Unit Converter.app.entitlements @@ -0,0 +1,5 @@ + + + + + diff --git a/entitlements/Verify Checksum.app.entitlements b/entitlements/Verify Checksum.app.entitlements new file mode 100644 index 0000000..0c67376 --- /dev/null +++ b/entitlements/Verify Checksum.app.entitlements @@ -0,0 +1,5 @@ + + + + + diff --git a/entitlements/Window Manager.app.entitlements b/entitlements/Window Manager.app.entitlements new file mode 100644 index 0000000..0c67376 --- /dev/null +++ b/entitlements/Window Manager.app.entitlements @@ -0,0 +1,5 @@ + + + + + diff --git a/entitlements/World Time.app.entitlements b/entitlements/World Time.app.entitlements new file mode 100644 index 0000000..b259b1a --- /dev/null +++ b/entitlements/World Time.app.entitlements @@ -0,0 +1,8 @@ + + + + + com.apple.security.files.user-selected.read-only + + + diff --git a/readme.md b/readme.md new file mode 100644 index 0000000..4223c98 --- /dev/null +++ b/readme.md @@ -0,0 +1,24 @@ +# Parallels Toolbox for Mac Crack + +Crack for Parallels Toolbox for Mac 6.0.0 4536 + +- [x] Support Intel +- [x] Support Apple Silicon (M1 & M2) + +# Install + +Go to releases page download and install. + +# FAQ + +## Is this crack safe? + +It's opensource, you can use any hex file comparison tool you like to see what has been modified. + +## I want to crack it myself. + +Check the crack folder to see how I cracked it. + +## Where to get update? + +[https://icrack.day/ptfm](https://icrack.day/ptfm) diff --git a/scripts/extra_entitlements.sh b/scripts/extra_entitlements.sh new file mode 100755 index 0000000..17153de --- /dev/null +++ b/scripts/extra_entitlements.sh @@ -0,0 +1,33 @@ +#!/bin/bash + +CUR_PATH=$( + cd $(dirname "$0"); + pwd +) +ROOT_PATH=$( + cd "${CUR_PATH}/../"; + pwd +) + +function export_entitlements() { + codesign -d --entitlements - --xml "$1" 2>/dev/null | plutil -convert xml1 -o - - > "$2" + /usr/libexec/PlistBuddy -c "Delete :com.apple.security.application-groups" "$2" 2>/dev/null + /usr/libexec/PlistBuddy -c "Delete :com.apple.developer.team-identifier" "$2" 2>/dev/null + sed -i "" "s/4C6364ACXT\.//g" "$2" +} + +function export_application_entitlements() { + oldIFS=$IFS + IFS=$'\n' + for name in $(ls "/Volumes/Parallels Toolbox/Install Parallels Toolbox.app/Contents/Applications/") + do + export_entitlements "/Volumes/Parallels Toolbox/Install Parallels Toolbox.app/Contents/Applications/${name}" "${ROOT_PATH}/entitlements/${name}.entitlements" + done + IFS=oldIFS +} + +mkdir -p "${ROOT_PATH}/entitlements" + +export_application_entitlements +export_entitlements "/Volumes/Parallels Toolbox/Install Parallels Toolbox.app/Contents/Library/Install/ToolboxInstaller" "${ROOT_PATH}/entitlements/ToolboxInstaller.entitlements" +export_entitlements "/Volumes/Parallels Toolbox/Install Parallels Toolbox.app" "${ROOT_PATH}/entitlements/Install Parallels Toolbox.app.entitlements" diff --git a/scripts/publish.sh b/scripts/publish.sh new file mode 100755 index 0000000..b49e16a --- /dev/null +++ b/scripts/publish.sh @@ -0,0 +1,130 @@ +#!/bin/bash + +CUR_PATH=$( + cd $(dirname "$0"); + pwd +) +ROOT_PATH=$( + cd "${CUR_PATH}/../"; + pwd +) +TEMP_PATH="${ROOT_PATH}/tmp" +PUBLISH_PATH="${ROOT_PATH}/publish" + +PTFM_VERSION="6.0.0-4536" + +PTFM_SHA256SUM="491d3739422988fda6934b4fc4dc1334b6dfea86802da56d55a6ea56dadb4910" + +PTFM_DMG_DOWNLOAD_URL="https://download.parallels.com/toolbox/v6/${PTFM_VERSION}/ParallelsToolbox-${PTFM_VERSION}.dmg" + +PTFM_DMG_FILE="${TEMP_PATH}/download/ParallelsToolbox-${PTFM_VERSION}.dmg" + +PTFM_PUBLISH_FILE="${PUBLISH_PATH}/ParallelsToolbox-${PTFM_VERSION}_Crack.dmg" + +# CODESIGN_CERT=73B34EBEE504D5CEE35B113A22CEBFD381A21033 +CODESIGN_CERT=- + +PTFM_TMP_DIR="${TEMP_PATH}/ptfm_files" + +function sign_cmd() { + NAME=$(basename $1) + if [ -f "${ROOT_PATH}/entitlements/${NAME}.entitlements" ]; then + codesign -f -s "${CODESIGN_CERT}" --timestamp=none --all-architectures --deep \ + --entitlements "${ROOT_PATH}/entitlements/${NAME}.entitlements" \ + "$1" + else + codesign -f -s "${CODESIGN_CERT}" --timestamp=none --all-architectures --deep "$1" + fi +} + +function ensure_download_ptfm_dmg() { + if [ -f "${PTFM_DMG_FILE}" ]; then + echo "[*] Check hash for \"${PTFM_DMG_FILE}\"" + FILE_HASH=$(shasum -a 256 -b "${PTFM_DMG_FILE}" | awk '{print $1}') + if [ ${FILE_HASH} != ${PTFM_SHA256SUM} ]; then + echo "[-] ${FILE_HASH} != ${PTFM_SHA256SUM}" + echo "[*] Delete \"${PTFM_DMG_FILE}\"" + rm -f "${PTFM_DMG_FILE}" + fi + fi + if [ ! -f "${PTFM_DMG_FILE}" ]; then + echo "[*] Download ${PTFM_DMG_DOWNLOAD_URL}" + mkdir -p $(dirname "${PTFM_DMG_FILE}") + curl -L --progress-bar -o "${PTFM_DMG_FILE}" "${PTFM_DMG_DOWNLOAD_URL}" + fi +} + +function copy_ptfm_files() { + echo "[*] Copy files" + if [ -d "${PTFM_TMP_DIR}" ]; then + rm -rf "${PTFM_TMP_DIR}" > /dev/null + fi + mkdir -p "${PTFM_TMP_DIR}" > /dev/null + + hdiutil attach -noverify -noautofsck -noautoopen "${PTFM_DMG_FILE}" + cp -R -X "/Volumes/Parallels Toolbox/Install Parallels Toolbox.app" "${PTFM_TMP_DIR}/" > /dev/null + hdiutil detach "/Volumes/Parallels Toolbox" + + rm -f "${PTFM_TMP_DIR}/Install Parallels Toolbox.app/Contents/embedded.provisionprofile" > /dev/null + chflags -R 0 "${PTFM_TMP_DIR}" > /dev/null + xattr -cr "${PTFM_TMP_DIR}" > /dev/null +} + +function apply_ptfm_crack() { + echo "[*] Apply patch" + + SRC="${ROOT_PATH}/crack/LicenseServices" + DST="${PTFM_TMP_DIR}/Install Parallels Toolbox.app/Contents/Frameworks/LicenseServices.framework/Versions/A/LicenseServices" + + cp -f "${SRC}" "${DST}" > /dev/null + chflags -R 0 "${DST}" + chmod 755 "${DST}" +} + +function sign_ptfm_application() { + oldIFS=$IFS + IFS=$'\n' + for name in $(ls "${PTFM_TMP_DIR}/Install Parallels Toolbox.app/Contents/Applications/") + do + sign_cmd "${PTFM_TMP_DIR}/Install Parallels Toolbox.app/Contents/Applications/${name}" + done + IFS=oldIFS +} + +function sign_ptfm() { + echo "[*] Sign Parallels Toolbox App" + sign_ptfm_application + sign_cmd "${PTFM_TMP_DIR}/Install Parallels Toolbox.app/Contents/Library/Install/ToolboxInstaller" + sign_cmd "${PTFM_TMP_DIR}/Install Parallels Toolbox.app" +} + +function create_ptfm_dmg() { + echo "[*] Create dmg ${PTFM_PUBLISH_FILE}" + mkdir -p "${PUBLISH_PATH}" + + if [ -f "${PTFM_PUBLISH_FILE}" ]; then + rm -f "${PTFM_PUBLISH_FILE}" > /dev/null + fi + + create-dmg \ + --volname "Parallels Toolbox" \ + --volicon "${ROOT_PATH}/assets/PTFM.VolumeIcon.icns" \ + --background "${ROOT_PATH}/assets/PTFM.background.png" \ + --window-pos 0 0 \ + --window-size 640 415 \ + --icon-size 256 \ + --icon "Install Parallels Toolbox.app" 450 126 \ + --codesign "${CODESIGN_CERT}" \ + "${PTFM_PUBLISH_FILE}" \ + "${PTFM_TMP_DIR}/" +} + +function publish_ptfm_crack_dmg() { + ensure_download_ptfm_dmg + copy_ptfm_files + apply_ptfm_crack + sign_ptfm + create_ptfm_dmg +} + +publish_ptfm_crack_dmg