Wireshark captures local loopback packets and retrieves data

Source: Internet
Author: User

I. The NPF driver isn' t running

This error occurs because the NPF service is not enabled.

Netgroup Packet Filter (NPF) is the core component of Winpcap. It is a component of Winpcap for hard work. It processes packets transmitted over the network and provides user-level capture, injection, and analysis capabilities ).

It not only provides basic features (such as packet capture), but also more advanced features (such as programmable filter systems ). The former can be used to restrict a packet capture session to only one subset of network communication. The latter provides a powerful and simple network traffic statistics mechanism.

The solution is as follows:

(1) Ensure that you have installed WinPcap (this will prompt you to install Wireshark) can also download from the official website: Address: http://www.winpcap.org/

(2) Enter "net start npf" at the command prompt to indicate that the driver service is successfully enabled. As shown in:

If you want to disable the service, enter: net stop npf.


2. Capture local loopback data

In windows, enter the following statement in the command line:
Copy codeThe Code is as follows:
Route add 192.168.1.106 mask 255.255.255.255 192.168.1.1metric 1

192.168.1.106 is the local ip address and 192.168.1.1 is the routing gateway. The rest remains unchanged.

Note: When establishing a connection, you must use the IP address 192.168.1.106 of the local machine. You cannot use 127.0.0.1, for example:
Copy codeThe Code is as follows:
Socket. Connect ("192.168.1.106", 4530 );

Related Article

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.