请问有没有这种软件.可以把机器通过网络传输的数据里面有关ip和mac的信息任意修改.然后再发送出去

解决方案 »

  1.   

    自己构造包,可以下载winpcap3.1的代码看看,里面有。
      

  2.   

    有没有现成的程序?
    情况是这样,代理服务器ccproxy要验证ip和mac,由于用的是交换机,ip无法修改.我想能否用软件欺骗cproxy?
      

  3.   

    环境是win2000.我想上网,找到一个代理服务器是ccproxy,要验证ip和mac,由于局域网用的是交换机,ip无法修改.我想能否用软件修改数据包里面的ip和mac,从而欺骗cproxy,达到上网目的
      

  4.   

    我会更改本机IP地址
    至于MAC在注册表里更改就行
    还有可以在网卡属性里直接盖
    更改IP的代码:
    BOOL RegSetIP(LPCTSTR lpszAdapterName, int nIndex, LPCTSTR pIPAddress, LPCTSTR pNetMask, LPCTSTR pNetGate)
    {
    HKEY hKey;
    CString strKeyName = "SYSTEM\\CurrentControlSet\\Services\\Tcpip\\Parameters\\Interfaces\\";
    strKeyName += lpszAdapterName;
    if(RegOpenKeyEx(HKEY_LOCAL_MACHINE,strKeyName.GetString(), 0, KEY_WRITE, &hKey) != ERROR_SUCCESS)
    {
    return FALSE;
    }
    char mszIPAddress[100];
    char mszNetMask[100];
    char mszNetGate[100]; strncpy(mszIPAddress, pIPAddress, 98);
    strncpy(mszNetMask, pNetMask, 98);
    strncpy(mszNetGate, pNetGate, 98); int nIP, nMask, nGate; nIP = (int)strlen(mszIPAddress);
    nMask = (int)strlen(mszNetMask);
    nGate = (int)strlen(mszNetGate); *(mszIPAddress + nIP + 1) = 0x00;
    nIP += 2; *(mszNetMask + nMask + 1) = 0x00;
    nMask += 2; *(mszNetGate + nGate + 1) = 0x00;
    nGate += 2;

    RegSetValueEx(hKey, "IPAddress", 0, REG_MULTI_SZ, (unsigned char*)mszIPAddress, nIP);
    RegSetValueEx(hKey, "SubnetMask", 0, REG_MULTI_SZ, (unsigned char*)mszNetMask, nMask);
    RegSetValueEx(hKey, "DefaultGateway", 0, REG_MULTI_SZ, (unsigned char*)mszNetGate, nGate); RegCloseKey(hKey); return TRUE;
    }BOOL NotifyIPChange(LPCTSTR lpszAdapterName, int nIndex, LPCTSTR pIPAddress, LPCTSTR pNetMask)
    {
    BOOL bResult = FALSE;
    HINSTANCE hDhcpDll;
    DHCPNOTIFYPROC pDhcpNotifyProc;
    WCHAR wcAdapterName[256];

    MultiByteToWideChar(CP_ACP, 0, lpszAdapterName, -1, wcAdapterName,256); if((hDhcpDll = LoadLibrary("dhcpcsvc")) == NULL)
    {
    return FALSE;
    } if((pDhcpNotifyProc = (DHCPNOTIFYPROC)GetProcAddress(hDhcpDll, "DhcpNotifyConfigChange")) != NULL)
    {
    if((pDhcpNotifyProc)(NULL, wcAdapterName, TRUE, nIndex, inet_addr(pIPAddress), inet_addr(pNetMask), 0) == ERROR_SUCCESS)
    {
    bResult = TRUE;
    }
    } FreeLibrary(hDhcpDll);
    return bResult;
    }
    BOOL SetIP(LPCTSTR lpszAdapterName, int nIndex, LPCTSTR pIPAddress, LPCTSTR pNetMask, LPCTSTR pNetGate)
    {
    if(!RegSetIP(lpszAdapterName, nIndex, pIPAddress, pNetMask, pNetGate))
    {
    return FALSE;
    }

    if(!NotifyIPChange(lpszAdapterName, nIndex, pIPAddress, pNetMask))
    {
    return FALSE;
    } return TRUE;
    } 第三个函数是最终调用函数