Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #!/usr/bin/env python
- from socket import *
- from time import time, ctime
- import os
- IP = '0.0.0.0'
- PORT = 7676
- ADS = (IP, PORT)
- tcpsoc = socket(AF_INET, SOCK_STREAM)
- tcpsoc.bind(ADS)
- tcpsoc.listen(5)
- while 1:
- print "Waiting for connection"
- tcpcli, addr = tcpsoc.accept()
- print "connected from:", addr
- f = os.fork()
- while 1:
- data = tcpcli.recv(1024)
- if not data : break
- banner = "\n\nHandler org yg paling awesome dalam scan\n\n\n"
- banner = banner.encode('EBCDIC-CP-BE')
- tcpcli.send(banner)
- data = data.decode('EBCDIC-CP-BE').encode('ascii', errors='ignore')
- if "pokleyzzz" in data:
- data1 = "Sha1sum for chaahpunawesomejugak"
- data1 = data1.encode('EBCDIC-CP-BE')
- tcpcli.send(data1)
- data1 = "\n\nhandler org yg paling awesome dalam scan\n\n"
- data1 = data1.encode('EBCDIC-CP-BE')
- tcpcli.send(data1)
- tcpcli.close()
- tcpsoc.close()
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement