Scanning with Ruby Infosecaddicts

Ruby is the programming language preferred by hackers, in this post I will show you how to do a simple ping on a local network to look for potential victims, faster than nmap.

The code with which we will perform this is in the repository and belongs to Ryan Taylor Long

There are only 20 lines of code that you can modify at your leisure, but the most interesting of this is the speed of response of the same

With the help of any code editor (in my case I am using sublimetext) I get answers in 1.4s of all the equipment connected in my local network as shown in the image.

You can verify that the previous code is correct by pinging directly from the console as shown in the following image.

Nmap has many more options to perform scans on a local network, but, it is not as fast as this little code, in addition to that, you can modify it depending on your needs.

In the following image, I am doing a test with nmap with a response time of 8 seconds much more than with the ruby code.

One of the advantages you have with the ruby code is that you can customize it to improve your attack, in addition to that you can add the results in the database, and thus identify how many people enter your local network.

My advice is this, every day you must learn new ways of doing things, because, the world of a pentester or hacker changes too fast. For that reason, I’m showing you the alternative of doing scans in a different way than nmap.

If you are in a very large network with more than 1000 hosts connected, with a simple python or ruby script you can monitor it easily and quickly.



Related courses:

Ultimate Hacklab Self Paced

Try Certified Ethical Hacker for FREE!!!



Leave a Reply

This site uses Akismet to reduce spam. Learn how your comment data is processed.