使用Python构建简易Web扫描器:ARP与广播请求实现

3 阅读1分钟

1·Top highlight

Creating a Web Scanner With Python

Canturk bal
Follow · 1 min read · Jul 21, 2022

1291
Listen
Share

Today I am going to show you how to make your own web scanner with Python. So let’s start!!!

Press enter or click to view image in full size

First we are going to import a library called optparse to get input from terminal. Now let’s make a function to get the ip we want to scan:

Get Canturk bal’s stories in your inbox
Join Medium for free to get updates from this writer.
Subscribe

Subscribe

To make a web scanner, we have to make a broadcast request.
This broadcast request is for finding the mac address that we want to find from this ip. This basically searches the ip’s to find the specific mac address. Also we have to make an arp request.

After that we have to combine these two requests and get all the answered requests to find ip’s and mac addresses.

Now let’s combine these two functions and final result will look like this:

And that was it! If you enjoyed please give a clap and follow.
See you on my next post. CSD0tFqvECLokhw9aBeRqpNzLTXFlojmzFn6OlyTg9UR/tzr4a//qzM518IChNWGHojk5PWHNRr0sAi6mCcxBot4v6LA6xyfmd5AUoAa7W5vPh8k0tRe5TCB2RBvZa/Z