This is a simple analysis of their own pcap file, easy to read Pcap file, we refer to the use of the bar
Copy Code code as follows:
InputStream is = DataParser.class.getClassLoader (). getResourceAsStream ("Baidu_cdr.pcap");
Pcap
Pcap is a data packet capture library, which is used by many software as a data packet capture tool. Wireshark also uses the pcap library to capture data packets. The packets captured by pcap are not the original network byte streams, but are assembled to form a new data format.The file format of a data packet captured
Through the TCP/IP protocol learning, I wrote a can achieve the Pcap file in the IPV4 TCP stream extraction, as well as extract the specified TCP stream, in order to learn, did not adopt the third party package parsing pcap, but the analysis of the bytes stream, the core idea is: If you want to extract TCP Content, in the lower-level IPV4 protocol to determine wh
Preface
The data structure has already been defined, so it's time to formally parse the Pcap file.Note: The following only the core code, the project all the code will be at the end of the article to give the download link Resolution pcap file
1 Read the entire Pcap file to
HTTP packets in the PCAP package can be easily parsed using scapy, scapy_httpScapy_http can be downloaded in https://github.com/invernizzi/scapy-http, the address is also given a simple example program, according to this sample program I modified an output PCAP packet in the source destination address of the HTTP packet, The payload applet is as follows:where P is a packet, scapy_http divides it into:Ethern
The pcap file format is the format in which BPF saves the original data packets. Many software applications are used, such as tcpdump and Wireshark. Understanding the pcap format can enhance understanding of the original data packets, you can also manually construct any data packet for testing.
The pcap
Pcap File Format
Classification: Comprehensive Technology
Transfer http://songwensheng.javaeye.com/blog/674686
Pcap File Format: The pcap file format is the format in which bpf saves the original data packet. Many software appl
pcap_open () function.Snaplen. For exampleSnaplen= 65535, the four bytes become FF 00.
Then, the network type is recorded in 4 bytes. For example, 1 in decimal format indicates Ethernet, 6 indicates the ring-based network, and 15 indicates the hardware format of Frame Relay. Generally, in an Ethernet environment, the four bytes are 01 00 00.
The above fields are part of the file header, followed by data packets. Each packet has a corresponding 16-
The following describes the default *. pcap file storage format of ethereal.
Description of each field in the pcap File Header 24B:Magic: 4b: 0x1a 2B 3C 4d: used to mark the start of the file Major: 2b, 0x02 00: The main version number of the current
Pcap file format Analysis
I. Basic Format:File header data packet ......
Ii. File Header structure:Sturct pcap_file_header {DWORD magic; Word version_major; Word version_minor; DWORD thiszone; DWORD sigfigs; DWORD snaplen; DWORD linktype;} Description: 1. identifier: 32-bit, the value of this flag is 0xa1b2c3d4 in hexadecimal notation. A 32-bit magic number, the
.
For definitions, see http :\\
3. Block length (16 bit)
The block length includes chunk type, Chunk flags, Chunk length, and Chunk value.
4. Block Value (variable length)
The block value content transmits the actual information in the block. The content is determined by the message block type. The length of the block value is not long.Sctp struct Definition
// Sctp header typedef struct _ sctp_header {_ int16 srcport; _ int16 dstport; _ int32 ivertag; _ int32 ichecksum;} _ sctpheader; // chunk
A long time ago, I made a little thing for the mentor to use for RE, which will convert the vertex cloud and the IG file.
I have learned about the formats of the IG file. I have never liked exclusive sharing, so I will share it with you. I did not expect many people to pay attention to it. Thank you very much for your mutual learning.
By chance, I found that there is now a free
Large Text File Viewer 5.2-Features
Features| Screenshots | download
Have you ever felt frustrated when you just want to look at the content of a large text file but it takes forever for notepad or word to open it?
This program was designed for viewing large (> 1 GB) text files.
It uses little memory and is able to open a gigabyte
Problem description: In the XP system where Visio Viewer 2003 is installed, double-click the. Sealing file to jump out of IE and select allow active running. A Red Cross is displayed and cannot be opened.
Cause: Microsoft's kb973525 caused
Solution:
1. Retain Visio Viewer 2003 to uninstall the system patch kb9735252. Install the following system patches to uninst
In view of some previous user feedback MindManager export PDF (Mindjet Viewer) file prompts: "MindManager cannot create Mindjet Viewer file," for the following analysis and summary of possible situations, Help the user resolve the issue of failed export PDF. (If you don't know how to export, you can refer to how to use
Overview of editing configuration files:
For the browser of the Flex application ArcGIS, You can edit the configuration and customize the xml configuration file. These XML files (. XML extension) has a simple structure of XML tags and attributes. They can use Notepad for editing, textpad, or any XML editor program.
There are two configuration file types:
Browser configuration
necessary to understand the file format to be processed, so that the prototype of this tool appears in my mind, and then I will create it first.
TheSource codeDownload link:
Http://files.cnblogs.com/hoodlum1980/BmpFileView_Src.rar
[Reference :]
For the treelist control, search for treelist on the codeproject website. Because I have made a lot of modifications and improvements to the original control, if you need this control, I suggest u
modified time of the file//or--time=mtime or--time=modify only change the change time-T: Set the timestamp of the file (month and day), use//or with a, m to use the specified date time instead of the current time.-D: Use the specified date time instead of the current time.Each file has three timestamps:Atime: The last time the
Plugin download, installation and configuration in Eclipse can refer to my other article: MyEclipse anti-compile class fileThe following highlights how to use Jad to decompile1. In the DOS window, to the directory where class is located, run >jad Db.class directly, and the Db.jad file will be generated in that directory. Run >jad-sjava Db.class, the Db.java file will be generated in this directory2. Using t
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.