Skip to content

Commit 0d11a3e

Browse files
committed
Init
0 parents  commit 0d11a3e

11 files changed

+276
-0
lines changed

.gitignore

+3
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
2+
.vs/
3+
tama.vcxproj.user

.gitmodules

+3
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
[submodule "my-gists"]
2+
path = src/my-gists
3+
url = https://github.com/steve02081504/my-gists.git

builds/.gitignore

+3
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
2+
Release/
3+
Debug/

builds/auto_upx.bat

+5
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
cd Release
2+
upx --ultra-brute --no-align --best --compress-resources=1 shioricaller.exe
3+
copy shioricaller.exe shioricaller_NUPX.exe
4+
upx -d shioricaller_NUPX.exe
5+
cd ..

shioricaller.sln

+25
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
2+
Microsoft Visual Studio Solution File, Format Version 12.00
3+
# Visual Studio Version 17
4+
VisualStudioVersion = 17.5.33318.248
5+
MinimumVisualStudioVersion = 10.0.40219.1
6+
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "shioricaller", "shioricaller.vcxproj", "{DFD90CF5-8C30-49E6-AA45-B63FBA4601A0}"
7+
EndProject
8+
Global
9+
GlobalSection(SolutionConfigurationPlatforms) = preSolution
10+
Debug|x86 = Debug|x86
11+
Release|x86 = Release|x86
12+
EndGlobalSection
13+
GlobalSection(ProjectConfigurationPlatforms) = postSolution
14+
{DFD90CF5-8C30-49E6-AA45-B63FBA4601A0}.Debug|x86.ActiveCfg = Debug|Win32
15+
{DFD90CF5-8C30-49E6-AA45-B63FBA4601A0}.Debug|x86.Build.0 = Debug|Win32
16+
{DFD90CF5-8C30-49E6-AA45-B63FBA4601A0}.Release|x86.ActiveCfg = Release|Win32
17+
{DFD90CF5-8C30-49E6-AA45-B63FBA4601A0}.Release|x86.Build.0 = Release|Win32
18+
EndGlobalSection
19+
GlobalSection(SolutionProperties) = preSolution
20+
HideSolutionNode = FALSE
21+
EndGlobalSection
22+
GlobalSection(ExtensibilityGlobals) = postSolution
23+
SolutionGuid = {54EA44B1-6C39-47C6-B119-8D07E119C2A7}
24+
EndGlobalSection
25+
EndGlobal

shioricaller.vcxproj

+166
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,166 @@
1+
<?xml version="1.0" encoding="utf-8"?>
2+
<Project DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
3+
<ItemGroup Label="ProjectConfigurations">
4+
<ProjectConfiguration Include="Debug|Win32">
5+
<Configuration>Debug</Configuration>
6+
<Platform>Win32</Platform>
7+
</ProjectConfiguration>
8+
<ProjectConfiguration Include="Release|Win32">
9+
<Configuration>Release</Configuration>
10+
<Platform>Win32</Platform>
11+
</ProjectConfiguration>
12+
<ProjectConfiguration Include="Debug|x64">
13+
<Configuration>Debug</Configuration>
14+
<Platform>x64</Platform>
15+
</ProjectConfiguration>
16+
<ProjectConfiguration Include="Release|x64">
17+
<Configuration>Release</Configuration>
18+
<Platform>x64</Platform>
19+
</ProjectConfiguration>
20+
</ItemGroup>
21+
<ItemGroup>
22+
<ClCompile Include="src\shioricaller.cpp" />
23+
<ClCompile Include="src\_gists.cpp" />
24+
</ItemGroup>
25+
<PropertyGroup Label="Globals">
26+
<VCProjectVersion>16.0</VCProjectVersion>
27+
<Keyword>Win32Proj</Keyword>
28+
<ProjectGuid>{dfd90cf5-8c30-49e6-aa45-b63fba4601a0}</ProjectGuid>
29+
<RootNamespace>shioricaller</RootNamespace>
30+
<WindowsTargetPlatformVersion>10.0</WindowsTargetPlatformVersion>
31+
</PropertyGroup>
32+
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" />
33+
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="Configuration">
34+
<ConfigurationType>Application</ConfigurationType>
35+
<UseDebugLibraries>true</UseDebugLibraries>
36+
<PlatformToolset>v143</PlatformToolset>
37+
<CharacterSet>Unicode</CharacterSet>
38+
</PropertyGroup>
39+
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="Configuration">
40+
<ConfigurationType>Application</ConfigurationType>
41+
<UseDebugLibraries>false</UseDebugLibraries>
42+
<PlatformToolset>v143</PlatformToolset>
43+
<WholeProgramOptimization>true</WholeProgramOptimization>
44+
<CharacterSet>Unicode</CharacterSet>
45+
</PropertyGroup>
46+
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" Label="Configuration">
47+
<ConfigurationType>Application</ConfigurationType>
48+
<UseDebugLibraries>true</UseDebugLibraries>
49+
<PlatformToolset>v143</PlatformToolset>
50+
<CharacterSet>Unicode</CharacterSet>
51+
</PropertyGroup>
52+
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'" Label="Configuration">
53+
<ConfigurationType>Application</ConfigurationType>
54+
<UseDebugLibraries>false</UseDebugLibraries>
55+
<PlatformToolset>v143</PlatformToolset>
56+
<WholeProgramOptimization>true</WholeProgramOptimization>
57+
<CharacterSet>Unicode</CharacterSet>
58+
</PropertyGroup>
59+
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" />
60+
<ImportGroup Label="ExtensionSettings">
61+
</ImportGroup>
62+
<ImportGroup Label="Shared">
63+
</ImportGroup>
64+
<ImportGroup Label="PropertySheets" Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
65+
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
66+
</ImportGroup>
67+
<ImportGroup Label="PropertySheets" Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
68+
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
69+
</ImportGroup>
70+
<ImportGroup Label="PropertySheets" Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">
71+
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
72+
</ImportGroup>
73+
<ImportGroup Label="PropertySheets" Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
74+
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
75+
</ImportGroup>
76+
<PropertyGroup Label="UserMacros" />
77+
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
78+
<OutDir>.\builds\$(Configuration)\</OutDir>
79+
<IntDir>.\builds\$(Configuration)\temp\</IntDir>
80+
</PropertyGroup>
81+
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
82+
<OutDir>.\builds\$(Configuration)\</OutDir>
83+
<IntDir>.\builds\$(Configuration)\temp\</IntDir>
84+
</PropertyGroup>
85+
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
86+
<ClCompile>
87+
<WarningLevel>Level3</WarningLevel>
88+
<SDLCheck>true</SDLCheck>
89+
<PreprocessorDefinitions>WIN32;_DEBUG;_CONSOLE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
90+
<ConformanceMode>true</ConformanceMode>
91+
<LanguageStandard>stdcpplatest</LanguageStandard>
92+
<LanguageStandard_C>stdc17</LanguageStandard_C>
93+
<AdditionalOptions>/utf-8 %(AdditionalOptions)</AdditionalOptions>
94+
</ClCompile>
95+
<Link>
96+
<SubSystem>Console</SubSystem>
97+
<GenerateDebugInformation>true</GenerateDebugInformation>
98+
</Link>
99+
</ItemDefinitionGroup>
100+
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
101+
<ClCompile>
102+
<WarningLevel>Level3</WarningLevel>
103+
<FunctionLevelLinking>true</FunctionLevelLinking>
104+
<IntrinsicFunctions>true</IntrinsicFunctions>
105+
<SDLCheck>true</SDLCheck>
106+
<PreprocessorDefinitions>WIN32;NDEBUG;_CONSOLE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
107+
<ConformanceMode>true</ConformanceMode>
108+
<LanguageStandard>stdcpplatest</LanguageStandard>
109+
<LanguageStandard_C>stdc17</LanguageStandard_C>
110+
<AdditionalOptions>/utf-8 %(AdditionalOptions)</AdditionalOptions>
111+
<Optimization>MinSpace</Optimization>
112+
<InlineFunctionExpansion>AnySuitable</InlineFunctionExpansion>
113+
<FavorSizeOrSpeed>Size</FavorSizeOrSpeed>
114+
<StringPooling>true</StringPooling>
115+
</ClCompile>
116+
<Link>
117+
<SubSystem>Console</SubSystem>
118+
<EnableCOMDATFolding>true</EnableCOMDATFolding>
119+
<OptimizeReferences>true</OptimizeReferences>
120+
<GenerateDebugInformation>false</GenerateDebugInformation>
121+
<RandomizedBaseAddress>false</RandomizedBaseAddress>
122+
</Link>
123+
</ItemDefinitionGroup>
124+
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">
125+
<ClCompile>
126+
<WarningLevel>Level3</WarningLevel>
127+
<SDLCheck>true</SDLCheck>
128+
<PreprocessorDefinitions>_DEBUG;_CONSOLE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
129+
<ConformanceMode>true</ConformanceMode>
130+
<LanguageStandard>stdcpplatest</LanguageStandard>
131+
<LanguageStandard_C>stdc17</LanguageStandard_C>
132+
<AdditionalOptions>/utf-8 %(AdditionalOptions)</AdditionalOptions>
133+
</ClCompile>
134+
<Link>
135+
<SubSystem>Console</SubSystem>
136+
<GenerateDebugInformation>true</GenerateDebugInformation>
137+
</Link>
138+
</ItemDefinitionGroup>
139+
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
140+
<ClCompile>
141+
<WarningLevel>Level3</WarningLevel>
142+
<FunctionLevelLinking>true</FunctionLevelLinking>
143+
<IntrinsicFunctions>true</IntrinsicFunctions>
144+
<SDLCheck>true</SDLCheck>
145+
<PreprocessorDefinitions>NDEBUG;_CONSOLE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
146+
<ConformanceMode>true</ConformanceMode>
147+
<LanguageStandard>stdcpplatest</LanguageStandard>
148+
<LanguageStandard_C>stdc17</LanguageStandard_C>
149+
<AdditionalOptions>/utf-8 %(AdditionalOptions)</AdditionalOptions>
150+
<Optimization>MinSpace</Optimization>
151+
<InlineFunctionExpansion>AnySuitable</InlineFunctionExpansion>
152+
<FavorSizeOrSpeed>Size</FavorSizeOrSpeed>
153+
<StringPooling>true</StringPooling>
154+
</ClCompile>
155+
<Link>
156+
<SubSystem>Console</SubSystem>
157+
<EnableCOMDATFolding>true</EnableCOMDATFolding>
158+
<OptimizeReferences>true</OptimizeReferences>
159+
<GenerateDebugInformation>false</GenerateDebugInformation>
160+
<RandomizedBaseAddress>false</RandomizedBaseAddress>
161+
</Link>
162+
</ItemDefinitionGroup>
163+
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
164+
<ImportGroup Label="ExtensionTargets">
165+
</ImportGroup>
166+
</Project>

shioricaller.vcxproj.filters

+25
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
<?xml version="1.0" encoding="utf-8"?>
2+
<Project ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
3+
<ItemGroup>
4+
<Filter Include="源文件">
5+
<UniqueIdentifier>{4FC737F1-C7A5-4376-A066-2A32D752A2FF}</UniqueIdentifier>
6+
<Extensions>cpp;c;cc;cxx;c++;cppm;ixx;def;odl;idl;hpj;bat;asm;asmx</Extensions>
7+
</Filter>
8+
<Filter Include="头文件">
9+
<UniqueIdentifier>{93995380-89BD-4b04-88EB-625FBE52EBFB}</UniqueIdentifier>
10+
<Extensions>h;hh;hpp;hxx;h++;hm;inl;inc;ipp;xsd</Extensions>
11+
</Filter>
12+
<Filter Include="资源文件">
13+
<UniqueIdentifier>{67DA6AB6-F800-4c08-8B7A-83BB121AAD01}</UniqueIdentifier>
14+
<Extensions>rc;ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe;resx;tiff;tif;png;wav;mfcribbon-ms</Extensions>
15+
</Filter>
16+
</ItemGroup>
17+
<ItemGroup>
18+
<ClCompile Include="src\_gists.cpp">
19+
<Filter>源文件</Filter>
20+
</ClCompile>
21+
<ClCompile Include="src\shioricaller.cpp">
22+
<Filter>源文件</Filter>
23+
</ClCompile>
24+
</ItemGroup>
25+
</Project>

shioricaller.vcxproj.user

+4
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
<?xml version="1.0" encoding="utf-8"?>
2+
<Project ToolsVersion="Current" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
3+
<PropertyGroup />
4+
</Project>

src/_gists.cpp

+2
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
#include "my-gists/ukagaka/shiori_loader.cpp"
2+
#include "my-gists/windows/GenerateDump.cpp"

src/my-gists

Submodule my-gists added at c68d6e7

src/shioricaller.cpp

+39
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,39 @@
1+
// shioricaller.cpp : 此文件包含 "main" 函数。程序执行将在此处开始并结束。
2+
//
3+
4+
#include "my-gists/ukagaka/shiori_loader.hpp"
5+
#include "my-gists/windows/GenerateDump.hpp"
6+
#include <iostream>
7+
#include <string>
8+
9+
int wmain(int argc, wchar_t* argv[]){
10+
InstallExceptionFilter();
11+
12+
if(argc != 2) {
13+
std::cout << "Usage: shioricaller shiori.dll < request.txt > response.txt" << std::endl;
14+
return 0;
15+
}
16+
17+
Cshiori shiori;
18+
shiori.SetTo(argv[1]);
19+
if(not shiori.All_OK()) {
20+
std::cerr << "Error: something fucked up." << std::endl;
21+
return 1;
22+
}
23+
24+
std::string req;
25+
std::string req_line;
26+
while(true) {
27+
std::getline(std::cin, req_line);
28+
if(std::cin.eof())
29+
break;
30+
req += req_line + "\x0d\x0a";
31+
if(req_line.empty()) {
32+
auto res = shiori(req);
33+
std::cout << res;
34+
req.clear();
35+
}
36+
}
37+
38+
return 0;
39+
}

0 commit comments

Comments
 (0)