CN110267299A - The MAC Address catching method of WIFI terminal - Google Patents

The MAC Address catching method of WIFI terminal Download PDF

Info

Publication number
CN110267299A
CN110267299A CN201910597960.3A CN201910597960A CN110267299A CN 110267299 A CN110267299 A CN 110267299A CN 201910597960 A CN201910597960 A CN 201910597960A CN 110267299 A CN110267299 A CN 110267299A
Authority
CN
China
Prior art keywords
mac
mac address
wifi terminal
bit
address
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
CN201910597960.3A
Other languages
Chinese (zh)
Other versions
CN110267299B (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.)
Nanjing Mao Yu Tong Software Technology Co Ltd
Original Assignee
Nanjing Mao Yu Tong Software Technology Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Nanjing Mao Yu Tong Software Technology Co Ltd filed Critical Nanjing Mao Yu Tong Software Technology Co Ltd
Priority to CN201910597960.3A priority Critical patent/CN110267299B/en
Publication of CN110267299A publication Critical patent/CN110267299A/en
Application granted granted Critical
Publication of CN110267299B publication Critical patent/CN110267299B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04WWIRELESS COMMUNICATION NETWORKS
    • H04W24/00Supervisory, monitoring or testing arrangements
    • H04W24/08Testing, supervising or monitoring using real traffic
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L2101/00Indexing scheme associated with group H04L61/00
    • H04L2101/60Types of network addresses
    • H04L2101/618Details of network addresses
    • H04L2101/622Layer-2 addresses, e.g. medium access control [MAC] addresses
    • YGENERAL TAGGING OF NEW TECHNOLOGICAL DEVELOPMENTS; GENERAL TAGGING OF CROSS-SECTIONAL TECHNOLOGIES SPANNING OVER SEVERAL SECTIONS OF THE IPC; TECHNICAL SUBJECTS COVERED BY FORMER USPC CROSS-REFERENCE ART COLLECTIONS [XRACs] AND DIGESTS
    • Y02TECHNOLOGIES OR APPLICATIONS FOR MITIGATION OR ADAPTATION AGAINST CLIMATE CHANGE
    • Y02DCLIMATE CHANGE MITIGATION TECHNOLOGIES IN INFORMATION AND COMMUNICATION TECHNOLOGIES [ICT], I.E. INFORMATION AND COMMUNICATION TECHNOLOGIES AIMING AT THE REDUCTION OF THEIR OWN ENERGY USE
    • Y02D30/00Reducing energy consumption in communication networks
    • Y02D30/70Reducing energy consumption in communication networks in wireless communication networks

Landscapes

  • Engineering & Computer Science (AREA)
  • Computer Networks & Wireless Communication (AREA)
  • Signal Processing (AREA)
  • Mobile Radio Communication Systems (AREA)

Abstract

The invention discloses a kind of MAC Address catching methods of WIFI terminal, including six steps, after WIFI terminal is connected to AP, wireless device sends NULL frame to WIFI terminal, WIFI terminal will reply ACK frame in this way, so as to increase the amount of communication data between wireless device and WIFI terminal, convenient for the state change of real-time tracking WIFI terminal, especially change in location, to realize the efficient capture of WIFI terminal MAC Address.

Description

The MAC Address catching method of WIFI terminal
Technical field
The present invention relates to MAC Address catching methods, more particularly to the MAC Address catching method of WIFI terminal.
Background technique
With the rapid development of Internet, the city WIFI hot spot and self-built wireless network are widely available in each big city, No matter have in public place (such as hotel, sales field and other amusement and leisure places) or colleges and universities, residential area a large amount of wireless WIFI is for terminal access.With the development of wireless WIFI network, need of the national security management unit to the supervision of WIFI network Ask also growing.The address MAC (Media Access Control), or be MAC Address, hardware address, it is for identifying The unique identities of the network equipment can be used for adopting WIFI wireless networking terminal by capturing the MAC Address of WIFI terminal Collect, position and deploys to ensure effective monitoring and control of illegal activities.
It is in the prior art that application No. is a kind of 201310698106.9, entitled " Wireless terminal-MAC address acquisitions The application for a patent for invention of method and device " discloses following technical scheme: setting monitor mode for wireless network card and carries out The MAC Address of WIFI terminal captures, and wireless network card works in pure Passive Mode, the communication behavior for the WIFI terminal that places one's entire reliance upon, This scheme is only applicable to WIFI terminal connection AP and there are the situation of certain amount of communication data, the feelings few for amount of communication data It just cannot achieve effective MAC Address capture under condition.
Summary of the invention
Goal of the invention: the object of the present invention is to provide a kind of MAC Address catching methods of WIFI terminal, are able to solve existing Present in technology " have connected AP WIFI terminal amount of communication data it is few in the case where cannot achieve effective MAC Address capture " The technical issues of.
Technical solution: the MAC Address catching method of WIFI terminal of the present invention, comprising the following steps:
S1: it sets wireless device to work in Passive Mode;
S2: exchange-column shift working channel;
S3: it judges whether there is WIFI terminal and is connected to AP: if so, then carrying out step S4;Otherwise, return step S2;
S4: wireless device is switched to and works in aggressive mode and no longer switch operating channel;
S5: source MAC is arranged for NULL frame in construction NULL frame, and the target MAC (Media Access Control) address of NULL frame is the WIFI terminal MAC Address, and with the corresponding relationship between the source MAC of list records NULL frame and the MAC Address of WIFI terminal, then Periodically NULL frame is sent to WIFI terminal;
S6: if wireless device receives ACK frame, with passing through the purpose MAC of the list lookup ACK frame described in step S5 The MAC Address of WIFI terminal corresponding to location.
Further, in the step S3, by checking the frame listened to, to judge whether there is WIFI terminal company AP is met.
Further, in the step S5, if there is multiple WIFI terminals have been all connected with AP, then it is whole that different WIFI will be sent to The source MAC of the NULL frame at end is arranged to different.
Further, in the step S5, the source MAC of NULL frame is obtained by formula (1):
The source MAC of NULL frame=starting MAC Address+k (1)
In formula (1), starting MAC Address is hexadecimal address, and k is HASH value, is calculated by formula (2);
K=md5sum (MAC)/16777216 (2)
In formula (2), MAC is the MAC Address for having connected the WIFI terminal of AP.
Further, further include the steps that constructing hexadecimal starting MAC Address, and the step of building array;It is described The step of constructing array specifically: construct the array array that length is 16777216, each element in array includes bit With the two variables of mac, wherein bit is indicated whether using flag bit, and bit=0 indicates that flag bit is not used, and bit=1 is indicated Using flag bit, mac indicates hexadecimal MAC Address, and the initial value of bit and mac are 0;
In the step S4, wireless device is switched to and is worked in after aggressive mode and no longer switch operating channel, Pass through the value that k=md5sum (MAC)/16777216 calculates k also for the WIFI terminal for having connected AP, MAC is to have connected AP WIFI terminal MAC Address, then inquire bit value corresponding to k-th of element in the array: if bit value be 0, The MAC Address for having connected the WIFI terminal of AP is assigned in array mac value corresponding to k-th of element, and MAC Address will be originated Source MAC of+the k as NULL frame;If bit value is 1, compare the MAC Address and array of the WIFI terminal for having connected AP In mac value corresponding to k-th of element it is whether identical, will if the same originate MAC Address+k and make the source MAC of NULL frame Location, the return step S2 if not identical.
Further, the starting MAC Address is 10-11-12-00-00-00.
The utility model has the advantages that the invention discloses a kind of MAC Address catching methods of WIFI terminal, AP is connected in WIFI terminal Later, send NULL frame to WIFI terminal, such WIFI terminal will reply ACK frame, so as to increase wireless device with Amount of communication data between WIFI terminal, convenient for the state change of real-time tracking WIFI terminal, especially change in location, so as to Enough realize the efficient capture of WIFI terminal MAC Address.
Detailed description of the invention
Fig. 1 is the flow chart of method in the specific embodiment of the invention.
Specific embodiment
Present embodiment discloses a kind of MAC Address catching method of WIFI terminal, as shown in Figure 1, including following Step:
S1: it sets wireless device to work in Passive Mode;
S2: exchange-column shift working channel, such as switching cycle can be set as 300 milliseconds;
S3: it judges whether there is WIFI terminal and is connected to AP: if so, then carrying out step S4;Otherwise, return step S2;
S4: wireless device is switched to and works in aggressive mode and no longer switch operating channel;
S5: source MAC is arranged for NULL frame in construction NULL frame, and the target MAC (Media Access Control) address of NULL frame is the WIFI terminal MAC Address, and with the corresponding relationship between the source MAC of list records NULL frame and the MAC Address of WIFI terminal, then Periodically NULL frame is sent to WIFI terminal;Such as the period for sending NULL frame can be set as 1 second;
S6: if wireless device receives ACK frame, with passing through the purpose MAC of the list lookup ACK frame described in step S5 The MAC Address of WIFI terminal corresponding to location.
In step S3, by checking the frame listened to, so that judging whether there is WIFI terminal is connected to AP.
In step S5, if there is multiple WIFI terminals have been all connected with AP, then it will be sent to the NULL frame of different WIFI terminals Source MAC be arranged to it is different.
In step S5, the source MAC of NULL frame is obtained by formula (1):
The source MAC of NULL frame=starting MAC Address+k (1)
In formula (1), starting MAC Address is hexadecimal address, such as can be 10-11-12-00-00-00, starting MAC Address can be effective OUI (Organizationally uni que identifier) range in IEEE tissue publication Except any one address;K is HASH value, is calculated by formula (2);
K=md5sum (MAC)/16777216 (2)
In formula (2), MAC is the MAC Address for having connected the WIFI terminal of AP.
This method can also include the steps that the hexadecimal starting MAC Address of construction, and the step of building array.Structure The step of the step of making hexadecimal starting MAC Address and building array can in any step before step S 4 into Row.The step of constructing array specifically: construct the array array that length is 16777216, each element in array includes The two variables of bit and mac, wherein bit indicates whether that, using flag bit, bit=0 indicates that flag bit, bit=1 table is not used Show and used flag bit, mac indicates hexadecimal MAC Address, and the initial value of bit and mac are 0.
In step S4, wireless device is switched to and is worked in after aggressive mode and no longer switch operating channel, it is also right Pass through the value that k=md5sum (MAC)/16777216 calculates k in the WIFI terminal for having connected AP, MAC is to have connected AP's Then the MAC Address of WIFI terminal inquires bit value corresponding to k-th of element in the array:, will if bit value is 0 The MAC Address for having connected the WIFI terminal of AP is assigned in array mac value corresponding to k-th of element, and will originate MAC Address+k Source MAC as NULL frame;If bit value is 1, in the MAC Address and array for comparing the WIFI terminal for having connected AP Whether mac value corresponding to k-th of element is identical, and starting MAC Address+k is if the same made to the source MAC of NULL frame, The return step S2 if not identical.

Claims (6)

  1. The MAC Address catching method of 1.WIFI terminal, it is characterised in that: the following steps are included:
    S1: it sets wireless device to work in Passive Mode;
    S2: exchange-column shift working channel;
    S3: it judges whether there is WIFI terminal and is connected to AP: if so, then carrying out step S4;Otherwise, return step S2;
    S4: wireless device is switched to and works in aggressive mode and no longer switch operating channel;
    S5: source MAC is arranged for NULL frame in construction NULL frame, and the target MAC (Media Access Control) address of NULL frame is the WIFI terminal MAC Address, and with the corresponding relationship between the source MAC of list records NULL frame and the MAC Address of WIFI terminal, it is then fixed Phase sends NULL frame to WIFI terminal;
    S6: if wireless device receives ACK frame, pass through the target MAC (Media Access Control) address institute of the list lookup ACK frame described in step S5 The MAC Address of corresponding WIFI terminal.
  2. 2. the MAC Address catching method of WIFI terminal according to claim 1, it is characterised in that: in the step S3, lead to It crosses and the frame listened to is checked, so that judging whether there is WIFI terminal is connected to AP.
  3. 3. the MAC Address catching method of WIFI terminal according to claim 1, it is characterised in that: in the step S5, such as Fruit has multiple WIFI terminals to be all connected with AP, then is arranged to the source MAC for the NULL frame for being sent to different WIFI terminals not With.
  4. 4. the MAC Address catching method of WIFI terminal according to claim 1, it is characterised in that: in the step S5, The source MAC of NULL frame is obtained by formula (1):
    The source MAC of NULL frame=starting MAC Address+k (1)
    In formula (1), starting MAC Address is hexadecimal address, and k is HASH value, is calculated by formula (2);
    K=md5sum (MAC)/16777216 (2)
    In formula (2), MAC is the MAC Address for having connected the WIFI terminal of AP.
  5. 5. the MAC Address catching method of WIFI terminal according to claim 1, it is characterised in that: further include construction 16 The step of starting MAC Address of system, and the step of building array;The step of building array specifically: building length For 16777216 array array, each element in array includes the two variables of bit and mac, and wherein bit expression is No to use flag bit, bit=0 indicates that flag bit is not used, and bit=1 expression has used flag bit, and mac indicates hexadecimal The initial value of MAC Address, bit and mac are 0;
    In the step S4, wireless device is switched to and is worked in after aggressive mode and no longer switch operating channel, it is also right Pass through the value that k=md5sum (MAC)/16777216 calculates k in the WIFI terminal for having connected AP, MAC is to have connected AP's Then the MAC Address of WIFI terminal inquires bit value corresponding to k-th of element in the array:, will if bit value is 0 The MAC Address for having connected the WIFI terminal of AP is assigned in array mac value corresponding to k-th of element, and will originate MAC Address+k Source MAC as NULL frame;If bit value is 1, in the MAC Address and array for comparing the WIFI terminal for having connected AP Whether mac value corresponding to k-th of element is identical, and starting MAC Address+k is if the same made to the source MAC of NULL frame, The return step S2 if not identical.
  6. 6. the MAC Address catching method of WIFI terminal according to claim 4 or 5, it is characterised in that: the starting MAC Address is 10-11-12-00-00-00.
CN201910597960.3A 2019-07-04 2019-07-04 MAC (media Access control) address capturing method of WIFI (Wireless Fidelity) terminal Active CN110267299B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201910597960.3A CN110267299B (en) 2019-07-04 2019-07-04 MAC (media Access control) address capturing method of WIFI (Wireless Fidelity) terminal

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201910597960.3A CN110267299B (en) 2019-07-04 2019-07-04 MAC (media Access control) address capturing method of WIFI (Wireless Fidelity) terminal

Publications (2)

Publication Number Publication Date
CN110267299A true CN110267299A (en) 2019-09-20
CN110267299B CN110267299B (en) 2022-08-09

Family

ID=67924337

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201910597960.3A Active CN110267299B (en) 2019-07-04 2019-07-04 MAC (media Access control) address capturing method of WIFI (Wireless Fidelity) terminal

Country Status (1)

Country Link
CN (1) CN110267299B (en)

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN103259878A (en) * 2013-04-18 2013-08-21 山东省计算中心 MAC address capture method for specific target user of wireless local area network
US20160374093A1 (en) * 2015-06-22 2016-12-22 Qualcomm Incorporated Methods and apparatus for requesting buffer status reports for implementing multiple user uplink medium access control protocols in a wireless network
US20180077111A1 (en) * 2016-09-13 2018-03-15 Cisco Technology, Inc. Dynamic Media Access Control Address Allocation and Leasing for Wireless Network
US20200137674A1 (en) * 2017-04-26 2020-04-30 Sony Corporation Wireless terminal, communication system, and wireless terminal control method

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN103259878A (en) * 2013-04-18 2013-08-21 山东省计算中心 MAC address capture method for specific target user of wireless local area network
US20160374093A1 (en) * 2015-06-22 2016-12-22 Qualcomm Incorporated Methods and apparatus for requesting buffer status reports for implementing multiple user uplink medium access control protocols in a wireless network
US20180077111A1 (en) * 2016-09-13 2018-03-15 Cisco Technology, Inc. Dynamic Media Access Control Address Allocation and Leasing for Wireless Network
US20200137674A1 (en) * 2017-04-26 2020-04-30 Sony Corporation Wireless terminal, communication system, and wireless terminal control method

Also Published As

Publication number Publication date
CN110267299B (en) 2022-08-09

Similar Documents

Publication Publication Date Title
CN102202302B (en) The method of network is added in conjunction with network and Wireless Sensor Network Terminal
CN102202298B (en) The method of network is added in conjunction with network and Wireless Sensor Network Terminal
CN105897860A (en) Network device and information processing method
US9439094B2 (en) Monitoring probe for identifying a user plane identifier of a user device
CN103188766B (en) A kind of method and access controller unifying configuration WAP (wireless access point)
CN110249683A (en) Method and apparatus for wave beam fault recovery
CN104333862B (en) A kind of WLAN fine granularity management-control method
WO2011088697A1 (en) Method and system for acquiring mobility related information of equipment and optimizing configuration
NO20053359D0 (en) Early testing of coverage and access to a mobile network.
CN102572015B (en) Implementation method for dynamic IPv6 address configuration of mobile ad hoc network
CN104092593B (en) Automatic access system and access method of intelligent terminal for automatically identifying internal and external networks based on internal and external network identifier
CN101719692A (en) Method for acquiring network data and analyzing network performance for digital substation
CN105940743A (en) D2D operation method performed by terminal in wireless communication system and terminal using same
CN103095489A (en) Management method for network device
CN107769986B (en) Network performance test system, extension system and test method
CN103944756A (en) Method for controlling wireless access point equipment based on OpenFlow protocol
JP7213339B2 (en) Data transmission method and device
CN108307431A (en) A kind of method of paging, network side equipment and terminal
CN108111616A (en) A kind of energy transmission method between Internet of Things interior joint
CN105072605A (en) Terminal roaming method in independent AP (Access Point) mode and AP
CN107483084B (en) Broadband carrier networking method, site and system
Leonardi et al. Simulative assessments of the IEEE 802.15. 4 CSMA/CA with priority channel access in structural health monitoring scenarios
CN110267299A (en) The MAC Address catching method of WIFI terminal
Wang et al. Research on agricultural environment information collection system based on lora
CN104349338B (en) A kind of method and system being monitored to sensor access gateway

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
GR01 Patent grant
GR01 Patent grant