You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
This issue only affects people who have a MAC Vendor on their network with a single quote in their name (example: Microtech Int'l Corp.)
I was struggling to get Sweet Security to work and I traced it down to an issue in nmap.py. It was generating an exception because the vendor name for one of my devices has a single qoute in the name. I was able to get it working by changing line 114 of nmap.py from macvendor to macvendor.replace("'", "") which strips out the single qoute from the vendor name. This isn't likely the best strategy, but it got things up and running for me.
Line 114 now looks like this: query = "INSERT INTO hosts VALUES ('%s','%s','%s','%s','%s',0,1,'%s','%s')" % (hostname,hostname,str(ipaddress),macaddress,macvendor.replace("'", ""),datetime.now().strftime("%Y-%m-%d %H:%M:%S"),datetime.now().strftime("%Y-%m-%d %H:%M:%S"))
The text was updated successfully, but these errors were encountered:
This issue only affects people who have a MAC Vendor on their network with a single quote in their name (example: Microtech Int'l Corp.)
I was struggling to get Sweet Security to work and I traced it down to an issue in nmap.py. It was generating an exception because the vendor name for one of my devices has a single qoute in the name. I was able to get it working by changing line 114 of nmap.py from macvendor to macvendor.replace("'", "") which strips out the single qoute from the vendor name. This isn't likely the best strategy, but it got things up and running for me.
Line 114 now looks like this:
query = "INSERT INTO hosts VALUES ('%s','%s','%s','%s','%s',0,1,'%s','%s')" % (hostname,hostname,str(ipaddress),macaddress,macvendor.replace("'", ""),datetime.now().strftime("%Y-%m-%d %H:%M:%S"),datetime.now().strftime("%Y-%m-%d %H:%M:%S"))
The text was updated successfully, but these errors were encountered: