rorist / android-network-discovery

Android network tool: Discover hosts and scan their ports, in your Wifi/3G network.
http://rorist.github.com/android-network-discovery/
587 stars 242 forks source link

Unable to scan eth0 #9

Open peterpt opened 9 years ago

peterpt commented 9 years ago

First of all , thank you all for this excellent tool . I have a nexus 2012 tablet , and i have an RJ45 adapter to connect to my network with a network cable , when i try to do a scan the network discovery tool tells me that i need to put up the wifi card , the tool is not able to detect that the tablet is already connect to a network using the interface eth0 on that RJ 45 adapter . Is there anyway to enable network discovery tool to scan a particular interface instead going to the default wifi interface wlan0 ?

Thanks for the tool , very nice indeed .

rorist commented 9 years ago

Hi there, you can go to Options > General > Network interface and then you should see every available interfaces. Hope this help :)

peterpt commented 9 years ago

thanks for the reply i did not notice that option . however even selecting eth0 device for a network scan i can not get discover button enabled to start . i get "mode : connectivity mode unknown" , this even knowing that rj45 device already had a dhcp ip on the device from the router . i can post pictures from the terminal showing that eth0 have an ip from the router , and the browser can navigate to internet with that device , and i can post network discovery error at same time if you need . thanks for the reply

peterpt commented 9 years ago

here are the pictures i have captured to give you a notion of what is going on and to help you to understand the error network discovery error at the bottom http://s29.postimg.org/hd4iv4r1z/netdisc.png

Terminal showing that ip were already assigned to eth0 device http://s17.postimg.org/8jpz9pyvj/eth0term.png

Internet browser navigating with that device http://s7.postimg.org/57qo8ctln/browser.png

and network connections tool showing the protocols opened on that device (same as netstat) http://s21.postimg.org/5kr3viobb/netwconn.png

thanks for everything

rorist commented 9 years ago

Ah damn, it's not detected as Ethernet then, in this check https://github.com/rorist/android-network-discovery/blob/master/src/info/lamatricexiste/network/ActivityNet.java#L142, i see there's a new type for Ethernet in the recent version of Android, https://developer.android.com/reference/android/net/ConnectivityManager.html#TYPE_ETHERNET Checking for type==9 should then work.. I'll give it a go, if you want to test back, that'd be neat !

peterpt commented 9 years ago

sure , if you could make the changes at the apk file , i will be very thankful to test it here .

rorist commented 9 years ago

Well, this is not as easy, the way I get network information is very bad.. I'll have to redo some stuff..

peterpt commented 9 years ago

Ok , thanks for your time on this . When it is ready i will test it and i will show you the results as i did before to let you know if everything is working fine . Thank you very much for all your hard work on this . Regards