sensepost / objection

📱 objection - runtime mobile exploration
GNU General Public License v3.0
7.46k stars 854 forks source link

Syntax error on setting methods in watch and set commands #367

Closed dineshdinz closed 4 years ago

dineshdinz commented 4 years ago

Objection version: 1.9.1 iOS: 12.4.3

It may be an issue or question please help me out.

I have tried to watch a method from the DVIA-v2 app (swift version) but getting error in syntax while setting up with watch and set commands.

method watch and set error

what exactly I am doing wrong or what syntax I have to use.

ios hooking watch class DVIA_v2.JailbreakDetectionViewController --works fine.

ios hooking watch method -[DVIA_v2.JailbreakDetectionViewController:jailbreakTest1Tapped]
(agent) Error! Unable to find address for selector -[DVIA_v2.JailbreakDetectionViewController:jailbreakTest1Tapped]! The error was: Error: invalid query; format is: -[NSNumber foo:bar:], +[Foo foo] or *[Bar baz]

leonjza commented 4 years ago

Try placing -[DVIA_v2.JailbreakDetectionViewController:jailbreakTest1Tapped] in quotes: "-[DVIA_v2.JailbreakDetectionViewController:jailbreakTest1Tapped]".

You can get command syntax help by prefixing the command with help. For example: help ios hooking watch method.

dineshdinz commented 4 years ago

Thanks works fine.