Created
May 31, 2016 00:59
-
-
Save whitehat101/200dcc788f52a38ab2ecd508d1a77942 to your computer and use it in GitHub Desktop.
Ubuntu Word list Iteration
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Wordlist on most Ubuntu Installs | |
open '/usr/share/dict/american-english' do |list| | |
until list.eof? | |
word = list.gets.chomp | |
next unless word.match /^[A-Za-z]+$/ | |
value = word.upcase.split(//).inject(1) do |sum,v| | |
sum *= v.ord - 'A'.ord + 1 | |
end | |
# puts "#{word} = #{value}" | |
if value == 715 | |
puts word | |
end | |
end | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment