Commit Graph

2395 Commits

Author SHA1 Message Date
ping2A
fca5f2eff5 Fix crypto js and add the automatic tracing in the db 2024-11-20 09:14:56 +01:00
ping2A
f8daa928e3 Format all python files with black + isort 2024-11-05 11:00:52 +01:00
ping2A
8847ef1be9
Merge pull request #1050 from androguard/sign
V1 return correct cert if multiple
2024-11-05 10:54:47 +01:00
ping2A
a0f62e31ba
Merge pull request #1087 from androguard/compactResources
Compact resources
2024-11-05 10:53:13 +01:00
erev0s
38081ef5a4 update canonical 2024-11-04 11:55:38 +02:00
erev0s
e5ac978c59 update path for test 2024-11-02 17:58:17 +02:00
erev0s
9b7c1a4248 added apk for test 2024-11-02 17:51:23 +02:00
erev0s
60ac4ec091 properly cover compact entries with test 2024-11-02 17:51:18 +02:00
erev0s
43552374bf first attempt to introduce compact flag for ResTable_entry and FLAG_OFFSET16 for ResTable_type 2024-11-02 17:51:10 +02:00
erev0s
ca26897594 Revert "Fix syntax + dynamic part"
This reverts commit e73ee65fc9.
2024-11-02 17:25:54 +02:00
Ping2A
e73ee65fc9 Fix syntax + dynamic part 2024-10-31 15:50:52 +01:00
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
erev0s
c2f6cd9bbc
Merge branch 'master' into sign 2024-09-23 09:02:34 +03:00
erev0s
7d36216084 update to remove oscrypto 2024-09-23 08:59:10 +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
erev0s
c52bb41b81 updates 2024-07-08 18:04:17 +03:00
erev0s
e605e342a8 update to use canonical also for the signerInfo 2024-07-06 22:28:06 +03:00
erev0s
6bb50110b6 using canonical from Fay :D 2024-07-06 22:15:44 +03:00
erev0s
12b26dd18d whitespace normalied and using NFKD for issuer name 2024-06-26 22:18:08 +03: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
a07c5a17c2 Merge branch 'sign' of github.com:androguard/androguard into sign 2024-06-04 17:08:39 +03:00
erev0s
e912f77ccc update on get_certificates_v1 and exception errors 2024-06-04 17:07:21 +03:00
erev0s
029d264d0e
Merge branch 'master' into sign 2024-06-03 22:38:29 +03:00
erev0s
1c28aa4095 raise errors when the validation should stop and other updates 2024-06-03 22:33:56 +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