Hi!
If you didn’t skip any lecture then just take a look at the file interceptor script and the function set_load() will be there. Also take the time to watch the lecture I mentioned above and you’ll see how Zaid creates such function. All the information needed for the scripts is included in the lectures, is important to pay attention while watching them and take notes as it will be very helpful.
In any case here’s the function:
def set_load(packet, load):
packet[scapy.Raw].load = load
del packet[scapy.IP].len
del packet[scapy.IP].chksum
del packet[scapy.TCP].chksum
return packet
Also, if you have any question about the course ask it here, avoid sending emails to [email protected] for course content doubts.
And here’s a screenshot from the lecture Intercepting & replacing downloads on the network