<commit_before>Simple Network Ping
=============

Simple Network Ping is a small ruby script that pings various points specified by the user to monitor a home network or wherever they see fit.

For myself (as is in the repo), the script pings:

* Home Router
* Another Device on the Network 
* Network Modem
* External IP Address
* An External Website

##Example Code:

This script is customizable to ping whatever you'd like. Just change the IP addresses at the bottom of the script.
	
	@lastWebSiteToPing = "www.espn.com" # External website to ping
	
	...
	
	# In case the user wants to pass in an argument for a specific address
	# check_ping(ARGV[0])
	# Pings (In this order): Router, Another networked device, Modem, My IP, Outside website
	check_ping("10.0.1.1")
	check_ping("10.0.1.3")
	check_ping("192.168.100.1")

	# If External IP Address is unreachable, we still need to show the log the info
	if ipaddress() == false then
		@missed_pings = 5 #otherwise, it will pass
		sendMessage("Error. Could Not Reach Home IP")
	else
		check_ping(ipaddress())
	end

	check_ping(@lastWebSiteToPing)
	
##Output:
The script outputs (+/- state if passed or failed):

Current Version (+/- shown in order of devices pinged):

	2014-09-05 13:06:34,+,+,+,+,+

Older Version:

	Mon, 11 Aug 2014 12:19:04 -0400
	10.0.1.1 -
	10.0.1.3 -
	192.168.100.1 +
	xx.xxx.xxx.xx +
	www.espn.com +

The script also outputs the same output to a log file in the same directory of the script. You can specify where you would like the script you desire.

##Run:
	ruby simple-network-ping.rb<commit_msg>Added Reading input from a passwords file<commit_after>Simple Network Ping
=============

Simple Network Ping is a small ruby script that pings various points specified by the user to monitor a home network or wherever they see fit.

For myself (as is in the repo), the script pings:

* Home Router
* Another Device on the Network 
* Network Modem
* External IP Address
* An External Website

##Example Code:

This script is customizable to ping whatever you'd like. Just change the IP addresses at the bottom of the script.
	
	@lastWebSiteToPing = "www.espn.com" # External website to ping
	
	...
	
	# In case the user wants to pass in an argument for a specific address
	# check_ping(ARGV[0])
	# Pings (In this order): Router, Another networked device, Modem, My IP, Outside website
	check_ping("10.0.1.1")
	check_ping("10.0.1.3")
	check_ping("192.168.100.1")

	# If External IP Address is unreachable, we still need to show the log the info
	if ipaddress() == false then
		@missed_pings = 5 #otherwise, it will pass
		sendMessage("Error. Could Not Reach Home IP")
	else
		check_ping(ipaddress())
	end

	check_ping(@lastWebSiteToPing)
	
##Output:
The script outputs (+/- state if passed or failed):

Current Version (+/- shown in order of devices pinged):

	2014-09-05 13:06:34,+,+,+,+,+

Older Version:

	Mon, 11 Aug 2014 12:19:04 -0400
	10.0.1.1 -
	10.0.1.3 -
	192.168.100.1 +
	xx.xxx.xxx.xx +
	www.espn.com +

The script also outputs the same output to a log file in the same directory of the script. You can specify where you would like the script you desire.

##Passwords:

Make sure you configure the passwords.example file. The file should have 4 lines: 

* your email
* your account name
* your account/email password
* to Address

Reference the example file.

##Run:
	ruby simple-network-ping.rb
{'fraction_non_alphanumeric': 0.09822485207100591, 'fraction_numerical': 0.042899408284023666, 'mean_word_length': 3.8025568181818183, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 4, 'xml': 0}, 'pii_count': 12, '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': '390039', 'n_tokens_mistral': 1204, 'n_tokens_neox': 1059, 'n_words': 457}