<commit_before>#!/bin/sh
#auto-snort script v1 - Verified as working for Ubuntu 12.04
# purpose: from nothing to full snort in gods know how much time it takes to compile some of this shit.
#at some point, I want this script to log to something for error reporting.
####step 1: pre-reqs.#### 
# We need to check OS we're installing to, net connectivity, user we are running as, ensure sshd is running and wget is available.

#assumes ubuntu 12.04 checks /etc/motd and cuts the version number to verify what OS we're running. Note: need a more reliable method to verify OS version.

echo "OS Version Check.\n"
     if [ $(cat /etc/motd | head -1 | cut -f4 -d " ") != "12.04" ]
          then
               echo "This is not Ubuntu 12.04. This script has not been tested on other platforms. If you would like to continue, please wait. Otherwise please enter ctrl+c now."
               sleep 10
          else
               echo "Version is 12.04. Good to go.\n"
		echo " "
     fi

sleep 2

#assumes internet connectivity. Connectivity check uses icmp, pings google once, greps for "recieved," to verify successful ping.

echo "Checking internet connectivity (pinging google.com) \n"
     if [ $(ping -c 1 google.com | grep received, | cut -f5 -d " ") != "received," ]
          then
               echo "Ping to google has failed. Please verify you have network connectivity or ICMP outbound is allowed. Seriously, what harm is it going to do? \n"
	exit 1
          else
               echo "Connectivity looks good!\n"
     fi

sleep 2

<commit_msg>Updated Autosnort to check for internet connectivity in a cleaner, though still not idea, way.<commit_after>#!/bin/sh
#auto-snort script v1 - Verified as working for Ubuntu 12.04
# purpose: from nothing to full snort in gods know how much time it takes to compile some of this shit.
#at some point, I want this script to log to something for error reporting.
####step 1: pre-reqs.#### 
# We need to check OS we're installing to, net connectivity, user we are running as, ensure sshd is running and wget is available.

#assumes ubuntu 12.04 checks /etc/motd and cuts the version number to verify what OS we're running. Note: need a more reliable method to verify OS version.

echo "OS Version Check.\n"
     if [ $(cat /etc/motd | head -1 | cut -f4 -d " ") != "12.04" ]
          then
               echo "This is not Ubuntu 12.04. This script has not been tested on other platforms. If you would like to continue, please wait. Otherwise please enter ctrl+c now."
               sleep 10
          else
               echo "Version is 12.04. Good to go.\n"
		echo " "
     fi

sleep 2

#assumes internet connectivity. Connectivity check uses icmp, pings google once, greps for "recieved," to verify successful ping.

echo "Checking internet connectivity (pinging google.com) \n"
     ping google.com -c1 2>&1 >> /dev/null
     if [ $? == 0 ]; then
          echo "Connectivity looks good!\n"
     else
          echo "Ping to google has failed. Please verify you have network connectivity or ICMP outbound is allowed. Seriously, what harm is it going to do? \n"
   	  exit 1
     fi

sleep 2


{'fraction_non_alphanumeric': 0.07983460559796438, 'fraction_numerical': 0.020356234096692113, 'mean_word_length': 2.6527293844367015, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 6, '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': '788066', 'n_tokens_mistral': 958, 'n_tokens_neox': 868, 'n_words': 458}