奇怪的广播

起因是抓IPTV,移动光猫 接 交换机8口,本机电脑 接 交换机7口,本机开wireshark,捕获过滤器用mac过滤掉移动光猫、本机和交换机的所有报文:

1
!ether host 00:D8:61:xx:xx:xx && !ether host CC:ED:21:xx:xx:xx && !ether host 58:41:20:xx:xx:xx

发现怎么还有东西一直在广播,mac是00:00:00:00:00:12。wireshark每隔约5s抓到一个broadcast:

No. Source Destination Protocal Length Info
1 00:00:00_00:00:12 Broadcast 0xfffa 72 Ethernet II
2 00:00:00_00:00:12 Broadcast 0xfffa 72 Ethernet II
3 00:00:00_00:00:12 Broadcast 0xfffa 72 Ethernet II
…… …… …… …… …… ……

看一个完整报文:

1
2
3
4
5
0000   ff ff ff ff ff ff 00 00 00 00 00 12 ff fa 00 00   ................
0010 00 03 cc ed 21 c0 dc e8 49 6e 20 74 68 65 20 67 ....!...In the g
0020 61 70 20 61 20 6e 65 77 20 74 6f 6f 74 68 20 67 ap a new tooth g
0030 72 65 77 2c 00 00 00 00 00 00 00 00 00 00 00 00 rew,............
0040 00 00 00 00 00 00 00 00 ........

其中广播带有58个bytes的data:

1
......!...In the gap a new tooth grew,....................

我抓了100个之后在wireshark存为unknown_broadcast.txt,用sed提取出data的文本内容并拼接起来:

1
sed -n '/^00[012]0[ ]*/p' unknown_broadcast.txt | sed -n 's/^.*\(.\{17\}$\)/\1/p'| sed 's/^\(\.*!\.*\)*\([^.]*\)\(\.*\)*/\2/'| sed ':a;N;s/\r\n//;t a'

(ps:sed的正则怎么用不了非贪婪)

(ps:sed的正则怎么匹配不了行尾$)

1
In the gap a new tooth grew,And now it makes me wonder,If people are like teeth tooThe day I lost my very first tooth,Was halfway through grade four,I'd run my tongue along the gap,Where my tooth had been before,I remember I went home crying,And showed it to my mum,She told me that a brand new tooth,Would grow up in my gum,In a while the gap would stop feeling I wouldn't notice the tooth was gone,The only reason I missed it now,Was because it was there for so long,Then slowly but surely over the weeks,In the gap a new tooth grew,And now it makes me wonder,If people are like teeth tooThe day I lost my very first tooth,Was halfway through grade four,I'd run my tongue along the gap,Where my tooth had been before,I remember I went home crying,And showed it to my mum,She told me that a brand new tooth,Would grow up in my gum,In a while the gap would stop feeling I wouldn't notice the tooth was gone,The only reason I missed it now,Was because it was there for so long,Then slowly but surely over the weeks,In the gap a new tooth grew,And now it makes me wonder,If people are like teeth tooThe day I lost my very first tooth,Was halfway through grade four,I'd run my tongue along the gap,Where my tooth had been before,I remember I went home crying,And showed it to my mum,She told me that a brand new tooth,Would grow up in my gum,In a while the gap would stop feeling I wouldn't notice the tooth was gone,The only reason I missed it now,Was because it was there for so long,Then slowly but surely over the weeks,In the gap a new tooth grew,And now it makes me wonder,If people are like teeth tooThe day I lost my very first tooth,Was halfway through grade four,I'd run my tongue along the gap,Where my tooth had been before,I remember I went home crying,And showed it to my mum,She told me that a brand new tooth,Would grow up in my gum,In a while the gap would stop feeling I wouldn't notice the tooth was gone,The only reason I missed it now,Was because it was there for so long,Then slowly but surely over the weeks,In the gap a new tooth grew,And now it makes me wonder,If people are like teeth tooThe day I lost my very first tooth,Was halfway through grade four,I'd run my tongue along the gap,Where my tooth had been before,I remember I went home crying,And showed it to my mum,She told me that a brand new tooth,Would grow up in my gum,In a while the gap would stop feeling I wouldn't notice the tooth was gone,The only reason I missed it now,Was because it was there for so long,Then slowly but surely over the weeks,In the gap a new tooth grew,And now it makes me wonder,If people are like teeth tooThe day I lost my very first tooth,Was halfway through grade four,I'd run my tongue along the gap,Where my tooth had been before,I remember I went home crying,And showed it to my mum,She told me that a brand new tooth,Would grow up in my gum,In a while the gap would stop feeling I wouldn't notice the tooth was gone,The only reason I missed it now,Was because it was there for so long,Then slowly but surely over the weeks,In the gap a new tooth grew,And now it makes me wonder,If people are like teeth tooThe day I lost my very first tooth,

手动去掉重复片段整理:

1
The day I lost my very first tooth,Was halfway through grade four,I'd run my tongue along the gap,Where my tooth had been before,I remember I went home crying,And showed it to my mum,She told me that a brand new tooth,Would grow up in my gum,In a while the gap would stop feeling I wouldn't notice the tooth was gone,The only reason I missed it now,Was because it was there for so long,Then slowly but surely over the weeks,In the gap a new tooth grew,And now it makes me wonder,If people are like teeth too. 

拿上面这小作文一搜,发现是首诗。。。。。换下行:

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
The day I lost my very first tooth,
Was halfway through grade four,
I'd run my tongue along the gap,
Where my tooth had been before,
I remember I went home crying,
And showed it to my mum,
She told me that a brand new tooth,
Would grow up in my gum,
In a while the gap would stop feeling
I wouldn't notice the tooth was gone,
The only reason I missed it now,
Was because it was there for so long,
Then slowly but surely over the weeks,
In the gap a new tooth grew,
And now it makes me wonder,
If people are like teeth too

怎么我抓出来的跟搜出来的差一个词,In a while the gap would stop feeling strange这句,我的怎么没有strange,手动去翻了一下unknown_broadcast.txt,发现是有strange的,检查发现是sed写错了,改为:

1
sed -n 's/^00[0123]0[ ]\{2,\}.*[ ]\{2,\}\([\.]*\)/\1/p' unknown_broadcast.txt | sed 's/^\(\.*!\.*\)*\([^.]*\)\(\.*\)*/\2/' | sed '/^[ ]\{3,\}/d' | sed ':a;N;s/\r\n//;t a'

谷歌翻译下这首诗:

在我失去第一颗牙齿的那天,
四年级上到一半,
我会沿着缝隙伸出舌头,
我以前的牙齿在哪里,
我记得我哭着回家,
并把它展示给我妈妈,
她告诉我,一颗崭新的牙齿,
会在我的口香糖里长大,
过一会儿,差距就不再奇怪了,
我不会注意到牙齿掉了,
我现在错过的唯一原因,
是因为它存在了那么久,
然后在几周内缓慢但肯定地,
缝隙里长出了一颗新牙,
现在它让我想知道,
如果人也像牙齿