CN114302399A - Control method and device for WIFI (Wireless Fidelity) sharing hotspot and storage medium - Google Patents

Control method and device for WIFI (Wireless Fidelity) sharing hotspot and storage medium Download PDF

Info

Publication number
CN114302399A
CN114302399A CN202111536696.6A CN202111536696A CN114302399A CN 114302399 A CN114302399 A CN 114302399A CN 202111536696 A CN202111536696 A CN 202111536696A CN 114302399 A CN114302399 A CN 114302399A
Authority
CN
China
Prior art keywords
mode
wireless network
network card
target state
calling
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
CN202111536696.6A
Other languages
Chinese (zh)
Other versions
CN114302399B (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.)
Qianxin Technology Group Co Ltd
Secworld Information Technology Beijing Co Ltd
Original Assignee
Qianxin Technology Group Co Ltd
Secworld Information Technology Beijing Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Qianxin Technology Group Co Ltd, Secworld Information Technology Beijing Co Ltd filed Critical Qianxin Technology Group Co Ltd
Priority to CN202111536696.6A priority Critical patent/CN114302399B/en
Publication of CN114302399A publication Critical patent/CN114302399A/en
Application granted granted Critical
Publication of CN114302399B publication Critical patent/CN114302399B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Abstract

The application discloses a control method and device for a WIFI sharing hotspot, a storage medium and computer equipment, wherein the method comprises the following steps: responding to a user mode program starting instruction, calling a target state reading interface, and determining the running mode of the wireless network card through the target state reading interface; and when the operation mode of the wireless network card is the sharing hotspot mode, calling a target state setting interface, and changing the operation mode of the wireless network card into a signal receiving mode through the target state setting interface so as to close the WIFI sharing hotspot corresponding to the wireless network card. According to the method and the device, the operating mode of the wireless network card is determined by calling the target state reading interface, the sharing hotspot of the wireless network card is closed by calling the target state setting interface, unauthorized terminal equipment can be effectively prevented from accessing the intranet through the WIFI sharing hotspot, and the safety of the intranet environment and internal data is greatly improved.

Description

Control method and device for WIFI (Wireless Fidelity) sharing hotspot and storage medium
Technical Field
The present application relates to the field of wireless transmission technologies, and in particular, to a method and an apparatus for controlling a WIFI shared hotspot, a storage medium, and a computer device.
Background
With the continuous development of the internet, the sharing hot spot function is generated. For convenience of network connection, many terminal devices all have a function of opening a shared hotspot, for example, a mobile phone terminal opens the shared hotspot for a computer terminal to implement wireless network connection of a computer, and so on.
However, in daily work, many terminal devices connect to the intranet and open a shared hotspot for other terminal devices, which causes great risk to the security of the intranet environment and internal data.
Disclosure of Invention
In view of this, the present application provides a control method and apparatus for a WIFI shared hotspot, a storage medium, and a computer device, which can effectively prevent an unauthorized terminal device from accessing an intranet through the WIFI shared hotspot, and greatly improve security of an intranet environment and internal data.
According to an aspect of the present application, a method for controlling a WIFI shared hotspot is provided, including:
responding to a user mode program starting instruction, calling a target state reading interface, and determining the running mode of the wireless network card through the target state reading interface;
and when the operation mode of the wireless network card is the sharing hotspot mode, calling a target state setting interface, and changing the operation mode of the wireless network card into a signal receiving mode through the target state setting interface so as to close the WIFI sharing hotspot corresponding to the wireless network card.
Optionally, after the operation mode of the wireless network card is determined through the target state reading interface, the method further includes: when the operation mode of the wireless network card is the signal receiving mode, starting a first timing device, and returning to the step of calling the target state reading interface when the time recorded by the first timing device is consistent with a first preset time interval; alternatively, the first and second electrodes may be,
after the operation mode of the wireless network card is changed into the signal receiving mode through the target state setting interface, the method further includes: and starting a second timing device, and returning to the step of calling the target state reading interface when the time recorded by the second timing device is consistent with the first preset time interval.
Optionally, the method further comprises:
responding to a kernel mode program starting instruction, monitoring operation data of a preset equipment management function in real time, calling a preset interception function to intercept the operation data when the operation data is monitored, and checking the intercepted operation data through the preset interception function;
when the operation data is the operation data corresponding to the mode that the operation mode of the wireless network card is modified into the shared hotspot mode, the transmission of the operation data is terminated;
and when the operation data is not the operation data corresponding to the mode of modifying the operation of the wireless network card into the sharing hotspot mode, releasing the operation data.
Optionally, after responding to the user-mode program start instruction, the method further includes:
monitoring the kernel state program starting instruction in real time, calling the target state reading interface after monitoring the kernel state program starting instruction, and determining the running mode of the wireless network card through the target state reading interface;
when the operation mode of the wireless network card is the sharing hotspot mode, returning to the step of calling the target state setting interface;
and when the running mode of the wireless network card is the signal receiving mode, closing the first timing device or the second timing device.
Optionally, after the turning off the first timing device or the second timing device, the method further includes:
and continuously monitoring the running data of the kernel mode program, and restarting the first timing device or the second timing device when the idle time of the running data is not monitored to be greater than the preset idle time.
Optionally, after the operating mode of the wireless network card is the sharing hotspot mode, the method further includes:
determining an access device identifier of the WIFI sharing hotspot of the wireless network card, and acquiring a preset authority identifier list;
and executing the calling target state setting interface when the preset authority identification list does not comprise the access equipment identification.
Optionally, after the operating mode of the wireless network card is changed to the signal receiving mode through the target state setting interface, the method further includes:
and recording the change times of the running mode of the wireless network card, and replacing the first preset time interval by using a second preset time interval when the change times are greater than a preset time threshold, wherein the first preset time interval is greater than the second preset time interval.
According to another aspect of the present application, there is provided a control apparatus for a WIFI shared hotspot, including:
the operation mode determining module is used for responding to a user state program starting instruction, calling a target state reading interface and determining the operation mode of the wireless network card through the target state reading interface;
and the operation mode changing module is used for calling a target state setting interface when the operation mode of the wireless network card is a sharing hotspot mode, and changing the operation mode of the wireless network card into a signal receiving mode through the target state setting interface so as to close the WIFI sharing hotspot corresponding to the wireless network card.
Optionally, the apparatus further comprises:
a timing module, configured to start a first timing device when the operation mode of the wireless network card is the signal receiving mode after the operation mode of the wireless network card is determined through the target state reading interface, and return to the step of calling the target state reading interface when the time recorded by the first timing device is consistent with a first preset time interval; or after the operation mode of the wireless network card is changed into a signal receiving mode through the target state setting interface, starting a second timing device, and returning to the step of calling the target state reading interface when the time recorded by the second timing device is consistent with the first preset time interval.
Optionally, the apparatus further comprises:
the monitoring module is used for responding to a kernel-state program starting instruction, monitoring operation data of a preset equipment management function in real time, calling a preset interception function to intercept the operation data when the operation data is monitored, and checking the intercepted operation data through the preset interception function;
the termination module is used for terminating the transmission of the operation data when the operation data is the operation data corresponding to the mode that the operation mode of the wireless network card is modified into the shared hotspot mode;
and the releasing module is used for releasing the operation data when the operation data is not the operation data corresponding to the mode of modifying the operation of the wireless network card into the sharing hotspot mode.
Optionally, the apparatus further comprises:
the monitoring module is further configured to monitor the kernel-state program starting instruction in real time after responding to the user-state program starting instruction, call the target state reading interface after monitoring the kernel-state program starting instruction, and determine the operating mode of the wireless network card through the target state reading interface;
the operation mode determining module is further configured to return to the step of calling the target state setting interface when the operation mode of the wireless network card is the shared hotspot mode;
and the closing module is used for closing the first timing device or the second timing device when the running mode of the wireless network card is the signal receiving mode.
Optionally, the apparatus further comprises:
and the starting module is used for continuously monitoring the running data of the kernel-mode program after the first timing device or the second timing device is closed, and restarting the first timing device or the second timing device when the idle time of the running data is not monitored to be greater than the preset idle time.
Optionally, the apparatus further comprises:
the list acquisition module is used for determining an access device identifier of the WIFI sharing hotspot of the wireless network card and acquiring a preset authority identifier list after the operation mode of the wireless network card is a sharing hotspot mode;
the operation mode determining module is further configured to execute the call target state setting interface when the preset permission identifier list does not include the access device identifier.
Optionally, the apparatus further comprises:
and the recording module is used for recording the change times of the running mode of the wireless network card after the running mode of the wireless network card is changed into the signal receiving mode through the target state setting interface, and replacing the first preset time interval by using a second preset time interval when the change times are greater than a preset time threshold, wherein the first preset time interval is greater than the second preset time interval.
According to yet another aspect of the present application, there is provided a storage medium having stored thereon a computer program which, when executed by a processor, implements the above-described method of controlling a WIFI shared hotspot.
According to still another aspect of the present application, a computer device is provided, which includes a storage medium, a processor, and a computer program stored on the storage medium and executable on the processor, where the processor implements the above-mentioned control method for the WIFI shared hotspot when executing the program.
By means of the technical scheme, the control method and device for the WIFI shared hotspot, the storage medium and the computer device provided by the application can respond to the user mode program starting instruction and call the target state reading interface when the user mode program starting instruction is received. Then, the operation mode of the current wireless network card can be determined through the called target state reading interface. When the target state reading interface determines that the operation mode of the wireless network card is the sharing hotspot mode, the target state setting interface can be further called, the WIFI sharing hotspot of the wireless network card is closed through the target state setting interface, and the operation mode of the wireless network card is changed from the sharing hotspot mode to the signal receiving mode. According to the method and the device, the operating mode of the wireless network card is determined by calling the target state reading interface, the sharing hotspot of the wireless network card is closed by calling the target state setting interface, unauthorized terminal equipment can be effectively prevented from accessing the intranet through the WIFI sharing hotspot, and the safety of the intranet environment and internal data is greatly improved.
The foregoing description is only an overview of the technical solutions of the present application, and the present application can be implemented according to the content of the description in order to make the technical means of the present application more clearly understood, and the following detailed description of the present application is given in order to make the above and other objects, features, and advantages of the present application more clearly understandable.
Drawings
The accompanying drawings, which are included to provide a further understanding of the application and are incorporated in and constitute a part of this application, illustrate embodiment(s) of the application and together with the description serve to explain the application and not to limit the application. In the drawings:
fig. 1 shows a schematic flowchart of a control method for a WIFI shared hotspot provided in an embodiment of the present application;
fig. 2 is a schematic flowchart illustrating another control method for a WIFI shared hotspot according to an embodiment of the present application;
fig. 3 is a schematic flowchart illustrating another control method for a WIFI shared hotspot according to an embodiment of the present application;
fig. 4 is a schematic structural diagram illustrating a control apparatus for a WIFI shared hotspot according to an embodiment of the present application;
fig. 5 shows a physical structure diagram of a computer device according to an embodiment of the present application.
Detailed Description
The present application will be described in detail below 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.
In this embodiment, a method for controlling a WIFI shared hotspot is provided, as shown in fig. 1, the method includes:
step 101, responding to a user mode program starting instruction, calling a target state reading interface, and determining an operation mode of a wireless network card through the target state reading interface;
at present, operating systems such as a Windows operating system and a Linux operating system comprise a kernel mode and a user mode. Because the access capability between different programs needs to be limited, the different programs are prevented from acquiring the memory data of other programs or acquiring the data of peripheral equipment and sending the data to the network, and a CPU (central processing unit) divides two authority levels, namely a user mode and a kernel mode. When the program executes the system call and runs into the kernel code, the program is called as the kernel mode program, and when the program executes the code of the user, the program is called as the user mode program. The WIFI shared hotspot control method provided by the embodiment of the application can be particularly applied to a Linux operating system. First, when a user-mode program start instruction is received, a target-state reading interface may be called in response to the user-mode program start instruction, where the target-state reading interface may be a system API interface. Then, the operation mode of the current wireless network card can be determined through the called target state reading interface. Wherein, the target state reading interface can also be a system API interface.
Step 102, when the operation mode of the wireless network card is the sharing hotspot mode, calling a target state setting interface, and changing the operation mode of the wireless network card into a signal receiving mode through the target state setting interface so as to close the WIFI sharing hotspot corresponding to the wireless network card.
In this embodiment, the operation mode of the wireless network card may be a signal receiving mode or a shared hotspot mode, where the signal receiving mode refers to a normal signal receiving mode, i.e., a managed mode, and the shared hotspot mode refers to a hotspot signal transmitting mode, i.e., a master mode. When the operation mode of the wireless network card is determined to be the sharing hotspot mode through the target state reading interface, the wireless network card is indicating to transmit hotspot signals for other terminal equipment at the moment, so that unauthorized terminal equipment is easily illegally accessed into an intranet, and great threats are caused to the intranet environment and data security. Therefore, the target state setting interface can be further called, the WIFI shared hotspot of the wireless network card is closed through the target state setting interface, and the operation mode of the wireless network card is changed from the shared hotspot mode to the signal receiving mode. Here, the terminal device that starts the WIFI shared hotspot may access the intranet through a wired network cable, or may access the intranet through a wireless network card after the wireless network card recovers to the signal receiving mode, where no requirement is made here.
By applying the technical scheme of the embodiment, firstly, when a user-mode program starting instruction is received, the user-mode program starting instruction can be responded, and the target state reading interface is called. Then, the operation mode of the current wireless network card can be determined through the called target state reading interface. When the target state reading interface determines that the operation mode of the wireless network card is the sharing hotspot mode, the target state setting interface can be further called, the WIFI sharing hotspot of the wireless network card is closed through the target state setting interface, and the operation mode of the wireless network card is changed from the sharing hotspot mode to the signal receiving mode. According to the method and the device, the operating mode of the wireless network card is determined by calling the target state reading interface, the sharing hotspot of the wireless network card is closed by calling the target state setting interface, unauthorized terminal equipment can be effectively prevented from accessing the intranet through the WIFI sharing hotspot, and the safety of the intranet environment and internal data is greatly improved.
Further, as a refinement and an extension of the specific implementation of the foregoing embodiment, in order to fully describe the specific implementation process of the present embodiment, another control method for a WIFI shared hotspot is provided, as shown in fig. 2, the method includes:
step 201, responding to a user mode program starting instruction, calling a target state reading interface, and determining an operation mode of a wireless network card through the target state reading interface;
in this embodiment of the present application, when a user-mode program starting instruction is received, the user-mode program starting instruction may be responded to, and a target-state reading interface is called, where the target-state reading interface may be a system API interface. Then, the operation mode of the current wireless network card can be determined through the called target state reading interface.
Step 202, when the operation mode of the wireless network card is a sharing hotspot mode, determining an access equipment identifier of a WIFI sharing hotspot of the wireless network card, and acquiring a preset authority identifier list;
in the embodiment of the application, when the target state reading interface determines that the operation mode of the wireless network card is the sharing hotspot mode, it indicates that the wireless network card is starting a WIFI sharing hotspot for other terminal devices, so that unauthorized terminal devices are very likely to illegally access the intranet, and great threats are caused to the intranet environment and data security. Therefore, the device identifiers corresponding to the terminal devices accessing the WIFI shared hotspot can be determined, where the access device identifiers correspond to the accessed devices one to one. Meanwhile, a preset authority identification list can be obtained, the preset authority identification list can include identifications corresponding to terminal devices with access authority, and the terminal devices corresponding to the identifications contained in the preset authority identification list can be accessed to the WIFI sharing hotspot of the wireless network card.
Step 203, when the preset authority identifier list does not include the access device identifier, calling a target state setting interface, and changing the operation mode of the wireless network card into a signal receiving mode through the target state setting interface so as to close the WIFI sharing hotspot corresponding to the wireless network card;
in this embodiment, when the access device identifier corresponding to the accessed terminal device is not included in the preset authority identifier list, it indicates that the terminal device does not have the authority to access the WIFI shared hotspot, at this time, the target state setting interface may be called, the WIFI shared hotspot corresponding to the wireless network card is closed by using the target state setting interface, and the operation mode of the wireless network card is changed to the signal receiving mode. According to the embodiment of the application, the preset authority identification list is set, so that the terminal equipment with the access WIFi sharing hotspot authority can be accessed into the intranet, on one hand, the safety of the intranet environment and internal data can be guaranteed, on the other hand, the terminal equipment needing the network can be connected with the intranet, and the normal networking of the safe terminal equipment is guaranteed.
In addition, when the number of the access equipment identifiers is more than one and the preset authority identifier list contains part of the access equipment identifiers, the target state setting interface is called, the WIFi shared hotspot corresponding to the wireless network card is closed through the target state setting interface, the running mode of the wireless network card is changed into a signal receiving mode, and the access equipment identifiers which are not contained in the preset authority identifier list are reported.
In this embodiment, when some terminal devices accessing the WIFi shared hotspot have access rights, and some terminal devices do not have access rights, the WIFi shared hotspot of the wireless network card may be closed, and an access device identifier not included in the preset rights identifier list may be reported, so that a suspicious terminal device may be discovered in time, and internal data leakage may be avoided.
Step 204, responding to a kernel mode program starting instruction, monitoring operation data of a preset equipment management function in real time, calling a preset interception function to intercept the operation data when the operation data is monitored, and checking the intercepted operation data through the preset interception function;
in this embodiment, a kernel-mode program is included in addition to the user-mode program. In general, the user mode program and the kernel mode program run simultaneously, and in order to avoid that the running mode of the wireless network card cannot be monitored because the kernel mode program runs and the user mode program does not run under special conditions, the running mode of the wireless network card can be controlled by the following steps when the kernel mode program runs. First, in response to a kernel-mode program start instruction, the operation data of a preset device management function may be monitored in real time, where the preset device management function may be an ioctl function. In the Linux operating system, most of the operations are realized by calling ioctl functions. When the operation data corresponding to the preset device management function is monitored, a preset interception function can be called, and the corresponding operation data is intercepted through the preset interception function, wherein the preset interception function can be a hook function registered in a system operation kernel and the like. After the interception, the intercepted operation data may be further checked through a preset interception function, and specifically, the operation data may be parameter data and the like corresponding to a preset device management function.
Step 205, when the operation data is the operation data corresponding to the operation mode of the wireless network card is modified into the shared hotspot mode, terminating the transmission of the operation data;
in the embodiment, whether the operation data is the operation data corresponding to the mode of modifying the wireless network card into the shared hotspot mode is determined through a preset interception function, and if so, the transmission of the operation data is stopped, so that the condition that the operation mode of the wireless network card is modified into the shared hotspot mode is avoided.
And step 206, when the operation data is not the operation data corresponding to the mode of modifying the operation of the wireless network card into the sharing hotspot mode, releasing the operation data.
In this embodiment, when it is determined through the preset interception function that the operation data is not the operation data corresponding to the operation mode that modifies the wireless network card to the shared hotspot mode, it is described that the operation data is irrelevant to the current interception, and the operation data may be subjected to release processing.
In the embodiment of the application, when the kernel mode program runs, the termination processing can be performed only on the relevant operation data of the wireless network card shared hotspot to be opened through the preset interception function, and for the case that the wireless network card WIFI shared hotspot is already opened before the kernel mode program is started, the target state reading interface and the target state setting interface are called to close the WIFI shared hotspot of the wireless network card to be closed in the running mode of the user mode program. The two work together to ensure the safety of the intranet environment and the internal data.
In this embodiment of the application, after "determining the operation mode of the wireless network card through the target status reading interface" in step 201, the method further includes: when the operation mode of the wireless network card is the signal receiving mode, starting a first timing device, and returning to the step of calling the target state reading interface when the time recorded by the first timing device is consistent with a first preset time interval; or, after "the operation mode of the wireless network card is changed to the signal receiving mode through the target state setting interface" in step 203, the method further includes: and starting a second timing device, and returning to the step of calling the target state reading interface when the time recorded by the second timing device is consistent with the first preset time interval.
In this embodiment, when it is determined that the operation mode of the wireless network card is the signal receiving mode through the target state reading interface, the first timing device may be started, after the first timing device is started, timing may be started through the first timing device, when the time recorded by the first timing device reaches the first preset time interval, the target state reading interface may be called again, and the operation mode of the current wireless network card may be determined through the target state reading interface. Then, when the operation mode of the wireless network card is determined to be the sharing hotspot mode, a target state setting interface can be called, the WIFi sharing hotspot of the wireless network card is closed by using the target state setting interface, and the operation mode of the wireless network card is further modified into a signal receiving mode; when the operation mode of the wireless network card is determined to be the signal receiving mode, the second timing device can be started, and the second timing device is used for timing, so that the repeated judgment of the operation mode of the wireless network card is realized. In addition, after the operation mode of the wireless network card is changed into the signal receiving mode through the target state setting interface, the second timing device may be started, similarly, timing may be started through the second timing device, when the time recorded by the second timing device reaches the first preset time interval, the target state reading interface may be called again, and the current operation mode of the wireless network card is determined through the target state reading interface. Then, when the operation mode of the wireless network card is determined to be the sharing hotspot mode, a target state setting interface can be called, the WIFi sharing hotspot of the wireless network card is closed by using the target state setting interface, and the operation mode of the wireless network card is further modified into a signal receiving mode; and when the running mode of the wireless network card is still the signal receiving mode, the second timing device is started again to realize repeated judgment of the running mode of the wireless network card. According to the embodiment of the application, the first preset time interval is set, and when the time recorded by the first timing device or the second timing device is consistent with the first preset time interval, the target state reading interface is called again, so that the operation mode of the wireless network card can be checked repeatedly, the phenomenon that the WIFi sharing hotspot of the wireless network card is enabled again after being closed is avoided, and the wireless network card is accessed into unauthorized terminal equipment, and the internal data security is threatened.
In this embodiment of the present application, after "responding to the user-mode program start instruction" in step 201, the method further includes: monitoring the kernel state program starting instruction in real time, calling the target state reading interface after monitoring the kernel state program starting instruction, and determining the running mode of the wireless network card through the target state reading interface; when the operation mode of the wireless network card is the sharing hotspot mode, returning to the step of calling the target state setting interface; and when the running mode of the wireless network card is the signal receiving mode, closing the first timing device or the second timing device.
In this embodiment, when the user mode program is started, in response to the user mode program start instruction, the shared hotspot operating mode of the wireless network card may be restored to the signal receiving mode by calling the target state reading interface and the target state setting interface, the kernel mode program start instruction may be monitored in real time, and when the kernel mode program start instruction is not monitored, the operating mode of the wireless network card may be repeatedly checked at a first preset time interval. When a kernel mode program starting instruction is monitored, the kernel mode program can intercept operation data for modifying the wireless network card operation mode into the sharing mode in real time when running, and the sharing hotspot is prevented from being started. Therefore, at this time, the target state reading interface may be called first, and whether the operation mode of the wireless network card is the sharing hotspot mode or not may be determined by using the target state reading interface. If so, calling a target state setting interface, closing a WIFI shared hotspot of the wireless network card through the target state setting interface, modifying the running mode of the wireless network card from the shared hotspot mode to a signal receiving mode, closing a first timing device when the started timing device is a first timing device, or closing a second timing device when the started timing device is a second timing device, not repeatedly calling a target state reading interface, and subsequently intercepting operation data for modifying the running mode of the wireless network card through a preset interception function in a kernel state program to prevent the wireless network card from being started; if not, the sharing hotspot of the current wireless network card is not started, at this time, the started first timing device or second timing device can be directly closed, the target state reading interface is not called repeatedly, and subsequently, the operation data for modifying the running mode of the wireless network card is intercepted through a preset interception function in the kernel state program, so that the sharing hotspot mode of the wireless network card is prevented from being started.
In an embodiment of the present application, after the "turning off the first timing device or the second timing device", the method further includes: and continuously monitoring the running data of the kernel mode program, and restarting the first timing device or the second timing device when the idle time of the running data is not monitored to be greater than the preset idle time.
In this embodiment, after the kernel mode program start instruction is monitored and the started first timing device or second timing device is turned off, the running data of the kernel mode program may be continuously monitored to determine whether the kernel mode program is running normally. When the running data of the kernel-state program is not monitored after the preset idle time is exceeded, the running of the kernel-state program is not successful due to certain problems, at the moment, the timing device can be restarted, and the running mode of the wireless network card is controlled in a mode that the user-state program calls the target state reading interface and the target state setting interface at regular time. Here, when the closed timing device is the first timing device, the first timing device may be restarted, and when the closed timing device is the second timing device, the second timing device may be restarted.
In this embodiment of the present application, after "changing the operation mode of the wireless network card to the signal receiving mode", the method further includes: and recording the change times of the running mode of the wireless network card, and replacing the first preset time interval by using a second preset time interval when the change times are greater than a preset time threshold, wherein the first preset time interval is greater than the second preset time interval.
In this embodiment, after the operation mode of the wireless network card is changed each time, the change times of the operation mode may be recorded, and when the change times of the operation mode of the wireless network card is greater than the preset time threshold, it indicates that the wireless network card is frequently restored from the signal receiving mode to the sharing hotspot mode, and there is a high possibility that a dangerous terminal device exists, which is very unfavorable for the security of internal data.
In order to better describe the control method of the wireless network card WIFI shared hotspot during the operation of the user mode program and the operation of the kernel mode program, fig. 3 shows the control process in two cases respectively. Firstly, when a user mode program runs, calling a target state reading interface to read the state of the wireless network card, and when the state of the wireless network card is a hotspot starting state, calling a target state setting interface to close the hotspot of the wireless network card, and restoring the running mode of the wireless network card to a signal receiving mode; and when the state of the wireless network card is not the opened hot spot state, waiting for the next check. For the control method of the WIFI sharing hotspot of the wireless network card during the running of the kernel mode program, when various network configuration programs are monitored to call an icotl function, namely, when the operation data of the ioctl function are monitored, preset device management functions such as a kernel hook function can be called, whether the operation data are the operation data for modifying the running mode of the wireless network card is further determined through the preset device management functions such as the kernel hook function, if so, the operation data are intercepted, and if not, the operation data are released.
Further, as a specific implementation of the method in fig. 1, an embodiment of the present application provides a control device for a WIFI shared hotspot, and as shown in fig. 4, the control device includes:
the operation mode determining module is used for responding to a user state program starting instruction, calling a target state reading interface and determining the operation mode of the wireless network card through the target state reading interface;
and the operation mode changing module is used for calling a target state setting interface when the operation mode of the wireless network card is a sharing hotspot mode, and changing the operation mode of the wireless network card into a signal receiving mode through the target state setting interface so as to close the WIFI sharing hotspot corresponding to the wireless network card.
Optionally, the apparatus further comprises:
a timing module, configured to start a first timing device when the operation mode of the wireless network card is the signal receiving mode after the operation mode of the wireless network card is determined through the target state reading interface, and return to the step of calling the target state reading interface when the time recorded by the first timing device is consistent with a first preset time interval; or after the operation mode of the wireless network card is changed into a signal receiving mode through the target state setting interface, starting a second timing device, and returning to the step of calling the target state reading interface when the time recorded by the second timing device is consistent with the first preset time interval.
Optionally, the apparatus further comprises:
the monitoring module is used for responding to a kernel-state program starting instruction, monitoring operation data of a preset equipment management function in real time, calling a preset interception function to intercept the operation data when the operation data is monitored, and checking the intercepted operation data through the preset interception function;
the termination module is used for terminating the transmission of the operation data when the operation data is the operation data corresponding to the mode that the operation mode of the wireless network card is modified into the shared hotspot mode;
and the releasing module is used for releasing the operation data when the operation data is not the operation data corresponding to the mode of modifying the operation of the wireless network card into the sharing hotspot mode.
Optionally, the apparatus further comprises:
the monitoring module is further configured to monitor the kernel-state program starting instruction in real time after responding to the user-state program starting instruction, call the target state reading interface after monitoring the kernel-state program starting instruction, and determine the operating mode of the wireless network card through the target state reading interface;
the operation mode determining module is further configured to return to the step of calling the target state setting interface when the operation mode of the wireless network card is the shared hotspot mode;
and the closing module is used for closing the first timing device or the second timing device when the running mode of the wireless network card is the signal receiving mode.
Optionally, the apparatus further comprises:
and the starting module is used for continuously monitoring the running data of the kernel-mode program after the first timing device or the second timing device is closed, and restarting the first timing device or the second timing device when the idle time of the running data is not monitored to be greater than the preset idle time.
Optionally, the apparatus further comprises:
the list acquisition module is used for determining an access device identifier of the WIFI sharing hotspot of the wireless network card and acquiring a preset authority identifier list after the operation mode of the wireless network card is a sharing hotspot mode;
the operation mode determining module is further configured to execute the call target state setting interface when the preset permission identifier list does not include the access device identifier.
Optionally, the apparatus further comprises:
and the recording module is used for recording the change times of the running mode of the wireless network card after the running mode of the wireless network card is changed into the signal receiving mode through the target state setting interface, and replacing the first preset time interval by using a second preset time interval when the change times are greater than a preset time threshold, wherein the first preset time interval is greater than the second preset time interval.
It should be noted that other corresponding descriptions of the functional units related to the control device for the WIFI shared hotspot provided in the embodiment of the present application may refer to corresponding descriptions in the methods in fig. 1 to fig. 2, and are not described herein again.
Based on the above methods shown in fig. 1 to 2, correspondingly, an embodiment of the present application further provides a storage medium, on which a computer program is stored, and the computer program, when executed by a processor, implements the above control method for the WIFI shared hotspot shown in fig. 1 to 2.
Based on such understanding, the technical solution of the present application may be embodied in the form of a software product, which may be stored in a non-volatile storage medium (which may be a CD-ROM, a usb disk, a removable hard disk, etc.), and includes several instructions for enabling a computer device (which may be a personal computer, a server, or a network device, etc.) to execute the method according to the implementation scenarios of the present application.
Based on the above method shown in fig. 1 to fig. 2 and the virtual device embodiment shown in fig. 4, in order to achieve the above object, an embodiment of the present application further provides an entity structure diagram of a computer device, as shown in fig. 5, the computer device includes: a processor 31, a memory 32, and a computer program stored in the memory 32 and operable on the processor, wherein the memory 32 and the processor 31 are both disposed on a bus 33, and the processor 31 implements the control method of the WIFI shared hotspot as shown in fig. 1 when executing the program.
Optionally, the computer device may also include a user interface, a network interface, a camera, Radio Frequency (RF) circuitry, sensors, audio circuitry, a WI-FI module, and so forth. The user interface may include a Display screen (Display), an input unit such as a keypad (Keyboard), etc., and the optional user interface may also include a USB interface, a card reader interface, etc. The network interface may optionally include a standard wired interface, a wireless interface (e.g., a bluetooth interface, WI-FI interface), etc.
It will be appreciated by those skilled in the art that the present embodiment provides a computer device architecture that is not limiting of the computer device, and that may include more or fewer components, or some components in combination, or a different arrangement of components.
The storage medium may further include an operating system and a network communication module. An operating system is a program that manages and maintains the hardware and software resources of a computer device, supporting the operation of information handling programs, as well as other software and/or programs. The network communication module is used for realizing communication among components in the storage medium and other hardware and software in the entity device.
Through the above description of the embodiments, those skilled in the art will clearly understand that the present application can be implemented by software plus a necessary general hardware platform, and can also be implemented by hardware. First, when a user-mode program start instruction is received, the target-mode reading interface can be called in response to the user-mode program start instruction. Then, the operation mode of the current wireless network card can be determined through the called target state reading interface. When the target state reading interface determines that the operation mode of the wireless network card is the sharing hotspot mode, the target state setting interface can be further called, the WIFI sharing hotspot of the wireless network card is closed through the target state setting interface, and the operation mode of the wireless network card is changed from the sharing hotspot mode to the signal receiving mode. According to the method and the device, the operating mode of the wireless network card is determined by calling the target state reading interface, the sharing hotspot of the wireless network card is closed by calling the target state setting interface, unauthorized terminal equipment can be effectively prevented from accessing the intranet through the WIFI sharing hotspot, and the safety of the intranet environment and internal data is greatly improved.
Those skilled in the art will appreciate that the figures are merely schematic representations of one preferred implementation scenario and that the blocks or flow diagrams in the figures are not necessarily required to practice the present application. Those skilled in the art will appreciate that the modules in the devices in the implementation scenario may be distributed in the devices in the implementation scenario according to the description of the implementation scenario, or may be located in one or more devices different from the present implementation scenario with corresponding changes. The modules of the implementation scenario may be combined into one module, or may be further split into a plurality of sub-modules.
The above application serial numbers are for description purposes only and do not represent the superiority or inferiority of the implementation scenarios. The above disclosure is only a few specific implementation scenarios of the present application, but the present application is not limited thereto, and any variations that can be made by those skilled in the art are intended to fall within the scope of the present application.

Claims (10)

1. A control method for a WIFI sharing hotspot is characterized by comprising the following steps:
responding to a user mode program starting instruction, calling a target state reading interface, and determining the running mode of the wireless network card through the target state reading interface;
and when the operation mode of the wireless network card is the sharing hotspot mode, calling a target state setting interface, and changing the operation mode of the wireless network card into a signal receiving mode through the target state setting interface so as to close the WIFI sharing hotspot corresponding to the wireless network card.
2. The method of claim 1,
after the operation mode of the wireless network card is determined through the target state reading interface, the method further comprises the following steps: when the operation mode of the wireless network card is the signal receiving mode, starting a first timing device, and returning to the step of calling the target state reading interface when the time recorded by the first timing device is consistent with a first preset time interval; alternatively, the first and second electrodes may be,
after the operation mode of the wireless network card is changed into the signal receiving mode through the target state setting interface, the method further includes:
and starting a second timing device, and returning to the step of calling the target state reading interface when the time recorded by the second timing device is consistent with the first preset time interval.
3. The method of claim 2, further comprising:
responding to a kernel mode program starting instruction, monitoring operation data of a preset equipment management function in real time, calling a preset interception function to intercept the operation data when the operation data is monitored, and checking the intercepted operation data through the preset interception function;
when the operation data is the operation data corresponding to the mode that the operation mode of the wireless network card is modified into the shared hotspot mode, the transmission of the operation data is terminated;
and when the operation data is not the operation data corresponding to the mode of modifying the operation of the wireless network card into the sharing hotspot mode, releasing the operation data.
4. The method of claim 3, wherein after responding to a user-mode program launch instruction, the method further comprises:
monitoring the kernel state program starting instruction in real time, calling the target state reading interface after monitoring the kernel state program starting instruction, and determining the running mode of the wireless network card through the target state reading interface;
when the operation mode of the wireless network card is the sharing hotspot mode, returning to the step of calling the target state setting interface;
and when the running mode of the wireless network card is the signal receiving mode, closing the first timing device or the second timing device.
5. The method of claim 4, wherein after said turning off the first timing device or the second timing device, the method further comprises:
and continuously monitoring the running data of the kernel mode program, and restarting the first timing device or the second timing device when the idle time of the running data is not monitored to be greater than the preset idle time.
6. The method according to claim 1, wherein after the operating mode of the wireless network card is the sharing hotspot mode, the method further comprises:
determining an access device identifier of the WIFI sharing hotspot of the wireless network card, and acquiring a preset authority identifier list;
and executing the calling target state setting interface when the preset authority identification list does not comprise the access equipment identification.
7. The method according to claim 1, wherein after the operation mode of the wireless network card is changed to the signal receiving mode through the target state setting interface, the method further comprises:
and recording the change times of the running mode of the wireless network card, and replacing the first preset time interval by using a second preset time interval when the change times are greater than a preset time threshold, wherein the first preset time interval is greater than the second preset time interval.
8. A control device for a WIFI sharing hotspot, comprising:
the operation mode determining module is used for responding to a user state program starting instruction, calling a target state reading interface and determining the operation mode of the wireless network card through the target state reading interface;
and the operation mode changing module is used for calling a target state setting interface when the operation mode of the wireless network card is a sharing hotspot mode, and changing the operation mode of the wireless network card into a signal receiving mode through the target state setting interface so as to close the WIFI sharing hotspot corresponding to the wireless network card.
9. A storage medium having a computer program stored thereon, wherein the computer program, when executed by a processor, implements the method of any of claims 1 to 7.
10. A computer device comprising a storage medium, a processor and a computer program stored on the storage medium and executable on the processor, characterized in that the processor implements the method of any one of claims 1 to 7 when executing the computer program.
CN202111536696.6A 2021-12-15 2021-12-15 Control method and device for WIFI sharing hot spot and storage medium Active CN114302399B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202111536696.6A CN114302399B (en) 2021-12-15 2021-12-15 Control method and device for WIFI sharing hot spot and storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202111536696.6A CN114302399B (en) 2021-12-15 2021-12-15 Control method and device for WIFI sharing hot spot and storage medium

Publications (2)

Publication Number Publication Date
CN114302399A true CN114302399A (en) 2022-04-08
CN114302399B CN114302399B (en) 2023-12-29

Family

ID=80967579

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202111536696.6A Active CN114302399B (en) 2021-12-15 2021-12-15 Control method and device for WIFI sharing hot spot and storage medium

Country Status (1)

Country Link
CN (1) CN114302399B (en)

Citations (10)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN103188647A (en) * 2011-12-29 2013-07-03 北京网秦天下科技有限公司 Method and system for statistically analyzing and warning Internet surfing flow of mobile terminal
CN104427541A (en) * 2013-08-30 2015-03-18 许辉跃 WiFi hot spot registration and information service system and method
CN106454810A (en) * 2016-09-14 2017-02-22 广东欧珀移动通信有限公司 Hotspot establishing method and terminal equipment
US20180184363A1 (en) * 2016-12-27 2018-06-28 Bandwidthx Inc. Auto-discovery of amenities
US20180332525A1 (en) * 2017-05-09 2018-11-15 Coronet Cyber Security Ltd. Secure hotspot setup
CN111107614A (en) * 2018-10-26 2020-05-05 中兴通讯股份有限公司 Terminal device control method and device and terminal device readable storage medium
CN111901852A (en) * 2020-06-23 2020-11-06 于志国 Mobile device hotspot connection management system and corresponding terminal
CN112055390A (en) * 2020-07-30 2020-12-08 深圳市修远文化创意有限公司 Signal switching method and related device
CN112291787A (en) * 2019-07-24 2021-01-29 杭州萤石软件有限公司 Network connection method, device and system
CN112333683A (en) * 2020-11-27 2021-02-05 北京小米移动软件有限公司 Hotspot sharing method and device, mobile terminal and storage medium

Patent Citations (10)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN103188647A (en) * 2011-12-29 2013-07-03 北京网秦天下科技有限公司 Method and system for statistically analyzing and warning Internet surfing flow of mobile terminal
CN104427541A (en) * 2013-08-30 2015-03-18 许辉跃 WiFi hot spot registration and information service system and method
CN106454810A (en) * 2016-09-14 2017-02-22 广东欧珀移动通信有限公司 Hotspot establishing method and terminal equipment
US20180184363A1 (en) * 2016-12-27 2018-06-28 Bandwidthx Inc. Auto-discovery of amenities
US20180332525A1 (en) * 2017-05-09 2018-11-15 Coronet Cyber Security Ltd. Secure hotspot setup
CN111107614A (en) * 2018-10-26 2020-05-05 中兴通讯股份有限公司 Terminal device control method and device and terminal device readable storage medium
CN112291787A (en) * 2019-07-24 2021-01-29 杭州萤石软件有限公司 Network connection method, device and system
CN111901852A (en) * 2020-06-23 2020-11-06 于志国 Mobile device hotspot connection management system and corresponding terminal
CN112055390A (en) * 2020-07-30 2020-12-08 深圳市修远文化创意有限公司 Signal switching method and related device
CN112333683A (en) * 2020-11-27 2021-02-05 北京小米移动软件有限公司 Hotspot sharing method and device, mobile terminal and storage medium

Non-Patent Citations (1)

* Cited by examiner, † Cited by third party
Title
谭悦平;: "WiFi无线网络的安全与防范措施探讨", 信息与电脑(理论版), no. 09 *

Also Published As

Publication number Publication date
CN114302399B (en) 2023-12-29

Similar Documents

Publication Publication Date Title
CN109711168B (en) Behavior-based service identification method, behavior-based service identification device, behavior-based service identification equipment and readable storage medium
EP3375159B1 (en) Dynamic honeypot system
US10169585B1 (en) System and methods for advanced malware detection through placement of transition events
US10810164B2 (en) Securing access to functionality of a file-based write filter
CN103391374B (en) Dual system terminal supporting seamless switching
CN103198255B (en) Method and system for monitoring and intercepting sensitive behaviour of Android software
US9100440B1 (en) Systems and methods for applying data loss prevention policies to closed-storage portable devices
US20140013429A1 (en) Method for processing an operating application program and device for the same
US9781143B1 (en) Systems and methods for detecting near field communication risks
US10769275B2 (en) Systems and methods for monitoring bait to protect users from security threats
WO2014168954A1 (en) Security policies for loading, linking, and executing native code by mobile applications running inside of virtual machines
EP3089068A1 (en) Application program management method, device, terminal, and computer storage medium
CN103218552B (en) Based on method for managing security and the device of user behavior
CN111782416A (en) Data reporting method, device, system, terminal and computer readable storage medium
EP3513353B1 (en) Systems and methods for detecting malicious processes on computing devices
CN109815700B (en) Application program processing method and device, storage medium and computer equipment
CN110612731A (en) System and method for enforcing data loss prevention policies
US9942268B1 (en) Systems and methods for thwarting unauthorized attempts to disable security managers within runtime environments
US10803167B1 (en) Systems and methods for executing application launchers
CN111651763B (en) Process monitoring method and device, electronic equipment and storage medium
Ramachandran et al. Android anti-virus analysis
US11113389B1 (en) Systems and methods for providing persistent visual warnings for application launchers
KR20160145574A (en) Systems and methods for enforcing security in mobile computing
CN109784041B (en) Event processing method and device, storage medium and electronic device
CN114302399B (en) Control method and device for WIFI sharing hot spot and storage medium

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
CB02 Change of applicant information

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

Applicant after: Qianxin Technology Group Co.,Ltd.

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: Qianxin Technology Group Co.,Ltd.

Applicant before: LEGENDSEC INFORMATION TECHNOLOGY (BEIJING) Inc.

CB02 Change of applicant information
GR01 Patent grant
GR01 Patent grant