PPPoE protocol Attack 4: How to get the MAC address of the PPPoE server

Source: Internet
Author: User

In the local area network, how to get the MAC address of the PPPoE server is a headache, especially in the Windows environment; There are two ways to get the PPPoE server MAC address:


1. Under Windows, we run the Wireshark software, we can get all the packet format and content in and out of the network card, the Wireshark filter is set to PPPoE filter, and then the empty user name password dial, you can see the PPPoE discovery phase of 4 packets, Specific implementation methods Please Google search, online tutorials a lot.


2. Can write a Python program, first send a PADI packet, then the PPPoE server will reply to a PADR packet, according to this packet can be to the PPPoE server MAC address. The Python code is as follows:

From scapy.all Import * #定义PPPoE数据包的格式def packet (code=0x09,len=0,macadd= ' FF:FF:FF:FF:FF:FF '): A=ether ()/pppoe ()        A.dst=macadd a.type=0x8863 a.payload.version=1 a.payload.type=1 A.payload.code=code A.payload.len=len return a# send PADR packet SENDP (packet (code=0x09)) #嗅探网卡得到的数据c =sniff (filter= ' pppoed ', count=1) # Data packets returned by the PPPoE server (MAC address of the server) C[0].show ()


This article is from the Python applet blog, so be sure to keep this source http://mdh6789.blog.51cto.com/7270513/1569861

PPPoE protocol Attack 4: How to get the MAC address of the PPPoE server

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.