I have a task to detect with some probability which OS runs on the
target machine.
I know there isn't API or a trustworthy method to do this and get 100%
correct result, but I am searching for some clues that say with more or
less probability that the target machine is under, say, Windows.
In my personal opinion, trying to connect to some ports on a foreign
host and analyzing the results can give one reasons to judge that this
host is probably Windows. In other words, after connecting to some
ports on a host it's still possible to say that 60% chances are that
it's Windows, 30% Linux and only 10% Mac.