-1

I want to make software that can make connections to other computers that use the same software (within a subnetwork). But I am stuck on how to make such software that can ping its subnetwork and find out which live machines in the subnet are using my software. I prefer not to build a server for this.

1
  • If you want to create a program, Stack Overflow is the place to ask your question. Basically, it's about service discovery, a problem that has already been solved in many ways.
    – Daniel B
    Dec 26, 2014 at 23:33

1 Answer 1

1

There are many prebuilt IP scanners available, like nmap, or AngryIP, or inenumerable others easily found on google. we don't do software recommendations here on Superuser.

Another easy option is to write a script that loops for 256 times, and issues a ping command either using the systems ping, or a langague API. try:for each address in a class-c network. if you need a class b network, you will have to use two nested loops, and for Class A, you will need 3, each looping 256 times.

after each ping, read the response. if it contains '64 bytes' then add that ip address to a list of live systems, and move on to the next address. Once complete, attempt to connect to a port your software has established, to see if it is open. if so, your software would appear to be running.

here's a python script for linux as an example: https://stackoverflow.com/a/317172

Not the answer you're looking for? Browse other questions tagged .