Hacking terminals in Fallout 3 & 4 is now easier than ever. This page will help you as much as possible to get to the final answer.
It works as follows. First, you have to give all the possible words. Just type them in the big text box, separated by spaces or enters. Once you've done that, click on "Hack". It will show you the words that could be the password - which means that initially it will show all of them. Pick a word, and choose it to guess the password guess in the game. When the terminal answers with the number of correct letters, click on that number behind the word you chose. The display will be updated to reflect the words that you can still choose from. Keep going until you've hacked the terminal.
The algorithm used for hacking has been published as a Python script.