System and method for inserting authorized code into a program
AssigneeHon Hai Precision Industry Co., Ltd.
InventorsCHUNG-I LEE, CHIEN-FA YEH, BOR-CHUAN LIN
Life of this patent
Estimating the term…
Abstract
A system and method for inserting authorized code into a program during execution of the program is provided. The system is installed in a computer. The computer includes a storage device for storing an IoC container, the program, the authorized code, and a configuration file. The system is configured for inserting the authorized code into the program during the execution of the program through the IoC container and the configuration file, so as to update at least one particular function of the program.
Claims14
A computing system for inserting authorized code into a program during execution of the program, the system comprising:
- a loading module configured for loading an inversion of control (IoC) container from a storage device, and configured for loading the program, the authorized code, and a configuration file from the storage device into the IoC container;
- a setting module configured for setting a breakpoint of the program in the configuration file as an insertion point for inserting the authorized code;
- a detecting module configured for detecting if frontal code of the breakpoint in the program has been executed through the IoC container;
- an interrupting module configured for generating an interrupt signal through the IoC container so as to interrupt the execution of the program upon the condition that the frontal code has been executed;
- an inserting module configured for inserting the authorized code into the program at the insertion point, and configured for executing the authorized code after the insertion of the authorized code, wherein the authorized code is configured to update at least one particular function of the program, and wherein the inserting module stores the updated program into the storage device;
- and
- at least one processor executing the loading module, the setting module, the detecting module, the interrupting module, and the inserting module.
A computer-implemented method for inserting authorized code into a program during execution of the program, the method comprising:
- loading an IoC container from a storage device;
- loading the program, the authorized code, and a configuration file from the storage device into the IoC container;
- setting a breakpoint of the program in the configuration file as an insertion point for inserting the authorized code;
- detecting if a processor of a computer executes the program through the IoC container;
- detecting if frontal code of the breakpoint in the program has been executed through the IoC container if the processor executes the program;
- generating an interrupt signal through the IoC container to interrupt the execution of the program if the frontal code has been executed;
- inserting the authorized code into the program at the insertion point, and executing the authorized code to update at least one particular function of the program after the insertion of the authorized code;
- storing the updated program into the storage device.
A computer-readable medium having stored thereon programs for inserting authorized code into a program during execution of the program which, when executed by a computer, cause the computer to perform a method, the method comprising:
- loading an IoC container from a storage device;
- loading the program, the authorized code, and a configuration file from the storage device into the IoC container;
- setting a breakpoint of the program in the configuration file as an insertion point for inserting the authorized code;
- detecting if a processor of the computer executes the program through the IoC container;
- detecting if frontal code of the breakpoint in the program has been executed through the IoC container, if the processor executes the program;
- generating an interrupt signal through the IoC container to interrupt the execution of the program, if the frontal code has been executed;
- inserting the authorized code into the program at the insertion point, and executing the authorized code to update at least one particular function of the program after the insertion of the authorized code;
- and
- storing the updated program in the storage device.
Dependencies are inferred from the claim text.