Ping... a message arrrived

Ping... a message arrrived

In this short tutorial, Here I am going to demonstrate chatting using ping command.

For this first of all you need a program that can convert your text into hexadecimal format and at the same time it should not exceed the ICMP payload limit.

If you have a program that's great if you don't have a program for this refer here

Once you have converted the string into hexadecimal

Open terminal window on host one type the command mentioned below and hit enter.

No alt text provided for this image

Explanation to above command

In the above command there are two things working at the same time to deliver your message to another host. here, ping command as usual we all have used to check whether the target host is up or not is used with -p option to customize the payload that can be send through ICMP packet which contains additional 16 bytes of padding in the ICMP header.

No alt text provided for this image
ICMP Payload

and then used this ICMP payload to pipe the output of ping to netcat to send over the network and then receiving it on another host and also, we can read the message at the same time and for out communication we will use port 8000.

To read the message on the other side we will use netcat in listening mode on another host:

No alt text provided for this image

and pipe the output to the grep command to filter out rest of the irrelevant ICMP message that was combined with our text.

No alt text provided for this image

As you can see the message our message has arrived successfully on the other host.

But... Wait a minute...

No alt text provided for this image

It's totally unreadable.

If you think that then let me tell you... Whatever you saw as a text in the received message is a hexadecimal form of 'Hi' which is converted because ICMP don't deals with the text any computer system even never deals with the text directly it converts it accordingly and, in our case, this has to be done as ICMP header only can take hexadecimal values and up to only 16 Bytes because of the limitation of ICMP header size.

So, in order to send any messages over the ICMP it's crucial to send the text within certain limit and using hex converter.


Thanks

- SK -



Vimal Daga

World Record Holder | 2x TEDx Speaker | Philanthropist | Sr. Principal Consultant | Entrepreneur | Founder LW Informatics | Founder Hash13 pvt ltd | Founder IIEC

1 年

Nice

回复

要查看或添加评论,请登录

SAKSHAM TRIVEDI的更多文章

  • DNF5... It's time to rethink the package management.

    DNF5... It's time to rethink the package management.

    Hello Folks, It's been a while since I have written any article. Well here I am now.

  • File BackuP & Sync...

    File BackuP & Sync...

    Introduction In today's fast-paced world, seamless file sharing and synchronization are essential for efficient…

  • Simplifying SSH Connection: A Guide To Build Your Own Proxy Network

    Simplifying SSH Connection: A Guide To Build Your Own Proxy Network

    Establishing a secure SSH connection between Machine A and Machine F can be challenging, especially when intermediate…

  • Unleashing the Power of Linux: A Browser-Based Linux Experience

    Unleashing the Power of Linux: A Browser-Based Linux Experience

    To access Fedora Linux's graphical system in a browser using Apache Guacamole, you will need to set up Guacamole on a…

  • Gmail from Old Dog Terminal

    Gmail from Old Dog Terminal

    Mutt is used to send and receive email from your terminal, even if you're using hosted service such as Gmail. A…

  • Let's WhatsApp using Bash

    Let's WhatsApp using Bash

    S: AuthorAuthorIntroduction In today's fast-paced world, automation plays a crucial role in streamlining various tasks.…

    5 条评论
  • Containerized SSH Server

    Containerized SSH Server

    In this article I am going to demonstrate how to containerize SSH server so without any further explanation let's…

  • Mutiple Linux shells on a same system

    Mutiple Linux shells on a same system

    Recently I came across the question is there any possibility that multiple shells can be installed on the same system…

  • Jupyter Lab as a container

    Jupyter Lab as a container

    This article is focused on containerizing Jupyter Notebook inside the docker container with a fully-fledged develop…

  • Launching graphical application inside the docker container

    Launching graphical application inside the docker container

    Hello guys, In this article I am going to discuss how to launch the graphical application inside the docker. So, for…

社区洞察

其他会员也浏览了