Microsoft Word - iOSAppReverseEngineering.docx

(Romina) #1

10.3.2 Find response method of “Send” button using Cycript


Since we’ve already known that the superview of “Send” button is a CKMessageEntryView


object in section 10.2, we can repeat what we’ve done in section 10.2.2 and get the superview


without further tests:


FunMaker-5:~ root# cycript - p MobileSMS
cy# ?expand
expand == true
cy# [UIApp windows]
@[#"<UIWindow: 0x14e12fa0; frame = (0 0; 320 568); gestureRecognizers = <NSArray:
0x14e11f50>; layer = <UIWindowLayer: 0x14ee4570>>",#"<UITextEffectsWindow: 0x14fa6000;
frame = (0 0; 320 568); opaque = NO; gestureRecognizers = <NSArray: 0x14fa66d0>; layer =
<UIWindowLayer: 0x14fa5fc0>>",#"<CKJoystickWindow: 0x14d22310; baseClass =
UIAutoRotatingWindow; frame = (0 0; 320 568); hidden = YES; gestureRecognizers =
<NSArray: 0x14d21ab0>; layer = <UIWindowLayer: 0x14d22140>>"]
cy# [#0x14fa6000 subviews]
@[#"<UIInputSetContainerView: 0x14d03930; frame = (0 0; 320 568); autoresize = W+H;
layer = <CALayer: 0x14d03770>>"]
cy# [#0x14d03930 subviews]
@[#"<UIInputSetHostView: 0x14d033f0; frame = (0 250; 320 318); layer = <CALayer:
0x14d03290>>"]
cy# [#0x14d033f0 subviews]
@[#"<UIKBInputBackdropView: 0x160441a0; frame = (0 65; 320 253); userInteractionEnabled
= NO; layer = <CALayer: 0x16043b60>>",#"<_UIKBCompatInputView: 0x14f78a20; frame = (0
65; 320 253); layer = <CALayer: 0x14f78920>>",#"<CKMessageEntryView: 0x160c6180; frame =
(0 0; 320 65); opaque = NO; autoresize = W; layer = <CALayer: 0x16089920>>"]
cy# [#0x160c6180 subviews]
@[#"<_UIBackdropView: 0x16069d40; frame = (0 0; 320 65); opaque = NO; autoresize = W+H;
userInteractionEnabled = NO; layer = <_UIBackdropViewLayer: 0x14d627c0>>",#"<UIView:
0x16052920; frame = (0 0; 320 0.5); layer = <CALayer: 0x160529d0>>",#"<UIButton:
0x1605a8b0; frame = (266 27; 53 33); opaque = NO; layer = <CALayer:
0x16052a00>>",#"<UIButton: 0x14d0b2c0; frame = (266 30; 53 26); hidden = YES; opaque =
NO; gestureRecognizers = <NSArray: 0x160f9800>; layer = <CALayer:
0x1605a140>>",#"<UIButton: 0x1606f040; frame = (15 33.5; 25 18.5); opaque = NO;
gestureRecognizers = <NSArray: 0x14d07970>; layer = <CALayer:
0x1605aaa0>>",#"<_UITextFieldRoundedRectBackgroundViewNeue: 0x160e5ed0; frame = (55 8;
209.5 49.5); opaque = NO; userInteractionEnabled = NO; layer = <CALayer:
0x160d3a10>>",#"<UIView: 0x160a3390; frame = (55 8; 209.5 49.5); clipsToBounds = YES;
opaque = NO; layer = <CALayer: 0x160b8ab0>>",#"<CKMessageEntryWaveformView: 0x160c4750;
frame = (15 25.5; 251 35); alpha = 0; opaque = NO; userInteractionEnabled = NO; layer =
<CALayer: 0x160c47e0>>"]

Among these views, “UIView: 0x16052920” is where “iMessage” resides, do you remember?


As a result, the following 2 UIButtons are quite suspicious, my intuition tells me “Send” is one of


them. Meanwhile, the hidden property of the 2nd UIButton is set to YES, indicating its


invisibility. Well, let’s test the 1st UIButton, “UIButton: 0x1605a8b0” with Cycript:


cy# [#0x1605a8b0 setHidden:YES]

The view changed to figure 10-56 after the above command:

Free download pdf