| PLEX86 | ||
|
Filter piped stream with sed or grepHello Everyone, I an running Debian Linux kernel 2.4.27-2 on an old P4 system that I have monitoring our network traffic at work. I have the dsniff package installed (v2.3) to help with this task. I am just having the sniffer utilities pipe their output to a stream filter (sed-grep) and then I filter out the IPs I don't want to monitor and pipe everything else into a text file. For example:var-log-sniffers-urlsnarf.log My log files look something like this: I am just wanting to filter out 4 IPs from writing to this log file, I was using grep's inverse match to output all but the lines containing the IPs on the filter list, but this just outputs nothing. I have tried using sed to print all but the matching lines, but when I specify more than one possible match using the '' like you do in all other regular expressions, it just prints out all lines. Here are the lines I have been using: Grep v2.5.1: urlsnarf -i eth0 -n grep -v -fusr-share-urlsnarffilter Excessive xvideo logging to kdm.log and Xorg.0.log Greetings. Whenever I play a movie with MPlayer using the XVideo video output (mplayer -vo xv), I get excessive debugging messages invar-log-kdm.log andvar-log-Xorg.0.log. And I really mean *excessive... usr-share-urlsnarffilter: 192.168.1.5 192.168.1.6 192.168.1.10 192.168.1.11 Sed 4.1.2: urlsnarf -i eth0 -n sed -n -e '-(192.168.1.5192.168.1.6192.168.1.10192.168.1.11)-!p Does anyone know what I am doing wrong here? Thanks in advcance! -Curt
|
||||
Excessive xvideo logging to kdm.log and Xorg.0.log Linux groups from Newsgroups The #1 Usenet Provider on the Internet
|
||||