class-dump 使用,class-dump
class-dump 官網地址:這裡
我這裡下載的是 class-dump-3.5.dmg 版本的。雙擊.dmg 檔案,將 拉倒 /usr / local / bin 目錄下,這樣就可以在終端使用 class-dump 命令了。
這裡我示範dump系統內建的計算機,匯出它的標頭檔。
命令如下:
class-dump -H /Applications/Calculator.app -o /Users/Rio/Desktop/calculate\ heads
解釋:
/Applications/Calculator.app 是計算機app的路徑
/Users/Rio/Desktop/calculate\ heads 是存放dump出來標頭檔的檔案夾路徑
class-dump 3.5 (64 bit)Usage: class-dump [options] <mach-o-file> where options are: -a show instance variable offsets -A show implementation addresses --arch <arch> choose a specific architecture from a universal binary (ppc, ppc64, i386, x86_64) -C <regex> only display classes matching regular expression -f <str> find string in method name -H generate header files in current directory, or directory specified with -o -I sort classes, categories, and protocols by inheritance (overrides -s) -o <dir> output directory used for -H -r recursively expand frameworks and fixed VM shared libraries -s sort classes and categories by name -S sort methods by name -t suppress header in output, for testing --list-arches list the arches in the file, then exit --sdk-ios specify iOS SDK version (will look in /Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS<version>.sdk --sdk-mac specify Mac OS X version (will look in /Developer/SDKs/MacOSX<version>.sdk --sdk-root specify the full SDK root path (or use --sdk-ios/--sdk-mac for a shortcut)
運行命令,可以看到已經dump出標頭檔了,如下所示:
class-dump 雖然非常有用,但有時我們會發現 class-dump 執行失敗,無法得到我們想要的 .h 檔案,或者 .h 檔案的內容是加密的密文。出現這種現象的原因是:class-dump 額作用對象必須是未經加密的可執行檔,而從App Store 下載的 App 都是經過簽名加密的,可執行檔被加上了一層“殼”。可以使用 AppCrackr 來自動砸殼。
class-dump 怎使用
class-dump-x 提取私人庫裡面的隱藏檔案
class-dump
This is a command-line utility for examining the Objective-C runtime information stored in Mach-O files. It generates declarations for the classes, categories and protocols. This is the same information provided by using 'otool -ov', but presented as normal Objective-C declarations, so it is much more compact and readable.
Why use class-dump?
It's a great tool for the curious. You can look at the design of closed source applications, frameworks, and bundles. Watch the interfaces evolve between releases. Experiment with private frameworks, or see what private goodies are hiding in the AppKit. Learn about the plugin API lurking in Mail.app.
If you find class-dump useful, you can donate to help support its development. Thanks!
Download
Current version: 3.3.3 (Universal, 64 and 32 bit)
Requires Mac OS X 10.5 or later.
class-dump-3.3.3.dmg
class-dump-3.3.3.tar.gz
class-dump-3.3.3.tar.bz2
Changes - News
Contact
You can email questions and bug reports to me at class-dump@codethecode.com, or nygard at gmail.com.
Usage
class-dump 3.3.3 (64 bit)
Usage: class-dump [options] <mach-o-file>
where options are:
-a show instance variable offsets
-A show implementation addresses
--arch <arch> choose a specific architecture from a universal binary (ppc, ppc7400, ppc64, i386, x86_64, etc.)
-C <regex> only display classes matching regular expression
-f <st......餘下全文>>
div 的class怎多次使用,舉個例子
直接在div上寫要應用樣式的名字就可以了,
<style>
.bg{color:red;font-size:15px;}
.blue{color:blue;font-size:15px;}
</style>
<div class="bg">紅色字型</div>
<div class="blue">藍色字型</div>
<div class="bg">紅色字型</div>