John Connor (Nick Stahl) has been living off the grid in Los Angeles in the years following the death of his mother, Sarah, from leukemia. Although Judgment Day did not occur on August 29, 1997, as expected, John still believes that a war between humans and the machines will occur. Unable to locate John in the past, Skynet sends a new model of the Terminator called the T-X (Kristanna Loken) back to July 24, 2004, to kill other members of the Human Resistance. The T-X is more advanced than previous Terminators, and has an endoskeleton with built-in weaponry, a liquid metal exterior similar to the T-1000, and the ability to reprogram other machines with nanotechnology. Unlike previous Terminators, its standard appearance is female. The Resistance sends a reprogrammed Terminator (T-850 - Model 101) back in time to protect the T-X's targets including John and his future wife, Kate Brewster (Claire Danes).After killing several other targets, the T-X locates Kate and John at an animal hospital, where the former works and the latter was stealing from; but they escape with the Terminator's help after being chased through the city. The Terminator takes John and Kate to a mausoleum where John's mother, Sarah Connor, is supposedly interred. Inside her vault, they find a weapons cache that was left at Sarah's request in case Judgment Day was not averted. Police arrive and a gun battle ensues, but John and the Terminator escape with Kate in a hearse. The T-X also arrives, after killing Kate's fiancÃ© Scott (Mark Famiglietti), and chases the Terminator and the others; but they manage to escape. The Terminator then reveals his plan to drive John and Kate to Mexico to escape the fallout when Judgment Day begins. After learning that Judgment Day is scheduled to begin at 6:18Â p.m. that day, John orders the Terminator to take him and Kate to see Kate's father, a Lt. General (David Andrews) who is supervising the building of Skynet after Cyberdyne Systems went defunct, and threatens to kill himself if he does not. The Terminator calls John's bluff but agrees to take them after Kate orders him to. Upon questioning, the Terminator reveals that he killed John on July 4, 2032, and that Kate sent him back from the future after she had him captured and reprogrammed.At the Air Force base, General Brewster faces pressure from the President to activate Skynet to stop a computer virus that is infecting computers all over the world (unaware that the virus is Skynet establishing control over the worldwide computer network). John and Kate arrive too late to stop Skynet from being activated, and its machines begin to attack the staff members. Brewster is mortally wounded by the T-X, which arrived before John, Kate, and the Terminator. Before dying, he gives Kate and John a code book and the location of what John believes is Skynet's system core. John and Kate head for the tarmac to take General Brewster's airplane to reach Crystal Peak, a military base built inside the Sierra Nevada that is hardened against nuclear attack. The T-X and the T-850 battle, and the T-X severely damages the T-850 before reprogramming it to kill John and Kate. The T-X pursues John and Kate through the military base but becomes trapped when a particle accelerator is activated and the magnetic field bonds it to the accelerator. In the hangar, the Terminator, unable to control his outer functions, but still consciously aware, attacks John and Kate before John convinces it to reject the T-X's control, and deliberately shuts its corrupted system down, thus giving John and Kate the chance to escape. Shortly after they leave, the Terminator's system reboots.John and Kate reach Crystal Peak and begin entering the access codes to gain entry when the T-X arrives by helicopter. Just as she is about to attack, the rebooted Terminator arrives in a second helicopter and crashes into the T-X, crushing it. The T-X pulls itself from the wreckage and attempts to drag itself inside the bunker to follow John and Kate. The Terminator holds the bunker open long enough for John and Kate to lock themselves inside then uses one of its hydrogen fuel cells to destroy both itself and the T-X.Inside Crystal Peak, John and Kate discover that the facility is not Skynet's core but a nuclear fallout shelter and that Skynet has no core because it was actually the Internet the whole time. Judgment Day begins as nuclear missiles are fired at several locations around the world, killing billions. They begin receiving radio transmissions on the emergency equipment inside, and John begins answering radio calls.
Output: Question: Who gives Kate and John a code book and location?, Answer: Brewster