class-dump 使用
class-dump 官网地址:这里
我这里下载的是 class-dump-3.5.dmg 版本的。双击.dmg 文件,将 拉倒 /usr / local / bin 目录下[用open /usr 命令打开用户文件夹],这样就可以在终端使用 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出来头文件的文件夹路径
-H表示导出头文件
-o表示导出头文件的保存目录参数
- 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 来自动砸壳。[注:还有一个更简单的办法就是通过越狱渠道下载应用,这些ipa都是无壳的,可以直接dump]
#dump出的.h文件中的属性和方法和实际的排序是相反的。
class-dump 使用的更多相关文章
- PMON failed to acquire latch, see PMON dump
前几天,一台Oracle数据库(Oracle Database 10g Release 10.2.0.4.0 - 64bit Production)监控出现"PMON failed to a ...
- oracle dump数据库
最近正在看老白的<DBA的思想天空>,了解数据块结构,想通过dump data block验证oracle对于行尾的NULL,是不占用存储空间的. 我们先来看一下怎样dump数据块: 1. ...
- Dump类型说明
通过使用windbg提供DbgHelp库中的MiniDumpWriteDump函数在程序崩溃时写dump文件记录程序当时状态,为后续分析问题提供现场. 该函数提供了DumpType参数,让程序员根据具 ...
- 使用GDB 追踪依赖poco的so程序,core dump文件分析.
前言 在windows 下 系统核心态程序蓝屏,会产生dump文件. 用户级程序在设置后,程序崩溃也会产生dump文件.以方便开发者用windbg进行分析. so,linux 系统也有一套这样的东东- ...
- 转:CentOS, 找不到dump命令:command not found
dump 功能说明:备份文件系统.语 法:dump [-cnu][-0123456789][-b <区块大小>][-B <区块数目>][-d <密度>][-f &l ...
- slave IO流程之二:注册slave请求和dump请求
slave IO流程已经在http://www.cnblogs.com/onlyac/p/5815566.html中有介绍 这次我们要探索注册slave请求和dump请求的报文格式和主要流程. 一.注 ...
- 使用MAT(Memory Analyzer Tool)工具分析dump文件--转
原文地址:http://gao-xianglong.iteye.com/blog/2173140?utm_source=tuicool&utm_medium=referral 前言 生产环境中 ...
- 认识Java Core和Heap Dump
什么是Java Core和Heap Dump Java程序运行时,有时会产生Java Core及Heap Dump文件,它一般发生于Java程序遇到致命问题的情况下. 发生致命问题后,Java进程有时 ...
- sublime text 乱码生成.dump问题的解决方法
title: sublime text 乱码生成.dump问题的解决方法 tags: sublime text,sublime text 3,.dump,乱码 grammar_cjkRuby: tru ...
- Oracle数据泵(Data Dump)错误汇集
Oracle数据泵(Data Dump)使用过程当中经常会遇到一些奇奇怪怪的错误案例,下面总结一些自己使用数据泵(Data Dump)过程当中遇到的问题以及解决方法.都是在使用过程中遇到的问题,以后陆 ...
随机推荐
- Linux VMware tools安装步骤
Linux VMware tools安装步骤: 1.安装环境介绍 #虚拟机版本:VMware-workstation-full-10 #linux分发版本:CentOS-6.4-i386-LiveCD ...
- php面向对象编程self和static的区别
在php的面向对象编程中,总会遇到 class test{ public static function test(){ self::func(); static::func(); } public ...
- PHP获取文件后缀名
PHP获取文件后缀名是PHP学习者常见的一种操作,无论是在面试过程中还是PHP新手自学中.PHP获取文件后缀名都是很普遍的需要掌握的一个知识点. 下面我们就给大家总结介绍PHP获取文件扩展名也就是后缀 ...
- sharding-jdbc结合mybatis实现分库分表功能
最近忙于项目已经好久几天没写博客了,前2篇文章我给大家介绍了搭建基础springMvc+mybatis的maven工程,这个简单框架已经可以对付一般的小型项目.但是我们实际项目中会碰到很多复杂的场景, ...
- python接口自动化测试二十四:上传多个附件,参数化
# 添加多个附件参数化files = [("1.png", "1.png") ("2.png", "2.png") ]d ...
- div展开与收起(鼠标点击)
效果图: <!DOCTYPE html> <html lang="en"> <head> <meta charset="UTF- ...
- 利用mysqldump 实现每天备份方案
1.创建单独的导出导入数据库帐号 grant SELECT, RELOAD, SHOW DATABASES, LOCK TABLES on game to jackluo@localhost iden ...
- 《Gradle权威指南》--Groovy基础
No1: Groovy中分号不是必须的 No2: Groovy中,单引号和双引号都可以定义一个字符串常量,不同的是单引号标记的是纯粹的字符串常量,而不是对字符串里的表达式做运算,但是双引号可以. ta ...
- Sensor传感器(摇一摇)
<ImageView android:layout_width="wrap_content" android:layout_height="wrap_content ...
- Css实现元素的垂直居中
前言: 在写CSS的时候让元素在高度固定的容器中垂直居中是很简单的,譬如设置容器的padding或者元素的margin之类的都可以做到:让元素在容器中水平居中也有text-align:center.m ...