Summary of the invention
The invention provides download link safety instruction method and device, user can be reduced at the probability carrying out attacked by rogue program in web download process.
The invention provides following scheme:
A kind of download link safety instruction method, comprising:
For the source web page of user's access, judge wherein whether comprise unsafe download link;
If comprised, obtain the relevant information of described unsafe download link;
According to described relevant information, represent the information about described unsafe download link to user in the user interface.
Wherein, the described source web page for user's access, judges that wherein whether comprising unsafe download link comprises:
The unique identification information of described source web page is sent to first server inquire about, in described first server, preserves the security level information of source web page;
According to the response message that described first server returns, judge whether comprise unsafe download link in described source web page.
Wherein, the relevant information of the described unsafe download link of described acquisition comprises:
The unique identification information of described source web page is sent to second server inquire about, in described second server, preserves the corresponding relation between source web page and the dangerous download link wherein comprised;
According to the response message that described second server returns, obtain the relevant information of described unsafe download link.
Wherein, the relevant information of the described unsafe download link of described acquisition comprises:
The link wherein comprised is extracted from described source web page;
The identification information of the link extracted is sent to the 3rd server to inquire about, in described 3rd server, preserves the security level information of download link;
According to the response message that described 3rd server returns, obtain the relevant information of described unsafe download link.
Wherein, the link comprised in described source web page comprises web page interlinkage and download link, describedly from described source web page, extracts the link wherein comprised comprise:
According to the feature of the destination Uniform Resource finger URL URL of link correspondence, from described source web page, extract the download link wherein comprised.
Wherein, also comprise:
Extract the domain name of the URL of described source web page, and the domain name of target URL corresponding to download link;
If the domain name of the target URL that download link is corresponding is different from the domain name of the URL of described source web page, and the domain name of target URL corresponding to download link does not belong to secure domain name, then described download link is defined as suspicious download link;
Described the 3rd server that the link extracted is sent to carries out inquiry and comprises:
Described suspicious download link is sent to the 3rd server inquire about.
Wherein, the relevant information of the described unsafe download link of described acquisition comprises:
Obtain the target URL that described dangerous download link is corresponding;
Described according to described relevant information, the information represented about described unsafe download link to user in the user interface comprises:
The target URL corresponding according to described dangerous download link, determines the position of described dangerous download link in the described source web page page;
The information about described unsafe download link is represented in described position.
A kind of download link safety reminding device, comprising:
Judging unit, for the source web page of accessing for user, judges wherein whether comprise unsafe download link;
Information acquisition unit, if for comprising, obtains the relevant information of described unsafe download link;
Represent unit, for according to described relevant information, represent the information about described unsafe download link to user in the user interface.
Wherein, described judging unit comprises:
First inquiry subelement, inquires about for the unique identification information of described source web page is sent to first server, preserves the security level information of source web page in described first server;
Judgment sub-unit, for the response message returned according to described first server, judges whether comprise unsafe download link in described source web page.
Wherein, described information acquisition unit comprises:
Second inquiry subelement, inquires about for the unique identification information of described source web page is sent to second server, preserves the corresponding relation between source web page and the dangerous download link wherein comprised in described second server;
First obtains subelement, for the response message returned according to described second server, obtains the relevant information of described unsafe download link.
Wherein, described information acquisition unit comprises:
Subelement is extracted in link, for extracting the link wherein comprised from described source web page;
3rd inquiry subelement, inquiring about for the identification information of the link extracted being sent to the 3rd server, preserving the security level information of download link in described 3rd server;
Second obtains subelement, for the response message returned according to described 3rd server, obtains the relevant information of described unsafe download link.
Wherein, the link comprised in described source web page comprises web page interlinkage and download link, and described link is extracted subelement and comprised:
Download link extracts subelement, for the feature of the destination Uniform Resource finger URL URL according to link correspondence, extracts the download link wherein comprised from described source web page.
Wherein, also comprise:
Domain name extraction unit, for extracting the domain name of the URL of described source web page, and the domain name of target URL corresponding to download link;
Suspicious download link determining unit, if different from the domain name of the URL of described source web page for the domain name of target URL corresponding to download link, and the domain name of the target URL that download link is corresponding does not belong to secure domain name, then described download link is defined as suspicious download link;
Described 3rd inquiry subelement specifically for: described suspicious download link is sent to the 3rd server and inquires about.
Wherein, described information acquisition unit comprises:
Target URL obtains subelement, for obtaining target URL corresponding to described dangerous download link;
The described unit that represents comprises:
Subelement is determined in position, for the target URL corresponding according to described dangerous download link, determines the position of described dangerous download link in the described source web page page;
Prompting subelement, for representing the information about described unsafe download link in described position.
According to specific embodiment provided by the invention, the invention discloses following technique effect:
Pass through the present invention, can when judging to comprise unsafe download link in source web page, get the relevant information of unsafe download link, and represent the information about described unsafe download link to user in the user interface accordingly, like this, user just can be made to have gained some understanding to the security of download link before click download link, avoid clicking blindly and down operation, suffer the infringement of the rogue program such as virus or wooden horse.
Embodiment
Below in conjunction with the accompanying drawing in the embodiment of the present invention, be clearly and completely described the technical scheme in the embodiment of the present invention, obviously, described embodiment is only the present invention's part embodiment, instead of whole embodiments.Based on the embodiment in the present invention, the every other embodiment that those of ordinary skill in the art obtain, all belongs to the scope of protection of the invention.
See Fig. 1, the download link safety instruction method that the embodiment of the present invention provides can comprise the following steps:
S101: for the source web page of user's access, judges wherein whether comprise unsafe download link;
In order to judge whether comprise unsafe download link in the source web page that user accesses fast, a database can be preserved in advance at server, the security level information of source web page is preserved in this database, that is, whether include unsafe download link at server end to each source web page in advance to add up, then statistics is preserved in a database.If do not comprise unsafe download link in a source web page, then level of security is higher, comprises unsafe download link else if, then the level of security of source web page is lower.Like this, for the source web page of user's access, just the unique identification of source web page (such as, the uniform resource position mark URL of webpage or the MD5 value of URL etc.) can be sent to this server and inquire about, accordingly, this server just can return Query Result.And then the result that just can return according to server at browser end judges whether there is unsafe download link in current source web page.Such as, if server return as a result, the level of security of this source web page is higher, then can determine there is not unsafe download link in this source web page, not need to carry out follow-up operation again.But, if the level of security of the Query Result display source web page that server returns is lower, then prove may there is unsafe download link in this source web page, and then also need to determine the relevant information of unsafe download link in this source web page (the target URL that such as unsafe download link is corresponding and/or the position in source web page etc.) further.
Wherein, server end can know the level of security of each source web page by all means, then carries out preserving.Such as, can be at server end, the download link comprised in each source web page is detected respectively, then determine the level of security of each source web page according to testing result.File download corresponding for download link, when carrying out safety detection to download link, also can get off by server end, and whether then detect based on virus base or malice feature database etc. is virus or trojan horse program.Or, if also can perform at browser end, the detection of download link is operated, then testing result can also to be uploaded onto the server end by browser end, then be preserved by server end, to upgrade existing database, etc.
S102: if comprised, obtains the relevant information of described unsafe download link;
For a source web page, the download link wherein comprised may be have a lot of, but unsafe download link may be only one of them or several.Therefore, when there is unsafe download link in discovery source web page be, not only need to inform in this source web page of user and comprise unsafe download link, also user will be informed, specifically which or which download link is unsafe, like this, really could play the effect of prompting user, not affect user to operations such as the clicks that other secure download link simultaneously.Therefore, after knowing in source web page and there is unsafe download link, the relevant information of unsafe download link can also be got.Such as, target URL corresponding to unsafe download link, link text can be got, or, the position of unsafe download link in source web page can also be got, etc.
Wherein, when obtaining the relevant information of unsafe download link, multiple implementation can be had, such as, wherein under a kind of mode, one database can be set at server end, the corresponding relation between each source web page and the unsafe download link wherein comprised in this database, can be preserved.That is, can detect the source web page including dangerous download link at server end in advance, the dangerous link wherein comprised be extracted, is then kept at server end.Like this, at browser end, comprise unsafe download link in known current source web page after, just directly the unique identification information such as the MD5 value of URL or URL of source web page can be sent to server to inquire about, like this, the unsafe download link comprised in source web page just directly can be returned to browser end by server end, and browser end just can know the relevant information of unsafe download link accordingly, also namely, know that concrete which or which download link is unsafe.
Or under another kind of implementation, server end can preserve the security level information of download link, also, download link all in server end is in advance to network detects, and then, generates database according to testing result.Such as, if after detecting certain download link, discovery is unsafe, then the level of security of this download link is lower, or, be directly designated dangerous download link; And if find that certain download link is safe, then its level of security can be set to higher level, or be directly designated secure download link, etc.Certainly, can also only preserve unsafe download link in a database, other do not occur that link in a database is all thought safe, or, only preserve safe download link in a database, other do not occur that link in a database is all thought unsafe, or think unknown, its security can also be detected further, etc.In a word, preserve in the server, the relevant information whether each download link is safe.Like this, for the source web page of user's access, if find wherein to comprise unsafe download link by step S101, then at browser end, the link comprised in source web page can be extracted, then the security (what be specifically sent to server can be the identification information linking the links such as corresponding target URL or its MD5 value) of query link in this server is sent, server end is after the identification information receiving link, just can inquire about its database, and Query Result is returned to browser end, the result that such browser end just can return according to server determines whether each link is safe link.
Wherein, extracting link and the identification information of link is sent in the process of server lookup from source web page, in order to for simplicity, directly the whole links comprised in source web page all can be extracted, and inquire about.But, if the number of links comprised in source web page is very many, then obviously can take more transmission and computational resource, and may not all link be all unsafe, if each is sent to server and goes to inquire about, the waste of resource can be caused.Therefore, in embodiments of the present invention, when extracting link from source web page, can be selectively extract.Such as, first, because the link in webpage can be divided into common web page interlinkage (also namely to link the URL that corresponding target URL is a webpage, after clicking this link, can jump in this webpage), and download link (is also that the embodiment of the present invention is paid close attention to, the download path of the target URL of its correspondence certain file often, after clicking download link, browser can call and download, carry out the download of file), and it is of concern that download link in the obvious embodiment of the present invention, therefore, when extracting link from source web page, only can extract download link wherein.In order to reach this object, can add up the feature of download link in advance, set up the information of similar download link feature database, such as, generally comprise " download.php " etc. in the target URL that download link is corresponding, like this, when extracting link from source web page, just can this feature database of comparison, the link meeting download link feature is extracted, and inquire about, so just greatly can reduce taking resource, avoid the waste causing resource.
Certainly, toward contact, there are some features for the unsafe download link comprised in source web page, such as: if the domain name of target URL corresponding to the download link in a source web page is identical with the URL domain name of source web page, then this download link is all generally safe, or, even if the domain name of the target URL that the download link in a source web page is corresponding is different from the URL domain name of source web page, but the domain name of the target URL that download link is corresponding is a known secure domain name, then this download link is generally also all safe.Only have when the domain name of target URL corresponding to download link is different with the URL domain name of source web page, and the domain name of target URI corresponding to download link also not in the list of secure domain name time, the unsafe possibility of this download link is just higher.Therefore, when extracting the link in source web page and inquire about, above-mentioned factor can also be further considered, also, first judge that whether the domain name of the target URL that download link is corresponding is identical with the domain name of source web page URL, if identical, then no longer extracts; If different, then judge whether the domain name of the target URL that download link is corresponding is secure domain name further, if so, also no longer extract, if not, then it can be used as suspicious download link to extract, and be sent to server and carry out security inquiry.During specific implementation, the list (can certainly be the list of dangerous domain name) of secure domain name can be obtained by number of ways in advance, be kept at browser end, compare use for browser end.Such as, can be that server end collection relevant information generates this list, then be issued to browser end, regularly or aperiodically can also upgrade this list etc.During the link comprised in extraction source webpage, due to general corresponding HTML (the HypertextMarkup Language of source web page, HTML (Hypertext Markup Language)) etc. file, therefore, API (Application Programming Interface, the application programming interface) function etc. that can directly use operating system to provide carries out extracting.
In a word, no matter be directly the URL of source web page is sent to server lookup, or re-send to server lookup after first extracting link from source web page, can learn which or which download link is unsafe from server end, wherein, the information that server returns is all generally target URL corresponding to unsafe download link, and namely this information can be used as follow-up foundation when representing information.
It should be noted that, in actual applications, if do not need the factor of consideration time, can also be that extract at browser end can after download link, directly in this locality, security detection is carried out (such as to download link, can in sandbox can file download corresponding to download link to local, then detect according to virus characteristic storehouse etc.), or, can after download link be sent to server end, if server end cannot determine according to current database that certain download link is safe or unsafe, then first server also can perform the detection to download link, again testing result is returned to browser end afterwards.Even, in step S101, also the link wherein comprised can directly be extracted from source web page, then each download link whether safety is analyzed successively, thus judge whether comprise unsafe download link in source web page, meanwhile, the relevant information of unsafe web page interlinkage in source web page can also be obtained out.
S103: according to described relevant information, represents the information about described unsafe download link to user in the user interface.
After having known the target URL that unsafe download link is corresponding, just can to eject the mode such as dialog box or bubble, target URL corresponding for unsafe download link or link text etc. are shown, like this, user just can know in current source web page, and which or which download link may be unsafe, therefore, just can no longer download by clickthrough, to avoid the infringement suffering virus, wooden horse etc.Or, after the target URL that unsafe download link is corresponding can also have been known, find out the position of unsafe download link in source web page, so just can point out to user, non-safety information is presented to user more intuitively in the position at unsafe download link place.During specific implementation, one section of specific Javascript code is inserted in the page of source web page, and using analyzing target URL corresponding to unsafe download link out as Parameter transfer to Javascript code, Javascript code can use dynamic page operative technique in the page, find out the position of unsafe download link, (division, DIV element is used to as the content of bulk in html document (block-level) provides the element of structure and background to create a DIV; All the elements between the start-tag of DIV and end-tag are all used to form this block, wherein the characteristic of institute's containing element is controlled by the attribute of DIV label) floating layer on unsafe download link, user can operate DIV and float button on layer and close floating layer.
In a word, in embodiments of the present invention, can when judging to comprise unsafe download link in source web page, get the relevant information of unsafe download link, and represent the information about described unsafe download link to user in the user interface accordingly, like this, user just can be made to have gained some understanding to the security of download link before click download link, avoid clicking blindly and down operation, suffer the infringement of the rogue program such as virus or wooden horse.
Corresponding with the download link safety instruction method that the embodiment of the present invention provides, the embodiment of the present invention this provide a kind of download link safety reminding device, see Fig. 1, this device can comprise:
Judging unit 101, for the source web page of accessing for user, judges wherein whether comprise unsafe download link;
Information acquisition unit 102, if for comprising, obtains the relevant information of described unsafe download link;
Represent unit 103, for according to described relevant information, represent the information about described unsafe download link to user in the user interface.
Wherein, judging unit 101 can comprise:
First inquiry subelement, inquires about for the unique identification information of described source web page is sent to first server, preserves the security level information of source web page in described first server;
Judgment sub-unit, for the response message returned according to described first server, judges whether comprise unsafe download link in described source web page.
Specifically when obtaining the relevant information of unsafe download link, information acquisition unit 102 can comprise:
Second inquiry subelement, inquires about for the unique identification information of described source web page is sent to second server, preserves the corresponding relation between source web page and the dangerous download link wherein comprised in described second server;
First obtains subelement, for the response message returned according to described second server, obtains the relevant information of described unsafe download link.
Or under another kind of implementation, information acquisition unit 102 also can comprise:
Subelement is extracted in link, for extracting the link wherein comprised from described source web page;
3rd inquiry subelement, inquiring about for the identification information of the link extracted being sent to the 3rd server, preserving the security level information of download link in described 3rd server;
Second obtains subelement, for the response message returned according to described 3rd server, obtains the relevant information of described unsafe download link.
In order to avoid waste transmission and computational resource, when the link comprised in source web page comprises web page interlinkage and download link, described link is extracted subelement and can be comprised:
Download link extracts subelement, for the feature of the destination Uniform Resource finger URL URL according to link correspondence, extracts the download link wherein comprised from described source web page.
Further, this device can also comprise:
Domain name extraction unit, for extracting the domain name of the URL of described source web page, and the domain name of target URL corresponding to download link;
Suspicious download link determining unit, if different from the domain name of the URL of described source web page for the domain name of target URL corresponding to download link, and the domain name of the target URL that download link is corresponding does not belong to secure domain name, then described download link is defined as suspicious download link;
Accordingly, described 3rd inquiry subelement specifically for: described suspicious download link is sent to the 3rd server and inquires about.
Wherein, information acquisition unit 202 specifically can comprise:
Target URL obtains subelement, for obtaining target URL corresponding to described dangerous download link;
Represent unit 203 specifically can comprise:
Subelement is determined in position, for the target URL corresponding according to described dangerous download link, determines the position of described dangerous download link in the described source web page page;
Prompting subelement, for representing the information about described unsafe download link in described position.
In a word, in the download link safety reminding device that the embodiment of the present invention provides, can when judging to comprise unsafe download link in source web page, get the relevant information of unsafe download link, and represent the information about described unsafe download link to user in the user interface accordingly, like this, user just can be made to have gained some understanding to the security of download link before click download link, avoid clicking blindly and down operation, suffer the infringement of the rogue program such as virus or wooden horse.
As seen through the above description of the embodiments, those skilled in the art can be well understood to the mode that the present invention can add required general hardware platform by software and realizes.Based on such understanding, technical scheme of the present invention can embody with the form of software product the part that prior art contributes in essence in other words, this computer software product can be stored in storage medium, as ROM/RAM, magnetic disc, CD etc., comprising some instructions in order to make a computer equipment (can be personal computer, server, or the network equipment etc.) perform the method described in some part of each embodiment of the present invention or embodiment.
Each embodiment in this instructions all adopts the mode of going forward one by one to describe, between each embodiment identical similar part mutually see, what each embodiment stressed is the difference with other embodiments.Especially, for device or system embodiment, because it is substantially similar to embodiment of the method, so describe fairly simple, relevant part illustrates see the part of embodiment of the method.Apparatus and system embodiment described above is only schematic, the wherein said unit illustrated as separating component or can may not be and physically separates, parts as unit display can be or may not be physical location, namely can be positioned at a place, or also can be distributed in multiple network element.Some or all of module wherein can be selected according to the actual needs to realize the object of the present embodiment scheme.Those of ordinary skill in the art, when not paying creative work, are namely appreciated that and implement.
Above to download link safety instruction method provided by the present invention and device, be described in detail, apply specific case herein to set forth principle of the present invention and embodiment, the explanation of above embodiment just understands method of the present invention and core concept thereof for helping; Meanwhile, for one of ordinary skill in the art, according to thought of the present invention, all will change in specific embodiments and applications.In sum, this description should not be construed as limitation of the present invention.