mirror of
https://github.com/mvt-project/mvt.git
synced 2024-06-26 14:28:54 +00:00
Removing unused imports, fixing conditions, new lines
This commit is contained in:
parent
f63cb585b2
commit
3084876f31
|
@ -199,6 +199,7 @@ def check_backup(ctx, iocs, output, backup_path, serial):
|
||||||
|
|
||||||
run_module(m)
|
run_module(m)
|
||||||
|
|
||||||
|
|
||||||
#==============================================================================
|
#==============================================================================
|
||||||
# Command: download-iocs
|
# Command: download-iocs
|
||||||
#==============================================================================
|
#==============================================================================
|
||||||
|
|
|
@ -4,11 +4,10 @@
|
||||||
# https://license.mvt.re/1.1/
|
# https://license.mvt.re/1.1/
|
||||||
|
|
||||||
import logging
|
import logging
|
||||||
import os
|
|
||||||
import stat
|
import stat
|
||||||
import datetime
|
import datetime
|
||||||
|
|
||||||
from mvt.common.utils import check_for_links, convert_timestamp_to_iso
|
from mvt.common.utils import convert_timestamp_to_iso
|
||||||
|
|
||||||
from .base import AndroidExtraction
|
from .base import AndroidExtraction
|
||||||
|
|
||||||
|
@ -31,8 +30,8 @@ class Files(AndroidExtraction):
|
||||||
# Run find command with correct args and parse results.
|
# Run find command with correct args and parse results.
|
||||||
|
|
||||||
# Check that full file printf options are suppported on first run.
|
# Check that full file printf options are suppported on first run.
|
||||||
if self.full_find == None:
|
if self.full_find is None:
|
||||||
output = self._adb_command(f"find '/' -maxdepth 1 -printf '%T@ %m %s %u %g %p\n' 2> /dev/null")
|
output = self._adb_command("find '/' -maxdepth 1 -printf '%T@ %m %s %u %g %p\n' 2> /dev/null")
|
||||||
if not (output or output.strip().splitlines()):
|
if not (output or output.strip().splitlines()):
|
||||||
# Full find command failed to generate output, fallback to basic file arguments
|
# Full find command failed to generate output, fallback to basic file arguments
|
||||||
self.full_find = False
|
self.full_find = False
|
||||||
|
@ -40,7 +39,7 @@ class Files(AndroidExtraction):
|
||||||
self.full_find = True
|
self.full_find = True
|
||||||
|
|
||||||
found_files = []
|
found_files = []
|
||||||
if self.full_find == True:
|
if self.full_find is True:
|
||||||
# Run full file command and collect additonal file information.
|
# Run full file command and collect additonal file information.
|
||||||
output = self._adb_command(f"find '{file_path}' -printf '%T@ %m %s %u %g %p\n' 2> /dev/null")
|
output = self._adb_command(f"find '{file_path}' -printf '%T@ %m %s %u %g %p\n' 2> /dev/null")
|
||||||
for file_line in output.splitlines():
|
for file_line in output.splitlines():
|
||||||
|
|
|
@ -5,7 +5,6 @@
|
||||||
|
|
||||||
import logging
|
import logging
|
||||||
import os
|
import os
|
||||||
import io
|
|
||||||
|
|
||||||
import click
|
import click
|
||||||
from rich.logging import RichHandler
|
from rich.logging import RichHandler
|
||||||
|
@ -295,6 +294,7 @@ def check_iocs(ctx, iocs, list_modules, module, folder):
|
||||||
except NotImplementedError:
|
except NotImplementedError:
|
||||||
continue
|
continue
|
||||||
|
|
||||||
|
|
||||||
#==============================================================================
|
#==============================================================================
|
||||||
# Command: download-iocs
|
# Command: download-iocs
|
||||||
#==============================================================================
|
#==============================================================================
|
||||||
|
|
|
@ -70,7 +70,7 @@ class ConfigurationProfiles(IOSExtraction):
|
||||||
with open(conf_file_path, "rb") as handle:
|
with open(conf_file_path, "rb") as handle:
|
||||||
try:
|
try:
|
||||||
conf_plist = plistlib.load(handle)
|
conf_plist = plistlib.load(handle)
|
||||||
except:
|
except Exception:
|
||||||
conf_plist = {}
|
conf_plist = {}
|
||||||
|
|
||||||
if "SignerCerts" in conf_plist:
|
if "SignerCerts" in conf_plist:
|
||||||
|
|
Loading…
Reference in New Issue
Block a user