Apple

mac 패키지 분석.. 2?

구차니 2022. 3. 25. 10:08

마인크래프트 한번 해보려고 받았는데 안되네.. 

되면 좋지만 안되면 그것 나름대로 원인을 분석해봐야 하는데

그걸 떠나서 패키지가 어떻게 되나 궁금해서 분석 ㄱㄱ!

 

마인크래프트 패키지는 dmg 확장자에 zlib compressed data라는 포맷으로 인식된다.

% file *
Minecraft.dmg: zlib compressed data

 

근데 해당 파일을 실행하면 알아서 마운트 되고

 

~/Desktop 에서는 보이지 않는 Minecraft 라는 폴더가 생긴다.(맥에서는 폴더라고 하나 디렉토리라고 하나..?)

Desktop % ls -al
total 6432
drwx------+  9 minimonk staff      288  3 25 09:15 .
drwxr-xr-x+ 23 minimonk staff      736  3 25 09:11 ..
-rw-r--r--@  1 minimonk staff     8196  3 25 09:15 .DS_Store
-rw-r--r--   1 minimonk staff        0  3 19 16:50 .localized
-rw-r--r--@  1 minimonk staff  2053616  3 21 10:13 스크린샷 2022-03-21 오전 10.13.11.png
-rw-r--r--@  1 minimonk staff   897651  3 25 09:15 스크린샷 2022-03-25 오전 9.14.55.png
-rw-r--r--@  1 minimonk staff    91529  3 25 09:15 스크린샷 2022-03-25 오전 9.15.04.png
-rw-r--r--@  1 minimonk staff   220589  3 25 09:15 스크린샷 2022-03-25 오전 9.15.28.png

 

바탕화면에 생긴 Minecraft 디렉토리는 "볼륨" 타입으로 출력된다.

일단 mount 명령을 통해 경로를 찾아 들어가보면

% mount | grep Mine
/dev/disk2s1 on /Volumes/Minecraft (hfs, local, nodev, nosuid, read-only, noowners, quarantine, mounted by shin)

 

다른건 딱히 눈에 띄는건 없고.. laucher 라는 실행 파일 하나만 보인다.

% tree
.
├── Applications -> /Applications
└── Minecraft.app
    └── Contents
        ├── Info.plist
        ├── MacOS
        │   └── launcher
        ├── Minecraft Updater.app
        │   └── Contents
        │       ├── Info.plist
        │       ├── MacOS
        │       │   └── nativeUpdater
        │       ├── Resources
        │       │   ├── NativeUpdater.nib
        │       │   ├── PkgInfo
        │       │   └── favicon.icns
        │       └── _CodeSignature
        │           └── CodeResources
        ├── Resources
        │   ├── MainMenu.nib
        │   ├── PkgInfo
        │   └── favicon.icns
        └── _CodeSignature
            └── CodeResources


11 directories, 12 files

 

흐음.. file 설명이 특이하네.. Mach-O? 마하 커널용 오브젝트의 약자일려나?

% file *
launcher: Mach-O 64-bit executable x86_64

 

 

 

이번에는 zoom 클라이언트

파일 자체는 xar로 압축되었다는데 tar 옵션주듯 풀면 풀린다.

% file Zoom.pkg 
Zoom.pkg: xar archive compressed TOC: 6106, SHA-1 checksum

 

% tree
.
├── Distribution
├── Resources
│   ├── de.lproj
│   │   ├── Localizable.strings
│   │   └── Welcome.rtf
│   ├── en.lproj
│   │   ├── Localizable.strings
│   │   └── Welcome.rtf
│   ├── es.lproj
│   │   ├── Localizable.strings
│   │   └── Welcome.rtf
│   ├── fr.lproj
│   │   ├── Localizable.strings
│   │   └── Welcome.rtf
│   ├── it.lproj
│   │   ├── Localizable.strings
│   │   └── Welcome.rtf
│   ├── ja.lproj
│   │   ├── Localizable.strings
│   │   └── Welcome.rtf
│   ├── ko.lproj
│   │   ├── Localizable.strings
│   │   └── Welcome.rtf
│   ├── pl.lproj
│   │   ├── Localizable.strings
│   │   └── Welcome.rtf
│   ├── pt.lproj
│   │   ├── Localizable.strings
│   │   └── Welcome.rtf
│   ├── ru.lproj
│   │   ├── Localizable.strings
│   │   └── Welcome.rtf
│   ├── tr.lproj
│   │   ├── Localizable.strings
│   │   └── Welcome.rtf
│   ├── vi.lproj
│   │   ├── Localizable.strings
│   │   └── Welcome.rtf
│   ├── zh-Hans.lproj
│   │   ├── Localizable.strings
│   │   └── Welcome.rtf
│   └── zh-Hant.lproj
│       ├── Localizable.strings
│       └── Welcome.rtf
└── zoomus.pkg
    ├── Bom
    ├── PackageInfo
    ├── Payload
    └── Scripts


16 directories, 33 files

 

 

% file *
Bom:         Mac OS X bill of materials (BOM) file
PackageInfo: XML 1.0 document text, ASCII text
Payload:     gzip compressed data, from Unix, original size modulo 2^32 88226304
Scripts:     gzip compressed data, from Unix, original size modulo 2^32 12800