标题:求大神指导如何从txt文件读取数据
只看楼主
georgefz
Rank: 1
等 级:新手上路
帖 子:10
专家分:0
注 册:2016-6-14
结帖率:66.67%
已结贴  问题点数:30 回复次数:2 
求大神指导如何从txt文件读取数据
请问如何编程把这些数据分类并能放在excel表格里进行分析?




No.     Time        Source                Destination           Protocol Info
      1 0.000000    192.168.1.19          192.168.1.20          ICMP     Echo (ping) request

Frame 1 (74 bytes on wire, 74 bytes captured)
Ethernet II, Src: Dell_36:f8:7c (00:24:e8:36:f8:7c), Dst: 00:26:2d:2f:4d:18 (00:26:2d:2f:4d:18)
Internet Protocol, Src: 192.168.1.19 (192.168.1.19), Dst: 192.168.1.20 (192.168.1.20)
Internet Control Message Protocol

0000  00 26 2d 2f 4d 18 00 24 e8 36 f8 7c 08 00 45 00   .&-/M..$.6.|..E.
0010  00 3c 0a bb 00 00 80 01 ac 8e c0 a8 01 13 c0 a8   .<..............
0020  01 14 08 00 47 0d 00 01 06 4e 61 62 63 64 65 66   ....G....Nabcdef
0030  67 68 69 6a 6b 6c 6d 6e 6f 70 71 72 73 74 75 76   ghijklmnopqrstuv
0040  77 61 62 63 64 65 66 67 68 69                     wabcdefghi

No.     Time        Source                Destination           Protocol Info
      2 0.000073    192.168.1.20          192.168.1.19          ICMP     Echo (ping) reply

Frame 2 (74 bytes on wire, 74 bytes captured)
Ethernet II, Src: 00:26:2d:2f:4d:18 (00:26:2d:2f:4d:18), Dst: Dell_36:f8:7c (00:24:e8:36:f8:7c)
Internet Protocol, Src: 192.168.1.20 (192.168.1.20), Dst: 192.168.1.19 (192.168.1.19)
Internet Control Message Protocol

0000  00 24 e8 36 f8 7c 00 26 2d 2f 4d 18 08 00 45 00   .$.6.|.&-/M...E.
0010  00 3c 26 89 00 00 80 01 90 c0 c0 a8 01 14 c0 a8   .<&.............
0020  01 13 00 00 4f 0d 00 01 06 4e 61 62 63 64 65 66   ....O....Nabcdef
0030  67 68 69 6a 6b 6c 6d 6e 6f 70 71 72 73 74 75 76   ghijklmnopqrstuv
0040  77 61 62 63 64 65 66 67 68 69                     wabcdefghi

No.     Time        Source                Destination           Protocol Info
      3 1.013948    192.168.1.19          192.168.1.20          ICMP     Echo (ping) request

Frame 3 (74 bytes on wire, 74 bytes captured)
Ethernet II, Src: Dell_36:f8:7c (00:24:e8:36:f8:7c), Dst: 00:26:2d:2f:4d:18 (00:26:2d:2f:4d:18)
Internet Protocol, Src: 192.168.1.19 (192.168.1.19), Dst: 192.168.1.20 (192.168.1.20)
Internet Control Message Protocol

0000  00 26 2d 2f 4d 18 00 24 e8 36 f8 7c 08 00 45 00   .&-/M..$.6.|..E.
0010  00 3c 0a bc 00 00 80 01 ac 8d c0 a8 01 13 c0 a8   .<..............
0020  01 14 08 00 47 0c 00 01 06 4f 61 62 63 64 65 66   ....G....Oabcdef
0030  67 68 69 6a 6b 6c 6d 6e 6f 70 71 72 73 74 75 76   ghijklmnopqrstuv
0040  77 61 62 63 64 65 66 67 68 69                     wabcdefghi

No.     Time        Source                Destination           Protocol Info
      4 1.014049    192.168.1.20          192.168.1.19          ICMP     Echo (ping) reply

Frame 4 (74 bytes on wire, 74 bytes captured)
Ethernet II, Src: 00:26:2d:2f:4d:18 (00:26:2d:2f:4d:18), Dst: Dell_36:f8:7c (00:24:e8:36:f8:7c)
Internet Protocol, Src: 192.168.1.20 (192.168.1.20), Dst: 192.168.1.19 (192.168.1.19)
Internet Control Message Protocol

0000  00 24 e8 36 f8 7c 00 26 2d 2f 4d 18 08 00 45 00   .$.6.|.&-/M...E.
0010  00 3c 26 8a 00 00 80 01 90 bf c0 a8 01 14 c0 a8   .<&.............
0020  01 13 00 00 4f 0c 00 01 06 4f 61 62 63 64 65 66   ....O....Oabcdef
0030  67 68 69 6a 6b 6c 6d 6e 6f 70 71 72 73 74 75 76   ghijklmnopqrstuv
0040  77 61 62 63 64 65 66 67 68 69                     wabcdefghi

No.     Time        Source                Destination           Protocol Info
      5 2.027872    192.168.1.19          192.168.1.20          ICMP     Echo (ping) request

Frame 5 (74 bytes on wire, 74 bytes captured)
Ethernet II, Src: Dell_36:f8:7c (00:24:e8:36:f8:7c), Dst: 00:26:2d:2f:4d:18 (00:26:2d:2f:4d:18)
Internet Protocol, Src: 192.168.1.19 (192.168.1.19), Dst: 192.168.1.20 (192.168.1.20)
Internet Control Message Protocol

0000  00 26 2d 2f 4d 18 00 24 e8 36 f8 7c 08 00 45 00   .&-/M..$.6.|..E.
0010  00 3c 0a bd 00 00 80 01 ac 8c c0 a8 01 13 c0 a8   .<..............
0020  01 14 08 00 47 0b 00 01 06 50 61 62 63 64 65 66   ....G....Pabcdef
0030  67 68 69 6a 6b 6c 6d 6e 6f 70 71 72 73 74 75 76   ghijklmnopqrstuv
0040  77 61 62 63 64 65 66 67 68 69                     wabcdefghi

No.     Time        Source                Destination           Protocol Info
      6 2.027947    192.168.1.20          192.168.1.19          ICMP     Echo (ping) reply

Frame 6 (74 bytes on wire, 74 bytes captured)
Ethernet II, Src: 00:26:2d:2f:4d:18 (00:26:2d:2f:4d:18), Dst: Dell_36:f8:7c (00:24:e8:36:f8:7c)
Internet Protocol, Src: 192.168.1.20 (192.168.1.20), Dst: 192.168.1.19 (192.168.1.19)
Internet Control Message Protocol

0000  00 24 e8 36 f8 7c 00 26 2d 2f 4d 18 08 00 45 00   .$.6.|.&-/M...E.
0010  00 3c 26 8b 00 00 80 01 90 be c0 a8 01 14 c0 a8   .<&.............
0020  01 13 00 00 4f 0b 00 01 06 50 61 62 63 64 65 66   ....O....Pabcdef
0030  67 68 69 6a 6b 6c 6d 6e 6f 70 71 72 73 74 75 76   ghijklmnopqrstuv
0040  77 61 62 63 64 65 66 67 68 69                     wabcdefghi

No.     Time        Source                Destination           Protocol Info
      7 3.041796    192.168.1.19          192.168.1.20          ICMP     Echo (ping) request

Frame 7 (74 bytes on wire, 74 bytes captured)
Ethernet II, Src: Dell_36:f8:7c (00:24:e8:36:f8:7c), Dst: 00:26:2d:2f:4d:18 (00:26:2d:2f:4d:18)
Internet Protocol, Src: 192.168.1.19 (192.168.1.19), Dst: 192.168.1.20 (192.168.1.20)
Internet Control Message Protocol

0000  00 26 2d 2f 4d 18 00 24 e8 36 f8 7c 08 00 45 00   .&-/M..$.6.|..E.
0010  00 3c 0a be 00 00 80 01 ac 8b c0 a8 01 13 c0 a8   .<..............
0020  01 14 08 00 47 0a 00 01 06 51 61 62 63 64 65 66   ....G....Qabcdef
0030  67 68 69 6a 6b 6c 6d 6e 6f 70 71 72 73 74 75 76   ghijklmnopqrstuv
0040  77 61 62 63 64 65 66 67 68 69                     wabcdefghi

No.     Time        Source                Destination           Protocol Info
      8 3.041871    192.168.1.20          192.168.1.19          ICMP     Echo (ping) reply

Frame 8 (74 bytes on wire, 74 bytes captured)
Ethernet II, Src: 00:26:2d:2f:4d:18 (00:26:2d:2f:4d:18), Dst: Dell_36:f8:7c (00:24:e8:36:f8:7c)
Internet Protocol, Src: 192.168.1.20 (192.168.1.20), Dst: 192.168.1.19 (192.168.1.19)
Internet Control Message Protocol

0000  00 24 e8 36 f8 7c 00 26 2d 2f 4d 18 08 00 45 00   .$.6.|.&-/M...E.
0010  00 3c 26 8c 00 00 80 01 90 bd c0 a8 01 14 c0 a8   .<&.............
0020  01 13 00 00 4f 0a 00 01 06 51 61 62 63 64 65 66   ....O....Qabcdef
0030  67 68 69 6a 6b 6c 6d 6e 6f 70 71 72 73 74 75 76   ghijklmnopqrstuv
0040  77 61 62 63 64 65 66 67 68 69                     wabcdefghi

No.     Time        Source                Destination           Protocol Info
      9 4.055744    192.168.1.19          192.168.1.20          ICMP     Echo (ping) request

Frame 9 (74 bytes on wire, 74 bytes captured)
Ethernet II, Src: Dell_36:f8:7c (00:24:e8:36:f8:7c), Dst: 00:26:2d:2f:4d:18 (00:26:2d:2f:4d:18)
Internet Protocol, Src: 192.168.1.19 (192.168.1.19), Dst: 192.168.1.20 (192.168.1.20)
Internet Control Message Protocol

0000  00 26 2d 2f 4d 18 00 24 e8 36 f8 7c 08 00 45 00   .&-/M..$.6.|..E.
0010  00 3c 0a bf 00 00 80 01 ac 8a c0 a8 01 13 c0 a8   .<..............
0020  01 14 08 00 47 09 00 01 06 52 61 62 63 64 65 66   ....G....Rabcdef
0030  67 68 69 6a 6b 6c 6d 6e 6f 70 71 72 73 74 75 76   ghijklmnopqrstuv
0040  77 61 62 63 64 65 66 67 68 69                     wabcdefghi
搜索更多相关主题的帖子: Internet 如何 
2016-08-02 11:18
平常心q
Rank: 7Rank: 7Rank: 7
等 级:黑侠
威 望:7
帖 子:120
专家分:550
注 册:2016-3-31
得分:21 
读取文件:fread(buffer,size,1,f_open);
2016-08-02 11:41
georgefz
Rank: 1
等 级:新手上路
帖 子:10
专家分:0
注 册:2016-6-14
得分:0 
回复 2楼 平常心q
还要分类啊
2016-08-02 11:48



参与讨论请移步原网站贴子:https://bbs.bccn.net/thread-467439-1-1.html




关于我们 | 广告合作 | 编程中国 | 清除Cookies | TOP | 手机版

编程中国 版权所有,并保留所有权利。
Powered by Discuz, Processed in 0.605978 second(s), 8 queries.
Copyright©2004-2024, BCCN.NET, All Rights Reserved