Well, what You think about get or create one script running on the server machine and another in "target" machine for sending and receiving tcp data packets? A simple socket can be used for this task. Search in google "code" for perl or phyton sockets and try on!