Compare commits
No commits in common. "main" and "v0.1" have entirely different histories.
3
.idea/.gitignore
vendored
3
.idea/.gitignore
vendored
@ -6,6 +6,3 @@
|
|||||||
# Datasource local storage ignored files
|
# Datasource local storage ignored files
|
||||||
/dataSources/
|
/dataSources/
|
||||||
/dataSources.local.xml
|
/dataSources.local.xml
|
||||||
|
|
||||||
/editor.xml
|
|
||||||
/misc.xml
|
|
||||||
|
341
.idea/editor.xml
Normal file
341
.idea/editor.xml
Normal file
@ -0,0 +1,341 @@
|
|||||||
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
|
<project version="4">
|
||||||
|
<component name="BackendCodeEditorSettings">
|
||||||
|
<option name="/Default/CodeStyle/CodeFormatting/CppClangFormat/EnableClangFormatSupport/@EntryValue" value="true" type="bool" />
|
||||||
|
<option name="/Default/CodeStyle/EditorConfig/EnableClangFormatSupport/@EntryValue" value="false" type="bool" />
|
||||||
|
<option name="/Default/CodeStyle/CodeFormatting/CppFormatting/ALIGN_MULTILINE_BINARY_EXPRESSIONS_CHAIN/@EntryValue" value="true" type="bool" />
|
||||||
|
<option name="/Default/CodeStyle/CodeFormatting/CppFormatting/ALIGN_MULTILINE_CALLS_CHAIN/@EntryValue" value="false" type="bool" />
|
||||||
|
<option name="/Default/CodeStyle/CodeFormatting/CppFormatting/ALIGN_MULTILINE_EXPRESSION/@EntryValue" value="false" type="bool" />
|
||||||
|
<option name="/Default/CodeStyle/CodeFormatting/CppFormatting/ALIGN_MULTILINE_FOR_STMT/@EntryValue" value="true" type="bool" />
|
||||||
|
<option name="/Default/CodeStyle/CodeFormatting/CppFormatting/ALIGN_MULTIPLE_DECLARATION/@EntryValue" value="false" type="bool" />
|
||||||
|
<option name="/Default/CodeStyle/CodeFormatting/CppFormatting/ALIGN_TERNARY/@EntryValue" value="ALIGN_ALL" type="string" />
|
||||||
|
<option name="/Default/CodeStyle/CodeFormatting/CppFormatting/BLANK_LINES_AROUND_CLASS_DEFINITION/@EntryValue" value="1" type="int" />
|
||||||
|
<option name="/Default/CodeStyle/CodeFormatting/CppFormatting/KEEP_BLANK_LINES_IN_DECLARATIONS/@EntryValue" value="2" type="int" />
|
||||||
|
<option name="/Default/CodeStyle/CodeFormatting/CppFormatting/KEEP_BLANK_LINES_IN_CODE/@EntryValue" value="2" type="int" />
|
||||||
|
<option name="/Default/CodeStyle/CodeFormatting/CppFormatting/KEEP_USER_LINEBREAKS/@EntryValue" value="true" type="bool" />
|
||||||
|
<option name="/Default/CodeStyle/CodeFormatting/CppFormatting/INDENT_CASE_FROM_SWITCH/@EntryValue" value="true" type="bool" />
|
||||||
|
<option name="/Default/CodeStyle/CodeFormatting/CppFormatting/INDENT_COMMENT/@EntryValue" value="true" type="bool" />
|
||||||
|
<option name="/Default/CodeStyle/CodeFormatting/CppFormatting/INT_ALIGN_EQ/@EntryValue" value="false" type="bool" />
|
||||||
|
<option name="/Default/CodeStyle/CodeFormatting/CppFormatting/SIMPLE_BLOCK_STYLE/@EntryValue" value="DO_NOT_CHANGE" type="string" />
|
||||||
|
<option name="/Default/CodeStyle/CodeFormatting/CppFormatting/SPACE_AFTER_COMMA_IN_TEMPLATE_ARGS/@EntryValue" value="true" type="bool" />
|
||||||
|
<option name="/Default/CodeStyle/CodeFormatting/CppFormatting/SPACE_AFTER_COMMA_IN_TEMPLATE_PARAMS/@EntryValue" value="true" type="bool" />
|
||||||
|
<option name="/Default/CodeStyle/CodeFormatting/CppFormatting/SPACE_AFTER_FOR_SEMICOLON/@EntryValue" value="true" type="bool" />
|
||||||
|
<option name="/Default/CodeStyle/CodeFormatting/CppFormatting/SPACE_BEFORE_FOR_SEMICOLON/@EntryValue" value="false" type="bool" />
|
||||||
|
<option name="/Default/CodeStyle/CodeFormatting/CppFormatting/SPACE_AFTER_UNARY_OPERATOR/@EntryValue" value="false" type="bool" />
|
||||||
|
<option name="/Default/CodeStyle/CodeFormatting/CppFormatting/SPACE_WITHIN_ARRAY_ACCESS_BRACKETS/@EntryValue" value="false" type="bool" />
|
||||||
|
<option name="/Default/CodeStyle/CodeFormatting/CppFormatting/SPACE_WITHIN_CAST_EXPRESSION_PARENTHESES/@EntryValue" value="false" type="bool" />
|
||||||
|
<option name="/Default/CodeStyle/CodeFormatting/CppFormatting/SPACE_WITHIN_EMPTY_INITIALIZER_BRACES/@EntryValue" value="false" type="bool" />
|
||||||
|
<option name="/Default/CodeStyle/CodeFormatting/CppFormatting/SPACE_WITHIN_EMPTY_METHOD_PARENTHESES/@EntryValue" value="false" type="bool" />
|
||||||
|
<option name="/Default/CodeStyle/CodeFormatting/CppFormatting/SPACE_WITHIN_INITIALIZER_BRACES/@EntryValue" value="false" type="bool" />
|
||||||
|
<option name="/Default/CodeStyle/CodeFormatting/CppFormatting/SPECIAL_ELSE_IF_TREATMENT/@EntryValue" value="true" type="bool" />
|
||||||
|
<option name="/Default/CodeStyle/CodeFormatting/CppFormatting/SPACE_AFTER_CAST_EXPRESSION_PARENTHESES/@EntryValue" value="true" type="bool" />
|
||||||
|
<option name="/Default/CodeStyle/CodeFormatting/CppFormatting/WRAP_AFTER_BINARY_OPSIGN/@EntryValue" value="true" type="bool" />
|
||||||
|
<option name="/Default/CodeStyle/CodeFormatting/CppFormatting/WRAP_BEFORE_TERNARY_OPSIGNS/@EntryValue" value="true" type="bool" />
|
||||||
|
<option name="/Default/CodeStyle/CodeFormatting/CppFormatting/TYPE_DECLARATION_BRACES/@EntryValue" value="END_OF_LINE" type="string" />
|
||||||
|
<option name="/Default/CodeStyle/CodeFormatting/CppFormatting/OTHER_BRACES/@EntryValue" value="END_OF_LINE" type="string" />
|
||||||
|
<option name="/Default/CodeStyle/CodeFormatting/CppFormatting/CASE_BLOCK_BRACES/@EntryValue" value="END_OF_LINE" type="string" />
|
||||||
|
<option name="/Default/CodeStyle/CodeFormatting/CppFormatting/BLANK_LINES_AROUND_FUNCTION_DECLARATION/@EntryValue" value="1" type="int" />
|
||||||
|
<option name="/Default/CodeStyle/CodeFormatting/CppFormatting/BLANK_LINES_AROUND_FUNCTION_DEFINITION/@EntryValue" value="1" type="int" />
|
||||||
|
<option name="/Default/CodeStyle/CodeFormatting/CppFormatting/PLACE_WHILE_ON_NEW_LINE/@EntryValue" value="false" type="bool" />
|
||||||
|
<option name="/Default/CodeStyle/CodeFormatting/CppFormatting/PLACE_ELSE_ON_NEW_LINE/@EntryValue" value="false" type="bool" />
|
||||||
|
<option name="/Default/CodeStyle/CodeFormatting/CppFormatting/PLACE_CATCH_ON_NEW_LINE/@EntryValue" value="false" type="bool" />
|
||||||
|
<option name="/Default/CodeStyle/CodeFormatting/CppFormatting/NAMESPACE_INDENTATION/@EntryValue" value="All" type="string" />
|
||||||
|
<option name="/Default/CodeStyle/CodeFormatting/CppFormatting/ALIGN_MULTILINE_ARGUMENT/@EntryValue" value="true" type="bool" />
|
||||||
|
<option name="/Default/CodeStyle/CodeFormatting/CppFormatting/ALIGN_MULTILINE_EXTENDS_LIST/@EntryValue" value="true" type="bool" />
|
||||||
|
<option name="/Default/CodeStyle/CodeFormatting/CppFormatting/ALIGN_MULTILINE_PARAMETER/@EntryValue" value="true" type="bool" />
|
||||||
|
<option name="/Default/CodeStyle/CodeFormatting/CppFormatting/ALIGN_MULTILINE_TYPE_ARGUMENT/@EntryValue" value="false" type="bool" />
|
||||||
|
<option name="/Default/CodeStyle/CodeFormatting/CppFormatting/ALIGN_MULTILINE_TYPE_PARAMETER/@EntryValue" value="false" type="bool" />
|
||||||
|
<option name="/Default/CodeStyle/CodeFormatting/CppFormatting/BLANK_LINES_AROUND_DECLARATIONS/@EntryValue" value="0" type="int" />
|
||||||
|
<option name="/Default/CodeStyle/CodeFormatting/CppFormatting/INDENT_ACCESS_SPECIFIERS_FROM_CLASS/@EntryValue" value="false" type="bool" />
|
||||||
|
<option name="/Default/CodeStyle/CodeFormatting/CppFormatting/INDENT_CLASS_MEMBERS_FROM_ACCESS_SPECIFIERS/@EntryValue" value="true" type="bool" />
|
||||||
|
<option name="/Default/CodeStyle/CodeFormatting/CppFormatting/LINE_BREAK_AFTER_COLON_IN_MEMBER_INITIALIZER_LISTS/@EntryValue" value="ON_SINGLE_LINE" type="string" />
|
||||||
|
<option name="/Default/CodeStyle/CodeFormatting/CppFormatting/MEMBER_INITIALIZER_LIST_STYLE/@EntryValue" value="DO_NOT_CHANGE" type="string" />
|
||||||
|
<option name="/Default/CodeStyle/CodeFormatting/CppFormatting/PLACE_NAMESPACE_DEFINITIONS_ON_SAME_LINE/@EntryValue" value="false" type="bool" />
|
||||||
|
<option name="/Default/CodeStyle/CodeFormatting/CppFormatting/SPACE_AFTER_COLON_IN_BITFIELD_DECLARATOR/@EntryValue" value="true" type="bool" />
|
||||||
|
<option name="/Default/CodeStyle/CodeFormatting/CppFormatting/SPACE_BEFORE_COLON_IN_BITFIELD_DECLARATOR/@EntryValue" value="false" type="bool" />
|
||||||
|
<option name="/Default/CodeStyle/CodeFormatting/CppFormatting/SPACE_AFTER_EXTENDS_COLON/@EntryValue" value="true" type="bool" />
|
||||||
|
<option name="/Default/CodeStyle/CodeFormatting/CppFormatting/SPACE_BEFORE_EXTENDS_COLON/@EntryValue" value="true" type="bool" />
|
||||||
|
<option name="/Default/CodeStyle/CodeFormatting/CppFormatting/SPACE_AFTER_FOR_COLON/@EntryValue" value="true" type="bool" />
|
||||||
|
<option name="/Default/CodeStyle/CodeFormatting/CppFormatting/SPACE_BEFORE_FOR_COLON/@EntryValue" value="false" type="bool" />
|
||||||
|
<option name="/Default/CodeStyle/CodeFormatting/CppFormatting/SPACE_AFTER_PTR_IN_DATA_MEMBER/@EntryValue" value="false" type="bool" />
|
||||||
|
<option name="/Default/CodeStyle/CodeFormatting/CppFormatting/SPACE_AFTER_PTR_IN_DATA_MEMBERS/@EntryValue" value="false" type="bool" />
|
||||||
|
<option name="/Default/CodeStyle/CodeFormatting/CppFormatting/SPACE_AFTER_PTR_IN_METHOD/@EntryValue" value="false" type="bool" />
|
||||||
|
<option name="/Default/CodeStyle/CodeFormatting/CppFormatting/SPACE_AFTER_PTR_IN_NESTED_DECLARATOR/@EntryValue" value="false" type="bool" />
|
||||||
|
<option name="/Default/CodeStyle/CodeFormatting/CppFormatting/SPACE_AFTER_REF_IN_DATA_MEMBER/@EntryValue" value="false" type="bool" />
|
||||||
|
<option name="/Default/CodeStyle/CodeFormatting/CppFormatting/SPACE_AFTER_REF_IN_DATA_MEMBERS/@EntryValue" value="false" type="bool" />
|
||||||
|
<option name="/Default/CodeStyle/CodeFormatting/CppFormatting/SPACE_AFTER_REF_IN_METHOD/@EntryValue" value="false" type="bool" />
|
||||||
|
<option name="/Default/CodeStyle/CodeFormatting/CppFormatting/SPACE_BEFORE_PTR_IN_ABSTRACT_DECL/@EntryValue" value="true" type="bool" />
|
||||||
|
<option name="/Default/CodeStyle/CodeFormatting/CppFormatting/SPACE_BEFORE_PTR_IN_DATA_MEMBER/@EntryValue" value="true" type="bool" />
|
||||||
|
<option name="/Default/CodeStyle/CodeFormatting/CppFormatting/SPACE_BEFORE_PTR_IN_DATA_MEMBERS/@EntryValue" value="true" type="bool" />
|
||||||
|
<option name="/Default/CodeStyle/CodeFormatting/CppFormatting/SPACE_BEFORE_PTR_IN_METHOD/@EntryValue" value="true" type="bool" />
|
||||||
|
<option name="/Default/CodeStyle/CodeFormatting/CppFormatting/SPACE_BEFORE_REF_IN_ABSTRACT_DECL/@EntryValue" value="true" type="bool" />
|
||||||
|
<option name="/Default/CodeStyle/CodeFormatting/CppFormatting/SPACE_BEFORE_REF_IN_DATA_MEMBER/@EntryValue" value="true" type="bool" />
|
||||||
|
<option name="/Default/CodeStyle/CodeFormatting/CppFormatting/SPACE_BEFORE_REF_IN_DATA_MEMBERS/@EntryValue" value="true" type="bool" />
|
||||||
|
<option name="/Default/CodeStyle/CodeFormatting/CppFormatting/SPACE_BEFORE_REF_IN_METHOD/@EntryValue" value="true" type="bool" />
|
||||||
|
<option name="/Default/CodeStyle/CodeFormatting/CppFormatting/SPACE_BEFORE_TEMPLATE_ARGS/@EntryValue" value="false" type="bool" />
|
||||||
|
<option name="/Default/CodeStyle/CodeFormatting/CppFormatting/SPACE_BEFORE_TEMPLATE_PARAMS/@EntryValue" value="false" type="bool" />
|
||||||
|
<option name="/Default/CodeStyle/CodeFormatting/CppFormatting/SPACE_BETWEEN_CLOSING_ANGLE_BRACKETS_IN_TEMPLATE_ARGS/@EntryValue" value="true" type="bool" />
|
||||||
|
<option name="/Default/CodeStyle/CodeFormatting/CppFormatting/SPACE_WITHIN_EMPTY_TEMPLATE_PARAMS/@EntryValue" value="false" type="bool" />
|
||||||
|
<option name="/Default/CodeStyle/CodeFormatting/CppFormatting/SPACE_WITHIN_TEMPLATE_ARGS/@EntryValue" value="false" type="bool" />
|
||||||
|
<option name="/Default/CodeStyle/CodeFormatting/CppFormatting/SPACE_WITHIN_TEMPLATE_PARAMS/@EntryValue" value="false" type="bool" />
|
||||||
|
<option name="/Default/CodeStyle/CodeFormatting/CppFormatting/SPACE_WITHIN_DECLARATION_PARENTHESES/@EntryValue" value="false" type="bool" />
|
||||||
|
<option name="/Default/CodeStyle/CodeFormatting/CppFormatting/SPACE_WITHIN_EMPTY_BLOCKS/@EntryValue" value="false" type="bool" />
|
||||||
|
<option name="/Default/CodeStyle/CodeFormatting/CppFormatting/WRAP_BEFORE_INVOCATION_LPAR/@EntryValue" value="false" type="bool" />
|
||||||
|
<option name="/Default/CodeStyle/CodeFormatting/CppFormatting/WRAP_AFTER_INVOCATION_LPAR/@EntryValue" value="false" type="bool" />
|
||||||
|
<option name="/Default/CodeStyle/CodeFormatting/CppFormatting/WRAP_BEFORE_INVOCATION_RPAR/@EntryValue" value="false" type="bool" />
|
||||||
|
<option name="/Default/CodeStyle/CodeFormatting/CppFormatting/WRAP_BEFORE_DECLARATION_LPAR/@EntryValue" value="false" type="bool" />
|
||||||
|
<option name="/Default/CodeStyle/CodeFormatting/CppFormatting/WRAP_AFTER_DECLARATION_LPAR/@EntryValue" value="false" type="bool" />
|
||||||
|
<option name="/Default/CodeStyle/CodeFormatting/CppFormatting/WRAP_BEFORE_DECLARATION_RPAR/@EntryValue" value="false" type="bool" />
|
||||||
|
<option name="/Default/CodeStyle/CodeFormatting/CppFormatting/WRAP_ARGUMENTS_STYLE/@EntryValue" value="WRAP_IF_LONG" type="string" />
|
||||||
|
<option name="/Default/CodeStyle/CodeFormatting/CppFormatting/WRAP_PARAMETERS_STYLE/@EntryValue" value="WRAP_IF_LONG" type="string" />
|
||||||
|
<option name="/Default/CodeStyle/CodeFormatting/CppFormatting/BREAK_TEMPLATE_DECLARATION/@EntryValue" value="LINE_BREAK" type="string" />
|
||||||
|
<option name="/Default/CodeStyle/CodeFormatting/CppFormatting/NAMESPACE_DECLARATION_BRACES/@EntryValue" value="END_OF_LINE" type="string" />
|
||||||
|
<option name="/Default/CodeStyle/CodeFormatting/CppFormatting/FREE_BLOCK_BRACES/@EntryValue" value="END_OF_LINE" type="string" />
|
||||||
|
<option name="/Default/CodeStyle/CodeFormatting/CppFormatting/INVOCABLE_DECLARATION_BRACES/@EntryValue" value="END_OF_LINE" type="string" />
|
||||||
|
<option name="/Default/CodeStyle/CodeFormatting/CppFormatting/ANONYMOUS_METHOD_DECLARATION_BRACES/@EntryValue" value="END_OF_LINE" type="string" />
|
||||||
|
<option name="/Default/CodeStyle/CodeFormatting/CppFormatting/INITIALIZER_BRACES/@EntryValue" value="END_OF_LINE_NO_SPACE" type="string" />
|
||||||
|
<option name="/Default/CodeStyle/CodeFormatting/CppFormatting/INDENT_STYLE/@EntryValue" value="Space" type="string" />
|
||||||
|
<option name="/Default/CodeStyle/CodeFormatting/CppFormatting/INDENT_SIZE/@EntryValue" value="4" type="int" />
|
||||||
|
<option name="/Default/CodeStyle/CodeFormatting/CppFormatting/CONTINUOUS_LINE_INDENT/@EntryValue" value="Double" type="string" />
|
||||||
|
<option name="/Default/CodeStyle/CodeFormatting/CppFormatting/TAB_WIDTH/@EntryValue" value="4" type="int" />
|
||||||
|
<option name="/Default/CodeInspection/Highlighting/InspectionSeverities/=CppSmartPointerVsMakeFunction/@EntryIndexedValue" value="SUGGESTION" type="string" />
|
||||||
|
<option name="/Default/CodeInspection/Highlighting/InspectionSeverities/=CppCStyleCast/@EntryIndexedValue" value="SUGGESTION" type="string" />
|
||||||
|
<option name="/Default/CodeInspection/Highlighting/InspectionSeverities/=CppFunctionalStyleCast/@EntryIndexedValue" value="SUGGESTION" type="string" />
|
||||||
|
<option name="/Default/CodeInspection/Highlighting/InspectionSeverities/=CppReinterpretCastFromVoidPtr/@EntryIndexedValue" value="SUGGESTION" type="string" />
|
||||||
|
<option name="/Default/CodeInspection/Highlighting/InspectionSeverities/=CppNonExplicitConvertingConstructor/@EntryIndexedValue" value="HINT" type="string" />
|
||||||
|
<option name="/Default/CodeInspection/Highlighting/InspectionSeverities/=CppNonExplicitConversionOperator/@EntryIndexedValue" value="HINT" type="string" />
|
||||||
|
<option name="/Default/CodeInspection/Highlighting/InspectionSeverities/=CppDiscardedPostfixOperatorResult/@EntryIndexedValue" value="SUGGESTION" type="string" />
|
||||||
|
<option name="/Default/CodeInspection/Highlighting/InspectionSeverities/=CppConstValueFunctionReturnType/@EntryIndexedValue" value="SUGGESTION" type="string" />
|
||||||
|
<option name="/Default/CodeInspection/Highlighting/InspectionSeverities/=CppMemberFunctionMayBeConst/@EntryIndexedValue" value="SUGGESTION" type="string" />
|
||||||
|
<option name="/Default/CodeInspection/Highlighting/InspectionSeverities/=CppMemberFunctionMayBeStatic/@EntryIndexedValue" value="SUGGESTION" type="string" />
|
||||||
|
<option name="/Default/CodeInspection/Highlighting/InspectionSeverities/=CppLocalVariableMayBeConst/@EntryIndexedValue" value="HINT" type="string" />
|
||||||
|
<option name="/Default/CodeInspection/Highlighting/InspectionSeverities/=CppParameterMayBeConst/@EntryIndexedValue" value="HINT" type="string" />
|
||||||
|
<option name="/Default/CodeInspection/Highlighting/InspectionSeverities/=CppVariableCanBeMadeConstexpr/@EntryIndexedValue" value="SUGGESTION" type="string" />
|
||||||
|
<option name="/Default/CodeInspection/Highlighting/InspectionSeverities/=CppParameterMayBeConstPtrOrRef/@EntryIndexedValue" value="SUGGESTION" type="string" />
|
||||||
|
<option name="/Default/CodeInspection/Highlighting/InspectionSeverities/=CppPassValueParameterByConstReference/@EntryIndexedValue" value="SUGGESTION" type="string" />
|
||||||
|
<option name="/Default/CodeInspection/Highlighting/InspectionSeverities/=CppThrowExpressionCanBeReplacedWithRethrow/@EntryIndexedValue" value="WARNING" type="string" />
|
||||||
|
<option name="/Default/CodeInspection/Highlighting/InspectionSeverities/=CppZeroConstantCanBeReplacedWithNullptr/@EntryIndexedValue" value="SUGGESTION" type="string" />
|
||||||
|
<option name="/Default/CodeInspection/Highlighting/InspectionSeverities/=CppCompileTimeConstantCanBeReplacedWithBooleanConstant/@EntryIndexedValue" value="SUGGESTION" type="string" />
|
||||||
|
<option name="/Default/CodeInspection/Highlighting/InspectionSeverities/=CppIfCanBeReplacedByConstexprIf/@EntryIndexedValue" value="SUGGESTION" type="string" />
|
||||||
|
<option name="/Default/CodeInspection/Highlighting/InspectionSeverities/=IfStdIsConstantEvaluatedCanBeReplaced/@EntryIndexedValue" value="SUGGESTION" type="string" />
|
||||||
|
<option name="/Default/CodeInspection/Highlighting/InspectionSeverities/=StdIsConstantEvaluatedWillAlwaysEvaluateToConstant/@EntryIndexedValue" value="WARNING" type="string" />
|
||||||
|
<option name="/Default/CodeInspection/Highlighting/InspectionSeverities/=ConstevalIfIsAlwaysConstant/@EntryIndexedValue" value="WARNING" type="string" />
|
||||||
|
<option name="/Default/CodeInspection/Highlighting/InspectionSeverities/=CppClassCanBeFinal/@EntryIndexedValue" value="HINT" type="string" />
|
||||||
|
<option name="/Default/CodeInspection/Highlighting/InspectionSeverities/=CppUseStructuredBinding/@EntryIndexedValue" value="HINT" type="string" />
|
||||||
|
<option name="/Default/CodeInspection/Highlighting/InspectionSeverities/=CppUseTypeTraitAlias/@EntryIndexedValue" value="SUGGESTION" type="string" />
|
||||||
|
<option name="/Default/CodeInspection/Highlighting/InspectionSeverities/=CppUseAlgorithmWithCount/@EntryIndexedValue" value="SUGGESTION" type="string" />
|
||||||
|
<option name="/Default/CodeInspection/Highlighting/InspectionSeverities/=CppUseRangeAlgorithm/@EntryIndexedValue" value="SUGGESTION" type="string" />
|
||||||
|
<option name="/Default/CodeInspection/Highlighting/InspectionSeverities/=CppUseElementsView/@EntryIndexedValue" value="SUGGESTION" type="string" />
|
||||||
|
<option name="/Default/CodeInspection/Highlighting/InspectionSeverities/=CppUseStdSize/@EntryIndexedValue" value="SUGGESTION" type="string" />
|
||||||
|
<option name="/Default/CodeInspection/Highlighting/InspectionSeverities/=CppForLoopCanBeReplacedWithWhile/@EntryIndexedValue" value="SUGGESTION" type="string" />
|
||||||
|
<option name="/Default/CodeInspection/Highlighting/InspectionSeverities/=CppJoinDeclarationAndAssignment/@EntryIndexedValue" value="SUGGESTION" type="string" />
|
||||||
|
<option name="/Default/CodeInspection/Highlighting/InspectionSeverities/=CppReplaceTieWithStructuredBinding/@EntryIndexedValue" value="SUGGESTION" type="string" />
|
||||||
|
<option name="/Default/CodeInspection/Highlighting/InspectionSeverities/=CppReplaceMemsetWithZeroInitialization/@EntryIndexedValue" value="SUGGESTION" type="string" />
|
||||||
|
<option name="/Default/CodeInspection/Highlighting/InspectionSeverities/=CppUseAssociativeContains/@EntryIndexedValue" value="SUGGESTION" type="string" />
|
||||||
|
<option name="/Default/CodeInspection/Highlighting/InspectionSeverities/=CppUseEraseAlgorithm/@EntryIndexedValue" value="SUGGESTION" type="string" />
|
||||||
|
<option name="/Default/CodeInspection/Highlighting/InspectionSeverities/=CppUseFamiliarTemplateSyntaxForGenericLambdas/@EntryIndexedValue" value="SUGGESTION" type="string" />
|
||||||
|
<option name="/Default/CodeInspection/Highlighting/InspectionSeverities/=CppTooWideScope/@EntryIndexedValue" value="SUGGESTION" type="string" />
|
||||||
|
<option name="/Default/CodeInspection/Highlighting/InspectionSeverities/=CppTooWideScopeInitStatement/@EntryIndexedValue" value="HINT" type="string" />
|
||||||
|
<option name="/Default/CodeInspection/Highlighting/InspectionSeverities/=CppRedundantNamespaceDefinition/@EntryIndexedValue" value="SUGGESTION" type="string" />
|
||||||
|
<option name="/Default/CodeInspection/Highlighting/InspectionSeverities/=CppNonInlineFunctionDefinitionInHeaderFile/@EntryIndexedValue" value="WARNING" type="string" />
|
||||||
|
<option name="/Default/CodeInspection/Highlighting/InspectionSeverities/=CppNonInlineVariableDefinitionInHeaderFile/@EntryIndexedValue" value="WARNING" type="string" />
|
||||||
|
<option name="/Default/CodeInspection/Highlighting/InspectionSeverities/=CppFunctionIsNotImplemented/@EntryIndexedValue" value="WARNING" type="string" />
|
||||||
|
<option name="/Default/CodeInspection/Highlighting/InspectionSeverities/=CppPrivateSpecialMemberFunctionIsNotImplemented/@EntryIndexedValue" value="WARNING" type="string" />
|
||||||
|
<option name="/Default/CodeInspection/Highlighting/InspectionSeverities/=CppHiddenFunction/@EntryIndexedValue" value="WARNING" type="string" />
|
||||||
|
<option name="/Default/CodeInspection/Highlighting/InspectionSeverities/=CppHidingFunction/@EntryIndexedValue" value="WARNING" type="string" />
|
||||||
|
<option name="/Default/CodeInspection/Highlighting/InspectionSeverities/=CppPolymorphicClassWithNonVirtualPublicDestructor/@EntryIndexedValue" value="WARNING" type="string" />
|
||||||
|
<option name="/Default/CodeInspection/Highlighting/InspectionSeverities/=CppAbstractClassWithoutSpecifier/@EntryIndexedValue" value="WARNING" type="string" />
|
||||||
|
<option name="/Default/CodeInspection/Highlighting/InspectionSeverities/=CppIncompleteSwitchStatement/@EntryIndexedValue" value="WARNING" type="string" />
|
||||||
|
<option name="/Default/CodeInspection/Highlighting/InspectionSeverities/=CppDefaultCaseNotHandledInSwitchStatement/@EntryIndexedValue" value="WARNING" type="string" />
|
||||||
|
<option name="/Default/CodeInspection/Highlighting/InspectionSeverities/=CppPossiblyErroneousEmptyStatements/@EntryIndexedValue" value="WARNING" type="string" />
|
||||||
|
<option name="/Default/CodeInspection/Highlighting/InspectionSeverities/=CppExpressionWithoutSideEffects/@EntryIndexedValue" value="WARNING" type="string" />
|
||||||
|
<option name="/Default/CodeInspection/Highlighting/InspectionSeverities/=CppNoDiscardExpression/@EntryIndexedValue" value="WARNING" type="string" />
|
||||||
|
<option name="/Default/CodeInspection/Highlighting/InspectionSeverities/=CppFunctionResultShouldBeUsed/@EntryIndexedValue" value="HINT" type="string" />
|
||||||
|
<option name="/Default/CodeInspection/Highlighting/InspectionSeverities/=CppMissingKeywordThrow/@EntryIndexedValue" value="WARNING" type="string" />
|
||||||
|
<option name="/Default/CodeInspection/Highlighting/InspectionSeverities/=CppDependentTypeWithoutTypenameKeyword/@EntryIndexedValue" value="WARNING" type="string" />
|
||||||
|
<option name="/Default/CodeInspection/Highlighting/InspectionSeverities/=CppDependentTemplateWithoutTemplateKeyword/@EntryIndexedValue" value="WARNING" type="string" />
|
||||||
|
<option name="/Default/CodeInspection/Highlighting/InspectionSeverities/=CppImplicitDefaultConstructorNotAvailable/@EntryIndexedValue" value="WARNING" type="string" />
|
||||||
|
<option name="/Default/CodeInspection/Highlighting/InspectionSeverities/=CppClassNeedsConstructorBecauseOfUninitializedMember/@EntryIndexedValue" value="WARNING" type="string" />
|
||||||
|
<option name="/Default/CodeInspection/Highlighting/InspectionSeverities/=CppUninitializedNonStaticDataMember/@EntryIndexedValue" value="WARNING" type="string" />
|
||||||
|
<option name="/Default/CodeInspection/Highlighting/InspectionSeverities/=CppRangeBasedForIncompatibleReference/@EntryIndexedValue" value="WARNING" type="string" />
|
||||||
|
<option name="/Default/CodeInspection/Highlighting/InspectionSeverities/=CppZeroValuedExpressionUsedAsNullPointer/@EntryIndexedValue" value="WARNING" type="string" />
|
||||||
|
<option name="/Default/CodeInspection/Highlighting/InspectionSeverities/=CppPossiblyUnintendedObjectSlicing/@EntryIndexedValue" value="WARNING" type="string" />
|
||||||
|
<option name="/Default/CodeInspection/Highlighting/InspectionSeverities/=CppPossiblyUninitializedMember/@EntryIndexedValue" value="WARNING" type="string" />
|
||||||
|
<option name="/Default/CodeInspection/Highlighting/InspectionSeverities/=CppDeclaratorDisambiguatedAsFunction/@EntryIndexedValue" value="WARNING" type="string" />
|
||||||
|
<option name="/Default/CodeInspection/Highlighting/InspectionSeverities/=CppVirtualFunctionInFinalClass/@EntryIndexedValue" value="WARNING" type="string" />
|
||||||
|
<option name="/Default/CodeInspection/Highlighting/InspectionSeverities/=CppMustBePublicVirtualToImplementInterface/@EntryIndexedValue" value="WARNING" type="string" />
|
||||||
|
<option name="/Default/CodeInspection/Highlighting/InspectionSeverities/=CppDeclarationSpecifierWithoutDeclarators/@EntryIndexedValue" value="WARNING" type="string" />
|
||||||
|
<option name="/Default/CodeInspection/Highlighting/InspectionSeverities/=CppEmptyDeclaration/@EntryIndexedValue" value="WARNING" type="string" />
|
||||||
|
<option name="/Default/CodeInspection/Highlighting/InspectionSeverities/=CppDeclarationHidesLocal/@EntryIndexedValue" value="WARNING" type="string" />
|
||||||
|
<option name="/Default/CodeInspection/Highlighting/InspectionSeverities/=CppDeclarationHidesUncapturedLocal/@EntryIndexedValue" value="HINT" type="string" />
|
||||||
|
<option name="/Default/CodeInspection/Highlighting/InspectionSeverities/=CppMismatchedClassTags/@EntryIndexedValue" value="WARNING" type="string" />
|
||||||
|
<option name="/Default/CodeInspection/Highlighting/InspectionSeverities/=CppUsingResultOfAssignmentAsCondition/@EntryIndexedValue" value="WARNING" type="string" />
|
||||||
|
<option name="/Default/CodeInspection/Highlighting/InspectionSeverities/=CppIntegralToPointerConversion/@EntryIndexedValue" value="WARNING" type="string" />
|
||||||
|
<option name="/Default/CodeInspection/Highlighting/InspectionSeverities/=CppPointerToIntegralConversion/@EntryIndexedValue" value="WARNING" type="string" />
|
||||||
|
<option name="/Default/CodeInspection/Highlighting/InspectionSeverities/=CppIncompatiblePointerConversion/@EntryIndexedValue" value="WARNING" type="string" />
|
||||||
|
<option name="/Default/CodeInspection/Highlighting/InspectionSeverities/=CppPointerConversionDropsQualifiers/@EntryIndexedValue" value="WARNING" type="string" />
|
||||||
|
<option name="/Default/CodeInspection/Highlighting/InspectionSeverities/=CppStringLiteralToCharPointerConversion/@EntryIndexedValue" value="WARNING" type="string" />
|
||||||
|
<option name="/Default/CodeInspection/Highlighting/InspectionSeverities/=CppNonExceptionSafeResourceAcquisition/@EntryIndexedValue" value="HINT" type="string" />
|
||||||
|
<option name="/Default/CodeInspection/Highlighting/InspectionSeverities/=CppVirtualFunctionCallInsideCtor/@EntryIndexedValue" value="WARNING" type="string" />
|
||||||
|
<option name="/Default/CodeInspection/Highlighting/InspectionSeverities/=CppAbstractVirtualFunctionCallInCtor/@EntryIndexedValue" value="ERROR" type="string" />
|
||||||
|
<option name="/Default/CodeInspection/Highlighting/InspectionSeverities/=CppInvalidLineContinuation/@EntryIndexedValue" value="WARNING" type="string" />
|
||||||
|
<option name="/Default/CodeInspection/Highlighting/InspectionSeverities/=CppPrintfBadFormat/@EntryIndexedValue" value="WARNING" type="string" />
|
||||||
|
<option name="/Default/CodeInspection/Highlighting/InspectionSeverities/=CppPrintfRiskyFormat/@EntryIndexedValue" value="WARNING" type="string" />
|
||||||
|
<option name="/Default/CodeInspection/Highlighting/InspectionSeverities/=CppPrintfMissedArg/@EntryIndexedValue" value="ERROR" type="string" />
|
||||||
|
<option name="/Default/CodeInspection/Highlighting/InspectionSeverities/=CppPrintfExtraArg/@EntryIndexedValue" value="WARNING" type="string" />
|
||||||
|
<option name="/Default/CodeInspection/Highlighting/InspectionSeverities/=CppBoostFormatBadCode/@EntryIndexedValue" value="WARNING" type="string" />
|
||||||
|
<option name="/Default/CodeInspection/Highlighting/InspectionSeverities/=CppBoostFormatLegacyCode/@EntryIndexedValue" value="SUGGESTION" type="string" />
|
||||||
|
<option name="/Default/CodeInspection/Highlighting/InspectionSeverities/=CppBoostFormatMixedArgs/@EntryIndexedValue" value="ERROR" type="string" />
|
||||||
|
<option name="/Default/CodeInspection/Highlighting/InspectionSeverities/=CppBoostFormatTooFewArgs/@EntryIndexedValue" value="ERROR" type="string" />
|
||||||
|
<option name="/Default/CodeInspection/Highlighting/InspectionSeverities/=CppBoostFormatTooManyArgs/@EntryIndexedValue" value="WARNING" type="string" />
|
||||||
|
<option name="/Default/CodeInspection/Highlighting/InspectionSeverities/=CppDeprecatedEntity/@EntryIndexedValue" value="WARNING" type="string" />
|
||||||
|
<option name="/Default/CodeInspection/Highlighting/InspectionSeverities/=CppMissingIncludeGuard/@EntryIndexedValue" value="WARNING" type="string" />
|
||||||
|
<option name="/Default/CodeInspection/Highlighting/InspectionSeverities/=CppDoxygenSyntaxError/@EntryIndexedValue" value="WARNING" type="string" />
|
||||||
|
<option name="/Default/CodeInspection/Highlighting/InspectionSeverities/=CppDoxygenUnresolvedReference/@EntryIndexedValue" value="WARNING" type="string" />
|
||||||
|
<option name="/Default/CodeInspection/Highlighting/InspectionSeverities/=CppDoxygenUndocumentedParameter/@EntryIndexedValue" value="SUGGESTION" type="string" />
|
||||||
|
<option name="/Default/CodeInspection/Highlighting/InspectionSeverities/=CppDeletingVoidPointer/@EntryIndexedValue" value="WARNING" type="string" />
|
||||||
|
<option name="/Default/CodeInspection/Highlighting/InspectionSeverities/=CppBooleanIncrementExpression/@EntryIndexedValue" value="WARNING" type="string" />
|
||||||
|
<option name="/Default/CodeInspection/Highlighting/InspectionSeverities/=CppDeprecatedRegisterStorageClassSpecifier/@EntryIndexedValue" value="WARNING" type="string" />
|
||||||
|
<option name="/Default/CodeInspection/Highlighting/InspectionSeverities/=CppIdenticalOperandsInBinaryExpression/@EntryIndexedValue" value="WARNING" type="string" />
|
||||||
|
<option name="/Default/CodeInspection/Highlighting/InspectionSeverities/=CppEqualOperandsInBinaryExpression/@EntryIndexedValue" value="WARNING" type="string" />
|
||||||
|
<option name="/Default/CodeInspection/Highlighting/InspectionSeverities/=CppRedefinitionOfDefaultArgumentInOverrideFunction/@EntryIndexedValue" value="WARNING" type="string" />
|
||||||
|
<option name="/Default/CodeInspection/Highlighting/InspectionSeverities/=CppUnnamedNamespaceInHeaderFile/@EntryIndexedValue" value="WARNING" type="string" />
|
||||||
|
<option name="/Default/CodeInspection/Highlighting/InspectionSeverities/=CppParameterNamesMismatch/@EntryIndexedValue" value="HINT" type="string" />
|
||||||
|
<option name="/Default/CodeInspection/Highlighting/InspectionSeverities/=CppDefaultedSpecialMemberFunctionIsImplicitlyDeleted/@EntryIndexedValue" value="WARNING" type="string" />
|
||||||
|
<option name="/Default/CodeInspection/Highlighting/InspectionSeverities/=CppNodiscardFunctionWithoutReturnValue/@EntryIndexedValue" value="WARNING" type="string" />
|
||||||
|
<option name="/Default/CodeInspection/Highlighting/InspectionSeverities/=CppRedundantComplexityInComparison/@EntryIndexedValue" value="SUGGESTION" type="string" />
|
||||||
|
<option name="/Default/CodeInspection/Highlighting/InspectionSeverities/=CppAbstractFinalClass/@EntryIndexedValue" value="WARNING" type="string" />
|
||||||
|
<option name="/Default/CodeInspection/Highlighting/InspectionSeverities/=CppSpecialFunctionWithoutNoexceptSpecification/@EntryIndexedValue" value="WARNING" type="string" />
|
||||||
|
<option name="/Default/CodeInspection/Highlighting/InspectionSeverities/=CppUnsignedZeroComparison/@EntryIndexedValue" value="WARNING" type="string" />
|
||||||
|
<option name="/Default/CodeInspection/Highlighting/InspectionSeverities/=CppMultiCharacterLiteral/@EntryIndexedValue" value="WARNING" type="string" />
|
||||||
|
<option name="/Default/CodeInspection/Highlighting/InspectionSeverities/=CppMultiCharacterWideLiteral/@EntryIndexedValue" value="WARNING" type="string" />
|
||||||
|
<option name="/Default/CodeInspection/Highlighting/InspectionSeverities/=CppRedundantQualifier/@EntryIndexedValue" value="HINT" type="string" />
|
||||||
|
<option name="/Default/CodeInspection/Highlighting/InspectionSeverities/=CppRedundantAccessSpecifier/@EntryIndexedValue" value="HINT" type="string" />
|
||||||
|
<option name="/Default/CodeInspection/Highlighting/InspectionSeverities/=CppAccessSpecifierWithNoDeclarations/@EntryIndexedValue" value="SUGGESTION" type="string" />
|
||||||
|
<option name="/Default/CodeInspection/Highlighting/InspectionSeverities/=CppRedundantTypenameKeyword/@EntryIndexedValue" value="WARNING" type="string" />
|
||||||
|
<option name="/Default/CodeInspection/Highlighting/InspectionSeverities/=CppRedundantTemplateKeyword/@EntryIndexedValue" value="WARNING" type="string" />
|
||||||
|
<option name="/Default/CodeInspection/Highlighting/InspectionSeverities/=CppRedundantElseKeyword/@EntryIndexedValue" value="HINT" type="string" />
|
||||||
|
<option name="/Default/CodeInspection/Highlighting/InspectionSeverities/=CppRedundantElseKeywordInsideCompoundStatement/@EntryIndexedValue" value="HINT" type="string" />
|
||||||
|
<option name="/Default/CodeInspection/Highlighting/InspectionSeverities/=CppRedundantControlFlowJump/@EntryIndexedValue" value="HINT" type="string" />
|
||||||
|
<option name="/Default/CodeInspection/Highlighting/InspectionSeverities/=CppRedundantEmptyStatement/@EntryIndexedValue" value="HINT" type="string" />
|
||||||
|
<option name="/Default/CodeInspection/Highlighting/InspectionSeverities/=CppRedundantEmptyDeclaration/@EntryIndexedValue" value="HINT" type="string" />
|
||||||
|
<option name="/Default/CodeInspection/Highlighting/InspectionSeverities/=CppRedundantParentheses/@EntryIndexedValue" value="HINT" type="string" />
|
||||||
|
<option name="/Default/CodeInspection/Highlighting/InspectionSeverities/=CppRedundantLambdaParameterList/@EntryIndexedValue" value="HINT" type="string" />
|
||||||
|
<option name="/Default/CodeInspection/Highlighting/InspectionSeverities/=CppRedundantCastExpression/@EntryIndexedValue" value="HINT" type="string" />
|
||||||
|
<option name="/Default/CodeInspection/Highlighting/InspectionSeverities/=CppHeaderHasBeenAlreadyIncluded/@EntryIndexedValue" value="HINT" type="string" />
|
||||||
|
<option name="/Default/CodeInspection/Highlighting/InspectionSeverities/=CppTemplateArgumentsCanBeDeduced/@EntryIndexedValue" value="HINT" type="string" />
|
||||||
|
<option name="/Default/CodeInspection/Highlighting/InspectionSeverities/=CppRedundantTemplateArguments/@EntryIndexedValue" value="HINT" type="string" />
|
||||||
|
<option name="/Default/CodeInspection/Highlighting/InspectionSeverities/=CppStaticSpecifierOnAnonymousNamespaceMember/@EntryIndexedValue" value="SUGGESTION" type="string" />
|
||||||
|
<option name="/Default/CodeInspection/Highlighting/InspectionSeverities/=CppRedundantStaticSpecifierOnMemberAllocationFunction/@EntryIndexedValue" value="HINT" type="string" />
|
||||||
|
<option name="/Default/CodeInspection/Highlighting/InspectionSeverities/=CppRedundantStaticSpecifierOnThreadLocalLocalVariable/@EntryIndexedValue" value="HINT" type="string" />
|
||||||
|
<option name="/Default/CodeInspection/Highlighting/InspectionSeverities/=CppRedundantBaseClassAccessSpecifier/@EntryIndexedValue" value="HINT" type="string" />
|
||||||
|
<option name="/Default/CodeInspection/Highlighting/InspectionSeverities/=CppRedundantInlineSpecifier/@EntryIndexedValue" value="HINT" type="string" />
|
||||||
|
<option name="/Default/CodeInspection/Highlighting/InspectionSeverities/=CppRedundantConstSpecifier/@EntryIndexedValue" value="HINT" type="string" />
|
||||||
|
<option name="/Default/CodeInspection/Highlighting/InspectionSeverities/=CppRedundantBooleanExpressionArgument/@EntryIndexedValue" value="WARNING" type="string" />
|
||||||
|
<option name="/Default/CodeInspection/Highlighting/InspectionSeverities/=CppRedundantVoidArgumentList/@EntryIndexedValue" value="SUGGESTION" type="string" />
|
||||||
|
<option name="/Default/CodeInspection/Highlighting/InspectionSeverities/=CppRedundantMemberInitializer/@EntryIndexedValue" value="SUGGESTION" type="string" />
|
||||||
|
<option name="/Default/CodeInspection/Highlighting/InspectionSeverities/=CppRedundantBaseClassInitializer/@EntryIndexedValue" value="SUGGESTION" type="string" />
|
||||||
|
<option name="/Default/CodeInspection/Highlighting/InspectionSeverities/=CppConstParameterInDeclaration/@EntryIndexedValue" value="SUGGESTION" type="string" />
|
||||||
|
<option name="/Default/CodeInspection/Highlighting/InspectionSeverities/=CppVolatileParameterInDeclaration/@EntryIndexedValue" value="SUGGESTION" type="string" />
|
||||||
|
<option name="/Default/CodeInspection/Highlighting/InspectionSeverities/=CppFinalFunctionInFinalClass/@EntryIndexedValue" value="SUGGESTION" type="string" />
|
||||||
|
<option name="/Default/CodeInspection/Highlighting/InspectionSeverities/=CppFinalNonOverridingVirtualFunction/@EntryIndexedValue" value="SUGGESTION" type="string" />
|
||||||
|
<option name="/Default/CodeInspection/Highlighting/InspectionSeverities/=CppRedundantElaboratedTypeSpecifier/@EntryIndexedValue" value="HINT" type="string" />
|
||||||
|
<option name="/Default/CodeInspection/Highlighting/InspectionSeverities/=CppRedundantDereferencingAndTakingAddress/@EntryIndexedValue" value="SUGGESTION" type="string" />
|
||||||
|
<option name="/Default/CodeInspection/Highlighting/InspectionSeverities/=CppRedundantConditionalExpression/@EntryIndexedValue" value="SUGGESTION" type="string" />
|
||||||
|
<option name="/Default/CodeInspection/Highlighting/InspectionSeverities/=CppConditionalExpressionCanBeSimplified/@EntryIndexedValue" value="SUGGESTION" type="string" />
|
||||||
|
<option name="/Default/CodeInspection/Highlighting/InspectionSeverities/=CppRedundantExportKeyword/@EntryIndexedValue" value="WARNING" type="string" />
|
||||||
|
<option name="/Default/CodeInspection/Highlighting/InspectionSeverities/=CppRedundantZeroInitializerInAggregateInitialization/@EntryIndexedValue" value="SUGGESTION" type="string" />
|
||||||
|
<option name="/Default/CodeInspection/Highlighting/InspectionSeverities/=CppUserDefinedLiteralSuffixDoesNotStartWithUnderscore/@EntryIndexedValue" value="WARNING" type="string" />
|
||||||
|
<option name="/Default/CodeInspection/Highlighting/InspectionSeverities/=CppClassIsIncomplete/@EntryIndexedValue" value="WARNING" type="string" />
|
||||||
|
<option name="/Default/CodeInspection/Highlighting/InspectionSeverities/=CppTemplateParameterShadowing/@EntryIndexedValue" value="WARNING" type="string" />
|
||||||
|
<option name="/Default/CodeInspection/Highlighting/InspectionSeverities/=CppMutableSpecifierOnReferenceMember/@EntryIndexedValue" value="WARNING" type="string" />
|
||||||
|
<option name="/Default/CodeInspection/Highlighting/InspectionSeverities/=CppDefaultInitializationWithNoUserConstructor/@EntryIndexedValue" value="WARNING" type="string" />
|
||||||
|
<option name="/Default/CodeInspection/Highlighting/InspectionSeverities/=CppExplicitSpecializationInNonNamespaceScope/@EntryIndexedValue" value="WARNING" type="string" />
|
||||||
|
<option name="/Default/CodeInspection/Highlighting/InspectionSeverities/=CppUnionMemberOfReferenceType/@EntryIndexedValue" value="WARNING" type="string" />
|
||||||
|
<option name="/Default/CodeInspection/Highlighting/InspectionSeverities/=CppUninitializedDependentBaseClass/@EntryIndexedValue" value="WARNING" type="string" />
|
||||||
|
<option name="/Default/CodeInspection/Highlighting/InspectionSeverities/=CppPrecompiledHeaderIsNotIncluded/@EntryIndexedValue" value="ERROR" type="string" />
|
||||||
|
<option name="/Default/CodeInspection/Highlighting/InspectionSeverities/=CppPrecompiledHeaderNotFound/@EntryIndexedValue" value="ERROR" type="string" />
|
||||||
|
<option name="/Default/CodeInspection/Highlighting/InspectionSeverities/=CppCoroutineCallResolveError/@EntryIndexedValue" value="WARNING" type="string" />
|
||||||
|
<option name="/Default/CodeInspection/Highlighting/InspectionSeverities/=CppAwaiterTypeIsNotClass/@EntryIndexedValue" value="WARNING" type="string" />
|
||||||
|
<option name="/Default/CodeInspection/Highlighting/InspectionSeverities/=CppOutParameterMustBeWritten/@EntryIndexedValue" value="WARNING" type="string" />
|
||||||
|
<option name="/Default/CodeInspection/Highlighting/InspectionSeverities/=CppWarningDirective/@EntryIndexedValue" value="WARNING" type="string" />
|
||||||
|
<option name="/Default/CodeInspection/Highlighting/InspectionSeverities/=CppStaticAssertFailure/@EntryIndexedValue" value="ERROR" type="string" />
|
||||||
|
<option name="/Default/CodeInspection/Highlighting/InspectionSeverities/=CppEvaluationFailure/@EntryIndexedValue" value="ERROR" type="string" />
|
||||||
|
<option name="/Default/CodeInspection/Highlighting/InspectionSeverities/=CppDeclaratorNeverUsed/@EntryIndexedValue" value="WARNING" type="string" />
|
||||||
|
<option name="/Default/CodeInspection/Highlighting/InspectionSeverities/=CppTypeAliasNeverUsed/@EntryIndexedValue" value="WARNING" type="string" />
|
||||||
|
<option name="/Default/CodeInspection/Highlighting/InspectionSeverities/=CppConceptNeverUsed/@EntryIndexedValue" value="WARNING" type="string" />
|
||||||
|
<option name="/Default/CodeInspection/Highlighting/InspectionSeverities/=CppClassNeverUsed/@EntryIndexedValue" value="WARNING" type="string" />
|
||||||
|
<option name="/Default/CodeInspection/Highlighting/InspectionSeverities/=CppEnumeratorNeverUsed/@EntryIndexedValue" value="WARNING" type="string" />
|
||||||
|
<option name="/Default/CodeInspection/Highlighting/InspectionSeverities/=CppLambdaCaptureNeverUsed/@EntryIndexedValue" value="WARNING" type="string" />
|
||||||
|
<option name="/Default/CodeInspection/Highlighting/InspectionSeverities/=CppLocalVariableWithNonTrivialDtorIsNeverUsed/@EntryIndexedValue" value="DO_NOT_SHOW" type="string" />
|
||||||
|
<option name="/Default/CodeInspection/Highlighting/InspectionSeverities/=CppParameterNeverUsed/@EntryIndexedValue" value="HINT" type="string" />
|
||||||
|
<option name="/Default/CodeInspection/Highlighting/InspectionSeverities/=CppTemplateParameterNeverUsed/@EntryIndexedValue" value="HINT" type="string" />
|
||||||
|
<option name="/Default/CodeInspection/Highlighting/InspectionSeverities/=CppEntityAssignedButNoRead/@EntryIndexedValue" value="WARNING" type="string" />
|
||||||
|
<option name="/Default/CodeInspection/Highlighting/InspectionSeverities/=CppEntityUsedOnlyInUnevaluatedContext/@EntryIndexedValue" value="WARNING" type="string" />
|
||||||
|
<option name="/Default/CodeInspection/Highlighting/InspectionSeverities/=CppLocalVariableMightNotBeInitialized/@EntryIndexedValue" value="WARNING" type="string" />
|
||||||
|
<option name="/Default/CodeInspection/Highlighting/InspectionSeverities/=CppObjectMemberMightNotBeInitialized/@EntryIndexedValue" value="WARNING" type="string" />
|
||||||
|
<option name="/Default/CodeInspection/Highlighting/InspectionSeverities/=CppSomeObjectMembersMightNotBeInitialized/@EntryIndexedValue" value="WARNING" type="string" />
|
||||||
|
<option name="/Default/CodeInspection/Highlighting/InspectionSeverities/=CppDeclaratorUsedBeforeInitialization/@EntryIndexedValue" value="ERROR" type="string" />
|
||||||
|
<option name="/Default/CodeInspection/Highlighting/InspectionSeverities/=CppUnusedIncludeDirective/@EntryIndexedValue" value="WARNING" type="string" />
|
||||||
|
<option name="/Default/CodeInspection/Highlighting/InspectionSeverities/=CppNotAllPathsReturnValue/@EntryIndexedValue" value="WARNING" type="string" />
|
||||||
|
<option name="/Default/CodeInspection/Highlighting/InspectionSeverities/=CDeclarationWithImplicitIntType/@EntryIndexedValue" value="WARNING" type="string" />
|
||||||
|
<option name="/Default/CodeInspection/Highlighting/InspectionSeverities/=CppFunctionDoesntReturnValue/@EntryIndexedValue" value="WARNING" type="string" />
|
||||||
|
<option name="/Default/CodeInspection/Highlighting/InspectionSeverities/=CppReturnNoValueInNonVoidFunction/@EntryIndexedValue" value="WARNING" type="string" />
|
||||||
|
<option name="/Default/CodeInspection/Highlighting/InspectionSeverities/=CppCVQualifierCanNotBeAppliedToReference/@EntryIndexedValue" value="WARNING" type="string" />
|
||||||
|
<option name="/Default/CodeInspection/Highlighting/InspectionSeverities/=CppDereferenceOperatorLimitExceeded/@EntryIndexedValue" value="WARNING" type="string" />
|
||||||
|
<option name="/Default/CodeInspection/Highlighting/InspectionSeverities/=CppForwardEnumDeclarationWithoutUnderlyingType/@EntryIndexedValue" value="WARNING" type="string" />
|
||||||
|
<option name="/Default/CodeInspection/Highlighting/InspectionSeverities/=CppUnmatchedPragmaRegionDirective/@EntryIndexedValue" value="WARNING" type="string" />
|
||||||
|
<option name="/Default/CodeInspection/Highlighting/InspectionSeverities/=CppUnmatchedPragmaEndRegionDirective/@EntryIndexedValue" value="WARNING" type="string" />
|
||||||
|
<option name="/Default/CodeInspection/Highlighting/InspectionSeverities/=CppStaticDataMemberInUnnamedStruct/@EntryIndexedValue" value="WARNING" type="string" />
|
||||||
|
<option name="/Default/CodeInspection/Highlighting/InspectionSeverities/=CppDefaultIsUsedAsIdentifier/@EntryIndexedValue" value="WARNING" type="string" />
|
||||||
|
<option name="/Default/CodeInspection/Highlighting/InspectionSeverities/=CppLongFloat/@EntryIndexedValue" value="WARNING" type="string" />
|
||||||
|
<option name="/Default/CodeInspection/Highlighting/InspectionSeverities/=CppMsExtReinterpretCastFromNullptr/@EntryIndexedValue" value="WARNING" type="string" />
|
||||||
|
<option name="/Default/CodeInspection/Highlighting/InspectionSeverities/=CppMsExtBindingRValueToLvalueReference/@EntryIndexedValue" value="WARNING" type="string" />
|
||||||
|
<option name="/Default/CodeInspection/Highlighting/InspectionSeverities/=CppMsExtAddressOfClassRValue/@EntryIndexedValue" value="WARNING" type="string" />
|
||||||
|
<option name="/Default/CodeInspection/Highlighting/InspectionSeverities/=CppMsExtDoubleUserConversionInCopyInit/@EntryIndexedValue" value="WARNING" type="string" />
|
||||||
|
<option name="/Default/CodeInspection/Highlighting/InspectionSeverities/=CppMsExtCopyElisionInCopyInitDeclarator/@EntryIndexedValue" value="WARNING" type="string" />
|
||||||
|
<option name="/Default/CodeInspection/Highlighting/InspectionSeverities/=CppMsExtNotInitializedStaticConstLocalVar/@EntryIndexedValue" value="WARNING" type="string" />
|
||||||
|
<option name="/Default/CodeInspection/Highlighting/InspectionSeverities/=CppRemoveRedundantBraces/@EntryIndexedValue" value="DO_NOT_SHOW" type="string" />
|
||||||
|
<option name="/Default/CodeInspection/Highlighting/InspectionSeverities/=CppEnforceIfStatementBraces/@EntryIndexedValue" value="DO_NOT_SHOW" type="string" />
|
||||||
|
<option name="/Default/CodeInspection/Highlighting/InspectionSeverities/=CppEnforceForStatementBraces/@EntryIndexedValue" value="DO_NOT_SHOW" type="string" />
|
||||||
|
<option name="/Default/CodeInspection/Highlighting/InspectionSeverities/=CppEnforceWhileStatementBraces/@EntryIndexedValue" value="DO_NOT_SHOW" type="string" />
|
||||||
|
<option name="/Default/CodeInspection/Highlighting/InspectionSeverities/=CppEnforceDoStatementBraces/@EntryIndexedValue" value="DO_NOT_SHOW" type="string" />
|
||||||
|
<option name="/Default/CodeInspection/Highlighting/InspectionSeverities/=CppWrongIncludesOrder/@EntryIndexedValue" value="HINT" type="string" />
|
||||||
|
<option name="/Default/CodeInspection/Highlighting/InspectionSeverities/=CppWrongSlashesInIncludeDirective/@EntryIndexedValue" value="HINT" type="string" />
|
||||||
|
<option name="/Default/CodeInspection/Highlighting/InspectionSeverities/=CppEnforceNestedNamespacesStyle/@EntryIndexedValue" value="HINT" type="string" />
|
||||||
|
<option name="/Default/CodeInspection/Highlighting/InspectionSeverities/=CppEnforceTypeAliasCodeStyle/@EntryIndexedValue" value="DO_NOT_SHOW" type="string" />
|
||||||
|
<option name="/Default/CodeInspection/Highlighting/InspectionSeverities/=CppEnforceFunctionDeclarationStyle/@EntryIndexedValue" value="DO_NOT_SHOW" type="string" />
|
||||||
|
<option name="/Default/CodeInspection/Highlighting/InspectionSeverities/=CppMemberInitializersOrder/@EntryIndexedValue" value="SUGGESTION" type="string" />
|
||||||
|
<option name="/Default/CodeInspection/Highlighting/InspectionSeverities/=CppEnforceOverridingFunctionStyle/@EntryIndexedValue" value="SUGGESTION" type="string" />
|
||||||
|
<option name="/Default/CodeInspection/Highlighting/InspectionSeverities/=CppEnforceOverridingDestructorStyle/@EntryIndexedValue" value="SUGGESTION" type="string" />
|
||||||
|
<option name="/Default/CodeInspection/Highlighting/InspectionSeverities/=CppUseAuto/@EntryIndexedValue" value="HINT" type="string" />
|
||||||
|
<option name="/Default/CodeInspection/Highlighting/InspectionSeverities/=CppUseAutoForNumeric/@EntryIndexedValue" value="HINT" type="string" />
|
||||||
|
<option name="/Default/CodeInspection/Highlighting/InspectionSeverities/=CppEnforceCVQualifiersPlacement/@EntryIndexedValue" value="DO_NOT_SHOW" type="string" />
|
||||||
|
<option name="/Default/CodeInspection/Highlighting/InspectionSeverities/=CppEnforceCVQualifiersOrder/@EntryIndexedValue" value="DO_NOT_SHOW" type="string" />
|
||||||
|
<option name="/Default/CodeInspection/Highlighting/InspectionSeverities/=CppUnnecessaryWhitespace/@EntryIndexedValue" value="DO_NOT_SHOW" type="string" />
|
||||||
|
<option name="/Default/CodeInspection/Highlighting/InspectionSeverities/=CppTabsAreDisallowed/@EntryIndexedValue" value="DO_NOT_SHOW" type="string" />
|
||||||
|
<option name="/Default/CodeInspection/Highlighting/InspectionSeverities/=CppDFAConstantConditions/@EntryIndexedValue" value="WARNING" type="string" />
|
||||||
|
<option name="/Default/CodeInspection/Highlighting/InspectionSeverities/=CppDFANullDereference/@EntryIndexedValue" value="WARNING" type="string" />
|
||||||
|
<option name="/Default/CodeInspection/Highlighting/InspectionSeverities/=CppDFANotInitializedField/@EntryIndexedValue" value="WARNING" type="string" />
|
||||||
|
<option name="/Default/CodeInspection/Highlighting/InspectionSeverities/=CppDFALoopConditionNotUpdated/@EntryIndexedValue" value="WARNING" type="string" />
|
||||||
|
<option name="/Default/CodeInspection/Highlighting/InspectionSeverities/=CppDFADeletedPointer/@EntryIndexedValue" value="WARNING" type="string" />
|
||||||
|
<option name="/Default/CodeInspection/Highlighting/InspectionSeverities/=CppDFAMemoryLeak/@EntryIndexedValue" value="WARNING" type="string" />
|
||||||
|
<option name="/Default/CodeInspection/Highlighting/InspectionSeverities/=CppDFAInvalidatedMemory/@EntryIndexedValue" value="WARNING" type="string" />
|
||||||
|
<option name="/Default/CodeInspection/Highlighting/InspectionSeverities/=CppDFALocalValueEscapesScope/@EntryIndexedValue" value="WARNING" type="string" />
|
||||||
|
<option name="/Default/CodeInspection/Highlighting/InspectionSeverities/=CppDFALocalValueEscapesFunction/@EntryIndexedValue" value="WARNING" type="string" />
|
||||||
|
<option name="/Default/CodeInspection/Highlighting/InspectionSeverities/=CppDFAConstantParameter/@EntryIndexedValue" value="WARNING" type="string" />
|
||||||
|
<option name="/Default/CodeInspection/Highlighting/InspectionSeverities/=CppDFAConstantFunctionResult/@EntryIndexedValue" value="WARNING" type="string" />
|
||||||
|
<option name="/Default/CodeInspection/Highlighting/InspectionSeverities/=CppDFAArrayIndexOutOfBounds/@EntryIndexedValue" value="WARNING" type="string" />
|
||||||
|
<option name="/Default/CodeInspection/Highlighting/InspectionSeverities/=CppDFAUnreachableCode/@EntryIndexedValue" value="WARNING" type="string" />
|
||||||
|
<option name="/Default/CodeInspection/Highlighting/InspectionSeverities/=CppDFAUnreachableFunctionCall/@EntryIndexedValue" value="WARNING" type="string" />
|
||||||
|
<option name="/Default/CodeInspection/Highlighting/InspectionSeverities/=CppDFAEndlessLoop/@EntryIndexedValue" value="WARNING" type="string" />
|
||||||
|
<option name="/Default/CodeInspection/Highlighting/InspectionSeverities/=CppDFAInfiniteRecursion/@EntryIndexedValue" value="WARNING" type="string" />
|
||||||
|
<option name="/Default/CodeInspection/Highlighting/InspectionSeverities/=CppDFAUnusedValue/@EntryIndexedValue" value="WARNING" type="string" />
|
||||||
|
<option name="/Default/CodeInspection/Highlighting/InspectionSeverities/=CppDFAUnreadVariable/@EntryIndexedValue" value="WARNING" type="string" />
|
||||||
|
<option name="/Default/CodeInspection/Highlighting/InspectionSeverities/=CppDFATimeOver/@EntryIndexedValue" value="HINT" type="string" />
|
||||||
|
<option name="/Default/CodeInspection/Highlighting/InspectionSeverities/=CppInconsistentNaming/@EntryIndexedValue" value="DO_NOT_SHOW" type="string" />
|
||||||
|
<option name="/Default/CodeInspection/Highlighting/InspectionSeverities/=StringLiteralTypo/@EntryIndexedValue" value="DO_NOT_SHOW" type="string" />
|
||||||
|
<option name="/Default/CodeInspection/Highlighting/InspectionSeverities/=CommentTypo/@EntryIndexedValue" value="DO_NOT_SHOW" type="string" />
|
||||||
|
<option name="/Default/CodeInspection/Highlighting/InspectionSeverities/=IdentifierTypo/@EntryIndexedValue" value="DO_NOT_SHOW" type="string" />
|
||||||
|
</component>
|
||||||
|
</project>
|
13
.idea/misc.xml
Normal file
13
.idea/misc.xml
Normal file
@ -0,0 +1,13 @@
|
|||||||
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
|
<project version="4">
|
||||||
|
<component name="BackendCodeEditorMiscSettings">
|
||||||
|
<option name="/Default/RiderDebugger/RiderRestoreDecompile/RestoreDecompileSetting/@EntryValue" value="false" type="bool" />
|
||||||
|
<option name="/Default/Housekeeping/GlobalSettingsUpgraded/IsUpgraded/@EntryValue" value="true" type="bool" />
|
||||||
|
<option name="/Default/Housekeeping/FeatureSuggestion/FeatureSuggestionManager/DisabledSuggesters/=SwitchToGoToActionSuggester/@EntryIndexedValue" value="true" type="bool" />
|
||||||
|
<option name="/Default/Environment/Hierarchy/GeneratedFilesCacheKey/Timestamp/@EntryValue" value="15" type="long" />
|
||||||
|
</component>
|
||||||
|
<component name="CMakePythonSetting">
|
||||||
|
<option name="pythonIntegrationState" value="YES" />
|
||||||
|
</component>
|
||||||
|
<component name="CMakeWorkspace" PROJECT_DIR="$PROJECT_DIR$" />
|
||||||
|
</project>
|
@ -1,6 +1,9 @@
|
|||||||
cmake_minimum_required(VERSION 3.10)
|
cmake_minimum_required(VERSION 3.10)
|
||||||
|
|
||||||
project(kgg-dec VERSION 0.3 LANGUAGES CXX)
|
project(kgg-dec LANGUAGES CXX)
|
||||||
|
|
||||||
|
include(CheckIPOSupported)
|
||||||
|
check_ipo_supported(RESULT lto_supported OUTPUT error)
|
||||||
|
|
||||||
set(CMAKE_CXX_STANDARD 20)
|
set(CMAKE_CXX_STANDARD 20)
|
||||||
set(CMAKE_CXX_STANDARD_REQUIRED ON)
|
set(CMAKE_CXX_STANDARD_REQUIRED ON)
|
||||||
@ -23,5 +26,12 @@ target_include_directories(kgg-dec
|
|||||||
)
|
)
|
||||||
|
|
||||||
target_link_libraries(kgg-dec PRIVATE shell32 ole32)
|
target_link_libraries(kgg-dec PRIVATE shell32 ole32)
|
||||||
target_compile_definitions(kgg-dec PRIVATE NOMINMAX)
|
|
||||||
target_compile_definitions(kgg-dec PRIVATE KGGDEC_PROJECT_VERSION="${PROJECT_VERSION}")
|
if (lto_supported)
|
||||||
|
set_property(TARGET kgg-dec PROPERTY INTERPROCEDURAL_OPTIMIZATION TRUE)
|
||||||
|
endif()
|
||||||
|
|
||||||
|
if (CMAKE_CXX_COMPILER_ID STREQUAL "GNU" OR CMAKE_CXX_COMPILER_ID STREQUAL "Clang")
|
||||||
|
set(CMAKE_CXX_FLAGS_RELEASE "${CMAKE_CXX_FLAGS_RELEASE} -s -fdata-sections -ffunction-sections -flto -fmerge-all-constants -fno-exceptions -fno-rtti")
|
||||||
|
set(CMAKE_EXE_LINKER_FLAGS_RELEASE "${CMAKE_EXE_LINKER_FLAGS_RELEASE} -s -Wl,--gc-sections -flto")
|
||||||
|
endif()
|
||||||
|
@ -20,11 +20,3 @@ copy /y README.MD .\\build\\vs2022\\
|
|||||||
```shell
|
```shell
|
||||||
kgg-dec.exe .
|
kgg-dec.exe .
|
||||||
```
|
```
|
||||||
|
|
||||||
### CLI Options
|
|
||||||
|
|
||||||
* `[--infra-dll </path/to/infra.dll>]`: Specify the path to `infra.dll`, defaults to `infra.dll`.
|
|
||||||
* `[--scan-all-file-ext <0|1>]`: Whether to scan all file extensions, defaults to `0` to scan only `kgg` files.
|
|
||||||
* `[--db </path/to/KGMusicV3.db>]`: Specify the path to `KGMusicV3.db`, defaults to `%AppData%/Kugou8/KGMusicV3.db`.
|
|
||||||
|
|
||||||
After specifying the parameters, you can specify any number of files or directories.
|
|
@ -12,14 +12,6 @@
|
|||||||
1. 将 `kgg-dec.exe` 与 `infra.dll` 拷贝到 KGG 所在目录。
|
1. 将 `kgg-dec.exe` 与 `infra.dll` 拷贝到 KGG 所在目录。
|
||||||
2. 双击 `kgg-dec.exe`,开始解密当前目录。
|
2. 双击 `kgg-dec.exe`,开始解密当前目录。
|
||||||
|
|
||||||
其它参数:
|
|
||||||
|
|
||||||
* `[--infra-dll </path/to/infra.dll>]`: 指定 `infra.dll` 的路径,默认为 `infra.dll`。
|
|
||||||
* `[--scan-all-file-ext <0|1>]`: 是否扫描所有文件后缀名,默认为 `0` 只扫描 `kgg` 文件。
|
|
||||||
* `[--db </path/to/KGMusicV3.db>]`: 指定 `KGMusicV3.db` 的路径,默认为 `%AppData%/Kugou8/KGMusicV3.db`。
|
|
||||||
|
|
||||||
指定完参数后可以指定任意数量的文件或目录。
|
|
||||||
|
|
||||||
错误排查:
|
错误排查:
|
||||||
|
|
||||||
1. 需要至少播放一次 KGG 文件,并确保酷狗能正常播放。
|
1. 需要至少播放一次 KGG 文件,并确保酷狗能正常播放。
|
||||||
|
@ -6,91 +6,57 @@
|
|||||||
|
|
||||||
namespace Infra {
|
namespace Infra {
|
||||||
|
|
||||||
SqliteDB::SqliteDB(const std::filesystem::path& infra_dll_path) {
|
HMODULE g_mod_infra_dll;
|
||||||
ok_ = InitInfraDll(infra_dll_path);
|
sqlite3_open_v2_t sqlite3_open_v2;
|
||||||
}
|
sqlite3_key_t sqlite3_key;
|
||||||
|
sqlite3_prepare_v2_t sqlite3_prepare_v2;
|
||||||
|
sqlite3_step_t sqlite3_step;
|
||||||
|
sqlite3_column_text_t sqlite3_column_text;
|
||||||
|
sqlite3_close_v2_t sqlite3_close_v2;
|
||||||
|
sqlite3_finalize_t sqlite3_finalize;
|
||||||
|
|
||||||
bool SqliteDB::Open(const std::filesystem::path& db_path, std::string_view key) {
|
bool g_init_sqlite_ok = []() {
|
||||||
if (infra_ == nullptr) {
|
g_mod_infra_dll = LoadLibraryA("infra.dll");
|
||||||
|
if (g_mod_infra_dll == nullptr) {
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
auto db_path_u8 = db_path.generic_u8string();
|
sqlite3_open_v2 = reinterpret_cast<sqlite3_open_v2_t>(GetProcAddress(g_mod_infra_dll, "sqlite3_open_v2"));
|
||||||
int rc = sqlite3_open_v2_(reinterpret_cast<const char*>(db_path_u8.c_str()), &db_, SQLITE_OPEN_READONLY, nullptr);
|
sqlite3_key = reinterpret_cast<sqlite3_key_t>(GetProcAddress(g_mod_infra_dll, "sqlite3_key"));
|
||||||
if (rc != SQLITE_OK) {
|
sqlite3_prepare_v2 = reinterpret_cast<sqlite3_prepare_v2_t>(GetProcAddress(g_mod_infra_dll, "sqlite3_prepare_v2"));
|
||||||
return false;
|
sqlite3_step = reinterpret_cast<sqlite3_step_t>(GetProcAddress(g_mod_infra_dll, "sqlite3_step"));
|
||||||
}
|
sqlite3_column_text =
|
||||||
|
reinterpret_cast<sqlite3_column_text_t>(GetProcAddress(g_mod_infra_dll, "sqlite3_column_text"));
|
||||||
|
sqlite3_close_v2 = reinterpret_cast<sqlite3_close_v2_t>(GetProcAddress(g_mod_infra_dll, "sqlite3_close_v2"));
|
||||||
|
sqlite3_finalize = reinterpret_cast<sqlite3_finalize_t>(GetProcAddress(g_mod_infra_dll, "sqlite3_finalize"));
|
||||||
|
|
||||||
if (!key.empty()) {
|
return sqlite3_open_v2 && sqlite3_key && sqlite3_prepare_v2 && sqlite3_step && sqlite3_column_text &&
|
||||||
rc = sqlite3_key_(db_, key.data(), static_cast<int>(key.size()));
|
sqlite3_close_v2 && sqlite3_finalize;
|
||||||
if (rc != SQLITE_OK) {
|
}();
|
||||||
sqlite3_close_v2_(db_);
|
|
||||||
db_ = nullptr;
|
|
||||||
return false;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
return true;
|
SQLite::SQLite(const std::filesystem::path& db_path) {
|
||||||
}
|
ok_ = false;
|
||||||
|
|
||||||
void SqliteDB::Close() {
|
|
||||||
if (db_) {
|
|
||||||
sqlite3_close_v2_(db_);
|
|
||||||
db_ = nullptr;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
void SqliteDB::FreeInfraDll() {
|
|
||||||
if (infra_ != nullptr) {
|
|
||||||
FreeLibrary(reinterpret_cast<HMODULE>(infra_));
|
|
||||||
infra_ = nullptr;
|
|
||||||
}
|
|
||||||
|
|
||||||
sqlite3_open_v2_ = nullptr;
|
|
||||||
sqlite3_key_ = nullptr;
|
|
||||||
sqlite3_prepare_v2_ = nullptr;
|
|
||||||
sqlite3_step_ = nullptr;
|
|
||||||
sqlite3_column_text_ = nullptr;
|
|
||||||
sqlite3_close_v2_ = nullptr;
|
|
||||||
sqlite3_finalize_ = nullptr;
|
|
||||||
}
|
|
||||||
|
|
||||||
bool SqliteDB::InitInfraDll(const std::filesystem::path& infra_dll_path) {
|
|
||||||
auto path_unicode = infra_dll_path.wstring();
|
|
||||||
HMODULE hMod = LoadLibraryW(path_unicode.c_str());
|
|
||||||
infra_ = hMod;
|
|
||||||
if (hMod == nullptr) {
|
|
||||||
return false;
|
|
||||||
}
|
|
||||||
|
|
||||||
sqlite3_open_v2_ = reinterpret_cast<sqlite3_open_v2_t>(GetProcAddress(hMod, "sqlite3_open_v2"));
|
|
||||||
sqlite3_key_ = reinterpret_cast<sqlite3_key_t>(GetProcAddress(hMod, "sqlite3_key"));
|
|
||||||
sqlite3_prepare_v2_ = reinterpret_cast<sqlite3_prepare_v2_t>(GetProcAddress(hMod, "sqlite3_prepare_v2"));
|
|
||||||
sqlite3_step_ = reinterpret_cast<sqlite3_step_t>(GetProcAddress(hMod, "sqlite3_step"));
|
|
||||||
sqlite3_column_text_ = reinterpret_cast<sqlite3_column_text_t>(GetProcAddress(hMod, "sqlite3_column_text"));
|
|
||||||
sqlite3_close_v2_ = reinterpret_cast<sqlite3_close_v2_t>(GetProcAddress(hMod, "sqlite3_close_v2"));
|
|
||||||
sqlite3_finalize_ = reinterpret_cast<sqlite3_finalize_t>(GetProcAddress(hMod, "sqlite3_finalize"));
|
|
||||||
|
|
||||||
if (!sqlite3_open_v2_ || !sqlite3_key_ || !sqlite3_prepare_v2_ || !sqlite3_step_ || !sqlite3_column_text_ ||
|
|
||||||
!sqlite3_close_v2_ || !sqlite3_finalize_) {
|
|
||||||
infra_ = nullptr;
|
|
||||||
return false;
|
|
||||||
}
|
|
||||||
|
|
||||||
return true;
|
|
||||||
}
|
|
||||||
|
|
||||||
KugouDb::KugouDb(const std::filesystem::path& infra_dll_path, const std::filesystem::path& db_path)
|
|
||||||
: SqliteDB(infra_dll_path) {
|
|
||||||
int rc{-1};
|
int rc{-1};
|
||||||
if (!IsInfraOk()) {
|
if (!g_init_sqlite_ok) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
Open(db_path);
|
auto db_path_u8 = db_path.generic_u8string();
|
||||||
|
rc = sqlite3_open_v2(reinterpret_cast<const char*>(db_path_u8.c_str()), &db_, SQLITE_OPEN_READONLY, nullptr);
|
||||||
|
if (rc != SQLITE_OK) {
|
||||||
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
kgm_ekey_db_t KugouDb::dump_ekey(int& error) {
|
rc = sqlite3_key(db_, "7777B48756BA491BB4CEE771A3E2727E", 0x20);
|
||||||
if (!IsOpen()) {
|
if (rc != SQLITE_OK) {
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
ok_ = true;
|
||||||
|
}
|
||||||
|
|
||||||
|
kgm_ekey_db_t SQLite::dump_ekey(int& error) {
|
||||||
|
if (ok_ == false) {
|
||||||
error = SQLITE_ERROR;
|
error = SQLITE_ERROR;
|
||||||
return {};
|
return {};
|
||||||
}
|
}
|
||||||
@ -98,7 +64,7 @@ kgm_ekey_db_t KugouDb::dump_ekey(int& error) {
|
|||||||
int rc{-1};
|
int rc{-1};
|
||||||
sqlite3_stmt* stmt{nullptr};
|
sqlite3_stmt* stmt{nullptr};
|
||||||
|
|
||||||
rc = sqlite3_prepare_v2_(db_,
|
rc = sqlite3_prepare_v2(db_,
|
||||||
"select EncryptionKeyId, EncryptionKey from ShareFileItems"
|
"select EncryptionKeyId, EncryptionKey from ShareFileItems"
|
||||||
" where EncryptionKey != ''",
|
" where EncryptionKey != ''",
|
||||||
-1, &stmt, nullptr);
|
-1, &stmt, nullptr);
|
||||||
@ -108,9 +74,9 @@ kgm_ekey_db_t KugouDb::dump_ekey(int& error) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
kgm_ekey_db_t result{};
|
kgm_ekey_db_t result{};
|
||||||
while ((rc = sqlite3_step_(stmt)) == SQLITE_ROW) {
|
while ((rc = sqlite3_step(stmt)) == SQLITE_ROW) {
|
||||||
const auto* ekey_id = reinterpret_cast<const char*>(sqlite3_column_text_(stmt, 0));
|
const auto* ekey_id = reinterpret_cast<const char*>(sqlite3_column_text(stmt, 0));
|
||||||
const auto* ekey = reinterpret_cast<const char*>(sqlite3_column_text_(stmt, 1));
|
const auto* ekey = reinterpret_cast<const char*>(sqlite3_column_text(stmt, 1));
|
||||||
result[ekey_id] = ekey;
|
result[ekey_id] = ekey;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -118,20 +84,16 @@ kgm_ekey_db_t KugouDb::dump_ekey(int& error) {
|
|||||||
error = rc;
|
error = rc;
|
||||||
}
|
}
|
||||||
|
|
||||||
sqlite3_finalize_(stmt);
|
sqlite3_finalize(stmt);
|
||||||
error = 0;
|
error = 0;
|
||||||
return result;
|
return result;
|
||||||
}
|
}
|
||||||
|
|
||||||
KugouDb::~KugouDb() {
|
SQLite::~SQLite() {
|
||||||
if (db_ != nullptr) {
|
if (db_ != nullptr) {
|
||||||
sqlite3_close_v2_(db_);
|
sqlite3_close_v2(db_);
|
||||||
db_ = nullptr;
|
db_ = nullptr;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
bool KugouDb::Open(const std::filesystem::path& db_path) {
|
|
||||||
return SqliteDB::Open(db_path, {"7777B48756BA491BB4CEE771A3E2727E"});
|
|
||||||
}
|
|
||||||
|
|
||||||
} // namespace Infra
|
} // namespace Infra
|
||||||
|
@ -4,46 +4,23 @@
|
|||||||
#include <unordered_map>
|
#include <unordered_map>
|
||||||
|
|
||||||
#include "sqlite_base.h"
|
#include "sqlite_base.h"
|
||||||
#include "sqlite_fn.h"
|
|
||||||
|
|
||||||
namespace Infra {
|
namespace Infra {
|
||||||
|
|
||||||
typedef std::unordered_map<std::string, std::string> kgm_ekey_db_t;
|
typedef std::unordered_map<std::string, std::string> kgm_ekey_db_t;
|
||||||
extern bool g_init_sqlite_ok;
|
extern bool g_init_sqlite_ok;
|
||||||
|
|
||||||
class SqliteDB {
|
class SQLite {
|
||||||
public:
|
public:
|
||||||
explicit SqliteDB(const std::filesystem::path& infra_dll_path);
|
explicit SQLite(const std::filesystem::path& db_path);
|
||||||
bool Open(const std::filesystem::path& db_path, std::string_view key);
|
~SQLite();
|
||||||
void Close();
|
|
||||||
[[nodiscard]] bool IsInfraOk() const { return ok_; }
|
[[nodiscard]] bool is_ok() const { return ok_; }
|
||||||
[[nodiscard]] bool IsOpen() const { return db_ != nullptr; }
|
kgm_ekey_db_t dump_ekey(int& error);
|
||||||
|
|
||||||
private:
|
private:
|
||||||
bool InitInfraDll(const std::filesystem::path& infra_dll_path);
|
bool ok_ = false;
|
||||||
bool ok_{false};
|
|
||||||
|
|
||||||
protected:
|
|
||||||
void FreeInfraDll();
|
|
||||||
|
|
||||||
void* infra_{nullptr};
|
|
||||||
sqlite3_open_v2_t sqlite3_open_v2_{nullptr};
|
|
||||||
sqlite3_key_t sqlite3_key_{nullptr};
|
|
||||||
sqlite3_prepare_v2_t sqlite3_prepare_v2_{nullptr};
|
|
||||||
sqlite3_step_t sqlite3_step_{nullptr};
|
|
||||||
sqlite3_column_text_t sqlite3_column_text_{nullptr};
|
|
||||||
sqlite3_close_v2_t sqlite3_close_v2_{nullptr};
|
|
||||||
sqlite3_finalize_t sqlite3_finalize_{nullptr};
|
|
||||||
sqlite3* db_{nullptr};
|
sqlite3* db_{nullptr};
|
||||||
};
|
};
|
||||||
|
|
||||||
class KugouDb : public SqliteDB {
|
|
||||||
public:
|
|
||||||
explicit KugouDb(const std::filesystem::path& infra_dll_path, const std::filesystem::path& db_path);
|
|
||||||
~KugouDb();
|
|
||||||
|
|
||||||
bool Open(const std::filesystem::path& db_path);
|
|
||||||
kgm_ekey_db_t dump_ekey(int& error);
|
|
||||||
};
|
|
||||||
|
|
||||||
} // namespace Infra
|
} // namespace Infra
|
||||||
|
171
src/jobs.hpp
171
src/jobs.hpp
@ -1,171 +0,0 @@
|
|||||||
#pragma once
|
|
||||||
#include <windows.h>
|
|
||||||
|
|
||||||
#include <array>
|
|
||||||
#include <filesystem>
|
|
||||||
#include <fstream>
|
|
||||||
#include <mutex>
|
|
||||||
#include <queue>
|
|
||||||
#include <string>
|
|
||||||
#include <string_view>
|
|
||||||
#include <utility>
|
|
||||||
#include <vector>
|
|
||||||
|
|
||||||
#include "qmc2/qmc2.h"
|
|
||||||
|
|
||||||
class KggTask {
|
|
||||||
public:
|
|
||||||
explicit KggTask(std::filesystem::path kgg_path, std::filesystem::path out_dir)
|
|
||||||
: kgg_path_(std::move(kgg_path)), out_dir_(std::move(out_dir)) {}
|
|
||||||
|
|
||||||
void warning(const wchar_t* msg) const { fwprintf(stderr, L"[WARN] %s (%s)\n", msg, kgg_path_.filename().c_str()); }
|
|
||||||
void warning(const std::wstring& msg) const { warning(msg.c_str()); }
|
|
||||||
|
|
||||||
void error(const wchar_t* msg) const { fwprintf(stderr, L"[ERR ] %s (%s)\n", msg, kgg_path_.filename().c_str()); }
|
|
||||||
void error(const std::wstring& msg) const { error(msg.c_str()); }
|
|
||||||
|
|
||||||
void info(const wchar_t* msg) const { fwprintf(stderr, L"[INFO] %s (%s)\n", msg, kgg_path_.filename().c_str()); }
|
|
||||||
void info(const std::wstring& msg) const { info(msg.c_str()); }
|
|
||||||
|
|
||||||
void Execute(const Infra::kgm_ekey_db_t& ekey_db) {
|
|
||||||
constexpr static std::array<uint8_t, 16> kMagicHeader{0x7C, 0xD5, 0x32, 0xEB, 0x86, 0x02, 0x7F, 0x4B,
|
|
||||||
0xA8, 0xAF, 0xA6, 0x8E, 0x0F, 0xFF, 0x99, 0x14};
|
|
||||||
|
|
||||||
std::ifstream kgg_stream_in(kgg_path_, std::ios::binary);
|
|
||||||
char header[0x100]{};
|
|
||||||
kgg_stream_in.read(header, sizeof(kgg_stream_in));
|
|
||||||
if (std::equal(kMagicHeader.cbegin(), kMagicHeader.cend(), header)) {
|
|
||||||
warning(L"invalid kgg header");
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
uint32_t offset_to_audio = *reinterpret_cast<uint32_t*>(&header[0x10]);
|
|
||||||
uint32_t encrypt_mode = *reinterpret_cast<uint32_t*>(&header[0x14]);
|
|
||||||
if (encrypt_mode != 5) {
|
|
||||||
warning(std::format(L"unsupported enc_version (expect=0x05, got 0x{:02x})", encrypt_mode));
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
uint32_t audio_hash_len = *reinterpret_cast<uint32_t*>(&header[0x44]);
|
|
||||||
if (audio_hash_len != 0x20) {
|
|
||||||
warning(std::format(L"audio hash length invalid (expect=0x20, got 0x{:02x})", audio_hash_len));
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
std::string audio_hash(&header[0x48], &header[0x48 + audio_hash_len]);
|
|
||||||
std::string ekey{};
|
|
||||||
if (auto it = ekey_db.find(audio_hash); it != ekey_db.end()) {
|
|
||||||
ekey = it->second;
|
|
||||||
} else {
|
|
||||||
warning(L"ekey not found");
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
|
|
||||||
auto qmc2 = QMC2::Create(ekey);
|
|
||||||
|
|
||||||
std::string magic(4, 0);
|
|
||||||
kgg_stream_in.seekg(offset_to_audio, std::ios::beg);
|
|
||||||
kgg_stream_in.read(magic.data(), 4);
|
|
||||||
qmc2->Decrypt(std::span(reinterpret_cast<uint8_t*>(magic.data()), 4), 0);
|
|
||||||
auto real_ext = DetectRealExt(magic);
|
|
||||||
auto out_path = out_dir_ / std::format(L"{}_kgg-dec.{}", kgg_path_.stem().wstring(), real_ext);
|
|
||||||
|
|
||||||
if (exists(out_path)) {
|
|
||||||
warning(std::format(L"output file already exists: {}", out_path.filename().wstring()));
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
|
|
||||||
kgg_stream_in.seekg(offset_to_audio, std::ios::beg);
|
|
||||||
std::ofstream ofs_decrypted(out_path, std::ios::binary);
|
|
||||||
if (!ofs_decrypted.is_open()) {
|
|
||||||
error(L"failed to open output file");
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
|
|
||||||
size_t offset{0};
|
|
||||||
thread_local std::vector<uint8_t> temp_buffer(1024 * 1024, 0);
|
|
||||||
auto buf_signed = std::span(reinterpret_cast<char*>(temp_buffer.data()), temp_buffer.size());
|
|
||||||
auto buf_unsigned = std::span(temp_buffer);
|
|
||||||
|
|
||||||
while (!kgg_stream_in.eof()) {
|
|
||||||
kgg_stream_in.read(buf_signed.data(), buf_signed.size());
|
|
||||||
const auto n = static_cast<size_t>(kgg_stream_in.gcount());
|
|
||||||
qmc2->Decrypt(buf_unsigned.subspan(0, n), offset);
|
|
||||||
ofs_decrypted.write(buf_signed.data(), n);
|
|
||||||
offset += n;
|
|
||||||
}
|
|
||||||
|
|
||||||
info(std::format(L"** OK ** -> {}", out_path.filename().wstring()));
|
|
||||||
}
|
|
||||||
|
|
||||||
private:
|
|
||||||
std::filesystem::path kgg_path_;
|
|
||||||
std::filesystem::path out_dir_;
|
|
||||||
|
|
||||||
static const wchar_t* DetectRealExt(std::string_view magic) {
|
|
||||||
if (magic == "fLaC") {
|
|
||||||
return L"flac";
|
|
||||||
}
|
|
||||||
if (magic == "OggS") {
|
|
||||||
return L"ogg";
|
|
||||||
}
|
|
||||||
return L"mp3";
|
|
||||||
}
|
|
||||||
};
|
|
||||||
|
|
||||||
class KggTaskQueue {
|
|
||||||
public:
|
|
||||||
explicit KggTaskQueue(Infra::kgm_ekey_db_t ekey_db) : ekey_db_(std::move(ekey_db)) {}
|
|
||||||
|
|
||||||
void Push(std::unique_ptr<KggTask> task) {
|
|
||||||
std::lock_guard lock(mutex_);
|
|
||||||
tasks_.push(std::move(task));
|
|
||||||
signal_.notify_one();
|
|
||||||
}
|
|
||||||
|
|
||||||
std::unique_ptr<KggTask> Pop() {
|
|
||||||
std::unique_lock lock(mutex_);
|
|
||||||
signal_.wait(lock, [this] { return !tasks_.empty() || thread_end_; });
|
|
||||||
if (tasks_.empty()) {
|
|
||||||
return {};
|
|
||||||
}
|
|
||||||
|
|
||||||
auto task = std::move(tasks_.front());
|
|
||||||
tasks_.pop();
|
|
||||||
return task;
|
|
||||||
}
|
|
||||||
|
|
||||||
[[nodiscard]] bool Finished() {
|
|
||||||
std::lock_guard lock(mutex_);
|
|
||||||
return tasks_.empty();
|
|
||||||
}
|
|
||||||
|
|
||||||
void AddWorkerThread() { threads_.emplace(&KggTaskQueue::WorkerThreadBody, this); }
|
|
||||||
|
|
||||||
void Join() {
|
|
||||||
thread_end_ = true;
|
|
||||||
signal_.notify_all();
|
|
||||||
|
|
||||||
for (int i = 1; !threads_.empty(); i++) {
|
|
||||||
threads_.front().join();
|
|
||||||
threads_.pop();
|
|
||||||
#ifndef NDEBUG
|
|
||||||
fprintf(stderr, "[INFO] thread %d joined\n", i);
|
|
||||||
#endif
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
private:
|
|
||||||
bool thread_end_{false};
|
|
||||||
Infra::kgm_ekey_db_t ekey_db_;
|
|
||||||
void WorkerThreadBody() {
|
|
||||||
SetThreadPriority(GetCurrentThread(), THREAD_PRIORITY_BELOW_NORMAL);
|
|
||||||
|
|
||||||
std::unique_ptr<KggTask> task{nullptr};
|
|
||||||
while ((task = Pop())) {
|
|
||||||
task->Execute(ekey_db_);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
std::mutex mutex_{};
|
|
||||||
std::condition_variable signal_;
|
|
||||||
std::queue<std::unique_ptr<KggTask>> tasks_{};
|
|
||||||
std::queue<std::thread> threads_{};
|
|
||||||
};
|
|
211
src/main.cpp
211
src/main.cpp
@ -1,8 +1,3 @@
|
|||||||
#include "infra/infra.h"
|
|
||||||
#include "infra/sqlite_error.h"
|
|
||||||
#include "jobs.hpp"
|
|
||||||
#include "qmc2/qmc2.h"
|
|
||||||
|
|
||||||
// clang-format off
|
// clang-format off
|
||||||
#include <windows.h>
|
#include <windows.h>
|
||||||
#include <shlobj.h>
|
#include <shlobj.h>
|
||||||
@ -10,126 +5,119 @@
|
|||||||
#include <knownfolders.h>
|
#include <knownfolders.h>
|
||||||
// clang-format on
|
// clang-format on
|
||||||
|
|
||||||
#include <algorithm>
|
|
||||||
#include <cstdint>
|
#include <cstdint>
|
||||||
#include <cstdio>
|
#include <cstdio>
|
||||||
|
#include <cstring>
|
||||||
#include <filesystem>
|
#include <filesystem>
|
||||||
#include <fstream>
|
#include <fstream>
|
||||||
#include <span>
|
#include <span>
|
||||||
#include <utility>
|
|
||||||
|
#include "infra/infra.h"
|
||||||
|
#include "infra/sqlite_error.h"
|
||||||
|
#include "qmc2/qmc2.h"
|
||||||
|
|
||||||
using Infra::kgm_ekey_db_t;
|
using Infra::kgm_ekey_db_t;
|
||||||
|
|
||||||
void WalkFileOrDir(KggTaskQueue& queue, const std::filesystem::path& input_path, bool scan_all_exts) {
|
constexpr std::array<uint8_t, 16> kMagicHeader{0x7C, 0xD5, 0x32, 0xEB, 0x86, 0x02, 0x7F, 0x4B,
|
||||||
std::queue<std::filesystem::path> file_queue;
|
0xA8, 0xAF, 0xA6, 0x8E, 0x0F, 0xFF, 0x99, 0x14};
|
||||||
file_queue.push(absolute(input_path));
|
|
||||||
|
|
||||||
while (!file_queue.empty()) {
|
void DecryptKGG(const kgm_ekey_db_t& ekey_db, const std::filesystem::path& kgg_file) {
|
||||||
auto target_path = std::move(file_queue.front());
|
auto kgg_fname = kgg_file.filename().wstring();
|
||||||
file_queue.pop();
|
fwprintf(stderr, L"[INFO] reading %s...\n", kgg_fname.c_str());
|
||||||
|
|
||||||
if (is_regular_file(target_path)) {
|
std::ifstream ifs_kgg(kgg_file, std::ios::binary);
|
||||||
if (!scan_all_exts && target_path.extension() != L".kgg") {
|
char header[0x100]{};
|
||||||
continue;
|
ifs_kgg.read(header, sizeof(ifs_kgg));
|
||||||
|
if (std::equal(kMagicHeader.cbegin(), kMagicHeader.cend(), header)) {
|
||||||
|
fprintf(stderr, "[WARN] invalid kgg header, skip.\n");
|
||||||
|
return;
|
||||||
}
|
}
|
||||||
|
uint32_t offset_to_audio = *reinterpret_cast<uint32_t*>(&header[0x10]);
|
||||||
queue.Push(std::make_unique<KggTask>(target_path, target_path.parent_path()));
|
uint32_t encrypt_mode = *reinterpret_cast<uint32_t*>(&header[0x14]);
|
||||||
continue;
|
if (encrypt_mode != 5) {
|
||||||
|
fprintf(stderr, "[WARN] invalid enc_version (expect=0x05, got 0x%02x), skip.\n", encrypt_mode);
|
||||||
|
return;
|
||||||
}
|
}
|
||||||
|
uint32_t audio_hash_len = *reinterpret_cast<uint32_t*>(&header[0x44]);
|
||||||
if (is_directory(target_path)) {
|
if (audio_hash_len != 0x20) {
|
||||||
for (auto const& dir_entry : std::filesystem::directory_iterator{target_path}) {
|
fprintf(stderr, "[WARN] audio hash length invalid (expect=0x20, got 0x%02x), skip.\n", audio_hash_len);
|
||||||
file_queue.push(dir_entry.path());
|
return;
|
||||||
}
|
}
|
||||||
continue;
|
std::string audio_hash(&header[0x48], &header[0x48 + audio_hash_len]);
|
||||||
}
|
std::string ekey{};
|
||||||
|
if (auto it = ekey_db.find(audio_hash); it != ekey_db.end()) {
|
||||||
fwprintf(stderr, L"[WARN] invalid path: %s\n", target_path.c_str());
|
ekey = it->second;
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
std::pair<std::vector<std::wstring>, std::unordered_map<std::wstring, std::wstring>> ParseCommandLine() {
|
|
||||||
int argc;
|
|
||||||
wchar_t** argv = CommandLineToArgvW(GetCommandLineW(), &argc);
|
|
||||||
|
|
||||||
std::vector<std::wstring> positional_args{};
|
|
||||||
std::unordered_map<std::wstring, std::wstring> named_args{};
|
|
||||||
|
|
||||||
bool positional_only{false};
|
|
||||||
for (int i = 1; i < argc; i++) {
|
|
||||||
std::wstring arg{argv[i]};
|
|
||||||
if (arg == L"--") {
|
|
||||||
positional_only = true;
|
|
||||||
continue;
|
|
||||||
}
|
|
||||||
|
|
||||||
if (!positional_only && arg.starts_with(L"--")) {
|
|
||||||
auto pos = arg.find(L'=');
|
|
||||||
if (pos != std::wstring::npos) {
|
|
||||||
named_args[arg.substr(2, pos - 2)] = arg.substr(pos + 1);
|
|
||||||
} else if (++i < argc) {
|
|
||||||
named_args[arg.substr(2)] = argv[i];
|
|
||||||
} else {
|
} else {
|
||||||
named_args[arg.substr(2)] = L"";
|
fprintf(stderr, "[WARN] ekey not found, skip.\n");
|
||||||
}
|
return;
|
||||||
} else {
|
|
||||||
positional_args.push_back(arg);
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
return std::make_pair(positional_args, named_args);
|
auto qmc2 = QMC2::Create(ekey);
|
||||||
|
if (!qmc2) {
|
||||||
|
fprintf(stderr, "[WARN] create qmc2 failed, skip.\n");
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
ifs_kgg.seekg(offset_to_audio, std::ios::beg);
|
||||||
|
std::vector<uint8_t> buffer(1024 * 1024);
|
||||||
|
ifs_kgg.read(reinterpret_cast<char*>(buffer.data()), buffer.size());
|
||||||
|
auto n = static_cast<size_t>(ifs_kgg.gcount());
|
||||||
|
qmc2->Decrypt(std::span(buffer.begin(), n), 0);
|
||||||
|
|
||||||
|
auto decrypted_path = kgg_file;
|
||||||
|
auto magic = std::span(buffer.cbegin(), 4);
|
||||||
|
if (std::equal(magic.begin(), magic.end(), "fLaC")) {
|
||||||
|
decrypted_path.replace_filename(decrypted_path.stem().wstring() + L"_kgg-dec.flac");
|
||||||
|
} else if (std::equal(magic.begin(), magic.end(), "OggS")) {
|
||||||
|
decrypted_path.replace_filename(decrypted_path.stem().wstring() + L"_kgg-dec.ogg");
|
||||||
|
} else {
|
||||||
|
decrypted_path.replace_filename(decrypted_path.stem().wstring() + L"_kgg-dec.mp3");
|
||||||
|
}
|
||||||
|
if (exists(decrypted_path)) {
|
||||||
|
fprintf(stderr, "[WARN] output file '%s' exists, skip.\n", decrypted_path.filename().string().c_str());
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
std::ofstream ofs_decrypted(decrypted_path, std::ios::binary);
|
||||||
|
ofs_decrypted.write(reinterpret_cast<char*>(buffer.data()), n);
|
||||||
|
size_t offset{n};
|
||||||
|
while (!ifs_kgg.eof()) {
|
||||||
|
ifs_kgg.read(reinterpret_cast<char*>(buffer.data()), buffer.size());
|
||||||
|
n = static_cast<size_t>(ifs_kgg.gcount());
|
||||||
|
qmc2->Decrypt(std::span(buffer.begin(), n), offset);
|
||||||
|
ofs_decrypted.write(reinterpret_cast<char*>(buffer.data()), n);
|
||||||
|
offset += n;
|
||||||
|
}
|
||||||
|
|
||||||
|
auto decrypted_fname = decrypted_path.filename().wstring();
|
||||||
|
fwprintf(stderr, L"[INFO] OK! kgg --> %s\n", decrypted_fname.c_str());
|
||||||
|
}
|
||||||
|
|
||||||
|
void WalkFileOrDir(const kgm_ekey_db_t& ekey_db, const std::filesystem::path& input_path) {
|
||||||
|
if (is_directory(input_path)) {
|
||||||
|
for (auto const& dir_entry : std::filesystem::directory_iterator{input_path}) {
|
||||||
|
DecryptKGG(ekey_db, dir_entry.path());
|
||||||
|
}
|
||||||
|
} else if (is_regular_file(input_path)) {
|
||||||
|
DecryptKGG(ekey_db, input_path);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
int main() {
|
int main() {
|
||||||
SetConsoleOutputCP(CP_UTF8);
|
SetConsoleOutputCP(CP_UTF8);
|
||||||
setlocale(LC_ALL, ".UTF8");
|
setlocale(LC_ALL, ".UTF8");
|
||||||
|
|
||||||
fprintf(stderr, "kgg-dec v" KGGDEC_PROJECT_VERSION " by LSR\n");
|
fputs("kgg-dec v0.1 by LSR\n", stderr);
|
||||||
fputs(
|
fputs("Usage: kgg-dec [kgg-dir=.]\n\n", stderr);
|
||||||
"Usage: kgg-dec "
|
|
||||||
"[--infra-dll infra.dll] "
|
|
||||||
"[--scan-all-file-ext 0] "
|
|
||||||
"[--db /path/to/KGMusicV3.db] "
|
|
||||||
"[--] [kgg-dir... = '.']\n\n",
|
|
||||||
stderr);
|
|
||||||
|
|
||||||
auto [positional_args, named_args] = ParseCommandLine();
|
|
||||||
if (positional_args.empty()) {
|
|
||||||
positional_args.emplace_back(L".");
|
|
||||||
}
|
|
||||||
|
|
||||||
std::filesystem::path kgm_db_path{};
|
|
||||||
std::filesystem::path infra_dll_path{L"infra.dll"};
|
|
||||||
if (auto it = named_args.find(L"infra-dll"); it != named_args.end()) {
|
|
||||||
infra_dll_path = std::filesystem::path{it->second};
|
|
||||||
}
|
|
||||||
infra_dll_path = absolute(infra_dll_path);
|
|
||||||
if (!exists(infra_dll_path)) {
|
|
||||||
fputs("[ERR ] infra.dll not found\n", stderr);
|
|
||||||
return 1;
|
|
||||||
}
|
|
||||||
|
|
||||||
bool scan_all_exts{false};
|
|
||||||
if (auto it = named_args.find(L"scan-all-file-ext"); it != named_args.end()) {
|
|
||||||
scan_all_exts = it->second == L"1";
|
|
||||||
}
|
|
||||||
|
|
||||||
if (auto it = named_args.find(L"db"); it != named_args.end()) {
|
|
||||||
kgm_db_path = std::filesystem::path{it->second};
|
|
||||||
} else {
|
|
||||||
PWSTR pAppDirPath{};
|
PWSTR pAppDirPath{};
|
||||||
SHGetKnownFolderPath(FOLDERID_RoamingAppData, 0, nullptr, &pAppDirPath);
|
SHGetKnownFolderPath(FOLDERID_RoamingAppData, 0, nullptr, &pAppDirPath);
|
||||||
kgm_db_path = std::filesystem::path{pAppDirPath} / L"Kugou8" / L"KGMusicV3.db";
|
std::filesystem::path kgmPath{pAppDirPath};
|
||||||
CoTaskMemFree(pAppDirPath);
|
CoTaskMemFree(pAppDirPath);
|
||||||
}
|
kgmPath = kgmPath / L"Kugou8" / L"KGMusicV3.db";
|
||||||
if (!exists(kgm_db_path)) {
|
|
||||||
fputs("[ERR ] KGMusicV3.db not found\n", stderr);
|
|
||||||
return 1;
|
|
||||||
}
|
|
||||||
|
|
||||||
int error{-1};
|
int error{-1};
|
||||||
Infra::KugouDb db{infra_dll_path, kgm_db_path};
|
Infra::SQLite db{kgmPath};
|
||||||
if (!db.IsOpen()) {
|
if (!db.is_ok()) {
|
||||||
fprintf(stderr, "[ERR ] db init error: is infra.dll ok?\n");
|
fprintf(stderr, "[ERR ] db init error: is infra.dll ok?\n");
|
||||||
return 1;
|
return 1;
|
||||||
}
|
}
|
||||||
@ -138,31 +126,20 @@ int main() {
|
|||||||
fprintf(stderr, "[ERR ] dump ekey failed %d (%s)", error, sqlite_get_error(error));
|
fprintf(stderr, "[ERR ] dump ekey failed %d (%s)", error, sqlite_get_error(error));
|
||||||
return 1;
|
return 1;
|
||||||
}
|
}
|
||||||
db.Close();
|
|
||||||
|
|
||||||
#ifndef NDEBUG
|
#ifdef _DEBUG
|
||||||
fprintf(stderr, "ekey_db:\n");
|
printf("ekey_db:\n");
|
||||||
for (auto& [a, b] : ekey_db) {
|
for (auto& [a, b] : ekey_db) {
|
||||||
fprintf(stderr, "%s --> %s\n", a.c_str(), b.c_str());
|
printf("%s --> %s\n", a.c_str(), b.c_str());
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
KggTaskQueue queue(ekey_db);
|
int argc;
|
||||||
auto thread_count =
|
wchar_t** argv = CommandLineToArgvW(GetCommandLineW(), &argc);
|
||||||
#ifndef NDEBUG
|
|
||||||
1;
|
|
||||||
#else
|
|
||||||
std::max(static_cast<int>(std::thread::hardware_concurrency()) - 2, 2);
|
|
||||||
#endif
|
|
||||||
|
|
||||||
for (int i = 0; i < thread_count; i++) {
|
std::filesystem::path input_dir{(argc < 2) ? L"." : argv[1]};
|
||||||
queue.AddWorkerThread();
|
input_dir = absolute(input_dir);
|
||||||
}
|
WalkFileOrDir(ekey_db, input_dir);
|
||||||
|
|
||||||
for (auto& positional_arg : positional_args) {
|
|
||||||
WalkFileOrDir(queue, positional_arg, scan_all_exts);
|
|
||||||
}
|
|
||||||
queue.Join();
|
|
||||||
|
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
@ -11,10 +11,10 @@ namespace QMC2 {
|
|||||||
|
|
||||||
class QMC2_Base {
|
class QMC2_Base {
|
||||||
public:
|
public:
|
||||||
QMC2_Base() = default;
|
QMC2_Base(){};
|
||||||
virtual ~QMC2_Base() = default;
|
virtual ~QMC2_Base() = default;
|
||||||
|
|
||||||
virtual void Decrypt(std::span<uint8_t> data, size_t offset) const = 0;
|
virtual void Decrypt(std::span<uint8_t> data, size_t offset) = 0;
|
||||||
};
|
};
|
||||||
|
|
||||||
constexpr size_t kMapIndexOffset = 71214;
|
constexpr size_t kMapIndexOffset = 71214;
|
||||||
@ -24,7 +24,7 @@ class QMC2_MAP : public QMC2_Base {
|
|||||||
public:
|
public:
|
||||||
explicit QMC2_MAP(std::span<uint8_t> key);
|
explicit QMC2_MAP(std::span<uint8_t> key);
|
||||||
|
|
||||||
void Decrypt(std::span<uint8_t> data, size_t offset) const override;
|
void Decrypt(std::span<uint8_t> data, size_t offset) override;
|
||||||
|
|
||||||
private:
|
private:
|
||||||
std::array<uint8_t, kMapKeySize> key_{};
|
std::array<uint8_t, kMapKeySize> key_{};
|
||||||
@ -38,15 +38,15 @@ class QMC2_RC4 : public QMC2_Base {
|
|||||||
public:
|
public:
|
||||||
explicit QMC2_RC4(std::span<uint8_t> key);
|
explicit QMC2_RC4(std::span<uint8_t> key);
|
||||||
|
|
||||||
void Decrypt(std::span<uint8_t> data, size_t offset) const override;
|
void Decrypt(std::span<uint8_t> data, size_t offset) override;
|
||||||
|
|
||||||
private:
|
private:
|
||||||
std::vector<uint8_t> key_{};
|
std::vector<uint8_t> key_{};
|
||||||
double hash_{0};
|
double hash_{0};
|
||||||
std::array<uint8_t, kRC4StreamSize> key_stream_{};
|
std::array<uint8_t, kRC4StreamSize> key_stream_{};
|
||||||
|
|
||||||
[[nodiscard]] size_t DecryptFirstSegment(std::span<uint8_t> data, size_t offset) const;
|
size_t DecryptFirstSegment(std::span<uint8_t> data, size_t offset);
|
||||||
[[nodiscard]] size_t DecryptOtherSegment(std::span<uint8_t> data, size_t offset) const;
|
size_t DecryptOtherSegment(std::span<uint8_t> data, size_t offset);
|
||||||
};
|
};
|
||||||
|
|
||||||
std::unique_ptr<QMC2_Base> Create(std::string_view ekey);
|
std::unique_ptr<QMC2_Base> Create(std::string_view ekey);
|
||||||
|
@ -13,7 +13,7 @@ QMC2_MAP::QMC2_MAP(std::span<uint8_t> key) {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
void QMC2_MAP::Decrypt(std::span<uint8_t> data, size_t offset) const {
|
void QMC2_MAP::Decrypt(std::span<uint8_t> data, size_t offset) {
|
||||||
for (auto& it : data) {
|
for (auto& it : data) {
|
||||||
size_t idx = (offset <= kMapOffsetBoundary) ? offset : (offset % kMapOffsetBoundary);
|
size_t idx = (offset <= kMapOffsetBoundary) ? offset : (offset % kMapOffsetBoundary);
|
||||||
it ^= key_[idx % key_.size()];
|
it ^= key_[idx % key_.size()];
|
||||||
|
@ -14,7 +14,7 @@ inline double hash(const uint8_t* key, size_t len) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
// Overflow check.
|
// Overflow check.
|
||||||
uint32_t next_hash = hash * static_cast<uint32_t>(*key);
|
uint32_t next_hash = hash * (uint32_t)(*key);
|
||||||
if (next_hash <= hash) {
|
if (next_hash <= hash) {
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
@ -47,7 +47,7 @@ class RC4 {
|
|||||||
|
|
||||||
for (auto& it : buffer) {
|
for (auto& it : buffer) {
|
||||||
i = (i + 1) % n;
|
i = (i + 1) % n;
|
||||||
j = (j + s[i]) % n;
|
j = (j + (size_t)s[i]) % n;
|
||||||
std::swap(s[i], s[j]);
|
std::swap(s[i], s[j]);
|
||||||
|
|
||||||
const size_t final_idx = (s[i] + s[j]) % n;
|
const size_t final_idx = (s[i] + s[j]) % n;
|
||||||
@ -70,8 +70,8 @@ inline size_t get_segment_key(double key_hash, size_t segment_id, uint8_t seed)
|
|||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
const double result = key_hash / static_cast<double>(seed * (segment_id + 1)) * 100.0;
|
double result = key_hash / (double)(seed * (segment_id + 1)) * 100.0;
|
||||||
return static_cast<size_t>(result);
|
return (size_t)result;
|
||||||
}
|
}
|
||||||
|
|
||||||
QMC2_RC4::QMC2_RC4(std::span<uint8_t> key) {
|
QMC2_RC4::QMC2_RC4(std::span<uint8_t> key) {
|
||||||
@ -82,7 +82,7 @@ QMC2_RC4::QMC2_RC4(std::span<uint8_t> key) {
|
|||||||
rc4.Derive(std::span<uint8_t>(key_stream_));
|
rc4.Derive(std::span<uint8_t>(key_stream_));
|
||||||
}
|
}
|
||||||
|
|
||||||
void QMC2_RC4::Decrypt(std::span<uint8_t> data, size_t offset) const {
|
void QMC2_RC4::Decrypt(std::span<uint8_t> data, size_t offset) {
|
||||||
if (offset < kFirstSegmentSize) {
|
if (offset < kFirstSegmentSize) {
|
||||||
const auto n = DecryptFirstSegment(data, offset);
|
const auto n = DecryptFirstSegment(data, offset);
|
||||||
offset += n;
|
offset += n;
|
||||||
@ -96,7 +96,7 @@ void QMC2_RC4::Decrypt(std::span<uint8_t> data, size_t offset) const {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
size_t QMC2_RC4::DecryptFirstSegment(std::span<uint8_t> data, size_t offset) const {
|
size_t QMC2_RC4::DecryptFirstSegment(std::span<uint8_t> data, size_t offset) {
|
||||||
const uint8_t* key = key_.data();
|
const uint8_t* key = key_.data();
|
||||||
const size_t n = this->key_.size();
|
const size_t n = this->key_.size();
|
||||||
|
|
||||||
@ -109,7 +109,7 @@ size_t QMC2_RC4::DecryptFirstSegment(std::span<uint8_t> data, size_t offset) con
|
|||||||
return process_len;
|
return process_len;
|
||||||
}
|
}
|
||||||
|
|
||||||
size_t QMC2_RC4::DecryptOtherSegment(std::span<uint8_t> data, size_t offset) const {
|
size_t QMC2_RC4::DecryptOtherSegment(std::span<uint8_t> data, size_t offset) {
|
||||||
const size_t n = this->key_.size();
|
const size_t n = this->key_.size();
|
||||||
|
|
||||||
size_t segment_idx = offset / kOtherSegmentSize;
|
size_t segment_idx = offset / kOtherSegmentSize;
|
||||||
|
Loading…
Reference in New Issue
Block a user