├── pc-cleaner.vcxproj.filters ├── README.md ├── LICENSE.txt ├── pc-cleaner.sln ├── .gitattributes ├── pc-cleaner.vcxproj ├── .gitignore ├── Main.cpp └── color.h /pc-cleaner.vcxproj.filters: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | {8cf77124-bebc-471d-acac-8b9b1ffc2a66} 9 | 10 | 11 | 12 | 13 | 14 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # Pc-Cleaner 2 | 3 | # Features 4 | - Clean up temp windows files 5 | - Clean up temp app files 6 | - Remove 100% hardware usage 7 | - Remove windows defender and hidden system monitoring 8 | - Remove windows store 9 | - Clean up chrome cookie files 10 | - Remove windows updates 11 | - Enable seconds in clock 12 | - Fix for accessing administrative rules 13 | - Get information about the system 14 | - System file checker 15 | - Registry Checker 16 | # 17 | 18 | # How to use? 19 | 1. Write the number of the function you want to turn off 20 | 2. Wait for 1-5 seconds to apply changes 21 | 22 | ![App menu](https://i.imgur.com/R05x3ok.png) 23 | -------------------------------------------------------------------------------- /LICENSE.txt: -------------------------------------------------------------------------------- 1 | MIT License 2 | 3 | Copyright (c) [year] [fullname] 4 | 5 | Permission is hereby granted, free of charge, to any person obtaining a copy 6 | of this software and associated documentation files (the "Software"), to deal 7 | in the Software without restriction, including without limitation the rights 8 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 9 | copies of the Software, and to permit persons to whom the Software is 10 | furnished to do so, subject to the following conditions: 11 | 12 | The above copyright notice and this permission notice shall be included in all 13 | copies or substantial portions of the Software. 14 | 15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 16 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 17 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 18 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 19 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 20 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 21 | SOFTWARE. 22 | -------------------------------------------------------------------------------- /pc-cleaner.sln: -------------------------------------------------------------------------------- 1 | 2 | Microsoft Visual Studio Solution File, Format Version 12.00 3 | # Visual Studio Version 16 4 | VisualStudioVersion = 16.0.29306.81 5 | MinimumVisualStudioVersion = 10.0.40219.1 6 | Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "pc-cleaner", "pc-cleaner.vcxproj", "{82212CF7-C4EA-436C-ADD5-F7AD56122BF5}" 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 | {82212CF7-C4EA-436C-ADD5-F7AD56122BF5}.Debug|x64.ActiveCfg = Debug|x64 17 | {82212CF7-C4EA-436C-ADD5-F7AD56122BF5}.Debug|x64.Build.0 = Debug|x64 18 | {82212CF7-C4EA-436C-ADD5-F7AD56122BF5}.Debug|x86.ActiveCfg = Debug|Win32 19 | {82212CF7-C4EA-436C-ADD5-F7AD56122BF5}.Debug|x86.Build.0 = Debug|Win32 20 | {82212CF7-C4EA-436C-ADD5-F7AD56122BF5}.Release|x64.ActiveCfg = Release|x64 21 | {82212CF7-C4EA-436C-ADD5-F7AD56122BF5}.Release|x64.Build.0 = Release|x64 22 | {82212CF7-C4EA-436C-ADD5-F7AD56122BF5}.Release|x86.ActiveCfg = Release|Win32 23 | {82212CF7-C4EA-436C-ADD5-F7AD56122BF5}.Release|x86.Build.0 = Release|Win32 24 | EndGlobalSection 25 | GlobalSection(SolutionProperties) = preSolution 26 | HideSolutionNode = FALSE 27 | EndGlobalSection 28 | GlobalSection(ExtensibilityGlobals) = postSolution 29 | SolutionGuid = {5826AFD4-EB9D-4C95-99FE-FE8B482ABF46} 30 | EndGlobalSection 31 | EndGlobal 32 | -------------------------------------------------------------------------------- /.gitattributes: -------------------------------------------------------------------------------- 1 | ############################################################################### 2 | # Set default behavior to automatically normalize line endings. 3 | ############################################################################### 4 | * text=auto 5 | 6 | ############################################################################### 7 | # Set default behavior for command prompt diff. 8 | # 9 | # This is need for earlier builds of msysgit that does not have it on by 10 | # default for csharp files. 11 | # Note: This is only used by command line 12 | ############################################################################### 13 | #*.cs diff=csharp 14 | 15 | ############################################################################### 16 | # Set the merge driver for project and solution files 17 | # 18 | # Merging from the command prompt will add diff markers to the files if there 19 | # are conflicts (Merging from VS is not affected by the settings below, in VS 20 | # the diff markers are never inserted). Diff markers may cause the following 21 | # file extensions to fail to load in VS. An alternative would be to treat 22 | # these files as binary and thus will always conflict and require user 23 | # intervention with every merge. To do so, just uncomment the entries below 24 | ############################################################################### 25 | #*.sln merge=binary 26 | #*.csproj merge=binary 27 | #*.vbproj merge=binary 28 | #*.vcxproj merge=binary 29 | #*.vcproj merge=binary 30 | #*.dbproj merge=binary 31 | #*.fsproj merge=binary 32 | #*.lsproj merge=binary 33 | #*.wixproj merge=binary 34 | #*.modelproj merge=binary 35 | #*.sqlproj merge=binary 36 | #*.wwaproj merge=binary 37 | 38 | ############################################################################### 39 | # behavior for image files 40 | # 41 | # image files are treated as binary by default. 42 | ############################################################################### 43 | #*.jpg binary 44 | #*.png binary 45 | #*.gif binary 46 | 47 | ############################################################################### 48 | # diff behavior for common document formats 49 | # 50 | # Convert binary document formats to text before diffing them. This feature 51 | # is only available from the command line. Turn it on by uncommenting the 52 | # entries below. 53 | ############################################################################### 54 | #*.doc diff=astextplain 55 | #*.DOC diff=astextplain 56 | #*.docx diff=astextplain 57 | #*.DOCX diff=astextplain 58 | #*.dot diff=astextplain 59 | #*.DOT diff=astextplain 60 | #*.pdf diff=astextplain 61 | #*.PDF diff=astextplain 62 | #*.rtf diff=astextplain 63 | #*.RTF diff=astextplain 64 | -------------------------------------------------------------------------------- /pc-cleaner.vcxproj: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | Debug 6 | Win32 7 | 8 | 9 | Release 10 | Win32 11 | 12 | 13 | Debug 14 | x64 15 | 16 | 17 | Release 18 | x64 19 | 20 | 21 | 22 | 16.0 23 | {82212CF7-C4EA-436C-ADD5-F7AD56122BF5} 24 | ImGui Loader Base 25 | 10.0 26 | pc-cleaner 27 | 28 | 29 | 30 | Application 31 | true 32 | v143 33 | MultiByte 34 | 35 | 36 | Application 37 | false 38 | v143 39 | true 40 | MultiByte 41 | 42 | 43 | Application 44 | true 45 | v143 46 | MultiByte 47 | 48 | 49 | Application 50 | false 51 | v143 52 | true 53 | MultiByte 54 | 55 | 56 | 57 | 58 | 59 | 60 | 61 | 62 | 63 | 64 | 65 | 66 | 67 | 68 | 69 | 70 | 71 | 72 | 73 | 74 | 75 | 76 | Level3 77 | Disabled 78 | true 79 | true 80 | stdcpp20 81 | 82 | 83 | Console 84 | 85 | 86 | 87 | 88 | Level3 89 | Disabled 90 | true 91 | true 92 | 93 | 94 | Console 95 | 96 | 97 | 98 | 99 | Level3 100 | MaxSpeed 101 | true 102 | true 103 | true 104 | true 105 | stdcpp20 106 | 107 | 108 | Console 109 | true 110 | true 111 | false 112 | 113 | 114 | 115 | 116 | Level3 117 | MaxSpeed 118 | true 119 | true 120 | true 121 | true 122 | 123 | 124 | Console 125 | true 126 | true 127 | 128 | 129 | 130 | 131 | 132 | 133 | 134 | 135 | 136 | 137 | 138 | -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | ## Ignore Visual Studio temporary files, build results, and 2 | ## files generated by popular Visual Studio add-ons. 3 | ## 4 | ## Get latest from https://github.com/github/gitignore/blob/master/VisualStudio.gitignore 5 | 6 | # User-specific files 7 | *.rsuser 8 | *.suo 9 | *.user 10 | *.userosscache 11 | *.sln.docstates 12 | 13 | # User-specific files (MonoDevelop/Xamarin Studio) 14 | *.userprefs 15 | 16 | # Mono auto generated files 17 | mono_crash.* 18 | 19 | # Build results 20 | [Dd]ebug/ 21 | [Dd]ebugPublic/ 22 | [Rr]elease/ 23 | [Rr]eleases/ 24 | x64/ 25 | x86/ 26 | [Aa][Rr][Mm]/ 27 | [Aa][Rr][Mm]64/ 28 | bld/ 29 | [Bb]in/ 30 | [Oo]bj/ 31 | [Ll]og/ 32 | [Ll]ogs/ 33 | 34 | # Visual Studio 2015/2017 cache/options directory 35 | .vs/ 36 | # Uncomment if you have tasks that create the project's static files in wwwroot 37 | #wwwroot/ 38 | 39 | # Visual Studio 2017 auto generated files 40 | Generated\ Files/ 41 | 42 | # MSTest test Results 43 | [Tt]est[Rr]esult*/ 44 | [Bb]uild[Ll]og.* 45 | 46 | # NUnit 47 | *.VisualState.xml 48 | TestResult.xml 49 | nunit-*.xml 50 | 51 | # Build Results of an ATL Project 52 | [Dd]ebugPS/ 53 | [Rr]eleasePS/ 54 | dlldata.c 55 | 56 | # Benchmark Results 57 | BenchmarkDotNet.Artifacts/ 58 | 59 | # .NET Core 60 | project.lock.json 61 | project.fragment.lock.json 62 | artifacts/ 63 | 64 | # StyleCop 65 | StyleCopReport.xml 66 | 67 | # Files built by Visual Studio 68 | *_i.c 69 | *_p.c 70 | *_h.h 71 | *.ilk 72 | *.meta 73 | *.obj 74 | *.iobj 75 | *.pch 76 | *.pdb 77 | *.ipdb 78 | *.pgc 79 | *.pgd 80 | *.rsp 81 | *.sbr 82 | *.tlb 83 | *.tli 84 | *.tlh 85 | *.tmp 86 | *.tmp_proj 87 | *_wpftmp.csproj 88 | *.log 89 | *.vspscc 90 | *.vssscc 91 | .builds 92 | *.pidb 93 | *.svclog 94 | *.scc 95 | 96 | # Chutzpah Test files 97 | _Chutzpah* 98 | 99 | # Visual C++ cache files 100 | ipch/ 101 | *.aps 102 | *.ncb 103 | *.opendb 104 | *.opensdf 105 | *.sdf 106 | *.cachefile 107 | *.VC.db 108 | *.VC.VC.opendb 109 | 110 | # Visual Studio profiler 111 | *.psess 112 | *.vsp 113 | *.vspx 114 | *.sap 115 | 116 | # Visual Studio Trace Files 117 | *.e2e 118 | 119 | # TFS 2012 Local Workspace 120 | $tf/ 121 | 122 | # Guidance Automation Toolkit 123 | *.gpState 124 | 125 | # ReSharper is a .NET coding add-in 126 | _ReSharper*/ 127 | *.[Rr]e[Ss]harper 128 | *.DotSettings.user 129 | 130 | # TeamCity is a build add-in 131 | _TeamCity* 132 | 133 | # DotCover is a Code Coverage Tool 134 | *.dotCover 135 | 136 | # AxoCover is a Code Coverage Tool 137 | .axoCover/* 138 | !.axoCover/settings.json 139 | 140 | # Visual Studio code coverage results 141 | *.coverage 142 | *.coveragexml 143 | 144 | # NCrunch 145 | _NCrunch_* 146 | .*crunch*.local.xml 147 | nCrunchTemp_* 148 | 149 | # MightyMoose 150 | *.mm.* 151 | AutoTest.Net/ 152 | 153 | # Web workbench (sass) 154 | .sass-cache/ 155 | 156 | # Installshield output folder 157 | [Ee]xpress/ 158 | 159 | # DocProject is a documentation generator add-in 160 | DocProject/buildhelp/ 161 | DocProject/Help/*.HxT 162 | DocProject/Help/*.HxC 163 | DocProject/Help/*.hhc 164 | DocProject/Help/*.hhk 165 | DocProject/Help/*.hhp 166 | DocProject/Help/Html2 167 | DocProject/Help/html 168 | 169 | # Click-Once directory 170 | publish/ 171 | 172 | # Publish Web Output 173 | *.[Pp]ublish.xml 174 | *.azurePubxml 175 | # Note: Comment the next line if you want to checkin your web deploy settings, 176 | # but database connection strings (with potential passwords) will be unencrypted 177 | *.pubxml 178 | *.publishproj 179 | 180 | # Microsoft Azure Web App publish settings. Comment the next line if you want to 181 | # checkin your Azure Web App publish settings, but sensitive information contained 182 | # in these scripts will be unencrypted 183 | PublishScripts/ 184 | 185 | # NuGet Packages 186 | *.nupkg 187 | # NuGet Symbol Packages 188 | *.snupkg 189 | # The packages folder can be ignored because of Package Restore 190 | **/[Pp]ackages/* 191 | # except build/, which is used as an MSBuild target. 192 | !**/[Pp]ackages/build/ 193 | # Uncomment if necessary however generally it will be regenerated when needed 194 | #!**/[Pp]ackages/repositories.config 195 | # NuGet v3's project.json files produces more ignorable files 196 | *.nuget.props 197 | *.nuget.targets 198 | 199 | # Microsoft Azure Build Output 200 | csx/ 201 | *.build.csdef 202 | 203 | # Microsoft Azure Emulator 204 | ecf/ 205 | rcf/ 206 | 207 | # Windows Store app package directories and files 208 | AppPackages/ 209 | BundleArtifacts/ 210 | Package.StoreAssociation.xml 211 | _pkginfo.txt 212 | *.appx 213 | *.appxbundle 214 | *.appxupload 215 | 216 | # Visual Studio cache files 217 | # files ending in .cache can be ignored 218 | *.[Cc]ache 219 | # but keep track of directories ending in .cache 220 | !?*.[Cc]ache/ 221 | 222 | # Others 223 | ClientBin/ 224 | ~$* 225 | *~ 226 | *.dbmdl 227 | *.dbproj.schemaview 228 | *.jfm 229 | *.pfx 230 | *.publishsettings 231 | orleans.codegen.cs 232 | 233 | # Including strong name files can present a security risk 234 | # (https://github.com/github/gitignore/pull/2483#issue-259490424) 235 | #*.snk 236 | 237 | # Since there are multiple workflows, uncomment next line to ignore bower_components 238 | # (https://github.com/github/gitignore/pull/1529#issuecomment-104372622) 239 | #bower_components/ 240 | 241 | # RIA/Silverlight projects 242 | Generated_Code/ 243 | 244 | # Backup & report files from converting an old project file 245 | # to a newer Visual Studio version. Backup files are not needed, 246 | # because we have git ;-) 247 | _UpgradeReport_Files/ 248 | Backup*/ 249 | UpgradeLog*.XML 250 | UpgradeLog*.htm 251 | ServiceFabricBackup/ 252 | *.rptproj.bak 253 | 254 | # SQL Server files 255 | *.mdf 256 | *.ldf 257 | *.ndf 258 | 259 | # Business Intelligence projects 260 | *.rdl.data 261 | *.bim.layout 262 | *.bim_*.settings 263 | *.rptproj.rsuser 264 | *- [Bb]ackup.rdl 265 | *- [Bb]ackup ([0-9]).rdl 266 | *- [Bb]ackup ([0-9][0-9]).rdl 267 | 268 | # Microsoft Fakes 269 | FakesAssemblies/ 270 | 271 | # GhostDoc plugin setting file 272 | *.GhostDoc.xml 273 | 274 | # Node.js Tools for Visual Studio 275 | .ntvs_analysis.dat 276 | node_modules/ 277 | 278 | # Visual Studio 6 build log 279 | *.plg 280 | 281 | # Visual Studio 6 workspace options file 282 | *.opt 283 | 284 | # Visual Studio 6 auto-generated workspace file (contains which files were open etc.) 285 | *.vbw 286 | 287 | # Visual Studio LightSwitch build output 288 | **/*.HTMLClient/GeneratedArtifacts 289 | **/*.DesktopClient/GeneratedArtifacts 290 | **/*.DesktopClient/ModelManifest.xml 291 | **/*.Server/GeneratedArtifacts 292 | **/*.Server/ModelManifest.xml 293 | _Pvt_Extensions 294 | 295 | # Paket dependency manager 296 | .paket/paket.exe 297 | paket-files/ 298 | 299 | # FAKE - F# Make 300 | .fake/ 301 | 302 | # CodeRush personal settings 303 | .cr/personal 304 | 305 | # Python Tools for Visual Studio (PTVS) 306 | __pycache__/ 307 | *.pyc 308 | 309 | # Cake - Uncomment if you are using it 310 | # tools/** 311 | # !tools/packages.config 312 | 313 | # Tabs Studio 314 | *.tss 315 | 316 | # Telerik's JustMock configuration file 317 | *.jmconfig 318 | 319 | # BizTalk build output 320 | *.btp.cs 321 | *.btm.cs 322 | *.odx.cs 323 | *.xsd.cs 324 | 325 | # OpenCover UI analysis results 326 | OpenCover/ 327 | 328 | # Azure Stream Analytics local run output 329 | ASALocalRun/ 330 | 331 | # MSBuild Binary and Structured Log 332 | *.binlog 333 | 334 | # NVidia Nsight GPU debugger configuration file 335 | *.nvuser 336 | 337 | # MFractors (Xamarin productivity tool) working folder 338 | .mfractor/ 339 | 340 | # Local History for Visual Studio 341 | .localhistory/ 342 | 343 | # BeatPulse healthcheck temp database 344 | healthchecksdb 345 | 346 | # Backup folder for Package Reference Convert tool in Visual Studio 2017 347 | MigrationBackup/ 348 | 349 | # Ionide (cross platform F# VS Code tools) working folder 350 | .ionide/ 351 | -------------------------------------------------------------------------------- /Main.cpp: -------------------------------------------------------------------------------- 1 | #include 2 | #include 3 | #include "color.h" 4 | #include 5 | #include 6 | #include 7 | #include 8 | #include 9 | #include 10 | #pragma warning(disable : 4996) 11 | 12 | bool is_admin() 13 | { 14 | HANDLE token; 15 | if (OpenProcessToken(GetCurrentProcess(), TOKEN_QUERY, &token)) 16 | { 17 | TOKEN_ELEVATION elevation{}; 18 | DWORD size; 19 | 20 | if (GetTokenInformation(token, TokenElevation, &elevation, sizeof elevation, &size)) 21 | return elevation.TokenIsElevated; 22 | } 23 | return false; 24 | } 25 | 26 | BOOL __stdcall stop_dependent_services(const SC_HANDLE& schSCManager, const SC_HANDLE& schService) 27 | { 28 | DWORD bytes_needed; 29 | DWORD count; 30 | 31 | LPENUM_SERVICE_STATUS dependencies = nullptr; 32 | SERVICE_STATUS_PROCESS ssp{}; 33 | 34 | const DWORD start_time = GetTickCount(); 35 | 36 | // Pass a zero-length buffer to get the required buffer size. 37 | if (EnumDependentServices(schService, SERVICE_ACTIVE, 38 | dependencies, 0, &bytes_needed, &count)) 39 | { 40 | // If the Enum call succeeds, then there are no dependent 41 | // services, so do nothing. 42 | return TRUE; 43 | } 44 | 45 | if (GetLastError() != ERROR_MORE_DATA) 46 | return FALSE; // Unexpected error 47 | 48 | // Allocate a buffer for the dependencies. 49 | dependencies = static_cast(HeapAlloc( 50 | GetProcessHeap(), HEAP_ZERO_MEMORY, bytes_needed)); 51 | 52 | if (!dependencies) 53 | return FALSE; 54 | 55 | __try 56 | { 57 | // Enumerate the dependencies. 58 | if (!EnumDependentServices(schService, SERVICE_ACTIVE, 59 | dependencies, bytes_needed, &bytes_needed, 60 | &count)) 61 | return FALSE; 62 | 63 | for (DWORD i = 0; i < count; i++) 64 | { 65 | const ENUM_SERVICE_STATUS ess = *(dependencies + i); 66 | // Open the service. 67 | const SC_HANDLE dep_service = OpenService(schSCManager, 68 | ess.lpServiceName, 69 | SERVICE_STOP | SERVICE_QUERY_STATUS); 70 | 71 | if (!dep_service) 72 | return FALSE; 73 | 74 | __try 75 | { 76 | // Send a stop code. 77 | if (!ControlService(dep_service, 78 | SERVICE_CONTROL_STOP, 79 | reinterpret_cast(&ssp))) 80 | return FALSE; 81 | 82 | // Wait for the service to stop. 83 | while (ssp.dwCurrentState != SERVICE_STOPPED) 84 | { 85 | Sleep(ssp.dwWaitHint); 86 | if (!QueryServiceStatusEx( 87 | dep_service, 88 | SC_STATUS_PROCESS_INFO, 89 | reinterpret_cast(&ssp), 90 | sizeof(SERVICE_STATUS_PROCESS), 91 | &bytes_needed)) 92 | return FALSE; 93 | 94 | if (ssp.dwCurrentState == SERVICE_STOPPED) 95 | break; 96 | constexpr DWORD timeout = 30000; 97 | if (GetTickCount() - start_time > timeout) 98 | return FALSE; 99 | } 100 | } 101 | __finally 102 | { 103 | // Always release the service handle 104 | CloseServiceHandle(dep_service); 105 | } 106 | } 107 | } 108 | __finally 109 | { 110 | // Always free the enumeration buffer 111 | HeapFree(GetProcessHeap(), 0, dependencies); 112 | } 113 | return TRUE; 114 | } 115 | 116 | bool enable_or_disable_service(const char* strServiceName, bool bIsEnable) 117 | { 118 | bool result = false; 119 | 120 | const SC_HANDLE hServiceControlManager = OpenSCManager(nullptr, nullptr, SC_MANAGER_ALL_ACCESS); 121 | 122 | if (nullptr != hServiceControlManager) 123 | { 124 | const SC_HANDLE hService = OpenService(hServiceControlManager, strServiceName, SERVICE_CHANGE_CONFIG); 125 | 126 | if (hService != nullptr) 127 | { 128 | result = ChangeServiceConfig(hService, SERVICE_NO_CHANGE, 129 | bIsEnable ? SERVICE_AUTO_START : SERVICE_DISABLED, 130 | SERVICE_NO_CHANGE, 131 | nullptr, nullptr, nullptr, nullptr, nullptr, nullptr, nullptr); 132 | 133 | CloseServiceHandle(hService); 134 | } 135 | 136 | CloseServiceHandle(hServiceControlManager); 137 | } 138 | 139 | return result; 140 | } 141 | 142 | VOID __stdcall do_stop_svc(const char* szSvcName) 143 | { 144 | SERVICE_STATUS_PROCESS ssp{}; 145 | const DWORD start_time = GetTickCount(); 146 | DWORD bytes_needed; 147 | constexpr DWORD dw_timeout = 30000; // 30-second time-out 148 | 149 | const SC_HANDLE sch_sc_manager = OpenSCManager( 150 | nullptr, // local computer 151 | nullptr, // ServicesActive database 152 | SC_MANAGER_ALL_ACCESS); // full access rights 153 | 154 | if (nullptr == sch_sc_manager) 155 | { 156 | std::cout << color::red("[-] OpenSCManager failed ") << GetLastError() << std::endl; 157 | return; 158 | } 159 | 160 | // Get a handle to the service 161 | const SC_HANDLE sch_service = OpenService( 162 | sch_sc_manager, // SCM database 163 | szSvcName, // name of service 164 | SERVICE_STOP | 165 | SERVICE_QUERY_STATUS | 166 | SERVICE_ENUMERATE_DEPENDENTS); 167 | 168 | if (sch_service == nullptr) 169 | { 170 | std::cout << color::red("[-] OpenService failed ") << GetLastError() << std::endl; 171 | CloseServiceHandle(sch_sc_manager); 172 | return; 173 | } 174 | 175 | // Make sure the service is not already stopped 176 | if (!QueryServiceStatusEx( 177 | sch_service, 178 | SC_STATUS_PROCESS_INFO, 179 | reinterpret_cast(&ssp), 180 | sizeof(SERVICE_STATUS_PROCESS), 181 | &bytes_needed)) 182 | { 183 | std::cout << color::red("[-] QueryServiceStatusEx failed ") << GetLastError() << std::endl; 184 | goto stop_cleanup; 185 | } 186 | 187 | if (ssp.dwCurrentState == SERVICE_STOPPED) 188 | { 189 | std::cout << color::red("[!] Service is already stopped\n"); 190 | goto stop_cleanup; 191 | } 192 | 193 | // If a stop is pending, wait for it 194 | while (ssp.dwCurrentState == SERVICE_STOP_PENDING) 195 | { 196 | std::cout << color::green("[+] Service stop pending...\n"); 197 | 198 | // Do not wait longer than the wait hint. A good interval is 199 | // one-tenth of the wait hint but not less than 1 second 200 | // and not more than 10 seconds. 201 | DWORD wait_time = ssp.dwWaitHint / 10; 202 | 203 | if (wait_time < 1000) 204 | wait_time = 1000; 205 | else if (wait_time > 10000) 206 | wait_time = 10000; 207 | 208 | Sleep(wait_time); 209 | 210 | if (!QueryServiceStatusEx( 211 | sch_service, 212 | SC_STATUS_PROCESS_INFO, 213 | reinterpret_cast(&ssp), 214 | sizeof(SERVICE_STATUS_PROCESS), 215 | &bytes_needed)) 216 | { 217 | std::cout << color::red("[-] QueryServiceStatusEx failed ") << GetLastError() << std::endl; 218 | goto stop_cleanup; 219 | } 220 | 221 | if (ssp.dwCurrentState == SERVICE_STOPPED) 222 | { 223 | std::cout << color::green("[+] Service stopped successfully\n"); 224 | goto stop_cleanup; 225 | } 226 | 227 | if (GetTickCount() - start_time > dw_timeout) 228 | { 229 | std::cout << color::red("[!] Service stop timed out\n"); 230 | goto stop_cleanup; 231 | } 232 | } 233 | 234 | // If the service is running, dependencies must be stopped first 235 | stop_dependent_services(sch_sc_manager, sch_service); 236 | 237 | // Send a stop code to the service 238 | if (!ControlService( 239 | sch_service, 240 | SERVICE_CONTROL_STOP, 241 | reinterpret_cast(&ssp))) 242 | { 243 | std::cout << color::red("[-] ControlService failed ") << GetLastError() << std::endl; 244 | goto stop_cleanup; 245 | } 246 | 247 | while (ssp.dwCurrentState != SERVICE_STOPPED) 248 | { 249 | Sleep(ssp.dwWaitHint); 250 | if (!QueryServiceStatusEx( 251 | sch_service, 252 | SC_STATUS_PROCESS_INFO, 253 | reinterpret_cast(&ssp), 254 | sizeof(SERVICE_STATUS_PROCESS), 255 | &bytes_needed)) 256 | { 257 | std::cout << color::red("[-] QueryServiceStatusEx failed ") << GetLastError() << std::endl; 258 | goto stop_cleanup; 259 | } 260 | 261 | if (ssp.dwCurrentState == SERVICE_STOPPED) 262 | break; 263 | 264 | if (GetTickCount() - start_time > dw_timeout) 265 | { 266 | std::cout << color::red("[!] Wait timed out\n"); 267 | goto stop_cleanup; 268 | } 269 | } 270 | std::cout << szSvcName << color::green(" service stopped successfully\n"); 271 | 272 | stop_cleanup: 273 | CloseServiceHandle(sch_service); 274 | CloseServiceHandle(sch_sc_manager); 275 | } 276 | 277 | void features() 278 | { 279 | do 280 | { 281 | std::cout << " \n"; 282 | std::cout << color::yellow("Write the number of the function you want to turn off\n"); 283 | std::cout << color::yellow( 284 | " 1 - Clean up temp windows files\n 2 - Clean up temp app files\n 3 - Remove 100% hardware usage\n 4 - Remove windows defender and hidden system monitoring\n 5 - Remove windows store\n 6 - Clean up chrome cookie files\n 7 - Remove windows updates\n 8 - Enable seconds in clock\n 9 - Fix for accessing administrative rules\n 10 - System info\n 11 - System file checker (SFC)\n 12 - Evaluate register based ban risk\n"); 285 | int var; 286 | std::cin >> var; 287 | 288 | switch (var) 289 | { 290 | case 1: 291 | { 292 | SHFILEOPSTRUCT file_op{}; 293 | 294 | file_op.hwnd = nullptr; 295 | file_op.wFunc = FO_DELETE; 296 | file_op.pFrom = R"(C:\Windows\Temp\)"; 297 | file_op.pTo = nullptr; 298 | file_op.fFlags = 0; 299 | file_op.lpszProgressTitle = nullptr; 300 | 301 | SHFileOperation(&file_op); 302 | GetLastError() 303 | ? std::cout << color::red("[-] Temp files removed not successfully\n") 304 | : std::cout << color::green("[+] Temp files removed successfully\n"); 305 | } 306 | break; 307 | case 2: 308 | { 309 | system("del /s /f /q %temp%\\*.*"); 310 | GetLastError() 311 | ? std::cout << color::red("[-] Temp files removed not successfully\n") 312 | : std::cout << color::green("[+] Temp files removed successfully\n"); 313 | } 314 | break; 315 | case 3: 316 | { 317 | //system("sc config SysMain start= disabled"); 318 | 319 | do_stop_svc("SysMain"); 320 | enable_or_disable_service("SysMain", false); 321 | std::cout << color::red("Plz, reboot your pc !!!\n"); 322 | } 323 | break; 324 | case 4: 325 | { 326 | HKEY key; 327 | if (RegOpenKeyEx(HKEY_LOCAL_MACHINE, R"(SOFTWARE\Policies\Microsoft\Windows Defender)", 0, 328 | KEY_ALL_ACCESS, &key)) 329 | { 330 | std::cout << color::red("[-] Failed to open registry\n"); 331 | system("pause"); 332 | return; 333 | } 334 | 335 | std::cout << color::green("[+] Register opened successfully\n"); 336 | 337 | uint32_t payload = 1; 338 | if (RegSetValueEx(key, "DisableAntiSpyware", 0, REG_DWORD, reinterpret_cast(&payload), 339 | sizeof payload)) 340 | { 341 | std::cout << color::red("[-] Failed to write to reg key \'DisableAntiSpyware'\\n"); 342 | system("pause"); 343 | return; 344 | } 345 | 346 | std::cout << color::green("[+] The reg key \'DisableAntiSpyware\' value changed to 1\n"); 347 | 348 | HKEY new_key; 349 | if (RegCreateKeyEx(key, "Real-Time Protection", 0, nullptr, REG_OPTION_NON_VOLATILE, KEY_ALL_ACCESS, 350 | nullptr, &new_key, nullptr)) 351 | { 352 | std::cout << color::red("[-] Failed to create new key \'Real-Time Protection'\\n"); 353 | system("pause"); 354 | return; 355 | } 356 | std::cout << color::green("[+] New key \'Real-Time Protection\' created successfully\n"); 357 | 358 | key = new_key; 359 | 360 | if (RegSetValueEx(key, "DisableRealtimeMonitoring", 0, REG_DWORD, reinterpret_cast(&payload), 361 | sizeof payload)) 362 | { 363 | std::cout << color::red("[-] Failed to write to registry\n"); 364 | system("pause"); 365 | return; 366 | } 367 | std::cout << color::green("[+] The reg key \'DisableRealtimeMonitoring\' value changed to 1\n"); 368 | 369 | if (RegSetValueEx(key, "DisableBehaviorMonitoring", 0, REG_DWORD, reinterpret_cast(&payload), 370 | sizeof payload)) 371 | { 372 | std::cout << color::red("[-] Failed to write to registry\n"); 373 | system("pause"); 374 | return; 375 | } 376 | std::cout << color::green("[+] The reg key \'DisableBehaviorMonitoring\' value changed to 1\n"); 377 | 378 | if (RegSetValueEx(key, "DisableOnAccessProtection", 0, REG_DWORD, reinterpret_cast(&payload), 379 | sizeof payload)) 380 | { 381 | std::cout << color::red("[-] Failed to write to registry\n"); 382 | system("pause"); 383 | return; 384 | } 385 | std::cout << color::green("[+] The reg key \'DisableOnAccessProtection\' value changed to 1\n"); 386 | 387 | if (RegSetValueEx(key, "DisableScanOnRealtimeEnable", 0, REG_DWORD, reinterpret_cast(&payload), 388 | sizeof payload)) 389 | { 390 | std::cout << color::red("[-] Failed to write to registry\n"); 391 | system("pause"); 392 | return; 393 | } 394 | 395 | std::cout << color::green("[+] The reg key \'DisableScanOnRealtimeEnable\' value changed to 1\n"); 396 | 397 | if (RegSetValueEx(key, "DisableIOAVProtection", 0, REG_DWORD, reinterpret_cast(&payload), 398 | sizeof payload)) 399 | { 400 | std::cout << color::red("[-] Failed to write to registry\n"); 401 | system("pause"); 402 | return; 403 | } 404 | std::cout << color::green("[+] The reg key \'DisableIOAVProtection\' value changed to 1\n"); 405 | 406 | RegCloseKey(key); 407 | 408 | std::cout << color::green("[+] Registry values written\n"); 409 | 410 | //DoStopSvc(("mpssvc")); 411 | //EnableOrDisableService(("mpssvc"), false); 412 | 413 | //DoStopSvc(("wscsvc")); 414 | //EnableOrDisableService(("wscsvc"), false); 415 | 416 | std::cout << color::red("[!] Plz, reboot your pc \n"); 417 | } 418 | break; 419 | case 5: 420 | { 421 | do_stop_svc("InstallService"); 422 | enable_or_disable_service("InstallService", false); 423 | std::cout << color::red("Plz, reboot your pc !!!\n"); 424 | } 425 | break; 426 | case 6: 427 | { 428 | system(R"(del /s /f /q %appdata%\Local\Google\Chrome\User Data\Default\Cookies)"); 429 | 430 | GetLastError() 431 | ? std::cout << color::red("[-] Cookies cleaned not successfully\n") 432 | : std::cout << color::green("[+] Cookies cleaned removed successfully\n"); 433 | } 434 | break; 435 | case 7: 436 | { 437 | do_stop_svc("wuauserv"); 438 | enable_or_disable_service("wuauserv", false); 439 | 440 | do_stop_svc("msiserver"); 441 | enable_or_disable_service("msiserver", false); 442 | 443 | system(R"(del /s /f /q C:\Windows\SoftwareDistribution\*.*)"); 444 | std::cout << color::green("Deleted windows updates\n"); 445 | 446 | std::ofstream file(R"(C:\Windows\SoftwareDistribution\Download)"); 447 | file.close(); 448 | std::cout << color::green("Created Download file\n"); 449 | } 450 | break; 451 | case 8: 452 | { 453 | HKEY key; 454 | if (RegOpenKeyEx(HKEY_CURRENT_USER, "SOFTWARE\\Microsoft", 0, 455 | KEY_ALL_ACCESS, &key)) 456 | { 457 | std::cout << color::red("[-] Failed to open registry\n"); 458 | system("pause"); 459 | return; 460 | } 461 | 462 | std::cout << color::green("[+] Register opened successfully\n"); 463 | 464 | HKEY new_key; 465 | 466 | if (RegCreateKeyEx(key, "Windows", 0, nullptr, REG_OPTION_NON_VOLATILE, KEY_ALL_ACCESS, 467 | nullptr, &new_key, nullptr)) 468 | { 469 | std::cout << color::red("[-] Failed to create new key \'Windows'\\n"); 470 | system("pause"); 471 | return; 472 | } 473 | 474 | std::cout << color::green("[+] New key \'Windows\' created successfully\n"); 475 | key = new_key; 476 | 477 | if (RegCreateKeyEx(key, "CurrentVersion", 0, nullptr, REG_OPTION_NON_VOLATILE, KEY_ALL_ACCESS, 478 | nullptr, &new_key, nullptr)) 479 | { 480 | std::cout << color::red("[-] Failed to create new key \'CurrentVersion'\\n"); 481 | system("pause"); 482 | return; 483 | } 484 | 485 | std::cout << color::green("[+] New key \'CurrentVersion\' created successfully\n"); 486 | key = new_key; 487 | 488 | if (RegCreateKeyEx(key, "Explorer", 0, nullptr, REG_OPTION_NON_VOLATILE, KEY_ALL_ACCESS, 489 | nullptr, &new_key, nullptr)) 490 | { 491 | std::cout << color::red("[-] Failed to create new key \'Explorer'\\n"); 492 | system("pause"); 493 | return; 494 | } 495 | 496 | std::cout << color::green("[+] New key \'Explorer\' created successfully\n"); 497 | key = new_key; 498 | 499 | if (RegCreateKeyEx(key, "Advanced", 0, nullptr, REG_OPTION_NON_VOLATILE, KEY_ALL_ACCESS, 500 | nullptr, &new_key, nullptr)) 501 | { 502 | std::cout << color::red("[-] Failed to create new key \'Advanced'\\n"); 503 | system("pause"); 504 | return; 505 | } 506 | 507 | std::cout << color::green("[+] New key \'Advanced\' created successfully\n"); 508 | key = new_key; 509 | 510 | uint32_t payload = 1; 511 | if (RegSetValueEx(key, "ShowSecondsInSystemClock", 0, REG_DWORD, reinterpret_cast(&payload), 512 | sizeof payload)) 513 | { 514 | std::cout << color::red("[-] Failed to write to reg key \'ShowSecondsInSystemClock'\\n"); 515 | system("pause"); 516 | return; 517 | } 518 | 519 | std::cout << color::green("[+] The reg key \'ShowSecondsInSystemClock\' value changed to 1\n"); 520 | 521 | /* std::cout << color::red(("[+] Updating explorer...")); 522 | system(("taskkill /F /IM explorer.exe")); 523 | std::this_thread::sleep_for(std::chrono::seconds(3)); 524 | system(("start explorer")); */ 525 | 526 | std::cout << color::red("[!] Restart explorer\n"); 527 | } 528 | break; 529 | case 9: 530 | { 531 | HKEY key; 532 | if (RegOpenKeyEx(HKEY_LOCAL_MACHINE, R"(SOFTWARE\Microsoft\Windows\CurrentVersion\Policies\System)", 533 | 0, 534 | KEY_ALL_ACCESS, &key)) 535 | { 536 | std::cout << color::red("[-] Failed to open registry\n"); 537 | system("pause"); 538 | return; 539 | } 540 | 541 | std::cout << color::green("[+] Register opened successfully\n"); 542 | 543 | uint32_t payload = 0; 544 | if (RegSetValueEx(key, "FilterAdministratorToken", 0, REG_DWORD, reinterpret_cast(&payload), 545 | sizeof payload)) 546 | { 547 | std::cout << color::red("[-] Failed to write to reg key \'FilterAdministratorToken'\\n"); 548 | system("pause"); 549 | return; 550 | } 551 | 552 | std::cout << color::green("[+] The reg key \'FilterAdministratorToken\' value changed to 0\n"); 553 | 554 | if (RegSetValueEx(key, "PromptOnSecureDesktop", 0, REG_DWORD, reinterpret_cast(&payload), 555 | sizeof payload)) 556 | { 557 | std::cout << color::red("[-] Failed to write to reg key \'PromptOnSecureDesktop'\\n"); 558 | system("pause"); 559 | return; 560 | } 561 | 562 | if (RegSetValueEx(key, "EnableInstallerDetection", 0, REG_DWORD, reinterpret_cast(&payload), 563 | sizeof payload)) 564 | { 565 | std::cout << color::red("[-] Failed to write to reg key \'EnableInstallerDetection'\\n"); 566 | system("pause"); 567 | return; 568 | } 569 | 570 | std::cout << color::green("[+] The reg key \'EnableInstallerDetection\' value changed to 0\n"); 571 | 572 | if (RegSetValueEx(key, "EnableSecureUIAPaths", 0, REG_DWORD, reinterpret_cast(&payload), 573 | sizeof payload)) 574 | { 575 | std::cout << color::red("[-] Failed to write to reg key \'EnableSecureUIAPaths'\\n"); 576 | system("pause"); 577 | return; 578 | } 579 | 580 | std::cout << color::green("[+] The reg key \'EnableSecureUIAPaths\' value changed to 0\n"); 581 | 582 | if (RegSetValueEx(key, "EnableVirtualization", 0, REG_DWORD, reinterpret_cast(&payload), 583 | sizeof payload)) 584 | { 585 | std::cout << color::red("[-] Failed to write to reg key \'EnableVirtualization'\\n"); 586 | system("pause"); 587 | return; 588 | } 589 | 590 | std::cout << color::green("[+] The reg key \'EnableVirtualization\' value changed to 0\n"); 591 | 592 | if (RegSetValueEx(key, "EnableUIADesktopToggle", 0, REG_DWORD, reinterpret_cast(&payload), 593 | sizeof payload)) 594 | { 595 | std::cout << color::red("[-] Failed to write to reg key \'EnableUIADesktopToggle'\\n"); 596 | system("pause"); 597 | return; 598 | } 599 | 600 | std::cout << color::green("[+] The reg key \'EnableUIADesktopToggle\' value changed to 0\n"); 601 | 602 | if (RegSetValueEx(key, "EnableLUA", 0, REG_DWORD, reinterpret_cast(&payload), 603 | sizeof payload)) 604 | { 605 | std::cout << color::red("[-] Failed to write to reg key \'EnableLUA'\\n"); 606 | system("pause"); 607 | return; 608 | } 609 | 610 | std::cout << color::green("[+] The reg key \'EnableLUA\' value changed to 0\n"); 611 | uintptr_t logon = 1; 612 | if (RegSetValueEx(key, "undockwithoutlogon", 0, REG_DWORD, reinterpret_cast(&logon), 613 | sizeof logon)) 614 | { 615 | std::cout << color::red("[-] Failed to write to reg key \'undockwithoutlogon'\\n"); 616 | system("pause"); 617 | return; 618 | } 619 | 620 | std::cout << color::green("[+] The reg key \'undockwithoutlogon\' value changed to 1\n"); 621 | 622 | if (RegSetValueEx(key, "shutdownwithoutlogon", 0, REG_DWORD, reinterpret_cast(&logon), 623 | sizeof logon)) 624 | { 625 | std::cout << color::red("[-] Failed to write to reg key \'shutdownwithoutlogon'\\n"); 626 | system("pause"); 627 | return; 628 | } 629 | 630 | std::cout << color::green("[+] The reg key \'shutdownwithoutlogon\' value changed to 1\n"); 631 | 632 | if (RegSetValueEx(key, "scforceoption", 0, REG_DWORD, reinterpret_cast(&payload), 633 | sizeof payload)) 634 | { 635 | std::cout << color::red("[-] Failed to write to reg key \'scforceoption'\\n"); 636 | system("pause"); 637 | return; 638 | } 639 | 640 | std::cout << color::green("[+] The reg key \'scforceoption\' value changed to 0\n"); 641 | 642 | if (RegSetValueEx(key, "legalnoticetext", 0, REG_DWORD, reinterpret_cast(&payload), 643 | sizeof payload)) 644 | { 645 | std::cout << color::red("[-] Failed to write to reg key \'legalnoticetext'\\n"); 646 | system("pause"); 647 | return; 648 | } 649 | 650 | //std::cout << color::green(("[+] The reg key \'legalnoticetext\' value changed to 0\n")); 651 | 652 | //if (RegSetValueEx(key, ("legalnoticecaption"), 0, REG_DWORD, reinterpret_cast(&payload), 653 | // sizeof(payload))) 654 | //{ 655 | // std::cout << color::red(("[-] Failed to write to reg key \'legalnoticecaption'\\n")); 656 | // system(("pause")); 657 | // return; 658 | //} 659 | 660 | //std::cout << color::green(("[+] The reg key \'legalnoticecaption\' value changed to 0\n")); 661 | 662 | //if (RegSetValueEx(key, ("dontdisplaylastusername"), 0, REG_DWORD, reinterpret_cast(&payload), 663 | // sizeof(payload))) 664 | //{ 665 | // std::cout << color::red(("[-] Failed to write to reg key \'dontdisplaylastusername'\\n")); 666 | // system(("pause")); 667 | // return; 668 | //} 669 | 670 | //std::cout << color::green(("[+] The reg key \'dontdisplaylastusername\' value changed to 0\n")); 671 | 672 | if (RegSetValueEx(key, "ValidateAdminCodeSignatures", 0, REG_DWORD, reinterpret_cast(&payload), 673 | sizeof payload)) 674 | { 675 | std::cout << color::red("[-] Failed to write to reg key \'ValidateAdminCodeSignatures'\\n"); 676 | system("pause"); 677 | return; 678 | } 679 | 680 | std::cout << color::green("[+] The reg key \'ValidateAdminCodeSignatures\' value changed to 0\n"); 681 | 682 | uintptr_t curs = 1; 683 | if (RegSetValueEx(key, "EnableCursorSuppression", 0, REG_DWORD, reinterpret_cast(&curs), 684 | sizeof curs)) 685 | { 686 | std::cout << color::red("[-] Failed to write to reg key \'EnableCursorSuppression'\\n"); 687 | system("pause"); 688 | return; 689 | } 690 | 691 | std::cout << color::green("[+] The reg key \'EnableCursorSuppression\' value changed to 1\n"); 692 | 693 | uintptr_t dsc = 2; 694 | if (RegSetValueEx(key, "DSCAutomationHostEnabled", 0, REG_DWORD, reinterpret_cast(&dsc), 695 | sizeof dsc)) 696 | { 697 | std::cout << color::red("[-] Failed to write to reg key \'DSCAutomationHostEnabled'\\n"); 698 | system("pause"); 699 | return; 700 | } 701 | 702 | std::cout << color::green("[+] The reg key \'DSCAutomationHostEnabled\' value changed to 2\n"); 703 | 704 | uintptr_t beusr = 3; 705 | if (RegSetValueEx(key, "ConsentPromptBehaviorUser", 0, REG_DWORD, reinterpret_cast(&beusr), 706 | sizeof beusr)) 707 | { 708 | std::cout << color::red("[-] Failed to write to reg key \'ConsentPromptBehaviorUser'\\n"); 709 | system("pause"); 710 | return; 711 | } 712 | 713 | std::cout << color::green("[+] The reg key \'ConsentPromptBehaviorUser\' value changed to 3\n"); 714 | 715 | if (RegSetValueEx(key, "ConsentPromptBehaviorAdmin", 0, REG_DWORD, reinterpret_cast(&payload), 716 | sizeof payload)) 717 | { 718 | std::cout << color::red("[-] Failed to write to reg key \'ConsentPromptBehaviorAdmin'\\n"); 719 | system("pause"); 720 | return; 721 | } 722 | 723 | std::cout << color::green("[+] The reg key \'ConsentPromptBehaviorAdmin\' value changed to 0\n"); 724 | 725 | HKEY new_key; 726 | 727 | if (RegOpenKeyEx( 728 | HKEY_LOCAL_MACHINE, 729 | R"(SOFTWARE\Microsoft\Windows\CurrentVersion\Policies\System\UIPI\Clipboard\ExceptionFormats)", 730 | 0, 731 | KEY_ALL_ACCESS, &new_key)) 732 | { 733 | std::cout << color::red("[-] Failed to create new key \'Windows'\\n"); 734 | system("pause"); 735 | return; 736 | } 737 | 738 | key = new_key; 739 | std::cout << color::green("[+] Register opened successfully\n"); 740 | 741 | uint32_t bitmap = 2; 742 | 743 | if (RegSetValueEx(key, "CF_BITMAP", 0, REG_DWORD, reinterpret_cast(&bitmap), 744 | sizeof bitmap)) 745 | { 746 | std::cout << color::red("[-] Failed to write to reg key \'CF_BITMAP'\\n"); 747 | system("pause"); 748 | return; 749 | } 750 | 751 | std::cout << color::green("[+] The reg key \'CF_BITMAP\' value changed to 2\n"); 752 | 753 | uint32_t dib = 8; 754 | 755 | if (RegSetValueEx(key, "CF_DIB", 0, REG_DWORD, reinterpret_cast(&dib), 756 | sizeof dib)) 757 | { 758 | std::cout << color::red("[-] Failed to write to reg key \'CF_DIB'\\n"); 759 | system("pause"); 760 | return; 761 | } 762 | 763 | std::cout << color::green("[+] The reg key \'CF_DIB\' value changed to 8\n"); 764 | 765 | uint32_t dib5 = 17; 766 | 767 | if (RegSetValueEx(key, "CF_DIBV5", 0, REG_DWORD, reinterpret_cast(&dib5), 768 | sizeof dib5)) 769 | { 770 | std::cout << color::red("[-] Failed to write to reg key \'CF_DIBV5'\\n"); 771 | system("pause"); 772 | return; 773 | } 774 | 775 | std::cout << color::green("[+] The reg key \'CF_DIBV5\' value changed to 17\n"); 776 | 777 | uint32_t oemtext = 7; 778 | 779 | if (RegSetValueEx(key, "CF_OEMTEXT", 0, REG_DWORD, reinterpret_cast(&oemtext), 780 | sizeof oemtext)) 781 | { 782 | std::cout << color::red("[-] Failed to write to reg key \'CF_OEMTEXT'\\n"); 783 | system("pause"); 784 | return; 785 | } 786 | 787 | std::cout << color::green("[+] The reg key \'CF_OEMTEXT\' value changed to 7\n"); 788 | 789 | uint32_t palette = 9; 790 | 791 | if (RegSetValueEx(key, "CF_PALETTE", 0, REG_DWORD, reinterpret_cast(&palette), 792 | sizeof palette)) 793 | { 794 | std::cout << color::red("[-] Failed to write to reg key \'CF_PALETTE'\\n"); 795 | system("pause"); 796 | return; 797 | } 798 | 799 | std::cout << color::green("[+] The reg key \'CF_PALETTE\' value changed to 9\n"); 800 | 801 | uint32_t text = 1; 802 | 803 | if (RegSetValueEx(key, "CF_TEXT", 0, REG_DWORD, reinterpret_cast(&palette), 804 | sizeof palette)) 805 | { 806 | std::cout << color::red("[-] Failed to write to reg key \'CF_TEXT'\\n"); 807 | system("pause"); 808 | return; 809 | } 810 | 811 | std::cout << color::green("[+] The reg key \'CF_TEXT\' value changed to 1\n"); 812 | 813 | uint32_t textu = 13; 814 | 815 | if (RegSetValueEx(key, "CF_UNICODETEXT", 0, REG_DWORD, reinterpret_cast(&textu), 816 | sizeof textu)) 817 | { 818 | std::cout << color::red("[-] Failed to write to reg key \'CF_UNICODETEXT'\\n"); 819 | system("pause"); 820 | return; 821 | } 822 | 823 | std::cout << color::green("[+] The reg key \'CF_UNICODETEXT\' value changed to 13\n"); 824 | std::cout << color::red("[!] Plz, reboot your pc \n"); 825 | } 826 | break; 827 | case 10: 828 | { 829 | MEMORYSTATUSEX statex{}; 830 | statex.dwLength = sizeof statex; 831 | GlobalMemoryStatusEx(&statex); 832 | 833 | std::cout << color::green("System Info:\n"); 834 | std::cout << color::red( 835 | "-----------------------------------------MEM---------------------------------------\n"); 836 | { 837 | std::cout << color::green("Memory in use: ") << statex.dwMemoryLoad << "%\n"; 838 | std::cout << color::green("Total MB of physical memory: ") << statex.ullTotalPhys / 1024 / 1024 << 839 | std::endl; 840 | std::cout << color::green("Free MB of physical memory: ") << statex.ullAvailPhys / 1024 / 1024 << 841 | std::endl; 842 | } 843 | std::cout << color::red( 844 | "-----------------------------------------CPU---------------------------------------\n"); 845 | { 846 | SYSTEM_INFO lpSystemInfo; 847 | GetSystemInfo(&lpSystemInfo); 848 | std::cout << color::green("Active processor mask: ") << lpSystemInfo.dwActiveProcessorMask << 849 | std::endl; 850 | std::cout << color::green("Number of processors: ") << lpSystemInfo.dwNumberOfProcessors << 851 | std::endl; 852 | std::cout << color::green("Processor type: ") << lpSystemInfo.dwProcessorType << std::endl; 853 | 854 | DWORD buffer_size = _MAX_PATH; 855 | DWORD dwMHz = _MAX_PATH; 856 | HKEY hkey; 857 | 858 | // open the key where the proc speed is hidden: 859 | long error = RegOpenKeyEx(HKEY_LOCAL_MACHINE, 860 | R"(HARDWARE\DESCRIPTION\System\CentralProcessor\0)", 861 | 0, 862 | KEY_READ, 863 | &hkey); 864 | 865 | if (error != ERROR_SUCCESS) 866 | { 867 | wchar_t constexpr buffer[260]{}; 868 | 869 | FormatMessage(FORMAT_MESSAGE_FROM_SYSTEM, 870 | nullptr, 871 | error, 872 | 0, 873 | (CHAR*)buffer, 874 | _MAX_PATH, 875 | nullptr); 876 | wprintf(buffer); 877 | system("pause"); 878 | return; 879 | } 880 | 881 | RegQueryValueEx(hkey, "~MHz", nullptr, nullptr, reinterpret_cast(&dwMHz), &buffer_size); 882 | std::cout << color::green("CPU speed: ") << dwMHz << "Mhz\n"; 883 | } 884 | std::cout << color::red( 885 | "-----------------------------------------VC---------------------------------------\n"); 886 | { 887 | for (int i = 0; ; i++) 888 | { 889 | DISPLAY_DEVICE dd = {sizeof dd, {0}}; 890 | BOOL f = EnumDisplayDevices(nullptr, i, &dd, EDD_GET_DEVICE_INTERFACE_NAME); 891 | if (!f) 892 | break; 893 | 894 | std::cout << color::green(dd.DeviceString) << std::endl; 895 | } 896 | } 897 | std::cout << color::red( 898 | "-----------------------------------------WIN---------------------------------------\n"); 899 | { 900 | DWORD version = 0; 901 | DWORD major_version = 0; 902 | DWORD minor_version = 0; 903 | DWORD build = 0; 904 | 905 | version = GetVersion(); 906 | 907 | major_version = static_cast(LOBYTE(LOWORD(version))); 908 | minor_version = static_cast(HIBYTE(LOWORD(version))); 909 | 910 | if (version < 0x80000000) 911 | build = static_cast(HIWORD(version)); 912 | 913 | std::cout << color::green("Version is ") << major_version << "." << minor_version << " " << build << 914 | std::endl; 915 | } 916 | } 917 | break; 918 | case 11: 919 | { 920 | /* @TODO: Working only on x64 solution platform */ 921 | system("sfc.exe /scannow"); 922 | 923 | /* lol */ 924 | //if (GetLastError()) 925 | // system(R"(C:\Windows\System32\sfc.exe /scannow)"); 926 | } break; 927 | case 12: 928 | { 929 | /* evaluates reg */ 930 | std::cout << color::green("Analyzing Registry...") << std::endl; 931 | 932 | char selection = ' '; 933 | 934 | HKEY reg_key; 935 | LSTATUS status = 0; 936 | status = RegOpenKeyExA(HKEY_CURRENT_USER, "SOFTWARE\\Hex-Rays\\IDA\\History64", 0, KEY_ALL_ACCESS, ®_key); 937 | if (status == ERROR_SUCCESS) 938 | { 939 | DWORD values = 0; 940 | if (ERROR_SUCCESS == (RegQueryInfoKeyA(reg_key, NULL, NULL, NULL, NULL, NULL, NULL, &values, NULL, NULL, NULL, NULL))) 941 | { 942 | std::cout << color::light_yellow("[IDA] Found ") << values << color::light_yellow(" potentially risky value(s).") << std::endl; 943 | if (values > 0) 944 | { 945 | std::cout << color::light_yellow("[IDA] Analyzing value(s)...") << std::endl; 946 | 947 | //checking strings for suspicious names 948 | std::string sus_names[] = { "modern", "warfare", "black", "ops", "call", "duty", "cod", "mw", "bocw", "war", "cold", "dump" }; 949 | size_t found = 0; 950 | TCHAR data[MAX_PATH]; 951 | DWORD dwSize = sizeof(data); 952 | for (unsigned int i = 0; i < values; i++) 953 | { 954 | status = RegGetValueA(reg_key, NULL, std::to_string(i).c_str(), RRF_RT_REG_SZ, NULL, &data, &dwSize); 955 | if (status == ERROR_SUCCESS) 956 | { 957 | std::string str = data; 958 | for (int j = 0; j < sizeof(sus_names); j++) 959 | { 960 | found = str.find(sus_names[i]); 961 | if (found != str.npos) 962 | { 963 | if (ERROR_SUCCESS != (RegDeleteValueA(reg_key, std::to_string(i).c_str()))) 964 | std::cout << color::red("[IDA] Could not delete dangerous element. Error: ") << GetLastError() << std::endl; 965 | else { 966 | std::cout << color::green("[IDA] Deleted Element ") << i << color::green(" - found ") << sus_names[j] << color::green(" inside of data: ") << str << std::endl; 967 | break; 968 | } 969 | } 970 | } 971 | } 972 | else 973 | std::cout << color::red("[IDA] Error: ") << GetLastError() << color::red(" while trying to obtain data of value ") << i << std::endl; 974 | } 975 | 976 | std::cout << color::green("[IDA] Key values analyzed. Moderate Risk caused by IDA keys inside of current users registry.") << std::endl; 977 | } 978 | } 979 | else 980 | std::cout << color::red("Unable to get key info! Extended Error Information: ") << GetLastError() << std::endl; 981 | RegCloseKey(reg_key); 982 | } 983 | else 984 | { 985 | if (GetLastError() != 0x0) //do not display an error if the key doesn't even exist. 986 | std::cout << color::red("Can not open registry key. Error Information: ") << GetLastError() << std::endl; 987 | } 988 | status = RegOpenKeyExA(HKEY_CURRENT_USER, "SOFTWARE\\Hex-Rays\\IDA\\History\\UIFLTR", 0, KEY_ALL_ACCESS, ®_key); 989 | if (status == ERROR_SUCCESS) 990 | { 991 | DWORD values = 0; 992 | if (ERROR_SUCCESS == (RegQueryInfoKeyA(reg_key, NULL, NULL, NULL, NULL, NULL, NULL, &values, NULL, NULL, NULL, NULL))) 993 | { 994 | std::cout << color::light_yellow("[IDA] Found ") << values << color::light_yellow(" search histories.") << std::endl; 995 | if (values > 0) 996 | { 997 | std::cout << color::light_yellow("[IDA] Cleanup search histories? [y/n]\n >"); 998 | std::cin >> selection; 999 | if (selection == 'y') 1000 | { 1001 | for (unsigned int i = 0; i < values; i++) 1002 | { 1003 | status = RegDeleteValueA(reg_key, std::to_string(i).c_str()); 1004 | if (status == ERROR_SUCCESS) 1005 | std::cout << color::green("[IDA] Element ") << i << color::green(" deleted!") << std::endl; 1006 | else 1007 | std::cout << color::red("[IDA] Error: ") << GetLastError() << color::red(" while trying to delete ") << i << std::endl; 1008 | } 1009 | } 1010 | } 1011 | } 1012 | else 1013 | std::cout << color::red("[IDA] Unable to get key info! Extended Error Information: ") << GetLastError() << std::endl; 1014 | RegCloseKey(reg_key); 1015 | } 1016 | else 1017 | { 1018 | if (GetLastError() != 0x0) 1019 | std::cout << color::red("[IDA] Can not open registry key. Error Information: ") << GetLastError() << std::endl; 1020 | } 1021 | 1022 | std::cout << color::green("===Done!===") << std::endl; 1023 | 1024 | } break; 1025 | default: break; 1026 | } 1027 | } 1028 | while (FindWindow(nullptr, "pc-cleaner")); 1029 | } 1030 | 1031 | int main() 1032 | { 1033 | if (!is_admin()) 1034 | { 1035 | std::cout << color::red("[-] Run the program as admin\n"); 1036 | system("pause"); 1037 | return 0; 1038 | } 1039 | 1040 | SetConsoleTitleA("pc-cleaner"); 1041 | 1042 | std::cout << " \n"; 1043 | std::cout << color::aqua( 1044 | "Hello, World!\n developer contacts:\n @tg: https://t.me/kernel_mode2\n @ds: william_coder#8276\n @github: https://github.com/W1lliam1337\n"); 1045 | 1046 | features(); 1047 | 1048 | return 0; 1049 | } 1050 | -------------------------------------------------------------------------------- /color.h: -------------------------------------------------------------------------------- 1 | #ifndef COLOR_HPP 2 | #define COLOR_HPP 3 | 4 | #include 5 | #include 6 | #include 7 | #include 8 | #include 9 | #include 10 | #include 11 | #include 12 | 13 | namespace hue 14 | { 15 | constexpr int DEFAULT_COLOR = 7; 16 | constexpr int BAD_COLOR = -256; 17 | 18 | const std::map CODES = { 19 | {"black", 0}, {"k", 0}, 20 | {"blue", 1}, {"b", 1}, 21 | {"green", 2}, {"g", 2}, 22 | {"aqua", 3}, {"a", 3}, 23 | {"red", 4}, {"r", 4}, 24 | {"purple", 5}, {"p", 5}, 25 | {"yellow", 6}, {"y", 6}, 26 | {"white", 7}, {"w", 7}, 27 | {"grey", 8}, {"e", 8}, 28 | {"light blue", 9}, {"lb", 9}, 29 | {"light green", 10}, {"lg", 10}, 30 | {"light aqua", 11}, {"la", 11}, 31 | {"light red", 12}, {"lr", 12}, 32 | {"light purple", 13}, {"lp", 13}, 33 | {"light yellow", 14}, {"ly", 14}, 34 | {"bright white", 15}, {"bw", 15} 35 | }; 36 | 37 | const std::map NAMES = { 38 | { 0, "black"}, 39 | { 1, "blue"}, 40 | { 2, "green"}, 41 | { 3, "aqua"}, 42 | { 4, "red"}, 43 | { 5, "purple"}, 44 | { 6, "yellow"}, 45 | { 7, "white"}, 46 | { 8, "grey"}, 47 | { 9, "light blue"}, 48 | {10, "light green"}, 49 | {11, "light aqua"}, 50 | {12, "light red"}, 51 | {13, "light purple"}, 52 | {14, "light yellow"}, 53 | {15, "bright white"} 54 | }; 55 | 56 | inline bool is_good(int c) 57 | { 58 | return 0 <= c && c < 256; 59 | } 60 | 61 | inline int itoc(int c) 62 | { 63 | return is_good(c) ? c : BAD_COLOR; 64 | } 65 | 66 | inline int itoc(int a, int b) 67 | { 68 | return itoc(a + b * 16); 69 | } 70 | 71 | // std::string to color 72 | int stoc(std::string a) 73 | { 74 | // convert s to lowercase, and format variants like "light_blue" 75 | std::transform(a.begin(), a.end(), a.begin(), [](char c) 76 | { 77 | if ('A' <= c && c <= 'Z') 78 | c = c - 'A' + 'a'; 79 | else if (c == '_' || c == '-') 80 | c = ' '; 81 | return c; 82 | }); 83 | 84 | // operator[] on std::map is non-const, use std::map::at instead 85 | return (CODES.find(a) != CODES.end()) ? CODES.at(a) : BAD_COLOR; 86 | } 87 | 88 | int stoc(std::string a, std::string b) 89 | { 90 | return itoc(stoc(a), stoc(b)); 91 | } 92 | 93 | std::string ctos(int c) 94 | { 95 | return (0 <= c && c < 256) ? 96 | "(text) " + NAMES.at(c % 16) + " + " + 97 | "(background) " + NAMES.at(c / 16) : 98 | "BAD COLOR"; 99 | } 100 | 101 | int get() 102 | { 103 | CONSOLE_SCREEN_BUFFER_INFO i; 104 | return GetConsoleScreenBufferInfo(GetStdHandle(STD_OUTPUT_HANDLE), &i) ? 105 | i.wAttributes : BAD_COLOR; 106 | } 107 | 108 | int get_text() 109 | { 110 | return (get() != BAD_COLOR) ? get() % 16 : BAD_COLOR; 111 | } 112 | 113 | int get_background() 114 | { 115 | return (get() != BAD_COLOR) ? get() / 16 : BAD_COLOR; 116 | } 117 | 118 | void set(int c) 119 | { 120 | if (is_good(c)) 121 | SetConsoleTextAttribute(GetStdHandle(STD_OUTPUT_HANDLE), c); 122 | } 123 | 124 | void set(int a, int b) 125 | { 126 | set(a + b * 16); 127 | } 128 | 129 | void set(std::string a, std::string b) 130 | { 131 | set(stoc(a) + stoc(b) * 16); 132 | } 133 | 134 | void set_text(std::string a) 135 | { 136 | set(stoc(a), get_background()); 137 | } 138 | 139 | void set_background(std::string b) 140 | { 141 | set(get_text(), stoc(b)); 142 | } 143 | 144 | void reset() 145 | { 146 | set(DEFAULT_COLOR); 147 | } 148 | 149 | int invert(int c) 150 | { 151 | if (is_good(c)) { 152 | int a = c % 16; 153 | int b = c / 16; 154 | return b + a * 16; 155 | } 156 | else 157 | return BAD_COLOR; 158 | } 159 | 160 | std::ostream& reset(std::ostream& os) { reset(); return os; } 161 | std::ostream& black(std::ostream& os) { set_text("k"); return os; } 162 | std::ostream& blue(std::ostream& os) { set_text("b"); return os; } 163 | std::ostream& green(std::ostream& os) { set_text("g"); return os; } 164 | std::ostream& aqua(std::ostream& os) { set_text("a"); return os; } 165 | std::ostream& red(std::ostream& os) { set_text("r"); return os; } 166 | std::ostream& purple(std::ostream& os) { set_text("p"); return os; } 167 | std::ostream& yellow(std::ostream& os) { set_text("y"); return os; } 168 | std::ostream& white(std::ostream& os) { set_text("w"); return os; } 169 | std::ostream& grey(std::ostream& os) { set_text("e"); return os; } 170 | std::ostream& light_blue(std::ostream& os) { set_text("lb"); return os; } 171 | std::ostream& light_green(std::ostream& os) { set_text("lg"); return os; } 172 | std::ostream& light_aqua(std::ostream& os) { set_text("la"); return os; } 173 | std::ostream& light_red(std::ostream& os) { set_text("lr"); return os; } 174 | std::ostream& light_purple(std::ostream& os) { set_text("lp"); return os; } 175 | std::ostream& light_yellow(std::ostream& os) { set_text("ly"); return os; } 176 | std::ostream& bright_white(std::ostream& os) { set_text("bw"); return os; } 177 | std::ostream& on_black(std::ostream& os) { set_background("k"); return os; } 178 | std::ostream& on_blue(std::ostream& os) { set_background("b"); return os; } 179 | std::ostream& on_green(std::ostream& os) { set_background("g"); return os; } 180 | std::ostream& on_aqua(std::ostream& os) { set_background("a"); return os; } 181 | std::ostream& on_red(std::ostream& os) { set_background("r"); return os; } 182 | std::ostream& on_purple(std::ostream& os) { set_background("p"); return os; } 183 | std::ostream& on_yellow(std::ostream& os) { set_background("y"); return os; } 184 | std::ostream& on_white(std::ostream& os) { set_background("w"); return os; } 185 | std::ostream& on_grey(std::ostream& os) { set_background("e"); return os; } 186 | std::ostream& on_light_blue(std::ostream& os) { set_background("lb"); return os; } 187 | std::ostream& on_light_green(std::ostream& os) { set_background("lg"); return os; } 188 | std::ostream& on_light_aqua(std::ostream& os) { set_background("la"); return os; } 189 | std::ostream& on_light_red(std::ostream& os) { set_background("lr"); return os; } 190 | std::ostream& on_light_purple(std::ostream& os) { set_background("lp"); return os; } 191 | std::ostream& on_light_yellow(std::ostream& os) { set_background("ly"); return os; } 192 | std::ostream& on_bright_white(std::ostream& os) { set_background("bw"); return os; } 193 | std::ostream& black_on_black(std::ostream& os) { set("k", "k"); return os; } 194 | std::ostream& black_on_blue(std::ostream& os) { set("k", "b"); return os; } 195 | std::ostream& black_on_green(std::ostream& os) { set("k", "g"); return os; } 196 | std::ostream& black_on_aqua(std::ostream& os) { set("k", "a"); return os; } 197 | std::ostream& black_on_red(std::ostream& os) { set("k", "r"); return os; } 198 | std::ostream& black_on_purple(std::ostream& os) { set("k", "p"); return os; } 199 | std::ostream& black_on_yellow(std::ostream& os) { set("k", "y"); return os; } 200 | std::ostream& black_on_white(std::ostream& os) { set("k", "w"); return os; } 201 | std::ostream& black_on_grey(std::ostream& os) { set("k", "e"); return os; } 202 | std::ostream& black_on_light_blue(std::ostream& os) { set("k", "lb"); return os; } 203 | std::ostream& black_on_light_green(std::ostream& os) { set("k", "lg"); return os; } 204 | std::ostream& black_on_light_aqua(std::ostream& os) { set("k", "la"); return os; } 205 | std::ostream& black_on_light_red(std::ostream& os) { set("k", "lr"); return os; } 206 | std::ostream& black_on_light_purple(std::ostream& os) { set("k", "lp"); return os; } 207 | std::ostream& black_on_light_yellow(std::ostream& os) { set("k", "ly"); return os; } 208 | std::ostream& black_on_bright_white(std::ostream& os) { set("k", "bw"); return os; } 209 | std::ostream& blue_on_black(std::ostream& os) { set("b", "k"); return os; } 210 | std::ostream& blue_on_blue(std::ostream& os) { set("b", "b"); return os; } 211 | std::ostream& blue_on_green(std::ostream& os) { set("b", "g"); return os; } 212 | std::ostream& blue_on_aqua(std::ostream& os) { set("b", "a"); return os; } 213 | std::ostream& blue_on_red(std::ostream& os) { set("b", "r"); return os; } 214 | std::ostream& blue_on_purple(std::ostream& os) { set("b", "p"); return os; } 215 | std::ostream& blue_on_yellow(std::ostream& os) { set("b", "y"); return os; } 216 | std::ostream& blue_on_white(std::ostream& os) { set("b", "w"); return os; } 217 | std::ostream& blue_on_grey(std::ostream& os) { set("b", "e"); return os; } 218 | std::ostream& blue_on_light_blue(std::ostream& os) { set("b", "lb"); return os; } 219 | std::ostream& blue_on_light_green(std::ostream& os) { set("b", "lg"); return os; } 220 | std::ostream& blue_on_light_aqua(std::ostream& os) { set("b", "la"); return os; } 221 | std::ostream& blue_on_light_red(std::ostream& os) { set("b", "lr"); return os; } 222 | std::ostream& blue_on_light_purple(std::ostream& os) { set("b", "lp"); return os; } 223 | std::ostream& blue_on_light_yellow(std::ostream& os) { set("b", "ly"); return os; } 224 | std::ostream& blue_on_bright_white(std::ostream& os) { set("b", "bw"); return os; } 225 | std::ostream& green_on_black(std::ostream& os) { set("g", "k"); return os; } 226 | std::ostream& green_on_blue(std::ostream& os) { set("g", "b"); return os; } 227 | std::ostream& green_on_green(std::ostream& os) { set("g", "g"); return os; } 228 | std::ostream& green_on_aqua(std::ostream& os) { set("g", "a"); return os; } 229 | std::ostream& green_on_red(std::ostream& os) { set("g", "r"); return os; } 230 | std::ostream& green_on_purple(std::ostream& os) { set("g", "p"); return os; } 231 | std::ostream& green_on_yellow(std::ostream& os) { set("g", "y"); return os; } 232 | std::ostream& green_on_white(std::ostream& os) { set("g", "w"); return os; } 233 | std::ostream& green_on_grey(std::ostream& os) { set("g", "e"); return os; } 234 | std::ostream& green_on_light_blue(std::ostream& os) { set("g", "lb"); return os; } 235 | std::ostream& green_on_light_green(std::ostream& os) { set("g", "lg"); return os; } 236 | std::ostream& green_on_light_aqua(std::ostream& os) { set("g", "la"); return os; } 237 | std::ostream& green_on_light_red(std::ostream& os) { set("g", "lr"); return os; } 238 | std::ostream& green_on_light_purple(std::ostream& os) { set("g", "lp"); return os; } 239 | std::ostream& green_on_light_yellow(std::ostream& os) { set("g", "ly"); return os; } 240 | std::ostream& green_on_bright_white(std::ostream& os) { set("g", "bw"); return os; } 241 | std::ostream& aqua_on_black(std::ostream& os) { set("a", "k"); return os; } 242 | std::ostream& aqua_on_blue(std::ostream& os) { set("a", "b"); return os; } 243 | std::ostream& aqua_on_green(std::ostream& os) { set("a", "g"); return os; } 244 | std::ostream& aqua_on_aqua(std::ostream& os) { set("a", "a"); return os; } 245 | std::ostream& aqua_on_red(std::ostream& os) { set("a", "r"); return os; } 246 | std::ostream& aqua_on_purple(std::ostream& os) { set("a", "p"); return os; } 247 | std::ostream& aqua_on_yellow(std::ostream& os) { set("a", "y"); return os; } 248 | std::ostream& aqua_on_white(std::ostream& os) { set("a", "w"); return os; } 249 | std::ostream& aqua_on_grey(std::ostream& os) { set("a", "e"); return os; } 250 | std::ostream& aqua_on_light_blue(std::ostream& os) { set("a", "lb"); return os; } 251 | std::ostream& aqua_on_light_green(std::ostream& os) { set("a", "lg"); return os; } 252 | std::ostream& aqua_on_light_aqua(std::ostream& os) { set("a", "la"); return os; } 253 | std::ostream& aqua_on_light_red(std::ostream& os) { set("a", "lr"); return os; } 254 | std::ostream& aqua_on_light_purple(std::ostream& os) { set("a", "lp"); return os; } 255 | std::ostream& aqua_on_light_yellow(std::ostream& os) { set("a", "ly"); return os; } 256 | std::ostream& aqua_on_bright_white(std::ostream& os) { set("a", "bw"); return os; } 257 | std::ostream& red_on_black(std::ostream& os) { set("r", "k"); return os; } 258 | std::ostream& red_on_blue(std::ostream& os) { set("r", "b"); return os; } 259 | std::ostream& red_on_green(std::ostream& os) { set("r", "g"); return os; } 260 | std::ostream& red_on_aqua(std::ostream& os) { set("r", "a"); return os; } 261 | std::ostream& red_on_red(std::ostream& os) { set("r", "r"); return os; } 262 | std::ostream& red_on_purple(std::ostream& os) { set("r", "p"); return os; } 263 | std::ostream& red_on_yellow(std::ostream& os) { set("r", "y"); return os; } 264 | std::ostream& red_on_white(std::ostream& os) { set("r", "w"); return os; } 265 | std::ostream& red_on_grey(std::ostream& os) { set("r", "e"); return os; } 266 | std::ostream& red_on_light_blue(std::ostream& os) { set("r", "lb"); return os; } 267 | std::ostream& red_on_light_green(std::ostream& os) { set("r", "lg"); return os; } 268 | std::ostream& red_on_light_aqua(std::ostream& os) { set("r", "la"); return os; } 269 | std::ostream& red_on_light_red(std::ostream& os) { set("r", "lr"); return os; } 270 | std::ostream& red_on_light_purple(std::ostream& os) { set("r", "lp"); return os; } 271 | std::ostream& red_on_light_yellow(std::ostream& os) { set("r", "ly"); return os; } 272 | std::ostream& red_on_bright_white(std::ostream& os) { set("r", "bw"); return os; } 273 | std::ostream& purple_on_black(std::ostream& os) { set("p", "k"); return os; } 274 | std::ostream& purple_on_blue(std::ostream& os) { set("p", "b"); return os; } 275 | std::ostream& purple_on_green(std::ostream& os) { set("p", "g"); return os; } 276 | std::ostream& purple_on_aqua(std::ostream& os) { set("p", "a"); return os; } 277 | std::ostream& purple_on_red(std::ostream& os) { set("p", "r"); return os; } 278 | std::ostream& purple_on_purple(std::ostream& os) { set("p", "p"); return os; } 279 | std::ostream& purple_on_yellow(std::ostream& os) { set("p", "y"); return os; } 280 | std::ostream& purple_on_white(std::ostream& os) { set("p", "w"); return os; } 281 | std::ostream& purple_on_grey(std::ostream& os) { set("p", "e"); return os; } 282 | std::ostream& purple_on_light_blue(std::ostream& os) { set("p", "lb"); return os; } 283 | std::ostream& purple_on_light_green(std::ostream& os) { set("p", "lg"); return os; } 284 | std::ostream& purple_on_light_aqua(std::ostream& os) { set("p", "la"); return os; } 285 | std::ostream& purple_on_light_red(std::ostream& os) { set("p", "lr"); return os; } 286 | std::ostream& purple_on_light_purple(std::ostream& os) { set("p", "lp"); return os; } 287 | std::ostream& purple_on_light_yellow(std::ostream& os) { set("p", "ly"); return os; } 288 | std::ostream& purple_on_bright_white(std::ostream& os) { set("p", "bw"); return os; } 289 | std::ostream& yellow_on_black(std::ostream& os) { set("y", "k"); return os; } 290 | std::ostream& yellow_on_blue(std::ostream& os) { set("y", "b"); return os; } 291 | std::ostream& yellow_on_green(std::ostream& os) { set("y", "g"); return os; } 292 | std::ostream& yellow_on_aqua(std::ostream& os) { set("y", "a"); return os; } 293 | std::ostream& yellow_on_red(std::ostream& os) { set("y", "r"); return os; } 294 | std::ostream& yellow_on_purple(std::ostream& os) { set("y", "p"); return os; } 295 | std::ostream& yellow_on_yellow(std::ostream& os) { set("y", "y"); return os; } 296 | std::ostream& yellow_on_white(std::ostream& os) { set("y", "w"); return os; } 297 | std::ostream& yellow_on_grey(std::ostream& os) { set("y", "e"); return os; } 298 | std::ostream& yellow_on_light_blue(std::ostream& os) { set("y", "lb"); return os; } 299 | std::ostream& yellow_on_light_green(std::ostream& os) { set("y", "lg"); return os; } 300 | std::ostream& yellow_on_light_aqua(std::ostream& os) { set("y", "la"); return os; } 301 | std::ostream& yellow_on_light_red(std::ostream& os) { set("y", "lr"); return os; } 302 | std::ostream& yellow_on_light_purple(std::ostream& os) { set("y", "lp"); return os; } 303 | std::ostream& yellow_on_light_yellow(std::ostream& os) { set("y", "ly"); return os; } 304 | std::ostream& yellow_on_bright_white(std::ostream& os) { set("y", "bw"); return os; } 305 | std::ostream& white_on_black(std::ostream& os) { set("w", "k"); return os; } 306 | std::ostream& white_on_blue(std::ostream& os) { set("w", "b"); return os; } 307 | std::ostream& white_on_green(std::ostream& os) { set("w", "g"); return os; } 308 | std::ostream& white_on_aqua(std::ostream& os) { set("w", "a"); return os; } 309 | std::ostream& white_on_red(std::ostream& os) { set("w", "r"); return os; } 310 | std::ostream& white_on_purple(std::ostream& os) { set("w", "p"); return os; } 311 | std::ostream& white_on_yellow(std::ostream& os) { set("w", "y"); return os; } 312 | std::ostream& white_on_white(std::ostream& os) { set("w", "w"); return os; } 313 | std::ostream& white_on_grey(std::ostream& os) { set("w", "e"); return os; } 314 | std::ostream& white_on_light_blue(std::ostream& os) { set("w", "lb"); return os; } 315 | std::ostream& white_on_light_green(std::ostream& os) { set("w", "lg"); return os; } 316 | std::ostream& white_on_light_aqua(std::ostream& os) { set("w", "la"); return os; } 317 | std::ostream& white_on_light_red(std::ostream& os) { set("w", "lr"); return os; } 318 | std::ostream& white_on_light_purple(std::ostream& os) { set("w", "lp"); return os; } 319 | std::ostream& white_on_light_yellow(std::ostream& os) { set("w", "ly"); return os; } 320 | std::ostream& white_on_bright_white(std::ostream& os) { set("w", "bw"); return os; } 321 | std::ostream& grey_on_black(std::ostream& os) { set("e", "k"); return os; } 322 | std::ostream& grey_on_blue(std::ostream& os) { set("e", "b"); return os; } 323 | std::ostream& grey_on_green(std::ostream& os) { set("e", "g"); return os; } 324 | std::ostream& grey_on_aqua(std::ostream& os) { set("e", "a"); return os; } 325 | std::ostream& grey_on_red(std::ostream& os) { set("e", "r"); return os; } 326 | std::ostream& grey_on_purple(std::ostream& os) { set("e", "p"); return os; } 327 | std::ostream& grey_on_yellow(std::ostream& os) { set("e", "y"); return os; } 328 | std::ostream& grey_on_white(std::ostream& os) { set("e", "w"); return os; } 329 | std::ostream& grey_on_grey(std::ostream& os) { set("e", "e"); return os; } 330 | std::ostream& grey_on_light_blue(std::ostream& os) { set("e", "lb"); return os; } 331 | std::ostream& grey_on_light_green(std::ostream& os) { set("e", "lg"); return os; } 332 | std::ostream& grey_on_light_aqua(std::ostream& os) { set("e", "la"); return os; } 333 | std::ostream& grey_on_light_red(std::ostream& os) { set("e", "lr"); return os; } 334 | std::ostream& grey_on_light_purple(std::ostream& os) { set("e", "lp"); return os; } 335 | std::ostream& grey_on_light_yellow(std::ostream& os) { set("e", "ly"); return os; } 336 | std::ostream& grey_on_bright_white(std::ostream& os) { set("e", "bw"); return os; } 337 | std::ostream& light_blue_on_black(std::ostream& os) { set("lb", "k"); return os; } 338 | std::ostream& light_blue_on_blue(std::ostream& os) { set("lb", "b"); return os; } 339 | std::ostream& light_blue_on_green(std::ostream& os) { set("lb", "g"); return os; } 340 | std::ostream& light_blue_on_aqua(std::ostream& os) { set("lb", "a"); return os; } 341 | std::ostream& light_blue_on_red(std::ostream& os) { set("lb", "r"); return os; } 342 | std::ostream& light_blue_on_purple(std::ostream& os) { set("lb", "p"); return os; } 343 | std::ostream& light_blue_on_yellow(std::ostream& os) { set("lb", "y"); return os; } 344 | std::ostream& light_blue_on_white(std::ostream& os) { set("lb", "w"); return os; } 345 | std::ostream& light_blue_on_grey(std::ostream& os) { set("lb", "e"); return os; } 346 | std::ostream& light_blue_on_light_blue(std::ostream& os) { set("lb", "lb"); return os; } 347 | std::ostream& light_blue_on_light_green(std::ostream& os) { set("lb", "lg"); return os; } 348 | std::ostream& light_blue_on_light_aqua(std::ostream& os) { set("lb", "la"); return os; } 349 | std::ostream& light_blue_on_light_red(std::ostream& os) { set("lb", "lr"); return os; } 350 | std::ostream& light_blue_on_light_purple(std::ostream& os) { set("lb", "lp"); return os; } 351 | std::ostream& light_blue_on_light_yellow(std::ostream& os) { set("lb", "ly"); return os; } 352 | std::ostream& light_blue_on_bright_white(std::ostream& os) { set("lb", "bw"); return os; } 353 | std::ostream& light_green_on_black(std::ostream& os) { set("lg", "k"); return os; } 354 | std::ostream& light_green_on_blue(std::ostream& os) { set("lg", "b"); return os; } 355 | std::ostream& light_green_on_green(std::ostream& os) { set("lg", "g"); return os; } 356 | std::ostream& light_green_on_aqua(std::ostream& os) { set("lg", "a"); return os; } 357 | std::ostream& light_green_on_red(std::ostream& os) { set("lg", "r"); return os; } 358 | std::ostream& light_green_on_purple(std::ostream& os) { set("lg", "p"); return os; } 359 | std::ostream& light_green_on_yellow(std::ostream& os) { set("lg", "y"); return os; } 360 | std::ostream& light_green_on_white(std::ostream& os) { set("lg", "w"); return os; } 361 | std::ostream& light_green_on_grey(std::ostream& os) { set("lg", "e"); return os; } 362 | std::ostream& light_green_on_light_blue(std::ostream& os) { set("lg", "lb"); return os; } 363 | std::ostream& light_green_on_light_green(std::ostream& os) { set("lg", "lg"); return os; } 364 | std::ostream& light_green_on_light_aqua(std::ostream& os) { set("lg", "la"); return os; } 365 | std::ostream& light_green_on_light_red(std::ostream& os) { set("lg", "lr"); return os; } 366 | std::ostream& light_green_on_light_purple(std::ostream& os) { set("lg", "lp"); return os; } 367 | std::ostream& light_green_on_light_yellow(std::ostream& os) { set("lg", "ly"); return os; } 368 | std::ostream& light_green_on_bright_white(std::ostream& os) { set("lg", "bw"); return os; } 369 | std::ostream& light_aqua_on_black(std::ostream& os) { set("la", "k"); return os; } 370 | std::ostream& light_aqua_on_blue(std::ostream& os) { set("la", "b"); return os; } 371 | std::ostream& light_aqua_on_green(std::ostream& os) { set("la", "g"); return os; } 372 | std::ostream& light_aqua_on_aqua(std::ostream& os) { set("la", "a"); return os; } 373 | std::ostream& light_aqua_on_red(std::ostream& os) { set("la", "r"); return os; } 374 | std::ostream& light_aqua_on_purple(std::ostream& os) { set("la", "p"); return os; } 375 | std::ostream& light_aqua_on_yellow(std::ostream& os) { set("la", "y"); return os; } 376 | std::ostream& light_aqua_on_white(std::ostream& os) { set("la", "w"); return os; } 377 | std::ostream& light_aqua_on_grey(std::ostream& os) { set("la", "e"); return os; } 378 | std::ostream& light_aqua_on_light_blue(std::ostream& os) { set("la", "lb"); return os; } 379 | std::ostream& light_aqua_on_light_green(std::ostream& os) { set("la", "lg"); return os; } 380 | std::ostream& light_aqua_on_light_aqua(std::ostream& os) { set("la", "la"); return os; } 381 | std::ostream& light_aqua_on_light_red(std::ostream& os) { set("la", "lr"); return os; } 382 | std::ostream& light_aqua_on_light_purple(std::ostream& os) { set("la", "lp"); return os; } 383 | std::ostream& light_aqua_on_light_yellow(std::ostream& os) { set("la", "ly"); return os; } 384 | std::ostream& light_aqua_on_bright_white(std::ostream& os) { set("la", "bw"); return os; } 385 | std::ostream& light_red_on_black(std::ostream& os) { set("lr", "k"); return os; } 386 | std::ostream& light_red_on_blue(std::ostream& os) { set("lr", "b"); return os; } 387 | std::ostream& light_red_on_green(std::ostream& os) { set("lr", "g"); return os; } 388 | std::ostream& light_red_on_aqua(std::ostream& os) { set("lr", "a"); return os; } 389 | std::ostream& light_red_on_red(std::ostream& os) { set("lr", "r"); return os; } 390 | std::ostream& light_red_on_purple(std::ostream& os) { set("lr", "p"); return os; } 391 | std::ostream& light_red_on_yellow(std::ostream& os) { set("lr", "y"); return os; } 392 | std::ostream& light_red_on_white(std::ostream& os) { set("lr", "w"); return os; } 393 | std::ostream& light_red_on_grey(std::ostream& os) { set("lr", "e"); return os; } 394 | std::ostream& light_red_on_light_blue(std::ostream& os) { set("lr", "lb"); return os; } 395 | std::ostream& light_red_on_light_green(std::ostream& os) { set("lr", "lg"); return os; } 396 | std::ostream& light_red_on_light_aqua(std::ostream& os) { set("lr", "la"); return os; } 397 | std::ostream& light_red_on_light_red(std::ostream& os) { set("lr", "lr"); return os; } 398 | std::ostream& light_red_on_light_purple(std::ostream& os) { set("lr", "lp"); return os; } 399 | std::ostream& light_red_on_light_yellow(std::ostream& os) { set("lr", "ly"); return os; } 400 | std::ostream& light_red_on_bright_white(std::ostream& os) { set("lr", "bw"); return os; } 401 | std::ostream& light_purple_on_black(std::ostream& os) { set("lp", "k"); return os; } 402 | std::ostream& light_purple_on_blue(std::ostream& os) { set("lp", "b"); return os; } 403 | std::ostream& light_purple_on_green(std::ostream& os) { set("lp", "g"); return os; } 404 | std::ostream& light_purple_on_aqua(std::ostream& os) { set("lp", "a"); return os; } 405 | std::ostream& light_purple_on_red(std::ostream& os) { set("lp", "r"); return os; } 406 | std::ostream& light_purple_on_purple(std::ostream& os) { set("lp", "p"); return os; } 407 | std::ostream& light_purple_on_yellow(std::ostream& os) { set("lp", "y"); return os; } 408 | std::ostream& light_purple_on_white(std::ostream& os) { set("lp", "w"); return os; } 409 | std::ostream& light_purple_on_grey(std::ostream& os) { set("lp", "e"); return os; } 410 | std::ostream& light_purple_on_light_blue(std::ostream& os) { set("lp", "lb"); return os; } 411 | std::ostream& light_purple_on_light_green(std::ostream& os) { set("lp", "lg"); return os; } 412 | std::ostream& light_purple_on_light_aqua(std::ostream& os) { set("lp", "la"); return os; } 413 | std::ostream& light_purple_on_light_red(std::ostream& os) { set("lp", "lr"); return os; } 414 | std::ostream& light_purple_on_light_purple(std::ostream& os) { set("lp", "lp"); return os; } 415 | std::ostream& light_purple_on_light_yellow(std::ostream& os) { set("lp", "ly"); return os; } 416 | std::ostream& light_purple_on_bright_white(std::ostream& os) { set("lp", "bw"); return os; } 417 | std::ostream& light_yellow_on_black(std::ostream& os) { set("ly", "k"); return os; } 418 | std::ostream& light_yellow_on_blue(std::ostream& os) { set("ly", "b"); return os; } 419 | std::ostream& light_yellow_on_green(std::ostream& os) { set("ly", "g"); return os; } 420 | std::ostream& light_yellow_on_aqua(std::ostream& os) { set("ly", "a"); return os; } 421 | std::ostream& light_yellow_on_red(std::ostream& os) { set("ly", "r"); return os; } 422 | std::ostream& light_yellow_on_purple(std::ostream& os) { set("ly", "p"); return os; } 423 | std::ostream& light_yellow_on_yellow(std::ostream& os) { set("ly", "y"); return os; } 424 | std::ostream& light_yellow_on_white(std::ostream& os) { set("ly", "w"); return os; } 425 | std::ostream& light_yellow_on_grey(std::ostream& os) { set("ly", "e"); return os; } 426 | std::ostream& light_yellow_on_light_blue(std::ostream& os) { set("ly", "lb"); return os; } 427 | std::ostream& light_yellow_on_light_green(std::ostream& os) { set("ly", "lg"); return os; } 428 | std::ostream& light_yellow_on_light_aqua(std::ostream& os) { set("ly", "la"); return os; } 429 | std::ostream& light_yellow_on_light_red(std::ostream& os) { set("ly", "lr"); return os; } 430 | std::ostream& light_yellow_on_light_purple(std::ostream& os) { set("ly", "lp"); return os; } 431 | std::ostream& light_yellow_on_light_yellow(std::ostream& os) { set("ly", "ly"); return os; } 432 | std::ostream& light_yellow_on_bright_white(std::ostream& os) { set("ly", "bw"); return os; } 433 | std::ostream& bright_white_on_black(std::ostream& os) { set("bw", "k"); return os; } 434 | std::ostream& bright_white_on_blue(std::ostream& os) { set("bw", "b"); return os; } 435 | std::ostream& bright_white_on_green(std::ostream& os) { set("bw", "g"); return os; } 436 | std::ostream& bright_white_on_aqua(std::ostream& os) { set("bw", "a"); return os; } 437 | std::ostream& bright_white_on_red(std::ostream& os) { set("bw", "r"); return os; } 438 | std::ostream& bright_white_on_purple(std::ostream& os) { set("bw", "p"); return os; } 439 | std::ostream& bright_white_on_yellow(std::ostream& os) { set("bw", "y"); return os; } 440 | std::ostream& bright_white_on_white(std::ostream& os) { set("bw", "w"); return os; } 441 | std::ostream& bright_white_on_grey(std::ostream& os) { set("bw", "e"); return os; } 442 | std::ostream& bright_white_on_light_blue(std::ostream& os) { set("bw", "lb"); return os; } 443 | std::ostream& bright_white_on_light_green(std::ostream& os) { set("bw", "lg"); return os; } 444 | std::ostream& bright_white_on_light_aqua(std::ostream& os) { set("bw", "la"); return os; } 445 | std::ostream& bright_white_on_light_red(std::ostream& os) { set("bw", "lr"); return os; } 446 | std::ostream& bright_white_on_light_purple(std::ostream& os) { set("bw", "lp"); return os; } 447 | std::ostream& bright_white_on_light_yellow(std::ostream& os) { set("bw", "ly"); return os; } 448 | std::ostream& bright_white_on_bright_white(std::ostream& os) { set("bw", "bw"); return os; } 449 | } 450 | 451 | 452 | namespace color 453 | { 454 | template 455 | using bar = typename std::conditional::value, std::string, T>::type; 456 | 457 | template class colorful; 458 | template class item; 459 | 460 | template 461 | class colorful : private std::list> 462 | { 463 | public: 464 | using std::list>::list; 465 | 466 | colorful& operator+=(const colorful& rhs) 467 | { 468 | this->insert(this->end(), rhs.begin(), rhs.end()); 469 | return *this; 470 | } 471 | 472 | colorful& operator+=(colorful&& rhs) 473 | { 474 | this->splice(this->end(), std::move(rhs)); 475 | return *this; 476 | } 477 | 478 | colorful& operator+=(T t) 479 | { 480 | this->push_back(std::move(t)); 481 | return *this; 482 | } 483 | 484 | void push_front(T t) 485 | { 486 | this->std::list>::push_front(item(std::move(t))); 487 | } 488 | 489 | void push_back(T t) 490 | { 491 | this->std::list>::push_back(item(std::move(t))); 492 | } 493 | 494 | colorful& invert() 495 | { 496 | for (auto& elem : *this) 497 | elem.invert(); 498 | return *this; 499 | } 500 | 501 | template 502 | friend std::ostream& operator<<(std::ostream&, const colorful&); 503 | 504 | template 505 | friend colorful invert(colorful col); 506 | }; 507 | 508 | template 509 | colorful operator+(colorful lhs, colorful rhs) 510 | { 511 | colorful res(std::move(lhs)); 512 | return res += rhs; 513 | } 514 | 515 | template 516 | colorful operator+(colorful lhs, std::string rhs) 517 | { 518 | colorful res(std::move(lhs)); 519 | res.push_back(std::move(rhs)); 520 | return res; 521 | } 522 | 523 | template 524 | colorful operator+(const std::string& lhs, colorful rhs) 525 | { 526 | colorful res(std::move(rhs)); 527 | res.push_front(std::move(lhs)); 528 | return res; 529 | } 530 | 531 | template 532 | std::ostream& operator<<(std::ostream& os, const colorful& colorful) 533 | { 534 | for (const auto& elem : colorful) 535 | os << elem; 536 | return os; 537 | } 538 | 539 | template 540 | colorful invert(colorful col) 541 | { 542 | colorful res(std::move(col)); 543 | for (auto& elem : res) 544 | elem.invert(); 545 | return res; 546 | } 547 | 548 | template 549 | class item 550 | { 551 | T thing; 552 | int color; 553 | 554 | public: 555 | item(T t) : thing(std::move(t)), color(hue::get()) {} 556 | item(T t, int a) : thing(std::move(t)), color(hue::itoc(a)) {} 557 | item(T t, int a, int b) : thing(std::move(t)), color(hue::itoc(a, b)) {} 558 | item(T t, std::string a) : thing(std::move(t)), color(hue::stoc(a)) {} 559 | item(T t, std::string a, std::string b) : thing(std::move(t)), color(hue::stoc(a, b)) {} 560 | 561 | item& invert() 562 | { 563 | color = hue::invert(color); 564 | return *this; 565 | } 566 | 567 | template 568 | friend class colorful; 569 | 570 | template 571 | friend std::ostream& operator<<(std::ostream&, const item&); 572 | }; 573 | 574 | template 575 | std::ostream& operator<<(std::ostream& os, const item& it) 576 | { 577 | hue::set(it.color); 578 | os << it.thing; 579 | hue::reset(); 580 | return os; 581 | } 582 | 583 | template using R = colorful>; 584 | template using S = item>; 585 | 586 | template R colorize(T t, std::string a) { return R { S(t, a) }; } 587 | template R vanilla(T t) { return R { S(t) }; } 588 | template R black(T t) { return R { S(t, "k") }; } 589 | template R blue(T t) { return R { S(t, "b") }; } 590 | template R green(T t) { return R { S(t, "g") }; } 591 | template R aqua(T t) { return R { S(t, "a") }; } 592 | template R red(T t) { return R { S(t, "r") }; } 593 | template R purple(T t) { return R { S(t, "p") }; } 594 | template R yellow(T t) { return R { S(t, "y") }; } 595 | template R white(T t) { return R { S(t, "w") }; } 596 | template R grey(T t) { return R { S(t, "e") }; } 597 | template R light_blue(T t) { return R { S(t, "lb") }; } 598 | template R light_green(T t) { return R { S(t, "lg") }; } 599 | template R light_aqua(T t) { return R { S(t, "la") }; } 600 | template R light_red(T t) { return R { S(t, "lr") }; } 601 | template R light_purple(T t) { return R { S(t, "lp") }; } 602 | template R light_yellow(T t) { return R { S(t, "ly") }; } 603 | template R bright_white(T t) { return R { S(t, "bw") }; } 604 | template R on_black(T t) { return R { S(t, "k", "k") }; } 605 | template R on_blue(T t) { return R { S(t, "k", "b") }; } 606 | template R on_green(T t) { return R { S(t, "k", "g") }; } 607 | template R on_aqua(T t) { return R { S(t, "k", "a") }; } 608 | template R on_red(T t) { return R { S(t, "k", "r") }; } 609 | template R on_purple(T t) { return R { S(t, "k", "p") }; } 610 | template R on_yellow(T t) { return R { S(t, "k", "y") }; } 611 | template R on_white(T t) { return R { S(t, "k", "w") }; } 612 | template R on_grey(T t) { return R { S(t, "k", "e") }; } 613 | template R on_light_blue(T t) { return R { S(t, "k", "lb") }; } 614 | template R on_light_green(T t) { return R { S(t, "k", "lg") }; } 615 | template R on_light_aqua(T t) { return R { S(t, "k", "la") }; } 616 | template R on_light_red(T t) { return R { S(t, "k", "lr") }; } 617 | template R on_light_purple(T t) { return R { S(t, "k", "lp") }; } 618 | template R on_light_yellow(T t) { return R { S(t, "k", "ly") }; } 619 | template R on_bright_white(T t) { return R { S(t, "k", "bw") }; } 620 | template R black_on_black(T t) { return R { S(t, "k", "k") }; } 621 | template R black_on_blue(T t) { return R { S(t, "k", "b") }; } 622 | template R black_on_green(T t) { return R { S(t, "k", "g") }; } 623 | template R black_on_aqua(T t) { return R { S(t, "k", "a") }; } 624 | template R black_on_red(T t) { return R { S(t, "k", "r") }; } 625 | template R black_on_purple(T t) { return R { S(t, "k", "p") }; } 626 | template R black_on_yellow(T t) { return R { S(t, "k", "y") }; } 627 | template R black_on_white(T t) { return R { S(t, "k", "w") }; } 628 | template R black_on_grey(T t) { return R { S(t, "k", "e") }; } 629 | template R black_on_light_blue(T t) { return R { S(t, "k", "lb") }; } 630 | template R black_on_light_green(T t) { return R { S(t, "k", "lg") }; } 631 | template R black_on_light_aqua(T t) { return R { S(t, "k", "la") }; } 632 | template R black_on_light_red(T t) { return R { S(t, "k", "lr") }; } 633 | template R black_on_light_purple(T t) { return R { S(t, "k", "lp") }; } 634 | template R black_on_light_yellow(T t) { return R { S(t, "k", "ly") }; } 635 | template R black_on_bright_white(T t) { return R { S(t, "k", "bw") }; } 636 | template R blue_on_black(T t) { return R { S(t, "b", "k") }; } 637 | template R blue_on_blue(T t) { return R { S(t, "b", "b") }; } 638 | template R blue_on_green(T t) { return R { S(t, "b", "g") }; } 639 | template R blue_on_aqua(T t) { return R { S(t, "b", "a") }; } 640 | template R blue_on_red(T t) { return R { S(t, "b", "r") }; } 641 | template R blue_on_purple(T t) { return R { S(t, "b", "p") }; } 642 | template R blue_on_yellow(T t) { return R { S(t, "b", "y") }; } 643 | template R blue_on_white(T t) { return R { S(t, "b", "w") }; } 644 | template R blue_on_grey(T t) { return R { S(t, "b", "e") }; } 645 | template R blue_on_light_blue(T t) { return R { S(t, "b", "lb") }; } 646 | template R blue_on_light_green(T t) { return R { S(t, "b", "lg") }; } 647 | template R blue_on_light_aqua(T t) { return R { S(t, "b", "la") }; } 648 | template R blue_on_light_red(T t) { return R { S(t, "b", "lr") }; } 649 | template R blue_on_light_purple(T t) { return R { S(t, "b", "lp") }; } 650 | template R blue_on_light_yellow(T t) { return R { S(t, "b", "ly") }; } 651 | template R blue_on_bright_white(T t) { return R { S(t, "b", "bw") }; } 652 | template R green_on_black(T t) { return R { S(t, "g", "k") }; } 653 | template R green_on_blue(T t) { return R { S(t, "g", "b") }; } 654 | template R green_on_green(T t) { return R { S(t, "g", "g") }; } 655 | template R green_on_aqua(T t) { return R { S(t, "g", "a") }; } 656 | template R green_on_red(T t) { return R { S(t, "g", "r") }; } 657 | template R green_on_purple(T t) { return R { S(t, "g", "p") }; } 658 | template R green_on_yellow(T t) { return R { S(t, "g", "y") }; } 659 | template R green_on_white(T t) { return R { S(t, "g", "w") }; } 660 | template R green_on_grey(T t) { return R { S(t, "g", "e") }; } 661 | template R green_on_light_blue(T t) { return R { S(t, "g", "lb") }; } 662 | template R green_on_light_green(T t) { return R { S(t, "g", "lg") }; } 663 | template R green_on_light_aqua(T t) { return R { S(t, "g", "la") }; } 664 | template R green_on_light_red(T t) { return R { S(t, "g", "lr") }; } 665 | template R green_on_light_purple(T t) { return R { S(t, "g", "lp") }; } 666 | template R green_on_light_yellow(T t) { return R { S(t, "g", "ly") }; } 667 | template R green_on_bright_white(T t) { return R { S(t, "g", "bw") }; } 668 | template R aqua_on_black(T t) { return R { S(t, "a", "k") }; } 669 | template R aqua_on_blue(T t) { return R { S(t, "a", "b") }; } 670 | template R aqua_on_green(T t) { return R { S(t, "a", "g") }; } 671 | template R aqua_on_aqua(T t) { return R { S(t, "a", "a") }; } 672 | template R aqua_on_red(T t) { return R { S(t, "a", "r") }; } 673 | template R aqua_on_purple(T t) { return R { S(t, "a", "p") }; } 674 | template R aqua_on_yellow(T t) { return R { S(t, "a", "y") }; } 675 | template R aqua_on_white(T t) { return R { S(t, "a", "w") }; } 676 | template R aqua_on_grey(T t) { return R { S(t, "a", "e") }; } 677 | template R aqua_on_light_blue(T t) { return R { S(t, "a", "lb") }; } 678 | template R aqua_on_light_green(T t) { return R { S(t, "a", "lg") }; } 679 | template R aqua_on_light_aqua(T t) { return R { S(t, "a", "la") }; } 680 | template R aqua_on_light_red(T t) { return R { S(t, "a", "lr") }; } 681 | template R aqua_on_light_purple(T t) { return R { S(t, "a", "lp") }; } 682 | template R aqua_on_light_yellow(T t) { return R { S(t, "a", "ly") }; } 683 | template R aqua_on_bright_white(T t) { return R { S(t, "a", "bw") }; } 684 | template R red_on_black(T t) { return R { S(t, "r", "k") }; } 685 | template R red_on_blue(T t) { return R { S(t, "r", "b") }; } 686 | template R red_on_green(T t) { return R { S(t, "r", "g") }; } 687 | template R red_on_aqua(T t) { return R { S(t, "r", "a") }; } 688 | template R red_on_red(T t) { return R { S(t, "r", "r") }; } 689 | template R red_on_purple(T t) { return R { S(t, "r", "p") }; } 690 | template R red_on_yellow(T t) { return R { S(t, "r", "y") }; } 691 | template R red_on_white(T t) { return R { S(t, "r", "w") }; } 692 | template R red_on_grey(T t) { return R { S(t, "r", "e") }; } 693 | template R red_on_light_blue(T t) { return R { S(t, "r", "lb") }; } 694 | template R red_on_light_green(T t) { return R { S(t, "r", "lg") }; } 695 | template R red_on_light_aqua(T t) { return R { S(t, "r", "la") }; } 696 | template R red_on_light_red(T t) { return R { S(t, "r", "lr") }; } 697 | template R red_on_light_purple(T t) { return R { S(t, "r", "lp") }; } 698 | template R red_on_light_yellow(T t) { return R { S(t, "r", "ly") }; } 699 | template R red_on_bright_white(T t) { return R { S(t, "r", "bw") }; } 700 | template R purple_on_black(T t) { return R { S(t, "p", "k") }; } 701 | template R purple_on_blue(T t) { return R { S(t, "p", "b") }; } 702 | template R purple_on_green(T t) { return R { S(t, "p", "g") }; } 703 | template R purple_on_aqua(T t) { return R { S(t, "p", "a") }; } 704 | template R purple_on_red(T t) { return R { S(t, "p", "r") }; } 705 | template R purple_on_purple(T t) { return R { S(t, "p", "p") }; } 706 | template R purple_on_yellow(T t) { return R { S(t, "p", "y") }; } 707 | template R purple_on_white(T t) { return R { S(t, "p", "w") }; } 708 | template R purple_on_grey(T t) { return R { S(t, "p", "e") }; } 709 | template R purple_on_light_blue(T t) { return R { S(t, "p", "lb") }; } 710 | template R purple_on_light_green(T t) { return R { S(t, "p", "lg") }; } 711 | template R purple_on_light_aqua(T t) { return R { S(t, "p", "la") }; } 712 | template R purple_on_light_red(T t) { return R { S(t, "p", "lr") }; } 713 | template R purple_on_light_purple(T t) { return R { S(t, "p", "lp") }; } 714 | template R purple_on_light_yellow(T t) { return R { S(t, "p", "ly") }; } 715 | template R purple_on_bright_white(T t) { return R { S(t, "p", "bw") }; } 716 | template R yellow_on_black(T t) { return R { S(t, "y", "k") }; } 717 | template R yellow_on_blue(T t) { return R { S(t, "y", "b") }; } 718 | template R yellow_on_green(T t) { return R { S(t, "y", "g") }; } 719 | template R yellow_on_aqua(T t) { return R { S(t, "y", "a") }; } 720 | template R yellow_on_red(T t) { return R { S(t, "y", "r") }; } 721 | template R yellow_on_purple(T t) { return R { S(t, "y", "p") }; } 722 | template R yellow_on_yellow(T t) { return R { S(t, "y", "y") }; } 723 | template R yellow_on_white(T t) { return R { S(t, "y", "w") }; } 724 | template R yellow_on_grey(T t) { return R { S(t, "y", "e") }; } 725 | template R yellow_on_light_blue(T t) { return R { S(t, "y", "lb") }; } 726 | template R yellow_on_light_green(T t) { return R { S(t, "y", "lg") }; } 727 | template R yellow_on_light_aqua(T t) { return R { S(t, "y", "la") }; } 728 | template R yellow_on_light_red(T t) { return R { S(t, "y", "lr") }; } 729 | template R yellow_on_light_purple(T t) { return R { S(t, "y", "lp") }; } 730 | template R yellow_on_light_yellow(T t) { return R { S(t, "y", "ly") }; } 731 | template R yellow_on_bright_white(T t) { return R { S(t, "y", "bw") }; } 732 | template R white_on_black(T t) { return R { S(t, "w", "k") }; } 733 | template R white_on_blue(T t) { return R { S(t, "w", "b") }; } 734 | template R white_on_green(T t) { return R { S(t, "w", "g") }; } 735 | template R white_on_aqua(T t) { return R { S(t, "w", "a") }; } 736 | template R white_on_red(T t) { return R { S(t, "w", "r") }; } 737 | template R white_on_purple(T t) { return R { S(t, "w", "p") }; } 738 | template R white_on_yellow(T t) { return R { S(t, "w", "y") }; } 739 | template R white_on_white(T t) { return R { S(t, "w", "w") }; } 740 | template R white_on_grey(T t) { return R { S(t, "w", "e") }; } 741 | template R white_on_light_blue(T t) { return R { S(t, "w", "lb") }; } 742 | template R white_on_light_green(T t) { return R { S(t, "w", "lg") }; } 743 | template R white_on_light_aqua(T t) { return R { S(t, "w", "la") }; } 744 | template R white_on_light_red(T t) { return R { S(t, "w", "lr") }; } 745 | template R white_on_light_purple(T t) { return R { S(t, "w", "lp") }; } 746 | template R white_on_light_yellow(T t) { return R { S(t, "w", "ly") }; } 747 | template R white_on_bright_white(T t) { return R { S(t, "w", "bw") }; } 748 | template R grey_on_black(T t) { return R { S(t, "e", "k") }; } 749 | template R grey_on_blue(T t) { return R { S(t, "e", "b") }; } 750 | template R grey_on_green(T t) { return R { S(t, "e", "g") }; } 751 | template R grey_on_aqua(T t) { return R { S(t, "e", "a") }; } 752 | template R grey_on_red(T t) { return R { S(t, "e", "r") }; } 753 | template R grey_on_purple(T t) { return R { S(t, "e", "p") }; } 754 | template R grey_on_yellow(T t) { return R { S(t, "e", "y") }; } 755 | template R grey_on_white(T t) { return R { S(t, "e", "w") }; } 756 | template R grey_on_grey(T t) { return R { S(t, "e", "e") }; } 757 | template R grey_on_light_blue(T t) { return R { S(t, "e", "lb") }; } 758 | template R grey_on_light_green(T t) { return R { S(t, "e", "lg") }; } 759 | template R grey_on_light_aqua(T t) { return R { S(t, "e", "la") }; } 760 | template R grey_on_light_red(T t) { return R { S(t, "e", "lr") }; } 761 | template R grey_on_light_purple(T t) { return R { S(t, "e", "lp") }; } 762 | template R grey_on_light_yellow(T t) { return R { S(t, "e", "ly") }; } 763 | template R grey_on_bright_white(T t) { return R { S(t, "e", "bw") }; } 764 | template R light_blue_on_black(T t) { return R { S(t, "lb", "k") }; } 765 | template R light_blue_on_blue(T t) { return R { S(t, "lb", "b") }; } 766 | template R light_blue_on_green(T t) { return R { S(t, "lb", "g") }; } 767 | template R light_blue_on_aqua(T t) { return R { S(t, "lb", "a") }; } 768 | template R light_blue_on_red(T t) { return R { S(t, "lb", "r") }; } 769 | template R light_blue_on_purple(T t) { return R { S(t, "lb", "p") }; } 770 | template R light_blue_on_yellow(T t) { return R { S(t, "lb", "y") }; } 771 | template R light_blue_on_white(T t) { return R { S(t, "lb", "w") }; } 772 | template R light_blue_on_grey(T t) { return R { S(t, "lb", "e") }; } 773 | template R light_blue_on_light_blue(T t) { return R { S(t, "lb", "lb") }; } 774 | template R light_blue_on_light_green(T t) { return R { S(t, "lb", "lg") }; } 775 | template R light_blue_on_light_aqua(T t) { return R { S(t, "lb", "la") }; } 776 | template R light_blue_on_light_red(T t) { return R { S(t, "lb", "lr") }; } 777 | template R light_blue_on_light_purple(T t) { return R { S(t, "lb", "lp") }; } 778 | template R light_blue_on_light_yellow(T t) { return R { S(t, "lb", "ly") }; } 779 | template R light_blue_on_bright_white(T t) { return R { S(t, "lb", "bw") }; } 780 | template R light_green_on_black(T t) { return R { S(t, "lg", "k") }; } 781 | template R light_green_on_blue(T t) { return R { S(t, "lg", "b") }; } 782 | template R light_green_on_green(T t) { return R { S(t, "lg", "g") }; } 783 | template R light_green_on_aqua(T t) { return R { S(t, "lg", "a") }; } 784 | template R light_green_on_red(T t) { return R { S(t, "lg", "r") }; } 785 | template R light_green_on_purple(T t) { return R { S(t, "lg", "p") }; } 786 | template R light_green_on_yellow(T t) { return R { S(t, "lg", "y") }; } 787 | template R light_green_on_white(T t) { return R { S(t, "lg", "w") }; } 788 | template R light_green_on_grey(T t) { return R { S(t, "lg", "e") }; } 789 | template R light_green_on_light_blue(T t) { return R { S(t, "lg", "lb") }; } 790 | template R light_green_on_light_green(T t) { return R { S(t, "lg", "lg") }; } 791 | template R light_green_on_light_aqua(T t) { return R { S(t, "lg", "la") }; } 792 | template R light_green_on_light_red(T t) { return R { S(t, "lg", "lr") }; } 793 | template R light_green_on_light_purple(T t) { return R { S(t, "lg", "lp") }; } 794 | template R light_green_on_light_yellow(T t) { return R { S(t, "lg", "ly") }; } 795 | template R light_green_on_bright_white(T t) { return R { S(t, "lg", "bw") }; } 796 | template R light_aqua_on_black(T t) { return R { S(t, "la", "k") }; } 797 | template R light_aqua_on_blue(T t) { return R { S(t, "la", "b") }; } 798 | template R light_aqua_on_green(T t) { return R { S(t, "la", "g") }; } 799 | template R light_aqua_on_aqua(T t) { return R { S(t, "la", "a") }; } 800 | template R light_aqua_on_red(T t) { return R { S(t, "la", "r") }; } 801 | template R light_aqua_on_purple(T t) { return R { S(t, "la", "p") }; } 802 | template R light_aqua_on_yellow(T t) { return R { S(t, "la", "y") }; } 803 | template R light_aqua_on_white(T t) { return R { S(t, "la", "w") }; } 804 | template R light_aqua_on_grey(T t) { return R { S(t, "la", "e") }; } 805 | template R light_aqua_on_light_blue(T t) { return R { S(t, "la", "lb") }; } 806 | template R light_aqua_on_light_green(T t) { return R { S(t, "la", "lg") }; } 807 | template R light_aqua_on_light_aqua(T t) { return R { S(t, "la", "la") }; } 808 | template R light_aqua_on_light_red(T t) { return R { S(t, "la", "lr") }; } 809 | template R light_aqua_on_light_purple(T t) { return R { S(t, "la", "lp") }; } 810 | template R light_aqua_on_light_yellow(T t) { return R { S(t, "la", "ly") }; } 811 | template R light_aqua_on_bright_white(T t) { return R { S(t, "la", "bw") }; } 812 | template R light_red_on_black(T t) { return R { S(t, "lr", "k") }; } 813 | template R light_red_on_blue(T t) { return R { S(t, "lr", "b") }; } 814 | template R light_red_on_green(T t) { return R { S(t, "lr", "g") }; } 815 | template R light_red_on_aqua(T t) { return R { S(t, "lr", "a") }; } 816 | template R light_red_on_red(T t) { return R { S(t, "lr", "r") }; } 817 | template R light_red_on_purple(T t) { return R { S(t, "lr", "p") }; } 818 | template R light_red_on_yellow(T t) { return R { S(t, "lr", "y") }; } 819 | template R light_red_on_white(T t) { return R { S(t, "lr", "w") }; } 820 | template R light_red_on_grey(T t) { return R { S(t, "lr", "e") }; } 821 | template R light_red_on_light_blue(T t) { return R { S(t, "lr", "lb") }; } 822 | template R light_red_on_light_green(T t) { return R { S(t, "lr", "lg") }; } 823 | template R light_red_on_light_aqua(T t) { return R { S(t, "lr", "la") }; } 824 | template R light_red_on_light_red(T t) { return R { S(t, "lr", "lr") }; } 825 | template R light_red_on_light_purple(T t) { return R { S(t, "lr", "lp") }; } 826 | template R light_red_on_light_yellow(T t) { return R { S(t, "lr", "ly") }; } 827 | template R light_red_on_bright_white(T t) { return R { S(t, "lr", "bw") }; } 828 | template R light_purple_on_black(T t) { return R { S(t, "lp", "k") }; } 829 | template R light_purple_on_blue(T t) { return R { S(t, "lp", "b") }; } 830 | template R light_purple_on_green(T t) { return R { S(t, "lp", "g") }; } 831 | template R light_purple_on_aqua(T t) { return R { S(t, "lp", "a") }; } 832 | template R light_purple_on_red(T t) { return R { S(t, "lp", "r") }; } 833 | template R light_purple_on_purple(T t) { return R { S(t, "lp", "p") }; } 834 | template R light_purple_on_yellow(T t) { return R { S(t, "lp", "y") }; } 835 | template R light_purple_on_white(T t) { return R { S(t, "lp", "w") }; } 836 | template R light_purple_on_grey(T t) { return R { S(t, "lp", "e") }; } 837 | template R light_purple_on_light_blue(T t) { return R { S(t, "lp", "lb") }; } 838 | template R light_purple_on_light_green(T t) { return R { S(t, "lp", "lg") }; } 839 | template R light_purple_on_light_aqua(T t) { return R { S(t, "lp", "la") }; } 840 | template R light_purple_on_light_red(T t) { return R { S(t, "lp", "lr") }; } 841 | template R light_purple_on_light_purple(T t) { return R { S(t, "lp", "lp") }; } 842 | template R light_purple_on_light_yellow(T t) { return R { S(t, "lp", "ly") }; } 843 | template R light_purple_on_bright_white(T t) { return R { S(t, "lp", "bw") }; } 844 | template R light_yellow_on_black(T t) { return R { S(t, "ly", "k") }; } 845 | template R light_yellow_on_blue(T t) { return R { S(t, "ly", "b") }; } 846 | template R light_yellow_on_green(T t) { return R { S(t, "ly", "g") }; } 847 | template R light_yellow_on_aqua(T t) { return R { S(t, "ly", "a") }; } 848 | template R light_yellow_on_red(T t) { return R { S(t, "ly", "r") }; } 849 | template R light_yellow_on_purple(T t) { return R { S(t, "ly", "p") }; } 850 | template R light_yellow_on_yellow(T t) { return R { S(t, "ly", "y") }; } 851 | template R light_yellow_on_white(T t) { return R { S(t, "ly", "w") }; } 852 | template R light_yellow_on_grey(T t) { return R { S(t, "ly", "e") }; } 853 | template R light_yellow_on_light_blue(T t) { return R { S(t, "ly", "lb") }; } 854 | template R light_yellow_on_light_green(T t) { return R { S(t, "ly", "lg") }; } 855 | template R light_yellow_on_light_aqua(T t) { return R { S(t, "ly", "la") }; } 856 | template R light_yellow_on_light_red(T t) { return R { S(t, "ly", "lr") }; } 857 | template R light_yellow_on_light_purple(T t) { return R { S(t, "ly", "lp") }; } 858 | template R light_yellow_on_light_yellow(T t) { return R { S(t, "ly", "ly") }; } 859 | template R light_yellow_on_bright_white(T t) { return R { S(t, "ly", "bw") }; } 860 | template R bright_white_on_black(T t) { return R { S(t, "bw", "k") }; } 861 | template R bright_white_on_blue(T t) { return R { S(t, "bw", "b") }; } 862 | template R bright_white_on_green(T t) { return R { S(t, "bw", "g") }; } 863 | template R bright_white_on_aqua(T t) { return R { S(t, "bw", "a") }; } 864 | template R bright_white_on_red(T t) { return R { S(t, "bw", "r") }; } 865 | template R bright_white_on_purple(T t) { return R { S(t, "bw", "p") }; } 866 | template R bright_white_on_yellow(T t) { return R { S(t, "bw", "y") }; } 867 | template R bright_white_on_white(T t) { return R { S(t, "bw", "w") }; } 868 | template R bright_white_on_grey(T t) { return R { S(t, "bw", "e") }; } 869 | template R bright_white_on_light_blue(T t) { return R { S(t, "bw", "lb") }; } 870 | template R bright_white_on_light_green(T t) { return R { S(t, "bw", "lg") }; } 871 | template R bright_white_on_light_aqua(T t) { return R { S(t, "bw", "la") }; } 872 | template R bright_white_on_light_red(T t) { return R { S(t, "bw", "lr") }; } 873 | template R bright_white_on_light_purple(T t) { return R { S(t, "bw", "lp") }; } 874 | template R bright_white_on_light_yellow(T t) { return R { S(t, "bw", "ly") }; } 875 | template R bright_white_on_bright_white(T t) { return R { S(t, "bw", "bw") }; } 876 | } 877 | 878 | #endif --------------------------------------------------------------------------------