Files
linker/README.md
snltty a3a567b3d8 init
2023-09-19 10:01:42 +08:00

2.9 KiB
Raw Blame History

class monitor

Visual Studio 2022 LTSC 17.4.1

QQ 群1121552990

GitHub Repo stars GitHub Repo forks star fork

适合教培机构计算机教室监控

说明

  1. 这是一个粗略的局域网监控程序(说是局域网,你放外网也不是不行)
  2. 桌面捕获很粗略,只是做了一个减小图片尺寸,没有做区域更新

平台

  • 客户端支持 【windows】
  • 服务端支持 【windows】【linux】

看图

运行参数

1、公共的
  • 【--mode】 运行模式 client,server
2、客户端
  • 【--server】 服务器ip 192.168.1.18
  • 【--service】 服务端口 1802
  • 【--share-key】 自定数据共享 cmonitor/share每项数据长度255
  • 【--share-len】 长度 2550默认预留10项位置0键盘KeyBoard、1壁纸Wallpaper、2锁屏LLock
3、服务端
  • 【--web】 管理UI端口 1800
  • 【--api】 管理接口端口 1801
  • 【--service】 服务端口 1802

安装示例

windows计划任务
//client
params = " --mode client --name cmonitor --server 192.168.1.18 --service 1802";
params += " --share-key cmonitor/share --share-len 2550";

//server
params = " --mode server --web 1800 --api 1801 --service 1802";

schtasks.exe /create /tn "cmonitor" /rl highest /sc ONLOGON /delay 0000:30 /tr "\"{exePath}\"{params}" /f
linux服务端
//1、下载linux版本程序放到 /usr/local/cmonitor 文件夹,并在文件夹下创建一个 log 目录

//3、写配置文件
vim /etc/systemd/system/cmonitor.service

[Unit]
Description=cmonitor

[Service]
WorkingDirectory=/usr/local/cmonitor
ExecStart=/usr/local/cmonitor/cmonitor --mode server --web 1800 --api 1801 --service 1802
ExecStop=/bin/kill $MAINPID
ExecReload=/bin/kill -HUP $MAINPID
Restart=always

[Install]
WantedBy=multi-user.target


//4、重新加载配置文件
systemctl daemon-reload
//5、启动或者重新启动
systemctl start cmonitor
systemctl restart cmonitor

支持作者

请作者喝一杯咖啡,使其更有精力更新代码