├── WorkDll ├── CAdvice.h ├── APIHook.cpp ├── CAdvice.cpp ├── cpp.hint ├── work.h ├── framework.h ├── WorkDll.vcxproj.filters ├── work.cpp ├── APIHook.h └── WorkDll.vcxproj ├── Startup ├── Startup.rc ├── Startup.h ├── targetver.h ├── framework.h ├── resource.h ├── Startup.vcxproj.filters ├── Startup.cpp └── Startup.vcxproj ├── IgnoreInfoFormat ├── pch.h ├── pch.cpp ├── CIgnoreInfo.cpp ├── CIgnoreInfo.h └── IgnoreInfoFormat.vcxitems ├── documents ├── imgs │ ├── 1.jpg │ ├── 10.jpg │ ├── 11.jpg │ ├── 2.jpg │ ├── 3.jpg │ ├── 4.jpg │ ├── 5.jpg │ ├── 6.jpg │ ├── 7.jpg │ ├── 8.gif │ └── 9.jpg ├── CursorDesign.procreate ├── IconDesign.procreate └── SkinBackup │ ├── Gloss.ssk │ └── SkinPPWTL.dll ├── HelpUploadFiles ├── CMainDlg.h ├── CSkin.cpp ├── HelpUploadFiles.h ├── cursor.cur ├── CContext.cpp ├── CInjectDll.cpp ├── HelpUploadFiles.rc ├── HelpUploadFiles.ico ├── CIgnoreFileManager.cpp ├── cpp.hint ├── CEscapeRegex.h ├── CSkin.h ├── targetver.h ├── CAboutDlg.h ├── CSetProcessDlg.h ├── CInjectDll.h ├── CIgnoreFileManager.h ├── framework.h ├── CEscapeRegex.cpp ├── CAboutDlg.cpp ├── CContext.h ├── HelpUploadFiles.cpp ├── CSetProcessDlg.cpp ├── Resource.h ├── HelpUploadFiles.vcxproj.filters ├── HelpUploadFiles.vcxproj └── CMainDlg.cpp ├── .github └── workflows │ └── build_pack.yml ├── .gitattributes ├── HelpUploadFiles.sln ├── .gitignore ├── README.md └── LICENSE.txt /WorkDll/CAdvice.h: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/KrxkGit/HelpUploadFiles/HEAD/WorkDll/CAdvice.h -------------------------------------------------------------------------------- /Startup/Startup.rc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/KrxkGit/HelpUploadFiles/HEAD/Startup/Startup.rc -------------------------------------------------------------------------------- /WorkDll/APIHook.cpp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/KrxkGit/HelpUploadFiles/HEAD/WorkDll/APIHook.cpp -------------------------------------------------------------------------------- /WorkDll/CAdvice.cpp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/KrxkGit/HelpUploadFiles/HEAD/WorkDll/CAdvice.cpp -------------------------------------------------------------------------------- /IgnoreInfoFormat/pch.h: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/KrxkGit/HelpUploadFiles/HEAD/IgnoreInfoFormat/pch.h -------------------------------------------------------------------------------- /documents/imgs/1.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/KrxkGit/HelpUploadFiles/HEAD/documents/imgs/1.jpg -------------------------------------------------------------------------------- /documents/imgs/10.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/KrxkGit/HelpUploadFiles/HEAD/documents/imgs/10.jpg -------------------------------------------------------------------------------- /documents/imgs/11.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/KrxkGit/HelpUploadFiles/HEAD/documents/imgs/11.jpg -------------------------------------------------------------------------------- /documents/imgs/2.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/KrxkGit/HelpUploadFiles/HEAD/documents/imgs/2.jpg -------------------------------------------------------------------------------- /documents/imgs/3.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/KrxkGit/HelpUploadFiles/HEAD/documents/imgs/3.jpg -------------------------------------------------------------------------------- /documents/imgs/4.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/KrxkGit/HelpUploadFiles/HEAD/documents/imgs/4.jpg -------------------------------------------------------------------------------- /documents/imgs/5.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/KrxkGit/HelpUploadFiles/HEAD/documents/imgs/5.jpg -------------------------------------------------------------------------------- /documents/imgs/6.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/KrxkGit/HelpUploadFiles/HEAD/documents/imgs/6.jpg -------------------------------------------------------------------------------- /documents/imgs/7.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/KrxkGit/HelpUploadFiles/HEAD/documents/imgs/7.jpg -------------------------------------------------------------------------------- /documents/imgs/8.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/KrxkGit/HelpUploadFiles/HEAD/documents/imgs/8.gif -------------------------------------------------------------------------------- /documents/imgs/9.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/KrxkGit/HelpUploadFiles/HEAD/documents/imgs/9.jpg -------------------------------------------------------------------------------- /IgnoreInfoFormat/pch.cpp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/KrxkGit/HelpUploadFiles/HEAD/IgnoreInfoFormat/pch.cpp -------------------------------------------------------------------------------- /WorkDll/cpp.hint: -------------------------------------------------------------------------------- 1 | #define WORKDLL_API __declspec(dllexport) 2 | #define WORKDLL_API __declspec(dllimport) 3 | -------------------------------------------------------------------------------- /HelpUploadFiles/CMainDlg.h: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/KrxkGit/HelpUploadFiles/HEAD/HelpUploadFiles/CMainDlg.h -------------------------------------------------------------------------------- /HelpUploadFiles/CSkin.cpp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/KrxkGit/HelpUploadFiles/HEAD/HelpUploadFiles/CSkin.cpp -------------------------------------------------------------------------------- /HelpUploadFiles/HelpUploadFiles.h: -------------------------------------------------------------------------------- 1 | #pragma once 2 | 3 | #include "CIgnoreFileManager.h" 4 | #include "CMainDlg.h" -------------------------------------------------------------------------------- /HelpUploadFiles/cursor.cur: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/KrxkGit/HelpUploadFiles/HEAD/HelpUploadFiles/cursor.cur -------------------------------------------------------------------------------- /WorkDll/work.h: -------------------------------------------------------------------------------- 1 | #include "pch.h" 2 | #include "APIHook.h" 3 | #include "CAdvice.h" 4 | 5 | VOID DllInit(); 6 | -------------------------------------------------------------------------------- /HelpUploadFiles/CContext.cpp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/KrxkGit/HelpUploadFiles/HEAD/HelpUploadFiles/CContext.cpp -------------------------------------------------------------------------------- /HelpUploadFiles/CInjectDll.cpp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/KrxkGit/HelpUploadFiles/HEAD/HelpUploadFiles/CInjectDll.cpp -------------------------------------------------------------------------------- /IgnoreInfoFormat/CIgnoreInfo.cpp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/KrxkGit/HelpUploadFiles/HEAD/IgnoreInfoFormat/CIgnoreInfo.cpp -------------------------------------------------------------------------------- /IgnoreInfoFormat/CIgnoreInfo.h: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/KrxkGit/HelpUploadFiles/HEAD/IgnoreInfoFormat/CIgnoreInfo.h -------------------------------------------------------------------------------- /documents/CursorDesign.procreate: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/KrxkGit/HelpUploadFiles/HEAD/documents/CursorDesign.procreate -------------------------------------------------------------------------------- /documents/IconDesign.procreate: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/KrxkGit/HelpUploadFiles/HEAD/documents/IconDesign.procreate -------------------------------------------------------------------------------- /documents/SkinBackup/Gloss.ssk: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/KrxkGit/HelpUploadFiles/HEAD/documents/SkinBackup/Gloss.ssk -------------------------------------------------------------------------------- /HelpUploadFiles/HelpUploadFiles.rc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/KrxkGit/HelpUploadFiles/HEAD/HelpUploadFiles/HelpUploadFiles.rc -------------------------------------------------------------------------------- /documents/SkinBackup/SkinPPWTL.dll: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/KrxkGit/HelpUploadFiles/HEAD/documents/SkinBackup/SkinPPWTL.dll -------------------------------------------------------------------------------- /HelpUploadFiles/HelpUploadFiles.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/KrxkGit/HelpUploadFiles/HEAD/HelpUploadFiles/HelpUploadFiles.ico -------------------------------------------------------------------------------- /HelpUploadFiles/CIgnoreFileManager.cpp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/KrxkGit/HelpUploadFiles/HEAD/HelpUploadFiles/CIgnoreFileManager.cpp -------------------------------------------------------------------------------- /HelpUploadFiles/cpp.hint: -------------------------------------------------------------------------------- 1 | // 提示文件帮助 Visual Studio IDE 解释 Visual C++ 标识符, 2 | // 如函数和宏的名称。 3 | // 有关详细信息,请参见 https://go.microsoft.com/fwlink/?linkid=865984 4 | -------------------------------------------------------------------------------- /HelpUploadFiles/CEscapeRegex.h: -------------------------------------------------------------------------------- 1 | #pragma once 2 | class CEscapeRegex 3 | { 4 | public: 5 | static std::wstring escapeRegex(const std::wstring& str); 6 | }; 7 | 8 | -------------------------------------------------------------------------------- /HelpUploadFiles/CSkin.h: -------------------------------------------------------------------------------- 1 | #pragma once 2 | class CSkin 3 | { 4 | private: 5 | HMODULE hSkinMod; 6 | public: 7 | CSkin(); 8 | ~CSkin(); 9 | protected: 10 | void FindSkinFile(char* skinPath); 11 | }; 12 | 13 | -------------------------------------------------------------------------------- /Startup/Startup.h: -------------------------------------------------------------------------------- 1 | #pragma once 2 | 3 | #include "resource.h" 4 | 5 | INT_PTR CALLBACK MainDlg(HWND, UINT, WPARAM, LPARAM); 6 | VOID OnDlgCommand(HWND hDlg, WPARAM wParam); 7 | VOID OnDlgCommand(HWND hDlg, WPARAM wParam); -------------------------------------------------------------------------------- /Startup/targetver.h: -------------------------------------------------------------------------------- 1 | #pragma once 2 | 3 | // // 包含 SDKDDKVer.h 可定义可用的最高版本的 Windows 平台。 4 | // 如果希望为之前的 Windows 平台构建应用程序,在包含 SDKDDKVer.h 之前请先包含 WinSDKVer.h 并 5 | // 将 _WIN32_WINNT 宏设置为想要支持的平台。 6 | #include 7 | -------------------------------------------------------------------------------- /HelpUploadFiles/targetver.h: -------------------------------------------------------------------------------- 1 | #pragma once 2 | 3 | // // 包含 SDKDDKVer.h 可定义可用的最高版本的 Windows 平台。 4 | // 如果希望为之前的 Windows 平台构建应用程序,在包含 SDKDDKVer.h 之前请先包含 WinSDKVer.h 并 5 | // 将 _WIN32_WINNT 宏设置为想要支持的平台。 6 | #include 7 | -------------------------------------------------------------------------------- /HelpUploadFiles/CAboutDlg.h: -------------------------------------------------------------------------------- 1 | #pragma once 2 | class CAboutDlg 3 | { 4 | private: 5 | static CAboutDlg* singleton; 6 | public: 7 | static INT_PTR CALLBACK About(HWND hDlg, UINT message, WPARAM wParam, LPARAM lParam); 8 | }; 9 | 10 | -------------------------------------------------------------------------------- /HelpUploadFiles/CSetProcessDlg.h: -------------------------------------------------------------------------------- 1 | #pragma once 2 | #include "pch.h" 3 | #include "resource.h" 4 | 5 | class CSetProcessDlg 6 | { 7 | private: 8 | DWORD dwProcessId; 9 | public: 10 | static CSetProcessDlg* singleton; 11 | static INT_PTR CALLBACK SetProcess(HWND hDlg, UINT message, WPARAM wParam, LPARAM lParam); 12 | DWORD getProcessId(); 13 | }; 14 | 15 | -------------------------------------------------------------------------------- /HelpUploadFiles/CInjectDll.h: -------------------------------------------------------------------------------- 1 | #pragma once 2 | class CInjectDll 3 | { 4 | private: 5 | static LPCWSTR dllName; 6 | static DWORD dwProcessId; 7 | static UINT CALLBACK MyCreateRemoteThread(LPVOID pParam); 8 | public: 9 | static VOID DoInject(HWND hWnd); 10 | static VOID DoInject(DWORD dwProcessId); 11 | protected: 12 | static void RunInjectThread(); 13 | }; 14 | 15 | -------------------------------------------------------------------------------- /WorkDll/framework.h: -------------------------------------------------------------------------------- 1 | #pragma once 2 | 3 | #define WIN32_LEAN_AND_MEAN // 从 Windows 头文件中排除极少使用的内容 4 | // Windows 头文件 5 | #include 6 | 7 | #include 8 | #include 9 | #include 10 | #pragma comment(lib,"ImageHlp.lib") 11 | #include 12 | #include 13 | #include 14 | 15 | 16 | // C++ 标准库 17 | #include 18 | #include -------------------------------------------------------------------------------- /Startup/framework.h: -------------------------------------------------------------------------------- 1 | // header.h: 标准系统包含文件的包含文件, 2 | // 或特定于项目的包含文件 3 | // 4 | 5 | #pragma once 6 | 7 | #include "targetver.h" 8 | #define WIN32_LEAN_AND_MEAN // 从 Windows 头文件中排除极少使用的内容 9 | // Windows 头文件 10 | #include 11 | #include 12 | // C 运行时头文件 13 | #include 14 | #include 15 | #include 16 | #include 17 | //C++ 标准库 18 | #include -------------------------------------------------------------------------------- /HelpUploadFiles/CIgnoreFileManager.h: -------------------------------------------------------------------------------- 1 | #pragma once 2 | #include 3 | #include "CContext.h" 4 | 5 | class CIgnoreFileManager 6 | { 7 | private: 8 | CContext* context; 9 | static CIgnoreFileManager* singleton; 10 | public: 11 | static CIgnoreFileManager* getSingleton(); 12 | public: 13 | CIgnoreFileManager(); 14 | void addIgnoreFile(std::wstring fileName); 15 | void removeIgnoreFile(std::wstring fileName); 16 | }; 17 | 18 | -------------------------------------------------------------------------------- /HelpUploadFiles/framework.h: -------------------------------------------------------------------------------- 1 | // header.h: 标准系统包含文件的包含文件, 2 | // 或特定于项目的包含文件 3 | // 4 | 5 | #pragma once 6 | 7 | #include "targetver.h" 8 | #define WIN32_LEAN_AND_MEAN // 从 Windows 头文件中排除极少使用的内容 9 | // Windows 头文件 10 | #include 11 | #include 12 | #include 13 | #include 14 | #include 15 | // C 运行时头文件 16 | #include 17 | #include 18 | #include 19 | #include 20 | //C++ 标准库 21 | #include 22 | #include -------------------------------------------------------------------------------- /HelpUploadFiles/CEscapeRegex.cpp: -------------------------------------------------------------------------------- 1 | #include "pch.h" 2 | #include "CEscapeRegex.h" 3 | 4 | std::wstring CEscapeRegex::escapeRegex(const std::wstring& str) 5 | { 6 | // Escape special characters in a regex pattern 7 | std::wstring result; 8 | for (wchar_t c : str) { 9 | if (c == '\\' || c == '.' || c == '^' || c == '$' || c == '|' || c == '?' || 10 | c == '*' || c == '+' || c == '(' || c == ')' || c == '[' || c == ']' || c == '{' || c == '}') { 11 | result += '\\'; 12 | } 13 | result += c; 14 | } 15 | return result; 16 | } 17 | -------------------------------------------------------------------------------- /HelpUploadFiles/CAboutDlg.cpp: -------------------------------------------------------------------------------- 1 | #include "pch.h" 2 | #include "CAboutDlg.h" 3 | 4 | CAboutDlg* CAboutDlg::singleton = new CAboutDlg; 5 | 6 | INT_PTR CALLBACK CAboutDlg::About(HWND hDlg, UINT message, WPARAM wParam, LPARAM lParam) 7 | { 8 | UNREFERENCED_PARAMETER(lParam); 9 | switch (message) 10 | { 11 | case WM_INITDIALOG: 12 | return (INT_PTR)TRUE; 13 | 14 | case WM_COMMAND: 15 | if (LOWORD(wParam) == IDOK || LOWORD(wParam) == IDCANCEL) 16 | { 17 | EndDialog(hDlg, LOWORD(wParam)); 18 | return (INT_PTR)TRUE; 19 | } 20 | break; 21 | } 22 | return (INT_PTR)FALSE; 23 | } -------------------------------------------------------------------------------- /HelpUploadFiles/CContext.h: -------------------------------------------------------------------------------- 1 | #pragma once 2 | #include "pch.h" 3 | #include "framework.h" 4 | #include "CInjectDll.h" 5 | #include "CIgnoreInfo.h" 6 | 7 | 8 | class CContext 9 | { 10 | private: 11 | HANDLE hSharedMem; 12 | HANDLE hEvent; 13 | HANDLE hWaitReadEvent; 14 | public: 15 | static CContext* singleton; 16 | CContext(); 17 | ~CContext(); 18 | public: 19 | VOID InjectWorkDll(HWND hWnd); 20 | VOID AddInnoreFile(std::wstring fileName); 21 | VOID RemoveInnoreFile(std::wstring fileName); 22 | protected: 23 | VOID DoOperation(CIgnoreInfo* pIgnoreInfo, std::wstring fileName, CIgnoreInfo::TYPE type); 24 | }; 25 | 26 | -------------------------------------------------------------------------------- /HelpUploadFiles/HelpUploadFiles.cpp: -------------------------------------------------------------------------------- 1 | // HelpUploadFiles.cpp : 定义应用程序的入口点。 2 | // 3 | 4 | #include "framework.h" 5 | #include "HelpUploadFiles.h" 6 | #include "CSkin.h" 7 | 8 | int APIENTRY wWinMain(_In_ HINSTANCE hInstance, 9 | _In_opt_ HINSTANCE hPrevInstance, 10 | _In_ LPWSTR lpCmdLine, 11 | _In_ int nCmdShow) 12 | { 13 | UNREFERENCED_PARAMETER(hPrevInstance); 14 | UNREFERENCED_PARAMETER(lpCmdLine); 15 | 16 | CSkin skin; // 加载皮肤 17 | 18 | CMainDlg::singleton->hInst = hInstance; 19 | DialogBox(hInstance, MAKEINTRESOURCE(IDD_MAINDIALOG), NULL, CMainDlg::MainDlg); 20 | 21 | return GetLastError(); 22 | } 23 | 24 | 25 | 26 | -------------------------------------------------------------------------------- /HelpUploadFiles/CSetProcessDlg.cpp: -------------------------------------------------------------------------------- 1 | #include "CSetProcessDlg.h" 2 | 3 | CSetProcessDlg* CSetProcessDlg::singleton = new CSetProcessDlg; 4 | 5 | INT_PTR CALLBACK CSetProcessDlg::SetProcess(HWND hDlg, UINT message, WPARAM wParam, LPARAM lParam) 6 | { 7 | UNREFERENCED_PARAMETER(lParam); 8 | switch (message) 9 | { 10 | case WM_INITDIALOG: 11 | return (INT_PTR)TRUE; 12 | 13 | case WM_COMMAND: 14 | switch (LOWORD(wParam)) 15 | { 16 | case IDOK: 17 | CSetProcessDlg::singleton->dwProcessId = GetDlgItemInt(hDlg, IDC_EDIT1, NULL, FALSE); 18 | break; 19 | case IDCANCEL: 20 | break; 21 | default: 22 | return FALSE; 23 | } 24 | 25 | EndDialog(hDlg, LOWORD(wParam)); 26 | return (INT_PTR)TRUE; 27 | } 28 | return (INT_PTR)FALSE; 29 | } 30 | 31 | 32 | DWORD CSetProcessDlg::getProcessId() 33 | { 34 | return this->dwProcessId; 35 | } -------------------------------------------------------------------------------- /Startup/resource.h: -------------------------------------------------------------------------------- 1 | //{{NO_DEPENDENCIES}} 2 | // Microsoft Visual C++ 生成的包含文件。 3 | // 供 Startup.rc 使用 4 | // 5 | #define IDC_MYICON 2 6 | #define IDD_STARTUP_DIALOG 102 7 | #define IDS_APP_TITLE 103 8 | #define IDD_ABOUTBOX 103 9 | #define IDM_ABOUT 104 10 | #define IDC_STARTUP 109 11 | #define IDR_MAINFRAME 128 12 | #define IDI_ICON1 129 13 | #define IDI_STARTUP 129 14 | #define IDC_BUTTON1 1000 15 | #define IDC_BUTTON2 1001 16 | #define IDC_STATIC -1 17 | 18 | // Next default values for new objects 19 | // 20 | #ifdef APSTUDIO_INVOKED 21 | #ifndef APSTUDIO_READONLY_SYMBOLS 22 | #define _APS_NO_MFC 1 23 | #define _APS_NEXT_RESOURCE_VALUE 130 24 | #define _APS_NEXT_COMMAND_VALUE 32771 25 | #define _APS_NEXT_CONTROL_VALUE 1001 26 | #define _APS_NEXT_SYMED_VALUE 110 27 | #endif 28 | #endif 29 | -------------------------------------------------------------------------------- /IgnoreInfoFormat/IgnoreInfoFormat.vcxitems: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | $(MSBuildAllProjects);$(MSBuildThisFileFullPath) 5 | true 6 | {e904b7ec-60ef-4bca-aef5-2f7983e8fb9d} 7 | 8 | 9 | 10 | %(AdditionalIncludeDirectories);$(MSBuildThisFileDirectory) 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | -------------------------------------------------------------------------------- /HelpUploadFiles/Resource.h: -------------------------------------------------------------------------------- 1 | //{{NO_DEPENDENCIES}} 2 | // Microsoft Visual C++ 生成的包含文件。 3 | // 供 HelpUploadFiles.rc 使用 4 | // 5 | #define IDS_APP_TITLE 103 6 | #define IDD_ABOUTBOX 103 7 | #define IDM_ABOUT 104 8 | #define IDM_EXIT 105 9 | #define IDI_HELPUPLOADFILES 107 10 | #define IDC_HELPUPLOADFILES 109 11 | #define IDD_MAINDIALOG 129 12 | #define IDC_CURSOR1 131 13 | #define IDD_SETPROCESSDLG 133 14 | #define IDC_LIST1 1000 15 | #define IDC_EDIT1 1001 16 | #define IDREMOVE 1002 17 | #define IDADD 1003 18 | #define IDC_CAPTUREWND 1004 19 | #define IDM_INJECT 32775 20 | #define ID_32776 32776 21 | #define IDM_SETPROCESS 32777 22 | #define ID_32778 32778 23 | #define ID_32779 32779 24 | #define IDM_IMPORT 32780 25 | #define IDM_EXPORT 32781 26 | #define IDC_STATIC -1 27 | 28 | // Next default values for new objects 29 | // 30 | #ifdef APSTUDIO_INVOKED 31 | #ifndef APSTUDIO_READONLY_SYMBOLS 32 | #define _APS_NO_MFC 1 33 | #define _APS_NEXT_RESOURCE_VALUE 134 34 | #define _APS_NEXT_COMMAND_VALUE 32782 35 | #define _APS_NEXT_CONTROL_VALUE 1006 36 | #define _APS_NEXT_SYMED_VALUE 110 37 | #endif 38 | #endif 39 | -------------------------------------------------------------------------------- /WorkDll/WorkDll.vcxproj.filters: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | {4FC737F1-C7A5-4376-A066-2A32D752A2FF} 6 | cpp;c;cc;cxx;c++;cppm;ixx;def;odl;idl;hpj;bat;asm;asmx 7 | 8 | 9 | {93995380-89BD-4b04-88EB-625FBE52EBFB} 10 | h;hh;hpp;hxx;h++;hm;inl;inc;ipp;xsd 11 | 12 | 13 | {67DA6AB6-F800-4c08-8B7A-83BB121AAD01} 14 | rc;ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe;resx;tiff;tif;png;wav;mfcribbon-ms 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 | -------------------------------------------------------------------------------- /Startup/Startup.vcxproj.filters: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | {4FC737F1-C7A5-4376-A066-2A32D752A2FF} 6 | cpp;c;cc;cxx;c++;cppm;ixx;def;odl;idl;hpj;bat;asm;asmx 7 | 8 | 9 | {93995380-89BD-4b04-88EB-625FBE52EBFB} 10 | h;hh;hpp;hxx;h++;hm;inl;inc;ipp;xsd 11 | 12 | 13 | {67DA6AB6-F800-4c08-8B7A-83BB121AAD01} 14 | rc;ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe;resx;tiff;tif;png;wav;mfcribbon-ms 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 | -------------------------------------------------------------------------------- /Startup/Startup.cpp: -------------------------------------------------------------------------------- 1 | // Startup.cpp : 定义应用程序的入口点。 2 | // 3 | 4 | #include "framework.h" 5 | #include "Startup.h" 6 | 7 | HINSTANCE hInst; 8 | LPCTSTR programName = _T("HelpUploadFiles.exe"); 9 | 10 | int APIENTRY wWinMain(_In_ HINSTANCE hInstance, 11 | _In_opt_ HINSTANCE hPrevInstance, 12 | _In_ LPWSTR lpCmdLine, 13 | _In_ int nCmdShow) 14 | { 15 | UNREFERENCED_PARAMETER(hPrevInstance); 16 | UNREFERENCED_PARAMETER(lpCmdLine); 17 | 18 | // TODO: 在此处放置代码。 19 | hInst = hInstance; 20 | DialogBox(hInst, MAKEINTRESOURCE(IDD_ABOUTBOX), NULL, MainDlg); 21 | 22 | } 23 | 24 | VOID OnDlgInit(HWND hDlg) 25 | { 26 | 27 | HICON hIcon = LoadIcon(hInst, MAKEINTRESOURCE(IDI_STARTUP));; 28 | SendMessage(hDlg, WM_SETICON, FALSE, (LPARAM)hIcon); 29 | } 30 | 31 | VOID OnDlgCommand(HWND hDlg, WPARAM wParam) 32 | { 33 | TCHAR szWorkDirectory[MAX_PATH]; 34 | GetCurrentDirectory(_countof(szWorkDirectory), szWorkDirectory); 35 | 36 | switch (LOWORD(wParam)) 37 | { 38 | case IDC_BUTTON1: // 32位 39 | std::swprintf(szWorkDirectory, _countof(szWorkDirectory), _T("%s\\x86"), szWorkDirectory); 40 | break; 41 | case IDC_BUTTON2: // 64位 42 | std::swprintf(szWorkDirectory, _countof(szWorkDirectory), _T("%s\\x64"), szWorkDirectory); 43 | break; 44 | case IDCANCEL: 45 | EndDialog(hDlg, LOWORD(wParam)); 46 | return; 47 | } 48 | ShellExecute(NULL, _T("Open"), programName, NULL, szWorkDirectory, SW_SHOWNORMAL); 49 | EndDialog(hDlg, LOWORD(wParam)); 50 | } 51 | 52 | INT_PTR CALLBACK MainDlg(HWND hDlg, UINT message, WPARAM wParam, LPARAM lParam) 53 | { 54 | UNREFERENCED_PARAMETER(lParam); 55 | switch (message) 56 | { 57 | case WM_INITDIALOG: 58 | OnDlgInit(hDlg); 59 | break; 60 | 61 | case WM_COMMAND: 62 | OnDlgCommand(hDlg, wParam); 63 | break; 64 | } 65 | return (INT_PTR)FALSE; 66 | } 67 | -------------------------------------------------------------------------------- /.github/workflows/build_pack.yml: -------------------------------------------------------------------------------- 1 | # This workflow uses actions that are not certified by GitHub. 2 | # They are provided by a third-party and are governed by 3 | # separate terms of service, privacy policy, and support 4 | # documentation. 5 | 6 | name: MSBuild 7 | 8 | on: 9 | push: 10 | branches-ignore: 11 | - 'main' 12 | 13 | pull_request: 14 | branches-ignore: 15 | - 'main' 16 | 17 | 18 | env: 19 | # Path to the solution file relative to the root of the project. 20 | SOLUTION_FILE_PATH: . 21 | 22 | # Configuration type to build. 23 | # You can convert this to a build matrix if you need coverage of multiple configuration types. 24 | # https://docs.github.com/actions/learn-github-actions/managing-complex-workflows#using-a-build-matrix 25 | BUILD_CONFIGURATION: Release 26 | 27 | permissions: 28 | contents: read 29 | 30 | jobs: 31 | build: 32 | runs-on: windows-latest 33 | 34 | steps: 35 | - uses: actions/checkout@v4 36 | 37 | - name: Add MSBuild to PATH 38 | uses: microsoft/setup-msbuild@v1.0.2 39 | 40 | - name: Restore NuGet packages 41 | working-directory: ${{env.GITHUB_WORKSPACE}} 42 | run: nuget restore ${{env.SOLUTION_FILE_PATH}} 43 | 44 | - name: Build 45 | working-directory: ${{env.GITHUB_WORKSPACE}} 46 | # Add additional options to the MSBuild command line here (like platform or verbosity level). 47 | # See https://docs.microsoft.com/visualstudio/msbuild/msbuild-command-line-reference 48 | run: | 49 | msbuild /m /p:Configuration=${{env.BUILD_CONFIGURATION}} /p:Platform=x86 ${{env.SOLUTION_FILE_PATH}} 50 | msbuild /m /p:Configuration=${{env.BUILD_CONFIGURATION}} /p:Platform=x64 ${{env.SOLUTION_FILE_PATH}} 51 | 52 | - name: Package 53 | run: | 54 | mkdir dist/ 55 | mkdir dist/x86/ 56 | mkdir dist/x64/ 57 | 58 | mv x64/Release/HelpUploadFiles.exe dist/x64/ 59 | mv x64/Release/WorkDll.dll dist/x64/ 60 | 61 | mv Release/HelpUploadFiles.exe dist/x86/ 62 | mv Release/WorkDll.dll dist/x86/ 63 | mv documents/SkinBackup/*.* dist/x86/ 64 | 65 | mv Release/Startup.exe dist/ 66 | 67 | 68 | - name: Upload a Build Artifact 69 | uses: actions/upload-artifact@v4.3.1 70 | with: 71 | name: HelpUploadFiles 72 | path: dist/ 73 | -------------------------------------------------------------------------------- /WorkDll/work.cpp: -------------------------------------------------------------------------------- 1 | #include "pch.h" 2 | #include "work.h" 3 | 4 | HMODULE hInstDll = NULL; 5 | HHOOK g_Hook = NULL; 6 | 7 | BOOL APIENTRY DllMain( HMODULE hModule, 8 | DWORD ul_reason_for_call, 9 | LPVOID lpReserved 10 | ) 11 | { 12 | switch (ul_reason_for_call) 13 | { 14 | case DLL_PROCESS_ATTACH: 15 | ::hInstDll = hModule; 16 | DllInit();//初始化DLL 17 | break; 18 | case DLL_THREAD_ATTACH: 19 | break; 20 | case DLL_THREAD_DETACH: 21 | break; 22 | case DLL_PROCESS_DETACH: 23 | break; 24 | } 25 | return(TRUE); 26 | } 27 | 28 | VOID DllInit() 29 | { 30 | //CreateThread(0, 0, FreeDllThread, 0, 0, 0);//等待卸载Dll 31 | //hCurrentProcessId = GetCurrentProcessId(); 32 | //GetModuleFileName(NULL, szPath, _countof(szPath)); 33 | //hWnd = FindWindow(_T("DebugView"), NULL); 34 | //TCHAR sz[MAX_PATH * 2]; 35 | //StringCchPrintf(sz, _countof(sz), _T("DLL被加载!\t应用程序路径:%s"), szPath); 36 | //MyOutputDebugStringW(sz); 37 | 38 | wchar_t sz[100]; 39 | std::swprintf(sz, _countof(sz), _T("赋能模块注入成功\n进程ID: %d"), GetCurrentProcessId()); 40 | CAdvice::singleton->startListenThread(); 41 | MessageBox(NULL, sz, _T("HelpUploadFiles"), MB_ICONINFORMATION); 42 | } 43 | 44 | // API 拦截 45 | /** 46 | * @brief 用于拦截百度网盘 上传文件,排除指定文件 47 | * @param hFindFile 48 | * @param lpFindFileData 49 | * @return 默认状态返回原始值,遇到忽略状态跳过且自动查找下一个文件 50 | */ 51 | BOOL WINAPI MyFindNextFileW(HANDLE hFindFile, LPWIN32_FIND_DATAW lpFindFileData) 52 | { 53 | BOOL res = FindNextFileW(hFindFile, lpFindFileData); 54 | 55 | CAdvice* pAdvice = CAdvice::singleton; 56 | for (bool b = pAdvice->isMatch(lpFindFileData); res && !pAdvice->isSyntaxError() && b; b = pAdvice->isMatch(lpFindFileData)) { 57 | //MessageBox(NULL, lpFindFileData->cFileName, _T("提示"), MB_ICONINFORMATION); 58 | res = FindNextFileW(hFindFile, lpFindFileData); // 直接跳到下一个文件 59 | } 60 | return res; 61 | } 62 | 63 | /** 64 | * @brief 拦截 FindFirstFileW 65 | * @param lpFileName 66 | * @param lpFindFileData 67 | * @return 68 | */ 69 | HANDLE WINAPI MyFindFirstFileW(LPCWSTR lpFileName, LPWIN32_FIND_DATAW lpFindFileData) 70 | { 71 | HANDLE h = FindFirstFileW(lpFileName, lpFindFileData); 72 | //MessageBox(NULL, lpFindFileData->cFileName, _T("首个文件"), MB_ICONINFORMATION); 73 | 74 | //CAdvice* pAdvice = CAdvice::singleton; 75 | //for (bool b = pAdvice->isMatch(lpFindFileData); b; b = pAdvice->isMatch(lpFindFileData)) { 76 | // FindNextFileW(h, lpFindFileData); // 直接跳到下一个文件 77 | //} 78 | 79 | return h; 80 | } 81 | // API 拦截 82 | 83 | CAPIHook g_MyFindNextFile("Kernel32.dll", "FindNextFileW" , (PROC)MyFindNextFileW); 84 | CAPIHook g_MyFindFirstFile("Kernel32.dll", "FindFirstFileW", (PROC)MyFindFirstFileW); -------------------------------------------------------------------------------- /.gitattributes: -------------------------------------------------------------------------------- 1 | ############################################################################### 2 | # Set default behavior to automatically normalize line endings. 3 | ############################################################################### 4 | * text=auto 5 | 6 | ############################################################################### 7 | # Set default behavior for command prompt diff. 8 | # 9 | # This is need for earlier builds of msysgit that does not have it on by 10 | # default for csharp files. 11 | # Note: This is only used by command line 12 | ############################################################################### 13 | #*.cs diff=csharp 14 | 15 | ############################################################################### 16 | # Set the merge driver for project and solution files 17 | # 18 | # Merging from the command prompt will add diff markers to the files if there 19 | # are conflicts (Merging from VS is not affected by the settings below, in VS 20 | # the diff markers are never inserted). Diff markers may cause the following 21 | # file extensions to fail to load in VS. An alternative would be to treat 22 | # these files as binary and thus will always conflict and require user 23 | # intervention with every merge. To do so, just uncomment the entries below 24 | ############################################################################### 25 | #*.sln merge=binary 26 | #*.csproj merge=binary 27 | #*.vbproj merge=binary 28 | #*.vcxproj merge=binary 29 | #*.vcproj merge=binary 30 | #*.dbproj merge=binary 31 | #*.fsproj merge=binary 32 | #*.lsproj merge=binary 33 | #*.wixproj merge=binary 34 | #*.modelproj merge=binary 35 | #*.sqlproj merge=binary 36 | #*.wwaproj merge=binary 37 | 38 | ############################################################################### 39 | # behavior for image files 40 | # 41 | # image files are treated as binary by default. 42 | ############################################################################### 43 | #*.jpg binary 44 | #*.png binary 45 | #*.gif binary 46 | 47 | ############################################################################### 48 | # diff behavior for common document formats 49 | # 50 | # Convert binary document formats to text before diffing them. This feature 51 | # is only available from the command line. Turn it on by uncommenting the 52 | # entries below. 53 | ############################################################################### 54 | #*.doc diff=astextplain 55 | #*.DOC diff=astextplain 56 | #*.docx diff=astextplain 57 | #*.DOCX diff=astextplain 58 | #*.dot diff=astextplain 59 | #*.DOT diff=astextplain 60 | #*.pdf diff=astextplain 61 | #*.PDF diff=astextplain 62 | #*.rtf diff=astextplain 63 | #*.RTF diff=astextplain 64 | -------------------------------------------------------------------------------- /WorkDll/APIHook.h: -------------------------------------------------------------------------------- 1 | /****************************************************************************** 2 | Module: APIHook.h 3 | Notices: Copyright (c) 2008 Jeffrey Richter & Christophe Nasarre 4 | ******************************************************************************/ 5 | 6 | 7 | #pragma once 8 | 9 | 10 | /////////////////////////////////////////////////////////////////////////////// 11 | 12 | 13 | class CAPIHook { 14 | public: 15 | // Hook a function in all modules 16 | CAPIHook(PCSTR pszCalleeModName, PCSTR pszFuncName, PROC pfnHook); 17 | 18 | // Unhook a function from all modules 19 | ~CAPIHook(); 20 | 21 | // Returns the original address of the hooked function 22 | operator PROC() { return(m_pfnOrig); } 23 | 24 | // Hook module w/CAPIHook implementation? 25 | // I have to make it static because I need to use it 26 | // in ReplaceIATEntryInAllMods 27 | static BOOL ExcludeAPIHookMod; 28 | 29 | 30 | public: 31 | // Calls the real GetProcAddress 32 | static FARPROC WINAPI GetProcAddressRaw(HMODULE hmod, PCSTR pszProcName); 33 | 34 | private: 35 | static PVOID sm_pvMaxAppAddr; // Maximum private memory address 36 | static CAPIHook* sm_pHead; // Address of first object 37 | CAPIHook* m_pNext; // Address of next object 38 | 39 | PCSTR m_pszCalleeModName; // Module containing the function (ANSI) 40 | PCSTR m_pszFuncName; // Function name in callee (ANSI) 41 | PROC m_pfnOrig; // Original function address in callee 42 | PROC m_pfnHook; // Hook function address 43 | 44 | private: 45 | // Replaces a symbol's address in a module's import section 46 | static void WINAPI ReplaceIATEntryInAllMods(PCSTR pszCalleeModName, 47 | PROC pfnOrig, PROC pfnHook); 48 | 49 | // Replaces a symbol's address in all modules' import sections 50 | static void WINAPI ReplaceIATEntryInOneMod(PCSTR pszCalleeModName, 51 | PROC pfnOrig, PROC pfnHook, HMODULE hmodCaller); 52 | 53 | // Replaces a symbol's address in a module's export sections 54 | static void ReplaceEATEntryInOneMod(HMODULE hmod, PCSTR pszFunctionName, PROC pfnNew); 55 | 56 | private: 57 | // Used when a DLL is newly loaded after hooking a function 58 | static void WINAPI FixupNewlyLoadedModule(HMODULE hmod, DWORD dwFlags); 59 | 60 | // Used to trap when DLLs are newly loaded 61 | static HMODULE WINAPI LoadLibraryA(PCSTR pszModulePath); 62 | static HMODULE WINAPI LoadLibraryW(PCWSTR pszModulePath); 63 | static HMODULE WINAPI LoadLibraryExA(PCSTR pszModulePath, 64 | HANDLE hFile, DWORD dwFlags); 65 | static HMODULE WINAPI LoadLibraryExW(PCWSTR pszModulePath, 66 | HANDLE hFile, DWORD dwFlags); 67 | 68 | // Returns address of replacement function if hooked function is requested 69 | static FARPROC WINAPI GetProcAddress(HMODULE hmod, PCSTR pszProcName); 70 | 71 | private: 72 | // Instantiates hooks on these functions 73 | static CAPIHook sm_LoadLibraryA; 74 | static CAPIHook sm_LoadLibraryW; 75 | static CAPIHook sm_LoadLibraryExA; 76 | static CAPIHook sm_LoadLibraryExW; 77 | static CAPIHook sm_GetProcAddress; 78 | }; 79 | 80 | 81 | //////////////////////////////// End of File ////////////////////////////////// 82 | -------------------------------------------------------------------------------- /HelpUploadFiles/HelpUploadFiles.vcxproj.filters: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | {4FC737F1-C7A5-4376-A066-2A32D752A2FF} 6 | cpp;c;cc;cxx;c++;cppm;ixx;def;odl;idl;hpj;bat;asm;asmx 7 | 8 | 9 | {93995380-89BD-4b04-88EB-625FBE52EBFB} 10 | h;hh;hpp;hxx;h++;hm;inl;inc;ipp;xsd 11 | 12 | 13 | {67DA6AB6-F800-4c08-8B7A-83BB121AAD01} 14 | rc;ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe;resx;tiff;tif;png;wav;mfcribbon-ms 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 | 55 | 56 | 57 | 源文件 58 | 59 | 60 | 源文件 61 | 62 | 63 | 源文件 64 | 65 | 66 | 源文件 67 | 68 | 69 | 源文件 70 | 71 | 72 | 源文件 73 | 74 | 75 | 源文件 76 | 77 | 78 | 源文件 79 | 80 | 81 | 源文件 82 | 83 | 84 | 85 | 86 | 资源文件 87 | 88 | 89 | 90 | 91 | 资源文件 92 | 93 | 94 | 95 | 96 | 97 | 资源文件 98 | 99 | 100 | -------------------------------------------------------------------------------- /HelpUploadFiles.sln: -------------------------------------------------------------------------------- 1 | 2 | Microsoft Visual Studio Solution File, Format Version 12.00 3 | # Visual Studio Version 17 4 | VisualStudioVersion = 17.7.34221.43 5 | MinimumVisualStudioVersion = 10.0.40219.1 6 | Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "HelpUploadFiles", "HelpUploadFiles\HelpUploadFiles.vcxproj", "{1E4ECE2F-3748-47BE-BCDA-D2C2F671D695}" 7 | ProjectSection(ProjectDependencies) = postProject 8 | {9366E397-8E3A-4B62-8520-8412F8AF6182} = {9366E397-8E3A-4B62-8520-8412F8AF6182} 9 | EndProjectSection 10 | EndProject 11 | Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "WorkDll", "WorkDll\WorkDll.vcxproj", "{9366E397-8E3A-4B62-8520-8412F8AF6182}" 12 | EndProject 13 | Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "IgnoreInfoFormat", "IgnoreInfoFormat\IgnoreInfoFormat.vcxitems", "{E904B7EC-60EF-4BCA-AEF5-2F7983E8FB9D}" 14 | EndProject 15 | Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "Startup", "Startup\Startup.vcxproj", "{4E1E201F-518E-4A18-90F1-F1AFA01015A5}" 16 | EndProject 17 | Global 18 | GlobalSection(SolutionConfigurationPlatforms) = preSolution 19 | Debug|x64 = Debug|x64 20 | Debug|x86 = Debug|x86 21 | Release|x64 = Release|x64 22 | Release|x86 = Release|x86 23 | EndGlobalSection 24 | GlobalSection(ProjectConfigurationPlatforms) = postSolution 25 | {1E4ECE2F-3748-47BE-BCDA-D2C2F671D695}.Debug|x64.ActiveCfg = Debug|x64 26 | {1E4ECE2F-3748-47BE-BCDA-D2C2F671D695}.Debug|x64.Build.0 = Debug|x64 27 | {1E4ECE2F-3748-47BE-BCDA-D2C2F671D695}.Debug|x86.ActiveCfg = Debug|Win32 28 | {1E4ECE2F-3748-47BE-BCDA-D2C2F671D695}.Debug|x86.Build.0 = Debug|Win32 29 | {1E4ECE2F-3748-47BE-BCDA-D2C2F671D695}.Release|x64.ActiveCfg = Release|x64 30 | {1E4ECE2F-3748-47BE-BCDA-D2C2F671D695}.Release|x64.Build.0 = Release|x64 31 | {1E4ECE2F-3748-47BE-BCDA-D2C2F671D695}.Release|x86.ActiveCfg = Release|Win32 32 | {1E4ECE2F-3748-47BE-BCDA-D2C2F671D695}.Release|x86.Build.0 = Release|Win32 33 | {9366E397-8E3A-4B62-8520-8412F8AF6182}.Debug|x64.ActiveCfg = Debug|x64 34 | {9366E397-8E3A-4B62-8520-8412F8AF6182}.Debug|x64.Build.0 = Debug|x64 35 | {9366E397-8E3A-4B62-8520-8412F8AF6182}.Debug|x86.ActiveCfg = Debug|Win32 36 | {9366E397-8E3A-4B62-8520-8412F8AF6182}.Debug|x86.Build.0 = Debug|Win32 37 | {9366E397-8E3A-4B62-8520-8412F8AF6182}.Release|x64.ActiveCfg = Release|x64 38 | {9366E397-8E3A-4B62-8520-8412F8AF6182}.Release|x64.Build.0 = Release|x64 39 | {9366E397-8E3A-4B62-8520-8412F8AF6182}.Release|x86.ActiveCfg = Release|Win32 40 | {9366E397-8E3A-4B62-8520-8412F8AF6182}.Release|x86.Build.0 = Release|Win32 41 | {4E1E201F-518E-4A18-90F1-F1AFA01015A5}.Debug|x64.ActiveCfg = Debug|x64 42 | {4E1E201F-518E-4A18-90F1-F1AFA01015A5}.Debug|x64.Build.0 = Debug|x64 43 | {4E1E201F-518E-4A18-90F1-F1AFA01015A5}.Debug|x86.ActiveCfg = Debug|Win32 44 | {4E1E201F-518E-4A18-90F1-F1AFA01015A5}.Debug|x86.Build.0 = Debug|Win32 45 | {4E1E201F-518E-4A18-90F1-F1AFA01015A5}.Release|x64.ActiveCfg = Release|x64 46 | {4E1E201F-518E-4A18-90F1-F1AFA01015A5}.Release|x64.Build.0 = Release|x64 47 | {4E1E201F-518E-4A18-90F1-F1AFA01015A5}.Release|x86.ActiveCfg = Release|Win32 48 | {4E1E201F-518E-4A18-90F1-F1AFA01015A5}.Release|x86.Build.0 = Release|Win32 49 | EndGlobalSection 50 | GlobalSection(SolutionProperties) = preSolution 51 | HideSolutionNode = FALSE 52 | EndGlobalSection 53 | GlobalSection(ExtensibilityGlobals) = postSolution 54 | SolutionGuid = {BA92BFCC-67C9-4E0F-870C-CFFC47155977} 55 | EndGlobalSection 56 | GlobalSection(SharedMSBuildProjectFiles) = preSolution 57 | IgnoreInfoFormat\IgnoreInfoFormat.vcxitems*{1e4ece2f-3748-47be-bcda-d2c2f671d695}*SharedItemsImports = 4 58 | IgnoreInfoFormat\IgnoreInfoFormat.vcxitems*{9366e397-8e3a-4b62-8520-8412f8af6182}*SharedItemsImports = 4 59 | IgnoreInfoFormat\IgnoreInfoFormat.vcxitems*{e904b7ec-60ef-4bca-aef5-2f7983e8fb9d}*SharedItemsImports = 9 60 | EndGlobalSection 61 | EndGlobal 62 | -------------------------------------------------------------------------------- /Startup/Startup.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 | 17.0 23 | Win32Proj 24 | {4e1e201f-518e-4a18-90f1-f1afa01015a5} 25 | Startup 26 | 10.0 27 | 28 | 29 | 30 | Application 31 | true 32 | v143 33 | Unicode 34 | 35 | 36 | Application 37 | false 38 | v143 39 | true 40 | Unicode 41 | 42 | 43 | Application 44 | true 45 | v143 46 | Unicode 47 | 48 | 49 | Application 50 | false 51 | v143 52 | true 53 | Unicode 54 | 55 | 56 | 57 | 58 | 59 | 60 | 61 | 62 | 63 | 64 | 65 | 66 | 67 | 68 | 69 | 70 | 71 | 72 | 73 | 74 | 75 | Level3 76 | true 77 | WIN32;_DEBUG;_WINDOWS;%(PreprocessorDefinitions) 78 | true 79 | 80 | 81 | Windows 82 | true 83 | 84 | 85 | 86 | 87 | Level3 88 | true 89 | true 90 | true 91 | WIN32;NDEBUG;_WINDOWS;%(PreprocessorDefinitions) 92 | true 93 | 94 | 95 | Windows 96 | true 97 | true 98 | true 99 | 100 | 101 | 102 | 103 | Level3 104 | true 105 | _DEBUG;_WINDOWS;%(PreprocessorDefinitions) 106 | true 107 | 108 | 109 | Windows 110 | true 111 | 112 | 113 | 114 | 115 | Level3 116 | true 117 | true 118 | true 119 | NDEBUG;_WINDOWS;%(PreprocessorDefinitions) 120 | true 121 | 122 | 123 | Windows 124 | true 125 | true 126 | true 127 | 128 | 129 | 130 | 131 | 132 | 133 | 134 | 135 | 136 | 137 | 138 | 139 | 140 | 141 | 142 | 143 | 144 | 145 | 146 | 147 | -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | ## Ignore Visual Studio temporary files, build results, and 2 | ## files generated by popular Visual Studio add-ons. 3 | ## 4 | ## Get latest from https://github.com/github/gitignore/blob/master/VisualStudio.gitignore 5 | 6 | # User-specific files 7 | *.rsuser 8 | *.suo 9 | *.user 10 | *.userosscache 11 | *.sln.docstates 12 | 13 | # User-specific files (MonoDevelop/Xamarin Studio) 14 | *.userprefs 15 | 16 | # Mono auto generated files 17 | mono_crash.* 18 | 19 | # Build results 20 | [Dd]ebug/ 21 | [Dd]ebugPublic/ 22 | [Rr]elease/ 23 | [Rr]eleases/ 24 | x64/ 25 | x86/ 26 | [Ww][Ii][Nn]32/ 27 | [Aa][Rr][Mm]/ 28 | [Aa][Rr][Mm]64/ 29 | bld/ 30 | [Bb]in/ 31 | [Oo]bj/ 32 | [Oo]ut/ 33 | [Ll]og/ 34 | [Ll]ogs/ 35 | 36 | # Visual Studio 2015/2017 cache/options directory 37 | .vs/ 38 | # Uncomment if you have tasks that create the project's static files in wwwroot 39 | #wwwroot/ 40 | 41 | # Visual Studio 2017 auto generated files 42 | Generated\ Files/ 43 | 44 | # MSTest test Results 45 | [Tt]est[Rr]esult*/ 46 | [Bb]uild[Ll]og.* 47 | 48 | # NUnit 49 | *.VisualState.xml 50 | TestResult.xml 51 | nunit-*.xml 52 | 53 | # Build Results of an ATL Project 54 | [Dd]ebugPS/ 55 | [Rr]eleasePS/ 56 | dlldata.c 57 | 58 | # Benchmark Results 59 | BenchmarkDotNet.Artifacts/ 60 | 61 | # .NET Core 62 | project.lock.json 63 | project.fragment.lock.json 64 | artifacts/ 65 | 66 | # ASP.NET Scaffolding 67 | ScaffoldingReadMe.txt 68 | 69 | # StyleCop 70 | StyleCopReport.xml 71 | 72 | # Files built by Visual Studio 73 | *_i.c 74 | *_p.c 75 | *_h.h 76 | *.ilk 77 | *.meta 78 | *.obj 79 | *.iobj 80 | *.pch 81 | *.pdb 82 | *.ipdb 83 | *.pgc 84 | *.pgd 85 | *.rsp 86 | *.sbr 87 | *.tlb 88 | *.tli 89 | *.tlh 90 | *.tmp 91 | *.tmp_proj 92 | *_wpftmp.csproj 93 | *.log 94 | *.vspscc 95 | *.vssscc 96 | .builds 97 | *.pidb 98 | *.svclog 99 | *.scc 100 | 101 | # Chutzpah Test files 102 | _Chutzpah* 103 | 104 | # Visual C++ cache files 105 | ipch/ 106 | *.aps 107 | *.ncb 108 | *.opendb 109 | *.opensdf 110 | *.sdf 111 | *.cachefile 112 | *.VC.db 113 | *.VC.VC.opendb 114 | 115 | # Visual Studio profiler 116 | *.psess 117 | *.vsp 118 | *.vspx 119 | *.sap 120 | 121 | # Visual Studio Trace Files 122 | *.e2e 123 | 124 | # TFS 2012 Local Workspace 125 | $tf/ 126 | 127 | # Guidance Automation Toolkit 128 | *.gpState 129 | 130 | # ReSharper is a .NET coding add-in 131 | _ReSharper*/ 132 | *.[Rr]e[Ss]harper 133 | *.DotSettings.user 134 | 135 | # TeamCity is a build add-in 136 | _TeamCity* 137 | 138 | # DotCover is a Code Coverage Tool 139 | *.dotCover 140 | 141 | # AxoCover is a Code Coverage Tool 142 | .axoCover/* 143 | !.axoCover/settings.json 144 | 145 | # Coverlet is a free, cross platform Code Coverage Tool 146 | coverage*.json 147 | coverage*.xml 148 | coverage*.info 149 | 150 | # Visual Studio code coverage results 151 | *.coverage 152 | *.coveragexml 153 | 154 | # NCrunch 155 | _NCrunch_* 156 | .*crunch*.local.xml 157 | nCrunchTemp_* 158 | 159 | # MightyMoose 160 | *.mm.* 161 | AutoTest.Net/ 162 | 163 | # Web workbench (sass) 164 | .sass-cache/ 165 | 166 | # Installshield output folder 167 | [Ee]xpress/ 168 | 169 | # DocProject is a documentation generator add-in 170 | DocProject/buildhelp/ 171 | DocProject/Help/*.HxT 172 | DocProject/Help/*.HxC 173 | DocProject/Help/*.hhc 174 | DocProject/Help/*.hhk 175 | DocProject/Help/*.hhp 176 | DocProject/Help/Html2 177 | DocProject/Help/html 178 | 179 | # Click-Once directory 180 | publish/ 181 | 182 | # Publish Web Output 183 | *.[Pp]ublish.xml 184 | *.azurePubxml 185 | # Note: Comment the next line if you want to checkin your web deploy settings, 186 | # but database connection strings (with potential passwords) will be unencrypted 187 | *.pubxml 188 | *.publishproj 189 | 190 | # Microsoft Azure Web App publish settings. Comment the next line if you want to 191 | # checkin your Azure Web App publish settings, but sensitive information contained 192 | # in these scripts will be unencrypted 193 | PublishScripts/ 194 | 195 | # NuGet Packages 196 | *.nupkg 197 | # NuGet Symbol Packages 198 | *.snupkg 199 | # The packages folder can be ignored because of Package Restore 200 | **/[Pp]ackages/* 201 | # except build/, which is used as an MSBuild target. 202 | !**/[Pp]ackages/build/ 203 | # Uncomment if necessary however generally it will be regenerated when needed 204 | #!**/[Pp]ackages/repositories.config 205 | # NuGet v3's project.json files produces more ignorable files 206 | *.nuget.props 207 | *.nuget.targets 208 | 209 | # Microsoft Azure Build Output 210 | csx/ 211 | *.build.csdef 212 | 213 | # Microsoft Azure Emulator 214 | ecf/ 215 | rcf/ 216 | 217 | # Windows Store app package directories and files 218 | AppPackages/ 219 | BundleArtifacts/ 220 | Package.StoreAssociation.xml 221 | _pkginfo.txt 222 | *.appx 223 | *.appxbundle 224 | *.appxupload 225 | 226 | # Visual Studio cache files 227 | # files ending in .cache can be ignored 228 | *.[Cc]ache 229 | # but keep track of directories ending in .cache 230 | !?*.[Cc]ache/ 231 | 232 | # Others 233 | ClientBin/ 234 | ~$* 235 | *~ 236 | *.dbmdl 237 | *.dbproj.schemaview 238 | *.jfm 239 | *.pfx 240 | *.publishsettings 241 | orleans.codegen.cs 242 | 243 | # Including strong name files can present a security risk 244 | # (https://github.com/github/gitignore/pull/2483#issue-259490424) 245 | #*.snk 246 | 247 | # Since there are multiple workflows, uncomment next line to ignore bower_components 248 | # (https://github.com/github/gitignore/pull/1529#issuecomment-104372622) 249 | #bower_components/ 250 | 251 | # RIA/Silverlight projects 252 | Generated_Code/ 253 | 254 | # Backup & report files from converting an old project file 255 | # to a newer Visual Studio version. Backup files are not needed, 256 | # because we have git ;-) 257 | _UpgradeReport_Files/ 258 | Backup*/ 259 | UpgradeLog*.XML 260 | UpgradeLog*.htm 261 | ServiceFabricBackup/ 262 | *.rptproj.bak 263 | 264 | # SQL Server files 265 | *.mdf 266 | *.ldf 267 | *.ndf 268 | 269 | # Business Intelligence projects 270 | *.rdl.data 271 | *.bim.layout 272 | *.bim_*.settings 273 | *.rptproj.rsuser 274 | *- [Bb]ackup.rdl 275 | *- [Bb]ackup ([0-9]).rdl 276 | *- [Bb]ackup ([0-9][0-9]).rdl 277 | 278 | # Microsoft Fakes 279 | FakesAssemblies/ 280 | 281 | # GhostDoc plugin setting file 282 | *.GhostDoc.xml 283 | 284 | # Node.js Tools for Visual Studio 285 | .ntvs_analysis.dat 286 | node_modules/ 287 | 288 | # Visual Studio 6 build log 289 | *.plg 290 | 291 | # Visual Studio 6 workspace options file 292 | *.opt 293 | 294 | # Visual Studio 6 auto-generated workspace file (contains which files were open etc.) 295 | *.vbw 296 | 297 | # Visual Studio LightSwitch build output 298 | **/*.HTMLClient/GeneratedArtifacts 299 | **/*.DesktopClient/GeneratedArtifacts 300 | **/*.DesktopClient/ModelManifest.xml 301 | **/*.Server/GeneratedArtifacts 302 | **/*.Server/ModelManifest.xml 303 | _Pvt_Extensions 304 | 305 | # Paket dependency manager 306 | .paket/paket.exe 307 | paket-files/ 308 | 309 | # FAKE - F# Make 310 | .fake/ 311 | 312 | # CodeRush personal settings 313 | .cr/personal 314 | 315 | # Python Tools for Visual Studio (PTVS) 316 | __pycache__/ 317 | *.pyc 318 | 319 | # Cake - Uncomment if you are using it 320 | # tools/** 321 | # !tools/packages.config 322 | 323 | # Tabs Studio 324 | *.tss 325 | 326 | # Telerik's JustMock configuration file 327 | *.jmconfig 328 | 329 | # BizTalk build output 330 | *.btp.cs 331 | *.btm.cs 332 | *.odx.cs 333 | *.xsd.cs 334 | 335 | # OpenCover UI analysis results 336 | OpenCover/ 337 | 338 | # Azure Stream Analytics local run output 339 | ASALocalRun/ 340 | 341 | # MSBuild Binary and Structured Log 342 | *.binlog 343 | 344 | # NVidia Nsight GPU debugger configuration file 345 | *.nvuser 346 | 347 | # MFractors (Xamarin productivity tool) working folder 348 | .mfractor/ 349 | 350 | # Local History for Visual Studio 351 | .localhistory/ 352 | 353 | # BeatPulse healthcheck temp database 354 | healthchecksdb 355 | 356 | # Backup folder for Package Reference Convert tool in Visual Studio 2017 357 | MigrationBackup/ 358 | 359 | # Ionide (cross platform F# VS Code tools) working folder 360 | .ionide/ 361 | 362 | # Fody - auto-generated XML schema 363 | FodyWeavers.xsd -------------------------------------------------------------------------------- /WorkDll/WorkDll.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 | 17.0 23 | Win32Proj 24 | {9366e397-8e3a-4b62-8520-8412f8af6182} 25 | WorkDll 26 | 10.0 27 | 28 | 29 | 30 | DynamicLibrary 31 | true 32 | v143 33 | Unicode 34 | 35 | 36 | DynamicLibrary 37 | false 38 | v143 39 | true 40 | Unicode 41 | 42 | 43 | DynamicLibrary 44 | true 45 | v143 46 | Unicode 47 | 48 | 49 | DynamicLibrary 50 | false 51 | v143 52 | true 53 | Unicode 54 | 55 | 56 | 57 | 58 | 59 | 60 | 61 | 62 | 63 | 64 | 65 | 66 | 67 | 68 | 69 | 70 | 71 | 72 | 73 | 74 | 75 | WorkDll 76 | 77 | 78 | WorkDll 79 | 80 | 81 | WorkDll 82 | 83 | 84 | WorkDll 85 | 86 | 87 | 88 | Level3 89 | true 90 | WIN32;_DEBUG;WORKDLL_EXPORTS;_WINDOWS;_USRDLL;%(PreprocessorDefinitions) 91 | true 92 | pch.h 93 | $(TargetName).pch 94 | 95 | 96 | Windows 97 | true 98 | false 99 | 100 | 101 | 102 | 103 | Level3 104 | true 105 | true 106 | true 107 | WIN32;NDEBUG;WORKDLL_EXPORTS;_WINDOWS;_USRDLL;%(PreprocessorDefinitions) 108 | true 109 | pch.h 110 | $(TargetName).pch 111 | 112 | 113 | Windows 114 | true 115 | true 116 | true 117 | false 118 | 119 | 120 | 121 | 122 | Level3 123 | true 124 | _DEBUG;WORKDLL_EXPORTS;_WINDOWS;_USRDLL;%(PreprocessorDefinitions) 125 | true 126 | pch.h 127 | $(TargetName).pch 128 | 129 | 130 | Windows 131 | true 132 | false 133 | 134 | 135 | 136 | 137 | Level3 138 | true 139 | true 140 | true 141 | NDEBUG;WORKDLL_EXPORTS;_WINDOWS;_USRDLL;%(PreprocessorDefinitions) 142 | true 143 | pch.h 144 | $(TargetName).pch 145 | 146 | 147 | Windows 148 | true 149 | true 150 | true 151 | false 152 | 153 | 154 | 155 | 156 | 157 | 158 | 159 | 160 | 161 | 162 | 163 | 164 | 165 | 166 | 167 | 168 | 169 | 170 | 171 | -------------------------------------------------------------------------------- /HelpUploadFiles/HelpUploadFiles.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 | 17.0 23 | Win32Proj 24 | {1e4ece2f-3748-47be-bcda-d2c2f671d695} 25 | HelpUploadFiles 26 | 10.0 27 | 28 | 29 | 30 | Application 31 | true 32 | v143 33 | Unicode 34 | 35 | 36 | Application 37 | false 38 | v143 39 | true 40 | Unicode 41 | 42 | 43 | Application 44 | true 45 | v143 46 | Unicode 47 | 48 | 49 | Application 50 | false 51 | v143 52 | true 53 | Unicode 54 | 55 | 56 | 57 | 58 | 59 | 60 | 61 | 62 | 63 | 64 | 65 | 66 | 67 | 68 | 69 | 70 | 71 | 72 | 73 | 74 | 75 | 76 | Level3 77 | true 78 | WIN32;_DEBUG;_WINDOWS;%(PreprocessorDefinitions) 79 | true 80 | pch.h 81 | $(TargetName).pch 82 | stdcpp17 83 | 84 | 85 | Windows 86 | true 87 | 88 | 89 | 90 | 91 | Level3 92 | true 93 | true 94 | true 95 | WIN32;NDEBUG;_WINDOWS;%(PreprocessorDefinitions) 96 | true 97 | pch.h 98 | $(TargetName).pch 99 | stdcpp17 100 | 101 | 102 | Windows 103 | true 104 | true 105 | true 106 | 107 | 108 | 109 | 110 | Level3 111 | true 112 | _DEBUG;_WINDOWS;%(PreprocessorDefinitions) 113 | true 114 | pch.h 115 | $(TargetName).pch 116 | stdcpp17 117 | 118 | 119 | Windows 120 | true 121 | 122 | 123 | 124 | 125 | Level3 126 | true 127 | true 128 | true 129 | NDEBUG;_WINDOWS;%(PreprocessorDefinitions) 130 | true 131 | pch.h 132 | $(TargetName).pch 133 | stdcpp17 134 | 135 | 136 | Windows 137 | true 138 | true 139 | true 140 | 141 | 142 | 143 | 144 | 145 | 146 | 147 | 148 | 149 | 150 | 151 | 152 | 153 | 154 | 155 | 156 | 157 | 158 | 159 | 160 | 161 | 162 | 163 | 164 | 165 | 166 | 167 | 168 | 169 | 170 | 171 | 172 | 173 | 174 | 175 | 176 | 177 | 178 | 179 | 180 | -------------------------------------------------------------------------------- /HelpUploadFiles/CMainDlg.cpp: -------------------------------------------------------------------------------- 1 | #include "pch.h" 2 | #include "CMainDlg.h" 3 | 4 | CMainDlg* CMainDlg::singleton = new CMainDlg; 5 | 6 | INT_PTR CALLBACK CMainDlg::MainDlg(HWND hDlg, UINT message, WPARAM wParam, LPARAM lParam) 7 | { 8 | CMainDlg::singleton->SaveParameters(hDlg, message, wParam, lParam); 9 | switch (message) 10 | { 11 | case WM_INITDIALOG: 12 | CMainDlg::singleton->OnDlgInit(); 13 | break; 14 | 15 | case WM_COMMAND: 16 | CMainDlg::singleton->OnCommand(); 17 | break; 18 | case WM_DROPFILES: 19 | CMainDlg::singleton->OnDropFile(); 20 | break; 21 | case WM_LBUTTONDOWN: 22 | CMainDlg::singleton->OnLButtonDown(); 23 | break; 24 | case WM_LBUTTONUP: 25 | CMainDlg::singleton->OnLButtonUp(); 26 | break; 27 | case WM_MOUSEMOVE: 28 | CMainDlg::singleton->OnMouseMove(); 29 | break; 30 | } 31 | return (INT_PTR)FALSE; 32 | } 33 | 34 | VOID CMainDlg::OnDlgInit() 35 | { 36 | this->haveInject = false; 37 | 38 | this->hInjectWnd = NULL; 39 | SetDlgItemText(this->hDlg, IDC_CAPTUREWND, _T("长按鼠标开启捕获")); 40 | 41 | this->hListBox = GetDlgItem(this->hDlg, IDC_LIST1); 42 | this->hIcon = LoadIcon(this->hInst, MAKEINTRESOURCE(IDI_HELPUPLOADFILES)); 43 | SendMessage(this->hDlg, WM_SETICON, FALSE, (LPARAM)this->hIcon); 44 | 45 | this->hCaptureCur = LoadCursor(this->hInst, MAKEINTRESOURCE(IDC_CURSOR1)); 46 | 47 | DragAcceptFiles(this->hDlg, TRUE); 48 | } 49 | 50 | 51 | 52 | void CMainDlg::OnCommand() 53 | { 54 | // TODO: 在此处添加实现代码. 55 | switch (LOWORD(this->wParam)) 56 | { 57 | case IDCANCEL: 58 | EndDialog(hDlg, LOWORD(wParam)); 59 | break; 60 | case IDADD: 61 | OnAdd(); 62 | break; 63 | case IDREMOVE: 64 | OnRemove(); 65 | break; 66 | case IDM_INJECT: 67 | OnInject(); 68 | break; 69 | case IDM_IMPORT: 70 | OnImportSetting(); 71 | break; 72 | case IDM_EXPORT: 73 | OnExportSetting(); 74 | break; 75 | case IDM_SETPROCESS: 76 | OnSetProcessId(); 77 | break; 78 | case IDM_ABOUT: 79 | OnOpenAbout(); 80 | } 81 | } 82 | 83 | 84 | void CMainDlg::SaveParameters(HWND hDlg, UINT message, WPARAM wParam, LPARAM lParam) 85 | { 86 | this->hDlg = hDlg; 87 | this->message = message; 88 | this->wParam = wParam; 89 | this->lParam = lParam; 90 | } 91 | 92 | 93 | void CMainDlg::OnAdd() 94 | { 95 | if (!isHaveInject()) { 96 | return; 97 | } 98 | GetInputString(); 99 | DoAdd(); 100 | } 101 | 102 | void CMainDlg::DoAdd() 103 | { 104 | CIgnoreFileManager::getSingleton()->addIgnoreFile(this->szInput); 105 | ListBox_AddString(this->hListBox, this->szInput); 106 | } 107 | 108 | 109 | void CMainDlg::OnRemove() 110 | { 111 | int curSel = ListBox_GetCurSel(this->hListBox); 112 | if (curSel < 0) { 113 | return; 114 | } 115 | 116 | ListBox_GetText(this->hListBox, curSel, this->szInput); 117 | CIgnoreFileManager::getSingleton()->removeIgnoreFile(this->szInput); 118 | ListBox_DeleteString(this->hListBox, curSel); 119 | 120 | // 设置下一个选中的位置 121 | if (curSel > 0) { 122 | curSel--; 123 | } 124 | ListBox_SetCurSel(this->hListBox, curSel); 125 | } 126 | 127 | 128 | int CMainDlg::GetInputString() 129 | { 130 | return GetDlgItemText(this->hDlg, IDC_EDIT1, this->szInput, _countof(this->szInput)); 131 | } 132 | 133 | 134 | void CMainDlg::OnInject() 135 | { 136 | if (this->hInjectWnd == NULL) { 137 | return; 138 | } 139 | CContext::singleton->InjectWorkDll(this->hInjectWnd); 140 | this->hInjectWnd = NULL; 141 | 142 | this->haveInject = true; 143 | } 144 | 145 | 146 | void CMainDlg::OnOpenAbout() 147 | { 148 | DialogBox(this->hInst, MAKEINTRESOURCE(IDD_ABOUTBOX), this->hDlg, CAboutDlg::About); 149 | } 150 | 151 | 152 | void CMainDlg::OnDropFile() 153 | { 154 | HDROP hDrop = (HDROP)this->wParam; 155 | if (!isHaveInject()) { 156 | DragFinish(hDrop); // 结束此次拖拽 157 | return; 158 | } 159 | 160 | if (IDCANCEL == MessageBox(this->hDlg, _T("检测到拖拽文件,是否添加到忽略列表?"), _T("提示"), MB_ICONQUESTION | MB_OKCANCEL | MB_DEFBUTTON1)) { 161 | DragFinish(hDrop); // 结束此次拖拽 162 | return; 163 | } 164 | 165 | UINT numFiles = DragQueryFile(hDrop, 0xFFFFFFFF, NULL, 0); 166 | 167 | // 此功能从 C++ 17 开始支持 168 | namespace fs = std::filesystem; 169 | 170 | for (UINT i = 0; i < numFiles; i++) 171 | { 172 | //TCHAR szFileName[MAX_PATH]; 173 | DragQueryFile(hDrop, i, this->szInput, MAX_PATH); 174 | 175 | // 在这里处理拖放的文件,比如显示文件名 176 | fs::path path = this->szInput; 177 | _tcscpy_s(this->szInput, _countof(this->szInput), path.filename().c_str()); 178 | 179 | // 拖拽将逃逸正则规则 180 | std::swprintf(this->szInput, _countof(this->szInput), _T("%s"), CEscapeRegex::escapeRegex(this->szInput).c_str()); 181 | 182 | DoAdd(); 183 | } 184 | 185 | DragFinish(hDrop); 186 | } 187 | 188 | 189 | 190 | void CMainDlg::OnMouseMove() 191 | { 192 | if (GetCapture() == NULL) { 193 | return; 194 | } 195 | POINT pt; 196 | GetCursorPos(&pt); 197 | HWND hWnd = WindowFromPoint(pt); 198 | if (hWnd == this->hInjectWnd) { 199 | // 窗口未发送变化,不处理 200 | return; 201 | } 202 | this->hInjectWnd = hWnd; 203 | 204 | TCHAR szClass[100]; 205 | szTitle[0] = '\0'; 206 | szClass[0] = '\0'; 207 | 208 | HWND hCaptureTextWnd = GetDlgItem(this->hDlg, IDC_CAPTUREWND); 209 | GetWindowText(hWnd, szTitle, _countof(szTitle)); 210 | if (szTitle[0] == '\0') { 211 | GetClassName(hWnd, szClass, _countof(szClass)); 212 | 213 | std::swprintf(szTitle, _countof(szTitle), _T("%s - %s"), szClass, szTitle); 214 | } 215 | SetWindowText(hCaptureTextWnd, szTitle); 216 | } 217 | 218 | 219 | void CMainDlg::OnLButtonDown() 220 | { 221 | SetCapture(this->hDlg); 222 | this->hOldCur = SetCursor(this->hCaptureCur); 223 | } 224 | 225 | 226 | void CMainDlg::OnLButtonUp() 227 | { 228 | ReleaseCapture(); 229 | SetCursor(this->hOldCur); 230 | 231 | TCHAR sz[MAX_PATH]; 232 | std::swprintf(sz, _countof(sz), _T("是否为窗口 %s 加载赋能模块"), this->szTitle); 233 | 234 | if (IDOK == MessageBox(this->hDlg, sz, _T("加载赋能模块"), MB_ICONQUESTION | MB_OKCANCEL)) { 235 | OnInject(); 236 | } 237 | } 238 | 239 | 240 | bool CMainDlg::isHaveInject() 241 | { 242 | bool b = this->haveInject; 243 | if (!b) { 244 | TCHAR sz[MAX_PATH]; 245 | std::swprintf(sz, _countof(sz), _T("尚未注入赋能模块,请先完成注入操作")); 246 | MessageBox(this->hDlg, sz, _T("提示"), MB_ICONWARNING); 247 | } 248 | return b; 249 | } 250 | 251 | 252 | void CMainDlg::OnSetProcessId() 253 | { 254 | // TODO: 在此处添加实现代码. 255 | INT_PTR res = DialogBox(hInst, MAKEINTRESOURCE(IDD_SETPROCESSDLG), this->hDlg, CSetProcessDlg::SetProcess); 256 | if (res == IDCANCEL) { 257 | return; 258 | } 259 | 260 | CInjectDll::DoInject(CSetProcessDlg::singleton->getProcessId()); 261 | 262 | this->haveInject = true; 263 | 264 | } 265 | 266 | 267 | void CMainDlg::OnImportSetting() 268 | { 269 | if (!isHaveInject()) { 270 | return; 271 | } 272 | // 导入配置文件:忽略列表 273 | OPENFILENAME ofn; // 使用OPENFILENAMEW结构体,它是OPENFILENAME的Unicode版本 274 | TCHAR szFile[MAX_PATH]; // 使用WCHAR数组来存储Unicode字符串 275 | szFile[0] = '\0'; 276 | 277 | // 初始化OPENFILENAMEW结构体 278 | ZeroMemory(&ofn, sizeof(ofn)); 279 | ofn.lStructSize = sizeof(ofn); 280 | ofn.hwndOwner = hDlg; 281 | ofn.lpstrFile = szFile; 282 | ofn.nMaxFile = _countof(szFile); 283 | ofn.lpstrFilter = _T("HUFS Files\0*.hufs\0All Files\0*.*\0"); 284 | ofn.nFilterIndex = 1; 285 | ofn.lpstrFileTitle = NULL; 286 | ofn.nMaxFileTitle = 0; 287 | ofn.lpstrInitialDir = NULL; 288 | ofn.Flags = OFN_PATHMUSTEXIST | OFN_FILEMUSTEXIST; 289 | 290 | // 显示打开文件对话框 291 | if (GetOpenFileNameW(&ofn) == TRUE && MessageBox(hDlg, _T("是否追加配置?"),_T("提示"), MB_ICONQUESTION | MB_OKCANCEL) == IDOK) { 292 | // 文件路径为 ofn.lpstrFile 293 | SettingSerialize(TRUE, ofn.lpstrFile); 294 | } 295 | else { 296 | // 用户取消了操作 297 | return; 298 | } 299 | } 300 | 301 | 302 | void CMainDlg::OnExportSetting() 303 | { 304 | // 导出配置文件:忽略列表 305 | OPENFILENAME ofn; // 使用OPENFILENAMEW结构体,它是OPENFILENAME的Unicode版本 306 | TCHAR szFile[MAX_PATH]; // 使用WCHAR数组来存储Unicode字符串 307 | szFile[0] = '\0'; 308 | TCHAR szFileName[MAX_PATH]; // 存储用户选择的文件名 309 | 310 | // 初始化OPENFILENAMEW结构体 311 | ZeroMemory(&ofn, sizeof(ofn)); 312 | ofn.lStructSize = sizeof(ofn); 313 | ofn.hwndOwner = NULL; 314 | ofn.lpstrFile = szFile; 315 | ofn.nMaxFile = _countof(szFile); // 确保nMaxFile是字符数,而不是字节数 316 | ofn.lpstrDefExt = L"hufs"; // 默认扩展名 317 | ofn.lpstrFilter = L"HUFS Files\0*.hufs\0All Files\0*.*\0"; 318 | ofn.nFilterIndex = 1; 319 | ofn.Flags = OFN_PATHMUSTEXIST | OFN_OVERWRITEPROMPT | OFN_EXPLORER; 320 | 321 | // 显示保存文件对话框 322 | if (GetSaveFileNameW(&ofn) == TRUE) { 323 | // 用户选择了文件名并点击了“保存”按钮 324 | // szFile中包含了选择的文件的完整路径 325 | wcscpy_s(szFileName, ofn.lpstrFile); // 复制选择的文件名 326 | // 这里可以进行文件保存操作 327 | SettingSerialize(FALSE, szFileName); 328 | } 329 | else { 330 | // 用户取消了操作 331 | return; 332 | } 333 | } 334 | 335 | 336 | void CMainDlg::SettingSerialize(bool bReadPattern, LPTSTR filename) 337 | { 338 | /* 339 | * 文件格式: 340 | * 第一行为 版本号 341 | * 每一行都为 TCHAR[MAX_PATH] 342 | */ 343 | double version = 1.05; 344 | double versionRead = 0; 345 | DWORD dwCreationDisposition = bReadPattern ? OPEN_EXISTING : CREATE_ALWAYS; 346 | 347 | // 读写配置文件 348 | HANDLE hFile = CreateFile( 349 | filename, // 文件路径 350 | GENERIC_READ | GENERIC_WRITE, // 打开文件用于读取与写入 351 | 0, // 不共享(独占) 352 | NULL, // 安全属性 353 | dwCreationDisposition, // 打开已存在的文件 354 | FILE_ATTRIBUTE_NORMAL,// 正常文件属性 355 | NULL); // 不使用模板 356 | 357 | if (hFile == INVALID_HANDLE_VALUE) { 358 | MessageBox(hDlg, _T("配置文件打开或写入失败!"), _T("严重错误"), MB_ICONERROR); 359 | return; 360 | } 361 | 362 | HWND hwndListBox = GetDlgItem(hDlg, IDC_LIST1); // 获取列表框控件的句柄 363 | 364 | __try { 365 | if (bReadPattern) { 366 | // 读模式 367 | // 368 | // 读取版本号 369 | DWORD dwSize = 0; 370 | if (ReadFile(hFile, &versionRead, sizeof(versionRead), &dwSize, NULL)) { 371 | if (dwSize == sizeof(versionRead)) { 372 | if (versionRead != version) { 373 | MessageBox(hDlg, _T("配置文件版本号不一致"), _T("提示"), MB_ICONERROR); 374 | return; 375 | } 376 | } 377 | } 378 | else { 379 | MessageBox(hDlg, _T("读取配置文件失败"), _T("提示"), MB_ICONERROR); 380 | return; 381 | } 382 | 383 | // 读取每一行 384 | TCHAR szBuffer[MAX_PATH]; 385 | DWORD bufferSize = sizeof(szBuffer); 386 | dwSize = 0; 387 | while (ReadFile(hFile, szBuffer, bufferSize, &dwSize, NULL)) { 388 | if (dwSize > 0) { 389 | // 添加 390 | _tcscpy_s(this->szInput, _countof(this->szInput), szBuffer); 391 | DoAdd(); 392 | } 393 | else { 394 | break; 395 | } 396 | } 397 | 398 | MessageBox(hDlg, _T("导入配置文件完成"), _T("提示"), MB_ICONINFORMATION); 399 | } 400 | else { 401 | // 写模式 402 | // 写入版本号 403 | DWORD bytesWritten = sizeof(version); 404 | BOOL bSuccess = WriteFile(hFile, &version, bytesWritten, &bytesWritten, NULL); 405 | if (!bSuccess) { 406 | MessageBox(hDlg, _T("写入版本号失败"), _T("提示"), MB_ICONERROR); 407 | return; 408 | } 409 | 410 | // 写入每一行 411 | int count = ListBox_GetCount(hwndListBox); // 获取列表框中的项数 412 | 413 | for (int i = 0; i < count; ++i) { 414 | TCHAR buffer[MAX_PATH]; // 每个项的文本不超过255个字符 415 | ListBox_GetText(hwndListBox, i, buffer); // 获取第i项的文本 416 | 417 | 418 | bSuccess = WriteFile(hFile, buffer, sizeof(buffer), &bytesWritten, NULL); 419 | if (!bSuccess) { 420 | MessageBox(hDlg, _T("写入版本号失败"), _T("提示"), MB_ICONERROR); 421 | return; 422 | } 423 | 424 | } 425 | } 426 | } __finally { 427 | CloseHandle(hFile); 428 | } 429 | } 430 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # 🍕HelpUploadFiles 2 | 3 | ![GitHub license](https://img.shields.io/github/license/KrxkGit/HelpUploadFiles) ![GitHub last commit](https://img.shields.io/github/last-commit/KrxkGit/HelpUploadFiles/dev) [![GitHub stars](https://img.shields.io/github/stars/KrxkGit/HelpUploadFiles.svg?style=social)](https://github.com/KrxkGit/HelpUploadFiles) 4 | 5 | ## 🍺简介 - Introduction 6 | 7 | ***HelpUploadFiles (星空上传助手)*** 是一款 **辅助上传** 工具。我们知道,*git* 提供了 **.gitignore** 文件用于根据规则忽略某些文件的上传,但是这个功能仅限于 *git*,还有很多场景涉及**文件的上传**,比如我们可能需要将某些文件上传到网盘,但是大部分网盘并不具备 ***根据规则忽略指定文件*** 的功能,这十分不方便。另外,还存在着许许多多的上传文件的场景,此时,***HelpUploadFiles*** 油然而生! 8 | 9 | ***HelpUploadFiles*** is an **auxiliary upload** tool. We know that *git* provides a **.gitignore** file for ignoring certain files from being uploaded based on rules, but this feature is limited to *git*. There are many scenarios involving **file uploads**, such as when we might need to upload certain files to cloud storage. However, most cloud storage services do not have the capability to **ignore specified files based on rules**, which is quite inconvenient. Additionally, there are numerous scenarios for uploading files. At this point, ***HelpUploadFiles*** comes into play! 10 | 11 | 由于对于单个文件,不需要特别的规则进行忽略上传,故 ***HelpUploadFiles*** 主要是针对 ***文件夹*** 的上传场景。 12 | 13 | Since there are no special rules required to ignore uploading for individual files, HelpUploadFiles is primarily aimed at scenarios involving folder uploads. 14 | 15 | ## 🧡Star History 16 | 17 | [![Star History Chart](https://api.star-history.com/svg?repos=KrxkGit/HelpUploadFiles&type=Date)](https://star-history.com/#KrxkGit/HelpUploadFiles&Date) 18 | 19 | ## 🔥软件包的获取 20 | 21 | 1. 可前往 *Actions* 区下载最新特性 **HelpUploadFiles** 包。 22 | 2. 可前往 *Releases* 区下载稳定版本的 **HelpUploadFiles** 包。 23 | 24 | ## 🔥Package Acquisition 25 | 26 | 1. You can go to the *Actions* section to download the latest feature package **HelpUploadFiles**. 27 | 2. You can go to the *Releases* section to download the stable version of the **HelpUploadFiles** package. 28 | 29 | ## 🍺文件上传概念的推广 - Expansion of File Upload Concepts 30 | 31 | ***HelpUploadFiles*** 涉及的文件上传并不仅仅局限于将本机文件上传到网盘这种场景,在 ***HelpUploadFiles*** 中,凡是需要 **将某个文件夹发送到某一个接口** 的操作均可推广为文件上传。 32 | 33 | The file upload involved with HelpUploadFiles is not limited to scenarios of uploading local files to cloud storage. In HelpUploadFiles, any operation that involves sending a folder to a specific interface can be generalized as file uploading. 34 | 35 | 以下场景均可视文件上传概念的推广: 36 | 37 | 1. 将本机文件夹上传到**网盘**。 38 | 2. 将本机文件夹发送到**另一台设备**(如局域网内设备、服务器对象存储服务等)。 39 | 3. 将本机文件夹发送到**压缩软件**等接口。 40 | 41 | 42 | 43 | The following scenarios can be considered as expanded concepts of file uploading: 44 | 45 | 1. Uploading a local folder to cloud storage. 46 | 2. Sending a local folder to another device (such as devices within a local area network, server object storage services, etc.). 47 | 3. Sending a local folder to interfaces of compression software, etc. 48 | 49 | ## 🍻验证通过的应用场景 - Verified Application Scenarios 50 | 51 | 以下场景均已验证通过: 52 | 53 | 1. **Chromium 浏览器** 涉及的文件夹上传 54 | 2. **Edge 浏览器** 涉及的文件夹上传 55 | 3. 百度网盘客户端 56 | 4. 腾讯微云客户端 57 | 5. 阿里网盘 58 | 6. 天翼网盘客户端 59 | 7. 中国移动硬盘客户端 60 | 8. 联通网盘 61 | 9. 谷歌云端硬盘 62 | 10. 小飞机网盘 63 | 11. 奶牛快传 64 | 12. 123云盘 65 | 13. 华为云对象存储服务 OBS 66 | 14. 阿里云对象存储服务 OSS 67 | 15. 腾讯云对象存储服务 COS 68 | 16. LocalSend 69 | 17. Send Anywhere 客户端 70 | 18. WinSCP 71 | 19. 7z、Bandizip、360压缩等压缩软件 72 | 73 | 74 | 75 | The following scenarios have been verified and are operational: 76 | 77 | 1. Folder uploads involving the Chromium browser. 78 | 2. Folder uploads involving the Edge browser. 79 | 3. Baidu Cloud client. 80 | 4. Tencent Weiyun client. 81 | 5. Alibaba Cloud Drive. 82 | 6. Tianyi Cloud client. 83 | 7. China Mobile Hard Disk client. 84 | 8. Unicom Cloud. 85 | 9. Google Cloud Storage. 86 | 10. Little Airplane Cloud. 87 | 11. Niuniu Express. 88 | 12. 123 Cloud Storage. 89 | 13. Huawei Cloud Object Storage Service OBS. 90 | 14. Alibaba Cloud Object Storage Service OSS. 91 | 15. Tencent Cloud Object Storage Service COS. 92 | 16. LocalSend. 93 | 17. Send Anywhere client. 94 | 18. WinSCP. 95 | 19. Compression software such as 7z, Bandizip, 360 Compression, etc. 96 | 97 | ## 📍使用注意事项 98 | 99 | 1. ***HelpUploadFiles*** 分为 ***32位*** 与 ***64位*** 两个版本,需要根据不同的上传接口选择不同的版本,如目前百度网盘客户端是32位的,则需要使用32位版本的 ***HelpUploadFiles***;而64位系统的Edge浏览器是64位程序,则需要使用64位版本的 ***HelpUploadFiles***。 100 | 2. 目前版本(v1.0.3)仅支持同时拦截一个进程的文件上传行为,值得注意的是 ***32位 与 64位版本 加起来一共能同时拦截一个进程***。且 ***添加/移除*** 忽略列表的操作 **仅对当前拦截的进程有效,若切换进程,即使重新注入,也需要重新添加忽略列表(移除后重新添加),否则将无效。** 这是由于目前采用的进程通信方案导致的。 101 | 3. 对于下方输入框手动输入的忽略规则,将采用 **C++ 正则表达式规则**。 102 | 4. 对于拖拽上传的文件,将自动进行转义使其符合 **C++正则表达式规则**。 103 | 104 | ## 📍Usage Notes 105 | 106 | 1. HelpUploadFiles comes in two versions: 32-bit and 64-bit. You need to select the appropriate version based on the upload interface, such as using the 32-bit version of HelpUploadFiles for the 32-bit Baidu Cloud client, while the 64-bit Edge browser on a 64-bit system is a 64-bit program, requiring the 64-bit version of HelpUploadFiles. 107 | 108 | 2. The current version (v1.0.2) only supports intercepting the file upload behavior of one process at a time. It's important to note that the 32-bit and 64-bit versions combined can only intercept one process simultaneously. Additionally, operations to add/remove the ignore list only take effect for the currently intercepted process. If you switch processes, even with a re-injection, you will need to re-add the ignore list (remove and then re-add), otherwise, it will be ineffective. This is due to the process communication scheme currently in use. 109 | 110 | 3. For manual input of ignore rules in the input box below, C++ regular expression rules will be used. 111 | 112 | 4. For files uploaded by dragging and dropping, automatic escaping will be performed to conform to C++ regular expression rules. 113 | 114 | ## ✨使用步骤(以百度网盘为例,其它应用类似)- **Usage Steps (using Baidu Cloud as an example, other applications are similar)** 115 | 116 | 1. 打开百度网盘。 117 | 118 | Open Baidu Cloud. 119 | 120 | ![百度网盘](https://github.com/KrxkGit/HelpUploadFiles/blob/main/documents/imgs/1.jpg) 121 | 122 | 2. 🔑打开 ***HelpUploadFiles***,长按鼠标左键,光标将改变表明程序进入捕获状态,此时将鼠标移动到百度网盘主窗口再松开鼠标左键,下图红框处的提示文字也随之改变为 将要**捕获的窗口的标题**(若标题为空则为窗口类名)。 123 | 124 | Open HelpUploadFiles, press and hold the left mouse button, the cursor will change indicating that the program has entered the capture state. Move the mouse to the main window of Baidu Cloud and release the left mouse button. The prompt text in the red box below will also change to the title of the window to be captured (if the title is empty, it will be the window class name). 125 | 126 | ![image-20240427053601352](https://github.com/KrxkGit/HelpUploadFiles/blob/main/documents/imgs/2.jpg) 127 | 128 | 3. 此时会提示是否注入赋能模块到百度网盘,点击确认,百度网盘将打开一个对话框告知 **赋能模块注入成功**(这个对话框是由百度网盘所在进程产生的,一个显然的提示是**对话框的图标是百度网盘的图标**),即表明模块注入成功。如果没有提示赋能模块注入成功,有以下两种可能: 129 | 130 | At this point, you will be prompted whether to inject the empowerment module into Baidu Cloud. Click confirm, and Baidu Cloud will open a dialog box informing you of the successful injection of the empowerment module (this dialog box is generated by the Baidu Cloud process, and an obvious indication is that the dialog box icon is the Baidu Cloud icon), indicating that the module injection is successful. If there is no prompt for a successful empowerment module injection, there are two possibilities: 131 | 132 | - 赋能模块在之前已经注入,此次注入为重复注入。 133 | 134 | - 赋能模块注入失败,这表明功能将**不可用**。 135 | 136 | 137 | 138 | - The empowerment module has already been injected before, and this injection is a repeat. 139 | - The empowerment module injection failed, which means the function will not be available. 140 | Please ensure that you click the "OK" button on the "Successful Empowerment Module Injection" message box before proceeding to the next step. 141 | 142 | ![image-20240427054456616](https://github.com/KrxkGit/HelpUploadFiles/blob/main/documents/imgs/3.jpg) 143 | 144 | ![image-20240427054258394](https://github.com/KrxkGit/HelpUploadFiles/blob/main/documents/imgs/4.jpg) 145 | 146 | > 请确保在进行下一步前点击 **赋能模块注入成功** 消息框的**确定键**。 147 | > 148 | > Please ensure that you click the **OK button** on the **Successful Empowerment Module Injection** message box before proceeding to the next step. 149 | 150 | 4. **添加忽略规则(基于C++正则表达式规则)** 151 | 152 | **Add ignore rules (based on C++ regular expression rules).** 153 | 154 | 有两种方式可以添加忽略规则: 155 | 156 | There are two ways to add ignore rules: 157 | 158 | - 可通过将文件拖拽到忽略文件列表。(拖拽文件会自动完成转义,以自动适配正则表达式规则)。 159 | - 在下方输入框手动输入正则表达式并点击 “**忽略**” 按钮添加(回车也可以)。 160 | 161 | 162 | 163 | - You can drag and drop files into the ignore file list. (Dragging files will automatically complete the escaping to automatically adapt to regular expression rules). 164 | - Manually enter the regular expression in the input box below and click the "Ignore" button to add (pressing Enter is also possible). 165 | 166 | 如果需要移除忽略规则,可先选中忽略列表框中的忽略规则,然后点击按钮 "**移除**"即可。 167 | 168 | If you need to remove an ignore rule, select the ignore rule in the ignore list box and then click the "Remove" button. 169 | 170 | 如下图,我添加了两条忽略规则用以忽略: 171 | 172 | As shown in the figure below, I have added two ignore rules to ignore: 173 | 174 | - .idea 文件夹 175 | - node_modules 文件夹 176 | 177 | 178 | 179 | - The `.idea` folder 180 | - The `node_modules` folder 181 | 182 | ![image-20240427055311356](https://github.com/KrxkGit/HelpUploadFiles/blob/main/documents/imgs/5.jpg) 183 | 184 | 5. **上传文件** 185 | 186 | Upload file 187 | 188 | 将需要上传的文件夹拖拽到百度网盘(其它方式也可以)完成上传。匹配忽略规则的文件将不会被上传。 189 | 190 | Upload files by dragging the folder you need to upload to Baidu Cloud (other methods are also possible) to complete the upload. Files that match the ignore rules will not be uploaded. 191 | 192 | image-20240427055606539 193 | 194 | ![image-20240427055655356](https://github.com/KrxkGit/HelpUploadFiles/blob/main/documents/imgs/7.jpg) 195 | 196 | ## ⭐关键步骤分析与经验 - Key Step Analysis and Experience 197 | 198 | 上述步骤的 第 2 步是关键步骤,决定了程序能否达到预期效果。 199 | 200 | 该步骤要考虑两个问题: 201 | 202 | 1. 使用哪个版本的***HelpUploadFiles*** 203 | 2. 捕获哪个窗口(即鼠标移动到哪个窗口再松开) 204 | 205 | 206 | 207 | Step 2 above is the key step, determining whether the program can achieve the expected results. 208 | 209 | This step requires considering two issues: 210 | 211 | 1. Which version of HelpUploadFiles to use 212 | 2. Which window to capture (i.e., which window to move the mouse to and then release) 213 | 214 | ### 🌛分析使用哪个版本的 ***HelpUploadFiles*** - Analysis of Which Version of HelpUploadFiles to Use 215 | 216 | - 可通过任务管理器查看要拦截的程序(如百度网盘)是什么版本,然后采用对应版本的 ***HelpUploadFiles*** 217 | - 但这也不是绝对的,有些 64位程序 需要使用 32位版本的 ***HelpUploadFiles***,在64位方案不可行时可考虑验证此方案。(如下文的 ***WinSCP*** ) 218 | 219 | - You can check the version of the program you want to intercept (such as Baidu Cloud) through Task Manager, and then use the corresponding version of HelpUploadFiles. 220 | 221 | - However, this is not absolute. Some 64-bit programs require the use of the 32-bit version of HelpUploadFiles. If the 64-bit solution is not feasible, you can consider verifying this scheme (as with WinSCP below). 222 | 223 | 224 | ### 🌜使用经验汇总 - Usage Experience Summary 225 | 226 | #### 🌈使用 32位(x86)版本 227 | 228 | | 程序 | 捕获窗口 | 229 | | :-------------------: | :------------------------------------------------: | 230 | | 百度网盘客户端 | 主窗口 或 拖拽上传悬浮窗口均可 | 231 | | 腾讯微云客户端 | ❗ **QQ主窗口**(注意此处比较特殊,非腾讯微云窗口) | 232 | | 天翼网盘 | 主窗口 或 拖拽上传悬浮窗口均可 | 233 | | 中国移动硬盘 | 主窗口 或 拖拽上传悬浮窗口均可 | 234 | | WinSCP | 主窗口 或 拖拽上传悬浮窗口均可 | 235 | | 360压缩等32位压缩工具 | 压缩菜单弹出窗口 | 236 | | Send Anywhere 客户端 | 主窗口 | 237 | 238 | #### 🌈 **Using the 32-bit (x86) Version** 239 | 240 | | Program | Capture Window | 241 | | :------------------------------------------------: | :----------------------------------------------------------: | 242 | | Baidu Cloud Client | Main window or drag-and-drop upload floating window both work | 243 | | Tencent Weiyun Client | ❗ QQ Main window (note that this is special, not the Tencent Weiyun window) | 244 | | Tianyi Cloud | Main window or drag-and-drop upload floating window both work | 245 | | China Mobile Hard Disk | Main window or drag-and-drop upload floating window both work | 246 | | WinSCP | Main window or drag-and-drop upload floating window both work | 247 | | 360 Compression and other 32-bit compression tools | Compression menu pop-up window | 248 | | Send Anywhere Client | Main window | 249 | 250 | #### 🌈使用 64位 (x64)版本 251 | 252 | | 程序 | 捕获窗口 | 253 | | :-------------------------------: | :--------------: | 254 | | **Chromium 浏览器** | 网页页面 | 255 | | **Edge 浏览器** | 网页页面 | 256 | | 奶牛快传网页版 | 网页页面 | 257 | | 小飞机网盘网页版 | 网页页面 | 258 | | 阿里网盘网页版 | 网页页面 | 259 | | 123云盘网页版 | 网页页面 | 260 | | 联通网盘网页版 | 网页页面 | 261 | | 谷歌云端硬盘网页版 | 网页页面 | 262 | | 华为云对象存储服务 OBS 控制台网页 | 网页页面 | 263 | | 阿里云对象存储服务 OSS 控制台网页 | 网页页面 | 264 | | 腾讯云对象存储服务 COS 控制台网页 | 网页页面 | 265 | | LocalSend | 主窗口 | 266 | | 7z、Bandizip 等64位压缩工具 | 压缩菜单弹出窗口 | 267 | 268 | #### 🌈 **Using the 64-bit (x64) Version** 269 | 270 | | Program | Capture Window | 271 | | :--------------------------------------------------: | :----------------------------: | 272 | | Chromium Browser | Web page | 273 | | Edge Browser | Web page | 274 | | Niuniu Express Web Version | Web page | 275 | | Little Airplane Cloud Web Version | Web page | 276 | | Alibaba Cloud Drive Web Version | Web page | 277 | | 123 Cloud Storage Web Version | Web page | 278 | | Unicom Cloud Web Version | Web page | 279 | | Google Cloud Storage Web Version | Web page | 280 | | Huawei Cloud Object Storage Service OBS Console Web | Web page | 281 | | Alibaba Cloud Object Storage Service OSS Console Web | Web page | 282 | | Tencent Cloud Object Storage Service COS Console Web | Web page | 283 | | LocalSend | Main window | 284 | | 7z, Bandizip, and other 64-bit compression tools | Compression menu pop-up window | 285 | 286 | ## 🍗操作视频演示(以7z压缩软件为例)- Operation Video Demonstration (using 7z compression software as an example) 287 | 288 | 演示视频 289 | 290 | ## 🌭C++正则表达式附录 - C++ Regular Expression Appendix 291 | 292 | 正则表达式是一种用于描述字符串模式的工具,它可以帮助您在文本中进行搜索、匹配、替换等操作。以下是一些常用的正则表达式规则和符号: 293 | 294 | 1. 字符类别: 295 | - `\d`:匹配任意一个数字字符,相当于 `[0-9]`。 296 | - `\D`:匹配任意一个非数字字符,相当于 `[^0-9]`。 297 | - `\w`:匹配任意一个字母、数字或下划线字符,相当于 `[a-zA-Z0-9_]`。 298 | - `\W`:匹配任意一个非字母、数字或下划线字符,相当于 `[^a-zA-Z0-9_]`。 299 | - `\s`:匹配任意一个空白字符,包括空格、制表符、换行符等。 300 | - `\S`:匹配任意一个非空白字符。 301 | 2. 重复次数: 302 | - `*`:匹配前面的字符零次或多次。 303 | - `+`:匹配前面的字符一次或多次。 304 | - `?`:匹配前面的字符零次或一次。 305 | - `{n}`:匹配前面的字符恰好 n 次。 306 | - `{n,}`:匹配前面的字符至少 n 次。 307 | - `{n,m}`:匹配前面的字符至少 n 次,最多 m 次。 308 | 3. 边界匹配: 309 | - `^`:匹配字符串的开头。 310 | - `$`:匹配字符串的结尾。 311 | - `\b`:匹配单词边界。 312 | 4. 分组和引用: 313 | - `()`:将其中的字符视为一个整体,可以用于分组操作。 314 | - `\1`, `\2`, ...:引用分组中的匹配结果。 315 | 5. 特殊字符转义: 316 | - `\`:用于转义特殊字符,例如 `\.` 表示匹配点字符 `.`。 317 | 6. 其他常用符号: 318 | - `|`:表示或操作,匹配两者之一。 319 | - `.`:匹配任意一个字符,除了换行符。 320 | 321 | 322 | 323 | Regular expressions are tools used to describe string patterns that can help you perform operations such as search, match, and replace in text. Here are some common regular expression rules and symbols: 324 | 325 | Character Categories: 326 | 327 | - `\d`: Matches any digit character, equivalent to `[0-9]`. 328 | - `\D`: Matches any non-digit character, equivalent to `[^0-9]`. 329 | - `\w`: Matches any letter, digit, or underscore character, equivalent to `[a-zA-Z0-9_]`. 330 | - `\W`: Matches any non-letter, non-digit, or non-underscore character, equivalent to `[^a-zA-Z0-9_]`. 331 | - `\s`: Matches any whitespace character, including spaces, tabs, and newlines. 332 | - `\S`: Matches any non-whitespace character. 333 | 334 | Repeat Counts: 335 | 336 | - `*`: Matches the preceding character zero or more times. 337 | - `+`: Matches the preceding character one or more times. 338 | - `?`: Matches the preceding character zero or one time. 339 | - `{n}`: Matches the preceding character exactly n times. 340 | - `{n,}`: Matches the preceding character at least n times. 341 | - `{n,m}`: Matches the preceding character at least n times, but no more than m times. 342 | 343 | Boundary Matches: 344 | 345 | - `^`: Matches the beginning of a string. 346 | - `$`: Matches the end of a string. 347 | - `\b`: Matches a word boundary. 348 | 349 | Grouping and Referencing: 350 | 351 | - `()`: Treats the characters within as a group for operations. 352 | - `\1, \2, ...`: Refer to the match results of the grouped matches. 353 | 354 | Special Character Escaping: 355 | 356 | - `\`: Used to escape special characters, for example, `\.` represents a match for the dot character. 357 | 358 | Other Common Symbols: 359 | 360 | - `|`: Represents an OR operation, matching either of the two. 361 | - `.`: Matches any character except for a newline. 362 | 363 | 364 | ## 🧊v1.0.4 新增功能 - v1.0.4 New Features 365 | 366 | ### 🥤简介 - Introduction 367 | 368 | 新版本增添了基于进程 id 注入赋能模块到进程的功能,主要可用于注入一些不存在可见窗口的进程。其中选择 32位还是 64 位版本 HelpUploadFiles 的策略与基于窗口捕获方案相同。 369 | 370 | The new version has added the functionality to inject an empowerment module into a process based on the process ID, which can primarily be used for injecting into processes that do not have visible windows. The strategy for selecting whether to use the 32-bit or 64-bit version of HelpUploadFiles is the same as the one based on the window capture scheme. 371 | 372 | ### 🥤使用步骤 - Usage Steps 373 | 374 | #### 🍷通过任务管理器获取进程 id - Obtain the Process ID through Task Manager 375 | 376 | 通过任务管理器查看需要注入的进程 id号。 377 | 378 | Use the Task Manager to view the process ID that needs to be injected. 379 | 380 | ![image-20240509222044400](https://github.com/KrxkGit/HelpUploadFiles/blob/main/documents/imgs/10.jpg) 381 | 382 | #### 🍷根据进程id注入进程 - Inject into the Process Based on the Process ID 383 | 384 | 选择合适版本 (x86/x64) 的 **HelpUploadFiles** 完成注入。 385 | 386 | Choose the appropriate version (x86/x64) of **HelpUploadFiles** to complete the injection. 387 | 388 | ![image-20240509221813136](https://github.com/KrxkGit/HelpUploadFiles/blob/main/documents/imgs/9.jpg) 389 | 390 | ![image-20240509222322638](https://github.com/KrxkGit/HelpUploadFiles/blob/main/documents/imgs/11.jpg) 391 | 392 | ## 🧊v1.0.5 新增功能 - v1.0.5 New Features 393 | 394 | 此版本新增忽略列表导入与导出功能。 395 | 396 | This version adds the functionality of importing and exporting an ignore list. 397 | 398 | 399 | ## 🟡已发现的不完全适用情况 - Known Partially Incompatible Situations 400 | 401 | - 比特球网盘 未完全兼容,存在目录创建失败问题。 402 | - BitBalloon Cloud Storage is not fully compatible, with issues such as directory creation failure. -------------------------------------------------------------------------------- /LICENSE.txt: -------------------------------------------------------------------------------- 1 | GNU GENERAL PUBLIC LICENSE 2 | Version 3, 29 June 2007 3 | 4 | Copyright (C) 2007 Free Software Foundation, Inc. 5 | Everyone is permitted to copy and distribute verbatim copies 6 | of this license document, but changing it is not allowed. 7 | 8 | Preamble 9 | 10 | The GNU General Public License is a free, copyleft license for 11 | software and other kinds of works. 12 | 13 | The licenses for most software and other practical works are designed 14 | to take away your freedom to share and change the works. By contrast, 15 | the GNU General Public License is intended to guarantee your freedom to 16 | share and change all versions of a program--to make sure it remains free 17 | software for all its users. We, the Free Software Foundation, use the 18 | GNU General Public License for most of our software; it applies also to 19 | any other work released this way by its authors. You can apply it to 20 | your programs, too. 21 | 22 | When we speak of free software, we are referring to freedom, not 23 | price. Our General Public Licenses are designed to make sure that you 24 | have the freedom to distribute copies of free software (and charge for 25 | them if you wish), that you receive source code or can get it if you 26 | want it, that you can change the software or use pieces of it in new 27 | free programs, and that you know you can do these things. 28 | 29 | To protect your rights, we need to prevent others from denying you 30 | these rights or asking you to surrender the rights. Therefore, you have 31 | certain responsibilities if you distribute copies of the software, or if 32 | you modify it: responsibilities to respect the freedom of others. 33 | 34 | For example, if you distribute copies of such a program, whether 35 | gratis or for a fee, you must pass on to the recipients the same 36 | freedoms that you received. You must make sure that they, too, receive 37 | or can get the source code. And you must show them these terms so they 38 | know their rights. 39 | 40 | Developers that use the GNU GPL protect your rights with two steps: 41 | (1) assert copyright on the software, and (2) offer you this License 42 | giving you legal permission to copy, distribute and/or modify it. 43 | 44 | For the developers' and authors' protection, the GPL clearly explains 45 | that there is no warranty for this free software. For both users' and 46 | authors' sake, the GPL requires that modified versions be marked as 47 | changed, so that their problems will not be attributed erroneously to 48 | authors of previous versions. 49 | 50 | Some devices are designed to deny users access to install or run 51 | modified versions of the software inside them, although the manufacturer 52 | can do so. This is fundamentally incompatible with the aim of 53 | protecting users' freedom to change the software. The systematic 54 | pattern of such abuse occurs in the area of products for individuals to 55 | use, which is precisely where it is most unacceptable. Therefore, we 56 | have designed this version of the GPL to prohibit the practice for those 57 | products. If such problems arise substantially in other domains, we 58 | stand ready to extend this provision to those domains in future versions 59 | of the GPL, as needed to protect the freedom of users. 60 | 61 | Finally, every program is threatened constantly by software patents. 62 | States should not allow patents to restrict development and use of 63 | software on general-purpose computers, but in those that do, we wish to 64 | avoid the special danger that patents applied to a free program could 65 | make it effectively proprietary. To prevent this, the GPL assures that 66 | patents cannot be used to render the program non-free. 67 | 68 | The precise terms and conditions for copying, distribution and 69 | modification follow. 70 | 71 | TERMS AND CONDITIONS 72 | 73 | 0. Definitions. 74 | 75 | "This License" refers to version 3 of the GNU General Public License. 76 | 77 | "Copyright" also means copyright-like laws that apply to other kinds of 78 | works, such as semiconductor masks. 79 | 80 | "The Program" refers to any copyrightable work licensed under this 81 | License. Each licensee is addressed as "you". "Licensees" and 82 | "recipients" may be individuals or organizations. 83 | 84 | To "modify" a work means to copy from or adapt all or part of the work 85 | in a fashion requiring copyright permission, other than the making of an 86 | exact copy. The resulting work is called a "modified version" of the 87 | earlier work or a work "based on" the earlier work. 88 | 89 | A "covered work" means either the unmodified Program or a work based 90 | on the Program. 91 | 92 | To "propagate" a work means to do anything with it that, without 93 | permission, would make you directly or secondarily liable for 94 | infringement under applicable copyright law, except executing it on a 95 | computer or modifying a private copy. Propagation includes copying, 96 | distribution (with or without modification), making available to the 97 | public, and in some countries other activities as well. 98 | 99 | To "convey" a work means any kind of propagation that enables other 100 | parties to make or receive copies. Mere interaction with a user through 101 | a computer network, with no transfer of a copy, is not conveying. 102 | 103 | An interactive user interface displays "Appropriate Legal Notices" 104 | to the extent that it includes a convenient and prominently visible 105 | feature that (1) displays an appropriate copyright notice, and (2) 106 | tells the user that there is no warranty for the work (except to the 107 | extent that warranties are provided), that licensees may convey the 108 | work under this License, and how to view a copy of this License. If 109 | the interface presents a list of user commands or options, such as a 110 | menu, a prominent item in the list meets this criterion. 111 | 112 | 1. Source Code. 113 | 114 | The "source code" for a work means the preferred form of the work 115 | for making modifications to it. "Object code" means any non-source 116 | form of a work. 117 | 118 | A "Standard Interface" means an interface that either is an official 119 | standard defined by a recognized standards body, or, in the case of 120 | interfaces specified for a particular programming language, one that 121 | is widely used among developers working in that language. 122 | 123 | The "System Libraries" of an executable work include anything, other 124 | than the work as a whole, that (a) is included in the normal form of 125 | packaging a Major Component, but which is not part of that Major 126 | Component, and (b) serves only to enable use of the work with that 127 | Major Component, or to implement a Standard Interface for which an 128 | implementation is available to the public in source code form. A 129 | "Major Component", in this context, means a major essential component 130 | (kernel, window system, and so on) of the specific operating system 131 | (if any) on which the executable work runs, or a compiler used to 132 | produce the work, or an object code interpreter used to run it. 133 | 134 | The "Corresponding Source" for a work in object code form means all 135 | the source code needed to generate, install, and (for an executable 136 | work) run the object code and to modify the work, including scripts to 137 | control those activities. However, it does not include the work's 138 | System Libraries, or general-purpose tools or generally available free 139 | programs which are used unmodified in performing those activities but 140 | which are not part of the work. For example, Corresponding Source 141 | includes interface definition files associated with source files for 142 | the work, and the source code for shared libraries and dynamically 143 | linked subprograms that the work is specifically designed to require, 144 | such as by intimate data communication or control flow between those 145 | subprograms and other parts of the work. 146 | 147 | The Corresponding Source need not include anything that users 148 | can regenerate automatically from other parts of the Corresponding 149 | Source. 150 | 151 | The Corresponding Source for a work in source code form is that 152 | same work. 153 | 154 | 2. Basic Permissions. 155 | 156 | All rights granted under this License are granted for the term of 157 | copyright on the Program, and are irrevocable provided the stated 158 | conditions are met. This License explicitly affirms your unlimited 159 | permission to run the unmodified Program. The output from running a 160 | covered work is covered by this License only if the output, given its 161 | content, constitutes a covered work. This License acknowledges your 162 | rights of fair use or other equivalent, as provided by copyright law. 163 | 164 | You may make, run and propagate covered works that you do not 165 | convey, without conditions so long as your license otherwise remains 166 | in force. You may convey covered works to others for the sole purpose 167 | of having them make modifications exclusively for you, or provide you 168 | with facilities for running those works, provided that you comply with 169 | the terms of this License in conveying all material for which you do 170 | not control copyright. Those thus making or running the covered works 171 | for you must do so exclusively on your behalf, under your direction 172 | and control, on terms that prohibit them from making any copies of 173 | your copyrighted material outside their relationship with you. 174 | 175 | Conveying under any other circumstances is permitted solely under 176 | the conditions stated below. Sublicensing is not allowed; section 10 177 | makes it unnecessary. 178 | 179 | 3. Protecting Users' Legal Rights From Anti-Circumvention Law. 180 | 181 | No covered work shall be deemed part of an effective technological 182 | measure under any applicable law fulfilling obligations under article 183 | 11 of the WIPO copyright treaty adopted on 20 December 1996, or 184 | similar laws prohibiting or restricting circumvention of such 185 | measures. 186 | 187 | When you convey a covered work, you waive any legal power to forbid 188 | circumvention of technological measures to the extent such circumvention 189 | is effected by exercising rights under this License with respect to 190 | the covered work, and you disclaim any intention to limit operation or 191 | modification of the work as a means of enforcing, against the work's 192 | users, your or third parties' legal rights to forbid circumvention of 193 | technological measures. 194 | 195 | 4. Conveying Verbatim Copies. 196 | 197 | You may convey verbatim copies of the Program's source code as you 198 | receive it, in any medium, provided that you conspicuously and 199 | appropriately publish on each copy an appropriate copyright notice; 200 | keep intact all notices stating that this License and any 201 | non-permissive terms added in accord with section 7 apply to the code; 202 | keep intact all notices of the absence of any warranty; and give all 203 | recipients a copy of this License along with the Program. 204 | 205 | You may charge any price or no price for each copy that you convey, 206 | and you may offer support or warranty protection for a fee. 207 | 208 | 5. Conveying Modified Source Versions. 209 | 210 | You may convey a work based on the Program, or the modifications to 211 | produce it from the Program, in the form of source code under the 212 | terms of section 4, provided that you also meet all of these conditions: 213 | 214 | a) The work must carry prominent notices stating that you modified 215 | it, and giving a relevant date. 216 | 217 | b) The work must carry prominent notices stating that it is 218 | released under this License and any conditions added under section 219 | 7. This requirement modifies the requirement in section 4 to 220 | "keep intact all notices". 221 | 222 | c) You must license the entire work, as a whole, under this 223 | License to anyone who comes into possession of a copy. This 224 | License will therefore apply, along with any applicable section 7 225 | additional terms, to the whole of the work, and all its parts, 226 | regardless of how they are packaged. This License gives no 227 | permission to license the work in any other way, but it does not 228 | invalidate such permission if you have separately received it. 229 | 230 | d) If the work has interactive user interfaces, each must display 231 | Appropriate Legal Notices; however, if the Program has interactive 232 | interfaces that do not display Appropriate Legal Notices, your 233 | work need not make them do so. 234 | 235 | A compilation of a covered work with other separate and independent 236 | works, which are not by their nature extensions of the covered work, 237 | and which are not combined with it such as to form a larger program, 238 | in or on a volume of a storage or distribution medium, is called an 239 | "aggregate" if the compilation and its resulting copyright are not 240 | used to limit the access or legal rights of the compilation's users 241 | beyond what the individual works permit. Inclusion of a covered work 242 | in an aggregate does not cause this License to apply to the other 243 | parts of the aggregate. 244 | 245 | 6. Conveying Non-Source Forms. 246 | 247 | You may convey a covered work in object code form under the terms 248 | of sections 4 and 5, provided that you also convey the 249 | machine-readable Corresponding Source under the terms of this License, 250 | in one of these ways: 251 | 252 | a) Convey the object code in, or embodied in, a physical product 253 | (including a physical distribution medium), accompanied by the 254 | Corresponding Source fixed on a durable physical medium 255 | customarily used for software interchange. 256 | 257 | b) Convey the object code in, or embodied in, a physical product 258 | (including a physical distribution medium), accompanied by a 259 | written offer, valid for at least three years and valid for as 260 | long as you offer spare parts or customer support for that product 261 | model, to give anyone who possesses the object code either (1) a 262 | copy of the Corresponding Source for all the software in the 263 | product that is covered by this License, on a durable physical 264 | medium customarily used for software interchange, for a price no 265 | more than your reasonable cost of physically performing this 266 | conveying of source, or (2) access to copy the 267 | Corresponding Source from a network server at no charge. 268 | 269 | c) Convey individual copies of the object code with a copy of the 270 | written offer to provide the Corresponding Source. This 271 | alternative is allowed only occasionally and noncommercially, and 272 | only if you received the object code with such an offer, in accord 273 | with subsection 6b. 274 | 275 | d) Convey the object code by offering access from a designated 276 | place (gratis or for a charge), and offer equivalent access to the 277 | Corresponding Source in the same way through the same place at no 278 | further charge. You need not require recipients to copy the 279 | Corresponding Source along with the object code. If the place to 280 | copy the object code is a network server, the Corresponding Source 281 | may be on a different server (operated by you or a third party) 282 | that supports equivalent copying facilities, provided you maintain 283 | clear directions next to the object code saying where to find the 284 | Corresponding Source. Regardless of what server hosts the 285 | Corresponding Source, you remain obligated to ensure that it is 286 | available for as long as needed to satisfy these requirements. 287 | 288 | e) Convey the object code using peer-to-peer transmission, provided 289 | you inform other peers where the object code and Corresponding 290 | Source of the work are being offered to the general public at no 291 | charge under subsection 6d. 292 | 293 | A separable portion of the object code, whose source code is excluded 294 | from the Corresponding Source as a System Library, need not be 295 | included in conveying the object code work. 296 | 297 | A "User Product" is either (1) a "consumer product", which means any 298 | tangible personal property which is normally used for personal, family, 299 | or household purposes, or (2) anything designed or sold for incorporation 300 | into a dwelling. In determining whether a product is a consumer product, 301 | doubtful cases shall be resolved in favor of coverage. For a particular 302 | product received by a particular user, "normally used" refers to a 303 | typical or common use of that class of product, regardless of the status 304 | of the particular user or of the way in which the particular user 305 | actually uses, or expects or is expected to use, the product. A product 306 | is a consumer product regardless of whether the product has substantial 307 | commercial, industrial or non-consumer uses, unless such uses represent 308 | the only significant mode of use of the product. 309 | 310 | "Installation Information" for a User Product means any methods, 311 | procedures, authorization keys, or other information required to install 312 | and execute modified versions of a covered work in that User Product from 313 | a modified version of its Corresponding Source. The information must 314 | suffice to ensure that the continued functioning of the modified object 315 | code is in no case prevented or interfered with solely because 316 | modification has been made. 317 | 318 | If you convey an object code work under this section in, or with, or 319 | specifically for use in, a User Product, and the conveying occurs as 320 | part of a transaction in which the right of possession and use of the 321 | User Product is transferred to the recipient in perpetuity or for a 322 | fixed term (regardless of how the transaction is characterized), the 323 | Corresponding Source conveyed under this section must be accompanied 324 | by the Installation Information. But this requirement does not apply 325 | if neither you nor any third party retains the ability to install 326 | modified object code on the User Product (for example, the work has 327 | been installed in ROM). 328 | 329 | The requirement to provide Installation Information does not include a 330 | requirement to continue to provide support service, warranty, or updates 331 | for a work that has been modified or installed by the recipient, or for 332 | the User Product in which it has been modified or installed. Access to a 333 | network may be denied when the modification itself materially and 334 | adversely affects the operation of the network or violates the rules and 335 | protocols for communication across the network. 336 | 337 | Corresponding Source conveyed, and Installation Information provided, 338 | in accord with this section must be in a format that is publicly 339 | documented (and with an implementation available to the public in 340 | source code form), and must require no special password or key for 341 | unpacking, reading or copying. 342 | 343 | 7. Additional Terms. 344 | 345 | "Additional permissions" are terms that supplement the terms of this 346 | License by making exceptions from one or more of its conditions. 347 | Additional permissions that are applicable to the entire Program shall 348 | be treated as though they were included in this License, to the extent 349 | that they are valid under applicable law. If additional permissions 350 | apply only to part of the Program, that part may be used separately 351 | under those permissions, but the entire Program remains governed by 352 | this License without regard to the additional permissions. 353 | 354 | When you convey a copy of a covered work, you may at your option 355 | remove any additional permissions from that copy, or from any part of 356 | it. (Additional permissions may be written to require their own 357 | removal in certain cases when you modify the work.) You may place 358 | additional permissions on material, added by you to a covered work, 359 | for which you have or can give appropriate copyright permission. 360 | 361 | Notwithstanding any other provision of this License, for material you 362 | add to a covered work, you may (if authorized by the copyright holders of 363 | that material) supplement the terms of this License with terms: 364 | 365 | a) Disclaiming warranty or limiting liability differently from the 366 | terms of sections 15 and 16 of this License; or 367 | 368 | b) Requiring preservation of specified reasonable legal notices or 369 | author attributions in that material or in the Appropriate Legal 370 | Notices displayed by works containing it; or 371 | 372 | c) Prohibiting misrepresentation of the origin of that material, or 373 | requiring that modified versions of such material be marked in 374 | reasonable ways as different from the original version; or 375 | 376 | d) Limiting the use for publicity purposes of names of licensors or 377 | authors of the material; or 378 | 379 | e) Declining to grant rights under trademark law for use of some 380 | trade names, trademarks, or service marks; or 381 | 382 | f) Requiring indemnification of licensors and authors of that 383 | material by anyone who conveys the material (or modified versions of 384 | it) with contractual assumptions of liability to the recipient, for 385 | any liability that these contractual assumptions directly impose on 386 | those licensors and authors. 387 | 388 | All other non-permissive additional terms are considered "further 389 | restrictions" within the meaning of section 10. If the Program as you 390 | received it, or any part of it, contains a notice stating that it is 391 | governed by this License along with a term that is a further 392 | restriction, you may remove that term. If a license document contains 393 | a further restriction but permits relicensing or conveying under this 394 | License, you may add to a covered work material governed by the terms 395 | of that license document, provided that the further restriction does 396 | not survive such relicensing or conveying. 397 | 398 | If you add terms to a covered work in accord with this section, you 399 | must place, in the relevant source files, a statement of the 400 | additional terms that apply to those files, or a notice indicating 401 | where to find the applicable terms. 402 | 403 | Additional terms, permissive or non-permissive, may be stated in the 404 | form of a separately written license, or stated as exceptions; 405 | the above requirements apply either way. 406 | 407 | 8. Termination. 408 | 409 | You may not propagate or modify a covered work except as expressly 410 | provided under this License. Any attempt otherwise to propagate or 411 | modify it is void, and will automatically terminate your rights under 412 | this License (including any patent licenses granted under the third 413 | paragraph of section 11). 414 | 415 | However, if you cease all violation of this License, then your 416 | license from a particular copyright holder is reinstated (a) 417 | provisionally, unless and until the copyright holder explicitly and 418 | finally terminates your license, and (b) permanently, if the copyright 419 | holder fails to notify you of the violation by some reasonable means 420 | prior to 60 days after the cessation. 421 | 422 | Moreover, your license from a particular copyright holder is 423 | reinstated permanently if the copyright holder notifies you of the 424 | violation by some reasonable means, this is the first time you have 425 | received notice of violation of this License (for any work) from that 426 | copyright holder, and you cure the violation prior to 30 days after 427 | your receipt of the notice. 428 | 429 | Termination of your rights under this section does not terminate the 430 | licenses of parties who have received copies or rights from you under 431 | this License. If your rights have been terminated and not permanently 432 | reinstated, you do not qualify to receive new licenses for the same 433 | material under section 10. 434 | 435 | 9. Acceptance Not Required for Having Copies. 436 | 437 | You are not required to accept this License in order to receive or 438 | run a copy of the Program. Ancillary propagation of a covered work 439 | occurring solely as a consequence of using peer-to-peer transmission 440 | to receive a copy likewise does not require acceptance. However, 441 | nothing other than this License grants you permission to propagate or 442 | modify any covered work. These actions infringe copyright if you do 443 | not accept this License. Therefore, by modifying or propagating a 444 | covered work, you indicate your acceptance of this License to do so. 445 | 446 | 10. Automatic Licensing of Downstream Recipients. 447 | 448 | Each time you convey a covered work, the recipient automatically 449 | receives a license from the original licensors, to run, modify and 450 | propagate that work, subject to this License. You are not responsible 451 | for enforcing compliance by third parties with this License. 452 | 453 | An "entity transaction" is a transaction transferring control of an 454 | organization, or substantially all assets of one, or subdividing an 455 | organization, or merging organizations. If propagation of a covered 456 | work results from an entity transaction, each party to that 457 | transaction who receives a copy of the work also receives whatever 458 | licenses to the work the party's predecessor in interest had or could 459 | give under the previous paragraph, plus a right to possession of the 460 | Corresponding Source of the work from the predecessor in interest, if 461 | the predecessor has it or can get it with reasonable efforts. 462 | 463 | You may not impose any further restrictions on the exercise of the 464 | rights granted or affirmed under this License. For example, you may 465 | not impose a license fee, royalty, or other charge for exercise of 466 | rights granted under this License, and you may not initiate litigation 467 | (including a cross-claim or counterclaim in a lawsuit) alleging that 468 | any patent claim is infringed by making, using, selling, offering for 469 | sale, or importing the Program or any portion of it. 470 | 471 | 11. Patents. 472 | 473 | A "contributor" is a copyright holder who authorizes use under this 474 | License of the Program or a work on which the Program is based. The 475 | work thus licensed is called the contributor's "contributor version". 476 | 477 | A contributor's "essential patent claims" are all patent claims 478 | owned or controlled by the contributor, whether already acquired or 479 | hereafter acquired, that would be infringed by some manner, permitted 480 | by this License, of making, using, or selling its contributor version, 481 | but do not include claims that would be infringed only as a 482 | consequence of further modification of the contributor version. For 483 | purposes of this definition, "control" includes the right to grant 484 | patent sublicenses in a manner consistent with the requirements of 485 | this License. 486 | 487 | Each contributor grants you a non-exclusive, worldwide, royalty-free 488 | patent license under the contributor's essential patent claims, to 489 | make, use, sell, offer for sale, import and otherwise run, modify and 490 | propagate the contents of its contributor version. 491 | 492 | In the following three paragraphs, a "patent license" is any express 493 | agreement or commitment, however denominated, not to enforce a patent 494 | (such as an express permission to practice a patent or covenant not to 495 | sue for patent infringement). To "grant" such a patent license to a 496 | party means to make such an agreement or commitment not to enforce a 497 | patent against the party. 498 | 499 | If you convey a covered work, knowingly relying on a patent license, 500 | and the Corresponding Source of the work is not available for anyone 501 | to copy, free of charge and under the terms of this License, through a 502 | publicly available network server or other readily accessible means, 503 | then you must either (1) cause the Corresponding Source to be so 504 | available, or (2) arrange to deprive yourself of the benefit of the 505 | patent license for this particular work, or (3) arrange, in a manner 506 | consistent with the requirements of this License, to extend the patent 507 | license to downstream recipients. "Knowingly relying" means you have 508 | actual knowledge that, but for the patent license, your conveying the 509 | covered work in a country, or your recipient's use of the covered work 510 | in a country, would infringe one or more identifiable patents in that 511 | country that you have reason to believe are valid. 512 | 513 | If, pursuant to or in connection with a single transaction or 514 | arrangement, you convey, or propagate by procuring conveyance of, a 515 | covered work, and grant a patent license to some of the parties 516 | receiving the covered work authorizing them to use, propagate, modify 517 | or convey a specific copy of the covered work, then the patent license 518 | you grant is automatically extended to all recipients of the covered 519 | work and works based on it. 520 | 521 | A patent license is "discriminatory" if it does not include within 522 | the scope of its coverage, prohibits the exercise of, or is 523 | conditioned on the non-exercise of one or more of the rights that are 524 | specifically granted under this License. You may not convey a covered 525 | work if you are a party to an arrangement with a third party that is 526 | in the business of distributing software, under which you make payment 527 | to the third party based on the extent of your activity of conveying 528 | the work, and under which the third party grants, to any of the 529 | parties who would receive the covered work from you, a discriminatory 530 | patent license (a) in connection with copies of the covered work 531 | conveyed by you (or copies made from those copies), or (b) primarily 532 | for and in connection with specific products or compilations that 533 | contain the covered work, unless you entered into that arrangement, 534 | or that patent license was granted, prior to 28 March 2007. 535 | 536 | Nothing in this License shall be construed as excluding or limiting 537 | any implied license or other defenses to infringement that may 538 | otherwise be available to you under applicable patent law. 539 | 540 | 12. No Surrender of Others' Freedom. 541 | 542 | If conditions are imposed on you (whether by court order, agreement or 543 | otherwise) that contradict the conditions of this License, they do not 544 | excuse you from the conditions of this License. If you cannot convey a 545 | covered work so as to satisfy simultaneously your obligations under this 546 | License and any other pertinent obligations, then as a consequence you may 547 | not convey it at all. For example, if you agree to terms that obligate you 548 | to collect a royalty for further conveying from those to whom you convey 549 | the Program, the only way you could satisfy both those terms and this 550 | License would be to refrain entirely from conveying the Program. 551 | 552 | 13. Use with the GNU Affero General Public License. 553 | 554 | Notwithstanding any other provision of this License, you have 555 | permission to link or combine any covered work with a work licensed 556 | under version 3 of the GNU Affero General Public License into a single 557 | combined work, and to convey the resulting work. The terms of this 558 | License will continue to apply to the part which is the covered work, 559 | but the special requirements of the GNU Affero General Public License, 560 | section 13, concerning interaction through a network will apply to the 561 | combination as such. 562 | 563 | 14. Revised Versions of this License. 564 | 565 | The Free Software Foundation may publish revised and/or new versions of 566 | the GNU General Public License from time to time. Such new versions will 567 | be similar in spirit to the present version, but may differ in detail to 568 | address new problems or concerns. 569 | 570 | Each version is given a distinguishing version number. If the 571 | Program specifies that a certain numbered version of the GNU General 572 | Public License "or any later version" applies to it, you have the 573 | option of following the terms and conditions either of that numbered 574 | version or of any later version published by the Free Software 575 | Foundation. If the Program does not specify a version number of the 576 | GNU General Public License, you may choose any version ever published 577 | by the Free Software Foundation. 578 | 579 | If the Program specifies that a proxy can decide which future 580 | versions of the GNU General Public License can be used, that proxy's 581 | public statement of acceptance of a version permanently authorizes you 582 | to choose that version for the Program. 583 | 584 | Later license versions may give you additional or different 585 | permissions. However, no additional obligations are imposed on any 586 | author or copyright holder as a result of your choosing to follow a 587 | later version. 588 | 589 | 15. Disclaimer of Warranty. 590 | 591 | THERE IS NO WARRANTY FOR THE PROGRAM, TO THE EXTENT PERMITTED BY 592 | APPLICABLE LAW. EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT 593 | HOLDERS AND/OR OTHER PARTIES PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY 594 | OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, 595 | THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR 596 | PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE PROGRAM 597 | IS WITH YOU. SHOULD THE PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF 598 | ALL NECESSARY SERVICING, REPAIR OR CORRECTION. 599 | 600 | 16. Limitation of Liability. 601 | 602 | IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING 603 | WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MODIFIES AND/OR CONVEYS 604 | THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, INCLUDING ANY 605 | GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING OUT OF THE 606 | USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED TO LOSS OF 607 | DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD 608 | PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER PROGRAMS), 609 | EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF 610 | SUCH DAMAGES. 611 | 612 | 17. Interpretation of Sections 15 and 16. 613 | 614 | If the disclaimer of warranty and limitation of liability provided 615 | above cannot be given local legal effect according to their terms, 616 | reviewing courts shall apply local law that most closely approximates 617 | an absolute waiver of all civil liability in connection with the 618 | Program, unless a warranty or assumption of liability accompanies a 619 | copy of the Program in return for a fee. 620 | 621 | END OF TERMS AND CONDITIONS 622 | 623 | How to Apply These Terms to Your New Programs 624 | 625 | If you develop a new program, and you want it to be of the greatest 626 | possible use to the public, the best way to achieve this is to make it 627 | free software which everyone can redistribute and change under these terms. 628 | 629 | To do so, attach the following notices to the program. It is safest 630 | to attach them to the start of each source file to most effectively 631 | state the exclusion of warranty; and each file should have at least 632 | the "copyright" line and a pointer to where the full notice is found. 633 | 634 | 635 | Copyright (C) 636 | 637 | This program is free software: you can redistribute it and/or modify 638 | it under the terms of the GNU General Public License as published by 639 | the Free Software Foundation, either version 3 of the License, or 640 | (at your option) any later version. 641 | 642 | This program is distributed in the hope that it will be useful, 643 | but WITHOUT ANY WARRANTY; without even the implied warranty of 644 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 645 | GNU General Public License for more details. 646 | 647 | You should have received a copy of the GNU General Public License 648 | along with this program. If not, see . 649 | 650 | Also add information on how to contact you by electronic and paper mail. 651 | 652 | If the program does terminal interaction, make it output a short 653 | notice like this when it starts in an interactive mode: 654 | 655 | Copyright (C) 656 | This program comes with ABSOLUTELY NO WARRANTY; for details type `show w'. 657 | This is free software, and you are welcome to redistribute it 658 | under certain conditions; type `show c' for details. 659 | 660 | The hypothetical commands `show w' and `show c' should show the appropriate 661 | parts of the General Public License. Of course, your program's commands 662 | might be different; for a GUI interface, you would use an "about box". 663 | 664 | You should also get your employer (if you work as a programmer) or school, 665 | if any, to sign a "copyright disclaimer" for the program, if necessary. 666 | For more information on this, and how to apply and follow the GNU GPL, see 667 | . 668 | 669 | The GNU General Public License does not permit incorporating your program 670 | into proprietary programs. If your program is a subroutine library, you 671 | may consider it more useful to permit linking proprietary applications with 672 | the library. If this is what you want to do, use the GNU Lesser General 673 | Public License instead of this License. But first, please read 674 | . 675 | --------------------------------------------------------------------------------