Skip to content

Commit 60b2c31

Browse files
authored
Merge pull request #187 from rowingdude/debug-updates
Updated logging, validation, and general code aethetics.
2 parents bb70a4c + 913580d commit 60b2c31

20 files changed

+5248
-4554
lines changed

analyzeMFT.py

Lines changed: 22 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,22 @@
1-
#!/usr/bin/env python3
2-
import os
3-
import sys
4-
import asyncio
5-
from src.analyzeMFT.cli import mainsys.path.insert(0, os.path.abspath(os.path.join(os.path.dirname(__file__), 'src')))
6-
7-
if __name__ == "__main__":
8-
if sys.platform == "win32":
9-
asyncio.set_event_loop_policy(asyncio.WindowsSelectorEventLoopPolicy())
10-
asyncio.run(main())
1+
#!/usr/bin/env python3
2+
3+
import os
4+
import sys
5+
import asyncio
6+
7+
def setup_path():
8+
src_path = os.path.abspath(os.path.join(os.path.dirname(__file__), 'src'))
9+
if src_path not in sys.path:
10+
sys.path.insert(0, src_path)
11+
12+
def main():
13+
setup_path()
14+
from analyzeMFT.cli import main as cli_main
15+
16+
if sys.platform == "win32":
17+
asyncio.set_event_loop_policy(asyncio.WindowsSelectorEventLoopPolicy())
18+
19+
asyncio.run(cli_main())
20+
21+
if __name__ == "__main__":
22+
main()

setup.py

Lines changed: 40 additions & 40 deletions
Original file line numberDiff line numberDiff line change
@@ -1,41 +1,41 @@
1-
from setuptools import setup, find_packages
2-
3-
with open("README.md", "r", encoding="utf-8") as fh:
4-
long_description = fh.read()
5-
6-
setup(
7-
name='analyzeMFT',
8-
version='3.1.0',
9-
author='Benjamin Cance',
10-
author_email='[email protected]',
11-
package_dir={'': 'src'},
12-
packages=find_packages(where='src'),
13-
package_data={
14-
'analyzeMFT': ['sql/*.sql'],
15-
},
16-
url='http://github.com/rowingdude/analyzeMFT',
17-
license='LICENSE.txt',
18-
description='Analyze the $MFT from a NTFS filesystem.',
19-
long_description=long_description,
20-
long_description_content_type='text/markdown',
21-
classifiers=[
22-
"Development Status :: 3 - Alpha",
23-
"Intended Audience :: Developers",
24-
"License :: OSI Approved :: MIT License",
25-
"Operating System :: OS Independent",
26-
"Programming Language :: Python :: 3",
27-
"Programming Language :: Python :: 3.7",
28-
"Programming Language :: Python :: 3.8",
29-
"Programming Language :: Python :: 3.9",
30-
],
31-
python_requires=">=3.7",
32-
install_requires=[
33-
"pywin32;platform_system=='Windows'",
34-
"openpyxl==3.0.10",
35-
],
36-
entry_points={
37-
'console_scripts': [
38-
'analyzemft=analyzeMFT:main',
39-
],
40-
},
1+
from setuptools import setup, find_packages
2+
3+
with open("README.md", "r", encoding="utf-8") as fh:
4+
long_description = fh.read()
5+
6+
setup(
7+
name='analyzeMFT',
8+
version='3.1.0',
9+
author='Benjamin Cance',
10+
author_email='[email protected]',
11+
package_dir={'': 'src'},
12+
packages=find_packages(where='src'),
13+
package_data={
14+
'analyzeMFT': ['sql/*.sql'],
15+
},
16+
url='http://github.com/rowingdude/analyzeMFT',
17+
license='LICENSE.txt',
18+
description='Analyze the $MFT from a NTFS filesystem.',
19+
long_description=long_description,
20+
long_description_content_type='text/markdown',
21+
classifiers=[
22+
"Development Status :: 3 - Alpha",
23+
"Intended Audience :: Developers",
24+
"License :: OSI Approved :: MIT License",
25+
"Operating System :: OS Independent",
26+
"Programming Language :: Python :: 3",
27+
"Programming Language :: Python :: 3.7",
28+
"Programming Language :: Python :: 3.8",
29+
"Programming Language :: Python :: 3.9",
30+
],
31+
python_requires=">=3.7",
32+
install_requires=[
33+
"pywin32;platform_system=='Windows'",
34+
"openpyxl==3.0.10",
35+
],
36+
entry_points={
37+
'console_scripts': [
38+
'analyzemft=analyzeMFT:main',
39+
],
40+
},
4141
)

src/analyzeMFT/__init__.py

Lines changed: 21 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -1,22 +1,22 @@
1-
import asyncio
2-
from .windows_time import WindowsTime
3-
from .mft_record import MftRecord
4-
from .mft_analyzer import MftAnalyzer
5-
from .file_writers import FileWriters
6-
from .constants import VERSION, CSV_HEADER
7-
from .cli import main as cli_main
8-
9-
def main():
10-
asyncio.run(cli_main())
11-
12-
__all__ = [
13-
'WindowsTime',
14-
'MftRecord',
15-
'MftAnalyzer',
16-
'FileWriters',
17-
'VERSION',
18-
'CSV_HEADER',
19-
'main'
20-
]
21-
1+
import asyncio
2+
from .windows_time import WindowsTime
3+
from .mft_record import MftRecord
4+
from .mft_analyzer import MftAnalyzer
5+
from .file_writers import FileWriters
6+
from .constants import VERSION, CSV_HEADER
7+
from .cli import main as cli_main
8+
9+
def main():
10+
asyncio.run(cli_main())
11+
12+
__all__ = [
13+
'WindowsTime',
14+
'MftRecord',
15+
'MftAnalyzer',
16+
'FileWriters',
17+
'VERSION',
18+
'CSV_HEADER',
19+
'main'
20+
]
21+
2222
__version__ = VERSION

0 commit comments

Comments
 (0)