如果找到匹配项,我在处理如何返回一行文本时遇到了一些麻烦。如果找到匹配项则返回一行文本
(set 'wireshark "http://anonsvn.wireshark.org/wireshark/trunk/manuf")
(set 'arptable (map (fn (x) (parse x " ")) (exec "arp -a")))
(define (cleanIPaddress x)
(slice x 1 -1))
(define (cleanMACaddress x)
(upper-case (join (slice (parse x ":") 0 3) ":")))
(define (addIPandMACaddress x)
(list (cleanIPaddress (nth 1 x)) (cleanMACaddress (nth 3 x))))
(set 'arplist (map addIPandMACaddress arptable))
(set 'routerMAC (last (assoc (exec "ipconfig getoption en1 router") arplist)))
(find-all routerMAC (get-url wireshark))
回报
("20:AA:4B")
,所以我知道这些代码 “作品”
,但我想检索完整行文本
"20:AA:4B Cisco-Li # Cisco-Linksys, LLC"
Wireshark的项目从Subversion在2014年一月切换到Git中“厂商” URL现在是https://code.wireshark.org/review/gitweb?p = wireshark.git; a = blob_plain; f = manuf –