Hacking terminals used to confuse the hell out of me. I gave up all hope of figuring it out and instead id just randomly pick 3 words and quit out then repeat until I got it. Eventually this got too annoying so I spent some time to figure it out. Turns out its a hell of a lot easier to do when you know all of the tips and tricks to hacking terminals in Fallout. This applies to Fallout 4 and past games as the hacking system has remained the same.