cat /etc/snort/snort.conf | grep output




Download 7,3 Mb.
Pdf ko'rish
bet44/125
Sana14.05.2024
Hajmi7,3 Mb.
#232858
1   ...   40   41   42   43   44   45   46   47   ...   125
Bog'liq
linuxbasicsforhackers

cat /etc/snort/snort.conf | grep output
# 6) Configure output plugins
# Step #6: Configure output plugins
# output unified2: filename merged.log, limit 128, nostamp, mpls_event_types, 
vlan_event_types
output unified2: filename merged.log, limit 128, nostamp, mpls_event_types, 
vlan_event_types
# output alert_unified2: filename merged.log, limit 128, nostamp
# output log_unified2: filename merged.log, limit 128, nostamp
# output alert_syslog: LOG_AUTH LOG_ALERT
# output log_tcpdump: tcpdump.log
Listing 2-5: Displaying lines with instances of the keyword or phrase specified by 
grep
This command will first view snort.conf and then use a pipe (
|
) to send 
it to 
grep
, which will take the file as input, look for lines with occurrences of 
the word output, and display only those lines. The 
grep
command is a very 
powerful and essential command for working in Linux, because it can save 
you hours of searching for every occurrence of a word or command in a file.


Text Manipulation
23
Hacker Challenge: Using grep, nl, tail, and head
Let’s say you want to display the five lines immediately before a line that 
says 
# Step #6: Configure output plugins
using at least four of the commands 
you just learned. How would you do it? (Hint: there are many more options 
to these commands than those we’ve discussed. You can learn more com-
mands by using the built-in Linux command 
man
. For example, 
man tail
will 
show the help file for the 
tail
command.)
There are many ways to solve this challenge; here, I show you which 
lines to change to do it one way, and your job is to find another method.
Step 1
kali >

Download 7,3 Mb.
1   ...   40   41   42   43   44   45   46   47   ...   125




Download 7,3 Mb.
Pdf ko'rish

Bosh sahifa
Aloqalar

    Bosh sahifa



cat /etc/snort/snort.conf | grep output

Download 7,3 Mb.
Pdf ko'rish