The following issues were found

mvt/android/lookups/virustotal.py
9 issues
Unable to import 'rich.console'
Error

Line: 9 Column: 1

              import logging

import requests
from rich.console import Console
from rich.progress import track
from rich.table import Table
from rich.text import Text

log = logging.getLogger(__name__)

            

Reported by Pylint.

Unable to import 'rich.progress'
Error

Line: 10 Column: 1

              
import requests
from rich.console import Console
from rich.progress import track
from rich.table import Table
from rich.text import Text

log = logging.getLogger(__name__)


            

Reported by Pylint.

Unable to import 'rich.table'
Error

Line: 11 Column: 1

              import requests
from rich.console import Console
from rich.progress import track
from rich.table import Table
from rich.text import Text

log = logging.getLogger(__name__)

def get_virustotal_report(hashes):

            

Reported by Pylint.

Unable to import 'rich.text'
Error

Line: 12 Column: 1

              from rich.console import Console
from rich.progress import track
from rich.table import Table
from rich.text import Text

log = logging.getLogger(__name__)

def get_virustotal_report(hashes):
    apikey = "233f22e200ca5822bd91103043ccac138b910db79f29af5616a9afe8b6f215ad"

            

Reported by Pylint.

Missing module docstring
Error

Line: 1 Column: 1

              # Mobile Verification Toolkit (MVT)
# Copyright (c) 2021 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 requests
from rich.console import Console

            

Reported by Pylint.

Missing function or method docstring
Error

Line: 16 Column: 1

              
log = logging.getLogger(__name__)

def get_virustotal_report(hashes):
    apikey = "233f22e200ca5822bd91103043ccac138b910db79f29af5616a9afe8b6f215ad"
    url = f"https://www.virustotal.com/partners/sysinternals/file-reports?apikey={apikey}"

    items = []
    for sha256 in hashes:

            

Reported by Pylint.

Unnecessary "else" after "return"
Error

Line: 32 Column: 5

                  headers = {"User-Agent": "VirusTotal", "Content-Type": "application/json"}
    res = requests.post(url, headers=headers, json=items)

    if res.status_code == 200:
        report = res.json()
        return report["data"]
    else:
        log.error("Unexpected response from VirusTotal: %s", res.status_code)
        return None

            

Reported by Pylint.

Missing function or method docstring
Error

Line: 39 Column: 1

                      log.error("Unexpected response from VirusTotal: %s", res.status_code)
        return None

def virustotal_lookup(packages):
    log.info("Looking up all extracted files on VirusTotal (www.virustotal.com)")

    unique_hashes = []
    for package in packages:
        for file in package.files:

            

Reported by Pylint.

Line too long (105/100)
Error

Line: 61 Column: 1

                              detections[entry["hash"]] = entry["detection_ratio"]

    batch = []
    for i in track(range(total_unique_hashes), description=f"Looking up {total_unique_hashes} files..."):
        file_hash = unique_hashes[i]
        batch.append(file_hash)
        if len(batch) == 25:
            virustotal_query(batch)
            batch = []

            

Reported by Pylint.

mvt/ios/modules/fs/net_netusage.py
9 issues
Attempted relative import beyond top-level package
Error

Line: 8 Column: 1

              
import sqlite3

from ..net_base import NetBase

NETUSAGE_ROOT_PATHS = [
    "private/var/networkd/netusage.sqlite",
    "private/var/networkd/db/netusage.sqlite"
]

            

Reported by Pylint.

Dangerous default value [] as argument
Error

Line: 19 Column: 5

                  """This class extracts data from netusage.sqlite and attempts to identify
    any suspicious processes if running on a full filesystem dump."""

    def __init__(self, file_path=None, base_folder=None, output_folder=None,
                 fast_mode=False, log=None, results=[]):
        super().__init__(file_path=file_path, base_folder=base_folder,
                         output_folder=output_folder, fast_mode=fast_mode,
                         log=log, results=results)


            

Reported by Pylint.

Attribute 'file_path' defined outside __init__
Error

Line: 27 Column: 13

              
    def run(self):
        for netusage_path in self._get_fs_files_from_patterns(NETUSAGE_ROOT_PATHS):
            self.file_path = netusage_path
            self.log.info("Found NetUsage database at path: %s", self.file_path)
            try:
                self._extract_net_data()
            except sqlite3.OperationalError as e:
                self.log.info("Skipping this NetUsage database because it seems empty or malformed: %s", e)

            

Reported by Pylint.

Missing module docstring
Error

Line: 1 Column: 1

              # Mobile Verification Toolkit (MVT)
# Copyright (c) 2021 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 sqlite3

from ..net_base import NetBase


            

Reported by Pylint.

Too few public methods (1/2)
Error

Line: 15 Column: 1

                  "private/var/networkd/db/netusage.sqlite"
]

class Netusage(NetBase):
    """This class extracts data from netusage.sqlite and attempts to identify
    any suspicious processes if running on a full filesystem dump."""

    def __init__(self, file_path=None, base_folder=None, output_folder=None,
                 fast_mode=False, log=None, results=[]):

            

Reported by Pylint.

Too many arguments (7/5)
Error

Line: 19 Column: 5

                  """This class extracts data from netusage.sqlite and attempts to identify
    any suspicious processes if running on a full filesystem dump."""

    def __init__(self, file_path=None, base_folder=None, output_folder=None,
                 fast_mode=False, log=None, results=[]):
        super().__init__(file_path=file_path, base_folder=base_folder,
                         output_folder=output_folder, fast_mode=fast_mode,
                         log=log, results=results)


            

Reported by Pylint.

Missing function or method docstring
Error

Line: 25 Column: 5

                                       output_folder=output_folder, fast_mode=fast_mode,
                         log=log, results=results)

    def run(self):
        for netusage_path in self._get_fs_files_from_patterns(NETUSAGE_ROOT_PATHS):
            self.file_path = netusage_path
            self.log.info("Found NetUsage database at path: %s", self.file_path)
            try:
                self._extract_net_data()

            

Reported by Pylint.

Variable name "e" doesn't conform to snake_case naming style
Error

Line: 31 Column: 13

                          self.log.info("Found NetUsage database at path: %s", self.file_path)
            try:
                self._extract_net_data()
            except sqlite3.OperationalError as e:
                self.log.info("Skipping this NetUsage database because it seems empty or malformed: %s", e)
                continue

        self._find_suspicious_processes()

            

Reported by Pylint.

Line too long (107/100)
Error

Line: 32 Column: 1

                          try:
                self._extract_net_data()
            except sqlite3.OperationalError as e:
                self.log.info("Skipping this NetUsage database because it seems empty or malformed: %s", e)
                continue

        self._find_suspicious_processes()

            

Reported by Pylint.

mvt/ios/modules/fs/__init__.py
9 issues
Unable to import '__init__.cache_files'
Error

Line: 6 Column: 1

              # Use of this software is governed by the MVT License 1.1 that can be found at
#   https://license.mvt.re/1.1/

from .cache_files import CacheFiles
from .filesystem import Filesystem
from .net_netusage import Netusage
from .safari_favicon import SafariFavicon
from .version_history import IOSVersionHistory
from .webkit_indexeddb import WebkitIndexedDB

            

Reported by Pylint.

Unable to import '__init__.filesystem'
Error

Line: 7 Column: 1

              #   https://license.mvt.re/1.1/

from .cache_files import CacheFiles
from .filesystem import Filesystem
from .net_netusage import Netusage
from .safari_favicon import SafariFavicon
from .version_history import IOSVersionHistory
from .webkit_indexeddb import WebkitIndexedDB
from .webkit_localstorage import WebkitLocalStorage

            

Reported by Pylint.

Unable to import '__init__.net_netusage'
Error

Line: 8 Column: 1

              
from .cache_files import CacheFiles
from .filesystem import Filesystem
from .net_netusage import Netusage
from .safari_favicon import SafariFavicon
from .version_history import IOSVersionHistory
from .webkit_indexeddb import WebkitIndexedDB
from .webkit_localstorage import WebkitLocalStorage
from .webkit_safariviewservice import WebkitSafariViewService

            

Reported by Pylint.

Unable to import '__init__.safari_favicon'
Error

Line: 9 Column: 1

              from .cache_files import CacheFiles
from .filesystem import Filesystem
from .net_netusage import Netusage
from .safari_favicon import SafariFavicon
from .version_history import IOSVersionHistory
from .webkit_indexeddb import WebkitIndexedDB
from .webkit_localstorage import WebkitLocalStorage
from .webkit_safariviewservice import WebkitSafariViewService


            

Reported by Pylint.

Unable to import '__init__.version_history'
Error

Line: 10 Column: 1

              from .filesystem import Filesystem
from .net_netusage import Netusage
from .safari_favicon import SafariFavicon
from .version_history import IOSVersionHistory
from .webkit_indexeddb import WebkitIndexedDB
from .webkit_localstorage import WebkitLocalStorage
from .webkit_safariviewservice import WebkitSafariViewService

FS_MODULES = [CacheFiles, Filesystem, Netusage, SafariFavicon, IOSVersionHistory,

            

Reported by Pylint.

Unable to import '__init__.webkit_indexeddb'
Error

Line: 11 Column: 1

              from .net_netusage import Netusage
from .safari_favicon import SafariFavicon
from .version_history import IOSVersionHistory
from .webkit_indexeddb import WebkitIndexedDB
from .webkit_localstorage import WebkitLocalStorage
from .webkit_safariviewservice import WebkitSafariViewService

FS_MODULES = [CacheFiles, Filesystem, Netusage, SafariFavicon, IOSVersionHistory,
              WebkitIndexedDB, WebkitLocalStorage, WebkitSafariViewService,]

            

Reported by Pylint.

Unable to import '__init__.webkit_localstorage'
Error

Line: 12 Column: 1

              from .safari_favicon import SafariFavicon
from .version_history import IOSVersionHistory
from .webkit_indexeddb import WebkitIndexedDB
from .webkit_localstorage import WebkitLocalStorage
from .webkit_safariviewservice import WebkitSafariViewService

FS_MODULES = [CacheFiles, Filesystem, Netusage, SafariFavicon, IOSVersionHistory,
              WebkitIndexedDB, WebkitLocalStorage, WebkitSafariViewService,]

            

Reported by Pylint.

Unable to import '__init__.webkit_safariviewservice'
Error

Line: 13 Column: 1

              from .version_history import IOSVersionHistory
from .webkit_indexeddb import WebkitIndexedDB
from .webkit_localstorage import WebkitLocalStorage
from .webkit_safariviewservice import WebkitSafariViewService

FS_MODULES = [CacheFiles, Filesystem, Netusage, SafariFavicon, IOSVersionHistory,
              WebkitIndexedDB, WebkitLocalStorage, WebkitSafariViewService,]

            

Reported by Pylint.

Missing module docstring
Error

Line: 1 Column: 1

              # Mobile Verification Toolkit (MVT)
# Copyright (c) 2021 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/

from .cache_files import CacheFiles
from .filesystem import Filesystem
from .net_netusage import Netusage
from .safari_favicon import SafariFavicon

            

Reported by Pylint.

mvt/android/modules/adb/dumpsys_batterystats.py
8 issues
Attempted relative import beyond top-level package
Error

Line: 9 Column: 1

              import logging
import os

from .base import AndroidExtraction

log = logging.getLogger(__name__)

class DumpsysBatterystats(AndroidExtraction):
    """This module extracts stats on battery consumption by processes."""

            

Reported by Pylint.

Dangerous default value [] as argument
Error

Line: 16 Column: 5

              class DumpsysBatterystats(AndroidExtraction):
    """This module extracts stats on battery consumption by processes."""

    def __init__(self, file_path=None, base_folder=None, output_folder=None,
                 serial=None, fast_mode=False, log=None, results=[]):
        super().__init__(file_path=file_path, base_folder=base_folder,
                         output_folder=output_folder, fast_mode=fast_mode,
                         log=log, results=results)


            

Reported by Pylint.

Redefining name 'log' from outer scope (line 11)
Error

Line: 17 Column: 48

                  """This module extracts stats on battery consumption by processes."""

    def __init__(self, file_path=None, base_folder=None, output_folder=None,
                 serial=None, fast_mode=False, log=None, results=[]):
        super().__init__(file_path=file_path, base_folder=base_folder,
                         output_folder=output_folder, fast_mode=fast_mode,
                         log=log, results=results)

    def run(self):

            

Reported by Pylint.

Unused argument 'serial'
Error

Line: 17 Column: 18

                  """This module extracts stats on battery consumption by processes."""

    def __init__(self, file_path=None, base_folder=None, output_folder=None,
                 serial=None, fast_mode=False, log=None, results=[]):
        super().__init__(file_path=file_path, base_folder=base_folder,
                         output_folder=output_folder, fast_mode=fast_mode,
                         log=log, results=results)

    def run(self):

            

Reported by Pylint.

Missing module docstring
Error

Line: 1 Column: 1

              # Mobile Verification Toolkit (MVT)
# Copyright (c) 2021 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 .base import AndroidExtraction

            

Reported by Pylint.

Too few public methods (1/2)
Error

Line: 13 Column: 1

              
log = logging.getLogger(__name__)

class DumpsysBatterystats(AndroidExtraction):
    """This module extracts stats on battery consumption by processes."""

    def __init__(self, file_path=None, base_folder=None, output_folder=None,
                 serial=None, fast_mode=False, log=None, results=[]):
        super().__init__(file_path=file_path, base_folder=base_folder,

            

Reported by Pylint.

Too many arguments (8/5)
Error

Line: 16 Column: 5

              class DumpsysBatterystats(AndroidExtraction):
    """This module extracts stats on battery consumption by processes."""

    def __init__(self, file_path=None, base_folder=None, output_folder=None,
                 serial=None, fast_mode=False, log=None, results=[]):
        super().__init__(file_path=file_path, base_folder=base_folder,
                         output_folder=output_folder, fast_mode=fast_mode,
                         log=log, results=results)


            

Reported by Pylint.

Missing function or method docstring
Error

Line: 22 Column: 5

                                       output_folder=output_folder, fast_mode=fast_mode,
                         log=log, results=results)

    def run(self):
        self._adb_connect()

        stats = self._adb_command("dumpsys batterystats")
        if self.output_folder:
            stats_path = os.path.join(self.output_folder,

            

Reported by Pylint.

mvt/ios/modules/mixed/sms.py
8 issues
Attempted relative import beyond top-level package
Error

Line: 12 Column: 1

              from mvt.common.utils import (check_for_links, convert_mactime_to_unix,
                              convert_timestamp_to_iso)

from ..base import IOSExtraction

SMS_BACKUP_IDS = [
    "3d0d7e5fb2ce288813306e4d4636395e047a3d28",
]
SMS_ROOT_PATHS = [

            

Reported by Pylint.

Dangerous default value [] as argument
Error

Line: 24 Column: 5

              class SMS(IOSExtraction):
    """This module extracts all SMS messages containing links."""

    def __init__(self, file_path=None, base_folder=None, output_folder=None,
                 fast_mode=False, log=None, results=[]):
        super().__init__(file_path=file_path, base_folder=base_folder,
                         output_folder=output_folder, fast_mode=fast_mode,
                         log=log, results=results)


            

Reported by Pylint.

Missing module docstring
Error

Line: 1 Column: 1

              # Mobile Verification Toolkit (MVT)
# Copyright (c) 2021 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 sqlite3
from base64 import b64encode

from mvt.common.utils import (check_for_links, convert_mactime_to_unix,

            

Reported by Pylint.

Too many arguments (7/5)
Error

Line: 24 Column: 5

              class SMS(IOSExtraction):
    """This module extracts all SMS messages containing links."""

    def __init__(self, file_path=None, base_folder=None, output_folder=None,
                 fast_mode=False, log=None, results=[]):
        super().__init__(file_path=file_path, base_folder=base_folder,
                         output_folder=output_folder, fast_mode=fast_mode,
                         log=log, results=results)


            

Reported by Pylint.

Missing function or method docstring
Error

Line: 30 Column: 5

                                       output_folder=output_folder, fast_mode=fast_mode,
                         log=log, results=results)

    def serialize(self, record):
        text = record["text"].replace("\n", "\\n")
        return {
            "timestamp": record["isodate"],
            "module": self.__class__.__name__,
            "event": "sms_received",

            

Reported by Pylint.

Line too long (123/100)
Error

Line: 36 Column: 1

                          "timestamp": record["isodate"],
            "module": self.__class__.__name__,
            "event": "sms_received",
            "data": f"{record['service']}: {record['guid']} \"{text}\" from {record['phone_number']} ({record['account']})"
        }

    def check_indicators(self):
        if not self.indicators:
            return

            

Reported by Pylint.

Missing function or method docstring
Error

Line: 39 Column: 5

                          "data": f"{record['service']}: {record['guid']} \"{text}\" from {record['phone_number']} ({record['account']})"
        }

    def check_indicators(self):
        if not self.indicators:
            return

        for message in self.results:
            message_links = check_for_links(message.get("text", ""))

            

Reported by Pylint.

Missing function or method docstring
Error

Line: 48 Column: 5

                          if self.indicators.check_domains(message_links):
                self.detected.append(message)

    def run(self):
        self._find_ios_database(backup_ids=SMS_BACKUP_IDS,
                                root_paths=SMS_ROOT_PATHS)
        self.log.info("Found SMS database at path: %s", self.file_path)

        conn = sqlite3.connect(self.file_path)

            

Reported by Pylint.

mvt/ios/modules/fs/version_history.py
8 issues
Attempted relative import beyond top-level package
Error

Line: 11 Column: 1

              
from mvt.common.utils import convert_timestamp_to_iso

from ..base import IOSExtraction

IOS_ANALYTICS_JOURNAL_PATHS = [
    "private/var/db/analyticsd/Analytics-Journal-*.ips",
]


            

Reported by Pylint.

Access to member 'results' before its definition line 47
Error

Line: 42 Column: 17

                              timestamp = datetime.datetime.strptime(log_line["timestamp"],
                                                       "%Y-%m-%d %H:%M:%S.%f %z")
                timestamp_utc = timestamp.astimezone(datetime.timezone.utc)
                self.results.append({
                    "isodate": convert_timestamp_to_iso(timestamp_utc),
                    "os_version": log_line["os_version"],
                })

        self.results = sorted(self.results, key=lambda entry: entry["isodate"])

            

Reported by Pylint.

Dangerous default value [] as argument
Error

Line: 20 Column: 5

              class IOSVersionHistory(IOSExtraction):
    """This module extracts iOS update history from Analytics Journal log files."""

    def __init__(self, file_path=None, base_folder=None, output_folder=None,
                 fast_mode=False, log=None, results=[]):
        super().__init__(file_path=file_path, base_folder=base_folder,
                         output_folder=output_folder, fast_mode=fast_mode,
                         log=log, results=results)


            

Reported by Pylint.

Attribute 'results' defined outside __init__
Error

Line: 47 Column: 9

                                  "os_version": log_line["os_version"],
                })

        self.results = sorted(self.results, key=lambda entry: entry["isodate"])

            

Reported by Pylint.

Missing module docstring
Error

Line: 1 Column: 1

              # Mobile Verification Toolkit (MVT)
# Copyright (c) 2021 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 datetime
import json

from mvt.common.utils import convert_timestamp_to_iso

            

Reported by Pylint.

Too many arguments (7/5)
Error

Line: 20 Column: 5

              class IOSVersionHistory(IOSExtraction):
    """This module extracts iOS update history from Analytics Journal log files."""

    def __init__(self, file_path=None, base_folder=None, output_folder=None,
                 fast_mode=False, log=None, results=[]):
        super().__init__(file_path=file_path, base_folder=base_folder,
                         output_folder=output_folder, fast_mode=fast_mode,
                         log=log, results=results)


            

Reported by Pylint.

Missing function or method docstring
Error

Line: 26 Column: 5

                                       output_folder=output_folder, fast_mode=fast_mode,
                         log=log, results=results)

    def serialize(self, record):
        return {
            "timestamp": record["isodate"],
            "module": self.__class__.__name__,
            "event": "ios_version",
            "data": f"Recorded iOS version {record['os_version']}",

            

Reported by Pylint.

Missing function or method docstring
Error

Line: 34 Column: 5

                          "data": f"Recorded iOS version {record['os_version']}",
        }

    def run(self):
        for found_path in self._get_fs_files_from_patterns(IOS_ANALYTICS_JOURNAL_PATHS):
            with open(found_path, "r") as analytics_log:
                log_line = json.loads(analytics_log.readline().strip())

                timestamp = datetime.datetime.strptime(log_line["timestamp"],

            

Reported by Pylint.

mvt/android/modules/adb/dumpsys_packages.py
8 issues
Attempted relative import beyond top-level package
Error

Line: 9 Column: 1

              import logging
import os

from .base import AndroidExtraction

log = logging.getLogger(__name__)

class DumpsysPackages(AndroidExtraction):
    """This module extracts stats on installed packages."""

            

Reported by Pylint.

Dangerous default value [] as argument
Error

Line: 16 Column: 5

              class DumpsysPackages(AndroidExtraction):
    """This module extracts stats on installed packages."""

    def __init__(self, file_path=None, base_folder=None, output_folder=None,
                 serial=None, fast_mode=False, log=None, results=[]):
        super().__init__(file_path=file_path, base_folder=base_folder,
                         output_folder=output_folder, fast_mode=fast_mode,
                         log=log, results=results)


            

Reported by Pylint.

Unused argument 'serial'
Error

Line: 17 Column: 18

                  """This module extracts stats on installed packages."""

    def __init__(self, file_path=None, base_folder=None, output_folder=None,
                 serial=None, fast_mode=False, log=None, results=[]):
        super().__init__(file_path=file_path, base_folder=base_folder,
                         output_folder=output_folder, fast_mode=fast_mode,
                         log=log, results=results)

    def run(self):

            

Reported by Pylint.

Redefining name 'log' from outer scope (line 11)
Error

Line: 17 Column: 48

                  """This module extracts stats on installed packages."""

    def __init__(self, file_path=None, base_folder=None, output_folder=None,
                 serial=None, fast_mode=False, log=None, results=[]):
        super().__init__(file_path=file_path, base_folder=base_folder,
                         output_folder=output_folder, fast_mode=fast_mode,
                         log=log, results=results)

    def run(self):

            

Reported by Pylint.

Missing module docstring
Error

Line: 1 Column: 1

              # Mobile Verification Toolkit (MVT)
# Copyright (c) 2021 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 .base import AndroidExtraction

            

Reported by Pylint.

Too few public methods (1/2)
Error

Line: 13 Column: 1

              
log = logging.getLogger(__name__)

class DumpsysPackages(AndroidExtraction):
    """This module extracts stats on installed packages."""

    def __init__(self, file_path=None, base_folder=None, output_folder=None,
                 serial=None, fast_mode=False, log=None, results=[]):
        super().__init__(file_path=file_path, base_folder=base_folder,

            

Reported by Pylint.

Too many arguments (8/5)
Error

Line: 16 Column: 5

              class DumpsysPackages(AndroidExtraction):
    """This module extracts stats on installed packages."""

    def __init__(self, file_path=None, base_folder=None, output_folder=None,
                 serial=None, fast_mode=False, log=None, results=[]):
        super().__init__(file_path=file_path, base_folder=base_folder,
                         output_folder=output_folder, fast_mode=fast_mode,
                         log=log, results=results)


            

Reported by Pylint.

Missing function or method docstring
Error

Line: 22 Column: 5

                                       output_folder=output_folder, fast_mode=fast_mode,
                         log=log, results=results)

    def run(self):
        self._adb_connect()

        output = self._adb_command("dumpsys package")
        if self.output_folder:
            packages_path = os.path.join(self.output_folder,

            

Reported by Pylint.

mvt/ios/modules/mixed/locationd.py
8 issues
Attempted relative import beyond top-level package
Error

Line: 10 Column: 1

              
from mvt.common.utils import convert_mactime_to_unix, convert_timestamp_to_iso

from ..base import IOSExtraction

LOCATIOND_BACKUP_IDS = [
    "a690d7769cce8904ca2b67320b107c8fe5f79412",
]
LOCATIOND_ROOT_PATHS = [

            

Reported by Pylint.

Dangerous default value [] as argument
Error

Line: 22 Column: 5

              class LocationdClients(IOSExtraction):
    """Extract information from apps who used geolocation"""

    def __init__(self, file_path=None, base_folder=None, output_folder=None,
                 fast_mode=False, log=None, results=[]):
        super().__init__(file_path=file_path, base_folder=base_folder,
                         output_folder=output_folder, fast_mode=fast_mode,
                         log=log, results=results)


            

Reported by Pylint.

Missing module docstring
Error

Line: 1 Column: 1

              # Mobile Verification Toolkit (MVT)
# Copyright (c) 2021 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 plistlib

from mvt.common.utils import convert_mactime_to_unix, convert_timestamp_to_iso


            

Reported by Pylint.

Too many arguments (7/5)
Error

Line: 22 Column: 5

              class LocationdClients(IOSExtraction):
    """Extract information from apps who used geolocation"""

    def __init__(self, file_path=None, base_folder=None, output_folder=None,
                 fast_mode=False, log=None, results=[]):
        super().__init__(file_path=file_path, base_folder=base_folder,
                         output_folder=output_folder, fast_mode=fast_mode,
                         log=log, results=results)


            

Reported by Pylint.

Missing function or method docstring
Error

Line: 40 Column: 5

                          "BeaconRegionTimeStopped",
        ]

    def serialize(self, record):
        records = []
        for ts in self.timestamps:
            if ts in record.keys():
                records.append({
                    "timestamp": record[ts],

            

Reported by Pylint.

Variable name "ts" doesn't conform to snake_case naming style
Error

Line: 42 Column: 13

              
    def serialize(self, record):
        records = []
        for ts in self.timestamps:
            if ts in record.keys():
                records.append({
                    "timestamp": record[ts],
                    "module": self.__class__.__name__,
                    "event": ts,

            

Reported by Pylint.

Missing function or method docstring
Error

Line: 53 Column: 5

              
        return records

    def run(self):
        self._find_ios_database(backup_ids=LOCATIOND_BACKUP_IDS,
                                root_paths=LOCATIOND_ROOT_PATHS)
        self.log.info("Found Locationd Clients plist at path: %s", self.file_path)

        with open(self.file_path, "rb") as handle:

            

Reported by Pylint.

Variable name "ts" doesn't conform to snake_case naming style
Error

Line: 65 Column: 21

                          if file_plist[app] is dict:
                result = file_plist[app]
                result["package"] = app
                for ts in self.timestamps:
                    if ts in result.keys():
                        result[ts] = convert_timestamp_to_iso(convert_mactime_to_unix(result[ts]))

                self.results.append(result)


            

Reported by Pylint.

mvt/android/modules/adb/rootbinaries.py
8 issues
Attempted relative import beyond top-level package
Error

Line: 11 Column: 1

              
import pkg_resources

from .base import AndroidExtraction

log = logging.getLogger(__name__)

class RootBinaries(AndroidExtraction):
    """This module extracts the list of installed packages."""

            

Reported by Pylint.

Dangerous default value [] as argument
Error

Line: 18 Column: 5

              class RootBinaries(AndroidExtraction):
    """This module extracts the list of installed packages."""

    def __init__(self, file_path=None, base_folder=None, output_folder=None,
                 serial=None, fast_mode=False, log=None, results=[]):
        super().__init__(file_path=file_path, base_folder=base_folder,
                         output_folder=output_folder, fast_mode=fast_mode,
                         log=log, results=results)


            

Reported by Pylint.

Unused argument 'serial'
Error

Line: 19 Column: 18

                  """This module extracts the list of installed packages."""

    def __init__(self, file_path=None, base_folder=None, output_folder=None,
                 serial=None, fast_mode=False, log=None, results=[]):
        super().__init__(file_path=file_path, base_folder=base_folder,
                         output_folder=output_folder, fast_mode=fast_mode,
                         log=log, results=results)

    def run(self):

            

Reported by Pylint.

Redefining name 'log' from outer scope (line 13)
Error

Line: 19 Column: 48

                  """This module extracts the list of installed packages."""

    def __init__(self, file_path=None, base_folder=None, output_folder=None,
                 serial=None, fast_mode=False, log=None, results=[]):
        super().__init__(file_path=file_path, base_folder=base_folder,
                         output_folder=output_folder, fast_mode=fast_mode,
                         log=log, results=results)

    def run(self):

            

Reported by Pylint.

Missing module docstring
Error

Line: 1 Column: 1

              # Mobile Verification Toolkit (MVT)
# Copyright (c) 2021 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

import pkg_resources

            

Reported by Pylint.

Too few public methods (1/2)
Error

Line: 15 Column: 1

              
log = logging.getLogger(__name__)

class RootBinaries(AndroidExtraction):
    """This module extracts the list of installed packages."""

    def __init__(self, file_path=None, base_folder=None, output_folder=None,
                 serial=None, fast_mode=False, log=None, results=[]):
        super().__init__(file_path=file_path, base_folder=base_folder,

            

Reported by Pylint.

Too many arguments (8/5)
Error

Line: 18 Column: 5

              class RootBinaries(AndroidExtraction):
    """This module extracts the list of installed packages."""

    def __init__(self, file_path=None, base_folder=None, output_folder=None,
                 serial=None, fast_mode=False, log=None, results=[]):
        super().__init__(file_path=file_path, base_folder=base_folder,
                         output_folder=output_folder, fast_mode=fast_mode,
                         log=log, results=results)


            

Reported by Pylint.

Missing function or method docstring
Error

Line: 24 Column: 5

                                       output_folder=output_folder, fast_mode=fast_mode,
                         log=log, results=results)

    def run(self):
        root_binaries_path = os.path.join("..", "..", "data", "root_binaries.txt")
        root_binaries_string = pkg_resources.resource_string(__name__, root_binaries_path)
        root_binaries = root_binaries_string.decode("utf-8").split("\n")

        self._adb_connect()

            

Reported by Pylint.

mvt/ios/modules/mixed/calls.py
8 issues
Attempted relative import beyond top-level package
Error

Line: 10 Column: 1

              
from mvt.common.utils import convert_mactime_to_unix, convert_timestamp_to_iso

from ..base import IOSExtraction

CALLS_BACKUP_IDS = [
    "5a4935c78a5255723f707230a451d79c540d2741",
]
CALLS_ROOT_PATHS = [

            

Reported by Pylint.

Dangerous default value [] as argument
Error

Line: 22 Column: 5

              class Calls(IOSExtraction):
    """This module extracts phone calls details"""

    def __init__(self, file_path=None, base_folder=None, output_folder=None,
                 fast_mode=False, log=None, results=[]):
        super().__init__(file_path=file_path, base_folder=base_folder,
                         output_folder=output_folder, fast_mode=fast_mode,
                         log=log, results=results)


            

Reported by Pylint.

Unused variable 'names'
Error

Line: 48 Column: 9

                              ZDATE, ZDURATION, ZLOCATION, ZADDRESS, ZSERVICE_PROVIDER
            FROM ZCALLRECORD;
        """)
        names = [description[0] for description in cur.description]

        for row in cur:
            self.results.append({
                "isodate": convert_timestamp_to_iso(convert_mactime_to_unix(row[0])),
                "duration": row[1],

            

Reported by Pylint.

Missing module docstring
Error

Line: 1 Column: 1

              # Mobile Verification Toolkit (MVT)
# Copyright (c) 2021 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 sqlite3

from mvt.common.utils import convert_mactime_to_unix, convert_timestamp_to_iso


            

Reported by Pylint.

Too many arguments (7/5)
Error

Line: 22 Column: 5

              class Calls(IOSExtraction):
    """This module extracts phone calls details"""

    def __init__(self, file_path=None, base_folder=None, output_folder=None,
                 fast_mode=False, log=None, results=[]):
        super().__init__(file_path=file_path, base_folder=base_folder,
                         output_folder=output_folder, fast_mode=fast_mode,
                         log=log, results=results)


            

Reported by Pylint.

Missing function or method docstring
Error

Line: 28 Column: 5

                                       output_folder=output_folder, fast_mode=fast_mode,
                         log=log, results=results)

    def serialize(self, record):
        return {
            "timestamp": record["isodate"],
            "module": self.__class__.__name__,
            "event": "call",
            "data": f"From {record['number']} using {record['provider']} during {record['duration']} seconds"

            

Reported by Pylint.

Line too long (109/100)
Error

Line: 33 Column: 1

                          "timestamp": record["isodate"],
            "module": self.__class__.__name__,
            "event": "call",
            "data": f"From {record['number']} using {record['provider']} during {record['duration']} seconds"
        }

    def run(self):
        self._find_ios_database(backup_ids=CALLS_BACKUP_IDS,
                                root_paths=CALLS_ROOT_PATHS)

            

Reported by Pylint.

Missing function or method docstring
Error

Line: 36 Column: 5

                          "data": f"From {record['number']} using {record['provider']} during {record['duration']} seconds"
        }

    def run(self):
        self._find_ios_database(backup_ids=CALLS_BACKUP_IDS,
                                root_paths=CALLS_ROOT_PATHS)
        self.log.info("Found Calls database at path: %s", self.file_path)

        conn = sqlite3.connect(self.file_path)

            

Reported by Pylint.