Skip to content

Commit de228e1

Browse files
Merge pull request #61 from Shxde1/main
x86 example, token feature, redaction
2 parents af81105 + 088d516 commit de228e1

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

80 files changed

+59170
-12
lines changed

auth.hpp renamed to x64/auth.hpp

+2-2
Original file line numberDiff line numberDiff line change
@@ -14,9 +14,9 @@ namespace KeyAuth {
1414
class api {
1515
public:
1616

17-
std::string name, ownerid, secret, version, url;
17+
std::string name, ownerid, secret, version, url, path;
1818

19-
api(std::string name, std::string ownerid, std::string secret, std::string version, std::string url) : name(name), ownerid(ownerid), secret(secret), version(version), url(url) {}
19+
api(std::string name, std::string ownerid, std::string secret, std::string version, std::string url, std::string path) : name(name), ownerid(ownerid), secret(secret), version(version), url(url), path(path) {}
2020

2121
void ban(std::string reason = "");
2222
void init();
File renamed without changes.
File renamed without changes.
File renamed without changes.
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,6 @@
1-
<?xml version="1.0" encoding="utf-8"?>
2-
<Project ToolsVersion="Current" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
3-
<PropertyGroup />
1+
<?xml version="1.0" encoding="utf-8"?>
2+
<Project ToolsVersion="Current" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
3+
<PropertyGroup>
4+
<ShowAllFiles>true</ShowAllFiles>
5+
</PropertyGroup>
46
</Project>

json.hpp renamed to x64/json.hpp

File renamed without changes.
File renamed without changes.
Binary file not shown.

main.cpp renamed to x64/main.cpp

+8-7
Original file line numberDiff line numberDiff line change
@@ -11,13 +11,14 @@ const std::string compilation_time = (std::string)skCrypt(__TIME__);
1111

1212
using namespace KeyAuth;
1313

14-
auto name = skCrypt(""); // application name. right above the blurred text aka the secret on the licenses tab among other tabs
15-
auto ownerid = skCrypt(""); // ownerid, found in account settings. click your profile picture on top right of dashboard and then account settings.
16-
auto secret = skCrypt(""); // app secret, the blurred text on licenses tab and other tabs
17-
auto version = skCrypt("1.0"); // leave alone unless you've changed version on website
18-
auto url = skCrypt("https://keyauth.win/api/1.2/"); // change if you're self-hosting
19-
20-
api KeyAuthApp(name.decrypt(), ownerid.decrypt(), secret.decrypt(), version.decrypt(), url.decrypt());
14+
std::string name = skCrypt("name").decrypt();
15+
std::string ownerid = skCrypt("ownerid").decrypt();
16+
std::string secret = skCrypt("secret").decrypt();
17+
std::string version = skCrypt("1.0").decrypt();
18+
std::string url = skCrypt("https://keyauth.win/api/1.2/").decrypt(); // change if you're self-hosting
19+
std::string path = skCrypt("path (optional)").decrypt();
20+
21+
api KeyAuthApp(name, ownerid, secret, version, url, path);
2122

2223
int main()
2324
{

skStr.h renamed to x64/skStr.h

File renamed without changes.

utils.hpp renamed to x64/utils.hpp

File renamed without changes.

x86/example.sln

+31
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,31 @@
1+
2+
Microsoft Visual Studio Solution File, Format Version 12.00
3+
# Visual Studio Version 16
4+
VisualStudioVersion = 16.0.31624.102
5+
MinimumVisualStudioVersion = 10.0.40219.1
6+
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "example", "example.vcxproj", "{3E584710-D844-49E5-9938-B4EFA4928B17}"
7+
EndProject
8+
Global
9+
GlobalSection(SolutionConfigurationPlatforms) = preSolution
10+
Debug|x64 = Debug|x64
11+
Debug|x86 = Debug|x86
12+
Release|x64 = Release|x64
13+
Release|x86 = Release|x86
14+
EndGlobalSection
15+
GlobalSection(ProjectConfigurationPlatforms) = postSolution
16+
{3E584710-D844-49E5-9938-B4EFA4928B17}.Debug|x64.ActiveCfg = Debug|x64
17+
{3E584710-D844-49E5-9938-B4EFA4928B17}.Debug|x64.Build.0 = Debug|x64
18+
{3E584710-D844-49E5-9938-B4EFA4928B17}.Debug|x86.ActiveCfg = Debug|Win32
19+
{3E584710-D844-49E5-9938-B4EFA4928B17}.Debug|x86.Build.0 = Debug|Win32
20+
{3E584710-D844-49E5-9938-B4EFA4928B17}.Release|x64.ActiveCfg = Release|x64
21+
{3E584710-D844-49E5-9938-B4EFA4928B17}.Release|x64.Build.0 = Release|x64
22+
{3E584710-D844-49E5-9938-B4EFA4928B17}.Release|x86.ActiveCfg = Release|Win32
23+
{3E584710-D844-49E5-9938-B4EFA4928B17}.Release|x86.Build.0 = Release|Win32
24+
EndGlobalSection
25+
GlobalSection(SolutionProperties) = preSolution
26+
HideSolutionNode = FALSE
27+
EndGlobalSection
28+
GlobalSection(ExtensibilityGlobals) = postSolution
29+
SolutionGuid = {9EE66AFE-8CA5-4A35-9001-B4A57E4493E3}
30+
EndGlobalSection
31+
EndGlobal

x86/example.vcxproj

+221
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,221 @@
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+
<PropertyGroup Label="Globals">
22+
<VCProjectVersion>16.0</VCProjectVersion>
23+
<Keyword>Win32Proj</Keyword>
24+
<ProjectGuid>{3e584710-d844-49e5-9938-b4efa4928b17}</ProjectGuid>
25+
<RootNamespace>example</RootNamespace>
26+
<WindowsTargetPlatformVersion>10.0</WindowsTargetPlatformVersion>
27+
</PropertyGroup>
28+
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" />
29+
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="Configuration">
30+
<ConfigurationType>Application</ConfigurationType>
31+
<UseDebugLibraries>true</UseDebugLibraries>
32+
<PlatformToolset>v142</PlatformToolset>
33+
<CharacterSet>Unicode</CharacterSet>
34+
</PropertyGroup>
35+
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="Configuration">
36+
<ConfigurationType>Application</ConfigurationType>
37+
<UseDebugLibraries>false</UseDebugLibraries>
38+
<PlatformToolset>v143</PlatformToolset>
39+
<WholeProgramOptimization>true</WholeProgramOptimization>
40+
<CharacterSet>Unicode</CharacterSet>
41+
</PropertyGroup>
42+
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" Label="Configuration">
43+
<ConfigurationType>Application</ConfigurationType>
44+
<UseDebugLibraries>true</UseDebugLibraries>
45+
<PlatformToolset>v143</PlatformToolset>
46+
<CharacterSet>Unicode</CharacterSet>
47+
</PropertyGroup>
48+
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'" Label="Configuration">
49+
<ConfigurationType>Application</ConfigurationType>
50+
<UseDebugLibraries>false</UseDebugLibraries>
51+
<PlatformToolset>v143</PlatformToolset>
52+
<WholeProgramOptimization>true</WholeProgramOptimization>
53+
<CharacterSet>MultiByte</CharacterSet>
54+
</PropertyGroup>
55+
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" />
56+
<ImportGroup Label="ExtensionSettings">
57+
</ImportGroup>
58+
<ImportGroup Label="Shared">
59+
</ImportGroup>
60+
<ImportGroup Label="PropertySheets" Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
61+
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
62+
</ImportGroup>
63+
<ImportGroup Label="PropertySheets" Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
64+
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
65+
</ImportGroup>
66+
<ImportGroup Label="PropertySheets" Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">
67+
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
68+
</ImportGroup>
69+
<ImportGroup Label="PropertySheets" Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
70+
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
71+
</ImportGroup>
72+
<PropertyGroup Label="UserMacros" />
73+
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
74+
<LinkIncremental>true</LinkIncremental>
75+
</PropertyGroup>
76+
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
77+
<LinkIncremental>false</LinkIncremental>
78+
<IncludePath>./lib/nlohmann;./lib/curl;./lib;.\;$(IncludePath)</IncludePath>
79+
<LibraryPath>./lib/curl;.\;$(LibraryPath)</LibraryPath>
80+
</PropertyGroup>
81+
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">
82+
<LinkIncremental>true</LinkIncremental>
83+
</PropertyGroup>
84+
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
85+
<LinkIncremental>false</LinkIncremental>
86+
<IncludePath>./lib;./lib/nlohmann;./lib/curl;.\;$(IncludePath)</IncludePath>
87+
<LibraryPath>.\;$(LibraryPath)</LibraryPath>
88+
</PropertyGroup>
89+
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
90+
<ClCompile>
91+
<WarningLevel>Level3</WarningLevel>
92+
<SDLCheck>true</SDLCheck>
93+
<PreprocessorDefinitions>WIN32;_DEBUG;_CONSOLE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
94+
<ConformanceMode>true</ConformanceMode>
95+
</ClCompile>
96+
<Link>
97+
<SubSystem>Console</SubSystem>
98+
<GenerateDebugInformation>true</GenerateDebugInformation>
99+
</Link>
100+
</ItemDefinitionGroup>
101+
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
102+
<ClCompile>
103+
<WarningLevel>Level3</WarningLevel>
104+
<FunctionLevelLinking>true</FunctionLevelLinking>
105+
<IntrinsicFunctions>true</IntrinsicFunctions>
106+
<SDLCheck>true</SDLCheck>
107+
<PreprocessorDefinitions>CURL_STATICLIB;WIN32;NDEBUG;_CONSOLE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
108+
<ConformanceMode>true</ConformanceMode>
109+
<LanguageStandard>stdcpp17</LanguageStandard>
110+
</ClCompile>
111+
<Link>
112+
<SubSystem>Console</SubSystem>
113+
<EnableCOMDATFolding>true</EnableCOMDATFolding>
114+
<OptimizeReferences>true</OptimizeReferences>
115+
<GenerateDebugInformation>true</GenerateDebugInformation>
116+
<AdditionalDependencies>libcurl.lib;%(AdditionalDependencies)</AdditionalDependencies>
117+
</Link>
118+
</ItemDefinitionGroup>
119+
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">
120+
<ClCompile>
121+
<WarningLevel>Level3</WarningLevel>
122+
<SDLCheck>true</SDLCheck>
123+
<PreprocessorDefinitions>_DEBUG;_CONSOLE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
124+
<ConformanceMode>true</ConformanceMode>
125+
<LanguageStandard>stdcpp20</LanguageStandard>
126+
</ClCompile>
127+
<Link>
128+
<SubSystem>Console</SubSystem>
129+
<GenerateDebugInformation>true</GenerateDebugInformation>
130+
</Link>
131+
</ItemDefinitionGroup>
132+
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
133+
<ClCompile>
134+
<WarningLevel>Level3</WarningLevel>
135+
<FunctionLevelLinking>true</FunctionLevelLinking>
136+
<IntrinsicFunctions>true</IntrinsicFunctions>
137+
<SDLCheck>true</SDLCheck>
138+
<PreprocessorDefinitions>_CRT_SECURE_NO_WARNINGS;NDEBUG;_CONSOLE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
139+
<ConformanceMode>true</ConformanceMode>
140+
<LanguageStandard>stdcpp17</LanguageStandard>
141+
<RuntimeLibrary>MultiThreadedDLL</RuntimeLibrary>
142+
</ClCompile>
143+
<Link>
144+
<SubSystem>Console</SubSystem>
145+
<EnableCOMDATFolding>true</EnableCOMDATFolding>
146+
<OptimizeReferences>true</OptimizeReferences>
147+
<GenerateDebugInformation>false</GenerateDebugInformation>
148+
<AdditionalDependencies>%(AdditionalDependencies)</AdditionalDependencies>
149+
<TargetMachine>MachineX64</TargetMachine>
150+
</Link>
151+
</ItemDefinitionGroup>
152+
<ItemGroup>
153+
<ClCompile Include="lib\auth.cpp" />
154+
<ClCompile Include="lib\hmac_sha256.c" />
155+
<ClCompile Include="lib\sha256.c" />
156+
<ClCompile Include="lib\utils.cpp" />
157+
<ClCompile Include="main.cpp" />
158+
</ItemGroup>
159+
<ItemGroup>
160+
<ClInclude Include="lib\auth.hpp" />
161+
<ClInclude Include="lib\curl\curl.h" />
162+
<ClInclude Include="lib\curl\curlver.h" />
163+
<ClInclude Include="lib\curl\easy.h" />
164+
<ClInclude Include="lib\curl\mprintf.h" />
165+
<ClInclude Include="lib\curl\multi.h" />
166+
<ClInclude Include="lib\curl\stdcheaders.h" />
167+
<ClInclude Include="lib\curl\system.h" />
168+
<ClInclude Include="lib\curl\typecheck-gcc.h" />
169+
<ClInclude Include="lib\curl\urlapi.h" />
170+
<ClInclude Include="lib\hmac_sha256.h" />
171+
<ClInclude Include="lib\includes.hpp" />
172+
<ClInclude Include="lib\nlohmann\adl_serializer.hpp" />
173+
<ClInclude Include="lib\nlohmann\byte_container_with_subtype.hpp" />
174+
<ClInclude Include="lib\nlohmann\detail\conversions\from_json.hpp" />
175+
<ClInclude Include="lib\nlohmann\detail\conversions\to_chars.hpp" />
176+
<ClInclude Include="lib\nlohmann\detail\conversions\to_json.hpp" />
177+
<ClInclude Include="lib\nlohmann\detail\exceptions.hpp" />
178+
<ClInclude Include="lib\nlohmann\detail\hash.hpp" />
179+
<ClInclude Include="lib\nlohmann\detail\input\binary_reader.hpp" />
180+
<ClInclude Include="lib\nlohmann\detail\input\input_adapters.hpp" />
181+
<ClInclude Include="lib\nlohmann\detail\input\json_sax.hpp" />
182+
<ClInclude Include="lib\nlohmann\detail\input\lexer.hpp" />
183+
<ClInclude Include="lib\nlohmann\detail\input\parser.hpp" />
184+
<ClInclude Include="lib\nlohmann\detail\input\position_t.hpp" />
185+
<ClInclude Include="lib\nlohmann\detail\iterators\internal_iterator.hpp" />
186+
<ClInclude Include="lib\nlohmann\detail\iterators\iteration_proxy.hpp" />
187+
<ClInclude Include="lib\nlohmann\detail\iterators\iterator_traits.hpp" />
188+
<ClInclude Include="lib\nlohmann\detail\iterators\iter_impl.hpp" />
189+
<ClInclude Include="lib\nlohmann\detail\iterators\json_reverse_iterator.hpp" />
190+
<ClInclude Include="lib\nlohmann\detail\iterators\primitive_iterator.hpp" />
191+
<ClInclude Include="lib\nlohmann\detail\json_pointer.hpp" />
192+
<ClInclude Include="lib\nlohmann\detail\json_ref.hpp" />
193+
<ClInclude Include="lib\nlohmann\detail\macro_scope.hpp" />
194+
<ClInclude Include="lib\nlohmann\detail\macro_unscope.hpp" />
195+
<ClInclude Include="lib\nlohmann\detail\meta\cpp_future.hpp" />
196+
<ClInclude Include="lib\nlohmann\detail\meta\detected.hpp" />
197+
<ClInclude Include="lib\nlohmann\detail\meta\is_sax.hpp" />
198+
<ClInclude Include="lib\nlohmann\detail\meta\type_traits.hpp" />
199+
<ClInclude Include="lib\nlohmann\detail\meta\void_t.hpp" />
200+
<ClInclude Include="lib\nlohmann\detail\output\binary_writer.hpp" />
201+
<ClInclude Include="lib\nlohmann\detail\output\output_adapters.hpp" />
202+
<ClInclude Include="lib\nlohmann\detail\output\serializer.hpp" />
203+
<ClInclude Include="lib\nlohmann\detail\value_t.hpp" />
204+
<ClInclude Include="lib\nlohmann\json.hpp" />
205+
<ClInclude Include="lib\nlohmann\json_fwd.hpp" />
206+
<ClInclude Include="lib\nlohmann\ordered_map.hpp" />
207+
<ClInclude Include="lib\nlohmann\thirdparty\hedley\hedley.hpp" />
208+
<ClInclude Include="lib\nlohmann\thirdparty\hedley\hedley_undef.hpp" />
209+
<ClInclude Include="lib\Security.hpp" />
210+
<ClInclude Include="lib\sha256.h" />
211+
<ClInclude Include="lib\utils.hpp" />
212+
<ClInclude Include="lib\xorstr.hpp" />
213+
<ClInclude Include="skStr.h" />
214+
</ItemGroup>
215+
<ItemGroup>
216+
<Library Include="lib\curl\libcurl.lib" />
217+
</ItemGroup>
218+
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
219+
<ImportGroup Label="ExtensionTargets">
220+
</ImportGroup>
221+
</Project>

0 commit comments

Comments
 (0)