How to change route/gateway, subnet mask and ip address used by Python scapy?

Viewed 13

Let's say I have my

default gateway 192.168.10.1 , subnet mask 255.255.255.0 , interface enp2s0 and ip 192.168.10.40

If I wanted to send an ICMP packet from a different network using scapy with

gateway 192.168.40.1, subnet mask 255.255.254.0, interface enp2s0 and ip 192.168.40.224

how should I go about doing it?

i understand that i need to change the route using conf.route from here but i don't get the exact configuration for my use case.

i've tried many route configs but the ping just doesn't go through.

0 Answers
Related