LionSec / xerosploit

Efficient and advanced man in the middle framework
GNU General Public License v3.0
2.02k stars 651 forks source link

Can't see connected devices #242

Open LaXuSss opened 3 years ago

LaXuSss commented 3 years ago

Whenever im scanning it only shows my device not the other connected devices.

ryocuy commented 3 years ago

Sama

mfras3r commented 3 years ago

I had the same issue because I have multiple interfaces on my device (e.g. ethernet and wireless). The scan functionality depends on the selected gateway, though. So, I found that if I set the gateway before scanning, the scan showed devices. By default, xerosploit populates the gateway with a concatenation of all of the gateway ip addresses returned from the following command:

ip route show | grep -i 'default via'| awk '{print $3}'

(seen here: https://github.com/LionSec/xerosploit/blob/master/xerosploit.py#L54)

So, if you have two interfaces, with the IP addresses of 192.168.1.1 and 192.168.2.1 respectively, the gateway is "192.168.1.1192.168.2.1" which isn't a valid gateway for either interface.

So, to fix it, say you want to target someone on the 192.168.1.1 subnet, issue the following before scanning:

gateway
192.168.1.1

This will ensure the gateway passed to https://github.com/LionSec/xerosploit/blob/master/xerosploit.py#L107 is correctly set so nmap can scan the appropriate subnet.

Cheers!

mfras3r