plugins.android package¶
Submodules¶
plugins.android.whatsapp module¶
-
class
plugins.android.whatsapp.
WhatsAppAndroid
(config, section=None, local_config=None, from_module=None)¶ Bases:
base.job.BaseModule
Parse the WhatsApp Android database.
- Configuration section:
media_outdir: Save media to this directory. It is a python format string, with a parameter message_group message_group: If set, output only messages in this message group start_date: If set, output only messages from this date end_date: If set, output only messages until this date
-
execute_query
(chatstorage_file, cursor)¶ - Creates a custom view and executes a query based on the parameters:
message_group
start_date
end_date
Returns a cursor object
-
filter_query
(query)¶ Filter by dates and group
-
get_media_filename
(media_hash, message_type, media_name, message_group, key_id, media_thumbnail=None)¶ Get basename of media file related to message
-
parse_query
(line)¶ Parse the query and yields a dictionary
-
read_config
()¶ Read options from the configuration section.
This method should set default values for all available configuration options. The other module function will safely assume these options have correct values.
-
run
(path)¶ - Parameters
path (str) – Path to an unbacked backup
-
status_switcher
= {0: 'received', 4: 'waiting', 5: 'received at destination', 6: 'control message', 13: 'read'}¶
-
type_switcher
= {0: 'Text message', 1: 'Image', 2: 'Audio', 3: 'Video', 4: 'Contact', 5: 'Location', 7: 'Url', 8: 'Document', 10: 'Key change', 11: 'Video', 13: 'Video', 14: 'Deleted', 15: 'Image'}¶
-
class
plugins.android.whatsapp.
WhatsAppChatSessionsAndroid
(config, section=None, local_config=None, from_module=None)¶ Bases:
base.job.BaseModule
Returns all the available chat identifiers in a whatsapp database.
The returned dictionary have a field mesage_group.
-
run
(path=None)¶ Run the job on a path
- Parameters
path (str) – the path to check.
- Yields
If any, an iterable of elements with the output.
-
-
plugins.android.whatsapp.
get_contacts
(wa_db)¶ Associate phone numbers to names and groups to ids