Search code examples
loggingfile-formatnon-ascii-characterslogfilesnort

How can i generate snort log file in a text human readable format?


When i use this command:

snort -l /home/username/snort-2.9.9.0/snort_logs -d

OR :

snort -l /home/username/snort-2.9.9.0/snort_logs -b

It log packets in Ascii file format,

I want the log files in a text readable format. What command should i use to log packet in text format? and what configuration i need to add to the snort.cong file to do the required ?

Thanks


Solution

  • To convert snort log file from pcap format to text format we use : (tcpdump tool) or (Tshark tool) as following :

    tcpdump -n -tttt -r /snortLogFilePath/snortLogFileName > /pathToStoreAt/anyName.txt

    OR:

    tshark -r /snortLogFilePath/snortLogFileName > /pathToStoreAt/anyName.txt