Exemple #1
0
def ps(device: frida.core.Device) -> list:
    props = ['name', 'pid']

    def fmt(p):
        return '%s-%s' % (device.id, p.name or p.pid)

    wrap = info_wrap(props, fmt)

    try:
        ps = device.enumerate_processes(scope='full')
    except TypeError:
        raise RuntimeError(
            'Your frida python package is out of date. Please upgrade it')
    except frida.TransportError:
        ps = device.enumerate_processes()
    return [wrap(p) for p in ps]
Exemple #2
0
def ps(device: frida.core.Device) -> list:
    props = ['name', 'pid']

    def wrap(p):
        obj = {prop: getattr(p, prop) for prop in props}
        obj['largeIcon'] = png.to_uri(p.get_large_icon())
        obj['smallIcon'] = png.to_uri(p.get_small_icon())
        return obj

    return [wrap(p) for p in device.enumerate_processes()]
Exemple #3
0
def device_type(device: frida.core.Device) -> str:
    mapping = {
        'SpringBoard': 'iOS',
        'Dock': 'macOS',
        'explorer.exe': 'win32',
        'zygote': 'Android',
    }

    for proc in device.enumerate_processes():
        if proc.name in mapping:
            return mapping[proc.name]
    else:
        return 'Linux'