Hacking is an overstatement. Fiddling around with COD4. Anyways, here is a code snippet to get information (send the getinfo command) from a COD4 server:
import socket hex = '\xFF\xFF\xFF\xFF\x67\x65\x74\x73\x74\x61\x74\x75\x73' s = socket.socket(socket.AF_INET, socket.SOCK_DGRAM) host = '176.9.142.200' port = 29056 s.sendto(hex, (host, port)) d = s.recvfrom(1024)
To list the number of players and their names:
import re print d[0].count('\"')/2 + " players" list_l = re.findall('"([^"]*)"', d[0]); print for pl in list_l: print pl
Olala …. 😎:D😎:D Its only point on screen or ? Hahahaha
Haha no, Duje. It is only used in a script that joins a server when there are empty slots.
😀 ahaaa 😉 oki doki …. 🙂