示例#1
0
def create_entropies(vmx, m):
    try:
        default_signature = vmx.get_method_signature(m, predef_sign=DEFAULT_SIGNATURE).get_string()
        l = [default_signature,
             entropy(vmx.get_method_signature(m, "L4", {"L4": {"arguments": ["Landroid"]}}).get_string()),
             entropy(vmx.get_method_signature(m, "L4", {"L4": {"arguments": ["Ljava"]}}).get_string()),
             entropy(vmx.get_method_signature(m, "hex").get_string()),
             entropy(vmx.get_method_signature(m, "L2").get_string()),
        ]
        return l
    except KeyError:
        return ["", 0.0, 0.0, 0.0, 0.0]
示例#2
0
def create_info(vmx, m):
    E = create_entropies(vmx, m)

    H = {}
    H["signature"] = E[0]
    H["signature_entropy"] = entropy(E[0])
    H["android_api_entropy"] = E[1]
    H["java_api_entropy"] = E[2]
    H["hex_entropy"] = E[3]
    H["exceptions_entropy"] = E[4]

    return H