#! /Bin/shechotemp.1echotemp. 3 # There is no limit on how many msn packet tcpdump-f-lnx-s0host192.168.0.1andport1863temp.0lines 'cattemp. 0 | wc-l 'line1while [$ line-le $ lines] do # get the time, ip address, and other information for memo.
#! /Bin/sh
Echo ""> temp.1
Echo ""> temp.3
# The number of msn packets is not limited here
Tcpdump-F-lnx-s 0 host 192.168.0.1 and port 1863> temp.0
Lines = 'cat temp.0 | wc-L'
Line = 1
While [$ line-le $ lines]
Do
# Obtain information such as the time-based ip address.
Memo = 'SED-n' "$ line" 'P' temp.0 | gawk '{if (!~ /^ 0x/) print ,,,,,,,,,,,""}''
Memo = $ "aaaaaaaa"
If ["$ memo" = "aaaaaaaa"]
Then
# Truncate the data part of a data packet
Out = 'SED-n' "$ line" 'P' temp.0 | cut-c "11-14, 16-19, 21-24, 26-29, 31-34, 36-39, 41-44, 46-49 "'
Echo-n "$ out"> temp.1
Else
Echo ""> temp.1
Out = 'SED-n' "$ line" 'P' temp.0 | gawk '{if (!~ /^ 0x/) print ,,,,,,,,,,,""}''
Echo-n "$ out"> temp.1
Fi
Line = 'expr $ line + 1'
Done
Echo ""> temp.1
# Delete empty rows and the first two rows
Sed '/^ &/d' temp.1 | sed '1, 2d'> temp.2
Lines = 'cat temp.2 | wc-L'
Line = 1
While [$ line-le $ lines]
Do
# Obtain realistic content
TIME = 'SED-n' "$ line" 'P' temp.2 | gawk '{print}' | gawk-F "." '{print }''
FROM = 'SED-n' "$ line" 'P' temp.2 | gawk '{print }''
TO = 'SED-n' "$ line" 'P' temp.2 | gawk '{print }''
# Determine and intercept msn data based on the flag
DATA0 = 'SED-n' "$ line" 'P' temp.2 | awk '{print}' | gawk-F "0d0a0d0a" '{print}' | sed '/^ 0d0a $/d' | sed's /.. /% &/g''
# Submit the intercepted UTF-8 hexadecimal number to the perl URI: Escape module for processing and displaying both Chinese and English
DATA = 'Perl-e "use URI: Escape; printuri_unescape ('$ data0 ');"'
Isnull = 'echo $ DATA | wc-M'
If [$ isnull-gt 1]
Then
Echo "$ FROM $ TO $ DATA: $"
Fi
Line = 'expr $ line + 1'
Done
Rm-f temp .*