为什么IDA会显示类转储无法实现的方法?为什么我不能挂钩呢?

时间:2015-10-22 13:34:13

标签: objective-c reverse-engineering ida cydia-substrate logos

在Instagram上进行类转储(v7.7)时,我很困惑为什么在这个类中," sponsContext"的方法声明。不见了。相比之下,IDA显示&#34 ;-(char)赞助的上下文"方法

类转储结果:

@interface IGFeedItemTimelineLayoutAttributes : XXUnknownSuperclass {
    BOOL _sponsoredContext;
    BOOL _showExploreContext;
    BOOL _showTimeStampOnFirstLayoutElement;
    IGFeedItem* _feedItem;
    NSArray* _rowItems;
}
@property(retain, nonatomic) NSArray* rowItems;
@property(assign, nonatomic) BOOL showTimeStampOnFirstLayoutElement;
@property(assign, nonatomic) BOOL showExploreContext;
@property(assign, nonatomic) BOOL sponsoredContext;
@property(retain, nonatomic) IGFeedItem* feedItem;
-(void).cxx_destruct;
-(id)commentForTextTimelineRow:(int)textTimelineRow;
-(int)cellTypeForTextTimelineRow:(int)textTimelineRow;
-(int)numberOfTextRowsInTimeline;
-(id)initWithFeedItem:(id)feedItem sponsoredContext:(BOOL)context showExploreContext:(BOOL)context3 showTimeStampOnFirstLayoutElement:(BOOL)element;
@end

IDA结果:

IGFeedItemTimelineLayoutAttributes - (char)sponsoredContext
char __cdecl -[IGFeedItemTimelineLayoutAttributes sponsoredContext](struct IGFeedItemTimelineLayoutAttributes *self, SEL)
__IGFeedItemTimelineLayoutAttributes_sponsoredContext_

MOV             R1, #(_OBJC_IVAR_$_IGFeedItemTimelineLayoutAttributes._sponsoredContext - 0x15C64)
ADD             R1, PC
LDR             R1, [R1]
LDRSB           R0, [R0,R1]
BX              LR
End of function -[IGFeedItemTimelineLayoutAttributes sponsoredContext]

此外,当我尝试使用Logos挂钩此方法时:

%hook IGFeedItemTimelineLayoutAttributes
-(BOOL)sponsoredContext{
    NSLog(@"Text:%d", %orig());
    return %orig();
}
%end

Cydia Substrate给我错误:

MS:Warning: message not found [IGFeedItemTimelineLayoutAttributes sponsoredContext:]

如何挂钩此方法?为什么没有类转储显示它,但IDA呢?这个方法有什么特别之处?

提前致谢。

0 个答案:

没有答案