发明名称 |
Method, device, and mobile terminal for API interception |
摘要 |
The present invention discloses an application programming interface interception method and device, and a mobile terminal. The method includes: monitoring, based on a process identifier of an API process, the API process in a virtual machine corresponding to a system in real time; when the API process is activated, obtaining a virtual machine instance corresponding to the API process from a memory according to the process identifier; according to identifier information of an API to be intercepted, replacing an address pointing to the code of a first API written in a first computer language corresponding to the API process with a stored address pointing to the code of a second API (or a replacement function) corresponding to the first API and written in a second computer language different from the first language; and implementing control on the API process through a second API function. |
申请公布号 |
US8863157(B2) |
申请公布日期 |
2014.10.14 |
申请号 |
US201314063908 |
申请日期 |
2013.10.25 |
申请人 |
Tencent Technology (Shenzhen) Company Limited |
发明人 |
Zhang Lichun |
分类号 |
G06F13/00;G06F9/48;G06F9/44;G06F9/455 |
主分类号 |
G06F13/00 |
代理机构 |
Morgan, Lewis & Bockius LLP |
代理人 |
Morgan, Lewis & Bockius LLP |
主权项 |
1. An application programming interface (API) interception method performed at a mobile communication terminal having one or more processors and memory for storing one or more programs to be executed by the one or more processors, the method comprising:
monitoring the status of a process of an API in a virtual machine based on a process identifier of the API; when the process of the API is activated, obtaining a virtual machine instance corresponding to the process of the API from the memory based on the process identifier of the API; identifying a first address of a function of the API in the virtual machine instance based on the process identifier of the API; replacing the first address with a second address of a replacement function, wherein the API is written in a first computer language and the replacement function is written in a second computer language; and executing the replacement function. |
地址 |
Shenzhen CN |