Hi Everyones,
I'm trying to use this library : pastebin.com/xgPXpGtw (an example of use: pastebin.com/fNFAW3Fh) I have some issues since I dont want to split in an array all the byte as he does.
My test script looks like this:
import random
from random import *
def onerand(packet):
pack = packet[:]
byte = str(chr(choice(range(256))))
pack[choice(range(len(packet)))]= byte
print "fuzzing rand byte:%s\n" % (byte.encode("hex"))
return pack
test = "\x63\x63\x63\x63\x63\x63\x63\x63\x63\x63\x63\x63\x63\x63"
while True:
print onerand(test)
And actually returns :
Traceback (most recent call last):
File "test.py", line 14, in <module>
print onerand(test)
File "test.py", line 7, in onerand
pack[choice(range(len(packet)))]= byte
TypeError: 'str' object does not support item assignment
So what should i do to be able to use that function on the test parameters ?
Thanks !