Commit Graph

2340 Commits

Author SHA1 Message Date
Daniel Garcia
fdc93a5e84 Fix invalid nsmap 2024-05-31 09:36:22 +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
erev0s
7e07c12794
Merge pull request #1028 from ehrenb/pyqt5-qt5-fix
address pyqt5-qt5 inconsistencies by adding markers for MacOS ARM targets
2024-04-10 11:09:01 +03:00
MadSquirrel
293d85b29e Fix test case 2024-04-08 21:39:38 +02:00
MadSquirrel
db87703967 Correct attribute name to be the same used by Android 2024-04-08 08:32:50 +02:00
Branden Ehrenreich
f718737e9b
address pyqt5-qt5 inconsistencies by adding markers 2024-04-02 19:14:37 -04:00
erev0s
30fdb638e3
Merge pull request #1022 from subho007/patch-1
[bugfix] Remove spaces from nsmap
2024-03-27 18:05:44 +02:00
Subho Halder
d2aa4381ea
[bugfix] Remove spaces from nsmap
See more details in: https://github.com/appknox/pyaxmlparser/pull/64
2024-03-26 21:26:47 +05:30
erev0s
868af2b9e7
Merge pull request #1020 from androguard/fix_resources_1017
fix 1017 by checking the size for ARSCResTableConfig for anything abo…
2024-03-23 19:32:47 +02:00
erev0s
4187a64681 Merge remote-tracking branch 'origin/master' into fix_resources_1017 2024-03-23 19:29:49 +02:00
erev0s
294a0f9172
Merge pull request #1019 from ehrenb/master
fix https://github.com/androguard/androguard/issues/1018 by hard lock…
2024-03-23 19:19:48 +02:00
erev0s
7dee783960 fix 1017 by checking the size for ARSCResTableConfig for anything above the first 16 bytes 2024-03-23 19:16:00 +02:00
ehrenb
8e95bca53c fix https://github.com/androguard/androguard/issues/1018 by hard locking pyqt5-qt5 to last known version with linux/win/macos .whls 2024-03-23 13:04:35 -04:00
erev0s
f01be4168b
Merge pull request #1012 from Forgo7ten/master
fix 'set' object is not subscriptable error.
2024-03-17 21:49:02 +02:00
erev0s
23ad0b992d
Merge pull request #1016 from androguard/1014
Reserved values res0/res1 error
2024-03-15 00:24:04 +02:00
erev0s
d975f72b7a bump version 2024-03-15 00:18:50 +02:00
erev0s
6862bf00d0 Patch update based on https://github.com/androguard/androguard/issues/1014 2024-03-15 00:16:52 +02:00
erev0s
8e26eec255
Merge pull request #1013 from androguard/axml-update
supplementary for 1006
2024-03-11 23:35:29 +02:00
erev0s
05c02efd1a supplementary for 1006 2024-03-11 23:21:16 +02:00
Forgo7ten
f8c7972c68 fix 'set' object is not subscriptable. 2024-03-11 23:31:45 +08:00
erev0s
9f7a3c6a74
Merge pull request #1010 from ehrenb/refactor-analysis
Ensure all Fields and Strings get wrapped as FieldAnalysis and StringAnalysis respectivly when creating Analysis
2024-03-10 23:33:34 +02:00
erev0s
a5aaf75aba
Merge pull request #1011 from androguard/axml-update
fix for 1006
2024-03-10 23:33:14 +02:00
erev0s
e45e584137 fix for 1006 2024-03-10 23:28:27 +02:00
ehrenb
167ef191d8 fix comment 2024-03-09 20:19:48 -05:00
ehrenb
58ea8cfb9c Merge branch 'refactor-analysis' of github.com:ehrenb/androguard into refactor-analysis 2024-03-09 15:28:21 -05:00
ehrenb
126bac4605 ensure .show() works for MethodAnalysis that are External. Add logging when creating new ClassAnalysis instance. Similar to wrapping all fields into FieldAnalysis, also add and wrap all strings into StringAnalysis. Create explicit methods for getting internal/external methods. Updated expected outputs for test_analysis, as underlying implementations have changed 2024-03-09 15:27:51 -05:00
Branden Ehrenreich
e13c102555
Merge branch 'androguard:master' into refactor-analysis 2024-03-09 11:55:42 -05:00
erev0s
3ae3f44f8e
Merge pull request #1009 from backtohuman/master
fix 4-byte aligned padding
2024-03-08 23:46:01 +02:00
erev0s
aa2a63bf66
Merge pull request #1008 from Ch0pin/master
Added error handling for ResParserError
2024-03-08 23:39:18 +02:00
backtohuman
025aaa243c
Update __init__.py
fix 4-byte aligned padding
2024-03-08 18:29:38 +09:00
Ch0pin
187b912784 added error handling for "res1" and "res0" must be zero errors which caused aborting the parsing 2024-03-07 17:21:38 +00:00
ehrenb
8fdb6f939d update all tests to use explicit functions for encoded methods/fields. fix failing test mentioned in https://github.com/androguard/androguard/issues/989\#issuecomment-1925512272 so that it assumes testing for wrapped fields. make new tests for DEX-class level testing that tests counts of parsed values in the DEX header 2024-02-25 18:12:46 -05:00