mirror of
https://github.com/mvt-project/mvt.git
synced 2026-10-09 17:34:32 +02:00
Improves android backup parsing for check-backup and check-adb
This commit is contained in:
1 parent
cd0e7d9879
commit
8eb30e3a02
17 files changed
+357
-81
No files matched your search
@@ -0,0 +1,29 @@
|
||||
# Mobile Verification Toolkit (MVT)
|
||||
# Copyright (c) 2021-2022 The MVT Project Authors.
|
||||
# Use of this software is governed by the MVT License 1.1 that can be found at
|
||||
# https://license.mvt.re/1.1/
|
||||
|
||||
import logging
|
||||
import os
|
||||
|
||||
from mvt.android.modules.backup.sms import SMS
|
||||
from mvt.common.module import run_module
|
||||
|
||||
from ..utils import get_android_backup_folder
|
||||
|
||||
|
||||
class TestBackupModule:
|
||||
def test_module_folder(self):
|
||||
fpath = get_android_backup_folder()
|
||||
mod = SMS(base_folder=fpath, log=logging)
|
||||
run_module(mod)
|
||||
assert len(mod.results) == 1
|
||||
assert len(mod.results[0]["links"]) == 1
|
||||
assert mod.results[0]["links"][0] == "https://google.com/"
|
||||
|
||||
def test_module_file(self):
|
||||
fpath = os.path.join(get_android_backup_folder(), "backup.ab")
|
||||
mod = SMS(base_folder=fpath, log=logging)
|
||||
run_module(mod)
|
||||
assert len(mod.results) == 1
|
||||
assert len(mod.results[0]["links"]) == 1
|
||||
Reference in new issue
Block a user