Skip to content
This repository has been archived by the owner on Feb 15, 2024. It is now read-only.

SystemEngineeringTeam/staywatch_arp

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

4 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

滞在ウォッチ arp-scan

同一ルータ内のIPアドレスとMACアドレスを取得します.

service/arpscan.goは BSD 3-Clause "New" or "Revised" Licenseに基づいて google/gopacket の「arpscan.go」を改変、利用しています https://github.com/google/gopacket/blob/master/examples/arpscan/arpscan.go

使用方法

  1. ifconfig を実行し、使用しているネットワークインタフェースを確認
  2. scan-interfase/interfase.go を実行し、1で確認したインタフェースのindexとmacアドレスを確認
  3. .envにインタフェース名、index、macアドレスをそれぞれ記入
  4. network.csvに部屋番号、ネットワークアドレス、ネットワークマスクをそれぞれ記入
  5. OS側で、/etc/systemd/system/arpscan.timer,/etc/systemd/system/arpscan.serviceに以下のように記述する
[Unit]
Description=ArpScan Timer

[Timer]
OnCalendar=Mon..Fri 9..16:0/30
Unit=arpscan.service

[Install]
WantedBy=timers.target
[Unit]
Description=ArpScan Service

[Service]
User=root
Type=oneshot
WorkingDirectory=<pass>/geekcamp-2023-vol9/arp-scan
ExecStart=go run main.go
  1. systemdデーモンの再度読み込み
sudo systemctl daemon-reload
  1. タイマーを有効にして開始
sudo systemctl enable arpscan.timer
sudo systemctl start arpscan.timer
  1. タイマーが実行されていることを確認
systemctl list-timers

LICENSE

MIT

About

No description or website provided.

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages