Skip to main content

File system scanner in Python

Project description

scanfs

This module scans the filesystem and provides custom hooks to handle each file type of your choice.

Installation

pip install scanfs

Example

import os
import subprocess
from scanfs.fsscanner import FileSystemScanner
from scanfs.fsscannerex import FSScannerException


def callback(fpath, node):
    try:
        path = os.path.join(fpath, node.name)
        completed_process = subprocess.run(
            ["checksec", "--format=json", "--file=" + str(path)],
            capture_output=True,
            check=True,
        )
        print(completed_process)
    except Exception as e:
        print("An exception occurred: " + str(e))


fss = FileSystemScanner("/usr/bin")
fss.checksec_on_elfs()

Developer

python -m build
twine upload dist/*

Ref: https://packaging.python.org/tutorials/packaging-projects/

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

scanfs-0.0.5.tar.gz (6.9 kB view hashes)

Uploaded Source

Built Distribution

scanfs-0.0.5-py3-none-any.whl (3.7 kB view hashes)

Uploaded Python 3

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page