CertInfo class¶
-
class
glorifiedgrep.android.
CertInfo
(cert_path)¶ This class is used for analyzing the certificate that an application is signed with. All the methods from this class is available in
GlorifiedAndroid
class, but can also be used by itself by passing the path to the certificate.Examples
>>> from glorifiedgrep.android import CertInfo >>> cert = CertInfo('/path/to/cert)
-
__init__
(cert_path)¶ The __init__ method for the CertInfo class
Parameters: cert_path (str) – Path to the CERT.RSA file >>> c = CertInfo('/path/to/CERT.RSA') >>> c.cert_public_key
-
all_cert_analysis
()¶ Property runs all available checks in _CertAnalysis
Returns: Dictionary of all cert analysis Return type: dict >>> from glorifiedgrep import GlorifiedAndroid >>> a = GlorifiedAndroid('/path/to/apk') >>> a.all_manifest_analysis()
-
cert_bits
() → int¶ Certificate bit
Returns: Certificate bits Return type: int Examples
>>> from glorifiedgrep import GlorifiedAndroid >>> a = GlorifiedAndroid('/path/to/apk') >>> a.cert_bits()
-
cert_certificate
() → glorifiedgrep.out.GreppedOut¶ Returns a PEM encoded certificate
Returns: GreppedOut object Return type: GreppedOut Examples
>>> from glorifiedgrep import GlorifiedAndroid >>> a = GlorifiedAndroid('/path/to/apk') >>> a.cert_certificate()
-
cert_digest
() → dict¶ Returns the digest hash in md5. sha1 and sha256
Returns: Dictionary of hashes Return type: dict Examples
>>> from glorifiedgrep import GlorifiedAndroid >>> a = GlorifiedAndroid('/path/to/apk') >>> a.cert_digest()
-
cert_issuer
() → glorifiedgrep.out.GreppedOut¶ The entity that verified the information and signed the certificate
Returns: GreppedOut object Return type: GreppedOut Examples
>>> from glorifiedgrep import GlorifiedAndroid >>> a = GlorifiedAndroid('/path/to/apk') >>> a.cert_issuer()
-
cert_public_key
() → glorifiedgrep.out.GreppedOut¶ Get the public key from CERT.RSA
Returns: GreppedOut object Return type: GreppedOut Examples
>>> from glorifiedgrep import GlorifiedAndroid >>> a = GlorifiedAndroid('/path/to/apk') >>> a.cert_public_key()
-
cert_serial_number
() → int¶ Used to uniquely identify the certificate within a CA’s systems. In particular this is used to track revocation information
Returns: Certificate serial number Return type: int Examples
>>> from glorifiedgrep import GlorifiedAndroid >>> a = GlorifiedAndroid('/path/to/apk') >>> a.cert_serial_number()
-
cert_signature_algorithm
() → str¶ The algorithm used to sign the public key certificate
Returns: Algorithm used to create the certificate Return type: str Examples
>>> from glorifiedgrep import GlorifiedAndroid >>> a = GlorifiedAndroid('/path/to/apk') >>> a.cert_signature_algorithm()
-
cert_subject
() → list¶ The entity a certificate belongs to: a machine, an individual, or an organization.
Returns: Dict of certificate subjects CN, O, C, ST, L, OU, Cn Return type: dict Examples
>>> from glorifiedgrep import GlorifiedAndroid >>> a = GlorifiedAndroid('/path/to/apk') >>> a.cert_subject()
-
cert_valid_dates
() → dict¶ The that the certificate is valid before, after and if expired
Returns: Dict of dates and if exipred Return type: dict Examples
>>> from glorifiedgrep import GlorifiedAndroid >>> a = GlorifiedAndroid('/path/to/apk') >>> a.cert_valid_dates()
-
cert_version
() → int¶ The certificate version number
Returns: Version number of the certificate Return type: int Examples
>>> from glorifiedgrep import GlorifiedAndroid >>> a = GlorifiedAndroid('/path/to/apk') >>> a.cert_version()
-