'ICMP Covert Channel: Reading ICMP message at receiver

I am currently doing an assignment about ICMP Covert Channel. The environment is provided in Docker. I am required to send an ICMP message, let say "Hello", from the sender and I used scapy for crafting the message, simply encrypted, without echoing:

import sys
import subprocess
from scapy.all import *

def encrypting(message):
    strlen = len(message)
    reverse = message[strLen::-1]
    return reverse

if __name__ == "__main__":
    encryptedMes = encrypting(sys.argv[2])
    send(IP(dst=sys.argv[1])/ICMP(type=9)/encryptedMes)

However, at sender, It seemed like I am not allowed to install scapy to use the sniff(). I could use tcpdump but the furthest I could go is: enter image description here

My expection is to print only the Hello part. I need to write a python script to run indefinitely at receiver.

What are other ways I should try at receiver to run definitely and only print the content I crafted at sender.

Thank you, Huy Nguyen.



Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source