EvoX Genesis
EvoX Genesis는 고수준 목표를 재귀적 소프트웨어 세계로 전환해, 유한 에이전트가 개발하고 승인된 결과만 유지됩니다
MAC 주소를 다루는 도구로 Linux·macOS·Windows에서 로컬 인터페이스와 인접 장치의 MAC 주소를 목록화하고 추출합니다
Tools to work with MAC (Media Access Control) addresses: list the MAC addresses of the local network interfaces and of the neighbors in the ARP cache on Linux, macOS and Windows, extract MAC addresses
개발 도구RGitHub @EnriquePH온라인운영자 미확인
써 보셨어요? 한 번만 눌러 주세요. 로그인은 필요 없어요.
개인 계정의 공개 저장소 소유자는 GitHub로 로그인해 운영자를 확인하고 소개를 직접 관리할 수 있습니다. 관리자 승인은 필요하지 않습니다.
로그인한 뒤 확인 파일을 만들어 이 저장소의 기본 브랜치에 30분 안에 커밋해 주세요. 다른 브랜치나 포크의 파일은 인정하지 않습니다. 파일을 올린 뒤 아래에서 확인하면 관리자 승인 없이 관리할 수 있습니다. 자격을 유지하려면 파일을 남겨 두세요.
로그인이 필요하면 로그인 화면으로 이동합니다. 로그인 후 이곳으로 돌아와 원하는 확인 버튼을 다시 눌러 주세요.
프로젝트 폴더에서 /nomorevibe verify를 실행하면 소유권을 확인하고 소개를 직접 관리할 수 있습니다.
1분 만에 확인하기R package to find, validate and identify MAC addresses
README 전체를 불러오는 중입니다.
README 전문 보기 ↗R tools to work with MAC (Media Access Control) addresses:
Documentation: https://enriqueph.github.io/mac-address/
CRAN: https://CRAN.R-project.org/package=MAC.address
# From CRAN
install.packages("MAC.address")
# Development version, from GitHub
# install.packages("remotes")
remotes::install_github("EnriquePH/mac-address")
library(MAC.address)
# MAC addresses of this device, named by interface
get_MAC()
#> enp3s0f1 wlp2s0
#> "9C:5C:8E:27:D8:13" "10:02:B5:39:B7:C3"
# Extract MAC addresses from text (colon, hyphen and Cisco dotted notation)
txt <- "eth0 1c:4c:7e:30:d8:13, wlan0 00-1A-2B-3C-4D-5E, switch 001a.2b3c.4d5f"
search_MAC(txt)
#> [1] "1C:4C:7E:30:D8:13" "00-1A-2B-3C-4D-5E" "001A.2B3C.4D5F"
search_MAC(txt, normalize = TRUE)
#> [1] "1C:4C:7E:30:D8:13" "00:1A:2B:3C:4D:5E" "00:1A:2B:3C:4D:5F"
# Validate and normalize
is_MAC(c("1C:4C:7E:30:D8:13", "1C:4C:7E:30:D8"))
#> [1] TRUE FALSE
normalize_MAC("1c4c.7e30.d813", sep = "-")
#> [1] "1C-4C-7E-30-D8-13"
# Manufacturer lookup (downloads the IEEE registries once, then uses a cache)
lookup_vendor(get_MAC())
#> [1] "ASUSTek COMPUTER INC." "Intel Corporate"
# Randomized / virtual addresses are locally administered, not IEEE assigned
is_local_MAC("DA:A1:19:00:00:00")
#> [1] TRUE
is_multicast_MAC("01:00:5E:00:00:FB")
#> [1] TRUE
# Devices in the local network (ARP cache) and their manufacturer
arp <- get_arp_table()
arp$vendor <- lookup_vendor(arp$mac)
arp
#> ip mac interface vendor
#> 1 192.168.1.1 D4:61:95:EE:14:71 wlp2s0 zte corporation
# Random locally administered addresses, e.g. for virtual machines
set.seed(1)
random_MAC(2)
#> [1] "FA:80:D6:D1:E0:69" "42:A1:2A:BA:54:B5"
# IPv6 link-local address derived from a MAC (modified EUI-64)
eui64_MAC("1C:4C:7E:30:D8:13", link_local = TRUE)
#> [1] "fe80::1e4c:7eff:fe30:d813"
| Function | Description |
|---|---|
get_MAC() | MAC addresses of the local network interfaces |
get_arp_table() | IP and MAC addresses of the neighbors in the ARP cache |
search_MAC() | Extract MAC addresses from text |
is_MAC() | Check whether strings are valid MAC addresses |
normalize_MAC() | Convert to a common notation (XX:XX:XX:XX:XX:XX by default) |
is_local_MAC() | Check the locally administered bit |
is_multicast_MAC() | Check the multicast (group) bit |
random_MAC() | Generate random (by default locally administered) addresses |
eui64_MAC() | IPv6 modified EUI-64 identifier and link-local address |
get_oui_registry() | Download (and cache) the IEEE MA-L, MA-M and MA-S registries |
lookup_vendor() | Organization that owns each MAC address block |
Documentation is written with roxygen2
comments in R/ (Markdown enabled). Never edit man/ or NAMESPACE by hand:
devtools::document() # regenerate man/ and NAMESPACE
devtools::test() # run the tests
devtools::check() # full R CMD check
Code style is checked with lintr, configured in
.lintr (function names like get_MAC() are allowed). Load the package first,
so that functions defined in other files are recognized:
devtools::load_all()
lintr::lint_package()
MIT © Enrique Pérez Herrero