├── LittleStringTools2.sln ├── LittleStringTools2 ├── CHideFunc.cpp ├── CHideFunc.h ├── CIntroduce.cpp ├── CIntroduce.h ├── CMyHideString.cpp ├── CMyHideString.h ├── LittleStringTools2.cpp ├── LittleStringTools2.h ├── LittleStringTools2.rc ├── LittleStringTools2.vcxproj ├── LittleStringTools2.vcxproj.filters ├── LittleStringTools2.vcxproj.user ├── LittleStringTools2Dlg.cpp ├── LittleStringTools2Dlg.h ├── framework.h ├── pch.cpp ├── pch.h ├── res │ ├── LittleStringTools2.ico │ └── LittleStringTools2.rc2 ├── resource.h └── targetver.h └── README.md /LittleStringTools2.sln: -------------------------------------------------------------------------------- 1 |  2 | Microsoft Visual Studio Solution File, Format Version 12.00 3 | # Visual Studio Version 16 4 | VisualStudioVersion = 16.0.32126.315 5 | MinimumVisualStudioVersion = 10.0.40219.1 6 | Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "LittleStringTools2", "LittleStringTools2\LittleStringTools2.vcxproj", "{CC0500A5-A6C7-4224-B000-8A7231CC26F1}" 7 | EndProject 8 | Global 9 | GlobalSection(SolutionConfigurationPlatforms) = preSolution 10 | Debug|x64 = Debug|x64 11 | Debug|x86 = Debug|x86 12 | Release|x64 = Release|x64 13 | Release|x86 = Release|x86 14 | EndGlobalSection 15 | GlobalSection(ProjectConfigurationPlatforms) = postSolution 16 | {CC0500A5-A6C7-4224-B000-8A7231CC26F1}.Debug|x64.ActiveCfg = Debug|x64 17 | {CC0500A5-A6C7-4224-B000-8A7231CC26F1}.Debug|x64.Build.0 = Debug|x64 18 | {CC0500A5-A6C7-4224-B000-8A7231CC26F1}.Debug|x86.ActiveCfg = Debug|Win32 19 | {CC0500A5-A6C7-4224-B000-8A7231CC26F1}.Debug|x86.Build.0 = Debug|Win32 20 | {CC0500A5-A6C7-4224-B000-8A7231CC26F1}.Release|x64.ActiveCfg = Release|x64 21 | {CC0500A5-A6C7-4224-B000-8A7231CC26F1}.Release|x64.Build.0 = Release|x64 22 | {CC0500A5-A6C7-4224-B000-8A7231CC26F1}.Release|x86.ActiveCfg = Release|Win32 23 | {CC0500A5-A6C7-4224-B000-8A7231CC26F1}.Release|x86.Build.0 = Release|Win32 24 | EndGlobalSection 25 | GlobalSection(SolutionProperties) = preSolution 26 | HideSolutionNode = FALSE 27 | EndGlobalSection 28 | GlobalSection(ExtensibilityGlobals) = postSolution 29 | SolutionGuid = {7F5DB98C-8AF7-45BB-8C11-1A24384D9A51} 30 | EndGlobalSection 31 | EndGlobal 32 | -------------------------------------------------------------------------------- /LittleStringTools2/CHideFunc.cpp: -------------------------------------------------------------------------------- 1 | // CHideFunc.cpp: 实现文件 2 | // 3 | 4 | #include "pch.h" 5 | #include "LittleStringTools2.h" 6 | #include "CHideFunc.h" 7 | #include "afxdialogex.h" 8 | #include 9 | #include 10 | 11 | 12 | char sDlls[][MAX_LEN] = { "Kernel32.dll","User32.dll","ADVAPI32.dll","SHLWAPI.dll","SHELL32.dll","Winmm.dll", 13 | "WS2_32.dll","IMM32.dll","WININET.dll","AVICAP32.dll","MSVFW32.dll","PSAPI.DLL","WTSAPI32.dll" ,"Mpr.dll","Dnsapi.dll","advapi32.dll"}; 14 | 15 | // CHideFunc 对话框 16 | 17 | IMPLEMENT_DYNAMIC(CHideFunc, CDialogEx) 18 | 19 | CHideFunc::CHideFunc(CWnd* pParent /*=nullptr*/) 20 | : CDialogEx(IDD_Func, pParent) 21 | , sShowFunc(_T("")) 22 | { 23 | 24 | } 25 | 26 | CHideFunc::~CHideFunc() 27 | { 28 | } 29 | 30 | BOOL CHideFunc::OnInitDialog() 31 | { 32 | CDialogEx::OnInitDialog(); 33 | 34 | for (int i = 0; i < sizeof(sDlls) / sizeof(sDlls[0]); i++) { 35 | //DllCCombox.AddString(sDlls[i]); 36 | DllCCombox.InsertString(-1, sDlls[i]); 37 | } 38 | 39 | DllCCombox.SetCurSel(0); 40 | DllCCombox.SetDlgItemInt(0, 9); 41 | return TRUE; return 0; 42 | } 43 | 44 | 45 | void CHideFunc::DoDataExchange(CDataExchange* pDX) 46 | { 47 | CDialogEx::DoDataExchange(pDX); 48 | DDX_Control(pDX, IDC_COMBO1, DllCCombox); 49 | DDX_Text(pDX, IDC_EDIT2, sShowFunc); 50 | //DDX_Check(pDX, IDC_CHECK1, IsFindDll); 51 | DDX_Control(pDX, IDC_EDIT1, sFunc); 52 | } 53 | 54 | 55 | BEGIN_MESSAGE_MAP(CHideFunc, CDialogEx) 56 | ON_BN_CLICKED(IDCANCEL, &CHideFunc::OnBnClickedCancel) 57 | ON_BN_CLICKED(IDOK, &CHideFunc::OnBnClickedOk) 58 | END_MESSAGE_MAP() 59 | 60 | string findDll(const string& sFunc) 61 | { 62 | for (int i = 0; i < sizeof(sDlls) / sizeof(sDlls[0]); i++) { 63 | HMODULE hDll = LoadLibraryA(sDlls[i]); 64 | if (hDll) { 65 | FARPROC functionAddress = GetProcAddress(hDll, sFunc.c_str()); 66 | if (functionAddress) { 67 | return sDlls[i]; 68 | } 69 | } 70 | } 71 | return ""; 72 | } 73 | 74 | 75 | // CHideFunc 结束进程 76 | void CHideFunc::OnBnClickedCancel() 77 | { 78 | // TODO: 在此添加控件通知处理程序代码 79 | GetParent()->DestroyWindow(); 80 | } 81 | 82 | 83 | bool IsDlls(char* sdll) { 84 | for (int i = 0; i < sizeof(sDlls) / sizeof(sDlls[0]); i++) { 85 | if (!strcmp(sDlls[i], sdll)) { 86 | return 1; 87 | } 88 | } 89 | return 0; 90 | } 91 | 92 | // 显示文本 93 | void CHideFunc::OnBnClickedOk() 94 | { 95 | // TODO: 在此添加控件通知处理程序代码 96 | CString sDll; 97 | CString sFuncName,input; 98 | string sFuncDef,strFirst,strLast, sFuncstr; 99 | 100 | // 根据函数定义获取函数名 101 | sFunc.GetWindowTextA(input); 102 | sFuncDef = input.GetBuffer(); 103 | std::regex pattern("(^.*?\\s+)((?:\\w+\\s+){0,1}(\\w+))(\\([\\s\\S]*)"); 104 | std::smatch matches; 105 | if (std::regex_search(sFuncDef, matches, pattern)) 106 | { 107 | strFirst = matches[1].str(); 108 | sFuncstr = matches[2].str(); 109 | sFuncName = matches[3].str().c_str(); 110 | strLast = matches[4].str(); 111 | } 112 | 113 | // 判断函数名是否为空 114 | if (sFuncName.IsEmpty()){ 115 | sShowFunc = "函数名不能为空"; 116 | UpdateData(FALSE); 117 | return; 118 | } 119 | 120 | DllCCombox.GetWindowTextA(sDll); 121 | // 自动寻找dll,如果dll名不在数组中,则sdll值为输入值 122 | if (IsDlls(sDll.GetBuffer())) { 123 | sDll = ""; 124 | } 125 | 126 | // 如果在数组中,则自动选择dll文件 127 | if (sDll.IsEmpty()) 128 | { 129 | sDll = findDll(sFuncName.GetBuffer()).c_str(); 130 | if (sDll.IsEmpty()) 131 | { 132 | sShowFunc = "未找到dll,请手动输入"; 133 | UpdateData(FALSE); 134 | return; 135 | } 136 | } 137 | 138 | 139 | // 根据dll名,自动拼接需要的字符串 140 | sShowFunc.Format("typedef %s(*%sFunc)%s\r\n\ 141 | HMODULE h%s = LoadLibrary((LPCSTR)\"%s\");\r\n\ 142 | %sFunc p%s = (%sFunc)GetProcAddress(h%s, (LPCSTR)\"%s\");\ 143 | ", strFirst.c_str(), sFuncstr.c_str(), strLast.c_str(),sDll.Left(sDll.Find('.')).GetBuffer(), 144 | sDll.GetBuffer(),sFuncName.GetBuffer(), sFuncName.GetBuffer(),sFuncName.GetBuffer(), sDll.Left(sDll.Find('.')).GetBuffer(), sFuncName.GetBuffer()); 145 | 146 | UpdateData(FALSE); 147 | } 148 | 149 | 150 | BOOL CHideFunc::PreTranslateMessage(MSG* pMsg) 151 | { 152 | return CDialogEx::PreTranslateMessage(pMsg); 153 | } 154 | -------------------------------------------------------------------------------- /LittleStringTools2/CHideFunc.h: -------------------------------------------------------------------------------- 1 | #pragma once 2 | #include 3 | #define MAX_LEN 255 4 | 5 | 6 | using namespace std; 7 | // CHideFunc 对话框 8 | 9 | 10 | 11 | 12 | class CHideFunc : public CDialogEx 13 | { 14 | DECLARE_DYNAMIC(CHideFunc) 15 | 16 | public: 17 | CHideFunc(CWnd* pParent = nullptr); // 标准构造函数 18 | virtual ~CHideFunc(); 19 | 20 | // 对话框数据 21 | #ifdef AFX_DESIGN_TIME 22 | enum { IDD = IDD_Func }; 23 | #endif 24 | 25 | public: 26 | 27 | protected: 28 | virtual BOOL OnInitDialog(); 29 | virtual void DoDataExchange(CDataExchange* pDX); // DDX/DDV 支持 30 | 31 | DECLARE_MESSAGE_MAP() 32 | 33 | 34 | public: 35 | afx_msg void OnBnClickedCancel(); 36 | 37 | 38 | CComboBox DllCCombox; 39 | afx_msg void OnBnClickedOk(); 40 | CString sShowFunc; 41 | //BOOL IsFindDll; 42 | CEdit sFunc; 43 | virtual BOOL PreTranslateMessage(MSG* pMsg); 44 | }; 45 | -------------------------------------------------------------------------------- /LittleStringTools2/CIntroduce.cpp: -------------------------------------------------------------------------------- 1 | // CIntroduce.cpp: 实现文件 2 | // 3 | 4 | #include "pch.h" 5 | #include "LittleStringTools2.h" 6 | #include "CIntroduce.h" 7 | #include "afxdialogex.h" 8 | 9 | #define MULTILINE(...) #__VA_ARGS__ 10 | // CIntroduce 对话框 11 | 12 | IMPLEMENT_DYNAMIC(CIntroduce, CDialogEx) 13 | 14 | CIntroduce::CIntroduce(CWnd* pParent /*=nullptr*/) 15 | : CDialogEx(IDD_About, pParent) 16 | , sIntruduce(_T("")) 17 | { 18 | sIntruduce = MULTILINE( 19 | 字符串隐藏使用说明\r\n 20 | 输入 char* k = "hello world"; 或 char k[] = "hello world"; 或 "hello world" 都可以 \r\n 21 | 输出可以指定变量名的变量(默认随机变量)\r\n 22 | unsigned char eV2gv[] = { 0x68, 0x65, 0x6C, 0x6C, 0x6F, 0x20, 0x77, 0x6F, 0x72, 0x6C, 0x64, 0x00 };\r\n\r\n 23 | 24 | 25 | 函数调用的使用说明\r\n 26 | 输入函数定义,例如:\r\n 27 | BOOL CreateProcessA(\r\n 28 | [in, optional]\t LPCSTR \t lpApplicationName, \r\n 29 | [in, out, optional]\t LPSTR \t lpCommandLine, \r\n 30 | [in, optional]\t LPSECURITY_ATTRIBUTES\t lpProcessAttributes, \r\n 31 | [in, optional]\t LPSECURITY_ATTRIBUTES\t lpThreadAttributes, \r\n 32 | [in] \t BOOL \t bInheritHandles, \r\n 33 | [in] \t DWORD \t dwCreationFlags, \r\n 34 | [in, optional]\t LPVOID \t lpEnvironment, \r\n 35 | [in, optional]\t LPCSTR \t lpCurrentDirectory, \r\n 36 | [in] \t LPSTARTUPINFOA \t lpStartupInfo, \r\n 37 | [out] \t LPPROCESS_INFORMATION\t lpProcessInformation\r\n 38 | );\r\n 39 | 40 | 输出:\r\n 41 | typedef BOOL (*CreateProcessAFunc)(\r\n 42 | [in, optional]\t LPCSTR \t lpApplicationName, \r\n 43 | [in, out, optional]\t LPSTR \t lpCommandLine, \r\n 44 | [in, optional]\t LPSECURITY_ATTRIBUTES\t lpProcessAttributes, \r\n 45 | [in, optional]\t LPSECURITY_ATTRIBUTES\t lpThreadAttributes, \r\n 46 | [in] \t BOOL \t bInheritHandles, \r\n 47 | [in] \t DWORD \t dwCreationFlags, \r\n 48 | [in, optional]\t LPVOID \t lpEnvironment, \r\n 49 | [in, optional]\t LPCSTR \t lpCurrentDirectory, \r\n 50 | [in] \t LPSTARTUPINFOA \t lpStartupInfo, \r\n 51 | [out] \t LPPROCESS_INFORMATION\t lpProcessInformation\r\n 52 | ); \r\n \r\n 53 | 54 | HMODULE hKernel32 = LoadLibrary((LPCSTR)"Kernel32.dll");\r\n 55 | CreateProcessAFunc pCreateProcessA = (CreateProcessAFunc)GetProcAddress(hKernel32, (LPCSTR)"CreateProcessA");\r\n 56 | 57 | 58 | ); 59 | } 60 | 61 | CIntroduce::~CIntroduce() 62 | { 63 | } 64 | 65 | void CIntroduce::DoDataExchange(CDataExchange* pDX) 66 | { 67 | CDialogEx::DoDataExchange(pDX); 68 | DDX_Text(pDX, IDC_EDIT1, sIntruduce); 69 | } 70 | 71 | 72 | BEGIN_MESSAGE_MAP(CIntroduce, CDialogEx) 73 | 74 | END_MESSAGE_MAP() 75 | 76 | 77 | // CIntroduce 消息处理程序 78 | -------------------------------------------------------------------------------- /LittleStringTools2/CIntroduce.h: -------------------------------------------------------------------------------- 1 | #pragma once 2 | 3 | 4 | // CIntroduce 对话框 5 | 6 | class CIntroduce : public CDialogEx 7 | { 8 | DECLARE_DYNAMIC(CIntroduce) 9 | 10 | public: 11 | CIntroduce(CWnd* pParent = nullptr); // 标准构造函数 12 | virtual ~CIntroduce(); 13 | 14 | // 对话框数据 15 | #ifdef AFX_DESIGN_TIME 16 | enum { IDD = IDD_About }; 17 | #endif 18 | 19 | protected: 20 | virtual void DoDataExchange(CDataExchange* pDX); // DDX/DDV 支持 21 | 22 | DECLARE_MESSAGE_MAP() 23 | public: 24 | afx_msg void OnBnClickedCancel(); 25 | CString sIntruduce; 26 | }; 27 | -------------------------------------------------------------------------------- /LittleStringTools2/CMyHideString.cpp: -------------------------------------------------------------------------------- 1 | // CMyHideString.cpp: 实现文件 2 | // 3 | 4 | #include "pch.h" 5 | #include "LittleStringTools2.h" 6 | #include "CMyHideString.h" 7 | #include "afxdialogex.h" 8 | 9 | 10 | 11 | void GenerateString(CString& dest, const unsigned int len) 12 | { 13 | dest = ""; 14 | const unsigned char allChar[63] = "0123456789abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ"; 15 | unsigned int cnt, randNo; 16 | srand((unsigned int)time(NULL)); 17 | 18 | for (cnt = 0; cnt < len; cnt++) 19 | { 20 | randNo = rand() % 62; 21 | char c = allChar[randNo]; 22 | dest += c; 23 | } 24 | } 25 | 26 | // CMyHideString 对话框 27 | IMPLEMENT_DYNAMIC(CMyHideString, CDialogEx) 28 | 29 | CMyHideString::CMyHideString(CWnd* pParent /*=nullptr*/) 30 | : CDialogEx(IDD_String, pParent) 31 | , sVar(_T("")) 32 | , eLen(0) 33 | , sRaw(_T("")) 34 | , sOut(_T("")) 35 | { 36 | } 37 | 38 | CMyHideString::~CMyHideString() 39 | { 40 | } 41 | 42 | BOOL CMyHideString::OnInitDialog() 43 | { 44 | CDialogEx::OnInitDialog(); 45 | eLen = 5; 46 | eLenOld = eLen; 47 | CEdit* pEdit = (CEdit*)GetDlgItem(IDC_EDIT4); 48 | m_LenSpin.SetBuddy(pEdit); 49 | m_LenSpin.SetRange(5, 20); 50 | m_LenSpin.SetPos(eLen); 51 | 52 | 53 | GenerateString(sVar, eLen); 54 | UpdateData(FALSE); 55 | 56 | return TRUE; 57 | } 58 | 59 | void CMyHideString::DoDataExchange(CDataExchange* pDX) 60 | { 61 | CDialogEx::DoDataExchange(pDX); 62 | DDX_Text(pDX, IDC_EDIT3, sVar); 63 | DDX_Control(pDX, IDC_SPIN1, m_LenSpin); 64 | DDX_Text(pDX, IDC_EDIT4, eLen); 65 | DDV_MinMaxInt(pDX, eLen, 5, 20); 66 | DDX_Text(pDX, IDC_EDIT1, sRaw); 67 | DDX_Text(pDX, IDC_EDIT2, sOut); 68 | } 69 | 70 | 71 | BEGIN_MESSAGE_MAP(CMyHideString, CDialogEx) 72 | ON_BN_CLICKED(IDCANCEL, &CMyHideString::OnBnClickedCancel) 73 | ON_BN_CLICKED(IDCANCEL2, &CMyHideString::OnBnClickedCancel2) 74 | ON_BN_CLICKED(IDOK, &CMyHideString::OnBnClickedOk) 75 | END_MESSAGE_MAP() 76 | 77 | 78 | // CMyHideString 消息处理程序 79 | 80 | void CMyHideString::OnBnClickedCancel() 81 | { 82 | // TODO: 在此添加控件通知处理程序代码 83 | GetParent()->DestroyWindow(); 84 | } 85 | 86 | 87 | // 生成随机变量名 88 | void CMyHideString::OnBnClickedCancel2() 89 | { 90 | // TODO: 在此添加控件通知处理程序代码 91 | eLen = GetDlgItemInt(IDC_EDIT4); 92 | GenerateString(sVar, eLen); 93 | 94 | SetDlgItemText(IDC_EDIT3, sVar); 95 | 96 | //UpdateData(FALSE); 97 | } 98 | 99 | 100 | void HexToAscii(unsigned char* pHex, CString& pAscii, int nHexLen) 101 | { 102 | char Nibble[2]{}; 103 | for (int i = 0; i < nHexLen; i++) 104 | { 105 | Nibble[0] = (pHex[i] & 0xF0) >> 4; 106 | Nibble[1] = pHex[i] & 0x0F; 107 | for (int j = 0; j < 2; j++) 108 | { 109 | if (Nibble[j] < 10) 110 | Nibble[j] += 0x30; 111 | else 112 | { 113 | if (Nibble[j] < 16) 114 | Nibble[j] = Nibble[j] - 10 + 'A'; 115 | } 116 | 117 | } // for (int j = ...) 118 | pAscii += "0x"; 119 | pAscii = pAscii + Nibble[0] + Nibble[1] + ", "; 120 | } // for (int i = ...) 121 | } 122 | 123 | // 生成动态调用字符串 124 | void CMyHideString::OnBnClickedOk() 125 | { 126 | // TODO: 在此添加控件通知处理程序代码 127 | GetDlgItemText(IDC_EDIT1, sRaw); 128 | if (sRaw.IsEmpty()) { 129 | return; 130 | } 131 | 132 | int i = sRaw.Find("\""); 133 | int j = sRaw.Find("\"", i + 1); 134 | 135 | if (i != -1) { 136 | // 截取字符串 137 | CString data = sRaw.Mid(i + 1, j - i - 1); 138 | eLen = GetDlgItemInt(IDC_EDIT4); 139 | if(eLenOld != eLen){ 140 | OnBnClickedCancel2(); 141 | eLenOld = eLen; 142 | } 143 | sOut = "unsigned char " + sVar + "[] = {"; 144 | HexToAscii((unsigned char*)data.GetBuffer(), sOut, data.GetLength()); 145 | sOut += " 0x00};\r\n"; 146 | 147 | } 148 | 149 | SetDlgItemText(IDC_EDIT2, sOut); 150 | } 151 | -------------------------------------------------------------------------------- /LittleStringTools2/CMyHideString.h: -------------------------------------------------------------------------------- 1 | #pragma once 2 | 3 | 4 | // CMyHideString 对话框 5 | 6 | class CMyHideString : public CDialogEx 7 | { 8 | DECLARE_DYNAMIC(CMyHideString) 9 | 10 | public: 11 | CMyHideString(CWnd* pParent = nullptr); // 标准构造函数 12 | virtual ~CMyHideString(); 13 | 14 | // 对话框数据 15 | #ifdef AFX_DESIGN_TIME 16 | enum { IDD = IDD_String }; 17 | #endif 18 | 19 | protected: 20 | virtual BOOL OnInitDialog(); 21 | virtual void DoDataExchange(CDataExchange* pDX); // DDX/DDV 支持 22 | 23 | DECLARE_MESSAGE_MAP() 24 | public: 25 | afx_msg void OnBnClickedCancel(); 26 | CString sVar; 27 | CSpinButtonCtrl m_LenSpin; 28 | 29 | INT eLen,eLenOld; 30 | afx_msg void OnBnClickedCancel2(); 31 | afx_msg void OnBnClickedOk(); 32 | CString sRaw; 33 | CString sOut; 34 | }; 35 | -------------------------------------------------------------------------------- /LittleStringTools2/LittleStringTools2.cpp: -------------------------------------------------------------------------------- 1 |  2 | // LittleStringTools2.cpp: 定义应用程序的类行为。 3 | // 4 | 5 | #include "pch.h" 6 | #include "framework.h" 7 | #include "LittleStringTools2.h" 8 | #include "LittleStringTools2Dlg.h" 9 | 10 | #ifdef _DEBUG 11 | #define new DEBUG_NEW 12 | #endif 13 | 14 | 15 | // CLittleStringTools2App 16 | 17 | BEGIN_MESSAGE_MAP(CLittleStringTools2App, CWinApp) 18 | ON_COMMAND(ID_HELP, &CWinApp::OnHelp) 19 | END_MESSAGE_MAP() 20 | 21 | 22 | // CLittleStringTools2App 构造 23 | 24 | CLittleStringTools2App::CLittleStringTools2App() 25 | { 26 | // 支持重新启动管理器 27 | m_dwRestartManagerSupportFlags = AFX_RESTART_MANAGER_SUPPORT_RESTART; 28 | 29 | // TODO: 在此处添加构造代码, 30 | // 将所有重要的初始化放置在 InitInstance 中 31 | } 32 | 33 | 34 | // 唯一的 CLittleStringTools2App 对象 35 | 36 | CLittleStringTools2App theApp; 37 | 38 | 39 | // CLittleStringTools2App 初始化 40 | 41 | BOOL CLittleStringTools2App::InitInstance() 42 | { 43 | // 如果一个运行在 Windows XP 上的应用程序清单指定要 44 | // 使用 ComCtl32.dll 版本 6 或更高版本来启用可视化方式, 45 | //则需要 InitCommonControlsEx()。 否则,将无法创建窗口。 46 | INITCOMMONCONTROLSEX InitCtrls; 47 | InitCtrls.dwSize = sizeof(InitCtrls); 48 | // 将它设置为包括所有要在应用程序中使用的 49 | // 公共控件类。 50 | InitCtrls.dwICC = ICC_WIN95_CLASSES; 51 | InitCommonControlsEx(&InitCtrls); 52 | 53 | CWinApp::InitInstance(); 54 | 55 | 56 | // 创建 shell 管理器,以防对话框包含 57 | // 任何 shell 树视图控件或 shell 列表视图控件。 58 | CShellManager *pShellManager = new CShellManager; 59 | 60 | // 激活“Windows Native”视觉管理器,以便在 MFC 控件中启用主题 61 | CMFCVisualManager::SetDefaultManager(RUNTIME_CLASS(CMFCVisualManagerWindows)); 62 | 63 | // 标准初始化 64 | // 如果未使用这些功能并希望减小 65 | // 最终可执行文件的大小,则应移除下列 66 | // 不需要的特定初始化例程 67 | // 更改用于存储设置的注册表项 68 | // TODO: 应适当修改该字符串, 69 | // 例如修改为公司或组织名 70 | SetRegistryKey(_T("应用程序向导生成的本地应用程序")); 71 | 72 | CLittleStringTools2Dlg dlg; 73 | m_pMainWnd = &dlg; 74 | INT_PTR nResponse = dlg.DoModal(); 75 | if (nResponse == IDOK) 76 | { 77 | // TODO: 在此放置处理何时用 78 | // “确定”来关闭对话框的代码 79 | } 80 | else if (nResponse == IDCANCEL) 81 | { 82 | // TODO: 在此放置处理何时用 83 | // “取消”来关闭对话框的代码 84 | } 85 | else if (nResponse == -1) 86 | { 87 | TRACE(traceAppMsg, 0, "警告: 对话框创建失败,应用程序将意外终止。\n"); 88 | TRACE(traceAppMsg, 0, "警告: 如果您在对话框上使用 MFC 控件,则无法 #define _AFX_NO_MFC_CONTROLS_IN_DIALOGS。\n"); 89 | } 90 | 91 | // 删除上面创建的 shell 管理器。 92 | if (pShellManager != nullptr) 93 | { 94 | delete pShellManager; 95 | } 96 | 97 | #if !defined(_AFXDLL) && !defined(_AFX_NO_MFC_CONTROLS_IN_DIALOGS) 98 | ControlBarCleanUp(); 99 | #endif 100 | 101 | // 由于对话框已关闭,所以将返回 FALSE 以便退出应用程序, 102 | // 而不是启动应用程序的消息泵。 103 | return FALSE; 104 | } 105 | 106 | -------------------------------------------------------------------------------- /LittleStringTools2/LittleStringTools2.h: -------------------------------------------------------------------------------- 1 |  2 | // LittleStringTools2.h: PROJECT_NAME 应用程序的主头文件 3 | // 4 | 5 | #pragma once 6 | 7 | #ifndef __AFXWIN_H__ 8 | #error "在包含此文件之前包含 'pch.h' 以生成 PCH" 9 | #endif 10 | 11 | #include "resource.h" // 主符号 12 | 13 | 14 | // CLittleStringTools2App: 15 | // 有关此类的实现,请参阅 LittleStringTools2.cpp 16 | // 17 | 18 | class CLittleStringTools2App : public CWinApp 19 | { 20 | public: 21 | CLittleStringTools2App(); 22 | 23 | // 重写 24 | public: 25 | virtual BOOL InitInstance(); 26 | 27 | // 实现 28 | 29 | DECLARE_MESSAGE_MAP() 30 | }; 31 | 32 | extern CLittleStringTools2App theApp; 33 | -------------------------------------------------------------------------------- /LittleStringTools2/LittleStringTools2.rc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rixoye/BypassAvTool/f13047d8cf9419e2a7b0d54fb32f70b5a7757eb3/LittleStringTools2/LittleStringTools2.rc -------------------------------------------------------------------------------- /LittleStringTools2/LittleStringTools2.vcxproj: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | Debug 6 | Win32 7 | 8 | 9 | Release 10 | Win32 11 | 12 | 13 | Debug 14 | x64 15 | 16 | 17 | Release 18 | x64 19 | 20 | 21 | 22 | 16.0 23 | {CC0500A5-A6C7-4224-B000-8A7231CC26F1} 24 | MFCProj 25 | LittleStringTools2 26 | 10.0 27 | 28 | 29 | 30 | Application 31 | true 32 | v142 33 | Unicode 34 | Static 35 | 36 | 37 | Application 38 | false 39 | v142 40 | true 41 | Unicode 42 | Static 43 | 44 | 45 | Application 46 | true 47 | v142 48 | MultiByte 49 | Static 50 | 51 | 52 | Application 53 | false 54 | v142 55 | true 56 | MultiByte 57 | Static 58 | 59 | 60 | 61 | 62 | 63 | 64 | 65 | 66 | 67 | 68 | 69 | 70 | 71 | 72 | 73 | 74 | 75 | 76 | 77 | 78 | true 79 | 80 | 81 | true 82 | 83 | 84 | false 85 | 86 | 87 | false 88 | 89 | 90 | 91 | Use 92 | Level3 93 | true 94 | WIN32;_WINDOWS;_DEBUG;%(PreprocessorDefinitions) 95 | pch.h 96 | 97 | 98 | Windows 99 | 100 | 101 | false 102 | true 103 | _DEBUG;%(PreprocessorDefinitions) 104 | 105 | 106 | 0x0804 107 | _DEBUG;%(PreprocessorDefinitions) 108 | $(IntDir);%(AdditionalIncludeDirectories) 109 | 110 | 111 | 112 | 113 | Use 114 | Level3 115 | true 116 | _WINDOWS;_DEBUG;%(PreprocessorDefinitions) 117 | pch.h 118 | 119 | 120 | Windows 121 | 122 | 123 | false 124 | true 125 | _DEBUG;%(PreprocessorDefinitions) 126 | 127 | 128 | 0x0804 129 | _DEBUG;%(PreprocessorDefinitions) 130 | $(IntDir);%(AdditionalIncludeDirectories) 131 | 132 | 133 | 134 | 135 | Use 136 | Level3 137 | true 138 | true 139 | true 140 | WIN32;_WINDOWS;NDEBUG;%(PreprocessorDefinitions) 141 | pch.h 142 | 143 | 144 | Windows 145 | true 146 | true 147 | 148 | 149 | false 150 | true 151 | NDEBUG;%(PreprocessorDefinitions) 152 | 153 | 154 | 0x0804 155 | NDEBUG;%(PreprocessorDefinitions) 156 | $(IntDir);%(AdditionalIncludeDirectories) 157 | 158 | 159 | 160 | 161 | Use 162 | Level3 163 | true 164 | true 165 | true 166 | _WINDOWS;NDEBUG;%(PreprocessorDefinitions) 167 | pch.h 168 | 169 | 170 | Windows 171 | true 172 | true 173 | false 174 | 175 | 176 | false 177 | true 178 | NDEBUG;%(PreprocessorDefinitions) 179 | 180 | 181 | 0x0804 182 | NDEBUG;%(PreprocessorDefinitions) 183 | $(IntDir);%(AdditionalIncludeDirectories) 184 | 185 | 186 | 187 | 188 | 189 | 190 | 191 | 192 | 193 | 194 | 195 | 196 | 197 | 198 | 199 | 200 | 201 | 202 | 203 | 204 | Create 205 | Create 206 | Create 207 | Create 208 | 209 | 210 | 211 | 212 | 213 | 214 | 215 | 216 | 217 | 218 | 219 | 220 | 221 | 222 | -------------------------------------------------------------------------------- /LittleStringTools2/LittleStringTools2.vcxproj.filters: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | 5 | 源码 6 | 7 | 8 | 主界面 9 | 10 | 11 | 函数调用隐藏 12 | 13 | 14 | 函数介绍页 15 | 16 | 17 | 字符串隐藏 18 | 19 | 20 | 源码 21 | 22 | 23 | 24 | 25 | 主界面 26 | 27 | 28 | 源码 29 | 30 | 31 | 函数调用隐藏 32 | 33 | 34 | 函数介绍页 35 | 36 | 37 | 字符串隐藏 38 | 39 | 40 | 源码 41 | 42 | 43 | 源码 44 | 45 | 46 | 源码 47 | 48 | 49 | 源码 50 | 51 | 52 | 53 | 54 | {60dc6d80-4166-4b80-beb7-3e5b661c94b2} 55 | 56 | 57 | {55193062-fb16-43b9-b4b9-f1fb836d94b0} 58 | 59 | 60 | {64f2e45c-4384-4aeb-b60a-6526446d1907} 61 | 62 | 63 | {daf50a10-e666-41eb-aebb-94e982510993} 64 | 65 | 66 | {5291a1d0-6006-4df7-a78d-b6088724fa98} 67 | 68 | 69 | 70 | 71 | 源码 72 | 73 | 74 | 75 | 76 | 源码 77 | 78 | 79 | 80 | 81 | 源码 82 | 83 | 84 | -------------------------------------------------------------------------------- /LittleStringTools2/LittleStringTools2.vcxproj.user: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | LittleStringTools2.rc 5 | 6 | -------------------------------------------------------------------------------- /LittleStringTools2/LittleStringTools2Dlg.cpp: -------------------------------------------------------------------------------- 1 |  2 | // LittleStringTools2Dlg.cpp: 实现文件 3 | // 4 | 5 | #include "pch.h" 6 | #include "framework.h" 7 | #include "LittleStringTools2.h" 8 | #include "LittleStringTools2Dlg.h" 9 | #include "afxdialogex.h" 10 | 11 | #ifdef _DEBUG 12 | #define new DEBUG_NEW 13 | #endif 14 | 15 | 16 | // CLittleStringTools2Dlg 对话框 17 | CLittleStringTools2Dlg::CLittleStringTools2Dlg(CWnd* pParent /*=nullptr*/) 18 | : CDialogEx(IDD_LITTLESTRINGTOOLS2_DIALOG, pParent) 19 | { 20 | m_hIcon = AfxGetApp()->LoadIcon(IDR_MAINFRAME); 21 | } 22 | 23 | void CLittleStringTools2Dlg::DoDataExchange(CDataExchange* pDX) 24 | { 25 | CDialogEx::DoDataExchange(pDX); 26 | DDX_Control(pDX, IDC_TAB1, ToolTab); 27 | } 28 | 29 | void CLittleStringTools2Dlg::OnSize(UINT nType, int cx, int cy) 30 | { 31 | CDialogEx::OnSize(nType, cx, cy); 32 | 33 | CDialogEx* pWnd[3]{}; 34 | if (m_page1)pWnd[0] = &m_page1; 35 | if (m_page2)pWnd[1] = &m_page2; 36 | if (m_page3)pWnd[2] = &m_page3; 37 | 38 | 39 | for (int i = 0; i < 3; i++) 40 | { 41 | //获取控件句柄 42 | if (pWnd[i])//判断是否为空,因为对话框创建时会调用此函数,而当时控件还未创建 43 | { 44 | CRect rc; 45 | this->GetClientRect(&rc); 46 | rc.DeflateRect(2, 40, 2, 2); 47 | pWnd[i]->MoveWindow(rc); 48 | 49 | } 50 | } 51 | 52 | 53 | } 54 | 55 | BEGIN_MESSAGE_MAP(CLittleStringTools2Dlg, CDialogEx) 56 | ON_WM_PAINT() 57 | ON_WM_QUERYDRAGICON() 58 | ON_WM_SIZE() 59 | ON_NOTIFY(TCN_SELCHANGE, IDC_TAB1, &CLittleStringTools2Dlg::OnTcnSelchangeTab1) 60 | END_MESSAGE_MAP() 61 | 62 | 63 | // CLittleStringTools2Dlg 消息处理程序 64 | BOOL CLittleStringTools2Dlg::OnInitDialog() 65 | { 66 | CDialogEx::OnInitDialog(); 67 | 68 | // 设置此对话框的图标。 当应用程序主窗口不是对话框时,框架将自动 69 | // 执行此操作 70 | SetIcon(m_hIcon, TRUE); // 设置大图标 71 | SetIcon(m_hIcon, FALSE); // 设置小图标 72 | 73 | // TODO: 在此添加额外的初始化代码 74 | 75 | ToolTab.InsertItem(0, "字符串隐藏"); 76 | ToolTab.InsertItem(1, "动态函数调用"); 77 | ToolTab.InsertItem(2, "使用说明"); 78 | 79 | 80 | 81 | //创建子窗口 82 | m_page1.Create(IDD_String, GetDlgItem(IDD_LITTLESTRINGTOOLS2_DIALOG)); 83 | m_page2.Create(IDD_Func, GetDlgItem(IDD_LITTLESTRINGTOOLS2_DIALOG)); 84 | m_page3.Create(IDD_About, GetDlgItem(IDD_LITTLESTRINGTOOLS2_DIALOG)); 85 | 86 | //控制两个窗口的大小 87 | CRect rc; 88 | ToolTab.GetClientRect(&rc); 89 | rc.DeflateRect(2, 40, 2, 2); 90 | m_page1.MoveWindow(&rc); 91 | m_page2.MoveWindow(&rc); 92 | m_page3.MoveWindow(&rc); 93 | 94 | 95 | //显示第一个子窗口 96 | m_page1.ShowWindow(SW_SHOW); 97 | m_page2.ShowWindow(SW_HIDE); 98 | m_page3.ShowWindow(SW_HIDE); 99 | 100 | //开启防双开 101 | HANDLE hMutex = CreateMutexA(NULL, FALSE, "YJ"); 102 | if (hMutex) 103 | { 104 | if (GetLastError() == ERROR_ALREADY_EXISTS) 105 | { 106 | MessageBox("双开程序了"); 107 | ExitProcess(-1); 108 | } 109 | } 110 | return TRUE; // 除非将焦点设置到控件,否则返回 TRUE 111 | } 112 | 113 | // 如果向对话框添加最小化按钮,则需要下面的代码 114 | // 来绘制该图标。 对于使用文档/视图模型的 MFC 应用程序, 115 | // 这将由框架自动完成。 116 | void CLittleStringTools2Dlg::OnPaint() 117 | { 118 | if (IsIconic()) 119 | { 120 | CPaintDC dc(this); // 用于绘制的设备上下文 121 | 122 | SendMessage(WM_ICONERASEBKGND, reinterpret_cast(dc.GetSafeHdc()), 0); 123 | 124 | // 使图标在工作区矩形中居中 125 | int cxIcon = GetSystemMetrics(SM_CXICON); 126 | int cyIcon = GetSystemMetrics(SM_CYICON); 127 | CRect rect; 128 | GetClientRect(&rect); 129 | int x = (rect.Width() - cxIcon + 1) / 2; 130 | int y = (rect.Height() - cyIcon + 1) / 2; 131 | 132 | // 绘制图标 133 | dc.DrawIcon(x, y, m_hIcon); 134 | } 135 | else 136 | { 137 | CDialogEx::OnPaint(); 138 | } 139 | } 140 | 141 | //当用户拖动最小化窗口时系统调用此函数取得光标 142 | //显示。 143 | HCURSOR CLittleStringTools2Dlg::OnQueryDragIcon() 144 | { 145 | return static_cast(m_hIcon); 146 | } 147 | 148 | 149 | 150 | void CLittleStringTools2Dlg::OnTcnSelchangeTab1(NMHDR* pNMHDR, LRESULT* pResult) 151 | { 152 | // TODO: 在此添加控件通知处理程序代码 153 | int CurSel = ToolTab.GetCurSel(); 154 | switch (CurSel) 155 | { 156 | case 0: 157 | m_page1.ShowWindow(true); 158 | m_page2.ShowWindow(false); 159 | m_page3.ShowWindow(false); 160 | break; 161 | case 1: 162 | m_page1.ShowWindow(false); 163 | m_page2.ShowWindow(true); 164 | m_page3.ShowWindow(false); 165 | break; 166 | case 2: 167 | m_page1.ShowWindow(false); 168 | m_page2.ShowWindow(false); 169 | m_page3.ShowWindow(true); 170 | break; 171 | default: 172 | break; 173 | } 174 | 175 | 176 | } 177 | -------------------------------------------------------------------------------- /LittleStringTools2/LittleStringTools2Dlg.h: -------------------------------------------------------------------------------- 1 |  2 | // LittleStringTools2Dlg.h: 头文件 3 | // 4 | 5 | #pragma once 6 | #include "CHideFunc.h" 7 | #include "CIntroduce.h" 8 | #include "CMyHideString.h" 9 | 10 | // CLittleStringTools2Dlg 对话框 11 | class CLittleStringTools2Dlg : public CDialogEx 12 | { 13 | // 构造 14 | public: 15 | CLittleStringTools2Dlg(CWnd* pParent = nullptr); // 标准构造函数 16 | 17 | // 对话框数据 18 | #ifdef AFX_DESIGN_TIME 19 | enum { IDD = IDD_LITTLESTRINGTOOLS2_DIALOG }; 20 | #endif 21 | 22 | protected: 23 | virtual void DoDataExchange(CDataExchange* pDX); // DDX/DDV 支持 24 | afx_msg void OnSize(UINT nType, int cx, int cy); 25 | 26 | // 实现 27 | protected: 28 | HICON m_hIcon; 29 | 30 | // 生成的消息映射函数 31 | virtual BOOL OnInitDialog(); 32 | afx_msg void OnPaint(); 33 | afx_msg HCURSOR OnQueryDragIcon(); 34 | DECLARE_MESSAGE_MAP() 35 | 36 | CMyHideString m_page1; 37 | CHideFunc m_page2; 38 | CIntroduce m_page3; 39 | 40 | public: 41 | CTabCtrl ToolTab; 42 | afx_msg void OnTcnSelchangeTab1(NMHDR* pNMHDR, LRESULT* pResult); 43 | }; 44 | -------------------------------------------------------------------------------- /LittleStringTools2/framework.h: -------------------------------------------------------------------------------- 1 | #pragma once 2 | 3 | #ifndef VC_EXTRALEAN 4 | #define VC_EXTRALEAN // 从 Windows 头中排除极少使用的资料 5 | #endif 6 | 7 | #include "targetver.h" 8 | 9 | #define _ATL_CSTRING_EXPLICIT_CONSTRUCTORS // 某些 CString 构造函数将是显式的 10 | 11 | // 关闭 MFC 的一些常见且经常可放心忽略的隐藏警告消息 12 | #define _AFX_ALL_WARNINGS 13 | 14 | #include // MFC 核心组件和标准组件 15 | #include // MFC 扩展 16 | 17 | 18 | 19 | 20 | 21 | #ifndef _AFX_NO_OLE_SUPPORT 22 | #include // MFC 对 Internet Explorer 4 公共控件的支持 23 | #endif 24 | #ifndef _AFX_NO_AFXCMN_SUPPORT 25 | #include // MFC 对 Windows 公共控件的支持 26 | #endif // _AFX_NO_AFXCMN_SUPPORT 27 | 28 | #include // MFC 支持功能区和控制条 29 | 30 | 31 | 32 | 33 | 34 | 35 | 36 | 37 | 38 | #ifdef _UNICODE 39 | #if defined _M_IX86 40 | #pragma comment(linker,"/manifestdependency:\"type='win32' name='Microsoft.Windows.Common-Controls' version='6.0.0.0' processorArchitecture='x86' publicKeyToken='6595b64144ccf1df' language='*'\"") 41 | #elif defined _M_X64 42 | #pragma comment(linker,"/manifestdependency:\"type='win32' name='Microsoft.Windows.Common-Controls' version='6.0.0.0' processorArchitecture='amd64' publicKeyToken='6595b64144ccf1df' language='*'\"") 43 | #else 44 | #pragma comment(linker,"/manifestdependency:\"type='win32' name='Microsoft.Windows.Common-Controls' version='6.0.0.0' processorArchitecture='*' publicKeyToken='6595b64144ccf1df' language='*'\"") 45 | #endif 46 | #endif 47 | 48 | 49 | -------------------------------------------------------------------------------- /LittleStringTools2/pch.cpp: -------------------------------------------------------------------------------- 1 | // pch.cpp: 与预编译标头对应的源文件 2 | 3 | #include "pch.h" 4 | 5 | // 当使用预编译的头时,需要使用此源文件,编译才能成功。 6 | -------------------------------------------------------------------------------- /LittleStringTools2/pch.h: -------------------------------------------------------------------------------- 1 | // pch.h: 这是预编译标头文件。 2 | // 下方列出的文件仅编译一次,提高了将来生成的生成性能。 3 | // 这还将影响 IntelliSense 性能,包括代码完成和许多代码浏览功能。 4 | // 但是,如果此处列出的文件中的任何一个在生成之间有更新,它们全部都将被重新编译。 5 | // 请勿在此处添加要频繁更新的文件,这将使得性能优势无效。 6 | 7 | #ifndef PCH_H 8 | #define PCH_H 9 | 10 | // 添加要在此处预编译的标头 11 | #include "framework.h" 12 | 13 | #endif //PCH_H 14 | -------------------------------------------------------------------------------- /LittleStringTools2/res/LittleStringTools2.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rixoye/BypassAvTool/f13047d8cf9419e2a7b0d54fb32f70b5a7757eb3/LittleStringTools2/res/LittleStringTools2.ico -------------------------------------------------------------------------------- /LittleStringTools2/res/LittleStringTools2.rc2: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rixoye/BypassAvTool/f13047d8cf9419e2a7b0d54fb32f70b5a7757eb3/LittleStringTools2/res/LittleStringTools2.rc2 -------------------------------------------------------------------------------- /LittleStringTools2/resource.h: -------------------------------------------------------------------------------- 1 | //{{NO_DEPENDENCIES}} 2 | // Microsoft Visual C++ 生成的包含文件。 3 | // 供 LittleStringTools2.rc 使用 4 | // 5 | #define IDCANCEL2 3 6 | #define IDD_LITTLESTRINGTOOLS2_DIALOG 102 7 | #define IDR_MAINFRAME 128 8 | #define IDD_String 130 9 | #define IDD_Func 132 10 | #define IDD_About 134 11 | #define IDC_TAB1 1000 12 | #define IDC_EDIT1 1001 13 | #define IDC_EDIT2 1002 14 | #define IDC_EDIT3 1003 15 | #define IDC_SPIN1 1004 16 | #define IDC_EDIT4 1005 17 | #define IDC_COMBO1 1009 18 | #define IDC_CHECK1 1010 19 | 20 | // Next default values for new objects 21 | // 22 | #ifdef APSTUDIO_INVOKED 23 | #ifndef APSTUDIO_READONLY_SYMBOLS 24 | #define _APS_NEXT_RESOURCE_VALUE 140 25 | #define _APS_NEXT_COMMAND_VALUE 32771 26 | #define _APS_NEXT_CONTROL_VALUE 1011 27 | #define _APS_NEXT_SYMED_VALUE 101 28 | #endif 29 | #endif 30 | -------------------------------------------------------------------------------- /LittleStringTools2/targetver.h: -------------------------------------------------------------------------------- 1 | #pragma once 2 | 3 | // 包括 SDKDDKVer.h 将定义可用的最高版本的 Windows 平台。 4 | 5 | //如果要为以前的 Windows 平台生成应用程序,请包括 WinSDKVer.h,并 6 | // 将 _WIN32_WINNT 宏设置为要支持的平台,然后再包括 SDKDDKVer.h。 7 | 8 | #include 9 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # BypassAvTool 2 | 源码免杀辅助工具 3 | 4 | 自个写的源码辅助工具,用于快速隐藏字符串,快速生成函数调用 5 | 6 | image 7 | 8 | image 9 | 10 | 11 | --------------------------------------------------------------------------------