Movatterモバイル変換


[0]ホーム

URL:


CN114268542A - Network card information modification method and device, storage medium and computer equipment - Google Patents

Network card information modification method and device, storage medium and computer equipment
Download PDF

Info

Publication number
CN114268542A
CN114268542ACN202111571292.0ACN202111571292ACN114268542ACN 114268542 ACN114268542 ACN 114268542ACN 202111571292 ACN202111571292 ACN 202111571292ACN 114268542 ACN114268542 ACN 114268542A
Authority
CN
China
Prior art keywords
modified
parameter
network card
card information
allowed
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.)
Granted
Application number
CN202111571292.0A
Other languages
Chinese (zh)
Other versions
CN114268542B (en
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.)
Secworld Information Technology Beijing Co Ltd
Qax Technology Group Inc
Original Assignee
Secworld Information Technology Beijing Co Ltd
Qax Technology Group Inc
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 Secworld Information Technology Beijing Co Ltd, Qax Technology Group IncfiledCriticalSecworld Information Technology Beijing Co Ltd
Priority to CN202111571292.0ApriorityCriticalpatent/CN114268542B/en
Publication of CN114268542ApublicationCriticalpatent/CN114268542A/en
Application grantedgrantedCritical
Publication of CN114268542BpublicationCriticalpatent/CN114268542B/en
Activelegal-statusCriticalCurrent
Anticipated expirationlegal-statusCritical

Links

Images

Landscapes

Abstract

The invention discloses a network card information modification method, a network card information modification device, a storage medium and computer equipment, relates to the technical field of information, and mainly aims to effectively protect network card information. The method comprises the following steps: acquiring a network card information modification instruction of a target network card, wherein the network card information modification instruction comprises parameters to be modified corresponding to the target network card; judging whether the parameters to be modified are allowed to be modified or not based on the parameters to be modified and a preset network card information modification table, wherein each parameter of the target network card and corresponding mark information whether the parameters are allowed to be modified or not are recorded in the preset network card information modification table; if the parameter to be modified is allowed to be modified, calling a corresponding target modification function to modify the parameter to be modified; and if the parameter to be modified is not allowed to be modified, feeding back prompt information that the parameter to be modified is not allowed to be modified to the user. The invention is suitable for modifying the network card information.

Description

Network card information modification method and device, storage medium and computer equipment
Technical Field
The present invention relates to the field of information technologies, and in particular, to a method and an apparatus for modifying network card information, a storage medium, and a computer device.
Background
The network card information comprises IP information of the network card, MAC information, gateway information and the like, in actual work, a user can modify the network card information at will, if the user modifies the IP information in the network card information at will, conflict of IP addresses is easily caused, meanwhile, each employee and the IP are bound, if the user modifies the computer IP to be disguised as other people, violation operation is carried out, which user carries out violation operation cannot be specifically positioned, unnecessary trouble is brought to network management personnel, on the basis, the network card information is prevented from being modified at will by the user, and network card information protection becomes a problem to be solved urgently.
At present, the network card icon is usually hidden, so that the modification of the network card information is avoided. However, the method of hiding the network card icon to prevent the network card information from being modified is effective for users with weak computer knowledge, but for users with computer knowledge, the hidden icon is easy to display, and the network card information is modified according to the displayed icon, so that the network card information cannot be effectively protected by the method, meanwhile, some network card information is allowed to be modified, when some information of the network card needs to be modified according to working requirements, the hidden network card icon needs to be displayed, the network card icon is hidden after the network card information is modified, and a large amount of time is wasted for workers in the process of repeatedly displaying the icon and then hiding the icon.
Disclosure of Invention
The invention provides a network card information protection method, a network card information protection device, a storage medium and computer equipment, and mainly aims to effectively protect network card information.
According to a first aspect of the present invention, there is provided a network card information modifying method, including:
acquiring a network card information modification instruction of a target network card, wherein the network card information modification instruction comprises parameters to be modified corresponding to the target network card;
judging whether the parameters to be modified are allowed to be modified or not based on the parameters to be modified and a preset network card information modification table, wherein each parameter of the target network card and corresponding mark information whether the parameters are allowed to be modified or not are recorded in the preset network card information modification table;
if the parameter to be modified is allowed to be modified, calling a corresponding target modification function to modify the parameter to be modified;
and if the parameter to be modified is not allowed to be modified, feeding back prompt information that the parameter to be modified is not allowed to be modified to the user.
According to a second aspect of the present invention, there is provided a network card information protection apparatus, including:
the network card information modification device comprises an acquisition unit, a processing unit and a processing unit, wherein the acquisition unit is used for acquiring a network card information modification instruction of a target network card, and the network card information modification instruction comprises a parameter to be modified corresponding to the target network card;
a determining unit, configured to determine whether the parameter to be modified is allowed to be modified based on the parameter to be modified and a preset network card information modification table, where each parameter of the target network card and corresponding flag information indicating whether the parameter is allowed to be modified are recorded in the preset network card information modification table;
the calling unit is used for calling a corresponding target modification function to modify the parameter to be modified if the parameter to be modified is allowed to be modified;
and the feedback unit is used for feeding back prompt information that the parameter to be modified is not allowed to be modified to a user if the parameter to be modified is not allowed to be modified.
According to a third aspect of the present invention, there is provided a computer readable storage medium having stored thereon a computer program which, when executed by a processor, performs the steps of:
acquiring a network card information modification instruction of a target network card, wherein the network card information modification instruction comprises parameters to be modified corresponding to the target network card;
judging whether the parameters to be modified are allowed to be modified or not based on the parameters to be modified and a preset network card information modification table, wherein each parameter of the target network card and corresponding mark information whether the parameters are allowed to be modified or not are recorded in the preset network card information modification table;
if the parameter to be modified is allowed to be modified, calling a corresponding target modification function to modify the parameter to be modified;
and if the parameter to be modified is not allowed to be modified, feeding back prompt information that the parameter to be modified is not allowed to be modified to the user.
According to a fourth aspect of the present invention, there is provided a computer device comprising a memory, a processor and a computer program stored on the memory and executable on the processor, the processor implementing the following steps when executing the program:
acquiring a network card information modification instruction of a target network card, wherein the network card information modification instruction comprises parameters to be modified corresponding to the target network card;
judging whether the parameters to be modified are allowed to be modified or not based on the parameters to be modified and a preset network card information modification table, wherein each parameter of the target network card and corresponding mark information whether the parameters are allowed to be modified or not are recorded in the preset network card information modification table;
if the parameter to be modified is allowed to be modified, calling a corresponding target modification function to modify the parameter to be modified;
and if the parameter to be modified is not allowed to be modified, feeding back prompt information that the parameter to be modified is not allowed to be modified to the user.
According to the network card information modification method, device, storage medium and computer equipment provided by the invention, compared with the current mode of hiding the network card icon to protect the network card information, the network card information modification method obtains the network card information modification instruction of the target network card, wherein the network card information modification instruction comprises the parameters to be modified corresponding to the target network card; judging whether the parameters to be modified are allowed to be modified or not based on the parameters to be modified and a preset network card information modification table, wherein each parameter of the target network card and corresponding mark information whether the parameters are allowed to be modified or not are recorded in the preset network card information modification table; if the parameter to be modified is allowed to be modified, calling a corresponding target modification function to modify the parameter to be modified; if the parameter to be modified is not allowed to be modified, feeding back prompt information that the parameter to be modified is not allowed to be modified to a user, therefore, whether the parameter to be modified is allowed to be modified or not is judged by modifying the table based on the parameter to be modified and the preset network card information, if the parameter to be modified is allowed to be modified, calling a corresponding modification function to modify the parameter to be modified, if the parameter to be modified is not allowed to be modified, feeding back prompt information which is not allowed to be modified to a user, thereby avoiding the situation that the user displays the hidden icon and modifies the network card information according to the displayed icon, and furthermore, the network card information can be effectively protected, and meanwhile, when some information of the network card needs to be modified, the process of repeatedly displaying the icon and then hiding the icon can be avoided, and a large amount of time of workers is saved.
Drawings
The accompanying drawings, which are included to provide a further understanding of the invention and are incorporated in and constitute a part of this application, illustrate embodiment(s) of the invention and together with the description serve to explain the invention without limiting the invention. In the drawings:
fig. 1 shows a flowchart of a network card information modification method according to an embodiment of the present invention;
fig. 2 shows a flowchart of another network card information modification method provided in the embodiment of the present invention;
fig. 3 is a schematic structural diagram illustrating a network card information modifying apparatus according to an embodiment of the present invention;
fig. 4 is a schematic structural diagram illustrating another network card information modifying apparatus according to an embodiment of the present invention;
fig. 5 shows a physical structure diagram of a computer device according to an embodiment of the present invention.
Detailed Description
The invention will be described in detail hereinafter with reference to the accompanying drawings in conjunction with embodiments. It should be noted that the embodiments and features of the embodiments in the present application may be combined with each other without conflict.
At present, the mode of preventing the network card information from being modified by hiding the network card icon can result in that the network card information cannot be effectively protected, meanwhile, according to the working requirement, when some information of the network card needs to be modified, the hidden network card icon needs to be displayed, the network card icon is hidden after the network card information is modified, and a large amount of time can be wasted by workers in the process of repeatedly displaying the icon and then hiding the icon.
In order to solve the above problem, an embodiment of the present invention provides a method for modifying network card information, as shown in fig. 1, where the method includes:
101. and acquiring a network card information modification instruction of a target network card, wherein the network card information modification instruction comprises parameters to be modified corresponding to the target network card.
The network card information comprises IP information, MAC information, gateway information and the like, and parameters to be modified such as SIOCSIFIADDR and SIOCDIFADR and the like and related parameters for modifying the network card information.
For the embodiment of the present invention, in order to overcome the defect that the network card information cannot be effectively protected in the prior art, the embodiment of the present invention determines whether the parameter to be modified is allowed to be modified or not based on the parameter to be modified and a preset network card information modification table, and if the parameter to be modified is allowed to be modified, calling a corresponding modification function to modify the parameter to be modified, if the parameter to be modified is not allowed to be modified, the prompt information which is not allowed to be modified is fed back to the user, the condition that the user displays the hidden icon and modifies the network card information according to the displayed icon can be avoided, therefore, the network card information can be effectively protected, meanwhile, when some information of the network card needs to be modified, the process of repeatedly displaying the icons and then hiding the icons can be avoided, and a large amount of time of workers is saved. The embodiment of the invention is mainly applied to a scene of protecting the network card information, and the execution main body of the embodiment of the invention is a device or equipment capable of protecting the network card information, and can be specifically arranged at one side of a client or a server.
Specifically, when network card information needs to be protected, for example, if a user wants to modify IP address information in the network card information, the user first modifies the network card information through ioctl or netlink system call at a client, and responds to a network card information modification instruction triggered by the user, where the network card information modification instruction includes parameters to be modified corresponding to the target network card, such as sigsicifaddr, siocdiaddr and the like, related to network card modification, when the network card information modification instruction of the target network card is received, whether the parameters to be modified are allowed to be modified is determined based on the parameters to be modified carried in the network card information modification instruction and a preset network card information modification table, if the parameters to be modified are allowed to be modified, a corresponding modification function is called to modify the parameters to be modified, and if the parameters to be modified are not allowed to be modified, prompt information that the parameters to be modified are not allowed to be modified is fed back to the user, and then the network card information can be effectively protected.
102. And judging whether the parameters to be modified are allowed to be modified or not based on the parameters to be modified and a preset network card information modification table, wherein each parameter of the target network card and corresponding mark information whether the parameters are allowed to be modified or not are recorded in the preset network card information modification table.
For the embodiment of the present invention, after obtaining the parameters to be modified carried in the network card information modification instruction, determining the parameters corresponding to the parameters to be modified in the parameters based on the parameters of the target network card recorded in the preset network card information modification table, then determining the mark information of the parameters corresponding to the parameters to be modified, and finally judging whether the parameters to be modified are allowed to be modified according to the mark information, if the parameters to be modified are allowed to be modified, calling the corresponding modification function to modify the parameters to be modified, if the parameters to be modified are not allowed to be modified, feeding back the prompt information that the parameters to be modified are not allowed to be modified to the user, so as to avoid the situation that the user displays the hidden icons, and modifies the network card information according to the displayed icons, thereby effectively protecting the network card information, it should be noted that the label information may be english character labels of "yes" and "no", or text labels such as "allow modification" and "disallow modification", or number labels "0" and "1", where one represents that modification is allowed and one represents that modification is disallowed, and a specific label mode is not specifically limited in the embodiment of the present invention, so that whether the network card information is allowed to be modified or not is determined based on the parameter to be modified and a preset network card information modification table, and the network card information can be effectively protected.
103. And if the parameter to be modified is allowed to be modified, calling a corresponding target modification function to modify the parameter to be modified.
The parameters to be modified can be modified specifically through an ioctl system call mode, and the user mode sends the parameters to be modified to the kernel mode through the ioctl system call mode for modification.
For the embodiment of the present invention, after determining whether the parameter to be modified is allowed to be modified, if the parameter to be modified is allowed to be modified, a target modification function corresponding to the parameter to be modified is called to modify the parameter to be modified, for example, if the parameter to be modified is sioclidr, which indicates that a network card IP is set, a modification power function corresponding to the network card IP is called to set the IP, if the parameter to be modified is sioclidr, which indicates that the network card IP is deleted, a target modification function corresponding to the network card is called to delete the IP, so that by determining whether the parameter to be modified is allowed to be modified, if the parameter to be modified is allowed to be modified, the corresponding target modification function is called to modify the parameter to be modified, if the parameter to be modified is not allowed to be modified, prompt information that the parameter is not allowed to be modified is fed back to a user, so that the user can avoid displaying a hidden icon, and the network card information is modified according to the displayed icon, so that the network card information can be effectively protected.
104. And if the parameter to be modified is not allowed to be modified, feeding back prompt information that the parameter to be modified is not allowed to be modified to the user.
For the embodiment of the invention, after judging whether the parameter to be modified is allowed to be modified, if the parameter to be modified is not allowed to be modified, the parameter to be modified is prohibited to be modified, and meanwhile, prompt information for prohibiting modification is generated, and like a user feeds back the prompt information for prohibiting modification of the parameter to be modified, the prompt information can be text characters such as 'prohibition of modification', and the like, and can also be other characters.
According to the network card information protection method provided by the invention, compared with the current mode of hiding the network card icon to protect the network card information, the network card information protection method provided by the invention obtains the network card information modification instruction of the target network card, wherein the network card information modification instruction comprises the parameters to be modified corresponding to the target network card; judging whether the parameters to be modified are allowed to be modified or not based on the parameters to be modified and a preset network card information modification table, wherein each parameter of the target network card and corresponding mark information whether the parameters are allowed to be modified or not are recorded in the preset network card information modification table; if the parameter to be modified is allowed to be modified, calling a corresponding target modification function to modify the parameter to be modified; if the parameter to be modified is not allowed to be modified, feeding back prompt information that the parameter to be modified is not allowed to be modified to a user, therefore, whether the parameter to be modified is allowed to be modified or not is judged by modifying the table based on the parameter to be modified and the preset network card information, if the parameter to be modified is allowed to be modified, calling a corresponding modification function to modify the parameter to be modified, if the parameter to be modified is not allowed to be modified, the prompt information which is not allowed to be modified is fed back to the user, the condition that the user displays the hidden icon and modifies the network card information according to the displayed icon can be avoided, therefore, the network card information can be effectively protected, meanwhile, when some information of the network card needs to be modified, the process of repeatedly displaying the icons and then hiding the icons can be avoided, and a large amount of time of workers is saved.
Further, in order to better describe the above process of protecting the network card information, as a refinement and an extension to the above embodiment, an embodiment of the present invention provides another method for modifying the network card information, as shown in fig. 2, where the method includes:
201. and acquiring a network card information modification instruction of a target network card, wherein the network card information modification instruction comprises parameters to be modified corresponding to the target network card.
For the embodiment of the present invention, before receiving the network card information modification instruction of the target network card, the method further includes: determining the storage position of a modification function corresponding to each parameter in the target network card; determining a judgment function corresponding to each parameter, replacing each modification function at the storage position with the judgment function, and storing each modification function in a cache.
Specifically, the user mode may modify the parameter to be modified through ioctl or netlink system call, and before the user mode modifies the parameter to be modified through netlink system call, the modification function corresponding to each parameter in the target network card needs to be replaced by a judgment function, based on this, the method includes, because a storage location corresponding to each modification function is recorded in a preset modification function location table, based on the preset modification function location table, determining a storage location of each modification function, then acquiring each modification function at the storage location, and caching the modification function locally, and at the same time, determining a judgment function corresponding to each modification parameter in common, and calling a rtnl _ register function to register the judgment function to a corresponding location of a rtnl _ msg _ handles array, that is, storing the judgment function to the storage location, then, based on the information modification operation triggered by the user, the network card information modification instruction needs to be acquired, and based on this,step 201 specifically includes: when a system call request is detected, intercepting the system call request through a hook function arranged in a kernel, wherein the system call request comprises parameter information; judging whether the system calling request is a network card information modification instruction of the target network card or not based on parameter information in the system calling request; and if the system calling request is the network card information modification instruction, transmitting the parameters to be modified carried in the network card information modification instruction to the storage position.
Specifically, a user mode may trigger a plurality of information modification instructions at the same time, wherein the plurality of information modification instructions include not only a network card information modification instruction of the target network card, based on which, a hook function is firstly set in a kernel, when the information modification instruction of the user mode is received, a system call request is started, meanwhile, the system call request is intercepted through the hook function set in the kernel, and based on parameter information carried in the system call request, whether the system call request is the network card information modification instruction of the target network card is judged, if the system call request is the network card information modification instruction, a parameter to be modified carried in the network card information modification instruction is transmitted to the storage location, so as to judge whether the parameter to be modified is allowed to be modified by using the judgment function at the storage location, if the parameter to be modified is allowed to be modified, calling a corresponding modification function to modify the parameter, and if the parameter to be modified is not allowed to be modified, feeding back prompt information that the parameter to be modified is not allowed to be modified to a user.
202. And judging whether the parameters to be modified are allowed to be modified or not based on the parameters to be modified and a preset network card information modification table, wherein each parameter of the target network card and corresponding mark information whether the parameters are allowed to be modified or not are recorded in the preset network card information modification table.
For the embodiment of the present invention, after the parameter to be modified is transmitted to the storage location, it needs to be determined whether the parameter to be modified is allowed to be modified, and based on this, step 202 specifically includes: and judging whether the parameter to be modified is allowed to be modified or not by utilizing the judgment function at the storage position based on the parameter to be modified and a preset network card information modification table.
Specifically, since each modification function at the storage location is replaced with a judgment function, after the parameter to be modified is transmitted to the storage location, based on the parameter to be modified and a preset network card information modification table, the judgment function at the storage location is used to judge whether the parameter to be modified is allowed to be modified, and specifically, the method for judging whether the parameter to be modified is allowed to be modified by using the judgment function is as follows: matching each parameter recorded in the preset network card information modification table with the parameter to be modified by using the judgment function; and if the target parameters matched with the parameters to be modified exist in the parameters, judging whether the parameters to be modified are allowed to be modified or not based on the marking information corresponding to the target parameters.
Specifically, matching each parameter recorded in the preset network card information modification table with a parameter to be modified by using the judgment function, and judging whether a target parameter matching the parameter to be modified exists in each parameter, where the method for specifically determining the target parameter matching the parameter to be modified includes: respectively segmenting the parameters to be modified and the parameters by taking a preset character length as a unit to obtain at least one first segmentation character string corresponding to the parameters to be modified and at least one second segmentation character string corresponding to the parameters; matching the first segmented character string with the second segmented character string respectively to obtain a matching result; and determining the parameter corresponding to the second segmentation character string with the most matched characters in the matching result as the target parameter.
Specifically, with a preset character length as a unit, performing segmentation processing on the parameter to be modified to obtain at least one first segmented character string corresponding to the parameter to be modified, simultaneously, performing segmentation processing on each parameter recorded in the preset network card information modification table to obtain at least one second segmented character string corresponding to each parameter, then determining the same number of characters in the first segmented character string and each second segmented character string, determining the maximum number of characters in each number of characters, and finally determining the parameter corresponding to the maximum number of characters as the target parameter, for example, the parameter to be modified is the IP address 113.233.128.21, the parameters recorded in the preset network card information modification table include 113.356.112.21, 113.233.128.21 and 123.115.003.50, performing segmentation processing on the parameter to be modified to obtain the first segmented character string of 1/1/3/2/3/3/1/1 2/8/2/1, and meanwhile, respectively performing segmentation processing on each parameter recorded in the preset network card information modification table to respectively obtain 1/1/3/3/5/6/1/1/2/2/1, 1/1/3/2/3/3/1/2/8/2/1, 1/2/3/1/1/5/0/0/3/5/0, and respectively matching the first segmented character string with the second segmented character string to obtain a first segmented character string of 1/1/3/2/3/3/1/breast ratio 2/8/2/1 has the most characters matched with the second split character string 1/1/3/2/3/3/1/2/8/2/1, therefore, the 1/1/3/2/3/3/1/2/8/2/1 is determined as the target parameter, and then, based on the flag information indicating whether the target parameter is allowed to be modified, it is determined whether the parameter to be modified is allowed to be modified, for example, if the flag information indicating the target parameter is "NO", determining that the parameter to be modified is not allowed to be modified, and if the marking information corresponding to the target parameter is "YES", determining that the parameter to be modified is allowed to be modified.
203. And if the parameter to be modified is allowed to be modified, determining the target modification function and the corresponding function interface in each modification function stored in the cache.
For the embodiment of the present invention, if the parameter to be modified is allowed to be modified, the cache position corresponding to the target modification function is determined, the function obtaining interface corresponding to the target modification function is determined, and the target modification function at the cache position is called to modify the parameter to be modified based on the function obtaining interface.
204. And calling the target modification function to modify the parameter to be modified based on the function interface.
For the embodiment of the invention, after the function acquisition interface corresponding to the target modification function is determined, the target modification function is called in the function acquisition interface to modify the parameter to be modified.
205. And if the parameter to be modified is not allowed to be modified, feeding back prompt information that the parameter to be modified is not allowed to be modified.
For the embodiment of the present invention, if the parameter to be modified is not allowed to be modified, a modification prohibition instruction that the parameter to be modified is not allowed to be modified is generated, based on the modification prohibition instruction, the function acquisition interface is closed, that is, the acquisition path of the target modification function is blocked, and a prompt message that the parameter to be modified is not allowed to be modified is generated, where the prompt message may be a text word such as "modification is not allowed" or other prohibition identifiers.
According to another network card information modification method provided by the invention, compared with the current mode of hiding the network card icon to protect the network card information, the network card information modification method comprises the steps of obtaining a network card information modification instruction of a target network card, wherein the network card information modification instruction comprises parameters to be modified corresponding to the target network card; judging whether the parameters to be modified are allowed to be modified or not based on the parameters to be modified and a preset network card information modification table, wherein each parameter of the target network card and corresponding mark information whether the parameters are allowed to be modified or not are recorded in the preset network card information modification table; if the parameter to be modified is allowed to be modified, calling a corresponding target modification function to modify the parameter to be modified; if the parameter to be modified is not allowed to be modified, feeding back prompt information that the parameter to be modified is not allowed to be modified to a user, therefore, whether the parameter to be modified is allowed to be modified or not is judged by modifying the table based on the parameter to be modified and the preset network card information, if the parameter to be modified is allowed to be modified, calling a corresponding modification function to modify the parameter to be modified, if the parameter to be modified is not allowed to be modified, the prompt information which is not allowed to be modified is fed back to the user, the condition that the user displays the hidden icon and modifies the network card information according to the displayed icon can be avoided, therefore, the network card information can be effectively protected, meanwhile, when some information of the network card needs to be modified, the process of repeatedly displaying the icons and then hiding the icons can be avoided, and a large amount of time of workers is saved.
Further, as a specific implementation of fig. 1, an embodiment of the present invention provides a network card information modifying apparatus, as shown in fig. 3, where the apparatus includes: anacquisition unit 31, ajudgment unit 32, a callingunit 33 and afeedback unit 34.
The obtainingunit 31 may be configured to obtain a network card information modification instruction of a target network card, where the network card information modification instruction includes a parameter to be modified corresponding to the target network card.
The determiningunit 32 may be configured to determine whether the parameter to be modified is allowed to be modified based on the parameter to be modified and a preset network card information modification table, where each parameter of the target network card and corresponding flag information of whether the parameter is allowed to be modified are recorded in the preset network card information modification table.
The invokingunit 33 may be configured to invoke a corresponding target modification function to modify the parameter to be modified if the parameter to be modified is allowed to be modified.
Thefeedback unit 34 may be configured to, if the parameter to be modified is not allowed to be modified, feed back a prompt message that the parameter to be modified is not allowed to be modified to the user.
In a specific application scenario, in order to replace each modification function at the storage location with the judgment function, as shown in fig. 4, the apparatus further includes adetermination unit 35 and areplacement unit 36.
The determiningunit 35 may be configured to determine a storage location of a modification function corresponding to each parameter in the target network card.
The replacingunit 36 may be configured to determine a judgment function corresponding to each parameter, replace each modification function in the storage location with the judgment function, and store each modification function in a cache.
In a specific application scenario, in order to obtain a network card information modification instruction of the target network card, the obtainingunit 31 may be specifically configured to intercept, when a system call request is detected, the system call request by using a hook function set in a kernel, where the system call request includes parameter information; judging whether the system calling request is a network card information modification instruction of the target network card or not based on parameter information in the system calling request; and if the system calling request is the network card information modification instruction, transmitting the parameters to be modified carried in the network card information modification instruction to the storage position. .
In a specific application scenario, in order to determine whether the parameter to be modified is allowed to be modified, the determiningunit 32 may be specifically configured to determine, based on the parameter to be modified and a preset network card information modification table, whether the parameter to be modified is allowed to be modified by using the determining function at the storage location.
In a specific application scenario, in order to determine whether the parameter to be modified is allowed to be modified by using the determination function at the storage location, thedetermination unit 32 includes amatching module 321 and adetermination module 322.
Thematching module 321 may be configured to match the parameter to be modified with each parameter recorded in the preset network card information modification table by using the judgment function.
The determiningmodule 322 may be configured to determine, if a target parameter matching the parameter to be modified exists in the parameters, whether the parameter to be modified is allowed to be modified based on the flag information corresponding to the target parameter.
In a specific application scenario, in order to determine the target parameter, thematching module 321 includes a segmentation sub-module, a matching sub-module, and a determination sub-module.
The segmentation submodule may be configured to perform segmentation processing on the parameter to be modified and each parameter, respectively, with a preset character length as a unit, to obtain at least one first segmentation character string corresponding to the parameter to be modified and at least one second segmentation character string corresponding to each parameter.
The matching sub-module may be configured to match the first split character string with the second split character string, respectively, to obtain a matching result.
The determining submodule may be configured to determine, as the target parameter, a parameter corresponding to a second segmented character string having a largest number of matched characters in the matching result.
In a specific application scenario, in order to invoke a corresponding target modification function to modify the parameter to be modified, the invokingunit 33 includes a determiningmodule 331 and an invokingmodule 332.
The determiningmodule 331 may be configured to determine, if the parameter to be modified is allowed to be modified, a function interface corresponding to the target modification function in the modification functions stored in the cache.
The callingmodule 332 may be configured to call the target modification function to modify the parameter to be modified based on the function interface.
It should be noted that other corresponding descriptions of the functional modules related to the network card information modifying apparatus provided in the embodiment of the present invention may refer to the corresponding description of the method shown in fig. 1, and are not described herein again.
Based on the method shown in fig. 1, correspondingly, an embodiment of the present invention further provides a computer-readable storage medium, on which a computer program is stored, where the computer program, when executed by a processor, implements the following steps: acquiring a network card information modification instruction of a target network card, wherein the network card information modification instruction comprises parameters to be modified corresponding to the target network card; judging whether the parameters to be modified are allowed to be modified or not based on the parameters to be modified and a preset network card information modification table, wherein each parameter of the target network card and corresponding mark information whether the parameters are allowed to be modified or not are recorded in the preset network card information modification table; if the parameter to be modified is allowed to be modified, calling a corresponding target modification function to modify the parameter to be modified; and if the parameter to be modified is not allowed to be modified, feeding back prompt information that the parameter to be modified is not allowed to be modified to the user.
Based on the above embodiments of the method shown in fig. 1 and the apparatus shown in fig. 3, an embodiment of the present invention further provides an entity structure diagram of a computer device, as shown in fig. 5, where the computer device includes: a processor 41, a memory 42, and a computer program stored on the memory 42 and executable on the processor, wherein the memory 42 and the processor 41 are both arranged on a bus 43 such that when the processor 41 executes the program, the following steps are performed: acquiring a network card information modification instruction of a target network card, wherein the network card information modification instruction comprises parameters to be modified corresponding to the target network card; judging whether the parameters to be modified are allowed to be modified or not based on the parameters to be modified and a preset network card information modification table, wherein each parameter of the target network card and corresponding mark information whether the parameters are allowed to be modified or not are recorded in the preset network card information modification table; if the parameter to be modified is allowed to be modified, calling a corresponding target modification function to modify the parameter to be modified; and if the parameter to be modified is not allowed to be modified, feeding back prompt information that the parameter to be modified is not allowed to be modified to the user.
According to the technical scheme, a network card information modification instruction of a target network card is obtained, wherein the network card information modification instruction comprises parameters to be modified corresponding to the target network card; judging whether the parameters to be modified are allowed to be modified or not based on the parameters to be modified and a preset network card information modification table, wherein each parameter of the target network card and corresponding mark information whether the parameters are allowed to be modified or not are recorded in the preset network card information modification table; if the parameter to be modified is allowed to be modified, calling a corresponding modification function to modify the parameter to be modified; if the parameter to be modified is not allowed to be modified, feeding back prompt information that the parameter to be modified is not allowed to be modified to a user, therefore, whether the parameter to be modified is allowed to be modified or not is judged by modifying the table based on the parameter to be modified and the preset network card information, if the parameter to be modified is allowed to be modified, calling a corresponding target modification function to modify the parameter to be modified, if the parameter to be modified is not allowed to be modified, the prompt information which is not allowed to be modified is fed back to the user, the condition that the user displays the hidden icon and modifies the network card information according to the displayed icon can be avoided, therefore, the network card information can be effectively protected, meanwhile, when some information of the network card needs to be modified, the process of repeatedly displaying the icons and then hiding the icons can be avoided, and a large amount of time of workers is saved.
It will be apparent to those skilled in the art that the modules or steps of the present invention 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 than 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, the present invention is not limited to any specific combination of hardware and software.
The above description is only a preferred embodiment of the present invention and is not intended to limit the present invention, and various modifications and changes may be made by those skilled in the art. Any modification, equivalent replacement, or improvement made within the spirit and principle of the present invention should be included in the protection scope of the present invention.

Claims (10)

Translated fromChinese
1.一种网卡信息修改方法,其特征在于,包括:1. a kind of network card information modification method, is characterized in that, comprises:获取目标网卡的网卡信息修改指令,所述网卡信息修改指令包括所述目标网卡对应的待修改参数;Obtain a network card information modification instruction of the target network card, where the network card information modification instruction includes parameters to be modified corresponding to the target network card;基于所述待修改参数和预设网卡信息修改表,判断所述待修改参数是否允许被修改,其中,所述预设网卡信息修改表中记录有所述目标网卡的各个参数及其对应的是否允许被修改的标记信息;Based on the to-be-modified parameter and the preset network card information modification table, it is determined whether the to-be-modified parameter is allowed to be modified, wherein the preset network card information modification table records each parameter of the target network card and its corresponding Tag information that is allowed to be modified;若所述待修改参数允许被修改,则调用相应的目标修改函数对所述待修改参数进行修改;If the parameter to be modified is allowed to be modified, calling the corresponding target modification function to modify the parameter to be modified;若所述待修改参数不允许被修改,则反馈所述待修改参数不允许被修改的提示信息。If the parameter to be modified is not allowed to be modified, prompt information that the parameter to be modified is not allowed to be modified is fed back.2.根据权利要求1所述的方法,其特征在于,在所述获取目标网卡的网卡信息修改指令之前,所述方法还包括:2. The method according to claim 1, characterized in that, before obtaining the network card information modification instruction of the target network card, the method further comprises:确定所述目标网卡中各个参数对应的修改函数的存储位置;Determine the storage location of the modification function corresponding to each parameter in the target network card;确定所述各个参数共同对应的判断函数,利用所述判断函数替换所述存储位置处的各个修改函数,并将所述各个修改函数存储至缓存中。A judgment function corresponding to each of the parameters is determined, each modification function in the storage location is replaced by the judgment function, and each modification function is stored in a cache.3.根据权利要求1所述的方法,其特征在于,所述获取目标网卡的网卡信息修改指令,包括:3. The method according to claim 1, wherein the obtaining the network card information modification instruction of the target network card comprises:当检测到系统调用请求时,通过在内核中设置的钩子函数拦截所述系统调用请求,所述系统调用请求中包括参数信息;When a system call request is detected, the system call request is intercepted by a hook function set in the kernel, and the system call request includes parameter information;基于所述系统调用请求中的参数信息,判断所述系统调用请求是否为所述目标网卡的网卡信息修改指令;Based on the parameter information in the system call request, determine whether the system call request is an instruction to modify the network card information of the target network card;若所述系统调用请求为所述网卡信息修改指令,则将所述网卡信息修改指令中携带的待修改参数传输至所述存储位置。If the system call request is the network card information modification instruction, the parameter to be modified carried in the network card information modification instruction is transmitted to the storage location.4.根据权利要求2所述的方法,其特征在于,所述基于所述待修改参数和预设网卡信息修改表,判断所述待修改参数是否允许被修改,包括:4. The method according to claim 2, wherein, judging whether the parameter to be modified is allowed to be modified based on the parameter to be modified and the preset network card information modification table, comprising:基于所述待修改参数和预设网卡信息修改表,利用所述存储位置处的所述判断函数判断所述待修改参数是否允许被修改。Based on the parameter to be modified and the preset network card information modification table, the judgment function in the storage location is used to determine whether the parameter to be modified is allowed to be modified.5.根据权利要求4所述的方法,其特征在于,所述基于所述待修改参数和预设网卡信息修改表,利用所述存储位置处的所述判断函数判断所述待修改参数是否允许被修改,包括:5. The method according to claim 4, wherein, based on the parameter to be modified and the preset network card information modification table, the judgment function at the storage location is used to judge whether the parameter to be modified is allowed Modified to include:利用所述判断函数,将所述待修改参数与所述预设网卡信息修改表中记录的各个参数进行匹配;Using the judgment function, the parameter to be modified is matched with each parameter recorded in the preset network card information modification table;若所述各个参数中存在与所述待修改参数相匹配的目标参数,则基于所述目标参数对应的标记信息,判定所述待修改参数是否允许被修改。If there is a target parameter matching the parameter to be modified in each of the parameters, it is determined whether the parameter to be modified is allowed to be modified based on the flag information corresponding to the target parameter.6.根据权利要求5所述的方法,其特征在于,所述利用所述判断函数,将所述待修改参数与所述预设网卡信息修改表中记录的各个参数进行匹配,包括:6. The method according to claim 5, wherein, by using the judgment function, the parameter to be modified is matched with each parameter recorded in the preset network card information modification table, comprising:以预设字符长度为单位,对所述待修改参数和所述各个参数分别进行切分处理,得到所述待修改参数对应的至少一个第一切分字符串和所述各个参数对应的至少一个第二切分字符串;Taking the preset character length as a unit, the parameter to be modified and each parameter are respectively segmented to obtain at least one first segmented character string corresponding to the parameter to be modified and at least one segment corresponding to each parameter The second split string;将所述第一切分字符串分别与所述第二切分字符串进行匹配,得到匹配结果;Matching the first segmented string with the second segmented string respectively to obtain a matching result;将所述匹配结果中匹配字符最多的第二切分字符串所对应的参数,确定为所述目标参数。The parameter corresponding to the second split character string with the most matching characters in the matching result is determined as the target parameter.7.根据权利要求2所述的方法,其特征在于,所述若所述待修改参数允许被修改,则调用相应的目标修改函数对所述待修改参数进行修改,包括:7. The method according to claim 2, wherein, if the parameter to be modified is allowed to be modified, calling a corresponding target modification function to modify the parameter to be modified, comprising:若所述待修改参数允许被修改,则确定所述缓存中存储的各个修改函数中的所述目标修改函数及其对应的函数接口;If the parameter to be modified is allowed to be modified, then determine the target modification function and its corresponding function interface in each modification function stored in the cache;基于所述函数接口,调用所述目标修改函数对所述待修改参数进行修改。Based on the function interface, the target modification function is called to modify the parameter to be modified.8.一种网卡信息修改装置,其特征在于,包括:8. A device for modifying network card information, comprising:获取单元,用于获取目标网卡的网卡信息修改指令,所述网卡信息修改指令包括所述目标网卡对应的待修改参数;an obtaining unit, configured to obtain a network card information modification instruction of a target network card, where the network card information modification instruction includes parameters to be modified corresponding to the target network card;判断单元,用于基于所述待修改参数和预设网卡信息修改表,判断所述待修改参数是否允许被修改,其中,所述预设网卡信息修改表中记录有所述目标网卡的各个参数及其对应的是否允许被修改的标记信息;A judgment unit, configured to judge whether the parameter to be modified is allowed to be modified based on the parameter to be modified and the preset network card information modification table, wherein the preset network card information modification table records various parameters of the target network card and the corresponding mark information whether it is allowed to be modified;调用单元,用于若所述待修改参数允许被修改,则调用相应的目标修改函数对所述待修改参数进行修改;a calling unit, configured to call a corresponding target modification function to modify the parameter to be modified if the parameter to be modified is allowed to be modified;反馈单元,用于若所述待修改参数不允许被修改,则向用户反馈所述待修改参数不允许被修改的提示信息。A feedback unit, configured to feed back to the user prompt information that the parameter to be modified is not allowed to be modified if the parameter to be modified is not allowed to be modified.9.一种计算机可读存储介质,其上存储有计算机程序,其特征在于,所述计算机程序被处理器执行时实现权利要求1至7中任一项所述的方法的步骤。9. A computer-readable storage medium on which a computer program is stored, characterized in that, when the computer program is executed by a processor, the steps of the method according to any one of claims 1 to 7 are implemented.10.一种计算机设备,包括存储器、处理器及存储在存储器上并可在处理器上运行的计算机程序,其特征在于,所述计算机程序被处理器执行时实现权利要求1至7中任一项所述的方法的步骤。10. A computer device, comprising a memory, a processor and a computer program stored on the memory and running on the processor, wherein the computer program is implemented by the processor to implement any one of claims 1 to 7 The steps of the method described in item.
CN202111571292.0A2021-12-212021-12-21Network card information modification method and device, storage medium and computer equipmentActiveCN114268542B (en)

Priority Applications (1)

Application NumberPriority DateFiling DateTitle
CN202111571292.0ACN114268542B (en)2021-12-212021-12-21Network card information modification method and device, storage medium and computer equipment

Applications Claiming Priority (1)

Application NumberPriority DateFiling DateTitle
CN202111571292.0ACN114268542B (en)2021-12-212021-12-21Network card information modification method and device, storage medium and computer equipment

Publications (2)

Publication NumberPublication Date
CN114268542Atrue CN114268542A (en)2022-04-01
CN114268542B CN114268542B (en)2024-08-13

Family

ID=80828207

Family Applications (1)

Application NumberTitlePriority DateFiling Date
CN202111571292.0AActiveCN114268542B (en)2021-12-212021-12-21Network card information modification method and device, storage medium and computer equipment

Country Status (1)

CountryLink
CN (1)CN114268542B (en)

Cited By (2)

* Cited by examiner, † Cited by third party
Publication numberPriority datePublication dateAssigneeTitle
CN115065627A (en)*2022-05-202022-09-16北京奇艺世纪科技有限公司Parameter modification method and device, electronic equipment and storage medium
CN116192503A (en)*2023-02-202023-05-30天固信息安全系统(深圳)有限公司 A network interface management method and system based on sysfs file system

Citations (8)

* Cited by examiner, † Cited by third party
Publication numberPriority datePublication dateAssigneeTitle
US20020174358A1 (en)*2001-05-152002-11-21Wolff Daniel JosephEvent reporting between a reporting computer and a receiving computer
CN1921491A (en)*2006-09-142007-02-28杭州华为三康技术有限公司Method and equipment for preventing network attack by using address analytic protocol
CN104301449A (en)*2014-10-082015-01-21杭州华三通信技术有限公司Method and device for modifying IP address
CN104754066A (en)*2013-12-262015-07-01华为技术有限公司Message processing method and message processing equipment
CN105323318A (en)*2015-10-292016-02-10小米科技有限责任公司Parameter modifying method, parameter modifying device and parameter modifying equipment
CN105337831A (en)*2014-08-082016-02-17华为技术有限公司Virtual private network implementation method and client device
CN106411944A (en)*2016-11-252017-02-15锐捷网络股份有限公司Network access management method and apparatus
CN106685973A (en)*2016-12-302017-05-17东软集团股份有限公司 Method and device for remembering login information, login control method and device

Patent Citations (8)

* Cited by examiner, † Cited by third party
Publication numberPriority datePublication dateAssigneeTitle
US20020174358A1 (en)*2001-05-152002-11-21Wolff Daniel JosephEvent reporting between a reporting computer and a receiving computer
CN1921491A (en)*2006-09-142007-02-28杭州华为三康技术有限公司Method and equipment for preventing network attack by using address analytic protocol
CN104754066A (en)*2013-12-262015-07-01华为技术有限公司Message processing method and message processing equipment
CN105337831A (en)*2014-08-082016-02-17华为技术有限公司Virtual private network implementation method and client device
CN104301449A (en)*2014-10-082015-01-21杭州华三通信技术有限公司Method and device for modifying IP address
CN105323318A (en)*2015-10-292016-02-10小米科技有限责任公司Parameter modifying method, parameter modifying device and parameter modifying equipment
CN106411944A (en)*2016-11-252017-02-15锐捷网络股份有限公司Network access management method and apparatus
CN106685973A (en)*2016-12-302017-05-17东软集团股份有限公司 Method and device for remembering login information, login control method and device

Non-Patent Citations (1)

* Cited by examiner, † Cited by third party
Title
吕游: "主机入侵保护技术研究", 《中国优秀硕士学位论文全文数据库》, 22 August 2009 (2009-08-22), pages 1 - 63*

Cited By (3)

* Cited by examiner, † Cited by third party
Publication numberPriority datePublication dateAssigneeTitle
CN115065627A (en)*2022-05-202022-09-16北京奇艺世纪科技有限公司Parameter modification method and device, electronic equipment and storage medium
CN115065627B (en)*2022-05-202024-04-12北京奇艺世纪科技有限公司Parameter modification method and device, electronic equipment and storage medium
CN116192503A (en)*2023-02-202023-05-30天固信息安全系统(深圳)有限公司 A network interface management method and system based on sysfs file system

Also Published As

Publication numberPublication date
CN114268542B (en)2024-08-13

Similar Documents

PublicationPublication DateTitle
US10958690B1 (en)Security appliance to monitor networked computing environment
CN110535831B (en)Kubernetes and network domain-based cluster security management method and device and storage medium
US10685116B2 (en)Anti-ransomware systems and methods using a sinkhole at an electronic device
US20190342334A1 (en)Method, client, and server for preventing web page hijacking
CN110363020B (en)Screen capturing monitoring method, device, computer equipment and storage medium
US9027132B2 (en)System, method and computer program product for monitoring and/or analyzing at least one aspect of an invocation of an interface
JP5945074B2 (en) Method, device, and mobile terminal for API intercept related applications
EP3557844A1 (en)Rule-based network-threat detection
CN114268542A (en)Network card information modification method and device, storage medium and computer equipment
WO2016033966A1 (en)Protection method and device for application data
US20050246522A1 (en)Securing applications and operating systems
CN110471884B (en) Data management method, device, equipment, system and computer-readable storage medium
US10216601B2 (en)Agent dynamic service
CN109598140A (en)A kind of guard method of webpage information and device
EP3126961A1 (en)Monitoring of node.js applications
WO2020187001A1 (en)Permission filtering method and permission filtering apparatus
US20220084048A1 (en)Server apparatus, method of controlling server apparatus, computer-readable medium, genuine product determining system, and method of controlling genuine product determining system
CN114416396A (en)Interface version control method and device, electronic equipment and storage medium
CN114281484A (en)Data transmission method, device, equipment and storage medium
US10924492B2 (en)Information leakage prevention system and method
CN113760152B (en) Message processing method, device, computer equipment and storage medium
JP2018081514A (en)Malware analysis method and storage medium
US7660004B2 (en)System and method for detecting accidental output to a device
US20070192704A1 (en)Method, apparatus and computer program product for port configuration of resources in a virtual topology
CN119442313A (en) Information desensitization method, system, electronic device and storage medium

Legal Events

DateCodeTitleDescription
PB01Publication
PB01Publication
SE01Entry into force of request for substantive examination
SE01Entry into force of request for substantive examination
CB02Change of applicant information
CB02Change of applicant information

Country or region after:China

Address after:100032 NO.332, 3rd floor, Building 102, 28 xinjiekouwai street, Xicheng District, Beijing

Applicant after:QAX Technology Group Inc.

Applicant after:Qianxin Wangshen information technology (Beijing) Co.,Ltd.

Address before:100032 NO.332, 3rd floor, Building 102, 28 xinjiekouwai street, Xicheng District, Beijing

Applicant before:QAX Technology Group Inc.

Country or region before:China

Applicant before:LEGENDSEC INFORMATION TECHNOLOGY (BEIJING) Inc.

GR01Patent grant
GR01Patent grant

[8]ページ先頭

©2009-2025 Movatter.jp