一个功能完整的Windows电脑监控系统,支持屏幕录制、键盘记录、进程监控和网站访问监控。
Monitor/
├── src/ # 源代码目录
│ ├── main.py # 主控程序
│ ├── keylogger.py # 键盘记录模块
│ ├── process_monitor.py # 进程监控模块
│ ├── screen_recorder.py # 屏幕录制模块
│ ├── website_monitor.py # 网站监控模块
│ ├── database.py # 数据库管理模块
│ └── clean_logs.py # 日志清理工具
├── scripts/ # 脚本目录
│ ├── run.bat # 运行脚本
│ ├── auto_startup.bat # 自启动管理脚本
│ ├── startup_launcher.bat # 开机启动器
│ ├── build.bat # 打包脚本
│ ├── build_advanced.bat # 高级打包脚本
│ ├── build_single.bat # 单文件打包脚本
│ ├── build_spec.py # 打包配置
│ ├── debug.bat # 调试脚本
│ ├── make_exe.bat # 制作可执行文件
│ └── push.bat # 推送脚本
├── tests/ # 测试目录
│ ├── test_database.py # 数据库测试
│ ├── test_fps.py # FPS测试
│ └── test_logging.py # 日志测试
├── docs/ # 文档目录
│ ├── README.md # 项目说明
│ ├── auto_startup_guide.md # 开机自启动指南
│ ├── debug_guide.md # 调试指南
│ └── git_guide.md # Git使用指南
├── config/ # 配置目录
│ └── config.ini # 配置文件
├── data/ # 数据目录
│ └── monitor.db # 数据库文件
├── logs/ # 日志目录(按日期组织)
├── recordings/ # 录制文件目录
├── requirements.txt # Python依赖
├── run.bat # 根目录运行脚本
└── .gitignore # Git忽略文件
pip install -r requirements.txt
双击 run.bat 或在命令行中运行:
# 正常模式启动
python src/main.py
# 静默模式启动(后台运行)
python src/main.py --silent
# 启用开机自启动
python src/main.py --auto-startup enable
# 禁用开机自启动
python src/main.py --auto-startup disable
# 查看自启动状态
python src/main.py --auto-startup status
或使用图形界面:
# 双击运行自启动管理工具
scripts/auto_startup.bat
按 Ctrl+C 或运行:
python src/main.py stop
编辑 config/config.ini 文件来自定义监控参数:
[SCREEN_RECORDING]
fps = 10
quality = 80
output_dir = recordings
[KEYLOGGER]
log_file =
save_to_db = true
[PROCESS_MONITORING]
log_file =
check_interval = 5
save_to_db = true
[WEBSITE_MONITORING]
log_file =
save_to_db = true
# 运行数据库测试
python tests/test_database.py
# 运行FPS测试
python tests/test_fps.py
# 运行日志测试
python tests/test_logging.py
# 使用根目录脚本
scripts/build.bat
# 或使用高级打包
scripts/build_advanced.bat
本项目仅供学习和研究使用,请勿用于非法用途。
欢迎提交Issue和Pull Request来改进项目。