Skip to content

Commit

Permalink
Expose the ping command to the CLI.
Browse files Browse the repository at this point in the history
  • Loading branch information
leonjza committed Apr 28, 2020
1 parent a69fffc commit fee42b3
Show file tree
Hide file tree
Showing 2 changed files with 20 additions and 0 deletions.
15 changes: 15 additions & 0 deletions objection/commands/frida_commands.py
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,21 @@ def frida_environment(args: list = None) -> None:
]))


def ping(args: list = None) -> None:
"""
Pings the agent.
:param args:
:return:
"""

agent = state_connection.get_api()
if agent.ping():
click.secho('The agent responds ok!', fg='green')
else:
click.secho('The agent did not respond ok!', fg='red')


def load_background(args: list = None) -> None:
"""
Loads a Frida script and runs it in the background.
Expand Down
5 changes: 5 additions & 0 deletions objection/console/commands.py
Original file line number Diff line number Diff line change
Expand Up @@ -69,6 +69,11 @@
'exec': frida_commands.load_background
},

'ping': {
'meta': 'Ping the injected agent',
'exec': frida_commands.ping
},

# file manager commands

'cd': {
Expand Down

0 comments on commit fee42b3

Please sign in to comment.