Deleted: <article><div><section class="go gp hj hk hl"><div class="n p"><div class="z ab ac ae af hm ah ai"><p id="bbba" class="jz kn ap bx kb b kc kd ko ke kf kp kg kh kq ki kj kr kk kl ks km go" data-selectable-paragraph=""><br></p><p class="jz kn ap bx kb b kc kd ko ke kf kp kg kh kq ki kj kr kk kl ks km go" data-selectable-paragraph="">the t</p><table style="border-collapse: collapse;width: 100%" border="1" data-mce-style="border-collapse: collapse; width: 100%;"><tbody><tr><td style="width: 33.3333%" data-mce-style="width: 33.3333%;"><br></td><td style="width: 33.3333%" data-mce-style="width: 33.3333%;"><br></td><td style="width: 33.3333%" data-mce-style="width: 33.3333%;"><br></td></tr><tr><td style="width: 33.3333%" data-mce-style="width: 33.3333%;"><br></td><td style="width: 33.3333%" data-mce-style="width: 33.3333%;"><br></td><td style="width: 33.3333%" data-mce-style="width: 33.3333%;"><br></td></tr><tr><td style="width: 33.3333%" data-mce-style="width: 33.3333%;"><br></td><td style="width: 33.3333%" data-mce-style="width: 33.3333%;"><br></td><td style="width: 33.3333%" data-mce-style="width: 33.3333%;"><br></td></tr></tbody></table><p class="jz kn ap bx kb b kc kd ko ke kf kp kg kh kq ki kj kr kk kl ks km go" data-selectable-paragraph="">est</p><p id="93e8" class="jz kn ap bx kb b kc kd ko ke kf kp kg kh kq ki kj kr kk kl ks km go" data-selectable-paragraph="">In this post, we will build a simple network scanner using Scapy library in Python.</p><p id="054d" class="jz kn ap bx kb b kc kd ko ke kf kp kg kh kq ki kj kr kk kl ks km go" data-selectable-paragraph="">if you don’t have <strong class="kb kt">scapy</strong> installed , check the <a class="ct dv jv jw jx jy" href="https://scapy.readthedocs.io/en/latest/installation.html" target="_blank" rel="noopener nofollow noreferrer" data-mce-href="https://scapy.readthedocs.io/en/latest/installation.html">cap’s official documentation</a> for installation.</p><p id="c850" class="jz kn ap bx kb b kc kd ko ke kf kp kg kh kq ki kj kr kk kl ks km go" data-selectable-paragraph="">First, we gonna need to import essential methods fr</p><pre class="iy iz ja jb jc ny mw fh eye-protector-processed" style="background-color: #c1e6c6" data-mce-style="transition: background-color 0.3s ease 0s; background-color: #c1e6c6;"><span id="908f" class="pe pf ap bx pg b co ph pi r pj" data-selectable-paragraph=""><strong class="pg kt">from</strong> scapy.all <strong class="pg kt">import</strong> ARP, Ether, srp</span></pre><p id="ddad" class="jz kn ap bx kb b kc kd ko ke kf kp kg kh kq ki kj kr kk kl ks km go" data-selectable-paragraph="">Second, we gonna need to make an <a class="ct dv jv jw jx jy" href="https://en.wikipedia.org/wiki/Address_Resolution_Protocol" target="_blank" rel="noopener nofollow noreferrer" data-mce-href="https://en.wikipedia.org/wiki/Address_Resolution_Protocol">ARP request</a> as shown in the following <a href="http://www.trueffelhamster.de/wp-content/uploads/2020/12/lee-campbell-GI6L2pkiZgQ-unsplash-scaled.jpg" data-mce-href="http://www.trueffelhamster.de/wp-content/uploads/2020/12/lee-campbell-GI6L2pkiZgQ-unsplash-scaled.jpg">image</a>:</p><p class="jz kn ap bx kb b kc kd ko ke kf kp kg kh kq ki kj kr kk kl ks km go" data-selectable-paragraph=""><br></p><p id="b2a1" class="jz kn ap bx kb b kc kd ko ke kf kp kg kh kq ki kj kr kk kl ks km go" data-selectable-paragraph="">The network scanner will send the ARP request indicating who has some specific IP address, let’s say “192.168.1.1”, cccxzczc the owner of that IP address ( the target ) will automatically respond saying <strong>that</strong> he is “192.168.1.1”, with that response, the MAC address will also be included in the packet, this allows us to successfully retrieve all network users’ IP and MAC addresses simultaneously when we send a <a class="ct dv jv jw jx jy" href="https://en.wikipedia.org/wiki/Broadcasting_(networking)" target="_blank" rel="noopener nofollow noreferrer" data-mce-href="https://en.wikipedia.org/wiki/Broadcasting_(networking)">broadcast packet</a> ( sending a packet to all the devices in the network ).</p><p id="3cc1" class="jz kn ap bx kb b kc kd ko ke kf kp kg kh kq ki kj kr kk kl ks km go" data-selectable-paragraph="">The ARP response is demonstrated in the following figure:</p><p id="632b" class="jz kn ap bx kb b kc kd ko ke kf kp kg kh kq ki kj kr kk kl ks km go" data-selectable-paragraph="">So, let us craft these packets:</p><pre class="iy iz ja jb jc ny mw fh eye-protector-processed" style="background-color: #c1e6c6" data-mce-style="transition: background-color 0.3s ease 0s; background-color: #c1e6c6;"><span id="fa4b" class="pe pf ap bx pg b co ph pi r pj" data-selectable-paragraph="">target_ip = "192.168.1.1/24"<br># IP Address for the destination<br># create ARP packet<br>arp = ARP(pdst=target_ip)<br># create the Ether broadcast packet<br># ff:ff:ff:ff:ff:ff MAC address indicates broadcasting<br>ether = Ether(dst="ff:ff:ff:ff:ff:ff")<br># stack them<br>packet = ether/arp</span></pre><p id="705c" class="jz kn ap bx kb b kc kd ko ke kf kp kg kh kq ki kj kr kk kl ks km go" data-selectable-paragraph=""><em class="kw">Note: In case you sr with the notation “/24” or “/16” after the IP address, it is basically an IP range here, for example “192.168.1.1/24” is a range from “192.168.1.0” to “192.168.1.255”, please read more about </em><a class="ct dv jv jw jx jy" href="https://en.wikipedia.org/wiki/Classless_Inter-Domain_Routing" target="_blank" rel="noopener nofollow noreferrer" data-mce-href="https://en.wikipedia.org/wiki/Classless_Inter-Domain_Routing"><em class="kw">CIDR Notation</em></a></p><p id="214c" class="jz kn ap bx kb b kc kd ko ke kf kp kg kh kq ki kj kr kk kl ks km go" data-selectable-paragraph="">Now we have created these packets, we need to send them using function which sends and receives packets at layer 2, we set the timeout to 3 so the script won’t get stuck:</p><pre class="iy iz ja jb jc ny mw fh eye-protector-processed" style="background-color: #c1e6c6" data-mce-style="transition: background-color 0.3s ease 0s; background-color: #c1e6c6;"><span id="12a1" class="pe pf ap bx pg b co ph pi r pj" data-selectable-paragraph="">result = srp(packet, timeout=3)[0]</span></pre><p id="1854" class="jz kn ap bx kb b kc kd ko ke kf kp kg kh kq ki kj kr kk kl ks km go" data-selectable-paragraph=""><code>result now is a list of pairs that is of the format , let’s iterate over them:</code></p><pre class="iy iz ja jb jc ny mw fh eye-protector-processed" style="background-color: #c1e6c6" data-mce-style="transition: background-color 0.3s ease 0s; background-color: #c1e6c6;"><span id="6812" class="pe pf ap bx pg b co ph pi r pj" data-selectable-paragraph=""># a list <strong class="pg kt">of</strong> clients, we will fill <strong class="pg kt">this</strong> <strong class="pg kt">in</strong> the upcoming loop<br>clients = []<br><strong class="pg kt">for</strong> sent, received <strong class="pg kt">in</strong> result:<br> # <strong class="pg kt">for</strong> each response, append ip and mac address to `clients` list<br> clients.append({'ip': received.psrc, 'mac': received.hwsrc})</span></pre><h3 id="90e7" class="jz kn ap bx kb b kc kd ko ke kf kp kg kh kq ki kj kr kk kl ks km go">Now all we need to do is to print this list we have just filled:</h3><h5 class="iy iz ja jb jc ny mw fh eye-protector-processed" style="background-color: #c1e6c6" data-mce-style="transition: background-color 0.3s ease 0s; background-color: #c1e6c6;"><span id="95dc" class="pe pf ap bx pg b co ph pi r pj" data-selectable-paragraph=""># print clients<br>print("Available devices in the network:")<br>print("IP" + " "*18+"MAC")<br><strong class="pg kt">for</strong> client <strong class="pg kt">in</strong> clients:<br>print("{:16} {}".format(client['ip'], client['mac']))</span></h5><p id="3304" class="jz kn ap bx kb b kc kd ko ke kf kp kg kh kq ki kj kr kk kl ks km go" data-selectable-paragraph="">Full code:</p><pre class="iy iz ja jb jc ny mw fh eye-protector-processed" style="background-color: #c1e6c6" data-mce-style="transition: background-color 0.3s ease 0s; background-color: #c1e6c6;"><span id="6a72" class="pe pf ap bx pg b co ph pi r pj" data-selectable-paragraph=""></span>Here is a screenshot of my result in my personal network:<br><br><br><br><br></pre><p class="jz kn ap bx kb b kc kd ko ke kf kp kg kh kq ki kj kr kk kl ks km go" data-selectable-paragraph=""><br></p><pre class="language-python"><span class="token keyword">from</span> scapy<span class="token punctuation">.</span>all <span class="token keyword">import</span> ARP<span class="token punctuation">,</span> Ether<span class="token punctuation">,</span> srp
| Added: <article><div><section class="go gp hj hk hl"><div class="n p"><div class="z ab ac ae af hm ah ai"><p id="bbba" class="jz kn ap bx kb b kc kd ko ke kf kp kg kh kq ki kj kr kk kl ks km go" data-selectable-paragraph=""><br></p><p class="jz kn ap bx kb b kc kd ko ke kf kp kg kh kq ki kj kr kk kl ks km go" data-selectable-paragraph="">the</p><table style="border-collapse: collapse;width: 100%" border="1" data-mce-style="border-collapse: collapse; width: 100%;"><tbody><tr><td style="width: 33.3333%" data-mce-style="width: 33.3333%;"><br></td><td style="width: 33.3333%" data-mce-style="width: 33.3333%;"><br></td><td style="width: 33.3333%" data-mce-style="width: 33.3333%;"><br></td></tr><tr><td style="width: 33.3333%" data-mce-style="width: 33.3333%;"><br></td><td style="width: 33.3333%" data-mce-style="width: 33.3333%;"><br></td><td style="width: 33.3333%" data-mce-style="width: 33.3333%;"><br></td></tr><tr><td style="width: 33.3333%" data-mce-style="width: 33.3333%;"><br></td><td style="width: 33.3333%" data-mce-style="width: 33.3333%;"><br></td><td style="width: 33.3333%" data-mce-style="width: 33.3333%;"><br></td></tr></tbody></table><p class="jz kn ap bx kb b kc kd ko ke kf kp kg kh kq ki kj kr kk kl ks km go" data-selectable-paragraph="">est <strong>ht </strong></p><p id="93e8" class="jz kn ap bx kb b kc kd ko ke kf kp kg kh kq ki kj kr kk kl ks km go" data-selectable-paragraph="">In this post, we will build a simple network scanner using Scapy library in Python.</p><p id="054d" class="jz kn ap bx kb b kc kd ko ke kf kp kg kh kq ki kj kr kk kl ks km go" data-selectable-paragraph="">if you don’t have <strong class="kb kt">scapy</strong> installed , check the <a class="ct dv jv jw jx jy" href="https://scapy.readthedocs.io/en/latest/installation.html" target="_blank" rel="noopener nofollow noreferrer" data-mce-href="https://scapy.readthedocs.io/en/latest/installation.html">cap’s official documentation</a> for installation.</p><p id="c850" class="jz kn ap bx kb b kc kd ko ke kf kp kg kh kq ki kj kr kk kl ks km go" data-selectable-paragraph="">First, we gonna need to import essential methods fr</p><pre class="iy iz ja jb jc ny mw fh eye-protector-processed" style="background-color: #c1e6c6" data-mce-style="transition: background-color 0.3s ease 0s; background-color: #c1e6c6;"><span id="908f" class="pe pf ap bx pg b co ph pi r pj" data-selectable-paragraph=""><strong class="pg kt">from</strong> scapy.all <strong class="pg kt">import</strong> ARP, Ether, srp</span></pre><p id="ddad" class="jz kn ap bx kb b kc kd ko ke kf kp kg kh kq ki kj kr kk kl ks km go" data-selectable-paragraph="">Second, we gonna need to make an <a class="ct dv jv jw jx jy" href="https://en.wikipedia.org/wiki/Address_Resolution_Protocol" target="_blank" rel="noopener nofollow noreferrer" data-mce-href="https://en.wikipedia.org/wiki/Address_Resolution_Protocol">ARP request</a> as shown in the following <a href="http://www.trueffelhamster.de/wp-content/uploads/2020/12/lee-campbell-GI6L2pkiZgQ-unsplash-scaled.jpg" data-mce-href="http://www.trueffelhamster.de/wp-content/uploads/2020/12/lee-campbell-GI6L2pkiZgQ-unsplash-scaled.jpg">image</a>:</p><p class="jz kn ap bx kb b kc kd ko ke kf kp kg kh kq ki kj kr kk kl ks km go" data-selectable-paragraph=""><br></p><p id="b2a1" class="jz kn ap bx kb b kc kd ko ke kf kp kg kh kq ki kj kr kk kl ks km go" data-selectable-paragraph="">The network scanner will send the ARP request indicating who has some specific IP address, let’s say “192.168.1.1”, cccxzczc the owner of that IP address ( the target ) will automatically respond saying <strong>that</strong> he is “192.168.1.1”, with that response, the MAC address will also be included in the packet, this allows us to successfully retrieve all network users’ IP and MAC addresses simultaneously when we send a <a class="ct dv jv jw jx jy" href="https://en.wikipedia.org/wiki/Broadcasting_(networking)" target="_blank" rel="noopener nofollow noreferrer" data-mce-href="https://en.wikipedia.org/wiki/Broadcasting_(networking)">broadcast packet</a> ( sending a packet to all the devices in the network ).</p><p id="3cc1" class="jz kn ap bx kb b kc kd ko ke kf kp kg kh kq ki kj kr kk kl ks km go" data-selectable-paragraph="">The ARP response is demonstrated in the following figure:</p><p id="632b" class="jz kn ap bx kb b kc kd ko ke kf kp kg kh kq ki kj kr kk kl ks km go" data-selectable-paragraph="">So, let us craft these packets:</p><pre class="iy iz ja jb jc ny mw fh eye-protector-processed" style="background-color: #c1e6c6" data-mce-style="transition: background-color 0.3s ease 0s; background-color: #c1e6c6;"><span id="fa4b" class="pe pf ap bx pg b co ph pi r pj" data-selectable-paragraph="">target_ip = "192.168.1.1/24"<br># IP Address for the destination<br># create ARP packet<br>arp = ARP(pdst=target_ip)<br># create the Ether broadcast packet<br># ff:ff:ff:ff:ff:ff MAC address indicates broadcasting<br>ether = Ether(dst="ff:ff:ff:ff:ff:ff")<br># stack them<br>packet = ether/arp</span></pre><p id="705c" class="jz kn ap bx kb b kc kd ko ke kf kp kg kh kq ki kj kr kk kl ks km go" data-selectable-paragraph=""><em class="kw">Note: In case you sr with the notation “/24” or “/16” after the IP address, it is basically an IP range here, for example “192.168.1.1/24” is a range from “192.168.1.0” to “192.168.1.255”, please read more about </em><a class="ct dv jv jw jx jy" href="https://en.wikipedia.org/wiki/Classless_Inter-Domain_Routing" target="_blank" rel="noopener nofollow noreferrer" data-mce-href="https://en.wikipedia.org/wiki/Classless_Inter-Domain_Routing"><em class="kw">CIDR Notation</em></a></p><p id="214c" class="jz kn ap bx kb b kc kd ko ke kf kp kg kh kq ki kj kr kk kl ks km go" data-selectable-paragraph="">Now we have created these packets, we need to send them using function which sends and receives packets at layer 2, we set the timeout to 3 so the script won’t get stuck:</p><pre class="iy iz ja jb jc ny mw fh eye-protector-processed" style="background-color: #c1e6c6" data-mce-style="transition: background-color 0.3s ease 0s; background-color: #c1e6c6;"><span id="12a1" class="pe pf ap bx pg b co ph pi r pj" data-selectable-paragraph="">result = srp(packet, timeout=3)[0]</span></pre><p id="1854" class="jz kn ap bx kb b kc kd ko ke kf kp kg kh kq ki kj kr kk kl ks km go" data-selectable-paragraph=""><code>result now is a list of pairs that is of the format , let’s iterate over them:</code></p><pre class="iy iz ja jb jc ny mw fh eye-protector-processed" style="background-color: #c1e6c6" data-mce-style="transition: background-color 0.3s ease 0s; background-color: #c1e6c6;"><span id="6812" class="pe pf ap bx pg b co ph pi r pj" data-selectable-paragraph=""># a list <strong class="pg kt">of</strong> clients, we will fill <strong class="pg kt">this</strong> <strong class="pg kt">in</strong> the upcoming loop<br>clients = []<br><strong class="pg kt">for</strong> sent, received <strong class="pg kt">in</strong> result:<br> # <strong class="pg kt">for</strong> each response, append ip and mac address to `clients` list<br> clients.append({'ip': received.psrc, 'mac': received.hwsrc})</span></pre><h3 id="90e7" class="jz kn ap bx kb b kc kd ko ke kf kp kg kh kq ki kj kr kk kl ks km go">Now all we need to do is to print this list we have just filled:</h3><h5 class="iy iz ja jb jc ny mw fh eye-protector-processed" style="background-color: #c1e6c6" data-mce-style="transition: background-color 0.3s ease 0s; background-color: #c1e6c6;"><span id="95dc" class="pe pf ap bx pg b co ph pi r pj" data-selectable-paragraph=""># print clients<br>print("Available devices in the network:")<br>print("IP" + " "*18+"MAC")<br><strong class="pg kt">for</strong> client <strong class="pg kt">in</strong> clients:<br>print("{:16} {}".format(client['ip'], client['mac']))</span></h5><p id="3304" class="jz kn ap bx kb b kc kd ko ke kf kp kg kh kq ki kj kr kk kl ks km go" data-selectable-paragraph="">Full code:</p><pre class="iy iz ja jb jc ny mw fh eye-protector-processed" style="background-color: #c1e6c6" data-mce-style="transition: background-color 0.3s ease 0s; background-color: #c1e6c6;"><span id="6a72" class="pe pf ap bx pg b co ph pi r pj" data-selectable-paragraph=""></span>Here is a screenshot of my result in my personal network:<br><br><br><br><br></pre><p class="jz kn ap bx kb b kc kd ko ke kf kp kg kh kq ki kj kr kk kl ks km go" data-selectable-paragraph=""><br></p><pre class="language-python"><span class="token keyword">from</span> scapy<span class="token punctuation">.</span>all <span class="token keyword">import</span> ARP<span class="token punctuation">,</span> Ether<span class="token punctuation">,</span> srp
|
| Unchanged: target_ip <span class="token operator">=</span> <span class="token string">"192.168.1.1/24"</span> | Unchanged: target_ip <span class="token operator">=</span> <span class="token string">"192.168.1.1/24"</span> |
| Unchanged: <span class="token comment"># IP Address for the destination</span> | Unchanged: <span class="token comment"># IP Address for the destination</span> |
| Unchanged: <span class="token comment"># create ARP packet</span> | Unchanged: <span class="token comment"># create ARP packet</span> |
| Unchanged: arp <span class="token operator">=</span> ARP<span class="token punctuation">(</span>pdst<span class="token operator">=</span>target_ip<span class="token punctuation">)</span> | Unchanged: arp <span class="token operator">=</span> ARP<span class="token punctuation">(</span>pdst<span class="token operator">=</span>target_ip<span class="token punctuation">)</span> |
| Unchanged: <span class="token comment"># create the Ether broadcast packet</span> | Unchanged: <span class="token comment"># create the Ether broadcast packet</span> |
| Unchanged: <span class="token comment"># ff:ff:ff:ff:ff:ff MAC address indicates broadcasting</span> | Unchanged: <span class="token comment"># ff:ff:ff:ff:ff:ff MAC address indicates broadcasting</span> |
| Unchanged: ether <span class="token operator">=</span> Ether<span class="token punctuation">(</span>dst<span class="token operator">=</span><span class="token string">"ff:ff:ff:ff:ff:ff"</span><span class="token punctuation">)</span> | Unchanged: ether <span class="token operator">=</span> Ether<span class="token punctuation">(</span>dst<span class="token operator">=</span><span class="token string">"ff:ff:ff:ff:ff:ff"</span><span class="token punctuation">)</span> |
| Unchanged: <span class="token comment"># stack them</span> | Unchanged: <span class="token comment"># stack them</span> |
| Unchanged: packet <span class="token operator">=</span> ether<span class="token operator">/</span>arp | Unchanged: packet <span class="token operator">=</span> ether<span class="token operator">/</span>arp |
| Unchanged: result <span class="token operator">=</span> srp<span class="token punctuation">(</span>packet<span class="token punctuation">,</span> timeout<span class="token operator">=</span><span class="token number">3</span><span class="token punctuation">,</span> verbose<span class="token operator">=</span><span class="token number">0</span><span class="token punctuation">)</span><span class="token punctuation">[</span><span class="token number">0</span><span class="token punctuation">]</span> | Unchanged: result <span class="token operator">=</span> srp<span class="token punctuation">(</span>packet<span class="token punctuation">,</span> timeout<span class="token operator">=</span><span class="token number">3</span><span class="token punctuation">,</span> verbose<span class="token operator">=</span><span class="token number">0</span><span class="token punctuation">)</span><span class="token punctuation">[</span><span class="token number">0</span><span class="token punctuation">]</span> |
| Unchanged: <span class="token comment"># a list of clients, we will fill this in the upcoming loop</span> | Unchanged: <span class="token comment"># a list of clients, we will fill this in the upcoming loop</span> |
| Unchanged: clients <span class="token operator">=</span> <span class="token punctuation">[</span><span class="token punctuation">]</span> | Unchanged: clients <span class="token operator">=</span> <span class="token punctuation">[</span><span class="token punctuation">]</span> |
| Unchanged: <span class="token keyword">for</span> sent<span class="token punctuation">,</span> received <span class="token keyword">in</span> result<span class="token punctuation">:</span> | Unchanged: <span class="token keyword">for</span> sent<span class="token punctuation">,</span> received <span class="token keyword">in</span> result<span class="token punctuation">:</span> |
| Unchanged: <span class="token comment"># for each response, append ip and mac address to `clients` list</span> | Unchanged: <span class="token comment"># for each response, append ip and mac address to `clients` list</span> |
| Unchanged: clients<span class="token punctuation">.</span>append<span class="token punctuation">(</span><span class="token punctuation">{</span><span class="token string">'ip'</span><span class="token punctuation">:</span> received<span class="token punctuation">.</span>psrc<span class="token punctuation">,</span> <span class="token string">'mac'</span><span class="token punctuation">:</span> received<span class="token punctuation">.</span>hwsrc<span class="token punctuation">}</span><span class="token punctuation">)</span> | Unchanged: clients<span class="token punctuation">.</span>append<span class="token punctuation">(</span><span class="token punctuation">{</span><span class="token string">'ip'</span><span class="token punctuation">:</span> received<span class="token punctuation">.</span>psrc<span class="token punctuation">,</span> <span class="token string">'mac'</span><span class="token punctuation">:</span> received<span class="token punctuation">.</span>hwsrc<span class="token punctuation">}</span><span class="token punctuation">)</span> |
| Unchanged: <span class="token comment"># print clients</span> | Unchanged: <span class="token comment"># print clients</span> |
| Unchanged: <span class="token keyword">print</span><span class="token punctuation">(</span><span class="token string">"Available devices in the network:"</span><span class="token punctuation">)</span> | Unchanged: <span class="token keyword">print</span><span class="token punctuation">(</span><span class="token string">"Available devices in the network:"</span><span class="token punctuation">)</span> |
| Unchanged: <span class="token keyword">print</span><span class="token punctuation">(</span><span class="token string">"IP"</span> <span class="token operator">+</span> <span class="token string">" "</span><span class="token operator">*</span><span class="token number">18</span><span class="token operator">+</span><span class="token string">"MAC"</span><span class="token punctuation">)</span> | Unchanged: <span class="token keyword">print</span><span class="token punctuation">(</span><span class="token string">"IP"</span> <span class="token operator">+</span> <span class="token string">" "</span><span class="token operator">*</span><span class="token number">18</span><span class="token operator">+</span><span class="token string">"MAC"</span><span class="token punctuation">)</span> |
| Unchanged: <span class="token keyword">for</span> client <span class="token keyword">in</span> clients<span class="token punctuation">:</span> | Unchanged: <span class="token keyword">for</span> client <span class="token keyword">in</span> clients<span class="token punctuation">:</span> |
| Unchanged: <span class="token keyword">print</span><span class="token punctuation">(</span><span class="token string">"{:16} {}"</span><span class="token punctuation">.</span>format<span class="token punctuation">(</span>client<span class="token punctuation">[</span><span class="token string">'ip'</span><span class="token punctuation">]</span><span class="token punctuation">,</span> client<span class="token punctuation">[</span><span class="token string">'mac'</span><span class="token punctuation">]</span><span class="token punctuation">)</span><span class="token punctuation">)</span></pre><p id="e6e3" class="jz kn ap bx kb b kc kd ko ke kf kp kg kh kq ki kj kr kk kl ks km go" data-selectable-paragraph="">Alright, we are done with this tutorial, see how you can extend this and make it more convenient to replace other scanning tools. HÄÄÄÄ</p></div></div></section><hr class="kz fo la lb cl fw fr lc ld le lf lg"><section class="go gp hj hk hl"><div class="n p"><div class="z ab ac ae af hm ah ai"><p id="d65e" class="jz kn ap bx kb b kc kd ko ke kf kp kg kh kq ki kj kr kk kl ks km go" data-selectable-paragraph=""><em class="kw">Originally published at </em><a class="ct dv jv jw jx jy" href="https://pgsyr.de/stories/make-a-network-scanner-using-scapy-library-in-python/" target="_blank" rel="noopener nofollow noreferrer" data-mce-href="https://pgsyr.de/stories/make-a-network-scanner-using-scapy-library-in-python/"><em class="kw">https://pgsyr.de</em></a><em class="kw"> on March 13, 2020.</em></p></div></div></section></div></article><div class="nw hi lh gg ai li lj pk" data-test-id="post-sidebar"><div class="n p"><div class="z ab ac ae af ag ah ai"><div class="lp n lq"><div class="qn"><div class="lr ls lt n"><div class="n o"><div class="r cq lu lv lw lx ly"><div class=""><div><div class="ck" role="tooltip" aria-hidden="true" aria-describedby="26" aria-labelledby="26"><div class="bl lz ma mb mc md me mf q mg mh mi"><br></div></div></div></div></div><div class="r mj mk ml mm mn mo mp"><div class="mq"><br></div></div></div></div></div></div></div></div></div><div><div class="mr jd n lq p"><div class="n p"><div class="z ab ac ae af hm ah ai"><div class="mz n eu y"><div class="n pl"><div class="r po pp pq pr ps"><br></div></div><div class="n o"><div class="iv r bv"><br></div><div class="iv r bv"><br></div><div class="iv r bv"><br></div><div class="na r bv"><div><div class="ft"><div><div class="ck" role="tooltip" aria-hidden="true" aria-describedby="29" aria-labelledby="29"><br></div></div></div></div></div><div class="ck" aria-hidden="true"><div class="r bv"><br></div></div></div></div><div class="nb nc nd ms r pt y"><div class="r g"><div class="nf ng r cq"><br></div></div></div></div></div></div></div> | Unchanged: <span class="token keyword">print</span><span class="token punctuation">(</span><span class="token string">"{:16} {}"</span><span class="token punctuation">.</span>format<span class="token punctuation">(</span>client<span class="token punctuation">[</span><span class="token string">'ip'</span><span class="token punctuation">]</span><span class="token punctuation">,</span> client<span class="token punctuation">[</span><span class="token string">'mac'</span><span class="token punctuation">]</span><span class="token punctuation">)</span><span class="token punctuation">)</span></pre><p id="e6e3" class="jz kn ap bx kb b kc kd ko ke kf kp kg kh kq ki kj kr kk kl ks km go" data-selectable-paragraph="">Alright, we are done with this tutorial, see how you can extend this and make it more convenient to replace other scanning tools. HÄÄÄÄ</p></div></div></section><hr class="kz fo la lb cl fw fr lc ld le lf lg"><section class="go gp hj hk hl"><div class="n p"><div class="z ab ac ae af hm ah ai"><p id="d65e" class="jz kn ap bx kb b kc kd ko ke kf kp kg kh kq ki kj kr kk kl ks km go" data-selectable-paragraph=""><em class="kw">Originally published at </em><a class="ct dv jv jw jx jy" href="https://pgsyr.de/stories/make-a-network-scanner-using-scapy-library-in-python/" target="_blank" rel="noopener nofollow noreferrer" data-mce-href="https://pgsyr.de/stories/make-a-network-scanner-using-scapy-library-in-python/"><em class="kw">https://pgsyr.de</em></a><em class="kw"> on March 13, 2020.</em></p></div></div></section></div></article><div class="nw hi lh gg ai li lj pk" data-test-id="post-sidebar"><div class="n p"><div class="z ab ac ae af ag ah ai"><div class="lp n lq"><div class="qn"><div class="lr ls lt n"><div class="n o"><div class="r cq lu lv lw lx ly"><div class=""><div><div class="ck" role="tooltip" aria-hidden="true" aria-describedby="26" aria-labelledby="26"><div class="bl lz ma mb mc md me mf q mg mh mi"><br></div></div></div></div></div><div class="r mj mk ml mm mn mo mp"><div class="mq"><br></div></div></div></div></div></div></div></div></div><div><div class="mr jd n lq p"><div class="n p"><div class="z ab ac ae af hm ah ai"><div class="mz n eu y"><div class="n pl"><div class="r po pp pq pr ps"><br></div></div><div class="n o"><div class="iv r bv"><br></div><div class="iv r bv"><br></div><div class="iv r bv"><br></div><div class="na r bv"><div><div class="ft"><div><div class="ck" role="tooltip" aria-hidden="true" aria-describedby="29" aria-labelledby="29"><br></div></div></div></div></div><div class="ck" aria-hidden="true"><div class="r bv"><br></div></div></div></div><div class="nb nc nd ms r pt y"><div class="r g"><div class="nf ng r cq"><br></div></div></div></div></div></div></div> |