CN112417324A - Chrome-based URL (Uniform resource locator) interception method and device and computer equipment - Google Patents

Chrome-based URL (Uniform resource locator) interception method and device and computer equipment Download PDF

Info

Publication number
CN112417324A
CN112417324A CN202010398826.3A CN202010398826A CN112417324A CN 112417324 A CN112417324 A CN 112417324A CN 202010398826 A CN202010398826 A CN 202010398826A CN 112417324 A CN112417324 A CN 112417324A
Authority
CN
China
Prior art keywords
url
chrome
interception
resource
rule
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Pending
Application number
CN202010398826.3A
Other languages
Chinese (zh)
Inventor
王海洋
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Shanghai Bilibili Technology Co Ltd
Original Assignee
Shanghai Bilibili Technology Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Shanghai Bilibili Technology Co Ltd filed Critical Shanghai Bilibili Technology Co Ltd
Priority to CN202010398826.3A priority Critical patent/CN112417324A/en
Publication of CN112417324A publication Critical patent/CN112417324A/en
Pending legal-status Critical Current

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/90Details of database functions independent of the retrieved data types
    • G06F16/95Retrieval from the web
    • G06F16/955Retrieval from the web using information identifiers, e.g. uniform resource locators [URL]
    • G06F16/9566URL specific, e.g. using aliases, detecting broken or misspelled links
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/90Details of database functions independent of the retrieved data types
    • G06F16/95Retrieval from the web
    • G06F16/958Organisation or management of web site content, e.g. publishing, maintaining pages or automatic linking
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L67/00Network arrangements or protocols for supporting network services or applications
    • H04L67/50Network services
    • H04L67/60Scheduling or organising the servicing of application requests, e.g. requests for application data transmissions using the analysis and optimisation of the required network resources

Landscapes

  • Engineering & Computer Science (AREA)
  • Databases & Information Systems (AREA)
  • Theoretical Computer Science (AREA)
  • Data Mining & Analysis (AREA)
  • Physics & Mathematics (AREA)
  • General Engineering & Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • Computer Networks & Wireless Communication (AREA)
  • Signal Processing (AREA)
  • Information Transfer Between Computers (AREA)

Abstract

The invention discloses a Chrome-based URL (Uniform resource locator) intercepting method, a Chrome-based URL intercepting device and computer equipment, wherein the method comprises the following steps of: receiving a resource request input by a user, and acquiring a first URL in the resource request; calling an interception rule from the Chrome extension program, and carrying out interception skip on the first URL according to the interception rule to obtain a corresponding second URL; and acquiring the resource corresponding to the second URL and displaying the resource to a browser page. The invention also provides a computer readable storage medium. The method realizes the judgment and interception of the first URL address input by the user on the user side terminal equipment by writing the interception rule into the Chrome extension program. Therefore, the speed of accessing the target server by the user is effectively improved, the interception link of the intermediate equipment is reduced, and the data security is improved.

Description

Chrome-based URL (Uniform resource locator) interception method and device and computer equipment
Technical Field
The invention relates to the technical field of Internet, in particular to a Chrome-based URL (Uniform resource locator) intercepting method and device and computer equipment
Background
Chrome is a browser, also known as *** browser, and is a free web browser with its own brand launched by *** corporation in 2008, 9, 3. Compared with other browsers, Chrome has the main characteristics of providing a sandbox technology with high safety, a multi-process technology, a stealth mode and quick and efficient browsing experience. In addition, Chrome enjoys the good feeling of many users with a simple and efficient user interface, and the market share of Chrome is rapidly increasing.
A URL (Uniform Resource Locator) is a compact representation of the location and access method to resources available on the internet, such as HTML documents, images, video clips, programs, etc., and is the address of a standard Resource on the internet. Each file on the internet has a unique URL that contains information indicating the location of the file and how the browser should handle it. However, since the URL address input by the user sometimes does not meet the specification, the URL input by the user needs to be filtered, cleaned, and subjected to security detection, that is, URL interception. However, the current interception technology is interception performed at a gateway end, or interception is performed through a third party interception service or an interception plug-in.
However, the interception performed at the gateway end, or the interception performed on the URL input by the user through the third-party interception service or the interception plug-in, needs to perform the interception at the gateway end or the third-party interception service end first, and then issue the intercepted URL to the user end, so that the delay problem exists; in addition, the gateway end is directly connected with an external network as a portal, and the third-party interception server end is directly controlled by a third party, so that the gateway end is easily attacked by the network or stolen by data. That is, the interception manner in the prior art undoubtedly affects the user access speed and data security.
Disclosure of Invention
The invention provides a Chrome-based URL (Uniform resource locator) intercepting method, a Chrome-based URL intercepting device and computer equipment, which can solve the problems of low user access speed and data security in the intercepting process in the prior art.
Firstly, in order to achieve the above object, the present invention provides a Chrome-based URL intercepting method, including:
receiving a resource request input by a user, and acquiring a first URL in the resource request; calling an interception rule from the Chrome extension program, and carrying out interception skip on the first URL according to the interception rule to obtain a corresponding second URL; and acquiring the resource corresponding to the second URL and displaying the resource to a browser page.
In one example, the obtaining the first URL in the resource request includes: registering a monitoring event in an extension program of the Chrome; when the resource request input by the user is received, the request object in the resource request is obtained through the monitoring event, and the first URL is extracted.
In one example, the interception rule includes: when the first URL is judged to be the same as a second URL in a preset URL set, jumping to a resource page of the second URL; or when the first URL is judged to contain the target character string in the second URL, jumping to the resource page of the second RUL; or when judging that a first character string exists in the first URL and a second character string in a preset character string set are the same, replacing the first character string with the second character string to obtain a second URL, and jumping to a resource page of the second RUL; or when the first URL is judged to accord with a preset regular expression, replacing the first URL with the second URL, and jumping to the resource page of the second RUL.
In one example, the second URL includes at least one of a null resource, a local resource, an online resource, a DataURI; and when the second URL is an empty resource, executing interception jumping is to block the resource request.
In one example, the interception rule is an extension program written in the Chrome in advance and stored in a local storage unit corresponding to the Chrome.
In one example, the method further comprises: monitoring whether a new interception rule is written in the process of carrying out interception skip on the first URL according to the interception rule; and when monitoring that a new interception rule is written, carrying out interception skip on the first URL according to the new interception rule.
In one example, the method further comprises: and counting the first URL intercepted and jumped, and displaying the first URL to the Chrome page.
In addition, to achieve the above object, the present invention further provides a Chrome-based URL intercepting apparatus, including:
the acquisition module is used for receiving a resource request input by a user and acquiring a first URL in the resource request; the interception module is used for calling an interception rule from the Chrome extension program and carrying out interception skip on the first URL according to the interception rule to obtain a corresponding second URL; and the display module is used for acquiring the resource corresponding to the second URL and displaying the resource to a browser page.
Further, the present invention also provides a computer device, which includes a memory and a processor, where the memory stores a computer program operable on the processor, and when the computer program is executed by the processor, the computer program implements the steps of the Chrome-based URL intercepting method as described above.
In addition, the present invention also provides a computer-readable storage medium storing a computer program, which is executable by at least one processor to cause the at least one processor to perform the steps of the Chrome-based URL intercepting method as described above.
Compared with the prior art, the Chrome-based URL intercepting method, the Chrome-based URL intercepting device, the computer equipment and the computer-readable storage medium can acquire the first URL in the resource request after receiving the resource request input by the user; then calling an interception rule from the Chrome extension program, and carrying out interception skip on the first URL according to the interception rule to obtain a corresponding second URL; and finally, acquiring the resource corresponding to the second URL and displaying the resource to a browser page. The first URL address input by the user is judged and intercepted on the user side terminal equipment in a mode of writing the interception rule into the Chrome extension program. Therefore, the speed of accessing the target server by the user is effectively improved, the interception link of the intermediate equipment is reduced, and the data security is improved.
Drawings
FIG. 1 is a schematic diagram of an application environment of an embodiment of the present invention;
FIG. 2 is a flowchart illustrating a Chrome-based URL interception method according to an embodiment of the present invention;
fig. 3 is a flowchart illustrating a process of step S200 in fig. 2 for obtaining the first URL in the resource request according to an embodiment;
FIG. 4 is a flowchart illustrating an exemplary embodiment of performing an intercept jump according to an intercept rule;
FIG. 5 is a schematic flow chart based on one embodiment of FIG. 2;
FIG. 6 is a schematic diagram of program modules of an embodiment of a Chrome-based URL interception apparatus according to the present invention;
FIG. 7 is a diagram of an alternative hardware architecture of the computer apparatus of the present invention.
Detailed Description
In order to make the objects, technical solutions and advantages of the present invention more apparent, the present invention is described in further detail below with reference to the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are merely illustrative of the invention and are not intended to limit the invention. All other embodiments, which can be derived by a person skilled in the art from the embodiments given herein without making any creative effort, shall fall within the protection scope of the present invention.
It should be noted that the description relating to "first", "second", etc. in the present invention is for descriptive purposes only and is not to be construed as indicating or implying relative importance or implicitly indicating the number of technical features indicated. Thus, a feature defined as "first" or "second" may explicitly or implicitly include at least one such feature. In addition, technical solutions between various embodiments may be combined with each other, but must be realized by a person skilled in the art, and when the technical solutions are contradictory or cannot be realized, such a combination should not be considered to exist, and is not within the protection scope of the present invention.
Fig. 1 is a schematic diagram of an application environment according to an embodiment of the present invention. Referring to fig. 1, the computer device 1 provides a display interface, and the display interface includes a Chrome browser display page. After receiving a resource request input by a user through Chrome, the first URL in the resource request can be obtained, interception skipping is carried out according to an interception rule, a second URL is obtained, and a corresponding resource is obtained and displayed on a browser page. In the embodiment, the computer device 1 may be used as a terminal device such as a mobile terminal, e.g., a mobile phone, a tablet, a portable device, or a PC.
Example one
FIG. 2 is a flowchart illustrating an embodiment of a Chrome-based URL interception method according to the present invention. It is to be understood that the flow charts in the embodiments of the present method are not intended to limit the order in which the steps are performed. The following description is made by way of example with the computer apparatus 1 as the execution subject.
As shown in fig. 2, the Chrome-based URL intercepting method may include steps S200 to S204, where:
step S200, receiving a resource request input by a user, and acquiring a first URL in the resource request.
As shown in fig. 3, in an exemplary embodiment, the step S200 of obtaining the first URL in the resource request includes steps S300 to S302.
Step S300, registering the monitoring event in the Chrome extension program.
Step S302, when the resource request input by the user is received, the request object in the resource request is obtained through the monitoring event, and the first URL is extracted.
Specifically, the user inputs a resource request through the Chrome browser page of the computer device 1, and then the computer device 1 can receive the resource request input by the user and then obtain the first URL therein. In this embodiment, first, a monitoring event is registered in an extension program in the Chrome, and after a user inputs a resource request through the Chrome, the computer device 1 may obtain a request object in the resource request through the monitoring event, and then extract the first URL. In this embodiment, Chrome provides a function of registering an event in an extended program, for example, an onBeforeRequest event is registered in the extended program of Chrome, the onBeforeRequest event can record a resource request event occurring in Chrome, and then the computer device 1 may output the resource request event occurring in Chrome through an event callback function, so that the resource request may be acquired. When the resource request input to the Chrome by the user is obtained, the request object corresponding to the resource request can be further obtained, and then the first URL is extracted. In this embodiment, the computer device 1 registers a monitoring event through an extension program of the Chrome itself, monitors and acquires a resource request input by a user, and then obtains a corresponding first URL without depending on a third party service or an external additional function, so that the execution process is time-consuming and efficient.
Step S202, an interception rule is called from the Chrome extension program, and interception skip is carried out on the first URL according to the interception rule to obtain a corresponding second URL.
Specifically, the interception rule is an extension program written in the Chrome in advance and stored in a local storage unit corresponding to the Chrome, and after the first URL is obtained, the computer device 1 calls the interception rule to perform interception skip on the first URL. In this embodiment, the interception rule includes: when the first URL is judged to be the same as a second URL in a preset URL set, jumping to a resource page of the second URL; or when the first URL is judged to contain the target character string in the second URL, jumping to the resource page of the second RUL; or when judging that a first character string exists in the first URL and a second character string in a preset character string set are the same, replacing the first character string with the second character string to obtain a second URL, and jumping to a resource page of the second RUL; or when the first URL is judged to accord with a preset regular expression, replacing the first URL with the second URL, and jumping to the resource page of the second RUL.
The regular expression is also called a regular expression. (English: Regular Expression, often abbreviated in code as regex, regexp or RE), a concept of computer science. Regular expression (regular expression) describes a pattern of string matching, which can be used to check whether a string contains a certain substring, and replace the matched substring or extract a substring meeting a certain condition from a certain string, and the like. The components of the regular expression may be individual characters, a collection of characters, a range of characters, a selection between characters, or any combination of all of these components. Regular expressions are literal patterns composed of common characters (e.g., characters a through z) and special characters (called "meta characters"). The pattern describes one or more character strings to be matched when searching for text. The regular expression is used as a template to match a certain character pattern with the searched character string.
That is, the computer device 1 may implement omnibearing checking of the first URL and matching with the interception rule according to the interception rule; and after the first URL meets the matching condition of the interception rule, executing corresponding interception skip to obtain a second URL. In this embodiment, the second URL includes at least one of an empty resource, a local resource, an online resource, and a DataURI; and when the second URL is an empty resource, executing interception jumping is to block the resource request. The blocking request indicates that the request can be directly blocked by the browser and no response content is returned, so that abnormal fault tolerance processing needs to be carried out in the extension program, otherwise, the program can report an error. The local file representation may use a local file, such as C: \ tmp \ abc.txt or file:///C:/tmp/abc.txt or/usr/local/tmp/abc.txt as the request-response content.
Referring to fig. 4, in a specific embodiment, when the computer device 1 performs the interception skip according to the interception rule, since the interception rule includes a plurality of rules, the computer device 1 sequentially reads the rules one by one, and then matches the first URL with the rule; and when the first URL is matched with the rule, executing corresponding interception jump, then returning a result and ending. When the first URL is not matched with the rule, judging whether all the rules in the interception rule are read completely; when the reading is not finished, the next rule is continuously read; and returning a result after the reading is finished and ending.
And step S204, acquiring the resource corresponding to the second URL, and displaying the resource to a browser page.
As shown in FIG. 5, in an exemplary embodiment, the method further includes steps S400-S402.
And step S400, monitoring whether a new interception rule is written in the process of carrying out interception skip on the first URL according to the interception rule.
And step S402, when monitoring that a new interception rule is written, carrying out interception skip on the first URL according to the new interception rule.
Specifically, the computer device 1 monitors whether a new interception rule is written in real time, and when the new interception rule is written in, the interception skip can be executed according to the new interception rule, thereby implementing a dynamic interception function.
Additionally, in an exemplary embodiment, the method further comprises: and counting the first URL intercepted and jumped, and displaying the first URL to the Chrome page. By the method, the actual resource address in the resource access process can be counted, so that reference materials for setting the interception rule can be provided for the user, and the interception accuracy is further improved.
In summary, the Chrome-based URL intercepting method provided in this embodiment can obtain the first URL in the resource request after receiving the resource request input by the user; then calling an interception rule from the Chrome extension program, and carrying out interception skip on the first URL according to the interception rule to obtain a corresponding second URL; and finally, acquiring the resource corresponding to the second URL and displaying the resource to a browser page. The first URL address input by the user is judged and intercepted on the user side terminal equipment in a mode of writing the interception rule into the Chrome extension program. Therefore, the speed of accessing the target server by the user is effectively improved, the interception link of the intermediate equipment is reduced, and the data security is improved.
Example two
Fig. 6 is a block diagram schematically illustrating a Chrome-based URL intercepting apparatus according to a second embodiment of the present application, which may be divided into one or more program modules, and the one or more program modules are stored in a storage medium and executed by one or more processors to implement the second embodiment of the present application. The program modules referred to in the embodiments of the present application refer to a series of computer program instruction segments that can perform specific functions, and the following description will specifically describe the functions of the program modules in the embodiments.
As shown in fig. 6, the Chrome-based URL intercepting apparatus 400 may include an acquiring module 410, an intercepting module 420, and a displaying module 430, wherein:
the obtaining module 410 is configured to receive a resource request input by a user, and obtain a first URL in the resource request.
And the interception module 420 is configured to invoke an interception rule from the Chrome extension program, and perform interception skip on the first URL according to the interception rule to obtain a corresponding second URL.
And a display module 430, configured to acquire the resource corresponding to the second URL, and display the resource to a browser page.
In an exemplary embodiment, the obtaining module 410 is further configured to: registering a monitoring event in an extension program of the Chrome; when the resource request input by the user is received, the request object in the resource request is obtained through the monitoring event, and the first URL is extracted.
In an exemplary embodiment, the interception rule is an extension program written in the Chrome in advance, and is stored in the local storage unit corresponding to the Chrome. The interception rule includes: when the first URL is judged to be the same as a second URL in a preset URL set, jumping to a resource page of the second URL; or when the first URL is judged to contain the target character string in the second URL, jumping to the resource page of the second RUL; or when judging that a first character string exists in the first URL and a second character string in a preset character string set are the same, replacing the first character string with the second character string to obtain a second URL, and jumping to a resource page of the second RUL; or when the first URL is judged to accord with a preset regular expression, replacing the first URL with the second URL, and jumping to the resource page of the second RUL.
In an exemplary embodiment, the second URL includes at least one of a null resource, a local resource, an online resource, a DataURI; and when the second URL is an empty resource, executing interception jumping is to block the resource request.
In an exemplary embodiment, the intercepting module 420 is further configured to: monitoring whether a new interception rule is written in the process of carrying out interception skip on the first URL according to the interception rule; and when monitoring that a new interception rule is written, carrying out interception skip on the first URL according to the new interception rule.
In an exemplary embodiment, the display module 430 is further configured to: and counting the first URL intercepted and jumped, and displaying the first URL to the Chrome page.
EXAMPLE III
Fig. 7 schematically shows a hardware architecture diagram of a computer device 1 suitable for implementing the Chrome-based URL interception method according to the third embodiment of the present application. In the present embodiment, the computer device 1 is a device capable of automatically performing numerical calculation and/or information processing in accordance with a command set or stored in advance. For example, the server may be a rack server, a blade server, a tower server or a rack server (including an independent server or a server cluster composed of a plurality of servers) with a gateway function. As shown in fig. 7, the computer device 1 includes at least, but is not limited to: memory 510, processor 520, and network interface 530 may be communicatively linked to each other by a system bus. Wherein:
the memory 510 includes at least one type of computer-readable storage medium including a flash memory, a hard disk, a multimedia card, a card-type memory (e.g., SD or DX memory, etc.), a Random Access Memory (RAM), a Static Random Access Memory (SRAM), a read-only memory (ROM), an electrically erasable programmable read-only memory (EEPROM), a programmable read-only memory (PROM), a magnetic memory, a magnetic disk, an optical disk, etc. In some embodiments, the storage 510 may be an internal storage module of the computer device 1, such as a hard disk or a memory of the computer device 1. In other embodiments, the memory 510 may also be an external storage device of the computer device 1, such as a plug-in hard disk, a Smart Media Card (SMC), a Secure Digital (SD) Card, a Flash memory Card (Flash Card), and the like, which are provided on the computer device 1. Of course, the memory 510 may also comprise both an internal memory module of the computer device 1 and an external memory device thereof. In this embodiment, the memory 510 is generally used for storing an operating system installed in the computer device 1 and various application software, such as program codes of a Chrome-based URL interception method. In addition, the memory 510 may also be used to temporarily store various types of data that have been output or are to be output.
Processor 520 may be a Central Processing Unit (CPU), controller, microcontroller, microprocessor, or other data Processing chip in some embodiments. The processor 520 is generally used for controlling the overall operation of the computer device 1, such as performing control and processing related to data interaction or communication with the computer device 1. In this embodiment, processor 520 is configured to execute program codes stored in memory 510 or process data.
Network interface 530 may include a wireless network interface or a wired network interface, and network interface 530 is typically used to establish communication links between computer device 1 and other computer devices. For example, the network interface 530 is used to connect the computer apparatus 1 with an external terminal through a network, establish a data transmission channel and a communication link between the computer apparatus 1 and the external terminal, and the like. The network may be a wireless or wired network such as an Intranet (Intranet), the Internet (Internet), a Global System of Mobile communication (GSM), Wideband Code Division Multiple Access (WCDMA), a 4G network, a 5G network, Bluetooth (Bluetooth), or Wi-Fi.
It should be noted that FIG. 7 only shows a computer device having components 510 and 530, but it should be understood that not all of the shown components are required to be implemented, and that more or fewer components may be implemented instead.
In this embodiment, the program code of the Chrome-based URL intercepting method stored in the memory 510 may be further divided into one or more program modules, and executed by one or more processors (in this embodiment, the processor 520) to complete the embodiment of the present application.
Example four
The present embodiments also provide a computer-readable storage medium having a computer program stored thereon, the computer program, when executed by a processor, implementing the steps of:
receiving a resource request input by a user, and acquiring a first URL in the resource request; calling an interception rule from the Chrome extension program, and carrying out interception skip on the first URL according to the interception rule to obtain a corresponding second URL; and acquiring the resource corresponding to the second URL and displaying the resource to a browser page.
In this embodiment, the computer-readable storage medium includes a flash memory, a hard disk, a multimedia card, a card type memory (e.g., SD or DX memory, etc.), a Random Access Memory (RAM), a Static Random Access Memory (SRAM), a Read Only Memory (ROM), an Electrically Erasable Programmable Read Only Memory (EEPROM), a Programmable Read Only Memory (PROM), a magnetic memory, a magnetic disk, an optical disk, and the like. In some embodiments, the computer readable storage medium may be an internal storage unit of the computer device, such as a hard disk or a memory of the computer device. In other embodiments, the computer readable storage medium may be an external storage device of the computer device, such as a plug-in hard disk, a Smart Media Card (SMC), a Secure Digital (SD) Card, a Flash memory Card (Flash Card), and the like provided on the computer device. Of course, the computer-readable storage medium may also include both internal and external storage devices of the computer device. In this embodiment, the computer-readable storage medium is generally used for storing an operating system and various types of application software installed in a computer device, for example, a program code of a component management method of a service platform in an embodiment, and the like. Further, the computer-readable storage medium may also be used to temporarily store various types of data that have been output or are to be output.
It will be apparent to those skilled in the art that the modules or steps of the embodiments of the present application described above may be implemented by a general purpose computing device, they may be centralized on a single computing device or distributed across a network of multiple computing devices, and alternatively, they may be implemented by program code executable by a computing device, such that they may be stored in a storage device and executed by a computing device, and in some cases, the steps shown or described may be performed in an order different from that described herein, or they may be separately fabricated into individual integrated circuit modules, or multiple ones of them may be fabricated into a single integrated circuit module. Thus, embodiments of the present application are not limited to any specific combination of hardware and software.
The above description is only a preferred embodiment of the present application, and not intended to limit the scope of the present application, and all modifications that can be made by the use of the equivalent structures or equivalent processes in the specification and drawings of the present application or that can be directly or indirectly applied to other related technologies are also included in the scope of the present application.

Claims (10)

1. A URL interception method based on Chrome is characterized by comprising the following steps:
receiving a resource request input by a user, and acquiring a first URL in the resource request;
calling an interception rule from the Chrome extension program, and carrying out interception skip on the first URL according to the interception rule to obtain a corresponding second URL;
and acquiring the resource corresponding to the second URL and displaying the resource to a browser page.
2. The Chrome-based URL intercept method of claim 1, wherein said retrieving a first URL in said resource request comprises:
registering a monitoring event in an extension program of the Chrome;
when the resource request input by the user is received, the request object in the resource request is obtained through the monitoring event, and the first URL is extracted.
3. The Chrome-based URL intercepting method of claim 2, wherein the intercepting rule includes:
when the first URL is judged to be the same as a second URL in a preset URL set, jumping to a resource page of the second URL; or
When the first URL is judged to contain the target character string in the second URL, jumping to a resource page of the second RUL; or
When judging that a first character string exists in the first URL and a second character string in a preset character string set are the same, replacing the first character string with the second character string to obtain a second URL, and jumping to a resource page of a second RUL; or
And when the first URL is judged to accord with a preset regular expression, replacing the first URL with the second URL, and jumping to a resource page of the second RUL.
4. The Chrome-based URL intercepting method of claim 1 or 3, wherein the second URL includes at least one of a null resource, a local resource, an online resource, a DataURI; and when the second URL is an empty resource, executing interception jumping is to block the resource request.
5. The Chrome-based URL intercepting method of claim 1, wherein the intercepting rule is an extension program written in the Chrome in advance and stored in the local storage unit corresponding to the Chrome.
6. The Chrome-based URL intercepting method of claim 5, wherein the method further comprises:
monitoring whether a new interception rule is written in the process of carrying out interception skip on the first URL according to the interception rule;
and when monitoring that a new interception rule is written, carrying out interception skip on the first URL according to the new interception rule.
7. The Chrome-based URL intercepting method of claim 1, wherein the method further comprises:
and counting the first URL intercepted and jumped, and displaying the first URL to the Chrome page.
8. A Chrome-based URL intercepting apparatus, the apparatus comprising:
the acquisition module is used for receiving a resource request input by a user and acquiring a first URL in the resource request;
the interception module is used for calling an interception rule from the Chrome extension program and carrying out interception skip on the first URL according to the interception rule to obtain a corresponding second URL;
and the display module is used for acquiring the resource corresponding to the second URL and displaying the resource to a browser page.
9. A computer device, characterized in that it comprises a memory, a processor, said memory having stored thereon a computer program executable on said processor, said computer program, when executed by said processor, implementing the steps of the Chrome-based URL interception method according to any one of claims 1 to 7.
10. A computer-readable storage medium, having stored thereon a computer program executable by at least one processor to cause the at least one processor to perform the steps of the Chrome-based URL interception method of any of claims 1-7.
CN202010398826.3A 2020-05-12 2020-05-12 Chrome-based URL (Uniform resource locator) interception method and device and computer equipment Pending CN112417324A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202010398826.3A CN112417324A (en) 2020-05-12 2020-05-12 Chrome-based URL (Uniform resource locator) interception method and device and computer equipment

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202010398826.3A CN112417324A (en) 2020-05-12 2020-05-12 Chrome-based URL (Uniform resource locator) interception method and device and computer equipment

Publications (1)

Publication Number Publication Date
CN112417324A true CN112417324A (en) 2021-02-26

Family

ID=74844054

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202010398826.3A Pending CN112417324A (en) 2020-05-12 2020-05-12 Chrome-based URL (Uniform resource locator) interception method and device and computer equipment

Country Status (1)

Country Link
CN (1) CN112417324A (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN114491356A (en) * 2021-12-27 2022-05-13 北京金堤科技有限公司 Data acquisition method and device, computer storage medium and electronic equipment

Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101917404A (en) * 2010-07-15 2010-12-15 优视科技有限公司 Safety defense method for browser of mobile terminal
CN102957699A (en) * 2012-10-26 2013-03-06 北京奇虎科技有限公司 Access control method and system for enterprise Intranet
CN104008211A (en) * 2014-06-23 2014-08-27 可牛网络技术(北京)有限公司 Advertisement intercepting method and device
CN104035984A (en) * 2014-05-29 2014-09-10 北京奇虎科技有限公司 Method for blocking popup windows in browser and device for blocking popup windows
CN110188294A (en) * 2019-05-05 2019-08-30 平安科技(深圳)有限公司 URL intercepts conversion method, device and computer equipment
CN110602137A (en) * 2019-09-25 2019-12-20 光通天下网络科技股份有限公司 Malicious IP and malicious URL intercepting method, device, equipment and medium

Patent Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101917404A (en) * 2010-07-15 2010-12-15 优视科技有限公司 Safety defense method for browser of mobile terminal
CN102957699A (en) * 2012-10-26 2013-03-06 北京奇虎科技有限公司 Access control method and system for enterprise Intranet
CN104035984A (en) * 2014-05-29 2014-09-10 北京奇虎科技有限公司 Method for blocking popup windows in browser and device for blocking popup windows
CN104008211A (en) * 2014-06-23 2014-08-27 可牛网络技术(北京)有限公司 Advertisement intercepting method and device
CN110188294A (en) * 2019-05-05 2019-08-30 平安科技(深圳)有限公司 URL intercepts conversion method, device and computer equipment
CN110602137A (en) * 2019-09-25 2019-12-20 光通天下网络科技股份有限公司 Malicious IP and malicious URL intercepting method, device, equipment and medium

Non-Patent Citations (1)

* Cited by examiner, † Cited by third party
Title
傅建明等: "Chrome扩展安全", 《武汉大学学报(理学版)》 *

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN114491356A (en) * 2021-12-27 2022-05-13 北京金堤科技有限公司 Data acquisition method and device, computer storage medium and electronic equipment

Similar Documents

Publication Publication Date Title
CN108427705B (en) Electronic device, distributed system log query method and storage medium
CN109743315B (en) Behavior identification method, behavior identification device, behavior identification equipment and readable storage medium for website
CN110069297B (en) SPRING MVC-based exception handling method, SPRING MVC-based exception handling device, computer equipment and storage medium
EP3273362A1 (en) Webpage access method, apparatus, device and non-volatile computer storage medium
CN112491602B (en) Behavior data monitoring method and device, computer equipment and medium
CN108427731B (en) Page code processing method and device, terminal equipment and medium
CN107239701B (en) Method and device for identifying malicious website
CN112039900B (en) Network security risk detection method, system, computer device and storage medium
CN111008348A (en) Anti-crawler method, terminal, server and computer readable storage medium
CN108415998B (en) Application dependency relationship updating method, terminal, device and storage medium
CN112417240A (en) Website link detection method and device and computer equipment
CN112956157A (en) System and method for tracking client device events
CN113282591B (en) Authority filtering method, authority filtering device, computer equipment and storage medium
CN111291288B (en) Webpage link extraction method and system
CN112417324A (en) Chrome-based URL (Uniform resource locator) interception method and device and computer equipment
CN109246069B (en) Webpage login method and device and readable storage medium
CN109492144B (en) Association relation analysis method, device and storage medium for software system
CN110825976B (en) Website page detection method and device, electronic equipment and medium
CN112600803B (en) Web end data signature method and device and computer equipment
CN113722225A (en) Page testing method and device, computer equipment and storage medium
CN113934954A (en) Webpage first screen rendering method and device in application program
CN114356330A (en) Page configuration method and device, electronic equipment and storage medium
CN110851346B (en) Query statement boundary problem detection method, device, equipment and storage medium
CN111414525A (en) Data acquisition method and device for small program, computer equipment and storage medium
CN112948654A (en) Webpage crawling method and device and computer equipment

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
RJ01 Rejection of invention patent application after publication

Application publication date: 20210226

RJ01 Rejection of invention patent application after publication