tags:

views:

39

answers:

2

I just wanted to know that how can we fetch the platform on which a remote machine is running using Python?

+1  A: 

Frankly, i'd use python to launch an nmap executable and parse the result. nmap can detect accurately what platform it's talking with based on little variations and details in the packets exchanged.

samy
+1  A: 

I don't quite know how to interpret your question, but samy has answered the case of "how to use Python to figure out what another machine is running".

Since you seem to indicate that you have SCP access to the machine in question, I'll assume instead that you want to use a Python script to figure out what that machine is running. If that is the case, you should take a look at the platform module. In particular, platform.platform might be of interest.

gspr