In the 1960s, the Defense Department’s Advanced Research Projects Agency undertook a program called the ARPAnet. The idea, a precursor to the Internet, was to let Pentagon labs and contractors share data and research on the same network.

Just before the program’s rollout, in April 1967, an engineer named Willis Ware wrote a paper called “Security and Privacy in Computer Systems.” A computer pioneer dating back to the ’40s, Mr. Ware headed the computer science department at the RAND Corporation, the think tank in Santa Monica, Calif.

In his paper, he lauded the goals of the ARPAnet but explained some risks of what he called “on-line” networks. As long as computers sat in isolated chambers, security wasn’t a problem. But once multiple users could gain access to data from unprotected locations, anyone with certain skills could hack into the network — and, once inside, roam at will, pilfering unclassified and secret files alike. Mr. Ware’s warnings went unheeded for decades, though he remained a frequent consultant. (He died in 2013, at the age of 93.)

In 1980, Lawrence Lasker and Walter Parkes, former Yale classmates in their late 20s, were writing the screenplay for “WarGames.” (It would be nominated for an Oscar but would lose to Horton Foote’s “Tender Mercies.”) A hacker friend had told them about “demon-dialing,” in which a telephone modem searched for other modems by automatically dialing each phone number in an area code and letting it ring twice before proceeding to the next number. If a modem answered, it would squawk; the demon-dialing software would record the number, so the hacker could call back later. In their screenplay, this was how their hero broke into NORAD. But they wondered if this was plausible: Didn’t the military close off its computers to public telephone lines?

Mr. Lasker lived in Santa Monica, a few blocks from RAND. Figuring someone there might be helpful, he called the public affairs office, which put him in touch with Mr. Ware, who invited the pair to his office.

They’d come to the right man. Not only had he long known about the vulnerability of computer networks, but he’d also helped design the software for the real NORAD computer. And Mr. Ware proved remarkably open, even friendly. Listening to the writers’ questions, he waved off their worries. Yes, he told them, the computer was supposed to be closed, but some officers wanted to work from home on weekends, so they’d leave a port open. Anyone could get in, if the right number was dialed.