ARP Scan penetration test scapy module using python

Source: Internet
Author: User

ARP scan penetration test

Task Description:


Assuming that the contestants are Taojin e-commerce Enterprise Information System Security Engineer, responsible for the enterprise Information System security maintenance, is to the system in the host ARP scanning penetration test, to confirm that the system has what IP host online.



1. Enter the virtual machine operating system:/root directory in Ubuntu Linux 32bit, complete the arp_ in this directory sweep.py file, fill in the file of the empty Flag1 string, the string as the flag value (form: FLAG1 string) submitted; (Arp_sweep.py script function See the 6th Question of the task)

2. Enter the virtual machine operating system:/root directory in Ubuntu Linux 32bit, complete the arp_ in this directory sweep.py file, fill in the file of the empty Flag2 string, the string as the flag value (form: FLAG2 string) submitted; (Arp_sweep.py script function See the 6th Question of the task)

3. Enter the virtual machine operating system:/root directory in Ubuntu Linux 32bit, complete the arp_ in this directory sweep.py file, fill in the file of the empty Flag3 string, the string as the flag value (form: FLAG3 string) submitted; (Arp_sweep.py script function See the 6th Question of the task)

4. Enter the virtual machine operating system:/root directory in Ubuntu Linux 32bit, complete the arp_ in this directory sweep.py file, fill in the file of the empty Flag4 string, the string as the flag value (form: FLAG4 string) submitted; (Arp_sweep.py script function See the 6th Question of the task)

5. Enter the virtual machine operating system:/root directory in Ubuntu Linux 32bit, complete the arp_ in this directory sweep.py file, fill in the file of the empty Flag5 string, the string as the flag value (form: FLAG5 string) submitted; (Arp_sweep.py script function See the 6th Question of the task)

6. Perform arp_ under virtual machine operating system: Ubuntu Linux 32bit sweep.py file, the server scene of the ARP scanning penetration test; After the file is executed, the 1th character of Line 1th and the 1th character of line 2nd are used as the flag value (form: 1th character of 1th Line, 2nd character of 1th line);


I've never been in touch with programming for two weeks. The problem is finally understood by the evil supplement. You can complete the task by using the Scapy module in the main description.


#encoding =utf-8from scapy.all import *import sys#qq:726361158def worker ():     ip_list=[]    for ipfix in range (1,255):         ip= "172.16.1." +str (IpFix)         arppkt = ether (dst= "ff:ff:ff:ff:ff:ff")/ ARP (pdst=ip, hwdst= "Ff:ff:ff:ff:ff:ff")         res =  SRP1 (arppkt, timeout=1, verbose=false)         if res:             print  "ip: "  +  res.psrc +  "     MAC: "  + res.hwsrc             ip_list.append (RES.PSRC)     return ip _listif __name__== "__main__":     fp = open ('/root/ip.tXT ', ' W ')     ip_list = worker ()     i = 0     for ip in ip_list:        fp.write (IP + ' \ n ')         i+=1    print (' over ... ')      print ("ip num:%d"%i)     fp.close ()


ARP Scan penetration test scapy module using python

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.