quark.core.interface package¶
Submodules¶
quark.core.interface.baseapkinfo module¶
-
class
quark.core.interface.baseapkinfo.
BaseApkinfo
(apk_filepath: Union[str, os.PathLike], core_library: str = 'None')¶ Bases:
object
-
activities
¶ Return all activity from given APK.
Returns: a list of all activities
-
all_methods
¶ Return all methods including Android native API and custom methods from given APK.
Returns: a set of all method MethodObject
-
android_apis
¶ Return all Android native APIs from given APK.
Returns: a set of all Android native APIs MethodObject
-
apk_filename
¶
-
apk_filepath
¶
-
application
¶ Get the application element from the manifest file.
Returns: an application element
-
core_library
¶
-
custom_methods
¶ Return all custom methods from given APK.
Returns: a set of all custom methods MethodObject
-
filename
¶ Return the filename of apk.
Returns: a string of apk filename
-
filesize
¶ Return the file size of apk file by bytes.
Returns: a number of size bytes
-
find_method
(class_name: Optional[str] = '.*', method_name: Optional[str] = '.*', descriptor: Optional[str] = '.*') → List[quark.core.struct.methodobject.MethodObject]¶ Find method from given class_name, method_name and the descriptor. default is find all method.
Parameters: - class_name – the class name of the Android API
- method_name – the method name of the Android API
- descriptor – the descriptor of the Android API
Returns: a list with MethodObjects
-
get_method_bytecode
(method_object: quark.core.struct.methodobject.MethodObject) → Set[quark.core.struct.methodobject.MethodObject]¶ Return the corresponding bytecode according to the given class name and method name.
Parameters: method_object – the MethodObject instance Returns: a generator of all bytecode instructions
-
get_strings
() → str¶
-
get_subclasses
¶
-
get_wrapper_smali
(parent_method: quark.core.struct.methodobject.MethodObject, first_method: quark.core.struct.methodobject.MethodObject, second_method: quark.core.struct.methodobject.MethodObject) → Dict[str, Union[quark.core.struct.bytecodeobject.BytecodeObject, str]]¶ Return the dict of two method smali code from given MethodObject instance, only for self-defined method. :param method_analysis: :return:
{ “first”: “invoke-virtual v5, Lcom/google/progress/Locate;->getLocation()Ljava/lang/String;”, “second”: “invoke-virtual v3, v0, v4, Lcom/google/progress/SMSHelper;->sendSms(Ljava/lang/String; Ljava/lang/String;)I” }
-
lowerfunc
(method_object: quark.core.struct.methodobject.MethodObject) → Set[quark.core.struct.methodobject.MethodObject]¶ Return the xref from method from given MethodObject instance.
Parameters: method_object – the MethodObject instance Returns: a set of all xref from functions
-
md5
¶ Return the md5 checksum of the apk file.
Returns: a string of md5 checksum of the apk file
-
permissions
¶ Return all permissions from given APK.
Returns: a list of all permissions
-
receivers
¶ Return all receivers from the given APK.
Returns: a list of all receivers
-
ret_type
¶
-
superclass_relationships
¶
-
upperfunc
(method_object: quark.core.struct.methodobject.MethodObject) → Set[quark.core.struct.methodobject.MethodObject]¶ Return the xref from method from given MethodObject instance.
Parameters: method_object – the MethodObject instance Returns: a set of all xref from functions
-