B4J Question Get devices name

ykucuk

Well-Known Member
Licensed User
Longtime User
Hello,
How can I get the names, MAC addresses, and IP addresses of all devices connected to my network (LAN or Wi-Fi)?
 

Attachments

  • WhatsApp Image 2023-09-09 at 11.09.42 AM.jpeg
    WhatsApp Image 2023-09-09 at 11.09.42 AM.jpeg
    34.4 KB · Views: 105

Star-Dust

Expert
Licensed User
Longtime User
see here
 
Upvote 0

ykucuk

Well-Known Member
Licensed User
Longtime User
see here
Thank you, but I already checked this. It keeps saying timeout. I'm doing something wrong, maybe.
 
Upvote 0

Star-Dust

Expert
Licensed User
Longtime User
Extend the waiting time
 
Upvote 0

Star-Dust

Expert
Licensed User
Longtime User
However the library only creates the packet, you manage the sending with the udp socket. You could change the logic of the App and also remove the timeout.

I checked, the package it generates is correct.
 
Upvote 0

Magma

Expert
Licensed User
Longtime User
not something fancy...
simple... and shows how to use jshell...


ofcourse... you can use alone the jshell, make a loop... to ping ips...and use arp to get mac addresses...

there are many ways to achieve that in an OS...
 
Upvote 0

ykucuk

Well-Known Member
Licensed User
Longtime User
not something fancy...
simple... and shows how to use jshell...


ofcourse... you can use alone the jshell, make a loop... to ping ips...and use arp to get mac addresses...

there are many ways to achieve that in an OS...
You've made a great application. Is there a chance you can share the source code in exchange for a donation?
 
Upvote 0

Magma

Expert
Licensed User
Longtime User
Hello,
How can I get the names, MAC addresses, and IP addresses of all devices connected to my network (LAN or Wi-Fi)?
now i ve seen names...

hmm.... getting names of devices (like manufactuer set them) need something different (from just ping -a)... windows/network name is easier.. getting with -a

I am attaching a powershell script found old days, may be help... creating a csv with computer names (but not always)..

ps: need to edit the ps file and change $Subnet = "192.168.168." with your ip range subnet...
ps2: Also, as i know nslookup works right if first dns (of your ip configuration) is the router/gateway ip
 

Attachments

  • extra.zip
    552 bytes · Views: 103
Last edited:
Upvote 0

Magma

Expert
Licensed User
Longtime User
Upvote 0

ykucuk

Well-Known Member
Licensed User
Longtime User
Upvote 0

Magma

Expert
Licensed User
Longtime User
If you want to run powershell scripts..

But in the specific script output to screen a grid form... you can just output to text file and use it.

In this script not showing.. how to get first part of Mac address and show manufacturer
 
Upvote 0

madru

Active Member
Licensed User
Longtime User
use nmap in a shell, will get you all info from a single host

scanning one host using FQDN:

nmap -sn --system-dns 192.168.1.99 or nmap --system-dns -O 192.168.1.99 with portscan
Starting Nmap 7.94 ( https://nmap.org ) at 2023-09-21 08:28 CEST
Nmap scan report for odroidc2-dev.rat.box (192.168.1.99)
Host is up (0.00074s latency).
MAC Address: 00:1E:06:43:EF:9B (Wibrain)
Nmap done: 1 IP address (1 host up) scanned in 0.07 seconds

or

nmap -sn --system-dns 192.168.1.0/24 for a complete net scan
 
Upvote 0

Magma

Expert
Licensed User
Longtime User
use nmap in a shell, will get you all info from a single host

scanning one host using FQDN:

nmap -sn --system-dns 192.168.1.99 or nmap --system-dns -O 192.168.1.99 with portscan
Starting Nmap 7.94 ( https://nmap.org ) at 2023-09-21 08:28 CEST
Nmap scan report for odroidc2-dev.rat.box (192.168.1.99)
Host is up (0.00074s latency).
MAC Address: 00:1E:06:43:EF:9B (Wibrain)
Nmap done: 1 IP address (1 host up) scanned in 0.07 seconds

or

nmap -sn --system-dns 192.168.1.0/24 for a complete net scan
nmap isn't default command-app of Windows - but sure is very good utility !
 
Upvote 0
Top