<commit_before>#!/bin/sh
PATH=/bin

# Check input
[ -z "$1" -o -z "$2" ] && exit 1

# Check if file is indeed a file and readable
[ ! -f "$1" -o ! -r "$1" ] && exit 1

# Create a unique and (hopefully!) unpredictable filename
filename="/tmp/.wp`date +%N`"

# Put the remote host name into the file
echo "$2" > $filename

# And the time...
echo `date --iso-8601=seconds` >> $filename

# Finally the message
cat "$1" | tr "\000" "\012" >> $filename

# Make sure the file is owned by nobody and is readable
chown nobody:nogroup $filename
chmod 644 $filename

# Move the new message file into the pickup place
mv -f $filename /var/lib/winpopup/message
<commit_msg>small path change for added security.<commit_after>#!/bin/sh
PATH=/bin

# Check input
[ -z "$1" -o -z "$2" ] && exit 1

# Check if file is indeed a file and readable
[ ! -f "$1" -o ! -r "$1" ] && exit 1

# Create a unique filename
filename="/var/lib/winpopup/.wp`date +%N`"

# Put the remote host name into the file
echo "$2" > $filename

# And the time...
echo `date --iso-8601=seconds` >> $filename

# Finally the message
cat "$1" | tr "\000" "\012" >> $filename

# Make sure the file is owned by nobody and is readable
chown nobody:nogroup $filename
chmod 644 $filename

# Move the new message file into the pickup place
mv -f $filename /var/lib/winpopup/message

{'fraction_non_alphanumeric': 0.14630467571644043, 'fraction_numerical': 0.03167420814479638, 'mean_word_length': 3.453020134228188, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 13, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '5377588', 'n_tokens_mistral': 476, 'n_tokens_neox': 444, 'n_words': 188}