Short bio: Computer Scientist, FOSS supporter (read more)
Tux Machines (TM)-specific
Scanning a network remotely is not always an easy task. It is even more difficult when different operating systems are involved. Here's how you can scan an entire tcp/ip range of Windows computers from a Kubuntu Linux box. This is very basic and serves as an example but it is usefull for learning which computers have mp3's or pr0n when they shouldn't have.
I will build up a script line by line to end up with a working example that you can use under any bash type shell. The script is basically a program and any program needs some arguments to tell us how it will behave. This is done by a simple loop to read in the arguments and assign them to variables. A loop is used so the arguments can be given in any order. At the start of each line is a pipe symbol to signify a code block. This needs to be deleted for the script to work.