Security News
Research
Data Theft Repackaged: A Case Study in Malicious Wrapper Packages on npm
The Socket Research Team breaks down a malicious wrapper package that uses obfuscation to harvest credentials and exfiltrate sensitive data.
Inotify Recursive is a Python package that offers a simple way to watch a directory-tree recursively for file changes via the inotify functionality of the Linux kernel. It uses the inotify_simple package to set and remove the inotify watches and also incorporates its whole functionality. The package is written in Python and licensed as open-source under the LGPL version 3.
At the moment the main purpose of Inotify Recursive is to provide the file watching functionality for Synoindex Watcher, a small tool that automatically updates the media index of Synology DiskStations.
This Python package is still an alpha! Its core functionality has been tested and is working, but there could still be undiscovered bugs. Also breaking interface changes are likely to happen, so it is not recommended to use it in production projects, yet.
The recommended installation method is via pip:
python -m pip install --upgrade inotifyrecursive
You can use the same command to upgrade Inotify Recursive from an older version.
This will also install its dependency inotify_simple.
Please read the docs for inotify_simple first, since the basic usage is the same.
The INotify
class of Inotify Recursive provides three additional methods, which are useful, if a directory shall be
watched recursively:
inotify.add_watch_recursive(path, mask, filter = None)
Returns the descriptor for the newly created watch of the directory where the given path points to. Unlike add_watch()
this function also creates watches for all sub-directories below it. The descriptors of the sub-watches are not
returned.
The filter function is optional. It takes the name of the file or directory and the descriptor of the watcher of the parent directory. The filter returns a boolean value, which describes whether the directory shall be watched (True
) or ignored (False
). If no filter is set, all files and sub-directories will be watched.
inotify.rm_watch_recursive(wd)
Removes the watch with the given descriptor and all associated sub-watches. Should be used for any watch that has been
created by add_watch_recursive()
.
inotify.get_path(wd)
Returns the absolute path of the directory associated to the watch with given descriptor.
Copyright 2019,2020 Torben Haase <https://pixelsvsbytes.com>
FAQs
Recursive inotify watches based on inotify_simple.
We found that inotifyrecursive demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Security News
Research
The Socket Research Team breaks down a malicious wrapper package that uses obfuscation to harvest credentials and exfiltrate sensitive data.
Research
Security News
Attackers used a malicious npm package typosquatting a popular ESLint plugin to steal sensitive data, execute commands, and exploit developer systems.
Security News
The Ultralytics' PyPI Package was compromised four times in one weekend through GitHub Actions cache poisoning and failure to rotate previously compromised API tokens.