now let' play around with it bit to see some output in one terminal or cmd exe shellrun our script like sojustin/bhnet py - - - now you can fire up another terminal or cmd exeand run our script in client mode remember that our script is reading from stdin and will do so until the eof (end-of-filemarker is received to send eofhit ctrl- on your keyboardjustin/bhnet py - localhost - ls -la total drwxr-xr- justin staff dec : drwxr-xr- justin staff dec : -rwxrwxrwt justin staff dec : bhnet py -rw- -- - justin staff dec : listing- - py pwd /users/justin/svn/bhp/codeyou can see that we receive back our custom command shelland because we're on unix hostwe can run some local commands and receive back some output as if we had logged in via ssh or were on the box locally we can also use our client to send out requests the goodold-fashioned wayjustinecho -ne "get http/ \ \nhostwww google com\ \ \ \ /bhnet py - www google com - http/ found locationcache-controlprivate content-typetext/htmlcharset=utf- pcp="this is not policysee accounts/bin/answer py?hl=en&answer= for more info datewed dec : : gmt servergws content-length -xss-protection mode=block -frame-optionssameorigin moved moved the document has moved [*exceptionexiting justinthere you goit' not super technical techniquebut it' good foundation on how to hack together some client and server sockets in python and use them for evil of courseit' the fundamentals that you need mostuse your imagination to expand or improve it nextlet' build tcp proxywhich is useful in any number of offensive scenarios