Advertisement
Guest User

MISIT Johor

a guest
Jul 6th, 2012
232
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Python 0.89 KB | None | 0 0
  1. #!/usr/bin/env python
  2.  
  3. from socket import *
  4. from time import time, ctime
  5. import os
  6.  
  7. IP = '0.0.0.0'
  8. PORT = 7676
  9. ADS = (IP, PORT)
  10.  
  11. tcpsoc = socket(AF_INET, SOCK_STREAM)
  12. tcpsoc.bind(ADS)
  13. tcpsoc.listen(5)
  14. while 1:
  15.     print "Waiting for connection"
  16.     tcpcli, addr = tcpsoc.accept()
  17.     print "connected from:", addr
  18.     f = os.fork()
  19.     while 1:
  20.         data = tcpcli.recv(1024)
  21.         if not data : break
  22.         banner = "\n\nHandler org yg paling awesome dalam scan\n\n\n"
  23.         banner = banner.encode('EBCDIC-CP-BE')
  24.         tcpcli.send(banner)
  25.         data = data.decode('EBCDIC-CP-BE').encode('ascii', errors='ignore')
  26.         if "pokleyzzz" in data:
  27.             data1 = "Sha1sum for chaahpunawesomejugak"
  28.             data1 = data1.encode('EBCDIC-CP-BE')
  29.             tcpcli.send(data1)
  30.         data1 = "\n\nhandler org yg paling awesome dalam scan\n\n"     
  31.         data1 = data1.encode('EBCDIC-CP-BE')
  32.         tcpcli.send(data1)
  33.     tcpcli.close()
  34. tcpsoc.close()
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement