• 大小: 22KB
    文件类型: .rar
    金币: 1
    下载: 0 次
    发布日期: 2021-05-18
  • 语言: 其他
  • 标签: wifi探针  openwrt  

资源简介

代码在openwrt系统值,可直接编译运行。http请求时,将地址设置为自己的网址

资源截图

代码片段和文件信息

#include “device_stat.h“
#include 
#include 
#include 
void Packet_Info_Init(Packet_Info *Info)
{
    memset(Info 0 sizeof(Packet_Info));
}
void List_Init(List *pList)
{
    pList->Header = 0;
    pList->Num = 0;
}
void List_Destory(List *pList)
{
    Node *pCurrent = pList->Header;
    while (pCurrent)
    {
        Node *Temp = pCurrent;
        pCurrent = pCurrent->Next;
        free(Temp);
    }
}
void List_Node_Init(Node *pNode)
{
    pNode->Status = 1;
    pNode->Next = 0;
    pNode->Key.MAC_STORE = 0;
    pNode->RSSI = 0;
    pNode->RSSI_Counter = 0;
    StringArray_Init(&(pNode->ESSID));
}
void Node_WriteInfo(Node *pNode Packet_Info *Info)
{
    if (Info->RSSI >= 0)
    {
        return;
    }
    pNode->Phy_Freq = Info->Phy_Freq;
    pNode->PowerMange = Info->PowerMange;
    pNode->Key.MAC_STORE = Info->Source_Mac.MAC_STORE;
    pNode->Target_Station_Mac.MAC_STORE = Info->Target_Station_Mac.MAC_STORE;
    if (pNode->RSSI_Counter > 65536)
    {
        pNode->RSSI_Counter = 1;
        pNode->RSSI = Info->RSSI;
    }
    else
    {
        pNode->RSSI += Info->RSSI;
        pNode->RSSI_Counter++;
    }
    pNode->Status = 1;
    StringArray_AddString(&(pNode->ESSID) Info->ESSID);
}
void List_Add(List *pList Packet_Info *Info)
{
    MAC_Def sMAC;
    memcpy(sMAC.MAC_SLICE Info->Source_Mac.MAC_SLICE 6);
    Node *pCurrent = pList->Header;
    if (pList->Header == 0)
    {
        Node *pNode = (Node *)malloc(sizeof(Node));
        List_Node_Init(pNode);
        Node_WriteInfo(pNode Info);
        pList->Header = pNode;
        pList->Num++;
    }
    else
    {
        if (pCurrent->Key.MAC_SLICE[0] == sMAC.MAC_SLICE[0] && pCurrent->Key.MAC_SLICE[1] == sMAC.MAC_SLICE[1] && pCurrent->Key.MAC_SLICE[2] == sMAC.MAC_SLICE[2] && pCurrent->Key.MAC_SLICE[3] == sMAC.MAC_SLICE[3] && pCurrent->Key.MAC_SLICE[4] == sMAC.MAC_SLICE[4] && pCurrent->Key.MAC_SLICE[5] == sMAC.MAC_SLICE[5])
        {
            Node_WriteInfo(pCurrent Info);
        }
        else
        {
            while (pCurrent->Next)
            {
                if (pCurrent->Key.MAC_SLICE[0] == sMAC.MAC_SLICE[0] && pCurrent->Key.MAC_SLICE[1] == sMAC.MAC_SLICE[1] && pCurrent->Key.MAC_SLICE[2] == sMAC.MAC_SLICE[2] && pCurrent->Key.MAC_SLICE[3] == sMAC.MAC_SLICE[3] && pCurrent->Key.MAC_SLICE[4] == sMAC.MAC_SLICE[4] && pCurrent->Key.MAC_SLICE[5] == sMAC.MAC_SLICE[5])
                {
                    Node_WriteInfo(pCurrent Info);
                    break;
                }
                pCurrent = pCurrent->Next;
            }
            if (!(pCurrent->Next))
            {
                if (pCurrent->Key.MAC_SLICE[0] == sMAC.MAC_SLICE[0] && pCurrent->Key.MAC_SLICE[1] == sMAC.MAC_SLICE[1] && pCurrent->Key.MAC_SLICE[2] == sMAC.MAC_SLICE[2] && pCurrent->Key.MAC_SLICE[3] == sMAC.MAC_SLICE[3] && pCurrent->Key.MAC_SLICE[4] == sMAC.MAC_SLICE[4] && pCurrent->Key.MAC_SLICE[5] == sMAC.MAC_SLICE[5])
                {
                    Node_WriteI

 属性            大小     日期    时间   名称
----------- ---------  ---------- -----  ----

     文件      11357  2018-05-26 23:53  WiFiProbe-master\WiFiProbe-master\LICENSE

     文件        609  2018-05-26 23:53  WiFiProbe-master\WiFiProbe-master\Makefile

     文件       1393  2018-05-26 23:53  WiFiProbe-master\WiFiProbe-master\README.md

     文件       7207  2018-07-07 10:12  WiFiProbe-master\WiFiProbe-master\src\device_stat.c

     文件        864  2018-05-26 23:53  WiFiProbe-master\WiFiProbe-master\src\device_stat.h

     文件       6495  2018-05-26 23:53  WiFiProbe-master\WiFiProbe-master\src\function.c

     文件        897  2018-05-26 23:53  WiFiProbe-master\WiFiProbe-master\src\function.h

     文件        604  2018-05-26 23:53  WiFiProbe-master\WiFiProbe-master\src\Makefile

     文件        458  2018-05-26 23:53  WiFiProbe-master\WiFiProbe-master\src\platform.h

     文件       1000  2018-05-26 23:53  WiFiProbe-master\WiFiProbe-master\src\protocol_pack.c

     文件        565  2018-05-26 23:53  WiFiProbe-master\WiFiProbe-master\src\protocol_pack.h

     文件       1218  2018-05-26 23:53  WiFiProbe-master\WiFiProbe-master\src\Queue.c

     文件        294  2018-05-26 23:53  WiFiProbe-master\WiFiProbe-master\src\Queue.h

     文件      12560  2018-05-26 23:53  WiFiProbe-master\WiFiProbe-master\src\radiotap.c

     文件       6511  2018-05-26 23:53  WiFiProbe-master\WiFiProbe-master\src\radiotap.h

     文件       2999  2018-05-26 23:53  WiFiProbe-master\WiFiProbe-master\src\radiotap_iter.h

     文件       3690  2018-05-26 23:53  WiFiProbe-master\WiFiProbe-master\src\test.c

     文件        168  2018-05-26 23:53  WiFiProbe-master\WiFiProbe-master\src\typedef.h

     文件       1379  2018-05-26 23:53  WiFiProbe-master\WiFiProbe-master\src\VarArray.c

     文件        393  2018-05-26 23:53  WiFiProbe-master\WiFiProbe-master\src\VarArray.h

     目录          0  2018-05-26 23:53  WiFiProbe-master\WiFiProbe-master\src

     目录          0  2018-05-26 23:53  WiFiProbe-master\WiFiProbe-master

     目录          0  2018-07-05 15:09  WiFiProbe-master

----------- ---------  ---------- -----  ----

                60661                    23


评论

共有 条评论