Skip to content

Commit

Permalink
Merge pull request #60 from den4uk/dev
Browse files Browse the repository at this point in the history
support for py10
  • Loading branch information
den4uk authored Apr 30, 2022
2 parents ea40fc1 + e115608 commit 94b6a39
Show file tree
Hide file tree
Showing 12 changed files with 245 additions and 61 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/python-package-test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ jobs:

strategy:
matrix:
python-version: ["3.6", "3.7", "3.8", "3.9"]
python-version: ["3.6", "3.7", "3.8", "3.9", "3.10"]

steps:
- uses: actions/checkout@v2
Expand Down
169 changes: 158 additions & 11 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,17 +1,164 @@
### Python ###

# Byte-compiled / optimized / DLL files
__pycache__/
*.py[cod]
*$py.class

# C extensions
*.so

# Distribution / packaging
.Python
build/
develop-eggs/
dist/
env*/
*.egg-info
*.py[coxd]
*.log
.DS_Store
downloads/
eggs/
.eggs/
lib/
lib64/
parts/
sdist/
var/
wheels/
share/python-wheels/
*.egg-info/
.installed.cfg
*.egg
MANIFEST

# PyInstaller
# Usually these files are written by a python script from a template
# before PyInstaller builds the exe, so as to inject date/other infos into it.
*.manifest
*.spec

# Installer logs
pip-log.txt
pip-delete-this-directory.txt

# Unit test / coverage reports
htmlcov/
.tox/
.nox/
.coverage
.coverage.*
.cache
nosetests.xml
coverage.xml
*.cover
*.py,cover
.hypothesis/
.pytest_cache/
cover/

# Translations
*.mo
*.pot

# Django stuff:
*.log
local_settings.py
db.sqlite3
db.sqlite3-journal

# Flask stuff:
instance/
.webassets-cache

# Scrapy stuff:
.scrapy

# Sphinx documentation
docs/_build/

# PyBuilder
.pybuilder/
target/

# Jupyter Notebook
.ipynb_checkpoints

# IPython
profile_default/
ipython_config.py

# pyenv
# For a library or package, you might want to ignore these files since the code is
# intended to run in multiple environments; otherwise, check them in:
# .python-version

# pipenv
# According to pypa/pipenv#598, it is recommended to include Pipfile.lock in version control.
# However, in case of collaboration, if having platform-specific dependencies or dependencies
# having no cross-platform support, pipenv may install dependencies that don't work, or not
# install all needed dependencies.
#Pipfile.lock

# poetry
# Similar to Pipfile.lock, it is generally recommended to include poetry.lock in version control.
# This is especially recommended for binary packages to ensure reproducibility, and is more
# commonly ignored for libraries.
# https://python-poetry.org/docs/basic-usage/#commit-your-poetrylock-file-to-version-control
#poetry.lock

# pdm
# Similar to Pipfile.lock, it is generally recommended to include pdm.lock in version control.
#pdm.lock
# pdm stores project-wide configurations in .pdm.toml, but it is recommended to not include it
# in version control.
# https://pdm.fming.dev/#use-with-ide
.pdm.toml

# PEP 582; used by e.g. github.com/David-OConnor/pyflow and github.com/pdm-project/pdm
__pypackages__/

# Celery stuff
celerybeat-schedule
celerybeat.pid

# SageMath parsed files
*.sage.py

# Environments
.env
.venv
env/
venv/
ENV/
env.bak/
venv.bak/

# Spyder project settings
.spyderproject
.spyproject

# Rope project settings
.ropeproject

# mkdocs documentation
/site

# mypy
.mypy_cache/
.dmypy.json
dmypy.json

# Pyre type checker
.pyre/

# pytype static type analyzer
.pytype/
.coverage*
htmlcov/
.pytest_cache
.vscode
.idea
*.code-workspace

# Cython debug symbols
cython_debug/

# PyCharm
# JetBrains specific template is maintained in a separate JetBrains.gitignore that can
# be found at https://github.com/github/gitignore/blob/main/Global/JetBrains.gitignore
# and can be added to the global gitignore or merged into this file. For a more nuclear
# option (not recommended) you can uncomment the following to ignore the entire idea folder.
#.idea/

tests_live/
5 changes: 5 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,11 @@
CHANGELOG
===

### 3.6.3 (2022-04-30)

- Support for Python 3.10


### 3.6.2 (2022-04-29)

- Dependency pins for Jinja2 and MarkupSafe
Expand Down
2 changes: 1 addition & 1 deletion LICENSE
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
MIT License

Copyright (c) 2012-2020 Denis Sazonov
Copyright (c) 2012-2022 Denis Sazonov

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ Andriller - is software utility with a collection of forensic tools for smartpho


## Python Requirements
- 3.6-3.9 (64-bit version recommended)
- 3.6-3.10 (64-bit version recommended)

> It is highly advised to setup a virtual environment to install Andriller and its dependencies in it. However, it is not essential, and the global environment can also be used. Depending on how Python was setup, it may be needed to substitute `python` and `pip` to `python3` and `pip3` retrospectively for the instructions below.
Expand Down
46 changes: 33 additions & 13 deletions andriller/__init__.py
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
__version__ = '3.6.2'
__app_name__ = 'Andriller CE'
__package_name__ = 'andriller'
__version__ = "3.6.3"
__app_name__ = "Andriller CE"
__package_name__ = "andriller"
__website__ = "https://github.com/den4uk/andriller"
__license__ = 'MIT'
__all__ = ['gui']
__license__ = "MIT"
__all__ = ["gui"]

import os
import logging
Expand All @@ -13,11 +13,29 @@

def run():
import argparse
parser = argparse.ArgumentParser(description='Andriller execution with CLI options.')
parser.add_argument("-d", "--debug", dest='debug', action='store_true', help="Run with log level set to debug.")
parser.add_argument("-f", "--file", help="Save log to a file, use with --debug flag.")
parser.add_argument("--nothread", dest='nothread', action='store_true', help="Disable threading on GUI.")
parser.add_argument("-v", "--version", dest='version', action='store_true', help="Show the version.")

parser = argparse.ArgumentParser(
description="Andriller execution with CLI options."
)
parser.add_argument(
"-d",
"--debug",
dest="debug",
action="store_true",
help="Run with log level set to debug.",
)
parser.add_argument(
"-f", "--file", help="Save log to a file, use with --debug flag."
)
parser.add_argument(
"--nothread",
dest="nothread",
action="store_true",
help="Disable threading on GUI.",
)
parser.add_argument(
"-v", "--version", dest="version", action="store_true", help="Show the version."
)
parser.set_defaults(debug=False, file=None, version=None)
args = parser.parse_args()
# Set logging level
Expand All @@ -26,21 +44,23 @@ def run():
# Print version
if args.version:
import sys

print(__version__)
sys.exit(0)

# Log to file
if args.file:
logging.basicConfig(filename=args.file, filemode='a', level=level)
logging.basicConfig(filename=args.file, filemode="a", level=level)

# No thread
if args.nothread:
os.environ['NOTHREAD'] = '1'
os.environ["NOTHREAD"] = "1"

# Run main App
from .gui import windows

try:
root = windows.MainWindow(log_level=level)
root.mainloop()
except Exception:
logger.exception('Failed to execute a gui window.')
logger.exception("Failed to execute a gui window.")
43 changes: 26 additions & 17 deletions andriller/messages.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,25 +3,33 @@


def about_msg():
return messagebox.showinfo(f'\
About {__app_name__}', f"\
return messagebox.showinfo(
f"\
About {__app_name__}",
f"\
Version: {__version__}\n\
License: {__license__}\n\
Copyright \u00A9 2012-2021\n\
Website: {__website__}")
Copyright \u00A9 2012-2022\n\
Website: {__website__}",
)


def msg_do_backup():
return messagebox.showwarning('Extraction via Backup method', '\
return messagebox.showwarning(
"Extraction via Backup method",
'\
Attention!\n\
1. Unlock the screen;\n\
2. Tap on "Back up my data".\n\
Click OK to Continue\n\
(Extraction may take some time..)')
(Extraction may take some time..)',
)


def screen_guide():
return messagebox.showinfo('Usage Guide', '''
return messagebox.showinfo(
"Usage Guide",
"""
USAGE INSTRUCTIONS
- Works with Android versions 4.x and above.
- Connect a device via cable with USB debugging enabled.
Expand All @@ -33,33 +41,34 @@ def screen_guide():
- Custom comments can be added with each capture.
- Tick [Remember] to reuse last comment.
- Captures can be taken just by pressing <Enter>.
- Press [Report] to generate and open a HTML report.''')
- Press [Report] to generate and open a HTML report.""",
)


content_protect = "** Content Protection Enabled! **\nIt is not possible to capture this type of content."


GUIDE_WA = '''
GUIDE_WA = """
This utility will decode multiple WhatsApp databases and produce combined messages on one report (without duplicates).
Use recovered and decrypted backup databases.
Instructions: Browse and select the folder with all "msgstore.db" (unencrypted and/or decrypted) databases.
'''
"""


def select_output():
return messagebox.showwarning(
'Error!',
"Select the 'Output' directory first!")
return messagebox.showwarning("Error!", "Select the 'Output' directory first!")


def device_not_detected():
return messagebox.showwarning(
'Device not detected!',
'- Is an Android device connected?\n- Is USB Debugging enabled?\n- Are device Drivers installed?\n- Did you accept the RSA fingerprint?')
"Device not detected!",
"- Is an Android device connected?\n- Is USB Debugging enabled?\n- Are device Drivers installed?\n- Did you accept the RSA fingerprint?",
)


def license_applied(exp):
return messagebox.showinfo(
'License update',
f'License code successfully written!\nExpiry date:{exp}\nPlease restart Andriller.')
"License update",
f"License code successfully written!\nExpiry date:{exp}\nPlease restart Andriller.",
)
1 change: 0 additions & 1 deletion requirements-dev.txt
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
-r requirements.txt
-e .
flake8
pytest-cov
pytest-mock
Expand Down
2 changes: 1 addition & 1 deletion requirements.txt
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ python-dateutil
XlsxWriter
Jinja2>=2.11.3,<3
MarkupSafe==2.0.1
wrapt-timeout-decorator==1.3.1
wrapt-timeout-decorator==1.3.10
appdirs>=1.4.4,<2
requests
dataclasses>=0.8;python_version=="3.6"
2 changes: 1 addition & 1 deletion setup.cfg
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[bumpversion]
commit = True
current_version = 3.6.1
current_version = 3.6.3
files = andriller/__init__.py
tag = True
tag_name = {new_version}
Expand Down
Loading

0 comments on commit 94b6a39

Please sign in to comment.