Skip to content

Commit 2ea01b5

Browse files
authored
Update rpi-dectector-1.py
1 parent 9911b9a commit 2ea01b5

File tree

1 file changed

+7
-1
lines changed

1 file changed

+7
-1
lines changed

rpi-dectector-1.py

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,6 @@
1+
#import os
2+
#import platform
3+
#import re
14
import nmap
25
import json
36

@@ -17,6 +20,9 @@ def pi_search():
1720
item = nm[host]['addresses']
1821
if nm[host].hostname() == 'raspberrypi' :
1922
print (nm[host].hostname(),item)
23+
if 'mac' in nm[host]['addresses']:
24+
print('mac address found: {}'.format(nm[host]['addresses']))
25+
print('vendor: {}'.format(nm[host]['vendor']))
2026

2127
print ("---------------------------")
2228

@@ -25,7 +31,7 @@ def main():
2531
if rpi_ip_list == []:
2632
print ('Running nmap')
2733
pi_search()
28-
#need to do some works to display correctly
34+
2935

3036
if __name__ == "__main__":
3137
main()

0 commit comments

Comments
 (0)