babluboy/nutty

Some hosts not showing in Device tab

Closed this issue · 10 comments

image

In this example 192.168.10.10 and 192.168.10.57 show in the xml output but not in the device list (see attached). For these two IPs there is no vendor shown against the MAC in the xml. If vendor name is not available it should not prevent the device from showing in the Devices tab.

Also the host where nutty is running (cassie) shows MAC and Manufacturer unavailable in the Devices tab. The corresponding xml entry says <status state="up" reason="localhost-response" reason_ttl="0"/> but no MAC info. I've noticed in the past that nmap doesn't print the MAC of the host it is running on, I guess this is the reason. (In my scripts I've had to resort to picking apart the output from ifconfig -a or ip add show to get the localhost's MAC).

nutty_nmap_device_scan_results.xml.gz

A little more info.

From the xml

<address addr="192.168.10.57" addrtype="ipv4"/>
<address addr="70:26:05:09:A6:52" addrtype="mac"

Online MAC vendor OUI lookups show that it is SONY Visual Products Inc. so nutty should've found that one.

<address addr="192.168.10.10" addrtype="ipv4"/>
<address addr="02:4F:06:C2:50:59" addrtype="mac"/>

This one is a Banana Pi Single Board Computer. Many of these "credit card size computers" and other embedded devices use a locally administered (not registered with IEEE) MAC address that return unknown when doing a public OUI looking up. As more these things end up in people's networks, it seems like a good idea just to print unknown as the Device Manufacturer in the Devices tab.

@rixtech Many thanks for raising this and providing detailed info - will help to make Nutty better.

  1. I will look into the issue where devices with no vendor name is not shown, I thought I had covered this test case but will check.

  2. For the local machine I thought I had the code do a ipconfig -a and pick up the details from there, but will check again.

  3. I had online look up in the past based on MAC to find the vendor name, but discontinued it as it creates a dependency on internet usage for Nutty for the flatpak packaging. As a workaround I made the vendor name editable so that the user can key in non-available vendors and then its stored against that MAC. Hopefully this is not too much of an issue.

@rixtech The issue was a null check not being performed for manufacture name and host name while inserting into the DB and the table has a not-null constraint defined for both these columns, hence the data was failing to insert with a constraint error.
Fixed the issue and should be included in the next release - will be great if you can test the same by building from source, otherwise you can give it a go after the next update

@babluboy Thank you for quick response.
I have rebuilt from source and can confirm that my two previously missing hosts are now showing in the Devices tab. Also confirmed that if I "forget device" then refresh they are re-discovered as expected.

Also noticed an issue with build instructions

git clone https://github.com/babluboy/nutty.git
cd nutty
meson build --prefix=/usr
mkdir build && cd build                  <<<<<<<<<<<<<<<<
ninja

The build subdirectory is already present after the git clone, so the mkdir build && cd build fails. You could change to mkdir -p build && cd build or just cd build

Thanks again

@rixtech Thanks for the confirmation on the fix.
On the build instruction, I checked that the build directory is not part of the git repo and hence the command to create the build directory is good, but for someone doing it for the second time, it would fail as you have indicated. Its better to have the -p option for mkdir as you have suggested so it works for both scenarios.

@rixtech Thanks for the confirmation on the fix.
On the build instruction, I checked that the build directory is not part of the git repo and hence the command to create the build directory is good, but for someone doing it for the second time, it would fail as you have indicated. Its better to have the -p option for mkdir as you have suggested so it works for both scenarios.

Just found that meson build creates the build directory if it is not present, so removed the mkdir command completely as it is redundant

Thanks @babluboy. Apologies, badly worded. I should have mentioned that I removed my local clone, cloned again then ran the meson build, that's when I found the build directory was present.

I had not tried the meson build until today. Previously I used the build and make instructions for Ubuntu at https://babluboy.github.io/nutty/

Also confirming that the meson build works fine on Ubuntu 18.04.1 LTS on armv7l board.

@rixtech Ah ok. Anyways without the mkdir command the current instructions should be fine whether or not the build directory is present or not.

Thanks for the pointer - I need to update the build instructions there to use meson rather than cmake.

How do i update Nutty on Linux Mint (Ubuntu)?

@tlearyus Thanks, I had completely forgotten to update the PPA after making a Appcenter release for Nutty v1.1.1 this week.

If you have installed from the PPA, then hopefully you will get an update in the next couple of days as I get the build ready for v1.1.1

If you have installed by building from source code then please get the latest code from GitHub and update to v1.1.1