Exemplo n.º 1
0
    def _patch_magic(self, buffer, orig):
        if ("Zip" in orig) or ("DBase" in orig):
            val = androconf.is_android_raw(buffer)
            if val == "APK":
                if androconf.is_valid_android_raw(buffer):
                    return "Android application package file"
            elif val == "AXML":
                return "Android's binary XML"

        return orig
Exemplo n.º 2
0
    def _patch_magic(self, buffer, orig) :
        if ("Zip" in orig) or ("DBase" in orig) :
            val = androconf.is_android_raw( buffer )
            if val == "APK" :
                if androconf.is_valid_android_raw( buffer ) :
                  return "Android application package file"
            elif val == "AXML" :
                return "Android's binary XML"

        return orig
Exemplo n.º 3
0
    def filter_file(self, log, fileraw):
        """
      This method is called in order to filer a specific app

      :param log: an object which corresponds to a unique app
      :param fileraw: the raw app (a string)

      :rtype: a set with 2 elements, the return value (boolean) if it is necessary to
      continue the analysis and the file type
    """
        file_type = androconf.is_android_raw(fileraw)
        if file_type == "APK" or file_type == "DEX" or file_type == "DEY" or file_type == "AXML" or file_type == "ARSC":
            if file_type == "APK":
                if androconf.is_valid_android_raw(fileraw):
                    return (True, "APK")
            else:
                return (True, file_type)
        return (False, None)
Exemplo n.º 4
0
  def filter_file(self, log, fileraw):
    """
      This method is called in order to filer a specific app

      :param log: an object which corresponds to a unique app
      :param fileraw: the raw app (a string)

      :rtype: a set with 2 elements, the return value (boolean) if it is necessary to
      continue the analysis and the file type
    """
    file_type = androconf.is_android_raw(fileraw)
    if file_type == "APK" or file_type == "DEX" or file_type == "DEY" or file_type == "AXML" or file_type == "ARSC":
      if file_type == "APK":
        if androconf.is_valid_android_raw(fileraw):
          return (True, "APK")
      else:
        return (True, file_type)
    return (False, None)