@roseg0ld
Perhaps @chrishamm has a suggestion for the easiest way to confirm a Duet Wifi given an IP address?
Well, that is the missing part, and it must be done on the Duet side. The script you found simply scans for available IPs - and as its buffer is hard-coded to 255 entries, it will fail at larger local address ranges. In addition, it needs a working internet connection because it looks up the local IP base address with a call to Google - this is either ingenious or rather weird. I firmly tend to decide for the latter attribute.
Up to now, the best advice to follow comes from @chrishamm (third post in this thread):
…look for HTTP service records via DNS-SD and () check if one of the "product" TXT values starts with "Duet“.
This means to write some cross-platform code for your Cura plug-in; as a prerequisite, you will want to make sure that the Bonjour framework is installed on Windows machines (and Bonjour or Avahi under Linux, respectively). By the way: doing this for Windows can be a PITA.
This said, you will need to engage a professional with networking- and cross-platform skills to get that job done. Collecting scripts from the internet might be good enough to manage a specific printer farm, but as a general solution, to be distributed by the business you intend to run, this approach jumps too short. Reliable code is never written "on the fly", by no means you can simply copy that from the internet.