-
Notifications
You must be signed in to change notification settings - Fork 1
/
parajection.py
executable file
·48 lines (32 loc) · 1.24 KB
/
parajection.py
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
import click
from objection.utils.frida_transport import FridaRunner
from objection.utils.helpers import clean_argument_flags
from objection.utils.templates import android_hook
@click.command()
@click.option('--search', help='Number of greetings.')
@click.option('--gadget', help='Process name.')
def var_class(args: list) -> None:
search = str(search)
if len(search) == 0:
click.secho('Usage: android hooking search classes <name>', bold=True)
return
runner = FridaRunner()
runner.set_hook_with_data(android_hook('hooking/search-class'), search=search)
runner.run()
response = runner.get_last_message()
if not response.is_successful():
click.secho('Failed to search for classes with error: {0}'.format(response.error_reason), fg='red')
return None
if response.data:
# dump the classes to screen
for classname in response.data:
click.secho(classname)
click.secho('\nFound {0} classes'.format(len(response.data)), bold=True)
else:
click.secho('No classes found')
import re
import sys
from objection.console.cli import cli
if __name__ == '__main__':
sys.argv[0] = re.sub(r'(-script\.pyw?|\.exe)?$', '', sys.argv[0])
sys.exit(cli())