Zeile 6: |
Zeile 6: |
| <pre> | | <pre> |
| #!/bin/sh | | #!/bin/sh |
− |
| |
| echo -e "Content-type: text/plain\n" | | echo -e "Content-type: text/plain\n" |
| | | |
− | awk -F'[ =]' '/ESTABLISHED/ { | + | awk -F'[= ]' '/ESTABLISHED/ { |
| if(match($0,"dport=698")==0){ | | if(match($0,"dport=698")==0){ |
− | gsub(/6662 /,"IRC ") | + | gsub(/=6662 /,"=IRC ") |
− | gsub(/5223 /,"Jabber ") | + | gsub(/=5223 /,"=Jabber_secure ") |
− | gsub(/5222 /,"Jabber ") | + | gsub(/=5222 /,"=Jabber ") |
− | gsub(/5190 /,"AIM/ICQ ") | + | gsub(/=5190 /,"=AIM/ICQ ") |
− | gsub(/443 /,"www crypted! ") | + | gsub(/=995 /,"=POP3_secure ") |
− | gsub(/110 /,"POP3 ") | + | gsub(/=993 /,"=IMAP_secure ") gsub(/=443 /,"=www_secure ") |
− | gsub(/80 /,"www ") | + | gsub(/=143 /,"=IMAP ") |
− | gsub(/25 /,"sendmail uncrypted? ")
| + | gsub(/=110 /,"=POP3 ") |
− | gsub(/22 /,"SSH ")
| + | gsub(/=80 /,"=www ") gsub(/=25 /,"=sendmail ") gsub(/=22 /,"=SSH ") printf("%-14s ---> %14s... %s %5s ---> %-5s\n",$11,substr($13,1,length($13)-3),$1,$15,$17) |
− | printf("%-14s %15s %s %5s %-5s\n",$11,$13,$1,$15,$17)
| + | }}' /proc/net/ip_conntrack|sort|awk 'BEGIN{printf "Content-type: text/plain\n"}{if($1!=A&&S!=1&&Z>0){print "";S=1}else{print;S=0;Z=1}A=$1}' |
− | }}' /proc/net/ip_conntrack|sort|awk '{if($1!=A&&S!=1&&Z>0){print "";S=1}else{print;S=0;Z=1}A=$1}' | |
| </pre> | | </pre> |
| | | |