Änderungen

Zur Navigation springen Zur Suche springen
Zeile 6: Zeile 6:  
<pre>
 
<pre>
 
#!/bin/sh
 
#!/bin/sh
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){
Zeile 15: Zeile 13:  
  gsub(/=5190 /,"=AIM/ICQ ")
 
  gsub(/=5190 /,"=AIM/ICQ ")
 
  gsub(/=995 /,"=POP3_secure ")
 
  gsub(/=995 /,"=POP3_secure ")
  gsub(/=993 /,"=IMAP_secure ")                                                   gsub(/=443 /,"=www_secure ")
+
  gsub(/=993 /,"=IMAP_secure ")  
 +
gsub(/=443 /,"=www_secure ")
 
  gsub(/=143 /,"=IMAP ")
 
  gsub(/=143 /,"=IMAP ")
 
  gsub(/=110 /,"=POP3 ")
 
  gsub(/=110 /,"=POP3 ")
  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)
+
  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)
 
  }}' /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 '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}'
 
</pre>
 
</pre>

Navigationsmenü