From 9a61ff1961b25dda3a47eccc7972e113d6e334c2 Mon Sep 17 00:00:00 2001 From: lujiang Date: Mon, 12 May 2025 14:37:22 +0800 Subject: [PATCH] =?UTF-8?q?cmpp=E4=B8=8Ecmpp3=EF=BC=8C=E5=9C=A8cmpp=20head?= =?UTF-8?q?=E4=B8=AD=E7=9A=84ID=EF=BC=8C=E5=A6=82=E6=9E=9C=E4=B8=BA?= =?UTF-8?q?=E4=B8=AD=E8=BD=AC=E8=AF=B7=E6=B1=82=EF=BC=88=E7=99=BB=E5=BD=95?= =?UTF-8?q?=E8=B4=A6=E5=8F=B7=E4=B8=BA1=E4=BD=8D=E6=95=B0=E5=AD=97?= =?UTF-8?q?=EF=BC=89=EF=BC=8CID=E7=9A=84=E9=AB=984=E4=BD=8D=E6=94=B9?= =?UTF-8?q?=E7=94=A8=E7=99=BB=E5=BD=95=E8=B4=A6=E5=8F=B7=E5=81=9A=E4=B8=BA?= =?UTF-8?q?=E5=89=8D=E7=BC=80=E3=80=82=E5=8E=9F=E6=83=B3=E7=94=A8=E4=BA=8E?= =?UTF-8?q?=E5=88=A4=E6=96=AD=E7=8A=B6=E6=80=81=E6=8A=A5=E5=91=8A=E8=BF=9B?= =?UTF-8?q?=E8=A1=8C=E5=88=86=E5=8F=91=E7=9A=84=EF=BC=8C=E4=BD=86=E7=94=B1?= =?UTF-8?q?=E4=BA=8EMSG=5FID=E6=98=AF=E7=94=B1=E6=9C=8D=E5=8A=A1=E7=AB=AF?= =?UTF-8?q?=E7=94=9F=E6=88=90=EF=BC=8C=E6=AD=A4=E4=BF=AE=E6=94=B9=E6=97=A0?= =?UTF-8?q?=E6=95=88=EF=BC=8C=E4=BD=86=E4=BB=8D=E4=BF=9D=E7=95=99=E3=80=82?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Cmpp/Cmpp.cpp | 22 ++- Cmpp/Cmpp.h | 2 + Cmpp3/Cmpp3.cpp | 20 ++- Cmpp3/Cmpp3.h | 1 + FXSend.clw | 194 ------------------------- FXSend.dsp | 240 ------------------------------- FXSend.dsw | 29 ---- FXSend.rc | 17 +-- FXSend.sln | 45 +++--- FXSend.vcxproj | 36 ++++- FXSend.vcxproj.filters | 314 ----------------------------------------- FXSendDlg.cpp | 85 ++++++++--- FXSendDlg.h | 1 + Smgp/Smgp.cpp | 6 +- StdAfx.h | 3 +- resource.h | 3 +- 16 files changed, 175 insertions(+), 843 deletions(-) delete mode 100644 FXSend.clw delete mode 100644 FXSend.dsp delete mode 100644 FXSend.dsw delete mode 100644 FXSend.vcxproj.filters diff --git a/Cmpp/Cmpp.cpp b/Cmpp/Cmpp.cpp index af726fc..a093fcf 100644 --- a/Cmpp/Cmpp.cpp +++ b/Cmpp/Cmpp.cpp @@ -38,6 +38,7 @@ CCmpp::CCmpp() m_bRecvFrame = false; m_lID = 1; + m_lID_Begin = 0; m_pRecvProc = NULL; m_bConnect = false; m_bLoginCmpp= -1; @@ -560,7 +561,8 @@ long CCmpp::Cmpp_Init(const char *pIP,long lPort, const char *pUser, const char MD5_L md5; BYTE bMd5[64]={0}; - memcpy(bMd5 , md5.MD5Byte(Auth,lAdd),16); + //memcpy(bMd5 , md5.MD5Byte(Auth,lAdd),16); + md5.MD5Byte(Auth, lAdd, bMd5); Cmpp_Connect connect={0}; @@ -577,6 +579,13 @@ long CCmpp::Cmpp_Init(const char *pIP,long lPort, const char *pUser, const char connect.Timestamp = htonl(connect.Timestamp); + m_lID = 1; //包序号从1开始 + if ( strlen(pUser) == 1 && pUser[0] >= '0' && pUser[0] <= '9' ) //只有1位的用户名,认为是中转登录 + { + m_lID_Begin = atol(pUser) * 0xFFFFFFF; //序号以登录的端口号开始,用于中转时判断数据包 + m_lID = m_lID + m_lID_Begin; + } + m_bLoginCmpp = -1; ULONG lSeq=0; if ( !SendFrame(m_hSocket,m_lID,m_dwEndSendTime,CMPP_CONNECT,(UCHAR*)&connect,sizeof(connect),lSeq) ) @@ -620,8 +629,11 @@ long CCmpp::SendFrame(SOCKET sock,ULONG &lID,DWORD &dwEndSendTime,ULONG lCommand head.Total_Length = sizeof(head)+lDataLen; lAllLen = head.Total_Length; head.Command_Id = lCommandID; - if ( lID >= 0xF000000 ) //重新开始序号 - lID = 1; + if (lID & 0x0FFFFFFF >= 0xFFFFFF0)//高4位用于标识中转码号第三位,低28位为ID,当低28位的值超过0xFFFFFF0时,重新开始序号 + { + lID = (lID & 0xF0000000) + 1; + } + if ( lSeq > 0 ) head.Sequence_Id = lSeq; //直接使用相同序号的发送 else @@ -785,7 +797,8 @@ BOOL CCmpp::InitCmpp2() MD5_L md5; BYTE bMd5[64]={0}; - memcpy(bMd5 , md5.MD5Byte(Auth,lAdd),16); + //memcpy(bMd5 , md5.MD5Byte(Auth,lAdd),16); + md5.MD5Byte(Auth, lAdd, bMd5); Cmpp_Connect connect={0}; @@ -802,7 +815,6 @@ BOOL CCmpp::InitCmpp2() connect.Timestamp = atol(str); connect.Timestamp = htonl(connect.Timestamp); - m_bLoginCmpp = -1; ULONG lSeq=0; if ( !SendFrame(m_hSocket,m_lID,m_dwEndSendTime,CMPP_CONNECT,(UCHAR*)&connect,sizeof(connect),lSeq) ) diff --git a/Cmpp/Cmpp.h b/Cmpp/Cmpp.h index f9b6672..bf77a02 100644 --- a/Cmpp/Cmpp.h +++ b/Cmpp/Cmpp.h @@ -169,6 +169,7 @@ typedef struct _CmppExchange SOCKET sock; //Socket接口 long lIndex; //序号 ULONG lID; //回复序号 + ULONG lID_Begin; //ID开始序号,用于收到resp时判断是谁的回复 long lSendCount; //发送计数 long lSendRetCount; //发送返回计数 @@ -312,6 +313,7 @@ public: ULONG m_lID; + ULONG m_lID_Begin; RECVPROC m_pRecvProc; //用于控制发送速度 DWORD m_dwEndSocketSendTime; //最后短信发出间隔 diff --git a/Cmpp3/Cmpp3.cpp b/Cmpp3/Cmpp3.cpp index 0f72c56..f326ca4 100644 --- a/Cmpp3/Cmpp3.cpp +++ b/Cmpp3/Cmpp3.cpp @@ -36,6 +36,7 @@ CCmpp3::CCmpp3() m_bRecvFrame = false; m_lID = 1; + m_lID_Begin = 0; m_pRecvProc = NULL; m_bConnect = false; m_bLoginCmpp3= -1; @@ -558,7 +559,8 @@ long CCmpp3::Cmpp3_Init(const char *pIP,long lPort, const char *pUser, const cha MD5_L md5; BYTE bMd5[64]={0}; - memcpy(bMd5 , md5.MD5Byte(Auth,lAdd),16); + //memcpy(bMd5 , md5.MD5Byte(Auth,lAdd),16); + md5.MD5Byte(Auth, lAdd, bMd5); Cmpp3_Connect connect={0}; @@ -575,6 +577,13 @@ long CCmpp3::Cmpp3_Init(const char *pIP,long lPort, const char *pUser, const cha connect.Timestamp = htonl(connect.Timestamp); + m_lID = 1; //包序号从1开始 + if (strlen(pUser) == 1 && pUser[0] >= '0' && pUser[0] <= '9') //只有1位的用户名,认为是中转登录 + { + m_lID_Begin = atol(pUser) * 0xFFFFFFF; //序号以登录的端口号开始,用于中转时判断数据包 + m_lID = m_lID + m_lID_Begin; + } + m_bLoginCmpp3 = -1; ULONG lSeq=0; if ( !SendFrame(m_hSocket,m_lID,m_dwEndSendTime,CMPP3_CONNECT,(UCHAR*)&connect,sizeof(connect),lSeq) ) @@ -618,8 +627,10 @@ long CCmpp3::SendFrame(SOCKET sock,ULONG &lID,DWORD &dwEndSendTime,ULONG lComman head.Total_Length = sizeof(head)+lDataLen; lAllLen = head.Total_Length; head.Command_Id = lCommandID; - if ( lID >= 0xF000000 ) //重新开始序号 - lID = 1; + if (lID & 0x0FFFFFFF >= 0xFFFFFF0)//高4位用于标识中转码号第三位,低28位为ID,当低28位的值超过0xFFFFFF0时,重新开始序号 + { + lID = (lID & 0xF0000000) + 1; + } if ( lSeq > 0 ) head.Sequence_Id = lSeq; //直接使用相同序号的发送 else @@ -719,7 +730,8 @@ BOOL CCmpp3::InitCmpp32() MD5_L md5; BYTE bMd5[64]={0}; - memcpy(bMd5 , md5.MD5Byte(Auth,lAdd),16); + //memcpy(bMd5 , md5.MD5Byte(Auth,lAdd),16); + md5.MD5Byte(Auth, lAdd, bMd5); Cmpp3_Connect connect={0}; diff --git a/Cmpp3/Cmpp3.h b/Cmpp3/Cmpp3.h index b74c793..fb1933c 100644 --- a/Cmpp3/Cmpp3.h +++ b/Cmpp3/Cmpp3.h @@ -302,6 +302,7 @@ public: ULONG m_lID; + ULONG m_lID_Begin; RECVPROC_Cmpp3 m_pRecvProc; //用于控制发送速度 DWORD m_dwEndSocketSendTime; //最后短信发出间隔 diff --git a/FXSend.clw b/FXSend.clw deleted file mode 100644 index 79041f4..0000000 --- a/FXSend.clw +++ /dev/null @@ -1,194 +0,0 @@ -; CLW file contains information for the MFC ClassWizard - -[General Info] -Version=1 -LastClass=DLG_TD_Setup -LastTemplate=CDialog -NewFileInclude1=#include "stdafx.h" -NewFileInclude2=#include "FXSend.h" - -ClassCount=4 -Class1=CFXSendApp -Class2=CFXSendDlg -Class3=CAboutDlg - -ResourceCount=4 -Resource1=IDD_FXSEND_DIALOG -Resource2=IDR_MAINFRAME -Resource3=IDD_ABOUTBOX -Class4=DLG_TD_Setup -Resource4=IDD_TDSETUP - -[CLS:CFXSendApp] -Type=0 -HeaderFile=FXSend.h -ImplementationFile=FXSend.cpp -Filter=N -BaseClass=CWinApp -VirtualFilter=AC - -[CLS:CFXSendDlg] -Type=0 -HeaderFile=FXSendDlg.h -ImplementationFile=FXSendDlg.cpp -Filter=W -BaseClass=CDialog -VirtualFilter=dWC -LastObject=CFXSendDlg - -[CLS:CAboutDlg] -Type=0 -HeaderFile=FXSendDlg.h -ImplementationFile=FXSendDlg.cpp -Filter=D - -[DLG:IDD_ABOUTBOX] -Type=1 -Class=CAboutDlg -ControlCount=4 -Control1=IDC_STATIC,static,1342177283 -Control2=IDC_STATIC,static,1342308480 -Control3=IDC_STATIC,static,1342308352 -Control4=IDOK,button,1342373889 - -[DLG:IDD_FXSEND_DIALOG] -Type=1 -Class=CFXSendDlg -ControlCount=62 -Control1=IDC_START,button,1342242816 -Control2=IDC_DBIP,edit,1350631552 -Control3=IDC_DBUSER,edit,1350631552 -Control4=IDC_DBPASSWD,edit,1350631584 -Control5=IDC_SAVE,button,1342242816 -Control6=IDC_S_SEND,button,1342177287 -Control7=IDC_ALLSENDCOUNT,button,1342177287 -Control8=IDC_STATIC,static,1342308352 -Control9=IDC_STATIC,static,1342308352 -Control10=IDC_STATIC,static,1342308352 -Control11=IDC_MSG2,edit,1350637572 -Control12=IDC_TEST,button,1073807360 -Control13=IDC_EDIT1,edit,1352732740 -Control14=IDC_MSG3,edit,1350637572 -Control15=IDC_S_CMPP,button,1342177287 -Control16=IDC_STATIC,button,1342177287 -Control17=IDC_DBIP2,edit,1350631552 -Control18=IDC_DBUSER2,edit,1350631552 -Control19=IDC_DBPASSWD2,edit,1350631584 -Control20=IDC_STATIC,static,1342308352 -Control21=IDC_STATIC,static,1342308352 -Control22=IDC_STATIC,static,1342308352 -Control23=IDC_STATIC,button,1342177287 -Control24=IDC_CHECKRESEND,button,1342242819 -Control25=IDC_TOPSEL,edit,1350639744 -Control26=IDC_STATIC,static,1342308352 -Control27=IDC_NUMTYPE,edit,1350639744 -Control28=IDC_STATIC,static,1342308352 -Control29=IDC_SENDRET,edit,1350639744 -Control30=IDC_STATIC,static,1342308352 -Control31=IDC_SENDFCS,edit,1350639744 -Control32=IDC_STATIC,static,1342308352 -Control33=IDC_WINDOW,edit,1350631552 -Control34=IDC_STATIC,static,1342308352 -Control35=IDC_CHECKBACK,button,1342242819 -Control36=IDC_DELAY,edit,1350639744 -Control37=IDC_STATIC,static,1342308352 -Control38=IDC_MAINRESEND,button,1342242819 -Control39=IDC_EXCM,button,1342242819 -Control40=IDC_CHECKCM,button,1342242819 -Control41=IDC_SHOWLOG,button,1342242819 -Control42=IDC_NORET,button,1342242819 -Control43=IDC_NOREPORT,button,1342242819 -Control44=IDC_EXCM2,button,1342242819 -Control45=IDC_TEST2,button,1342242816 -Control46=IDC_0,button,1342242816 -Control47=IDC_STATIC,static,1342308352 -Control48=IDC_SELECT_LOCK,combobox,1344339971 -Control49=IDC_STATIC,static,1342308352 -Control50=IDC_UPDATE_LOCK,combobox,1344339971 -Control51=IDC_STATIC,static,1342308352 -Control52=IDC_SPEED,edit,1350639744 -Control53=IDC_S_ZD_SEND,static,1342308352 -Control54=IDC_S_ZD_RECV,static,1342308352 -Control55=IDC_S_ZD_SEND2,static,1342308352 -Control56=IDC_SELECT_DB,static,1342308352 -Control57=IDC_S_ZD_RECV2,static,1342308352 -Control58=IDC_TDMSG,static,1342308352 -Control59=IDC_TDSETUP,button,1342242816 -Control60=IDC_STATIC,static,1342308352 -Control61=IDC_ONEPACKSMSCOUNT,edit,1350639744 -Control62=IDC_SUPLONGSMS,button,1342242819 - -[DLG:IDD_TDSETUP] -Type=1 -Class=DLG_TD_Setup -ControlCount=60 -Control1=IDOK,button,1342242817 -Control2=IDCANCEL,button,1342242816 -Control3=IDC_CMPP_SERVER,edit,1350631552 -Control4=IDC_CMPP_USER,edit,1350631552 -Control5=IDC_CMPP_PASSWD,edit,1350631584 -Control6=IDC_CMPP_CORPID,edit,1350631552 -Control7=IDC_CMPP_NUM,edit,1350639744 -Control8=IDC_STATIC,static,1342308352 -Control9=IDC_STATIC,static,1342308352 -Control10=IDC_STATIC,static,1342308352 -Control11=IDC_CMPP_CORPID_S,static,1342308352 -Control12=IDC_STATIC,static,1342308352 -Control13=IDC_CMPP_PORT,edit,1350639744 -Control14=IDC_CMPP_YWID,edit,1350631552 -Control15=IDC_STATIC,static,1342308352 -Control16=IDC_STATIC,static,1342308352 -Control17=IDC_CMPP_SMSNUM_MAXLEN,edit,1350639744 -Control18=IDC_ALLNUM,button,1342242819 -Control19=IDC_SUBNUM,button,1342242819 -Control20=IDC_CMPP,button,1342242819 -Control21=IDC_CMPP_EXCHANGENUM,edit,1484849280 -Control22=IDC_ADC,button,1342242819 -Control23=IDC_LONGSMS,button,1342242819 -Control24=IDC_PUSHREPORT,button,1342242819 -Control25=IDC_STATIC,button,1342177287 -Control26=IDC_STATIC,static,1342308352 -Control27=IDC_CMPP_TYPE,combobox,1344339971 -Control28=IDC_CMPP_LOCALPORT_S,static,1342308352 -Control29=IDC_CMPP_LOCALPORT,edit,1350639744 -Control30=IDC_CMPP_NODEID_S,static,1342308352 -Control31=IDC_CMPP_NODEID,edit,1350639744 -Control32=IDC_STATIC,button,1342177287 -Control33=IDC_STATIC,static,1342308352 -Control34=IDC_CMPP_ADD1,edit,1350631552 -Control35=IDC_STATIC,static,1342308352 -Control36=IDC_CMPP_ADD2,edit,1350631552 -Control37=IDC_STATIC,static,1342308352 -Control38=IDC_CMPP_ADD3,edit,1350631552 -Control39=IDC_STATIC,static,1342308352 -Control40=IDC_CMPP_ADD4,edit,1350631552 -Control41=IDC_STATIC,static,1342308352 -Control42=IDC_CMPP_ADD5,edit,1350631552 -Control43=IDC_STATIC,static,1342308352 -Control44=IDC_CMPP_ADD6,edit,1350631552 -Control45=IDC_STATIC,static,1342308352 -Control46=IDD_TDSETUP_THREAD_SEND,combobox,1344339971 -Control47=IDC_STATIC,static,1342308352 -Control48=IDD_TDSETUP_THREAD_RET,combobox,1344339971 -Control49=IDC_STATIC,static,1342308352 -Control50=IDD_TDSETUP_THREAD_REPORT,combobox,1344339971 -Control51=IDC_LOG,button,1342242819 -Control52=IDC_LOGEX,button,1342242819 -Control53=IDC_STATIC,static,1342308352 -Control54=IDD_TDSETUP_THREAD_SENDSMS,combobox,1344339971 -Control55=IDC_STATIC,static,1342308352 -Control56=IDC_CMPP_ADD7,edit,1350631552 -Control57=IDC_STATIC,static,1342308352 -Control58=IDC_CMPP_ADD8,edit,1350631552 -Control59=IDC_STATIC,static,1342308352 -Control60=IDC_CMPP_ADD9,edit,1350631552 - -[CLS:DLG_TD_Setup] -Type=0 -HeaderFile=DLG_TD_Setup.h -ImplementationFile=DLG_TD_Setup.cpp -BaseClass=CDialog -Filter=D -VirtualFilter=dWC -LastObject=IDD_TDSETUP_THREAD_SENDSMS - diff --git a/FXSend.dsp b/FXSend.dsp deleted file mode 100644 index 3843a43..0000000 --- a/FXSend.dsp +++ /dev/null @@ -1,240 +0,0 @@ -# Microsoft Developer Studio Project File - Name="FXSend" - Package Owner=<4> -# Microsoft Developer Studio Generated Build File, Format Version 6.00 -# ** DO NOT EDIT ** - -# TARGTYPE "Win32 (x86) Application" 0x0101 - -CFG=FXSend - Win32 Debug -!MESSAGE This is not a valid makefile. To build this project using NMAKE, -!MESSAGE use the Export Makefile command and run -!MESSAGE -!MESSAGE NMAKE /f "FXSend.mak". -!MESSAGE -!MESSAGE You can specify a configuration when running NMAKE -!MESSAGE by defining the macro CFG on the command line. For example: -!MESSAGE -!MESSAGE NMAKE /f "FXSend.mak" CFG="FXSend - Win32 Debug" -!MESSAGE -!MESSAGE Possible choices for configuration are: -!MESSAGE -!MESSAGE "FXSend - Win32 Release" (based on "Win32 (x86) Application") -!MESSAGE "FXSend - Win32 Debug" (based on "Win32 (x86) Application") -!MESSAGE - -# Begin Project -# PROP AllowPerConfigDependencies 0 -# PROP Scc_ProjName "" -# PROP Scc_LocalPath "" -CPP=cl.exe -MTL=midl.exe -RSC=rc.exe - -!IF "$(CFG)" == "FXSend - Win32 Release" - -# PROP BASE Use_MFC 6 -# PROP BASE Use_Debug_Libraries 0 -# PROP BASE Output_Dir "Release" -# PROP BASE Intermediate_Dir "Release" -# PROP BASE Target_Dir "" -# PROP Use_MFC 5 -# PROP Use_Debug_Libraries 0 -# PROP Output_Dir "Release" -# PROP Intermediate_Dir "Release" -# PROP Ignore_Export_Lib 0 -# PROP Target_Dir "" -# ADD BASE CPP /nologo /MD /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_WINDOWS" /D "_AFXDLL" /Yu"stdafx.h" /FD /c -# ADD CPP /nologo /MT /W3 /GX /D "WIN32" /D "NDEBUG" /D "_WINDOWS" /D "_MBCS" /Yu"stdafx.h" /FD /c -# ADD BASE MTL /nologo /D "NDEBUG" /mktyplib203 /win32 -# ADD MTL /nologo /D "NDEBUG" /mktyplib203 /win32 -# ADD BASE RSC /l 0x804 /d "NDEBUG" /d "_AFXDLL" -# ADD RSC /l 0x804 /d "NDEBUG" -BSC32=bscmake.exe -# ADD BASE BSC32 /nologo -# ADD BSC32 /nologo -LINK32=link.exe -# ADD BASE LINK32 /nologo /subsystem:windows /machine:I386 -# ADD LINK32 /nologo /subsystem:windows /machine:I386 /out:"Release/CMSend.exe" - -!ELSEIF "$(CFG)" == "FXSend - Win32 Debug" - -# PROP BASE Use_MFC 6 -# PROP BASE Use_Debug_Libraries 1 -# PROP BASE Output_Dir "Debug" -# PROP BASE Intermediate_Dir "Debug" -# PROP BASE Target_Dir "" -# PROP Use_MFC 6 -# PROP Use_Debug_Libraries 1 -# PROP Output_Dir "Debug" -# PROP Intermediate_Dir "Debug" -# PROP Ignore_Export_Lib 0 -# PROP Target_Dir "" -# ADD BASE CPP /nologo /MDd /W3 /Gm /GX /ZI /Od /D "WIN32" /D "_DEBUG" /D "_WINDOWS" /D "_AFXDLL" /Yu"stdafx.h" /FD /GZ /c -# ADD CPP /nologo /MDd /W3 /Gm /GX /ZI /Od /D "WIN32" /D "_DEBUG" /D "_WINDOWS" /D "_AFXDLL" /D "_MBCS" /Yu"stdafx.h" /FD /GZ /c -# ADD BASE MTL /nologo /D "_DEBUG" /mktyplib203 /win32 -# ADD MTL /nologo /D "_DEBUG" /mktyplib203 /win32 -# ADD BASE RSC /l 0x804 /d "_DEBUG" /d "_AFXDLL" -# ADD RSC /l 0x804 /d "_DEBUG" /d "_AFXDLL" -BSC32=bscmake.exe -# ADD BASE BSC32 /nologo -# ADD BSC32 /nologo -LINK32=link.exe -# ADD BASE LINK32 /nologo /subsystem:windows /debug /machine:I386 /pdbtype:sept -# ADD LINK32 /nologo /subsystem:windows /debug /machine:I386 /out:"Debug/SZSend.exe" /pdbtype:sept - -!ENDIF - -# Begin Target - -# Name "FXSend - Win32 Release" -# Name "FXSend - Win32 Debug" -# Begin Group "Source Files" - -# PROP Default_Filter "cpp;c;cxx;rc;def;r;odl;idl;hpj;bat" -# Begin Source File - -SOURCE=..\..\public\ado\Ado.cpp -# End Source File -# Begin Source File - -SOURCE=..\..\public\ado\AdoCommand.cpp -# End Source File -# Begin Source File - -SOURCE=..\..\public\ado\AdoRecordSet.cpp -# End Source File -# Begin Source File - -SOURCE=.\Cmpp\Cmpp.cpp -# End Source File -# Begin Source File - -SOURCE=.\DLG_TD_Setup.cpp -# End Source File -# Begin Source File - -SOURCE=..\..\public\md5\driver.cpp -# End Source File -# Begin Source File - -SOURCE=.\FXSend.cpp -# End Source File -# Begin Source File - -SOURCE=.\FXSend.rc -# End Source File -# Begin Source File - -SOURCE=.\FXSendDlg.cpp -# End Source File -# Begin Source File - -SOURCE=..\..\public\LuTool.cpp -# End Source File -# Begin Source File - -SOURCE=..\..\public\CMarkup\Markup.cpp -# End Source File -# Begin Source File - -SOURCE=..\..\public\md5\md5.cpp -# End Source File -# Begin Source File - -SOURCE=..\..\public\SendPub.cpp -# End Source File -# Begin Source File - -SOURCE=.\Sgip\Sgip.cpp -# End Source File -# Begin Source File - -SOURCE=.\Smgp\Smgp.cpp -# End Source File -# Begin Source File - -SOURCE=.\StdAfx.cpp -# ADD CPP /Yc"stdafx.h" -# End Source File -# End Group -# Begin Group "Header Files" - -# PROP Default_Filter "h;hpp;hxx;hm;inl" -# Begin Source File - -SOURCE=..\..\public\ado\Ado.h -# End Source File -# Begin Source File - -SOURCE=..\..\public\ado\AdoCommand.h -# End Source File -# Begin Source File - -SOURCE=..\..\public\ado\AdoRecordSet.h -# End Source File -# Begin Source File - -SOURCE=.\Cmpp\Cmpp.h -# End Source File -# Begin Source File - -SOURCE=.\DLG_TD_Setup.h -# End Source File -# Begin Source File - -SOURCE=.\FXSend.h -# End Source File -# Begin Source File - -SOURCE=.\FXSendDlg.h -# End Source File -# Begin Source File - -SOURCE=..\..\public\LuTool.h -# End Source File -# Begin Source File - -SOURCE=..\..\public\CMarkup\Markup.h -# End Source File -# Begin Source File - -SOURCE=..\..\public\md5\md5.h -# End Source File -# Begin Source File - -SOURCE=.\Resource.h -# End Source File -# Begin Source File - -SOURCE=..\..\public\SendPub.h -# End Source File -# Begin Source File - -SOURCE=.\Sgip\Sgip.h -# End Source File -# Begin Source File - -SOURCE=.\Smgp\Smgp.h -# End Source File -# Begin Source File - -SOURCE=.\StdAfx.h -# End Source File -# End Group -# Begin Group "Resource Files" - -# PROP Default_Filter "ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe" -# Begin Source File - -SOURCE=.\res\FXSend.ico -# End Source File -# Begin Source File - -SOURCE=.\res\FXSend.rc2 -# End Source File -# End Group -# Begin Source File - -SOURCE=.\ReadMe.txt -# End Source File -# End Target -# End Project diff --git a/FXSend.dsw b/FXSend.dsw deleted file mode 100644 index 528029d..0000000 --- a/FXSend.dsw +++ /dev/null @@ -1,29 +0,0 @@ -Microsoft Developer Studio Workspace File, Format Version 6.00 -# WARNING: DO NOT EDIT OR DELETE THIS WORKSPACE FILE! - -############################################################################### - -Project: "FXSend"=.\FXSend.dsp - Package Owner=<4> - -Package=<5> -{{{ -}}} - -Package=<4> -{{{ -}}} - -############################################################################### - -Global: - -Package=<5> -{{{ -}}} - -Package=<3> -{{{ -}}} - -############################################################################### - diff --git a/FXSend.rc b/FXSend.rc index e07de46..9fac116 100644 --- a/FXSend.rc +++ b/FXSend.rc @@ -128,17 +128,17 @@ BEGIN EDITTEXT IDC_DELAY,117,237,24,12,ES_AUTOHSCROLL | ES_NUMBER LTEXT "Delay",IDC_STATIC,93,239,21,8 CONTROL "检测签名",IDC_CHECKCM,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,13,288,48,10 - CONTROL "强制去签名",IDC_EXCM,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,79,288,56,10 - CONTROL "半",IDC_EXCM2,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,137,288,24,10 + CONTROL "强制去签名",IDC_EXCM,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,74,288,56,10 + CONTROL "半",IDC_EXCM2,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,132,288,24,10 CONTROL "不处理Ret",IDC_NORET,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,13,301,52,10 - CONTROL "不处理Report",IDC_NOREPORT,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,79,301,64,10 + CONTROL "不处理Report",IDC_NOREPORT,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,74,301,64,10 CONTROL "不处理上行",IDC_NORECV,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,13,315,56,10 - CONTROL "拼接长短信",IDC_SUPLONGSMS,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,79,315,56,10 - CONTROL "除去长信标记",IDC_EXPLONGSMS,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,13,328,64,10 - LTEXT "数据包大小",IDC_STATIC,80,330,41,8 - EDITTEXT IDC_ONEPACKSMSCOUNT,123,327,24,12,ES_AUTOHSCROLL | ES_NUMBER + CONTROL "拼接长短信",IDC_SUPLONGSMS,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,74,315,56,10 + CONTROL "去长信标记",IDC_EXPLONGSMS,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,13,328,56,10 + LTEXT "数据包大小",IDC_STATIC,75,330,41,8 + EDITTEXT IDC_ONEPACKSMSCOUNT,118,327,24,12,ES_AUTOHSCROLL | ES_NUMBER CONTROL "号码不加86",IDC_NO86,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,13,341,54,10 - CONTROL "校验报备签名",IDC_VERIFYSIGNNATURE,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,79,342,64,10 + CONTROL "校验签名",IDC_VERIFYSIGNNATURE,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,74,343,48,10 EDITTEXT IDC_MSG2,170,9,297,172,ES_MULTILINE | ES_READONLY | ES_WANTRETURN LTEXT "中国移动",IDC_TDMSG,12,130,145,8 CONTROL "显示日志",IDC_SHOWLOG,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,172,185,49,10 @@ -158,6 +158,7 @@ BEGIN PUSHBUTTON "运营商设置",IDC_TDSETUP,15,105,56,18 CONTROL "显示详细日志",IDC_SHOWLOG2,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,227,185,64,10 LTEXT "Prov",IDC_STATIC,85,68,17,8 + CONTROL "拒发",IDC_VERIFYSIGNNATURE_REJECT,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,125,343,32,10 END IDD_TDSETUP DIALOGEX 0, 0, 366, 317 diff --git a/FXSend.sln b/FXSend.sln index 1873a11..1b8cb6a 100644 --- a/FXSend.sln +++ b/FXSend.sln @@ -1,50 +1,43 @@ 锘 -Microsoft Visual Studio Solution File, Format Version 11.00 -# Visual Studio 2010 +Microsoft Visual Studio Solution File, Format Version 12.00 +# Visual Studio Version 17 +VisualStudioVersion = 17.4.33110.190 +MinimumVisualStudioVersion = 10.0.40219.1 Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "FXSend", "FXSend.vcxproj", "{D13DFE6B-353F-6909-BD4D-B82D70F69E9E}" EndProject Global GlobalSection(SolutionConfigurationPlatforms) = preSolution - Debug_Unicode|Win32 = Debug_Unicode|Win32 Debug_Unicode|x64 = Debug_Unicode|x64 - Debug_X64|Win32 = Debug_X64|Win32 - Debug_X64|x64 = Debug_X64|x64 - Debug|Win32 = Debug|Win32 + Debug_Unicode|x86 = Debug_Unicode|x86 Debug|x64 = Debug|x64 - release_Unicode|Win32 = release_Unicode|Win32 + Debug|x86 = Debug|x86 release_Unicode|x64 = release_Unicode|x64 - Release_X64|Win32 = Release_X64|Win32 - Release_X64|x64 = Release_X64|x64 - Release|Win32 = Release|Win32 + release_Unicode|x86 = release_Unicode|x86 Release|x64 = Release|x64 + Release|x86 = Release|x86 EndGlobalSection GlobalSection(ProjectConfigurationPlatforms) = postSolution - {D13DFE6B-353F-6909-BD4D-B82D70F69E9E}.Debug_Unicode|Win32.ActiveCfg = Debug_Unicode|Win32 - {D13DFE6B-353F-6909-BD4D-B82D70F69E9E}.Debug_Unicode|Win32.Build.0 = Debug_Unicode|Win32 {D13DFE6B-353F-6909-BD4D-B82D70F69E9E}.Debug_Unicode|x64.ActiveCfg = Debug_Unicode|x64 {D13DFE6B-353F-6909-BD4D-B82D70F69E9E}.Debug_Unicode|x64.Build.0 = Debug_Unicode|x64 - {D13DFE6B-353F-6909-BD4D-B82D70F69E9E}.Debug_X64|Win32.ActiveCfg = Debug_X64|x64 - {D13DFE6B-353F-6909-BD4D-B82D70F69E9E}.Debug_X64|Win32.Build.0 = Debug_X64|x64 - {D13DFE6B-353F-6909-BD4D-B82D70F69E9E}.Debug_X64|x64.ActiveCfg = Debug_X64|x64 - {D13DFE6B-353F-6909-BD4D-B82D70F69E9E}.Debug_X64|x64.Build.0 = Debug_X64|x64 - {D13DFE6B-353F-6909-BD4D-B82D70F69E9E}.Debug|Win32.ActiveCfg = Debug|Win32 - {D13DFE6B-353F-6909-BD4D-B82D70F69E9E}.Debug|Win32.Build.0 = Debug|Win32 + {D13DFE6B-353F-6909-BD4D-B82D70F69E9E}.Debug_Unicode|x86.ActiveCfg = Debug_Unicode|Win32 + {D13DFE6B-353F-6909-BD4D-B82D70F69E9E}.Debug_Unicode|x86.Build.0 = Debug_Unicode|Win32 {D13DFE6B-353F-6909-BD4D-B82D70F69E9E}.Debug|x64.ActiveCfg = Debug|x64 {D13DFE6B-353F-6909-BD4D-B82D70F69E9E}.Debug|x64.Build.0 = Debug|x64 - {D13DFE6B-353F-6909-BD4D-B82D70F69E9E}.release_Unicode|Win32.ActiveCfg = release_Unicode|Win32 - {D13DFE6B-353F-6909-BD4D-B82D70F69E9E}.release_Unicode|Win32.Build.0 = release_Unicode|Win32 + {D13DFE6B-353F-6909-BD4D-B82D70F69E9E}.Debug|x86.ActiveCfg = Debug|Win32 + {D13DFE6B-353F-6909-BD4D-B82D70F69E9E}.Debug|x86.Build.0 = Debug|Win32 {D13DFE6B-353F-6909-BD4D-B82D70F69E9E}.release_Unicode|x64.ActiveCfg = release_Unicode|x64 {D13DFE6B-353F-6909-BD4D-B82D70F69E9E}.release_Unicode|x64.Build.0 = release_Unicode|x64 - {D13DFE6B-353F-6909-BD4D-B82D70F69E9E}.Release_X64|Win32.ActiveCfg = Release_X64|x64 - {D13DFE6B-353F-6909-BD4D-B82D70F69E9E}.Release_X64|Win32.Build.0 = Release_X64|x64 - {D13DFE6B-353F-6909-BD4D-B82D70F69E9E}.Release_X64|x64.ActiveCfg = Release_X64|x64 - {D13DFE6B-353F-6909-BD4D-B82D70F69E9E}.Release_X64|x64.Build.0 = Release_X64|x64 - {D13DFE6B-353F-6909-BD4D-B82D70F69E9E}.Release|Win32.ActiveCfg = Release|Win32 - {D13DFE6B-353F-6909-BD4D-B82D70F69E9E}.Release|Win32.Build.0 = Release|Win32 + {D13DFE6B-353F-6909-BD4D-B82D70F69E9E}.release_Unicode|x86.ActiveCfg = release_Unicode|Win32 + {D13DFE6B-353F-6909-BD4D-B82D70F69E9E}.release_Unicode|x86.Build.0 = release_Unicode|Win32 {D13DFE6B-353F-6909-BD4D-B82D70F69E9E}.Release|x64.ActiveCfg = Release|x64 {D13DFE6B-353F-6909-BD4D-B82D70F69E9E}.Release|x64.Build.0 = Release|x64 + {D13DFE6B-353F-6909-BD4D-B82D70F69E9E}.Release|x86.ActiveCfg = Release|Win32 + {D13DFE6B-353F-6909-BD4D-B82D70F69E9E}.Release|x86.Build.0 = Release|Win32 EndGlobalSection GlobalSection(SolutionProperties) = preSolution HideSolutionNode = FALSE EndGlobalSection + GlobalSection(ExtensibilityGlobals) = postSolution + SolutionGuid = {F73C3DE4-8611-4DEF-A78B-17A78DFD1837} + EndGlobalSection EndGlobal diff --git a/FXSend.vcxproj b/FXSend.vcxproj index ec1c00f..14340e1 100644 --- a/FXSend.vcxproj +++ b/FXSend.vcxproj @@ -116,7 +116,7 @@ Application Dynamic Unicode - Windows7.1SDK + v143 Application @@ -203,7 +203,8 @@ .\Debug\ .\Debug\ true - .\MobsetHttp\Poco\lib;$(LibraryPath) + .\MobsetHttp\openssl;.\MobsetHttp\Poco\lib64;$(LibraryPath) + .\MobsetHttp\openssl;..\..\public\spdlog\include;$(IncludePath) .\Debug\ @@ -246,7 +247,8 @@ .\Release\ .\Release\ false - .\MobsetHttp\openssl;.\MobsetHttp\Poco\lib;$(LibraryPath) + .\MobsetHttp\openssl;.\MobsetHttp\Poco\lib64;$(LibraryPath) + .\MobsetHttp\openssl;..\..\public\spdlog\include;$(IncludePath) .\Release\ @@ -800,12 +802,16 @@ NotUsing NotUsing NotUsing + NotUsing + NotUsing NotUsing NotUsing NotUsing NotUsing + NotUsing + NotUsing @@ -823,6 +829,8 @@ NotUsing NotUsing NotUsing + NotUsing + NotUsing NotUsing @@ -830,6 +838,8 @@ NotUsing NotUsing NotUsing + NotUsing + NotUsing @@ -837,12 +847,16 @@ NotUsing NotUsing NotUsing + NotUsing + NotUsing NotUsing NotUsing NotUsing NotUsing + NotUsing + NotUsing @@ -851,6 +865,8 @@ NotUsing NotUsing NotUsing + NotUsing + NotUsing NotUsing @@ -858,18 +874,24 @@ NotUsing NotUsing NotUsing + NotUsing + NotUsing NotUsing NotUsing NotUsing NotUsing + NotUsing + NotUsing NotUsing NotUsing NotUsing NotUsing + NotUsing + NotUsing @@ -878,12 +900,16 @@ NotUsing NotUsing NotUsing + NotUsing + NotUsing NotUsing NotUsing NotUsing NotUsing + NotUsing + NotUsing @@ -921,12 +947,16 @@ NotUsing NotUsing NotUsing + NotUsing + NotUsing NotUsing NotUsing NotUsing NotUsing + NotUsing + NotUsing diff --git a/FXSend.vcxproj.filters b/FXSend.vcxproj.filters deleted file mode 100644 index 77bd1da..0000000 --- a/FXSend.vcxproj.filters +++ /dev/null @@ -1,314 +0,0 @@ -锘 - - - - {507245b5-95f4-411f-bafa-c5b0e813ffaa} - cpp;c;cxx;rc;def;r;odl;idl;hpj;bat - - - {358793de-87e5-42b5-918e-d7977f2a50ad} - h;hpp;hxx;hm;inl - - - {49a622b5-f192-40da-b073-6fc291944167} - ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe - - - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - - - Source Files - - - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - - - Resource Files - - - Resource Files - - - - \ No newline at end of file diff --git a/FXSendDlg.cpp b/FXSendDlg.cpp index 36e67ab..a81f67a 100644 --- a/FXSendDlg.cpp +++ b/FXSendDlg.cpp @@ -84,6 +84,7 @@ CFXSendDlg::CFXSendDlg(CWnd* pParent /*=NULL*/) , m_strDBProvider(_T("")) , m_lCheckReSend(0) , m_bVerifySignature(FALSE) + , m_bVerifySignatureReject(FALSE) { //{{AFX_DATA_INIT(CFXSendDlg) m_strIP = _T(""); @@ -299,6 +300,7 @@ void CFXSendDlg::DoDataExchange(CDataExchange* pDX) DDV_MaxChars(pDX, m_strDBProvider, 30); DDX_CBIndex(pDX, IDC_CHECKRESEND, m_lCheckReSend); DDX_Check(pDX, IDC_VERIFYSIGNNATURE, m_bVerifySignature); + DDX_Check(pDX, IDC_VERIFYSIGNNATURE_REJECT, m_bVerifySignatureReject); } BEGIN_MESSAGE_MAP(CFXSendDlg, CDialog) @@ -402,6 +404,7 @@ BOOL CFXSendDlg::OnInitDialog() m_bMainReSend = m_MCom_Head.bMainReSend; m_bCheckCM = m_MCom_Head.bCheckCM; m_bVerifySignature = m_MCom_Head.bVerifySignature; + m_bVerifySignatureReject = m_MCom_Head.bVerifySignatureReject; m_bExCM = m_MCom_Head.bExCM; m_bExCM2 = m_MCom_Head.bExCM2; m_bNo86 = m_MCom_Head.bNo86; @@ -616,6 +619,7 @@ void CFXSendDlg::OnSave() m_MCom_Head.bMainReSend=m_bMainReSend; m_MCom_Head.bCheckCM = m_bCheckCM; m_MCom_Head.bVerifySignature = m_bVerifySignature; + m_MCom_Head.bVerifySignatureReject = m_bVerifySignatureReject; m_MCom_Head.bExCM = m_bExCM; m_MCom_Head.bExCM2 = m_bExCM2; m_MCom_Head.bNo86 = m_bNo86; @@ -1489,7 +1493,8 @@ try break; } - if (pDlg->m_MCom_Head.bVerifySignature) //妫楠屾姤澶囩鍚嶏紝濡傛灉娌″湪杩愯惀鍟嗘姤澶囩殑绛惧悕涓嶈兘鍙戦侊紝鏈楠ゅ彇鍑烘瘡鏉$煭淇$殑绛惧悕 + //闇瑕佹牎楠岀鍚嶆垨妫鏌ョ煭淇″唴瀹规槸鍚︽湁绛惧悕锛岃繖閲屽厛鍋氬垽鏂 + if (pDlg->m_MCom_Head.bVerifySignature || pDlg->m_MCom_Head.bCheckCM) //妫楠屾姤澶囩鍚嶏紝濡傛灉娌″湪杩愯惀鍟嗘姤澶囩殑绛惧悕涓嶈兘鍙戦侊紝鏈楠ゅ彇鍑烘瘡鏉$煭淇$殑绛惧悕 { for (int i = 0; i < lDelCount; i++) { @@ -1598,7 +1603,7 @@ try long lSignatureMsgLen = strSignatureMsg.GetLength(); if (strSignatureMsg.Left(1) == CString(_T("銆"))) //鍐呭鏄互"銆"寮澶寸殑锛屽紑濮嬪彇绛惧悕 { - for (int i = 1; i < lSignatureMsgLen && i < 21; i++) + for (int i = 1; i < lSignatureMsgLen && i < 32; i++) //鏈闀30涓瓧绛惧悕 { if (strSignatureMsg.Mid(i, 1) == "銆") { @@ -1607,7 +1612,7 @@ try } } } - if (strSignature.GetLength() > 0 && strSignature.GetLength() < 20) //鏈夋晥绛惧悕 + if (strSignature.GetLength() > 0 && strSignature.GetLength() <= 30) //鏈夋晥绛惧悕 { pMT[i].strSignature = strSignature; } @@ -1942,12 +1947,31 @@ try if (pDlg->m_MCom_Head.bVerifySignature) //妫楠屾姤澶囩鍚嶏紝濡傛灉娌″湪杩愯惀鍟嗘姤澶囩殑绛惧悕涓嶈兘鍙戦 { - if (!pDlg->VerifySignature(&AdoRS2, &mt, szSendNum2)) + if (!pDlg->VerifySignature(&AdoRS2, &mt, szSendNum2) && pDlg->m_MCom_Head.bVerifySignatureReject) //鏍¢獙绛惧悕鏃朵細鍙栧埌鏂扮殑鍙风爜锛屽鏋滈夋嫨鎷掔粷鍙戦佸垯鏍¢獙涓嶉氳繃灏卞け璐 { lBackStatus = -121; strTemp.Format(_T("鍙戦 %d %s %d,绛惧悕鏍¢獙澶辫触"), mt.CorpID, mt.RecvNum, mt.SendID); AddLogMsg(Send, strTemp); + mt.Status = 11; //鍙戦佸け璐 + mt.RecvStatus.Format(_T("%d"), lBackStatus); + mt.SendTime = COleDateTime::GetCurrentTime(); + b = pDlg->WriteSendRetToCorpSmsM(&AdoRS2, &mt); + if (!b) //鏁版嵁搴撳紓甯 + { + bSql = false; + } + continue; + } + } + if ( pDlg->m_MCom_Head.bCheckCM ) + { + if (mt.strSignature.GetLength() < 1) //娌℃湁绛惧悕鍐呭锛屾嫆缁 + { + lBackStatus = -120; + strTemp.Format(_T("鍙戦 %d %s %d,娌℃湁绛惧悕"), mt.CorpID, mt.RecvNum, mt.SendID); + AddLogMsg(Send, strTemp); + mt.Status = 11; //鍙戦佸け璐 mt.RecvStatus.Format(_T("TJ-绛%d"), lBackStatus); mt.SendTime = COleDateTime::GetCurrentTime(); @@ -1958,9 +1982,6 @@ try } continue; } - } - if ( pDlg->m_MCom_Head.bCheckCM ) - { /* BOOL bCheckHead = false; //妫娴嬪墠閮ㄦ槸鍚︽湁绛惧悕 if ((_tcsncmp(szMsg, _T("闀夸俊"), 2) || (!_tcsncmp(szMsg, _T("闀夸俊"), 2) && szMsg[6] == ':' &&szMsg[4] == 1) ) && //闈為暱淇★紝鎴栬呴暱淇$涓鏉 @@ -1992,7 +2013,7 @@ try } } */ - + /* //浣跨敤鏂扮殑绛惧悕妫娴嬫柟娉曪紝闀夸俊涓嶆娴嬬鍚嶏紝鍙娴嬫櫘閫氱煭淇 if ( _tcsncmp(szMsg, _T("闀夸俊"), 2) && _tcsncmp(szMsg, _T("HEX"), 3) ) { @@ -2014,6 +2035,7 @@ try continue; } } + */ } if (pDlg->m_MCom_Head.bExCM ) { @@ -2032,7 +2054,7 @@ try { if (!bFindCM && (szMsg[0] == '[' || szMsg[0] == _T('銆') ) ) { - for ( int i=1 ; iTD_Get(recvSms,NULL,NULL,lLongMsgRand,lLongMsgAll,lLongMsgIndex) !=0 ) break; @@ -3344,6 +3368,8 @@ try if ( AdoRS.Open(str) && !AdoRS.IsEOF() ) { AdoRS.GetCollect( _T("SendNum") , strRecvNum ); + AdoRS.GetCollect(_T("CorpID"), lCorpID); + AdoRS.GetCollect(_T("UserID"), lUserID); } else { @@ -3351,6 +3377,8 @@ try if (AdoRS.Open(str) && !AdoRS.IsEOF()) { AdoRS.GetCollect(_T("SendNum"), strRecvNum); + AdoRS.GetCollect(_T("CorpID"), lCorpID); + AdoRS.GetCollect(_T("UserID"), lUserID); } } } @@ -3429,7 +3457,7 @@ try { strLongMsg.Format(_T("%06d%02d%02d") , lLongMsgRand,lLongMsgAll,lLongMsgIndex ); } - str.Format(_T("insert into smsrecv(CorpID,UserID,SendMobile,RecvMobile,Msg,RecvTime,Recver) values(0,0,'%s','%s','%s',GetDate(),'%s')"),strSendNum,strRecvNum,strMsg2,strLongMsg); + str.Format(_T("insert into smsrecv(CorpID,UserID,SendMobile,RecvMobile,Msg,RecvTime,Recver) values(%d,%d,'%s','%s','%s',GetDate(),'%s')"),lCorpID,lUserID,strSendNum,strRecvNum,strMsg2,strLongMsg); b = AdoRS.Open(str); AdoRS.Close(); } @@ -4654,6 +4682,11 @@ try if ( _tcslen(m_MCom_Head.szA9)>0 ) //鐗规畩缂栫爜鍙戦 { lMsgFmt = _ttol(m_MCom_Head.szA9); + + if (_tcsstr(pMsg, _T("浣犵櫥褰曟槗淇℃伅閲囪喘骞冲彴鐨勬巿鏉冪爜鏄細")) != NULL) //鐗规畩澶勭悊锛岀敤浜庢祴璇曞彂閫佺綉鍏宠缃殑榛樿绛惧悕 + { + lMsgFmt = 0; + } } //绛惧悕鍗婅鍙樺叏瑙 if ( _tcslen(m_MCom_Head.szA8)>0 && CString(m_MCom_Head.szA8).Find(CString(_T("AutoCJ")))>=0 ) //鍗婅绛惧悕鍙樺叏瑙 @@ -5059,7 +5092,8 @@ UINT CFXSendDlg::Cmpp_Process(LPVOID sParam) MD5_L md5; BYTE bMd5[64]={0}; - memcpy(bMd5 , md5.MD5Byte(Auth,lAdd),16); + //memcpy(bMd5 , md5.MD5Byte(Auth,lAdd),16); + md5.MD5Byte(Auth, lAdd, bMd5); if ( memcmp(bMd5,pConnect->AuthenticatorSource,16)==0 ) { @@ -5088,9 +5122,15 @@ UINT CFXSendDlg::Cmpp_Process(LPVOID sParam) ExchangePro = &pDlg->m_CmppExchange[i]; strcpy(ExchangePro->szNum,pConnect->Source_Addr); ExchangePro->sock = sock; + ExchangePro->lID_Begin = 0; ExchangePro->lID = 0; ExchangePro->lSendCount=0; ExchangePro->lSendRetCount=0; + if (strlen(ExchangePro->szNum) == 1 && ExchangePro->szNum[0] >= '0' && ExchangePro->szNum[0] <= '9') + { + ExchangePro->lID_Begin = atol(ExchangePro->szNum) * 0xFFFFFFF; //搴忓彿浠ョ櫥褰曠殑绔彛鍙峰紑濮嬶紝鐢ㄤ簬涓浆鏃跺垽鏂暟鎹寘 + ExchangePro->lID = ExchangePro->lID + ExchangePro->lID_Begin; + } bLogin = true; break; } @@ -5403,7 +5443,8 @@ UINT CFXSendDlg::Cmpp3_Process(LPVOID sParam) MD5_L md5; BYTE bMd5[64]={0}; - memcpy(bMd5 , md5.MD5Byte(Auth,lAdd),16); + //memcpy(bMd5 , md5.MD5Byte(Auth,lAdd),16); + md5.MD5Byte(Auth, lAdd, bMd5); if ( memcmp(bMd5,pConnect->AuthenticatorSource,16)==0 ) { if ( strlen(pConnect->Source_Addr)<=3 ) //鐭彿鐧诲綍 @@ -5431,9 +5472,15 @@ UINT CFXSendDlg::Cmpp3_Process(LPVOID sParam) ExchangePro = &pDlg->m_CmppExchange[i]; strcpy(ExchangePro->szNum,pConnect->Source_Addr); ExchangePro->sock = sock; + ExchangePro->lID_Begin = 0; ExchangePro->lID = 0; ExchangePro->lSendCount=0; ExchangePro->lSendRetCount=0; + if (strlen(ExchangePro->szNum) == 1 && ExchangePro->szNum[0] >= '0' && ExchangePro->szNum[0] <= '9') + { + ExchangePro->lID_Begin = atol(ExchangePro->szNum) * 0xFFFFFFF; //搴忓彿浠ョ櫥褰曠殑绔彛鍙峰紑濮嬶紝鐢ㄤ簬涓浆鏃跺垽鏂暟鎹寘 + ExchangePro->lID = ExchangePro->lID + ExchangePro->lID_Begin; + } bLogin = true; break; } @@ -12470,7 +12517,8 @@ try MD5_L md5; BYTE bMd5[64]={0}; - memcpy(bMd5 , md5.MD5Byte((BYTE*)Authenticator2.GetBuffer(),Authenticator2.GetLength()),16); + //memcpy(bMd5 , md5.MD5Byte((BYTE*)Authenticator2.GetBuffer(),Authenticator2.GetLength()),16); + md5.MD5Byte((BYTE*)Authenticator2.GetBuffer(), Authenticator2.GetLength(), bMd5); @@ -23828,7 +23876,8 @@ try MD5_L md5; BYTE bMd5[64]={0}; - memcpy(bMd5 , md5.MD5Byte(Auth,lAdd),16); + //memcpy(bMd5 , md5.MD5Byte(Auth,lAdd),16); + md5.MD5Byte(Auth, lAdd, bMd5); if ( memcmp(bMd5,pConnect->AuthenticatorClient,16 )==0 ) { @@ -26031,9 +26080,13 @@ try CStringA addresses; for ( int i=0 ; i0 ) addresses += CStringA(","); - addresses += CStringA(CW2A(send.Mobile[i].szMobile)); + addresses += strMobileA; } strTemp2.Format( "cmd=%s&uid=%s&psw=%s&mobiles=%s&msgid=%d&msg=%s", strCmd,strspID,md5,addresses,send.lSendID,strMsg ); diff --git a/FXSendDlg.h b/FXSendDlg.h index adac93a..9d30c33 100644 --- a/FXSendDlg.h +++ b/FXSendDlg.h @@ -676,6 +676,7 @@ public: int m_lCheckReSend; static CStringA UnicodeToString(TCHAR * pMsg); BOOL m_bVerifySignature; + BOOL m_bVerifySignatureReject; }; //{{AFX_INSERT_LOCATION}} diff --git a/Smgp/Smgp.cpp b/Smgp/Smgp.cpp index 5c8f8ee..bffe946 100644 --- a/Smgp/Smgp.cpp +++ b/Smgp/Smgp.cpp @@ -552,7 +552,8 @@ long CSmgp::Smgp_Init(const char *pIP,long lPort, const char *pUser, const char MD5_L md5; BYTE bMd5[64]={0}; - memcpy(bMd5 , md5.MD5Byte(Auth,lAdd),16); + //memcpy(bMd5 , md5.MD5Byte(Auth,lAdd),16); + md5.MD5Byte(Auth, lAdd, bMd5); Smgp_Login connect={0}; @@ -715,7 +716,8 @@ BOOL CSmgp::InitSmgp2() MD5_L md5; BYTE bMd5[64]={0}; - memcpy(bMd5 , md5.MD5Byte(Auth,lAdd),16); + //memcpy(bMd5 , md5.MD5Byte(Auth,lAdd),16); + md5.MD5Byte(Auth, lAdd, bMd5); Smgp_Login connect={0}; strcpy(connect.ClientID,m_szSmgpUser); diff --git a/StdAfx.h b/StdAfx.h index fece232..cc83cb4 100644 --- a/StdAfx.h +++ b/StdAfx.h @@ -131,7 +131,8 @@ typedef struct _MobileCom_Head long lSendFCS; long lReport; long lDelay; - TCHAR szWindow[126]; + TCHAR szWindow[124]; + BOOL bVerifySignatureReject; BOOL bVerifySignature; BOOL bMainReSend; BOOL bAllNum; diff --git a/resource.h b/resource.h index 8f637be..e07b216 100644 --- a/resource.h +++ b/resource.h @@ -64,9 +64,10 @@ #define IDC_EXCM 1028 #define IDC_CHECKCM 1029 #define IDC_SUBNUM 1030 -#define IDC_CHECKCM2 1030 #define IDC_VERIFYSIGNNATURE 1030 #define IDC_CMPP 1031 +#define IDC_VERIFYSIGNNATURE_ 1031 +#define IDC_VERIFYSIGNNATURE_REJECT 1031 #define IDC_CMPP_EXCHANGENUM 1032 #define IDC_CMPP_PORT 1033 #define IDC_S_SEND 1034