thekingofduck / filemonitor Goto Github PK
View Code? Open in Web Editor NEW文件变化实时监控工具(代码审计/黑盒/白盒审计辅助工具)
文件变化实时监控工具(代码审计/黑盒/白盒审计辅助工具)
环境:win10 +py2
报错如下:
[16:03:42]:Please enter a directory:E:\tools\xxxx\example
[16:03:54]:Unnecessary directory:"E:\tools\xxxx\example"
[16:03:58]:Display directory changes(y or n):y
[16:04:00]:FileMonitor is running...
[16:04:11]:file modified:E:\tools\xxxx\example\test.txt
[16:04:21]:file deleted:E:\tools\xxxxa\example\test.txt
Exception in thread Thread-1:
Traceback (most recent call last):
File "E:\Python\Python27\lib\threading.py", line 801, in __bootstrap_inner
self.run()
File "E:\Python\Python27\lib\site-packages\watchdog\observers\api.py", line 199, in run
self.dispatch_events(self.event_queue, self.timeout)
File "E:\Python\Python27\lib\site-packages\watchdog\observers\api.py", line 368, in dispatch_events
handler.dispatch(event)
File "E:\Python\Python27\lib\site-packages\watchdog\events.py", line 330, in dispatch
_method_mapevent_type
File "fileMonitor.py", line 51, in on_created
print(time.strftime('[%H:%M:%S]:') + "\033[5;32m%s\033[0m" % "file created:{0}".format(event.src_path))
UnicodeEncodeError: 'ascii' codec can't encode characters in position 37-38: ordinal not in range(128)
Traceback (most recent call last):
File "filemon", line 134, in
File "/Users/xxxx/Documents/2.CodeAudit/FileMonitor/watchdog/observers/api.py", line 291, in schedule
File "/Users/xxxx/Documents/2.CodeAudit/FileMonitor/watchdog/observers/kqueue.py", line 443, in init
File "/Users/xxxx/Documents/2.CodeAudit/FileMonitor/watchdog/utils/dirsnapshot.py", line 244, in init
File "/Users/xxxx/Documents/2.CodeAudit/FileMonitor/watchdog/observers/kqueue.py", line 439, in walker_callback
File "/Users/xxxx/Documents/2.CodeAudit/FileMonitor/watchdog/observers/kqueue.py", line 457, in _register_kevent
File "/Users/xxxx/Documents/2.CodeAudit/FileMonitor/watchdog/observers/kqueue.py", line 242, in add
File "/Users/xxxx/Documents/2.CodeAudit/FileMonitor/watchdog/observers/kqueue.py", line 327, in init
OSError: [Errno 24] Too many open files: '/Users/xxxx/Documents/6.SourceCode/php/xunruicms_v4.4.2/xunruicms/static/assets/global/img/sidebar_inline_toggler_icon_blue.jpg'
使用main.py,fileMonitor.php 可以用
fileMonitor.py filemon 就报错。
运行fileMonitor.py文件
当Unnecessary directory不设置任何路径时,下面语句
if doWithout in event.src_path:
pass
始终成立,所有操作都被pass
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.