7. The method of claim 1 wherein the target script comprises a JavaScript.
1. A computer-implemented method of identifying normal scripts, the method comprising: receiving a machine learning model and a feature set in a client computer, the machine learning model being trained using sample scripts that are known to be normal and sample scripts that are known to be potentially malicious and takes into account lexical and semantic characteristics of the sample scripts that are known to be normal and the sample scripts that are known to be potentially malicious; receiving a target script along with a web page in the client computer, the target script and the web page being received from a server computer over a computer network; extracting from the target script features that are included in the feature set; inputting the extracted features of the target script into the machine learning model to receive a classification of the target script from the machine learning model; and detecting that the target script is a normal script and not a potentially malicious script based on the classification of the target script.