From 8cb79907620b778772baaf8cd37c2d375fba2dee Mon Sep 17 00:00:00 2001 From: unknow Date: Tue, 12 May 2020 22:28:07 +0800 Subject: [PATCH 1/2] Fixed path --- .gitignore | 5 +++++ 1 file changed, 5 insertions(+) create mode 100644 .gitignore diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..f14b74d --- /dev/null +++ b/.gitignore @@ -0,0 +1,5 @@ +################################################################################ +# 此 .gitignore 文件已由 Microsoft(R) Visual Studio 自动创建。 +################################################################################ + +/.vs From 97a27a0e513c9dc2c97eadebe9c75e6ebb869221 Mon Sep 17 00:00:00 2001 From: unknow Date: Tue, 12 May 2020 22:37:14 +0800 Subject: [PATCH 2/2] support GB2312 path string --- .gitignore | 4 ++++ README.md | 3 ++- SolZipper/SolZipper.cpp | 6 ++++-- SolZipper/SolZipper.vcxproj | 16 ++++++++++------ SolZipper/SolZipper.vcxproj.user | 4 ++++ SolZipper/solzipper.h | 3 ++- 6 files changed, 26 insertions(+), 10 deletions(-) create mode 100644 SolZipper/SolZipper.vcxproj.user diff --git a/.gitignore b/.gitignore index f14b74d..468483b 100644 --- a/.gitignore +++ b/.gitignore @@ -3,3 +3,7 @@ ################################################################################ /.vs +/Release +/x64 +/SolZipper/x64 +/SolZipper/Release diff --git a/README.md b/README.md index 11db3fb..9c35f91 100644 --- a/README.md +++ b/README.md @@ -42,4 +42,5 @@ More info & release build @ https://guidedhacking.com/resources/solzipper-easily * Fix exclusion false positives ## Development History -Developed version 1.0 \ No newline at end of file +Developed version 1.0 +Developed version 1.1 support GB2312 path string diff --git a/SolZipper/SolZipper.cpp b/SolZipper/SolZipper.cpp index 4bd7beb..3052b2d 100644 --- a/SolZipper/SolZipper.cpp +++ b/SolZipper/SolZipper.cpp @@ -185,8 +185,10 @@ void ZipItUp(fs::path path) std::wstring cmd = LR"(powershell.exe Compress-Archive -Force -path ')" + randfolderFull.wstring() + LR"(' -DestinationPath ')" + path.wstring() + LR"(.zip')"; //convert cmd string to work in console and exec it - std::string smbcmd = ws2s(cmd); - system(smbcmd.c_str()); + //std::string smbcmd = ws2s(cmd); + //system(smbcmd.c_str()); + std::string cmd_a = "powershell.exe Compress-Archive -Force -path '" + randfolderFull.string() + "' -DestinationPath '" + path.string() + ".zip'"; + system(cmd_a.c_str()); fs::remove_all(randfolder); //delete temp folder std::cout << "SolZip Completed\n"; diff --git a/SolZipper/SolZipper.vcxproj b/SolZipper/SolZipper.vcxproj index 425e336..4b2c7bd 100644 --- a/SolZipper/SolZipper.vcxproj +++ b/SolZipper/SolZipper.vcxproj @@ -88,9 +88,10 @@ Level3 Disabled true - WIN32;_DEBUG;_CONSOLE;%(PreprocessorDefinitions) + WIN32;_DEBUG;_CONSOLE;%(PreprocessorDefinitions);_SILENCE_EXPERIMENTAL_FILESYSTEM_DEPRECATION_WARNING true pch.h + stdcpp14 Console @@ -104,9 +105,10 @@ Level3 Disabled true - _DEBUG;_CONSOLE;%(PreprocessorDefinitions) + _DEBUG;_CONSOLE;%(PreprocessorDefinitions);_SILENCE_EXPERIMENTAL_FILESYSTEM_DEPRECATION_WARNING true pch.h + stdcpp14 Console @@ -117,13 +119,14 @@ Use Level3 - MaxSpeed + MinSpace true true true - WIN32;NDEBUG;_CONSOLE;%(PreprocessorDefinitions) + WIN32;NDEBUG;_CONSOLE;%(PreprocessorDefinitions);_SILENCE_EXPERIMENTAL_FILESYSTEM_DEPRECATION_WARNING true pch.h + stdcpp14 Console @@ -137,13 +140,14 @@ Use Level3 - MaxSpeed + MinSpace true true true - NDEBUG;_CONSOLE;%(PreprocessorDefinitions) + NDEBUG;_CONSOLE;%(PreprocessorDefinitions);_SILENCE_EXPERIMENTAL_FILESYSTEM_DEPRECATION_WARNING true pch.h + stdcpp14 Console diff --git a/SolZipper/SolZipper.vcxproj.user b/SolZipper/SolZipper.vcxproj.user new file mode 100644 index 0000000..88a5509 --- /dev/null +++ b/SolZipper/SolZipper.vcxproj.user @@ -0,0 +1,4 @@ + + + + \ No newline at end of file diff --git a/SolZipper/solzipper.h b/SolZipper/solzipper.h index 2072357..197f85a 100644 --- a/SolZipper/solzipper.h +++ b/SolZipper/solzipper.h @@ -1,6 +1,7 @@ #pragma once #include "pch.h" - +#include +#include namespace fs = std::experimental::filesystem; const std::wstring badFolders[] = { L"Release", L"Debug", L"ipch", L"x64", L"x86", L"Obj", L"Releases", L"Bin", L"Log", L"IPCH", L".git", L"bin", L"obj", L"Server" };