<commit_before>#!/usr/bin/env bash

# Author : <NAME> <<EMAIL>>
# Pull feeds from SES.  output in Bro format.
# Your API key should be stored in $HOME/.cif

# colon separated feed name and confidence value.
FEEDS="infrastructure/botnet:85 domain/botnet:85 url/botnet:85"
OUTFILE="/path/on/webserver/intel.txt"

# copy last output file to .bak extension, just in case
if [ -e $OUTFILE ];
then
	cp $OUTFILE $OUTFILE.bak
	if [ $? -ne 0 ];
	then
		echo "Failed to make backup of intel file.  Bailing out!"
		exit 1
	fi
fi

# let's truncate $OUTFILE via a lazy echo
echo >$OUTFILE

# download CIF data in Bro format
for pair in $FEEDS;
do
	IFS=:; set $pair
	cif -q $1 -c $2 -p bro >>$OUTFILE
	if [ $? -ne 0 ];
	then
		echo "Failed to download intel file. Bailing out!"
		exit 1<commit_msg>change to echo -n so we don't have a blank line<commit_after>#!/usr/bin/env bash

# Author : <NAME> <<EMAIL>>
# Pull feeds from SES.  output in Bro format.
# Your API key should be stored in $HOME/.cif

# colon separated feed name and confidence value.
FEEDS="infrastructure/botnet:85 domain/botnet:85 url/botnet:85"
OUTFILE="/path/on/webserver/intel.txt"

# copy last output file to .bak extension, just in case
if [ -e $OUTFILE ];
then
	cp $OUTFILE $OUTFILE.bak
	if [ $? -ne 0 ];
	then
		echo "Failed to make backup of intel file.  Bailing out!"
		exit 1
	fi
fi

# let's truncate $OUTFILE via a lazy echo
echo -n >$OUTFILE

# download CIF data in Bro format
for pair in $FEEDS;
do
	IFS=:; set $pair
	cif -q $1 -c $2 -p bro >>$OUTFILE
	if [ $? -ne 0 ];
	then
		echo "Failed to download intel file. Bailing out!"
		exit 1
{'fraction_non_alphanumeric': 0.11775700934579439, 'fraction_numerical': 0.014953271028037384, 'mean_word_length': 3.387978142076503, 'pattern_counts': {'":': 0, '<': 9, '<?xml version=': 0, '>': 15, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 4, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '1026398', 'n_tokens_mistral': 618, 'n_tokens_neox': 580, 'n_words': 234}