技术领域Technical field
本申请涉及无线传输技术领域,尤其是涉及到一种WIFI共享热点的控制方法及装置、存储介质、计算机设备。The present application relates to the field of wireless transmission technology, and in particular to a control method and device for WIFI shared hotspots, storage media, and computer equipment.
背景技术Background technique
随着互联网的不断发展,共享热点功能应运而生。为了网络连接的便利性,很多终端设备均具备开启共享热点的功能,例如,通过手机终端为电脑终端开启共享热点,以实现电脑的无线网络连接等,可以说,共享热点功能的存在大大提升了网络连接的便利性。With the continuous development of the Internet, the hotspot sharing function emerged as the times require. For the convenience of network connection, many terminal devices have the function of turning on shared hotspots. For example, a mobile phone terminal can turn on a shared hotspot for a computer terminal to realize a wireless network connection of the computer. It can be said that the existence of the shared hotspot function has greatly improved Convenience of network connection.
然而,在日常工作中,很多终端设备连接内网,并为其他终端设备开启共享热点,这种做法给内网环境和内部数据的安全造成了极大的风险。However, in daily work, many terminal devices connect to the intranet and open shared hotspots for other terminal devices. This practice poses great risks to the security of the intranet environment and internal data.
发明内容Contents of the invention
有鉴于此,本申请提供了一种WIFI共享热点的控制方法及装置、存储介质、计算机设备,能够有效避免未授权终端设备通过WIFI共享热点接入内网,大大提升了内网环境和内部数据的安全性。In view of this, this application provides a WIFI shared hotspot control method and device, storage medium, and computer equipment, which can effectively prevent unauthorized terminal devices from accessing the intranet through WIFI shared hotspots, greatly improving the intranet environment and internal data security.
根据本申请的一个方面,提供了一种WIFI共享热点的控制方法,包括:According to one aspect of this application, a method for controlling a WIFI shared hotspot is provided, including:
响应于用户态程序启动指令,调用目标状态读取接口,通过所述目标状态读取接口确定无线网卡的运行模式;In response to the user mode program startup instruction, call the target status reading interface, and determine the operating mode of the wireless network card through the target status reading interface;
当所述无线网卡的运行模式为共享热点模式时,调用目标状态设置接口,通过所述目标状态设置接口将所述无线网卡的运行模式更改为信号接收模式,以关闭所述无线网卡对应的WIFI共享热点。When the operating mode of the wireless network card is the shared hotspot mode, the target state setting interface is called, and the operating mode of the wireless network card is changed to the signal receiving mode through the target state setting interface to close the WIFI corresponding to the wireless network card. Shared hotspot.
可选地,所述通过所述目标状态读取接口确定无线网卡的运行模式之后,所述方法还包括:当所述无线网卡的运行模式为所述信号接收模式时,启动第一计时装置,并当所述第一计时装置记录的时间与第一预设时间间隔一致时,返回至所述调用目标状态读取接口的步骤;或者,Optionally, after determining the operating mode of the wireless network card through the target status reading interface, the method further includes: when the operating mode of the wireless network card is the signal receiving mode, starting the first timing device, And when the time recorded by the first timing device is consistent with the first preset time interval, return to the step of calling the target state reading interface; or,
所述通过所述目标状态设置接口将所述无线网卡的运行模式更改为信号接收模式之后,所述方法还包括:启动第二计时装置,并当所述第二计时装置记录的时间与所述第一预设时间间隔一致时,返回至所述调用目标状态读取接口的步骤。After changing the operating mode of the wireless network card to the signal receiving mode through the target state setting interface, the method further includes: starting a second timing device, and when the time recorded by the second timing device is the same as the time recorded by the second timing device, When the first preset time interval is consistent, return to the step of calling the target state reading interface.
可选地,所述方法还包括:Optionally, the method also includes:
响应于内核态程序启动指令,实时监听预设设备管理函数的操作数据,当监听到所述操作数据时,调用预设拦截函数对所述操作数据进行拦截,并通过所述预设拦截函数对拦截的所述操作数据进行检查;In response to the kernel mode program startup instruction, the operation data of the preset device management function is monitored in real time. When the operation data is monitored, the preset interception function is called to intercept the operation data, and the preset interception function is used to intercept the operation data. Check the intercepted operational data;
当所述操作数据为将所述无线网卡的运行模式修改为共享热点模式对应的操作数据时,终止所述操作数据的传输;When the operation data is operation data corresponding to modifying the operating mode of the wireless network card to the shared hotspot mode, terminate the transmission of the operation data;
当所述操作数据不为所述将无线网卡的运行模式修改为共享热点模式对应的操作数据时,放行所述操作数据。When the operation data is not the operation data corresponding to the modification of the operating mode of the wireless network card to the shared hotspot mode, the operation data is released.
可选地,所述响应于用户态程序启动指令之后,所述方法还包括:Optionally, after responding to the user mode program startup instruction, the method further includes:
实时监听所述内核态程序启动指令,并当监听到所述内核态程序启动指令后,调用所述目标状态读取接口,通过所述目标状态读取接口确定所述无线网卡的运行模式;Monitor the kernel state program startup instruction in real time, and after monitoring the kernel state program startup instruction, call the target state reading interface, and determine the operating mode of the wireless network card through the target state reading interface;
当所述无线网卡的运行模式为所述共享热点模式时,返回至所述调用目标状态设置接口的步骤;When the operating mode of the wireless network card is the shared hotspot mode, return to the step of calling the target status setting interface;
当所述无线网卡的运行模式为所述信号接收模式时,关闭所述第一计时装置或所述第二计时装置。When the operating mode of the wireless network card is the signal receiving mode, the first timing device or the second timing device is turned off.
可选地,所述关闭所述第一计时装置或所述第二计时装置之后,所述方法还包括:Optionally, after closing the first timing device or the second timing device, the method further includes:
持续监听所述内核态程序的运行数据,并当未监听到所述运行数据的空闲时间大于预设空闲时间时,重新启动所述第一计时装置或所述第二计时装置。Continuously monitor the running data of the kernel mode program, and when the idle time for which the running data is not monitored is greater than the preset idle time, restart the first timing device or the second timing device.
可选地,所述当所述无线网卡的运行模式为共享热点模式时之后,所述方法还包括:Optionally, after the operating mode of the wireless network card is a shared hotspot mode, the method further includes:
确定所述无线网卡WIFI共享热点的接入设备标识,并获取预设权限标识列表;Determine the access device identification of the wireless network card WIFI shared hotspot, and obtain a list of preset permission identifications;
当所述预设权限标识列表不包括所述接入设备标识时,执行所述调用目标状态设置接口。When the preset permission identification list does not include the access device identification, the calling target status setting interface is executed.
可选地,所述通过所述目标状态设置接口将所述无线网卡的运行模式更改为信号接收模式之后,所述方法还包括:Optionally, after changing the operating mode of the wireless network card to the signal receiving mode through the target state setting interface, the method further includes:
记录所述无线网卡运行模式的更改次数,并当所述更改次数大于预设次数阈值时,利用第二预设时间间隔替换所述第一预设时间间隔,其中,所述第一预设时间间隔大于所述第二预设时间间隔。Record the number of changes to the wireless network card operating mode, and when the number of changes is greater than a preset times threshold, replace the first preset time interval with a second preset time interval, wherein the first preset time The interval is greater than the second preset time interval.
根据本申请的另一方面,提供了一种WIFI共享热点的控制装置,包括:According to another aspect of the present application, a control device for WIFI shared hotspot is provided, including:
运行模式确定模块,用于响应于用户态程序启动指令,调用目标状态读取接口,通过所述目标状态读取接口确定无线网卡的运行模式;An operating mode determination module, configured to call a target state reading interface in response to a user mode program startup instruction, and determine the operating mode of the wireless network card through the target state reading interface;
运行模式更改模块,用于当所述无线网卡的运行模式为共享热点模式时,调用目标状态设置接口,通过所述目标状态设置接口将所述无线网卡的运行模式更改为信号接收模式,以关闭所述无线网卡对应的WIFI共享热点。An operating mode changing module, configured to call a target state setting interface when the operating mode of the wireless network card is a shared hotspot mode, and change the operating mode of the wireless network card to a signal receiving mode through the target state setting interface to close the The WIFI shared hotspot corresponding to the wireless network card.
可选地,所述装置还包括:Optionally, the device also includes:
计时模块,用于所述通过所述目标状态读取接口确定无线网卡的运行模式之后,当所述无线网卡的运行模式为所述信号接收模式时,启动第一计时装置,并当所述第一计时装置记录的时间与第一预设时间间隔一致时,返回至所述调用目标状态读取接口的步骤;或者,所述通过所述目标状态设置接口将所述无线网卡的运行模式更改为信号接收模式之后,启动第二计时装置,并当所述第二计时装置记录的时间与所述第一预设时间间隔一致时,返回至所述调用目标状态读取接口的步骤。a timing module, configured to start the first timing device when the operating mode of the wireless network card is the signal receiving mode after determining the operating mode of the wireless network card through the target state reading interface, and when the third When the time recorded by a timing device is consistent with the first preset time interval, return to the step of calling the target status reading interface; or, change the operating mode of the wireless network card to After the signal receiving mode, start the second timing device, and when the time recorded by the second timing device is consistent with the first preset time interval, return to the step of calling the target state reading interface.
可选地,所述装置还包括:Optionally, the device also includes:
监听模块,用于响应于内核态程序启动指令,实时监听预设设备管理函数的操作数据,当监听到所述操作数据时,调用预设拦截函数对所述操作数据进行拦截,并通过所述预设拦截函数对拦截的所述操作数据进行检查;The monitoring module is used to monitor the operation data of the preset device management function in real time in response to the kernel mode program startup instruction. When the operation data is monitored, the preset interception function is called to intercept the operation data, and the operation data is intercepted through the The preset interception function checks the intercepted operation data;
终止模块,用于当所述操作数据为将所述无线网卡的运行模式修改为共享热点模式对应的操作数据时,终止所述操作数据的传输;A termination module configured to terminate the transmission of the operation data when the operation data is operation data corresponding to modifying the operating mode of the wireless network card to the shared hotspot mode;
放行模块,用于当所述操作数据不为所述将无线网卡的运行模式修改为共享热点模式对应的操作数据时,放行所述操作数据。A release module, configured to release the operation data when the operation data is not the operation data corresponding to the modification of the operating mode of the wireless network card to the shared hotspot mode.
可选地,所述装置还包括:Optionally, the device also includes:
所述监听模块,还用于所述响应于用户态程序启动指令之后,实时监听所述内核态程序启动指令,并当监听到所述内核态程序启动指令后,调用所述目标状态读取接口,通过所述目标状态读取接口确定所述无线网卡的运行模式;The monitoring module is also used to monitor the kernel mode program startup instruction in real time after responding to the user mode program startup instruction, and after listening to the kernel mode program startup instruction, call the target state reading interface , determine the operating mode of the wireless network card through the target status reading interface;
所述运行模式确定模块,还用于当所述无线网卡的运行模式为所述共享热点模式时,返回至所述调用目标状态设置接口的步骤;The operating mode determination module is also configured to return to the step of calling the target status setting interface when the operating mode of the wireless network card is the shared hotspot mode;
关闭模块,用于当所述无线网卡的运行模式为所述信号接收模式时,关闭所述第一计时装置或所述第二计时装置。A shutdown module, configured to shut down the first timing device or the second timing device when the operating mode of the wireless network card is the signal receiving mode.
可选地,所述装置还包括:Optionally, the device also includes:
开启模块,用于所述关闭所述第一计时装置或所述第二计时装置之后,持续监听所述内核态程序的运行数据,并当未监听到所述运行数据的空闲时间大于预设空闲时间时,重新启动所述第一计时装置或所述第二计时装置。An opening module configured to continuously monitor the running data of the kernel state program after the first timing device or the second timing device is turned off, and when the idle time when the running data is not monitored is greater than the preset idle time time, restart the first timing device or the second timing device.
可选地,所述装置还包括:Optionally, the device also includes:
列表获取模块,用于所述当所述无线网卡的运行模式为共享热点模式时之后,确定所述无线网卡WIFI共享热点的接入设备标识,并获取预设权限标识列表;A list acquisition module, configured to determine the access device identification of the wireless network card WIFI shared hotspot when the operating mode of the wireless network card is the shared hotspot mode, and obtain a list of preset permission identifications;
所述运行模式确定模块,还用于当所述预设权限标识列表不包括所述接入设备标识时,执行所述调用目标状态设置接口。The operating mode determination module is also configured to execute the calling target status setting interface when the preset permission identification list does not include the access device identification.
可选地,所述装置还包括:Optionally, the device also includes:
记录模块,用于所述通过所述目标状态设置接口将所述无线网卡的运行模式更改为信号接收模式之后,记录所述无线网卡运行模式的更改次数,并当所述更改次数大于预设次数阈值时,利用第二预设时间间隔替换所述第一预设时间间隔,其中,所述第一预设时间间隔大于所述第二预设时间间隔。A recording module, configured to record the number of changes in the wireless network card's operating mode after the operating mode of the wireless network card is changed to the signal receiving mode through the target state setting interface, and when the number of changes is greater than the preset number When the threshold is reached, the first preset time interval is replaced with a second preset time interval, wherein the first preset time interval is greater than the second preset time interval.
依据本申请又一个方面,提供了一种存储介质,其上存储有计算机程序,所述程序被处理器执行时实现上述WIFI共享热点的控制方法。According to yet another aspect of the present application, a storage medium is provided, on which a computer program is stored. When the program is executed by a processor, the above control method for a WIFI shared hotspot is implemented.
依据本申请再一个方面,提供了一种计算机设备,包括存储介质、处理器及存储在存储介质上并可在处理器上运行的计算机程序,所述处理器执行所述程序时实现上述WIFI共享热点的控制方法。According to yet another aspect of the present application, a computer device is provided, including a storage medium, a processor, and a computer program stored on the storage medium and executable on the processor. When the processor executes the program, the above-mentioned WIFI sharing is realized. Hotspot control methods.
借由上述技术方案,本申请提供的一种WIFI共享热点的控制方法及装置、存储介质、计算机设备,首先,当接收到用户态程序启动指令时,可以响应于用户态程序启动指令,并对目标状态读取接口进行调用。接着,可以通过调用的目标状态读取接口对当前无线网卡的运行模式进行确定。当通过目标状态读取接口确定无线网卡的运行模式是共享热点模式时,可以进一步调用目标状态设置接口,通过目标状态设置接口对无线网卡的WIFI共享热点进行关闭,并将无线网卡的运行模式从共享热点模式更改为信号接收模式。本申请通过调用目标状态读取接口确定无线网卡的运行模式,并通过调用目标状态设置接口关闭无线网卡的共享热点,能够有效避免未授权终端设备通过WIFI共享热点接入内网,大大提升了内网环境和内部数据的安全性。Through the above technical solution, the present application provides a WIFI shared hotspot control method and device, storage medium, and computer equipment. First, when receiving a user-mode program startup instruction, it can respond to the user-mode program startup instruction and The target status reading interface is called. Then, the operating mode of the current wireless network card can be determined through the called target status reading interface. When it is determined through the target status reading interface that the operating mode of the wireless network card is the shared hotspot mode, the target status setting interface can be further called to turn off the WIFI sharing hotspot of the wireless network card through the target status setting interface, and change the operating mode of the wireless network card from Shared hotspot mode changes to signal receiving mode. This application determines the operating mode of the wireless network card by calling the target status reading interface, and turns off the shared hotspot of the wireless network card by calling the target status setting interface, which can effectively prevent unauthorized terminal devices from accessing the intranet through WIFI shared hotspots, greatly improving the internal network. network environment and internal data security.
上述说明仅是本申请技术方案的概述,为了能够更清楚了解本申请的技术手段,而可依照说明书的内容予以实施,并且为了让本申请的上述和其它目的、特征和优点能够更明显易懂,以下特举本申请的具体实施方式。The above description is only an overview of the technical solutions of the present application. In order to have a clearer understanding of the technical means of the present application, they can be implemented according to the content of the description, and in order to make the above and other purposes, features and advantages of the present application more obvious and understandable. , the specific implementation methods of the present application are specifically listed below.
附图说明Description of the drawings
此处所说明的附图用来提供对本申请的进一步理解,构成本申请的一部分,本申请的示意性实施例及其说明用于解释本申请,并不构成对本申请的不当限定。在附图中:The drawings described here are used to provide a further understanding of the present application and constitute a part of the present application. The illustrative embodiments of the present application and their descriptions are used to explain the present application and do not constitute an improper limitation of the present application. In the attached picture:
图1示出了本申请实施例提供的一种WIFI共享热点的控制方法的流程示意图;Figure 1 shows a schematic flow chart of a WIFI shared hotspot control method provided by an embodiment of the present application;
图2示出了本申请实施例提供的另一种WIFI共享热点的控制方法的流程示意图;Figure 2 shows a schematic flow chart of another WIFI shared hotspot control method provided by an embodiment of the present application;
图3示出了本申请实施例提供的另一种WIFI共享热点的控制方法的流程示意图;Figure 3 shows a schematic flow chart of another WIFI shared hotspot control method provided by an embodiment of the present application;
图4示出了本申请实施例提供的一种WIFI共享热点的控制装置的结构示意图;Figure 4 shows a schematic structural diagram of a WIFI shared hotspot control device provided by an embodiment of the present application;
图5示出了本申请实施例提供的一种计算机设备的实体结构示意图。FIG. 5 shows a schematic diagram of the physical structure of a computer device provided by an embodiment of the present application.
具体实施方式Detailed ways
下文中将参考附图并结合实施例来详细说明本申请。需要说明的是,在不冲突的情况下,本申请中的实施例及实施例中的特征可以相互组合。The present application will be described in detail below with reference to the accompanying drawings and embodiments. It should be noted that, as long as there is no conflict, the embodiments and features in the embodiments of this application can be combined with each other.
在本实施例中提供了一种WIFI共享热点的控制方法,如图1所示,该方法包括:In this embodiment, a method for controlling a WIFI shared hotspot is provided. As shown in Figure 1, the method includes:
步骤101,响应于用户态程序启动指令,调用目标状态读取接口,通过所述目标状态读取接口确定无线网卡的运行模式;Step 101, in response to the user mode program startup instruction, call the target state reading interface, and determine the operating mode of the wireless network card through the target state reading interface;
目前Windows操作系统、Linux操作系统等操作系统均包括内核态和用户态两部分。由于需要限制不同的程序之间的访问能力,防止他们获取别的程序的内存数据,或者获取外围设备的数据,并发送到网络,CPU划分出两个权限等级——用户态和内核态。其中,当程序执行系统调用而陷入内核代码中执行时,叫作内核态程序,当程序在执行用户自己的代码时,叫作用户态程序。本申请实施例提供的WIFI共享热点控制方法具体可以应用于Linux操作系统中。首先,当接收到用户态程序启动指令时,可以响应于用户态程序启动指令,并对目标状态读取接口进行调用,在这里,目标状态读取接口可以是系统API接口。接着,可以通过调用的目标状态读取接口对当前无线网卡的运行模式进行确定。其中,目标状态读取接口也可以是系统API接口。Currently, operating systems such as Windows operating system and Linux operating system include kernel mode and user mode. Due to the need to restrict access capabilities between different programs to prevent them from obtaining memory data of other programs, or obtaining data from peripheral devices and sending it to the network, the CPU is divided into two permission levels - user mode and kernel mode. Among them, when a program executes a system call and is trapped in the kernel code for execution, it is called a kernel-mode program. When the program executes the user's own code, it is called a user-mode program. The WIFI shared hotspot control method provided by the embodiments of this application can be specifically applied to the Linux operating system. First, when a user-mode program startup instruction is received, the user-mode program startup instruction can be responded to and the target state reading interface can be called. Here, the target state reading interface can be a system API interface. Then, the operating mode of the current wireless network card can be determined through the called target status reading interface. Among them, the target status reading interface can also be a system API interface.
步骤102,当所述无线网卡的运行模式为共享热点模式时,调用目标状态设置接口,通过所述目标状态设置接口将所述无线网卡的运行模式更改为信号接收模式,以关闭所述无线网卡对应的WIFI共享热点。Step 102: When the operating mode of the wireless network card is the shared hotspot mode, call the target state setting interface, and change the operating mode of the wireless network card to the signal receiving mode through the target state setting interface to turn off the wireless network card. Corresponding WIFI shared hotspot.
在该实施例中,无线网卡的运行模式可以是信号接收模式,也可以是共享热点模式,其中,信号接收模式指的是正常接收信号模式,即managed模式,共享热点模式指的是发射热点信号模式,即master模式。当通过目标状态读取接口确定无线网卡的运行模式是共享热点模式时,说明此时无线网卡正在为其他终端设备发射热点信号,这样非常容易造成未授权的终端设备非法接入内网中,给内网环境和数据安全造成极大威胁。因而,可以进一步调用目标状态设置接口,通过目标状态设置接口对无线网卡的WIFI共享热点进行关闭,将无线网卡的运行模式从共享热点模式更改为信号接收模式。在这里,开启WIFI共享热点的终端设备可以是通过有线网线接入内网的,也可以在无线网卡恢复为信号接收模式后再通过无线网卡接入内网,在此不做要求。In this embodiment, the operating mode of the wireless network card can be a signal receiving mode or a shared hotspot mode, where the signal receiving mode refers to the normal signal receiving mode, that is, the managed mode, and the shared hotspot mode refers to transmitting hotspot signals. mode, that is, master mode. When it is determined through the target status reading interface that the operating mode of the wireless network card is the shared hotspot mode, it means that the wireless network card is transmitting hotspot signals for other terminal devices at this time. This can easily cause unauthorized terminal devices to illegally access the intranet, causing serious problems. The intranet environment and data security pose a great threat. Therefore, the target state setting interface can be further called to turn off the WIFI shared hotspot of the wireless network card through the target state setting interface, and change the operating mode of the wireless network card from the sharing hotspot mode to the signal receiving mode. Here, the terminal device that turns on the WIFI shared hotspot can be connected to the intranet through a wired network cable, or it can be connected to the intranet through the wireless network card after the wireless network card returns to signal receiving mode. There are no requirements here.
通过应用本实施例的技术方案,首先,当接收到用户态程序启动指令时,可以响应于用户态程序启动指令,并对目标状态读取接口进行调用。接着,可以通过调用的目标状态读取接口对当前无线网卡的运行模式进行确定。当通过目标状态读取接口确定无线网卡的运行模式是共享热点模式时,可以进一步调用目标状态设置接口,通过目标状态设置接口对无线网卡的WIFI共享热点进行关闭,并将无线网卡的运行模式从共享热点模式更改为信号接收模式。本申请通过调用目标状态读取接口确定无线网卡的运行模式,并通过调用目标状态设置接口关闭无线网卡的共享热点,能够有效避免未授权终端设备通过WIFI共享热点接入内网,大大提升了内网环境和内部数据的安全性。By applying the technical solution of this embodiment, first, when a user-mode program startup instruction is received, the user-mode program startup instruction can be responded to and the target state reading interface can be called. Then, the operating mode of the current wireless network card can be determined through the called target status reading interface. When it is determined through the target status reading interface that the operating mode of the wireless network card is the shared hotspot mode, the target status setting interface can be further called to turn off the WIFI sharing hotspot of the wireless network card through the target status setting interface, and change the operating mode of the wireless network card from Shared hotspot mode changes to signal receiving mode. This application determines the operating mode of the wireless network card by calling the target status reading interface, and turns off the shared hotspot of the wireless network card by calling the target status setting interface, which can effectively prevent unauthorized terminal devices from accessing the intranet through WIFI shared hotspots, greatly improving the internal network. network environment and internal data security.
进一步的,作为上述实施例具体实施方式的细化和扩展,为了完整说明本实施例的具体实施过程,提供了另一种WIFI共享热点的控制方法,如图2所示,该方法包括:Further, as a refinement and expansion of the specific implementation of the above embodiment, in order to completely explain the specific implementation process of this embodiment, another method for controlling WIFI shared hotspots is provided. As shown in Figure 2, the method includes:
步骤201,响应于用户态程序启动指令,调用目标状态读取接口,通过所述目标状态读取接口确定无线网卡的运行模式;Step 201, in response to the user mode program startup instruction, call the target state reading interface, and determine the operating mode of the wireless network card through the target state reading interface;
在本申请实施例中,当接收到用户态程序启动指令时,可以响应于用户态程序启动指令,并对目标状态读取接口进行调用,在这里,目标状态读取接口可以是系统API接口。接着,可以通过调用的目标状态读取接口对当前无线网卡的运行模式进行确定。In the embodiment of the present application, when a user-mode program startup instruction is received, the user-mode program startup instruction may be responded to and the target state reading interface may be called. Here, the target state reading interface may be a system API interface. Then, the operating mode of the current wireless network card can be determined through the called target status reading interface.
步骤202,当所述无线网卡的运行模式为共享热点模式时,确定所述无线网卡WIFI共享热点的接入设备标识,并获取预设权限标识列表;Step 202: When the operating mode of the wireless network card is the shared hotspot mode, determine the access device identification of the WIFI shared hotspot of the wireless network card, and obtain a list of preset permission identifications;
在本申请实施例中,当经过目标状态读取接口确定无线网卡的运行模式是共享热点模式时,说明此时无线网卡正在为其他终端设备开启WIFI共享热点,这样非常容易造成未授权的终端设备非法接入内网中,给内网环境和数据安全造成极大威胁。因而,可以对接入WIFI共享热点的终端设备对应的设备标识进行确定,在这里,接入设备标识与接入的设备是一一对应的。与此同时,还可以获取预设权限标识列表,在预设权限标识列表中可以包括具有接入权限的终端设备对应的标识,包含在预设权限标识列表中的标识对应的终端设备均可以接入到无线网卡的WIFI共享热点中。In the embodiment of this application, when it is determined through the target status reading interface that the operating mode of the wireless network card is the shared hotspot mode, it means that the wireless network card is opening the WIFI shared hotspot for other terminal devices at this time, which is very easy to cause unauthorized terminal devices. Illegal access to the intranet poses a great threat to the intranet environment and data security. Therefore, the device identifier corresponding to the terminal device that accesses the WIFI shared hotspot can be determined. Here, the access device identifier has a one-to-one correspondence with the accessed device. At the same time, you can also obtain a list of preset permission identifiers. The list of preset permission identifiers can include identifiers corresponding to terminal devices with access permissions. All terminal devices corresponding to the identifiers included in the list of preset permission identifiers can access Enter the WIFI shared hotspot of the wireless network card.
步骤203,当所述预设权限标识列表不包括所述接入设备标识时,调用目标状态设置接口,通过所述目标状态设置接口将所述无线网卡的运行模式更改为信号接收模式,以关闭所述无线网卡对应的WIFI共享热点;Step 203: When the preset permission identification list does not include the access device identification, call the target status setting interface, and change the operating mode of the wireless network card to the signal receiving mode through the target status setting interface to turn off The WIFI shared hotspot corresponding to the wireless network card;
在该实施例中,当接入的终端设备对应的接入设备标识没有包含在预设权限标识列表中时,说明该终端设备不具备接入WIFI共享热点的权限,此时可以调用目标状态设置接口,并利用目标状态设置接口对无线网卡对应的WIFI共享热点进行关闭,将无线网卡的运行模式更改成信号接收模式。本申请实施例通过设置预设权限标识列表,可以使具有接入WIFi共享热点权限的终端设备接入到内网中,一方面可以保证内网环境和内部数据的安全,另一方面可以使需要网络的终端设备连接内网,确保安全终端设备的正常联网。In this embodiment, when the access device identification corresponding to the accessed terminal device is not included in the preset permission identification list, it means that the terminal device does not have the permission to access the WIFI shared hotspot. At this time, the target status setting can be called interface, and use the target status setting interface to turn off the WIFI shared hotspot corresponding to the wireless network card, and change the operating mode of the wireless network card to the signal receiving mode. In the embodiment of this application, by setting a preset permission identification list, terminal devices with permission to access WIFi shared hotspots can be connected to the intranet. On the one hand, the security of the intranet environment and internal data can be ensured, and on the other hand, the need to The terminal equipment of the network is connected to the intranet to ensure the normal networking of the security terminal equipment.
此外,当所述接入设备标识大于一个,且所述预设权限标识列表中包含部分所述接入设备标识时,调用所述目标状态设置接口,通过所述目标状态设置接口关闭所述无线网卡对应的WIFi共享热点,将所述无线网卡的运行模式更改为信号接收模式,并上报不包含在所述预设权限标识列表中的所述接入设备标识。In addition, when the access device identification is greater than one, and the preset permission identification list contains part of the access device identification, the target status setting interface is called, and the wireless device is turned off through the target status setting interface. The WiFi shared hotspot corresponding to the network card changes the operating mode of the wireless network card to the signal receiving mode, and reports the access device identification that is not included in the preset permission identification list.
在该实施例中,当接入WIFi共享热点中的终端设备有一部分具有接入权限,而有一部分没有接入权限时,可以将无线网卡的WIFi共享热点关闭,并将不包含在预设权限标识列表中的接入设备标识进行上报,可以及时发现可疑终端设备,避免内部数据泄露。In this embodiment, when some of the terminal devices accessing the WiFi shared hotspot have access permissions and some do not have access permissions, the WiFi sharing hotspot of the wireless network card can be turned off and excluded from the default permissions. By reporting the access device identification in the identification list, suspicious terminal equipment can be discovered in time and internal data leakage can be avoided.
步骤204,响应于内核态程序启动指令,实时监听预设设备管理函数的操作数据,当监听到所述操作数据时,调用预设拦截函数对所述操作数据进行拦截,并通过所述预设拦截函数对拦截的所述操作数据进行检查;Step 204, in response to the kernel mode program startup instruction, monitor the operation data of the preset device management function in real time. When the operation data is monitored, the preset interception function is called to intercept the operation data, and the operation data is intercepted by the preset device management function. The interception function checks the intercepted operation data;
在该实施例中,除了用户态程序,还包括内核态程序。一般情况下,用户态程序和内核态程序同时运行,为了避免在特殊情况下,内核态程序运行而用户态程序没有运行从而无法对无线网卡的运行模式进行监管,可以在内核态程序运行时通过如下步骤进行无线网卡运行模式的控制。首先,响应于内核态程序启动指令,可以对预设设备管理函数的操作数据进行实时地监听,在这里,预设设备管理函数可以是ioctl函数。在Linux操作系统中,大部分操作均是通过调用ioctl函数来实现的。当监听到预设设备管理函数对应的操作数据时,可以调用预设拦截函数,通过预设拦截函数拦截相应的操作数据,其中,预设拦截函数可以是在系统操作内核中注册的钩子函数等。拦截后还可以进一步通过预设拦截函数对拦截的操作数据进行检查,具体地,操作数据可以是预设设备管理函数对应的参数数据等。In this embodiment, in addition to user-mode programs, kernel-mode programs are also included. Under normal circumstances, user-mode programs and kernel-mode programs run at the same time. In order to avoid that in special circumstances, the kernel-mode program is running but the user-mode program is not running, so that the operating mode of the wireless network card cannot be monitored, you can pass it when the kernel-mode program is running. Follow the steps below to control the operating mode of the wireless network card. First, in response to the kernel mode program startup instruction, the operation data of the preset device management function can be monitored in real time. Here, the preset device management function can be an ioctl function. In the Linux operating system, most operations are implemented by calling the ioctl function. When the operation data corresponding to the preset device management function is monitored, the preset interception function can be called, and the corresponding operation data can be intercepted through the preset interception function. The preset interception function can be a hook function registered in the system operating kernel, etc. . After interception, the intercepted operation data can be further checked through the preset interception function. Specifically, the operation data can be parameter data corresponding to the preset device management function, etc.
步骤205,当所述操作数据为将所述无线网卡的运行模式修改为共享热点模式对应的操作数据时,终止所述操作数据的传输;Step 205: When the operation data is the operation data corresponding to modifying the operating mode of the wireless network card to the shared hotspot mode, terminate the transmission of the operation data;
在该实施例中,通过预设拦截函数确定操作数据是否为将无线网卡运行模式修改为共享热点模式对应的操作数据,并当是时,停止操作数据的传输,避免将无线网卡的运行模式修改为共享热点模式。In this embodiment, the preset interception function is used to determine whether the operation data is the operation data corresponding to changing the wireless network card operating mode to the shared hotspot mode, and when so, the transmission of the operating data is stopped to avoid modifying the wireless network card operating mode. It is a shared hotspot mode.
步骤206,当所述操作数据不为所述将无线网卡的运行模式修改为共享热点模式对应的操作数据时,放行所述操作数据。Step 206: When the operation data is not the operation data corresponding to the modification of the operating mode of the wireless network card to the shared hotspot mode, release 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 changing the operating mode of the wireless network card to the shared hotspot mode, it means that the operation data has nothing to do with this interception, and the operation data can be released. deal with.
在本申请实施例中,内核态程序运行时,只能通过预设拦截函数对想要打开无线网卡共享热点的相关操作数据进行终止处理,而对于在启动内核态程序之前就已经打开无线网卡WIFI共享热点的情况,则可以通过用户态程序运行时,调用目标状态读取接口和目标状态设置接口的方式关闭无线网卡的WIFI共享热点关闭。二者共同作用以保证内网环境和内部数据的安全。In the embodiment of this application, when the kernel state program is running, the relevant operation data that wants to open the wireless network card shared hotspot can only be terminated through the preset interception function. However, the wireless network card WIFI has been turned on before starting the kernel state program. In the case of shared hotspot, you can turn off the WIFI shared hotspot of the wireless network card by calling the target status reading interface and the target status setting interface when the user mode program is running. The two work together to ensure the security of the intranet environment and internal data.
在本申请实施例中,步骤201中所述“通过所述目标状态读取接口确定无线网卡的运行模式”之后,所述方法还包括:当所述无线网卡的运行模式为所述信号接收模式时,启动第一计时装置,并当所述第一计时装置记录的时间与第一预设时间间隔一致时,返回至所述调用目标状态读取接口的步骤;或者,步骤203中所述“通过所述目标状态设置接口将所述无线网卡的运行模式更改为信号接收模式”之后,所述方法还包括:启动第二计时装置,并当所述第二计时装置记录的时间与所述第一预设时间间隔一致时,返回至所述调用目标状态读取接口的步骤。In the embodiment of the present application, after "determining the operating mode of the wireless network card through the target status reading interface" in step 201, the method further includes: when the operating mode of the wireless network card is the signal receiving mode When, start the first timing device, and when the time recorded by the first timing device is consistent with the first preset time interval, return to the step of calling the target state reading interface; or, as described in step 203, " After changing the operating mode of the wireless network card to the signal receiving mode through the target state setting interface, the method further includes: starting a second timing device, and when the time recorded by the second timing device is the same as the third When a preset time interval is consistent, return to the step of calling the target state reading interface.
在该实施例中,当通过目标状态读取接口确定无线网卡的运行模式是信号接收模式时,可以启动第一计时装置,启动第一计时装置后,可以通过第一计时装置开始计时,当第一计时装置记录的时间达到第一预设时间间隔时,可以再次调用目标状态读取接口,并通过目标状态读取接口对当前无线网卡的运行模式进行确定。接着,当确定无线网卡的运行模式为共享热点模式时,可以调用目标状态设置接口,利用目标状态设置接口对无线网卡的WIFi共享热点进行关闭,进一步将无线网卡的运行模式修改为信号接收模式;当确定无线网卡的运行模式为信号接收模式时,可以启动第二计时装置,并通过第二计时装置计时,实现无线网卡运行模式的重复判断。此外,当通过目标状态设置接口将无线网卡的运行模式更改为信号接收模式之后,可以启动第二计时装置,同样地,可以通过第二计时装置开始计时,当第二计时装置记录的时间达到第一预设时间间隔时,可以再次调用目标状态读取接口,并通过目标状态读取接口对当前无线网卡的运行模式进行确定。接着,当确定无线网卡的运行模式为共享热点模式时,可以调用目标状态设置接口,利用目标状态设置接口对无线网卡的WIFi共享热点进行关闭,进一步将无线网卡的运行模式修改为信号接收模式;当无线网卡的运行模式仍旧为信号接收模式时,则再次启动第二计时装置,实现无线网卡运行模式的重复判断。本申请实施例通过设置第一预设时间间隔,并当第一计时装置或第二计时装置记录的时间与第一预设时间间隔一致时,再次调用目标状态读取接口,可以重复检查无线网卡的运行模式,避免将无线网卡的WIFi共享热点关闭后再次启用,并接入非授权终端设备,威胁内部数据安全。In this embodiment, when it is determined through the target status reading interface that the operating mode of the wireless network card is the signal receiving mode, the first timing device can be started. After the first timing device is started, the timing can be started through the first timing device. When the first timing device is started, the first timing device can start timing. When the time recorded by a timing device reaches the first preset time interval, the target state reading interface can be called again, and the operating mode of the current wireless network card can be determined through the target state reading interface. Next, when it is determined that the operating mode of the wireless network card is the shared hotspot mode, the target state setting interface can be called, and the target state setting interface is used to turn off the WiFi shared hotspot of the wireless network card, and further modify the operating mode of the wireless network card to the signal receiving mode; When it is determined that the operating mode of the wireless network card is the signal receiving mode, the second timing device can be started, and the second timing device can time the clock to realize repeated judgment of the operating mode of the wireless network card. In addition, after changing the operating mode of the wireless network card to the signal receiving mode through the target state setting interface, the second timing device can be started. Similarly, the timing can be started through the second timing device. When the time recorded by the second timing device reaches the At a preset time interval, the target status reading interface can be called again, and the operating mode of the current wireless network card can be determined through the target status reading interface. Next, when it is determined that the operating mode of the wireless network card is the shared hotspot mode, the target state setting interface can be called, and the target state setting interface is used to turn off the WiFi shared hotspot of the wireless network card, and further modify the operating mode of the wireless network card to the signal receiving mode; When the operating mode of the wireless network card is still in the signal receiving mode, the second timing device is started again to realize repeated judgment of the operating mode of the wireless network card. The embodiment of the present application sets a first preset time interval, 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 status reading interface is called again to repeatedly check the wireless network card. operating mode to avoid turning off the WiFi sharing hotspot of the wireless network card and then enabling it again, and connecting to unauthorized terminal devices, threatening internal data security.
在本申请实施例中,步骤201所述“响应于用户态程序启动指令”之后,所述方法还包括:实时监听所述内核态程序启动指令,并当监听到所述内核态程序启动指令后,调用所述目标状态读取接口,通过所述目标状态读取接口确定所述无线网卡的运行模式;当所述无线网卡的运行模式为所述共享热点模式时,返回至所述调用目标状态设置接口的步骤;当所述无线网卡的运行模式为所述信号接收模式时,关闭所述第一计时装置或所述第二计时装置。In the embodiment of the present application, after "responding to the user-mode program startup instruction" in step 201, the method further includes: monitoring the kernel-mode program startup instruction in real time, and after listening to the kernel-mode program startup instruction, , call the target state reading interface, and determine the operating mode of the wireless network card through the target state reading interface; when the operating mode of the wireless network card is the shared hotspot mode, return to the calling target state The step of setting an interface; when the operating mode of the wireless network card is the signal receiving mode, turn off the first timing device or the second timing device.
在该实施例中,当用户态程序启动时,响应于用户态程序启动指令,除了可以通过调用目标状态读取接口和目标状态设置接口将无线网卡的共享热点运行模式恢复为信号接收模式,还可以对内核态程序启动指令进行实时监听,当未监听到内核态程序启动指令时,可以按照第一预设时间间隔重复检查无线网卡的运行模式。当监听到内核态程序启动指令时,内核态程序运行时可以实时对修改无线网卡运行模式为共享模式的操作数据进行拦截,阻止共享热点开启。因而,此时可以先调用目标状态读取接口,利用目标状态读取接口确定无线网卡的运行模式是不是共享热点模式。当是时,调用目标状态设置接口,并通过目标状态设置接口关闭无线网卡的WIFI共享热点,将无线网卡的运行模式由共享热点模式修改为信号接收模式,并当此时开启的计时装置为第一计时装置时,将第一计时装置关闭,或者当此时开启的计时装置为第二计时装置时,将第二计时装置关闭,不再重复调用目标状态读取接口,后续通过内核态程序中的预设拦截函数对修改无线网卡运行模式的操作数据进行拦截,防止无线网卡共享热点模式的开启;当否时,说明当前无线网卡的共享热点并未开启,此时可以直接将开启的第一计时装置或者第二计时装置关闭,不再重复调用目标状态读取接口,后续通过内核态程序中的预设拦截函数对修改无线网卡运行模式的操作数据进行拦截,防止无线网卡共享热点模式的开启。In this embodiment, when the user-mode program is started, in response to the user-mode program start instruction, in addition to restoring the shared hotspot operating mode of the wireless network card to the signal receiving mode by calling the target status reading interface and the target status setting interface, the shared hotspot operating mode of the wireless network card is restored to the signal receiving mode. The kernel mode program startup command can be monitored in real time. When the kernel mode program startup command is not monitored, the operating mode of the wireless network card can be repeatedly checked according to the first preset time interval. When the kernel state program startup command is monitored, the kernel state program can intercept the operation data that changes the wireless network card operating mode to the shared mode in real time to prevent the shared hotspot from opening. Therefore, at this time, the target status reading interface can be called first, and the target status reading interface can be used to determine whether the operating mode of the wireless network card is the shared hotspot mode. When it is, the target state setting interface is called, and the WIFI shared hotspot of the wireless network card is turned off through the target state setting interface, and the operating mode of the wireless network card is changed from the shared hotspot mode to the signal receiving mode, and the timing device turned on at this time is the first When there is a timing device, the first timing device is turned off, or when the timing device turned on at this time is the second timing device, the second timing device is turned off, and the target state reading interface is not called repeatedly. Subsequently, through the kernel state program The preset interception function intercepts the operation data that modifies the operating mode of the wireless network card to prevent the wireless network card shared hotspot mode from being turned on; if it is not, it means that the current shared hotspot of the wireless network card is not turned on. At this time, you can directly set the first timer to start. The device or the second timing device is closed, and the target status reading interface is no longer called repeatedly. The operation data that modifies the wireless network card operating mode is subsequently intercepted through the preset interception function in the kernel state program to prevent the wireless network card from opening the shared hotspot mode.
在本申请实施例中,所述“关闭所述第一计时装置或所述第二计时装置”之后,所述方法还包括:持续监听所述内核态程序的运行数据,并当未监听到所述运行数据的空闲时间大于预设空闲时间时,重新启动所述第一计时装置或所述第二计时装置。In the embodiment of the present application, after "turning off the first timing device or the second timing device", the method further includes: continuously monitoring the running data of the kernel mode program, and when no When the idle time of the running data is greater than the preset idle time, the first timing device or the second timing device is restarted.
在该实施例中,当监听到内核态程序启动指令并将启动的第一计时装置或第二计时装置关闭之后,还可以对内核态程序的运行数据进行持续地监听,以确定内核态程序是否正常运行。当超过预设空闲时间没有监听到内核态程序的运行数据时,说明内核态程序由于某些问题未运行成功,此时可以重新开启计时装置,通过用户态程序定时调用目标状态读取接口和目标状态设置接口的方式对无线网卡的运行模式进行控制。在这里,当关闭的计时装置为第一计时装置时,可以重新开启第一计时装置,当关闭的计时装置为第二计时装置时,可以重新开启第二计时装置。In this embodiment, after the kernel-mode program startup instruction is monitored and the started first timing device or the second timing device is turned off, the running data of the kernel-mode program can also be continuously monitored to determine whether the kernel-mode program normal operation. When the running data of the kernel-mode program is not monitored after the preset idle time, it means that the kernel-mode program failed to run successfully due to some problems. At this time, the timing device can be restarted and the target state reading interface and target are regularly called through the user-mode program. The status setting interface controls the operating mode of the wireless network card. Here, when the closed timing device is the first timing device, the first timing device can be reopened, and when the closed timing device is the second timing device, the second timing device can be reopened.
在本申请实施例中,所述“将所述无线网卡的运行模式更改为信号接收模式”之后,所述方法还包括:记录所述无线网卡运行模式的更改次数,并当所述更改次数大于预设次数阈值时,利用第二预设时间间隔替换所述第一预设时间间隔,其中,所述第一预设时间间隔大于所述第二预设时间间隔。In the embodiment of the present application, after "changing the operating mode of the wireless network card to the signal receiving mode", the method further includes: recording the number of changes in the operating mode of the wireless network card, and when the number of changes is greater than When the number of times threshold is preset, the first preset time interval is replaced with a second preset time interval, wherein the first preset time interval is greater than the second preset time interval.
在该实施例中,每次对无线网卡的运行模式进行更改后,还可以记录运行模式的更改次数,当无线网卡运行模式的更改次数大于预设次数阈值时,说明无线网卡被频频从信号接收模式重新恢复为共享热点模式,极有可能存在危险终端设备,对于内部数据安全是非常不利的,因此,可以将第一预设时间间隔替换为第二预设时间间隔,在这里,第二预设时间间隔小于第一预设时间间隔,通过缩短无线网卡运行模式的检查时间,进一步确保内网环境和内部数据的安全性。In this embodiment, each time the operating mode of the wireless network card is changed, the number of changes in the operating mode can also be recorded. When the number of changes in the operating mode of the wireless network card is greater than the preset threshold, it means that the wireless network card is frequently receiving signals from mode is restored to the shared hotspot mode, it is very likely that there will be dangerous terminal equipment, which is very detrimental to internal data security. Therefore, the first preset time interval can be replaced with the second preset time interval. Here, the second preset time interval Assuming that the time interval is smaller than the first preset time interval, the security of the internal network environment and internal data is further ensured by shortening the check time of the wireless network card operating mode.
为了更好地说明用户态程序运行以及内核态程序运行时无线网卡WIFI共享热点的控制方法,图3分别示出了两种情况下的控制过程。对于用户态程序运行时无线网卡WIFI共享热点的控制方法,首先,当用户态程序运行时,调用目标状态读取接口读取无线网卡的状态,当无线网卡的状态是已开启热点状态时,那么调用目标状态设置接口关闭无线网卡的热点,并将无线网卡运行模式恢复为信号接收模式;当无线网卡的状态不是已开启热点状态时,那么等待下次检查。对于内核态程序运行时无线网卡WIFI共享热点的控制方法,当监听到各类网络配置程序调用icotl函数时,也即监听到ioctl函数的操作数据时,可以调用内核hook函数等预设设备管理函数,并进一步通过内核hook函数等预设设备管理函数确定操作数据是否是修改无线网卡运行模式的操作数据,当是时,对这些操作数据进行拦截,当否时,对这些操作数据进行放行处理。In order to better illustrate the control method of the wireless network card WIFI shared hotspot when the user mode program is running and the kernel mode program is running, Figure 3 shows the control process in the two situations respectively. For the control method of wireless network card WIFI shared hotspot when the user mode program is running, first, when the user mode program is running, call the target status reading interface to read the status of the wireless network card. When the status of the wireless network card is the hotspot status, then Call the target status setting interface to turn off the hotspot of the wireless network card and restore the wireless network card operating mode to the signal receiving mode; when the status of the wireless network card is not the hotspot status, wait for the next check. For the control method of wireless network card WIFI shared hotspot when the kernel mode program is running, when various network configuration programs are monitored to call the icotl function, that is, when the operation data of the ioctl function is monitored, the kernel hook function and other preset device management functions can be called. , and further determine whether the operation data is the operation data that modifies the wireless network card operating mode through the kernel hook function and other preset device management functions. If yes, the operation data is intercepted. If not, the operation data is released.
进一步的,作为图1方法的具体实现,本申请实施例提供了一种WIFI共享热点的控制装置,如图4所示,该装置包括:Further, as a specific implementation of the method in Figure 1, an embodiment of the present application provides a control device for a WIFI shared hotspot, as shown in Figure 4. The device includes:
运行模式确定模块,用于响应于用户态程序启动指令,调用目标状态读取接口,通过所述目标状态读取接口确定无线网卡的运行模式;An operating mode determination module, configured to call a target state reading interface in response to a user mode program startup instruction, and determine the operating mode of the wireless network card through the target state reading interface;
运行模式更改模块,用于当所述无线网卡的运行模式为共享热点模式时,调用目标状态设置接口,通过所述目标状态设置接口将所述无线网卡的运行模式更改为信号接收模式,以关闭所述无线网卡对应的WIFI共享热点。An operating mode changing module, configured to call a target state setting interface when the operating mode of the wireless network card is a shared hotspot mode, and change the operating mode of the wireless network card to a signal receiving mode through the target state setting interface to close the The WIFI shared hotspot corresponding to the wireless network card.
可选地,所述装置还包括:Optionally, the device also includes:
计时模块,用于所述通过所述目标状态读取接口确定无线网卡的运行模式之后,当所述无线网卡的运行模式为所述信号接收模式时,启动第一计时装置,并当所述第一计时装置记录的时间与第一预设时间间隔一致时,返回至所述调用目标状态读取接口的步骤;或者,所述通过所述目标状态设置接口将所述无线网卡的运行模式更改为信号接收模式之后,启动第二计时装置,并当所述第二计时装置记录的时间与所述第一预设时间间隔一致时,返回至所述调用目标状态读取接口的步骤。a timing module, configured to start the first timing device when the operating mode of the wireless network card is the signal receiving mode after determining the operating mode of the wireless network card through the target state reading interface, and when the third When the time recorded by a timing device is consistent with the first preset time interval, return to the step of calling the target status reading interface; or, change the operating mode of the wireless network card to After the signal receiving mode, start the second timing device, and when the time recorded by the second timing device is consistent with the first preset time interval, return to the step of calling the target state reading interface.
可选地,所述装置还包括:Optionally, the device also includes:
监听模块,用于响应于内核态程序启动指令,实时监听预设设备管理函数的操作数据,当监听到所述操作数据时,调用预设拦截函数对所述操作数据进行拦截,并通过所述预设拦截函数对拦截的所述操作数据进行检查;The monitoring module is used to monitor the operation data of the preset device management function in real time in response to the kernel mode program startup instruction. When the operation data is monitored, the preset interception function is called to intercept the operation data, and the operation data is intercepted through the The preset interception function checks the intercepted operation data;
终止模块,用于当所述操作数据为将所述无线网卡的运行模式修改为共享热点模式对应的操作数据时,终止所述操作数据的传输;A termination module configured to terminate the transmission of the operation data when the operation data is operation data corresponding to modifying the operating mode of the wireless network card to the shared hotspot mode;
放行模块,用于当所述操作数据不为所述将无线网卡的运行模式修改为共享热点模式对应的操作数据时,放行所述操作数据。A release module, configured to release the operation data when the operation data is not the operation data corresponding to the modification of the operating mode of the wireless network card to the shared hotspot mode.
可选地,所述装置还包括:Optionally, the device also includes:
所述监听模块,还用于所述响应于用户态程序启动指令之后,实时监听所述内核态程序启动指令,并当监听到所述内核态程序启动指令后,调用所述目标状态读取接口,通过所述目标状态读取接口确定所述无线网卡的运行模式;The monitoring module is also used to monitor the kernel mode program startup instruction in real time after responding to the user mode program startup instruction, and after listening to the kernel mode program startup instruction, call the target state reading interface , determine the operating mode of the wireless network card through the target status reading interface;
所述运行模式确定模块,还用于当所述无线网卡的运行模式为所述共享热点模式时,返回至所述调用目标状态设置接口的步骤;The operating mode determination module is also configured to return to the step of calling the target status setting interface when the operating mode of the wireless network card is the shared hotspot mode;
关闭模块,用于当所述无线网卡的运行模式为所述信号接收模式时,关闭所述第一计时装置或所述第二计时装置。A shutdown module, configured to shut down the first timing device or the second timing device when the operating mode of the wireless network card is the signal receiving mode.
可选地,所述装置还包括:Optionally, the device also includes:
开启模块,用于所述关闭所述第一计时装置或所述第二计时装置之后,持续监听所述内核态程序的运行数据,并当未监听到所述运行数据的空闲时间大于预设空闲时间时,重新启动所述第一计时装置或所述第二计时装置。An opening module, configured to continuously monitor the running data of the kernel state program after the first timing device or the second timing device is turned off, and when the idle time when the running data is not monitored is greater than the preset idle time time, restart the first timing device or the second timing device.
可选地,所述装置还包括:Optionally, the device also includes:
列表获取模块,用于所述当所述无线网卡的运行模式为共享热点模式时之后,确定所述无线网卡WIFI共享热点的接入设备标识,并获取预设权限标识列表;A list acquisition module, configured to determine the access device identification of the wireless network card WIFI shared hotspot when the operating mode of the wireless network card is the shared hotspot mode, and obtain a list of preset permission identifications;
所述运行模式确定模块,还用于当所述预设权限标识列表不包括所述接入设备标识时,执行所述调用目标状态设置接口。The operating mode determination module is also configured to execute the calling target status setting interface when the preset permission identification list does not include the access device identification.
可选地,所述装置还包括:Optionally, the device also includes:
记录模块,用于所述通过所述目标状态设置接口将所述无线网卡的运行模式更改为信号接收模式之后,记录所述无线网卡运行模式的更改次数,并当所述更改次数大于预设次数阈值时,利用第二预设时间间隔替换所述第一预设时间间隔,其中,所述第一预设时间间隔大于所述第二预设时间间隔。A recording module, configured to record the number of changes in the wireless network card's operating mode after the operating mode of the wireless network card is changed to the signal receiving mode through the target state setting interface, and when the number of changes is greater than the preset number When the threshold is reached, the first preset time interval is replaced with a second preset time interval, wherein the first preset time interval is greater than the second preset time interval.
需要说明的是,本申请实施例提供的一种WIFI共享热点的控制装置所涉及各功能单元的其他相应描述,可以参考图1至图2方法中的对应描述,在此不再赘述。It should be noted that for other corresponding descriptions of each functional unit involved in the control device for WIFI shared hotspot provided by the embodiment of the present application, reference can be made to the corresponding descriptions in the methods of Figures 1 to 2, and will not be described again here.
基于上述如图1至图2所示方法,相应的,本申请实施例还提供了一种存储介质,其上存储有计算机程序,该计算机程序被处理器执行时实现上述如图1至图2所示的WIFI共享热点的控制方法。Based on the above methods shown in Figures 1 to 2, correspondingly, embodiments of the present application also provide a storage medium on which a computer program is stored. When the computer program is executed by a processor, the above described Figures 1 to 2 are implemented. The control method of WIFI shared hotspot is shown.
基于这样的理解,本申请的技术方案可以以软件产品的形式体现出来,该软件产品可以存储在一个非易失性存储介质(可以是CD-ROM,U盘,移动硬盘等)中,包括若干指令用以使得一台计算机设备(可以是个人计算机,服务器,或者网络设备等)执行本申请各个实施场景所述的方法。Based on this understanding, the technical solution of this application can be embodied in the form of a software product. The software product can be stored in a non-volatile storage medium (can be a CD-ROM, U disk, mobile hard disk, etc.), including several The instructions are used to cause a computer device (which can be a personal computer, a server, or a network device, etc.) to execute the method described in each implementation scenario of this application.
基于上述如图1至图2所示的方法,以及图4所示的虚拟装置实施例,为了实现上述目的,本申请实施例还提供了一种计算机设备的实体结构图,如图5所示,该计算机设备包括:处理器31、存储器32及存储在存储器32上并可在处理器上运行的计算机程序,其中存储器32和处理器31均设置在总线33上,所述处理器31执行所述程序时实现上述如图1所示的WIFI共享热点的控制方法。Based on the above method shown in Figures 1 to 2 and the virtual device embodiment shown in Figure 4, in order to achieve the above purpose, the embodiment of the present application also provides a physical structure diagram of the computer equipment, as shown in Figure 5 , the computer device includes: a processor 31, a memory 32 and a computer program stored on the memory 32 and executable on the processor, where the memory 32 and the processor 31 are both arranged on the bus 33, and the processor 31 executes all When describing the program, the control method of the WIFI shared hotspot shown in Figure 1 is implemented.
可选地,该计算机设备还可以包括用户接口、网络接口、摄像头、射频(RadioFrequency,RF)电路,传感器、音频电路、WI-FI模块等等。用户接口可以包括显示屏(Display)、输入单元比如键盘(Keyboard)等,可选用户接口还可以包括USB接口、读卡器接口等。网络接口可选的可以包括标准的有线接口、无线接口(如蓝牙接口、WI-FI接口)等。Optionally, the computer device may also include a user interface, a network interface, a camera, a radio frequency (Radio Frequency, RF) circuit, a sensor, an audio circuit, a WI-FI module, and the like. The user interface may include a display screen (Display), an input unit such as a keyboard (Keyboard), etc. The optional user interface may also include a USB interface, a card reader interface, etc. Optional network interfaces may include standard wired interfaces, wireless interfaces (such as Bluetooth interfaces, WI-FI interfaces), etc.
本领域技术人员可以理解,本实施例提供的一种计算机设备结构并不构成对该计算机设备的限定,可以包括更多或更少的部件,或者组合某些部件,或者不同的部件布置。Those skilled in the art can understand that the structure of a computer device provided in this embodiment does not constitute a limitation on the computer device, and may include more or less components, or combine certain components, or arrange different components.
存储介质中还可以包括操作系统、网络通信模块。操作系统是管理和保存计算机设备硬件和软件资源的程序,支持信息处理程序以及其它软件和/或程序的运行。网络通信模块用于实现存储介质内部各组件之间的通信,以及与该实体设备中其它硬件和软件之间通信。The storage medium may also include an operating system and a network communication module. An operating system is a program that manages and saves the hardware and software resources of a computer device and supports the operation of information processing programs and other software and/or programs. The network communication module is used to implement communication between components within the storage medium, as well as communication with other hardware and software in the physical device.
通过以上的实施方式的描述,本领域的技术人员可以清楚地了解到本申请可以借助软件加必要的通用硬件平台的方式来实现,也可以通过硬件实现。首先,当接收到用户态程序启动指令时,可以响应于用户态程序启动指令,并对目标状态读取接口进行调用。接着,可以通过调用的目标状态读取接口对当前无线网卡的运行模式进行确定。当通过目标状态读取接口确定无线网卡的运行模式是共享热点模式时,可以进一步调用目标状态设置接口,通过目标状态设置接口对无线网卡的WIFI共享热点进行关闭,并将无线网卡的运行模式从共享热点模式更改为信号接收模式。本申请通过调用目标状态读取接口确定无线网卡的运行模式,并通过调用目标状态设置接口关闭无线网卡的共享热点,能够有效避免未授权终端设备通过WIFI共享热点接入内网,大大提升了内网环境和内部数据的安全性。Through the above description of the embodiments, those skilled in the art can clearly understand that the present application can be implemented by means of software plus a necessary general hardware platform, or can also be implemented by hardware. First, when a user-mode program startup instruction is received, the user-mode program startup instruction can be responded to and the target state reading interface is called. Then, the operating mode of the current wireless network card can be determined through the called target status reading interface. When it is determined through the target status reading interface that the operating mode of the wireless network card is the shared hotspot mode, the target status setting interface can be further called to turn off the WIFI sharing hotspot of the wireless network card through the target status setting interface, and change the operating mode of the wireless network card from Shared hotspot mode changes to signal receiving mode. This application determines the operating mode of the wireless network card by calling the target status reading interface, and turns off the shared hotspot of the wireless network card by calling the target status setting interface, which can effectively prevent unauthorized terminal devices from accessing the intranet through WIFI shared hotspots, greatly improving the internal network. network environment and internal data security.
本领域技术人员可以理解附图只是一个优选实施场景的示意图,附图中的模块或流程并不一定是实施本申请所必须的。本领域技术人员可以理解实施场景中的装置中的模块可以按照实施场景描述进行分布于实施场景的装置中,也可以进行相应变化位于不同于本实施场景的一个或多个装置中。上述实施场景的模块可以合并为一个模块,也可以进一步拆分成多个子模块。Those skilled in the art can understand that the accompanying drawing is only a schematic diagram of a preferred implementation scenario, and the modules or processes in the accompanying drawing are not necessarily necessary for implementing the present application. Those skilled in the art can understand that the modules in the devices in the implementation scenario can be distributed in the devices in the implementation scenario according to the description of the implementation scenario, or can be correspondingly changed and located in one or more devices different from the implementation scenario. The modules of the above implementation scenarios can be combined into one module or further split into multiple sub-modules.
上述本申请序号仅仅为了描述,不代表实施场景的优劣。以上公开的仅为本申请的几个具体实施场景,但是,本申请并非局限于此,任何本领域的技术人员能思之的变化都应落入本申请的保护范围。The above serial numbers of this application are only for description and do not represent the advantages and disadvantages of the implementation scenarios. What is disclosed above are only a few specific implementation scenarios of the present application. However, the present application is not limited thereto. Any changes that can be thought of by those skilled in the art should fall within the protection scope of the present application.
| Application Number | Priority Date | Filing Date | Title |
|---|---|---|---|
| CN202111536696.6ACN114302399B (en) | 2021-12-15 | 2021-12-15 | Control method and device for WIFI sharing hot spot and storage medium |
| Application Number | Priority Date | Filing Date | Title |
|---|---|---|---|
| CN202111536696.6ACN114302399B (en) | 2021-12-15 | 2021-12-15 | Control method and device for WIFI sharing hot spot and storage medium |
| Publication Number | Publication Date |
|---|---|
| CN114302399A CN114302399A (en) | 2022-04-08 |
| CN114302399Btrue CN114302399B (en) | 2023-12-29 |
| Application Number | Title | Priority Date | Filing Date |
|---|---|---|---|
| CN202111536696.6AActiveCN114302399B (en) | 2021-12-15 | 2021-12-15 | Control method and device for WIFI sharing hot spot and storage medium |
| Country | Link |
|---|---|
| CN (1) | CN114302399B (en) |
| 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 | 广东欧珀移动通信有限公司 | A method and terminal equipment for establishing a hotspot |
| 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 |
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| US10194382B2 (en)* | 2016-12-27 | 2019-01-29 | Bandwidthx Inc. | Auto-discovery of amenities |
| US20180332525A1 (en)* | 2017-05-09 | 2018-11-15 | Coronet Cyber Security Ltd. | Secure hotspot setup |
| 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 | 广东欧珀移动通信有限公司 | A method and terminal equipment for establishing a hotspot |
| 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 |
| Title |
|---|
| WiFi无线网络的安全与防范措施探讨;谭悦平;;信息与电脑(理论版)(第09期);全文* |
| Publication number | Publication date |
|---|---|
| CN114302399A (en) | 2022-04-08 |
| Publication | Publication Date | Title |
|---|---|---|
| TWI475388B (en) | Protection agents and privilege modes | |
| CN104318182B (en) | A kind of intelligent terminal shielding system and method extended based on processor security | |
| 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 | |
| US9509697B1 (en) | Systems and methods for authorizing attempts to access shared libraries | |
| US10769275B2 (en) | Systems and methods for monitoring bait to protect users from security threats | |
| CN103116716A (en) | Immediate access conferring method aiming at low interference of mobile platform | |
| US10803167B1 (en) | Systems and methods for executing application launchers | |
| US10547531B2 (en) | Systems and methods for enforcing data loss prevention policies | |
| EP3513353B1 (en) | Systems and methods for detecting malicious processes on computing devices | |
| US11914710B2 (en) | System and method for application tamper discovery | |
| CN115758425A (en) | Security access control method and device and readable storage medium | |
| WO2019037521A1 (en) | Security detection method, device, system, and server | |
| CN107343279A (en) | Network connection method, device, terminal equipment and storage medium | |
| CN113836529A (en) | Process detection method, device, storage medium, and computer device | |
| US11366903B1 (en) | Systems and methods to mitigate stalkerware by rendering it useless | |
| CN115442083B (en) | Device access method, data exchange method, device and storage medium | |
| WO2025077469A1 (en) | Security scanning method for cloud computing, related device and storage medium | |
| CN114302399B (en) | Control method and device for WIFI sharing hot spot and storage medium | |
| US11146537B1 (en) | Systems and methods for protecting geolocation information | |
| US10289839B1 (en) | Systems and methods for preventing unauthorized access to computing devices implementing computer accessibility services | |
| CN109784041B (en) | Event processing method and device, storage medium and electronic device | |
| CN117827765A (en) | File operation control method, device, equipment and medium | |
| CN114826785B (en) | Dynamic protection method, system-on-chip, electronic device and medium | |
| US11122040B1 (en) | Systems and methods for fingerprinting devices |
| 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 | ||
| CB02 | Change of applicant information | 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. Applicant before:LEGENDSEC INFORMATION TECHNOLOGY (BEIJING) Inc. | |
| GR01 | Patent grant | ||
| GR01 | Patent grant |