Abstract: A method for protecting software is disclosed in the invention, including steps of analyzing the software or obtaining source codes of the software, and modifying the instructions obtained from analyzing the software or source codes of the software, and programming the modified instructions or compiling the modified source codes to obtain new software and ending or going on running the rest of instructions according to the result of executing the new instructions. By executing this method, the software is protected.