Commit Graph

2370 Commits

Author SHA1 Message Date
aitviid
3931a45ca4
Make compute_end fall back to self.head if no match is found (#1082)
Nodes with `end` set to the default `None` cause exceptions when the user requests human-readable source code.

Fix for issue #1081.
2024-10-05 09:50:12 +03:00
aitviid
d1e602c1aa
Fix empty catch_type in catch nodes (#1080)
* Call `set_catch_type` on both nodes to ensure the attribute is not empty

Nodes with `catch_type` set to the default `None` cause exceptions when the user requests human-readable source code.

Fix for issue #1079.

* Ensure nodes in the same catch edge inherit non-empty `catch_type` from each other

Some areas in the code call `add_catch_edge` without calling `set_catch_type`. Nodes with `catch_type` set to the default `None` cause exceptions when the user requests human-readable source code.

Fix for issue #1079.
2024-10-05 09:49:51 +03:00
aitviid
da5c1dd8ef
Convert androguard.decompiler.dast functions into instance or static methods (#1077)
* Convert `visit_ins` into a method

This commit is part of a series of changes that convert functions in `androguard.decompiler.dast` into instance or static methods.

With the previous version of the code it was difficult to alter the functionality of the `JSONWriter` class.

For some methods in `JSONWriter`, expanding the behaviour would require re-implementing entire code blocks or using monkey patching.

Example:

In the original version of the code the `dast` module contains a function called `method_invocation`. It is used in another function called `visit_expr`. `visit_expr` is called by `JSONWriter` in `get_cond` and `visit_switch_node` instance methods.

If a developer wanted to add extra logic for cases when `JSONWriter` detects a method invocation (e.g. to dynamically log callers), the procedure would be very complicated:

1. Use some form of monkey patching to modify the `method_invocation` and `visit_expr` functions.
2. Override `get_cond` and `visit_switch_node` methods in a way that ensures the new versions of `method_invocation` and `visit_expr` are called.

If `method_invocation` is a method inside `JSONWriter`, the procedure is much simpler - the developer only needs to override `method_invocation`.

* Convert `write_inplace_if_possible` and `visit_expr` into methods

This commit is part of a series of changes that convert functions in `androguard.decompiler.dast` into instance or static methods.

With the previous version of the code it was difficult to alter the functionality of the `JSONWriter` class.

For some methods in `JSONWriter`, expanding the behaviour would require re-implementing entire code blocks or using monkey patching.

Example:

In the original version of the code the `dast` module contains a function called `method_invocation`. It is used in another function called `visit_expr`. `visit_expr` is called by `JSONWriter` in `get_cond` and `visit_switch_node` instance methods.

If a developer wanted to add extra logic for cases when `JSONWriter` detects a method invocation (e.g. to dynamically log callers), the procedure would be very complicated:

1. Use some form of monkey patching to modify the `method_invocation` and `visit_expr` functions.
2. Override `get_cond` and `visit_switch_node` methods in a way that ensures the new versions of `method_invocation` and `visit_expr` are called.

If `method_invocation` is a method inside `JSONWriter`, the procedure is much simpler - the developer only needs to override `method_invocation`.

* Convert `visit_arr_data` into a method

This commit is part of a series of changes that convert functions in `androguard.decompiler.dast` into instance or static methods.

With the previous version of the code it was difficult to alter the functionality of the `JSONWriter` class.

For some methods in `JSONWriter`, expanding the behaviour would require re-implementing entire code blocks or using monkey patching.

Example:

In the original version of the code the `dast` module contains a function called `method_invocation`. It is used in another function called `visit_expr`. `visit_expr` is called by `JSONWriter` in `get_cond` and `visit_switch_node` instance methods.

If a developer wanted to add extra logic for cases when `JSONWriter` detects a method invocation (e.g. to dynamically log callers), the procedure would be very complicated:

1. Use some form of monkey patching to modify the `method_invocation` and `visit_expr` functions.
2. Override `get_cond` and `visit_switch_node` methods in a way that ensures the new versions of `method_invocation` and `visit_expr` are called.

If `method_invocation` is a method inside `JSONWriter`, the procedure is much simpler - the developer only needs to override `method_invocation`.

* Convert `visit_decl` into a method

This commit is part of a series of changes that convert functions in `androguard.decompiler.dast` into instance or static methods.

With the previous version of the code it was difficult to alter the functionality of the `JSONWriter` class.

For some methods in `JSONWriter`, expanding the behaviour would require re-implementing entire code blocks or using monkey patching.

Example:

In the original version of the code the `dast` module contains a function called `method_invocation`. It is used in another function called `visit_expr`. `visit_expr` is called by `JSONWriter` in `get_cond` and `visit_switch_node` instance methods.

If a developer wanted to add extra logic for cases when `JSONWriter` detects a method invocation (e.g. to dynamically log callers), the procedure would be very complicated:

1. Use some form of monkey patching to modify the `method_invocation` and `visit_expr` functions.
2. Override `get_cond` and `visit_switch_node` methods in a way that ensures the new versions of `method_invocation` and `visit_expr` are called.

If `method_invocation` is a method inside `JSONWriter`, the procedure is much simpler - the developer only needs to override `method_invocation`.

* Convert `literal_null` into a static method

This commit is part of a series of changes that convert functions in `androguard.decompiler.dast` into instance or static methods.

With the previous version of the code it was difficult to alter the functionality of the `JSONWriter` class.

For some methods in `JSONWriter`, expanding the behaviour would require re-implementing entire code blocks or using monkey patching.

Example:

In the original version of the code the `dast` module contains a function called `method_invocation`. It is used in another function called `visit_expr`. `visit_expr` is called by `JSONWriter` in `get_cond` and `visit_switch_node` instance methods.

If a developer wanted to add extra logic for cases when `JSONWriter` detects a method invocation (e.g. to dynamically log callers), the procedure would be very complicated:

1. Use some form of monkey patching to modify the `method_invocation` and `visit_expr` functions.
2. Override `get_cond` and `visit_switch_node` methods in a way that ensures the new versions of `method_invocation` and `visit_expr` are called.

If `method_invocation` is a method inside `JSONWriter`, the procedure is much simpler - the developer only needs to override `method_invocation`.

* Convert `literal_double` into a static method

This commit is part of a series of changes that convert functions in `androguard.decompiler.dast` into instance or static methods.

With the previous version of the code it was difficult to alter the functionality of the `JSONWriter` class.

For some methods in `JSONWriter`, expanding the behaviour would require re-implementing entire code blocks or using monkey patching.

Example:

In the original version of the code the `dast` module contains a function called `method_invocation`. It is used in another function called `visit_expr`. `visit_expr` is called by `JSONWriter` in `get_cond` and `visit_switch_node` instance methods.

If a developer wanted to add extra logic for cases when `JSONWriter` detects a method invocation (e.g. to dynamically log callers), the procedure would be very complicated:

1. Use some form of monkey patching to modify the `method_invocation` and `visit_expr` functions.
2. Override `get_cond` and `visit_switch_node` methods in a way that ensures the new versions of `method_invocation` and `visit_expr` are called.

If `method_invocation` is a method inside `JSONWriter`, the procedure is much simpler - the developer only needs to override `method_invocation`.

* Convert `literal_float` into a static method

This commit is part of a series of changes that convert functions in `androguard.decompiler.dast` into instance or static methods.

With the previous version of the code it was difficult to alter the functionality of the `JSONWriter` class.

For some methods in `JSONWriter`, expanding the behaviour would require re-implementing entire code blocks or using monkey patching.

Example:

In the original version of the code the `dast` module contains a function called `method_invocation`. It is used in another function called `visit_expr`. `visit_expr` is called by `JSONWriter` in `get_cond` and `visit_switch_node` instance methods.

If a developer wanted to add extra logic for cases when `JSONWriter` detects a method invocation (e.g. to dynamically log callers), the procedure would be very complicated:

1. Use some form of monkey patching to modify the `method_invocation` and `visit_expr` functions.
2. Override `get_cond` and `visit_switch_node` methods in a way that ensures the new versions of `method_invocation` and `visit_expr` are called.

If `method_invocation` is a method inside `JSONWriter`, the procedure is much simpler - the developer only needs to override `method_invocation`.

* Convert `literal_long` into a static method

This commit is part of a series of changes that convert functions in `androguard.decompiler.dast` into instance or static methods.

With the previous version of the code it was difficult to alter the functionality of the `JSONWriter` class.

For some methods in `JSONWriter`, expanding the behaviour would require re-implementing entire code blocks or using monkey patching.

Example:

In the original version of the code the `dast` module contains a function called `method_invocation`. It is used in another function called `visit_expr`. `visit_expr` is called by `JSONWriter` in `get_cond` and `visit_switch_node` instance methods.

If a developer wanted to add extra logic for cases when `JSONWriter` detects a method invocation (e.g. to dynamically log callers), the procedure would be very complicated:

1. Use some form of monkey patching to modify the `method_invocation` and `visit_expr` functions.
2. Override `get_cond` and `visit_switch_node` methods in a way that ensures the new versions of `method_invocation` and `visit_expr` are called.

If `method_invocation` is a method inside `JSONWriter`, the procedure is much simpler - the developer only needs to override `method_invocation`.

* Convert `literal_hex_int` into a static method

This commit is part of a series of changes that convert functions in `androguard.decompiler.dast` into instance or static methods.

With the previous version of the code it was difficult to alter the functionality of the `JSONWriter` class.

For some methods in `JSONWriter`, expanding the behaviour would require re-implementing entire code blocks or using monkey patching.

Example:

In the original version of the code the `dast` module contains a function called `method_invocation`. It is used in another function called `visit_expr`. `visit_expr` is called by `JSONWriter` in `get_cond` and `visit_switch_node` instance methods.

If a developer wanted to add extra logic for cases when `JSONWriter` detects a method invocation (e.g. to dynamically log callers), the procedure would be very complicated:

1. Use some form of monkey patching to modify the `method_invocation` and `visit_expr` functions.
2. Override `get_cond` and `visit_switch_node` methods in a way that ensures the new versions of `method_invocation` and `visit_expr` are called.

If `method_invocation` is a method inside `JSONWriter`, the procedure is much simpler - the developer only needs to override `method_invocation`.

* Convert `literal_int` into a static method

This commit is part of a series of changes that convert functions in `androguard.decompiler.dast` into instance or static methods.

With the previous version of the code it was difficult to alter the functionality of the `JSONWriter` class.

For some methods in `JSONWriter`, expanding the behaviour would require re-implementing entire code blocks or using monkey patching.

Example:

In the original version of the code the `dast` module contains a function called `method_invocation`. It is used in another function called `visit_expr`. `visit_expr` is called by `JSONWriter` in `get_cond` and `visit_switch_node` instance methods.

If a developer wanted to add extra logic for cases when `JSONWriter` detects a method invocation (e.g. to dynamically log callers), the procedure would be very complicated:

1. Use some form of monkey patching to modify the `method_invocation` and `visit_expr` functions.
2. Override `get_cond` and `visit_switch_node` methods in a way that ensures the new versions of `method_invocation` and `visit_expr` are called.

If `method_invocation` is a method inside `JSONWriter`, the procedure is much simpler - the developer only needs to override `method_invocation`.

* Convert `literal_bool` into a static method

This commit is part of a series of changes that convert functions in `androguard.decompiler.dast` into instance or static methods.

With the previous version of the code it was difficult to alter the functionality of the `JSONWriter` class.

For some methods in `JSONWriter`, expanding the behaviour would require re-implementing entire code blocks or using monkey patching.

Example:

In the original version of the code the `dast` module contains a function called `method_invocation`. It is used in another function called `visit_expr`. `visit_expr` is called by `JSONWriter` in `get_cond` and `visit_switch_node` instance methods.

If a developer wanted to add extra logic for cases when `JSONWriter` detects a method invocation (e.g. to dynamically log callers), the procedure would be very complicated:

1. Use some form of monkey patching to modify the `method_invocation` and `visit_expr` functions.
2. Override `get_cond` and `visit_switch_node` methods in a way that ensures the new versions of `method_invocation` and `visit_expr` are called.

If `method_invocation` is a method inside `JSONWriter`, the procedure is much simpler - the developer only needs to override `method_invocation`.

* Convert `literal_class` into a static method

This commit is part of a series of changes that convert functions in `androguard.decompiler.dast` into instance or static methods.

With the previous version of the code it was difficult to alter the functionality of the `JSONWriter` class.

For some methods in `JSONWriter`, expanding the behaviour would require re-implementing entire code blocks or using monkey patching.

Example:

In the original version of the code the `dast` module contains a function called `method_invocation`. It is used in another function called `visit_expr`. `visit_expr` is called by `JSONWriter` in `get_cond` and `visit_switch_node` instance methods.

If a developer wanted to add extra logic for cases when `JSONWriter` detects a method invocation (e.g. to dynamically log callers), the procedure would be very complicated:

1. Use some form of monkey patching to modify the `method_invocation` and `visit_expr` functions.
2. Override `get_cond` and `visit_switch_node` methods in a way that ensures the new versions of `method_invocation` and `visit_expr` are called.

If `method_invocation` is a method inside `JSONWriter`, the procedure is much simpler - the developer only needs to override `method_invocation`.

* Convert `literal_string` into a static method

This commit is part of a series of changes that convert functions in `androguard.decompiler.dast` into instance or static methods.

With the previous version of the code it was difficult to alter the functionality of the `JSONWriter` class.

For some methods in `JSONWriter`, expanding the behaviour would require re-implementing entire code blocks or using monkey patching.

Example:

In the original version of the code the `dast` module contains a function called `method_invocation`. It is used in another function called `visit_expr`. `visit_expr` is called by `JSONWriter` in `get_cond` and `visit_switch_node` instance methods.

If a developer wanted to add extra logic for cases when `JSONWriter` detects a method invocation (e.g. to dynamically log callers), the procedure would be very complicated:

1. Use some form of monkey patching to modify the `method_invocation` and `visit_expr` functions.
2. Override `get_cond` and `visit_switch_node` methods in a way that ensures the new versions of `method_invocation` and `visit_expr` are called.

If `method_invocation` is a method inside `JSONWriter`, the procedure is much simpler - the developer only needs to override `method_invocation`.

* Convert `parse_descriptor` into a static method

This commit is part of a series of changes that convert functions in `androguard.decompiler.dast` into instance or static methods.

With the previous version of the code it was difficult to alter the functionality of the `JSONWriter` class.

For some methods in `JSONWriter`, expanding the behaviour would require re-implementing entire code blocks or using monkey patching.

Example:

In the original version of the code the `dast` module contains a function called `method_invocation`. It is used in another function called `visit_expr`. `visit_expr` is called by `JSONWriter` in `get_cond` and `visit_switch_node` instance methods.

If a developer wanted to add extra logic for cases when `JSONWriter` detects a method invocation (e.g. to dynamically log callers), the procedure would be very complicated:

1. Use some form of monkey patching to modify the `method_invocation` and `visit_expr` functions.
2. Override `get_cond` and `visit_switch_node` methods in a way that ensures the new versions of `method_invocation` and `visit_expr` are called.

If `method_invocation` is a method inside `JSONWriter`, the procedure is much simpler - the developer only needs to override `method_invocation`.

* Convert `_append` into a static method

This commit is part of a series of changes that convert functions in `androguard.decompiler.dast` into instance or static methods.

With the previous version of the code it was difficult to alter the functionality of the `JSONWriter` class.

For some methods in `JSONWriter`, expanding the behaviour would require re-implementing entire code blocks or using monkey patching.

Example:

In the original version of the code the `dast` module contains a function called `method_invocation`. It is used in another function called `visit_expr`. `visit_expr` is called by `JSONWriter` in `get_cond` and `visit_switch_node` instance methods.

If a developer wanted to add extra logic for cases when `JSONWriter` detects a method invocation (e.g. to dynamically log callers), the procedure would be very complicated:

1. Use some form of monkey patching to modify the `method_invocation` and `visit_expr` functions.
2. Override `get_cond` and `visit_switch_node` methods in a way that ensures the new versions of `method_invocation` and `visit_expr` are called.

If `method_invocation` is a method inside `JSONWriter`, the procedure is much simpler - the developer only needs to override `method_invocation`.

* Convert `statement_block` into a static method

This commit is part of a series of changes that convert functions in `androguard.decompiler.dast` into instance or static methods.

With the previous version of the code it was difficult to alter the functionality of the `JSONWriter` class.

For some methods in `JSONWriter`, expanding the behaviour would require re-implementing entire code blocks or using monkey patching.

Example:

In the original version of the code the `dast` module contains a function called `method_invocation`. It is used in another function called `visit_expr`. `visit_expr` is called by `JSONWriter` in `get_cond` and `visit_switch_node` instance methods.

If a developer wanted to add extra logic for cases when `JSONWriter` detects a method invocation (e.g. to dynamically log callers), the procedure would be very complicated:

1. Use some form of monkey patching to modify the `method_invocation` and `visit_expr` functions.
2. Override `get_cond` and `visit_switch_node` methods in a way that ensures the new versions of `method_invocation` and `visit_expr` are called.

If `method_invocation` is a method inside `JSONWriter`, the procedure is much simpler - the developer only needs to override `method_invocation`.

* Convert `switch_stmt` into a static method

This commit is part of a series of changes that convert functions in `androguard.decompiler.dast` into instance or static methods.

With the previous version of the code it was difficult to alter the functionality of the `JSONWriter` class.

For some methods in `JSONWriter`, expanding the behaviour would require re-implementing entire code blocks or using monkey patching.

Example:

In the original version of the code the `dast` module contains a function called `method_invocation`. It is used in another function called `visit_expr`. `visit_expr` is called by `JSONWriter` in `get_cond` and `visit_switch_node` instance methods.

If a developer wanted to add extra logic for cases when `JSONWriter` detects a method invocation (e.g. to dynamically log callers), the procedure would be very complicated:

1. Use some form of monkey patching to modify the `method_invocation` and `visit_expr` functions.
2. Override `get_cond` and `visit_switch_node` methods in a way that ensures the new versions of `method_invocation` and `visit_expr` are called.

If `method_invocation` is a method inside `JSONWriter`, the procedure is much simpler - the developer only needs to override `method_invocation`.

* Convert `if_stmt` into a static method

This commit is part of a series of changes that convert functions in `androguard.decompiler.dast` into instance or static methods.

With the previous version of the code it was difficult to alter the functionality of the `JSONWriter` class.

For some methods in `JSONWriter`, expanding the behaviour would require re-implementing entire code blocks or using monkey patching.

Example:

In the original version of the code the `dast` module contains a function called `method_invocation`. It is used in another function called `visit_expr`. `visit_expr` is called by `JSONWriter` in `get_cond` and `visit_switch_node` instance methods.

If a developer wanted to add extra logic for cases when `JSONWriter` detects a method invocation (e.g. to dynamically log callers), the procedure would be very complicated:

1. Use some form of monkey patching to modify the `method_invocation` and `visit_expr` functions.
2. Override `get_cond` and `visit_switch_node` methods in a way that ensures the new versions of `method_invocation` and `visit_expr` are called.

If `method_invocation` is a method inside `JSONWriter`, the procedure is much simpler - the developer only needs to override `method_invocation`.

* Convert `try_stmt` into a static method

This commit is part of a series of changes that convert functions in `androguard.decompiler.dast` into instance or static methods.

With the previous version of the code it was difficult to alter the functionality of the `JSONWriter` class.

For some methods in `JSONWriter`, expanding the behaviour would require re-implementing entire code blocks or using monkey patching.

Example:

In the original version of the code the `dast` module contains a function called `method_invocation`. It is used in another function called `visit_expr`. `visit_expr` is called by `JSONWriter` in `get_cond` and `visit_switch_node` instance methods.

If a developer wanted to add extra logic for cases when `JSONWriter` detects a method invocation (e.g. to dynamically log callers), the procedure would be very complicated:

1. Use some form of monkey patching to modify the `method_invocation` and `visit_expr` functions.
2. Override `get_cond` and `visit_switch_node` methods in a way that ensures the new versions of `method_invocation` and `visit_expr` are called.

If `method_invocation` is a method inside `JSONWriter`, the procedure is much simpler - the developer only needs to override `method_invocation`.

* Convert `loop_stmt` into a static method

This commit is part of a series of changes that convert functions in `androguard.decompiler.dast` into instance or static methods.

With the previous version of the code it was difficult to alter the functionality of the `JSONWriter` class.

For some methods in `JSONWriter`, expanding the behaviour would require re-implementing entire code blocks or using monkey patching.

Example:

In the original version of the code the `dast` module contains a function called `method_invocation`. It is used in another function called `visit_expr`. `visit_expr` is called by `JSONWriter` in `get_cond` and `visit_switch_node` instance methods.

If a developer wanted to add extra logic for cases when `JSONWriter` detects a method invocation (e.g. to dynamically log callers), the procedure would be very complicated:

1. Use some form of monkey patching to modify the `method_invocation` and `visit_expr` functions.
2. Override `get_cond` and `visit_switch_node` methods in a way that ensures the new versions of `method_invocation` and `visit_expr` are called.

If `method_invocation` is a method inside `JSONWriter`, the procedure is much simpler - the developer only needs to override `method_invocation`.

* Convert `jump_stmt` into a static method

This commit is part of a series of changes that convert functions in `androguard.decompiler.dast` into instance or static methods.

With the previous version of the code it was difficult to alter the functionality of the `JSONWriter` class.

For some methods in `JSONWriter`, expanding the behaviour would require re-implementing entire code blocks or using monkey patching.

Example:

In the original version of the code the `dast` module contains a function called `method_invocation`. It is used in another function called `visit_expr`. `visit_expr` is called by `JSONWriter` in `get_cond` and `visit_switch_node` instance methods.

If a developer wanted to add extra logic for cases when `JSONWriter` detects a method invocation (e.g. to dynamically log callers), the procedure would be very complicated:

1. Use some form of monkey patching to modify the `method_invocation` and `visit_expr` functions.
2. Override `get_cond` and `visit_switch_node` methods in a way that ensures the new versions of `method_invocation` and `visit_expr` are called.

If `method_invocation` is a method inside `JSONWriter`, the procedure is much simpler - the developer only needs to override `method_invocation`.

* Convert `throw_stmt` into a static method

This commit is part of a series of changes that convert functions in `androguard.decompiler.dast` into instance or static methods.

With the previous version of the code it was difficult to alter the functionality of the `JSONWriter` class.

For some methods in `JSONWriter`, expanding the behaviour would require re-implementing entire code blocks or using monkey patching.

Example:

In the original version of the code the `dast` module contains a function called `method_invocation`. It is used in another function called `visit_expr`. `visit_expr` is called by `JSONWriter` in `get_cond` and `visit_switch_node` instance methods.

If a developer wanted to add extra logic for cases when `JSONWriter` detects a method invocation (e.g. to dynamically log callers), the procedure would be very complicated:

1. Use some form of monkey patching to modify the `method_invocation` and `visit_expr` functions.
2. Override `get_cond` and `visit_switch_node` methods in a way that ensures the new versions of `method_invocation` and `visit_expr` are called.

If `method_invocation` is a method inside `JSONWriter`, the procedure is much simpler - the developer only needs to override `method_invocation`.

* Convert `return_stmt` into a static method

This commit is part of a series of changes that convert functions in `androguard.decompiler.dast` into instance or static methods.

With the previous version of the code it was difficult to alter the functionality of the `JSONWriter` class.

For some methods in `JSONWriter`, expanding the behaviour would require re-implementing entire code blocks or using monkey patching.

Example:

In the original version of the code the `dast` module contains a function called `method_invocation`. It is used in another function called `visit_expr`. `visit_expr` is called by `JSONWriter` in `get_cond` and `visit_switch_node` instance methods.

If a developer wanted to add extra logic for cases when `JSONWriter` detects a method invocation (e.g. to dynamically log callers), the procedure would be very complicated:

1. Use some form of monkey patching to modify the `method_invocation` and `visit_expr` functions.
2. Override `get_cond` and `visit_switch_node` methods in a way that ensures the new versions of `method_invocation` and `visit_expr` are called.

If `method_invocation` is a method inside `JSONWriter`, the procedure is much simpler - the developer only needs to override `method_invocation`.

* Convert `local_decl_stmt` into a static method

This commit is part of a series of changes that convert functions in `androguard.decompiler.dast` into instance or static methods.

With the previous version of the code it was difficult to alter the functionality of the `JSONWriter` class.

For some methods in `JSONWriter`, expanding the behaviour would require re-implementing entire code blocks or using monkey patching.

Example:

In the original version of the code the `dast` module contains a function called `method_invocation`. It is used in another function called `visit_expr`. `visit_expr` is called by `JSONWriter` in `get_cond` and `visit_switch_node` instance methods.

If a developer wanted to add extra logic for cases when `JSONWriter` detects a method invocation (e.g. to dynamically log callers), the procedure would be very complicated:

1. Use some form of monkey patching to modify the `method_invocation` and `visit_expr` functions.
2. Override `get_cond` and `visit_switch_node` methods in a way that ensures the new versions of `method_invocation` and `visit_expr` are called.

If `method_invocation` is a method inside `JSONWriter`, the procedure is much simpler - the developer only needs to override `method_invocation`.

* Convert `expression_stmt` into a static method

This commit is part of a series of changes that convert functions in `androguard.decompiler.dast` into instance or static methods.

With the previous version of the code it was difficult to alter the functionality of the `JSONWriter` class.

For some methods in `JSONWriter`, expanding the behaviour would require re-implementing entire code blocks or using monkey patching.

Example:

In the original version of the code the `dast` module contains a function called `method_invocation`. It is used in another function called `visit_expr`. `visit_expr` is called by `JSONWriter` in `get_cond` and `visit_switch_node` instance methods.

If a developer wanted to add extra logic for cases when `JSONWriter` detects a method invocation (e.g. to dynamically log callers), the procedure would be very complicated:

1. Use some form of monkey patching to modify the `method_invocation` and `visit_expr` functions.
2. Override `get_cond` and `visit_switch_node` methods in a way that ensures the new versions of `method_invocation` and `visit_expr` are called.

If `method_invocation` is a method inside `JSONWriter`, the procedure is much simpler - the developer only needs to override `method_invocation`.

* Convert `dummy` into a static method

This commit is part of a series of changes that convert functions in `androguard.decompiler.dast` into instance or static methods.

With the previous version of the code it was difficult to alter the functionality of the `JSONWriter` class.

For some methods in `JSONWriter`, expanding the behaviour would require re-implementing entire code blocks or using monkey patching.

Example:

In the original version of the code the `dast` module contains a function called `method_invocation`. It is used in another function called `visit_expr`. `visit_expr` is called by `JSONWriter` in `get_cond` and `visit_switch_node` instance methods.

If a developer wanted to add extra logic for cases when `JSONWriter` detects a method invocation (e.g. to dynamically log callers), the procedure would be very complicated:

1. Use some form of monkey patching to modify the `method_invocation` and `visit_expr` functions.
2. Override `get_cond` and `visit_switch_node` methods in a way that ensures the new versions of `method_invocation` and `visit_expr` are called.

If `method_invocation` is a method inside `JSONWriter`, the procedure is much simpler - the developer only needs to override `method_invocation`.

* Convert `var_decl` into a static method

This commit is part of a series of changes that convert functions in `androguard.decompiler.dast` into instance or static methods.

With the previous version of the code it was difficult to alter the functionality of the `JSONWriter` class.

For some methods in `JSONWriter`, expanding the behaviour would require re-implementing entire code blocks or using monkey patching.

Example:

In the original version of the code the `dast` module contains a function called `method_invocation`. It is used in another function called `visit_expr`. `visit_expr` is called by `JSONWriter` in `get_cond` and `visit_switch_node` instance methods.

If a developer wanted to add extra logic for cases when `JSONWriter` detects a method invocation (e.g. to dynamically log callers), the procedure would be very complicated:

1. Use some form of monkey patching to modify the `method_invocation` and `visit_expr` functions.
2. Override `get_cond` and `visit_switch_node` methods in a way that ensures the new versions of `method_invocation` and `visit_expr` are called.

If `method_invocation` is a method inside `JSONWriter`, the procedure is much simpler - the developer only needs to override `method_invocation`.

* Convert `unary_postfix` into a static method

This commit is part of a series of changes that convert functions in `androguard.decompiler.dast` into instance or static methods.

With the previous version of the code it was difficult to alter the functionality of the `JSONWriter` class.

For some methods in `JSONWriter`, expanding the behaviour would require re-implementing entire code blocks or using monkey patching.

Example:

In the original version of the code the `dast` module contains a function called `method_invocation`. It is used in another function called `visit_expr`. `visit_expr` is called by `JSONWriter` in `get_cond` and `visit_switch_node` instance methods.

If a developer wanted to add extra logic for cases when `JSONWriter` detects a method invocation (e.g. to dynamically log callers), the procedure would be very complicated:

1. Use some form of monkey patching to modify the `method_invocation` and `visit_expr` functions.
2. Override `get_cond` and `visit_switch_node` methods in a way that ensures the new versions of `method_invocation` and `visit_expr` are called.

If `method_invocation` is a method inside `JSONWriter`, the procedure is much simpler - the developer only needs to override `method_invocation`.

* Convert `unary_prefix` into a static method

This commit is part of a series of changes that convert functions in `androguard.decompiler.dast` into instance or static methods.

With the previous version of the code it was difficult to alter the functionality of the `JSONWriter` class.

For some methods in `JSONWriter`, expanding the behaviour would require re-implementing entire code blocks or using monkey patching.

Example:

In the original version of the code the `dast` module contains a function called `method_invocation`. It is used in another function called `visit_expr`. `visit_expr` is called by `JSONWriter` in `get_cond` and `visit_switch_node` instance methods.

If a developer wanted to add extra logic for cases when `JSONWriter` detects a method invocation (e.g. to dynamically log callers), the procedure would be very complicated:

1. Use some form of monkey patching to modify the `method_invocation` and `visit_expr` functions.
2. Override `get_cond` and `visit_switch_node` methods in a way that ensures the new versions of `method_invocation` and `visit_expr` are called.

If `method_invocation` is a method inside `JSONWriter`, the procedure is much simpler - the developer only needs to override `method_invocation`.

* Convert `typen` into a static method

This commit is part of a series of changes that convert functions in `androguard.decompiler.dast` into instance or static methods.

With the previous version of the code it was difficult to alter the functionality of the `JSONWriter` class.

For some methods in `JSONWriter`, expanding the behaviour would require re-implementing entire code blocks or using monkey patching.

Example:

In the original version of the code the `dast` module contains a function called `method_invocation`. It is used in another function called `visit_expr`. `visit_expr` is called by `JSONWriter` in `get_cond` and `visit_switch_node` instance methods.

If a developer wanted to add extra logic for cases when `JSONWriter` detects a method invocation (e.g. to dynamically log callers), the procedure would be very complicated:

1. Use some form of monkey patching to modify the `method_invocation` and `visit_expr` functions.
2. Override `get_cond` and `visit_switch_node` methods in a way that ensures the new versions of `method_invocation` and `visit_expr` are called.

If `method_invocation` is a method inside `JSONWriter`, the procedure is much simpler - the developer only needs to override `method_invocation`.

* Convert `parenthesis` into a static method

This commit is part of a series of changes that convert functions in `androguard.decompiler.dast` into instance or static methods.

With the previous version of the code it was difficult to alter the functionality of the `JSONWriter` class.

For some methods in `JSONWriter`, expanding the behaviour would require re-implementing entire code blocks or using monkey patching.

Example:

In the original version of the code the `dast` module contains a function called `method_invocation`. It is used in another function called `visit_expr`. `visit_expr` is called by `JSONWriter` in `get_cond` and `visit_switch_node` instance methods.

If a developer wanted to add extra logic for cases when `JSONWriter` detects a method invocation (e.g. to dynamically log callers), the procedure would be very complicated:

1. Use some form of monkey patching to modify the `method_invocation` and `visit_expr` functions.
2. Override `get_cond` and `visit_switch_node` methods in a way that ensures the new versions of `method_invocation` and `visit_expr` are called.

If `method_invocation` is a method inside `JSONWriter`, the procedure is much simpler - the developer only needs to override `method_invocation`.

* Convert `method_invocation` into a static method

This commit is part of a series of changes that convert functions in `androguard.decompiler.dast` into instance or static methods.

With the previous version of the code it was difficult to alter the functionality of the `JSONWriter` class.

For some methods in `JSONWriter`, expanding the behaviour would require re-implementing entire code blocks or using monkey patching.

Example:

In the original version of the code the `dast` module contains a function called `method_invocation`. It is used in another function called `visit_expr`. `visit_expr` is called by `JSONWriter` in `get_cond` and `visit_switch_node` instance methods.

If a developer wanted to add extra logic for cases when `JSONWriter` detects a method invocation (e.g. to dynamically log callers), the procedure would be very complicated:

1. Use some form of monkey patching to modify the `method_invocation` and `visit_expr` functions.
2. Override `get_cond` and `visit_switch_node` methods in a way that ensures the new versions of `method_invocation` and `visit_expr` are called.

If `method_invocation` is a method inside `JSONWriter`, the procedure is much simpler - the developer only needs to override `method_invocation`.

* Convert `local` into a static method

This commit is part of a series of changes that convert functions in `androguard.decompiler.dast` into instance or static methods.

With the previous version of the code it was difficult to alter the functionality of the `JSONWriter` class.

For some methods in `JSONWriter`, expanding the behaviour would require re-implementing entire code blocks or using monkey patching.

Example:

In the original version of the code the `dast` module contains a function called `method_invocation`. It is used in another function called `visit_expr`. `visit_expr` is called by `JSONWriter` in `get_cond` and `visit_switch_node` instance methods.

If a developer wanted to add extra logic for cases when `JSONWriter` detects a method invocation (e.g. to dynamically log callers), the procedure would be very complicated:

1. Use some form of monkey patching to modify the `method_invocation` and `visit_expr` functions.
2. Override `get_cond` and `visit_switch_node` methods in a way that ensures the new versions of `method_invocation` and `visit_expr` are called.

If `method_invocation` is a method inside `JSONWriter`, the procedure is much simpler - the developer only needs to override `method_invocation`.

* Convert `literal` into a static method

This commit is part of a series of changes that convert functions in `androguard.decompiler.dast` into instance or static methods.

With the previous version of the code it was difficult to alter the functionality of the `JSONWriter` class.

For some methods in `JSONWriter`, expanding the behaviour would require re-implementing entire code blocks or using monkey patching.

Example:

In the original version of the code the `dast` module contains a function called `method_invocation`. It is used in another function called `visit_expr`. `visit_expr` is called by `JSONWriter` in `get_cond` and `visit_switch_node` instance methods.

If a developer wanted to add extra logic for cases when `JSONWriter` detects a method invocation (e.g. to dynamically log callers), the procedure would be very complicated:

1. Use some form of monkey patching to modify the `method_invocation` and `visit_expr` functions.
2. Override `get_cond` and `visit_switch_node` methods in a way that ensures the new versions of `method_invocation` and `visit_expr` are called.

If `method_invocation` is a method inside `JSONWriter`, the procedure is much simpler - the developer only needs to override `method_invocation`.

* Convert `field_access` into a static method

This commit is part of a series of changes that convert functions in `androguard.decompiler.dast` into instance or static methods.

With the previous version of the code it was difficult to alter the functionality of the `JSONWriter` class.

For some methods in `JSONWriter`, expanding the behaviour would require re-implementing entire code blocks or using monkey patching.

Example:

In the original version of the code the `dast` module contains a function called `method_invocation`. It is used in another function called `visit_expr`. `visit_expr` is called by `JSONWriter` in `get_cond` and `visit_switch_node` instance methods.

If a developer wanted to add extra logic for cases when `JSONWriter` detects a method invocation (e.g. to dynamically log callers), the procedure would be very complicated:

1. Use some form of monkey patching to modify the `method_invocation` and `visit_expr` functions.
2. Override `get_cond` and `visit_switch_node` methods in a way that ensures the new versions of `method_invocation` and `visit_expr` are called.

If `method_invocation` is a method inside `JSONWriter`, the procedure is much simpler - the developer only needs to override `method_invocation`.

* Convert `cast` into a static method

This commit is part of a series of changes that convert functions in `androguard.decompiler.dast` into instance or static methods.

With the previous version of the code it was difficult to alter the functionality of the `JSONWriter` class.

For some methods in `JSONWriter`, expanding the behaviour would require re-implementing entire code blocks or using monkey patching.

Example:

In the original version of the code the `dast` module contains a function called `method_invocation`. It is used in another function called `visit_expr`. `visit_expr` is called by `JSONWriter` in `get_cond` and `visit_switch_node` instance methods.

If a developer wanted to add extra logic for cases when `JSONWriter` detects a method invocation (e.g. to dynamically log callers), the procedure would be very complicated:

1. Use some form of monkey patching to modify the `method_invocation` and `visit_expr` functions.
2. Override `get_cond` and `visit_switch_node` methods in a way that ensures the new versions of `method_invocation` and `visit_expr` are called.

If `method_invocation` is a method inside `JSONWriter`, the procedure is much simpler - the developer only needs to override `method_invocation`.

* Convert `binary_infix` into a static method

This commit is part of a series of changes that convert functions in `androguard.decompiler.dast` into instance or static methods.

With the previous version of the code it was difficult to alter the functionality of the `JSONWriter` class.

For some methods in `JSONWriter`, expanding the behaviour would require re-implementing entire code blocks or using monkey patching.

Example:

In the original version of the code the `dast` module contains a function called `method_invocation`. It is used in another function called `visit_expr`. `visit_expr` is called by `JSONWriter` in `get_cond` and `visit_switch_node` instance methods.

If a developer wanted to add extra logic for cases when `JSONWriter` detects a method invocation (e.g. to dynamically log callers), the procedure would be very complicated:

1. Use some form of monkey patching to modify the `method_invocation` and `visit_expr` functions.
2. Override `get_cond` and `visit_switch_node` methods in a way that ensures the new versions of `method_invocation` and `visit_expr` are called.

If `method_invocation` is a method inside `JSONWriter`, the procedure is much simpler - the developer only needs to override `method_invocation`.

* Convert `assignment` into a static method

This commit is part of a series of changes that convert functions in `androguard.decompiler.dast` into instance or static methods.

With the previous version of the code it was difficult to alter the functionality of the `JSONWriter` class.

For some methods in `JSONWriter`, expanding the behaviour would require re-implementing entire code blocks or using monkey patching.

Example:

In the original version of the code the `dast` module contains a function called `method_invocation`. It is used in another function called `visit_expr`. `visit_expr` is called by `JSONWriter` in `get_cond` and `visit_switch_node` instance methods.

If a developer wanted to add extra logic for cases when `JSONWriter` detects a method invocation (e.g. to dynamically log callers), the procedure would be very complicated:

1. Use some form of monkey patching to modify the `method_invocation` and `visit_expr` functions.
2. Override `get_cond` and `visit_switch_node` methods in a way that ensures the new versions of `method_invocation` and `visit_expr` are called.

If `method_invocation` is a method inside `JSONWriter`, the procedure is much simpler - the developer only needs to override `method_invocation`.

* Convert `array_initializer` into a static method

This commit is part of a series of changes that convert functions in `androguard.decompiler.dast` into instance or static methods.

With the previous version of the code it was difficult to alter the functionality of the `JSONWriter` class.

For some methods in `JSONWriter`, expanding the behaviour would require re-implementing entire code blocks or using monkey patching.

Example:

In the original version of the code the `dast` module contains a function called `method_invocation`. It is used in another function called `visit_expr`. `visit_expr` is called by `JSONWriter` in `get_cond` and `visit_switch_node` instance methods.

If a developer wanted to add extra logic for cases when `JSONWriter` detects a method invocation (e.g. to dynamically log callers), the procedure would be very complicated:

1. Use some form of monkey patching to modify the `method_invocation` and `visit_expr` functions.
2. Override `get_cond` and `visit_switch_node` methods in a way that ensures the new versions of `method_invocation` and `visit_expr` are called.

If `method_invocation` is a method inside `JSONWriter`, the procedure is much simpler - the developer only needs to override `method_invocation`.

* Convert `array_creation` into a static method

This commit is part of a series of changes that convert functions in `androguard.decompiler.dast` into instance or static methods.

With the previous version of the code it was difficult to alter the functionality of the `JSONWriter` class.

For some methods in `JSONWriter`, expanding the behaviour would require re-implementing entire code blocks or using monkey patching.

Example:

In the original version of the code the `dast` module contains a function called `method_invocation`. It is used in another function called `visit_expr`. `visit_expr` is called by `JSONWriter` in `get_cond` and `visit_switch_node` instance methods.

If a developer wanted to add extra logic for cases when `JSONWriter` detects a method invocation (e.g. to dynamically log callers), the procedure would be very complicated:

1. Use some form of monkey patching to modify the `method_invocation` and `visit_expr` functions.
2. Override `get_cond` and `visit_switch_node` methods in a way that ensures the new versions of `method_invocation` and `visit_expr` are called.

If `method_invocation` is a method inside `JSONWriter`, the procedure is much simpler - the developer only needs to override `method_invocation`.

* Convert `array_access` into a static method

This commit is part of a series of changes that convert functions in `androguard.decompiler.dast` into instance or static methods.

With the previous version of the code it was difficult to alter the functionality of the `JSONWriter` class.

For some methods in `JSONWriter`, expanding the behaviour would require re-implementing entire code blocks or using monkey patching.

Example:

In the original version of the code the `dast` module contains a function called `method_invocation`. It is used in another function called `visit_expr`. `visit_expr` is called by `JSONWriter` in `get_cond` and `visit_switch_node` instance methods.

If a developer wanted to add extra logic for cases when `JSONWriter` detects a method invocation (e.g. to dynamically log callers), the procedure would be very complicated:

1. Use some form of monkey patching to modify the `method_invocation` and `visit_expr` functions.
2. Override `get_cond` and `visit_switch_node` methods in a way that ensures the new versions of `method_invocation` and `visit_expr` are called.

If `method_invocation` is a method inside `JSONWriter`, the procedure is much simpler - the developer only needs to override `method_invocation`.
2024-09-21 16:36:00 +03:00
erev0s
541c27390b
Merge pull request #1078 from androguard/empty_element_name
Empty element name
2024-09-21 16:07:49 +03:00
erev0s
d7b6f6d6fc missing permissions -> info log 2024-09-21 16:03:53 +03:00
erev0s
4355165d8a fix case with empty element name 2024-09-21 16:02:29 +03:00
erev0s
a458772eac
Merge pull request #1076 from androguard/oscrypto
removed oscrypto
2024-09-20 22:02:24 +03:00
erev0s
16a6bd2194 removed oscrypto 2024-09-20 21:50:29 +03:00
erev0s
dd2a99c45f
Merge pull request #1074 from loskutov/patch-1
axml: fix IndexError in getAttributeName
2024-09-14 16:14:23 +03:00
Ignat Loskutov
771672e12a
axml: fix IndexError 2024-09-14 14:37:19 +02:00
erev0s
ca11a39eb6
Merge pull request #1063 from mrexodia/custom-session
Allow a custom db_url in Session
2024-09-10 17:20:28 +03:00
ping2A
a3ac2e7a89
Update README.md 2024-09-06 22:32:52 +02:00
erev0s
390e8e95ef
Merge pull request #1071 from androguard/1067_1069
fix issues 1067 and 1069
2024-08-17 10:39:41 +03:00
erev0s
c6485bf4ad fix issues 1067 and 1069 2024-08-17 10:26:13 +03:00
ping2A
ba16da0c04
Create FUNDING.yml 2024-07-17 10:33:55 +02:00
Duncan Ogilvie
c03da52079 Allow a custom db_url in Session 2024-06-05 13:30:10 +02:00
erev0s
b8ec68bf2e
Merge pull request #1061 from androguard/arm-mac
added mac arm64 test workflow
2024-06-04 21:42:35 +03:00
erev0s
0dc0463b7b added mac arm64 test workflow 2024-06-04 21:36:14 +03:00
erev0s
ac14430041
Merge pull request #1055 from RuffaloLavoisier/typo
Fix some typo
2024-06-02 23:11:37 +03:00
erev0s
84a8239566
Merge pull request #1056 from danielgf3/fix-invalid-nsmap
Fix invalid nsmap
2024-06-02 22:54:52 +03:00
erev0s
f5eae03f8b
Merge pull request #1053 from danielgf3/read-tags-in-non-abbreviated-form
Read tags with android namespace
2024-06-02 22:50:24 +03:00
erev0s
f7011f7b24 log error 2024-06-02 22:49:38 +03:00
erev0s
26aaa01ecb update tests to be sorted 2024-06-02 22:45:38 +03:00
Daniel Garcia
f3fd19e761 little change 2024-05-31 09:51:31 +00:00
Daniel Garcia
fdc93a5e84 Fix invalid nsmap 2024-05-31 09:36:22 +00:00
Ruffalo Lavoisier
e31c3265c8 Fix some typo 2024-05-31 18:21:16 +09:00
Hallucino
6b22031c7f
Update README.md 2024-05-31 08:33:52 +02:00
erev0s
d5add84aae
Merge pull request #1054 from androguard/pyqt
Pyqt
2024-05-31 08:24:09 +03:00
erev0s
0501a1fb24 update version 2024-05-31 08:19:35 +03:00
erev0s
5e8f104f2e removed pyqt5 dependency and added to show up only when callgraph 'show' is used 2024-05-31 08:15:37 +03:00
Daniel Garcia
1d44d25efb read tags with android namespace 2024-05-30 08:28:23 +00:00
erev0s
ad315612eb
Merge pull request #1049 from androguard/sign
Sign
2024-05-16 09:37:15 +03:00
erev0s
a10d4e542c warn users when multiple certs are found for V1 2024-05-16 09:30:22 +03:00
erev0s
8eff308cd0 return the first V2 signature block 2024-05-15 22:50:26 +03:00
erev0s
2e3eaca88d
Merge pull request #1047 from androguard/protection_level
protection level for custom permissions #1046
2024-05-15 07:50:26 +03:00
erev0s
1bd82d4ce5 protection level for custom permissions #1046 2024-05-14 23:11:50 +03:00
erev0s
597d8c8be3
Merge pull request #1037 from Forgo7ten/master
Add locale option to get_app_name() method.
2024-05-07 18:09:56 +03:00
erev0s
c72e8f8ddc
Merge branch 'master' into master 2024-05-07 18:05:35 +03:00
erev0s
6539218fcc conflict resolution and update of get_app_name signature 2024-05-07 18:01:48 +03:00
erev0s
ef5d45efd5
Merge pull request #1044 from androguard/decode_past_file_length
reject decoding strings that are passing the string block in size
2024-04-29 10:29:04 +03:00
erev0s
04e45e2fe0 reject decoding strings that are passing the string block in size 2024-04-29 10:23:46 +03:00
Branden Ehrenreich
319c398768
Apply type annotations (#1042)
* progress on typing

* finish typing analysis.py

* progress on typing dex/__init__.py

* finish pass at dex.__init__.py typing

* more types

* more typing, and fix circular imports using 'if TYPE_CHECKING' checking

* begin to change Generator->Iterator for typing, begin to returns that are type|None to Union[type,None] since that convention started in Python3.10 and Androguard supports 3.9+, and note current circular import issue.

* type|None only works in Python3.10+, which is too high of an assumption for Androguard..change these to Union[type,None]

* withoffset->with_offset

* fix circular import issue due to adding imports for typing

* types for permission loading

* apply type hints to bytecode module

* convert | to Union for further backwards compatibility, progress towards typing axml

* finish typing axml

* order imports, standardize type|None -> Union[type,None]

* fix type for get_certificate_name_string param

* explicitly import Name for typing

* standardize type|None -> Union[type,None]

* type annotate main

* fix some inaccurate hints

* type hint fixes

* add imports for typing

* remove unused import

* remove explicit dependence on typing_extensions, as we can do self-referencing type hints using 'from __future__ import annotations'..however note that typing_extensions is still installed by some underlying package.
2024-04-28 09:40:27 +03:00
erev0s
ceefbcb081
Merge pull request #1029 from Mrbenoit624/fix_ressourceID_parsingv2
Correct attribute name to be the same used by Android
2024-04-27 15:18:52 +03:00
erev0s
bc6490c180
Merge pull request #1040 from olokos/fix-sign-pubkey-finger
androsign: Fix #1031 & #764 - use oscrypto to load public_key instead…
2024-04-27 11:15:23 +03:00
erev0s
4df9aed6e9
Update pyproject.toml 2024-04-27 10:56:43 +03:00
olokos
be77adf9c8 androsign: Fix #1031 & #764 - use oscrypto to load public_key instead of asn1crypto
This commit replaces the outdated:
    asn1crypto.keys.PublicKeyInfo().fingerprint call

With the new:
    oscrypto.asymmetric.PublicKey().fingerprint call

ValueError/ve is properly excepted and when printed, it shows "Only DSA keys are generated using a hash algorithm, this key is RSA" for RSA signed apk's.

This commit satisfies the:
`asn1crypto._errors.APIException: asn1crypto.keys.PublicKeyInfo().fingerprint has been removed, please use oscrypto.asymmetric.PublicKey().fingerprint instead`
while still keeping the original behavior.
2024-04-22 14:03:05 +02:00
Forgo7ten
33c99a1695 Add locale option to get_app_name() method. 2024-04-19 20:25:37 +08:00
erev0s
72e29adf9f
Merge pull request #1035 from ehrenb/get-short-string
Use get_encoded_methods() when decompiling
2024-04-16 21:54:22 +03:00
ehrenb
0095d796e6 add simple test for decompile command 2024-04-14 19:43:05 -04:00
ehrenb
1cfa24a1c8 use new get_encoded_methods() method that explicitly returns EncodedMethods instead of MethodIds, test decompile format options and create a more verbose error when GraphViz is not installed and the 'png' or 'jpg' formats are specified 2024-04-14 19:29:51 -04:00