79094758

Date: 2024-10-16 15:30:51
Score: 1
Natty:
Report link

Worked after filling tunnel_header argument.

sa = SecurityAssociation(ESP, spi=<spi>, crypt_algo='AES-CBC', crypt_key=b'<crypt_key>', tunnel_header=IP(proto=1, src="3.3.3.3",dst="4.4.4.4"))
p = IP(src='1.1.1.1', dst='2.2.2.2')/TCP(sport=45012, dport=80)/Raw('Hello World')
p = IP(raw(p))
e = sa.encrypt(p, iv=b'<iv>')
sendp(Ether(src='00:11:22:33:44:55', dst='00:00:00:00:00:05')/e, iface="veth0")
Reasons:
  • Has code block (-0.5):
  • Self-answer (0.5):
  • Low reputation (1):
Posted by: RupeshCh