├── BuildBOFs.sln ├── BuildBOFs ├── BuildBOFs.csproj └── Program.cs ├── LICENSE ├── README.md ├── _config.yml └── misc ├── README.md └── settings.json /BuildBOFs.sln: -------------------------------------------------------------------------------- 1 |  2 | Microsoft Visual Studio Solution File, Format Version 12.00 3 | # Visual Studio Version 16 4 | VisualStudioVersion = 16.0.31424.327 5 | MinimumVisualStudioVersion = 10.0.40219.1 6 | Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "BuildBOFs", "BuildBOFs\BuildBOFs.csproj", "{F5AA3D1C-F272-421C-8C64-F631189D80A1}" 7 | EndProject 8 | Global 9 | GlobalSection(SolutionConfigurationPlatforms) = preSolution 10 | Debug|Any CPU = Debug|Any CPU 11 | Release|Any CPU = Release|Any CPU 12 | EndGlobalSection 13 | GlobalSection(ProjectConfigurationPlatforms) = postSolution 14 | {F5AA3D1C-F272-421C-8C64-F631189D80A1}.Debug|Any CPU.ActiveCfg = Debug|Any CPU 15 | {F5AA3D1C-F272-421C-8C64-F631189D80A1}.Debug|Any CPU.Build.0 = Debug|Any CPU 16 | {F5AA3D1C-F272-421C-8C64-F631189D80A1}.Release|Any CPU.ActiveCfg = Release|Any CPU 17 | {F5AA3D1C-F272-421C-8C64-F631189D80A1}.Release|Any CPU.Build.0 = Release|Any CPU 18 | EndGlobalSection 19 | GlobalSection(SolutionProperties) = preSolution 20 | HideSolutionNode = FALSE 21 | EndGlobalSection 22 | GlobalSection(ExtensibilityGlobals) = postSolution 23 | SolutionGuid = {3AE0721C-1DF2-4F04-9CC2-65E385270E13} 24 | EndGlobalSection 25 | EndGlobal 26 | -------------------------------------------------------------------------------- /BuildBOFs/BuildBOFs.csproj: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | Exe 5 | net5.0 6 | 7 | 8 | 9 | -------------------------------------------------------------------------------- /BuildBOFs/Program.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.Diagnostics; 4 | using System.IO; 5 | 6 | namespace BuildBOFs 7 | { 8 | class Program 9 | { 10 | private static List CFiles = new List(); 11 | private static List MakeFIles = new List(); 12 | private static List msvcFiles = new List(); 13 | private static List MiscFiles = new List(); 14 | private static List CPPFiles = new List(); 15 | private static int timeout = 3000; 16 | private static int counter = 1; 17 | private static bool x64 = true; 18 | private static string rootdir = ""; 19 | private static string LinuxBuild = "bash -c"; 20 | private static string migngw = "x86_64-w64-mingw32-gcc"; 21 | private static string mingw_stripX64="x86_64-w64-mingw32-strip" 22 | 23 | private static string syscallMasmArg = "-masm=intel -Wall"; 24 | 25 | private static string strip_ALL_CMD = "--strip-all"; 26 | private static string strip_uneeded_CMD = "--strip-unneeded"; 27 | 28 | public static void Main(string[] args) 29 | { 30 | Logo(); 31 | if (args.Length < 0) 32 | { 33 | Console.WriteLine("[!] Error. No input."); 34 | Environment.Exit(1); 35 | } 36 | ParseArgs(args); 37 | Console.WriteLine("[*] Searching root dir: " + rootdir); 38 | Console.WriteLine("[*] Finding all the files to build"); 39 | DirSearch(rootdir);//get files of type we want 40 | Console.WriteLine("[*] Total files Found: " + (CFiles.Count + MakeFIles.Count + msvcFiles.Count + MiscFiles.Count + CPPFiles.Count)); 41 | Console.WriteLine("------------------------------------------------"); 42 | Console.WriteLine("[*] Building .c files"); 43 | foreach (string file in CFiles) 44 | { 45 | Console.WriteLine("[*] Working file (" + counter + "\\" + (CFiles.Count + MakeFIles.Count + msvcFiles.Count + MiscFiles.Count + CPPFiles.Count) + ") "+file); 46 | Console.WriteLine("[*] Building .c files via windows CL.exe"); 47 | BuildCL(file); 48 | Console.WriteLine("[*] Building .c files via mingw '" + LinuxBuild + "'"); 49 | BuildBashC(file); 50 | counter++; 51 | } 52 | Console.WriteLine("------------------------------------------------"); 53 | Console.WriteLine("[*] Building MakeFile files"); 54 | foreach (string file in MakeFIles) 55 | { 56 | Console.WriteLine("[*] Working file (" + counter + "\\" + (CFiles.Count + MakeFIles.Count + msvcFiles.Count + MiscFiles.Count + CPPFiles.Count) + ") " + file); 57 | try 58 | { 59 | BuildMakeLinux(file); 60 | } 61 | catch 62 | { 63 | Console.WriteLine("[!] Error building " + file); 64 | } 65 | counter++; 66 | } 67 | Console.WriteLine("------------------------------------------------"); 68 | Console.WriteLine("[*] Building .msvc files"); 69 | foreach (string file in msvcFiles) 70 | { 71 | Console.WriteLine("[*] Working file (" + counter + "\\" + (CFiles.Count + MakeFIles.Count + msvcFiles.Count + MiscFiles.Count + CPPFiles.Count) + ") " + file); 72 | try 73 | { 74 | Buildnmake(file); 75 | } 76 | catch 77 | { 78 | Console.WriteLine("[!] Error building " + file); 79 | } 80 | counter++; 81 | } 82 | Console.WriteLine("------------------------------------------------"); 83 | Console.WriteLine("[*] Building misc (.bat) files"); 84 | foreach (string file in MiscFiles) 85 | { 86 | Console.WriteLine("[*] Working file (" + counter + "\\" + (CFiles.Count + MakeFIles.Count + msvcFiles.Count + MiscFiles.Count + CPPFiles.Count) + ") " + file); 87 | try 88 | { 89 | BuildBatFile(file); 90 | } 91 | catch 92 | { 93 | Console.WriteLine("[!] Error building " + file); 94 | } 95 | counter++; 96 | } 97 | Console.WriteLine("------------------------------------------------"); 98 | Console.WriteLine("[*] Building CPP files"); 99 | foreach (string file in CPPFiles) 100 | { 101 | Console.WriteLine("[*] Working file (" + counter + "\\" + (CFiles.Count + MakeFIles.Count + msvcFiles.Count + MiscFiles.Count + CPPFiles.Count) + ") " + file); 102 | try 103 | { 104 | BuildCPPFile(file); 105 | } 106 | catch 107 | { 108 | Console.WriteLine("[!] Error building " + file); 109 | } 110 | counter++; 111 | } 112 | } 113 | 114 | private static void Usage() 115 | { 116 | Console.WriteLine(@" 117 | Usage: 118 | 119 | Example: BuildBOFs.exe -rootdir C:\Path\to\BOFs 120 | 121 | Commands: 122 | -rootdir 123 | The folder that contains the BOF files to build (REQUIRED) 124 | -x86 125 | Tell to compile linux bins for x86 (i686-w64-mingw32-gcc) 126 | -x64 127 | Tell to compile linux bins for x64 (86_64-w64-mingw32-gcc) (DEFAULT) 128 | -timeout 129 | Sets the timeout for the process who is building bin (DEFAULT 3 seconds) (time in milliseconds) 130 | -wsl 131 | Tell app to use wsl.exe instead of bash.exe to compile linux bins 132 | "); 133 | } 134 | 135 | private static void ParseArgs(string[] args) 136 | { 137 | if (args.Length <= 0) 138 | { 139 | Usage(); 140 | Environment.Exit(0); 141 | } 142 | for (int x = 0; x < args.Length; ++x) 143 | { 144 | try 145 | { 146 | switch (args[0].ToLower()) 147 | { 148 | case "-x86": 149 | x64 = false; 150 | migngw = "i686-w64-mingw32-gcc"; 151 | break; 152 | case "-x64": 153 | x64 = true; 154 | break; 155 | case "-timeout": 156 | timeout = Convert.ToInt32(args[x+1]); 157 | break; 158 | case "-wsl": 159 | LinuxBuild = "wsl -e"; 160 | break; 161 | case "-rootdir": 162 | rootdir = args[x+1]; 163 | break; 164 | } 165 | } 166 | catch (Exception e) 167 | { 168 | Usage(); 169 | Console.WriteLine("[Error] Invalid input " + e.Message.ToString()); 170 | } 171 | } 172 | if (string.IsNullOrEmpty(rootdir)== true) 173 | { 174 | Console.WriteLine("[Error] MISSING REQUIRED rootdir arg/input!!!"); 175 | 176 | Usage(); 177 | Environment.Exit(0); 178 | } 179 | } 180 | 181 | private static void Logo() 182 | { 183 | Console.WriteLine(@" 184 | .----------------. .----------------. .----------------. .----------------. .----------------. .----------------. .----------------. .----------------. .----------------. .----------------. .----------------. 185 | | .--------------. || .--------------. || .--------------. || .--------------. || .--------------. || .--------------. || .--------------. || .--------------. || .--------------. || .--------------. || .--------------. | 186 | | | ______ | || | ____ | || | _________ | || | | || | ______ | || | _____ _____ | || | _____ | || | _____ | || | ________ | || | _________ | || | _______ | | 187 | | | |_ _ \ | || | .' `. | || | |_ ___ | | || | | || | |_ _ \ | || ||_ _||_ _|| || | |_ _| | || | |_ _| | || | |_ ___ `. | || | |_ ___ | | || | |_ __ \ | | 188 | | | | |_) | | || | / .--. \ | || | | |_ \_| | || | ______ | || | | |_) | | || | | | | | | || | | | | || | | | | || | | | `. \ | || | | |_ \_| | || | | |__) | | | 189 | | | | __'. | || | | | | | | || | | _| | || | |______| | || | | __'. | || | | ' ' | | || | | | | || | | | _ | || | | | | | | || | | _| _ | || | | __ / | | 190 | | | _| |__) | | || | \ `--' / | || | _| |_ | || | | || | _| |__) | | || | \ `--' / | || | _| |_ | || | _| |__/ | | || | _| |___.' / | || | _| |___/ | | || | _| | \ \_ | | 191 | | | |_______/ | || | `.____.' | || | |_____| | || | | || | |_______/ | || | `.__.' | || | |_____| | || | |________| | || | |________.' | || | |_________| | || | |____| |___| | | 192 | | | | || | | || | | || | | || | | || | | || | | || | | || | | || | | || | | | 193 | | '--------------' || '--------------' || '--------------' || '--------------' || '--------------' || '--------------' || '--------------' || '--------------' || '--------------' || '--------------' || '--------------' | 194 | '----------------' '----------------' '----------------' '----------------' '----------------' '----------------' '----------------' '----------------' '----------------' '----------------' '----------------' 195 | "); 196 | } 197 | 198 | private static void DirSearch(string sDir) 199 | { 200 | try 201 | { 202 | foreach (string d in Directory.GetDirectories(sDir)) 203 | { 204 | try 205 | { 206 | foreach (string f in Directory.GetFiles(d)) 207 | { 208 | if (Path.GetExtension(f).ToLower().Equals(".c") == true) 209 | { 210 | Console.WriteLine(" [+] Found '.c' file: " + f); 211 | CFiles.Add(f); 212 | } 213 | else if (Path.GetExtension(f).ToLower().Equals(".msvc") == true) 214 | { 215 | Console.WriteLine(" [+] Found '.msvc' file: " + f); 216 | 217 | msvcFiles.Add(f); 218 | } 219 | else if (Path.GetFileName(f).ToLower().Contains("makefile")) 220 | { 221 | Console.WriteLine(" [+] Found 'MakeFile' file: " + f); 222 | 223 | MakeFIles.Add(f); 224 | } 225 | else if (Path.GetFileName(f).ToLower().Contains(".bat")) 226 | { 227 | Console.WriteLine(" [+] Found misc file: " + f); 228 | 229 | MiscFiles.Add(f); 230 | } 231 | else if (Path.GetFileName(f).ToLower().Contains(".cpp")) 232 | { 233 | Console.WriteLine(" [+] Found cpp file: " + f); 234 | 235 | CPPFiles.Add(f); 236 | } 237 | } 238 | DirSearch(d); 239 | } 240 | catch (System.Exception excpt) 241 | { 242 | Console.WriteLine("[!] " + excpt.Message); 243 | } 244 | } 245 | } 246 | catch (System.Exception excpt) 247 | { 248 | Console.WriteLine(excpt.Message); 249 | } 250 | } 251 | 252 | private static void outdata(object sender, DataReceivedEventArgs e) 253 | { 254 | var data = e.Data; 255 | System.Console.WriteLine(data); 256 | } 257 | 258 | public static void BuildBatFile(string BatFile) 259 | { 260 | string filename = Path.GetFileName(BatFile).Split('.')[0]; 261 | string workingdir = Path.GetDirectoryName(BatFile); 262 | 263 | using (var process = Process.Start(new ProcessStartInfo { FileName = @"cmd", Arguments = "", WorkingDirectory = workingdir, UseShellExecute = false, RedirectStandardInput = true, RedirectStandardOutput = true })) 264 | { 265 | process.OutputDataReceived += new DataReceivedEventHandler(outdata); 266 | process.BeginOutputReadLine(); 267 | process.StandardInput.WriteLine("start " + BatFile); 268 | process.WaitForExit(timeout); 269 | // process.StandardInput.WriteLine("exit"); 270 | } 271 | } 272 | public static void BuildCPPFile(string CppFIle) 273 | { 274 | string filename = Path.GetFileName(CppFIle); 275 | string ext = Path.GetExtension(CppFIle); 276 | filename = filename.Replace(ext, ""); 277 | string workingdir = Path.GetDirectoryName(CppFIle); 278 | 279 | 280 | using (var process = Process.Start(new ProcessStartInfo { FileName = @"cmd", Arguments = "", WorkingDirectory = workingdir, UseShellExecute = false, RedirectStandardInput = true, RedirectStandardOutput = true })) 281 | { 282 | process.OutputDataReceived += new DataReceivedEventHandler(outdata); 283 | process.BeginOutputReadLine(); 284 | process.StandardInput.WriteLine(@"cl /EHsc "+ filename + ".cpp"); 285 | process.WaitForExit(timeout); 286 | //process.StandardInput.WriteLine("exit"); 287 | } 288 | } 289 | public static void BuildCL(string CFile) 290 | { 291 | string filename = Path.GetFileName(CFile); 292 | string ext = Path.GetExtension(CFile); 293 | filename = filename.Replace(ext, ""); 294 | string workingdir = Path.GetDirectoryName(CFile); 295 | 296 | 297 | using (var process = Process.Start(new ProcessStartInfo { FileName = @"cmd", Arguments = "", WorkingDirectory = workingdir, UseShellExecute = false, RedirectStandardInput = true, RedirectStandardOutput = true })) 298 | { 299 | process.OutputDataReceived += new DataReceivedEventHandler(outdata); 300 | process.BeginOutputReadLine(); 301 | process.StandardInput.WriteLine(@"cl /GS- /nologo /Od /Oi /c " + filename + ext + " /F" + filename + ".o"); 302 | process.WaitForExit(timeout); 303 | //process.StandardInput.WriteLine("exit"); 304 | } 305 | } 306 | 307 | public static void Buildnmake(string MsvcFile) 308 | { 309 | string filename = Path.GetFileName(MsvcFile); 310 | string ext = Path.GetExtension(MsvcFile); 311 | filename = filename.Replace(ext, ""); 312 | string workingdir = Path.GetDirectoryName(MsvcFile); 313 | 314 | using (var process = Process.Start(new ProcessStartInfo { FileName = @"cmd", Arguments = "", WorkingDirectory = workingdir, UseShellExecute = false, RedirectStandardInput = true, RedirectStandardOutput = true })) 315 | { 316 | process.OutputDataReceived += new DataReceivedEventHandler(outdata); 317 | process.BeginOutputReadLine(); 318 | process.StandardInput.WriteLine(@"nmake -f " + MsvcFile + " build"); 319 | process.WaitForExit(timeout); 320 | //process.StandardInput.WriteLine("exit"); 321 | } 322 | } 323 | 324 | public static void BuildMakeLinux(string MakeFile) 325 | { 326 | string filename = Path.GetFileName(MakeFile); 327 | string ext = Path.GetExtension(MakeFile); 328 | filename = filename.Replace(ext, ""); 329 | string workingdir = Path.GetDirectoryName(MakeFile); 330 | string linuxfilePath = workingdir.Replace('\\', '/').Replace(@"C:/", @"/mnt/c/") + '/' + filename + ext; 331 | string outputPathLinux = workingdir.Replace('\\', '/').Replace(@"C:/", @"/mnt/c/") + '/' + filename + ".o"; 332 | workingdir = Path.GetDirectoryName(MakeFile).Replace('\\', '/').Replace(@"C:/", @"/mnt/c/"); 333 | 334 | using (var process = Process.Start(new ProcessStartInfo { FileName = @"cmd", Arguments = "", WorkingDirectory = Path.GetDirectoryName((MakeFile)), UseShellExecute = false, RedirectStandardInput = true, RedirectStandardOutput = true })) 335 | { 336 | process.OutputDataReceived += new DataReceivedEventHandler(outdata); 337 | process.BeginOutputReadLine(); 338 | process.StandardInput.WriteLine(LinuxBuild + " \"cd " + workingdir + " && make\""); 339 | process.WaitForExit(timeout); 340 | //process.StandardInput.WriteLine("exit"); 341 | } 342 | } 343 | 344 | public static void BuildBashC(string CFile) 345 | { 346 | string filename = Path.GetFileName(CFile); 347 | string ext = Path.GetExtension(CFile); 348 | filename = filename.Replace(ext, ""); 349 | string workingdir = Path.GetDirectoryName(CFile); 350 | string linuxfilePath = workingdir.Replace('\\', '/').Replace(@"C:/", @"/mnt/c/") + '/' + filename + ext; 351 | string outputPathLinux = workingdir.Replace('\\', '/').Replace(@"C:/", @"/mnt/c/") + '/' + filename + ".o"; 352 | string[] files = System.IO.Directory.GetFiles(workingdir, "*yscall*.h", System.IO.SearchOption.TopDirectoryOnly); 353 | if (files.Length <= 0) 354 | { 355 | syscallMasmArg = ""; 356 | } 357 | using (var process = Process.Start(new ProcessStartInfo { FileName = @"cmd", Arguments = "", WorkingDirectory = Path.GetDirectoryName((CFile)), UseShellExecute = false, RedirectStandardInput = true, RedirectStandardOutput = true })) 358 | { 359 | process.OutputDataReceived += new DataReceivedEventHandler(outdata); 360 | process.BeginOutputReadLine(); 361 | process.StandardInput.WriteLine(LinuxBuild + " \""+ migngw + " -c " + linuxfilePath + " -o " + outputPathLinux + " "+ syscallMasmArg+ " "+strip_uneeded_CMD+"\""); 362 | //process.StandardInput.WriteLineLinuxBuild + " \"" + mingw_stripX64 + " -c " + linuxfilePath + " -o " + outputPathLinux + " " + syscallMasmArg + " " + strip_uneeded_CMD + "\""); 363 | process.WaitForExit(timeout); 364 | //process.StandardInput.WriteLine("exit"); 365 | } 366 | syscallMasmArg = "-masm=intel"; 367 | } 368 | 369 | } 370 | } 371 | -------------------------------------------------------------------------------- /LICENSE: -------------------------------------------------------------------------------- 1 | MIT License 2 | 3 | Copyright (c) 2021 Ceramicskate0 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 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # BOF-Builder 2 | C# .Net 5.0 project to build BOF (Beacon Object Files) in mass based on them all being in a folder directory struct somewhere. 3 | 4 | Useful for building and I guess 'testing if they compile' BOF locally or in a pipeline ;) 5 | 6 | # Pre Req/ Install these first 7 | - Install Linux subsystems for windows 8 | 9 | - Install a Linux OS say ubuntu or kali form windows store (wsl.exe/bash.exe) (might need git also) 10 | 11 | - Install these on Linux (WSL) `apt install gcc-mingw-w64-x86-64 gcc-mingw-w64-i686 make -y` 12 | 13 | - Install Visual Studio for the 'x64 Native Tools Command Prompt for VS {VERSION/Year}' or 'x86 Native Tools Command Prompt for VS {VERSION/Year}' 14 | 15 | # How to Use 16 | Run tool from 'x64 Native Tools Command Prompt for VS 2019' (if your goal is to build x64) 17 | 18 | It runs like this from cmd.exe (or powershell)(Adjust for VS {VERSION/Year}) `%comspec% /k "C:\Program Files (x86)\Microsoft Visual Studio\2019\Community\VC\Auxiliary\Build\vcvars64.bat"` 19 | 20 | Its normally got a short cut here `C:\ProgramData\Microsoft\Windows\Start Menu\Programs\Visual Studio 2019\Visual Studio Tools\VC` 21 | 22 | Its normally got a bat file `C:\Program Files (x86)\Microsoft Visual Studio\2019\Community\VC\Auxiliary\Build` 23 | 24 | ## Usage 25 | Example: BuildBOFs.exe -rootdir C:\Path\to\BOFs 26 | 27 | Commands: 28 | -rootdir 29 | The folder that contains the BOF files to build (REQUIRED) 30 | -x86 31 | Tell to compile linux bins for x86 (i686-w64-mingw32-gcc) 32 | -x64 33 | Tell to compile linux bins for x64 (86_64-w64-mingw32-gcc) (DEFAULT) 34 | -timeout 35 | Sets the timeout for the process who is building bin (DEFAULT 3 seconds) (time in milliseconds) 36 | -wsl 37 | Tell app to use wsl.exe instead of bash.exe to compile linux bins 38 | 39 | # Errors/ My stuff wont build 40 | - Why? Its often that the repo is missing something or has errors (errors like syntax or they coded it wrong). I can tell you i tested this on ~90% of BOF's on Github as of 09/2021 and most of them have errors as is. I suggest you fix them or send them an issue. The compiler output is shown to screen. 41 | 42 | - My fav error ` 1 | #include ` for a linux compile target .....yep... literally used the wrong import. Change to all lowercase to fix. I rest my case for statement above. But im glad you found the time to test my software and it tested there stuff for you, wait you tested there stuff to right? 43 | 44 | # Things to know 45 | 46 | - No, i did not check your BOF for lets call it malware 47 | - All this does it build the files. Thats it. 48 | -------------------------------------------------------------------------------- /_config.yml: -------------------------------------------------------------------------------- 1 | theme: jekyll-theme-hacker -------------------------------------------------------------------------------- /misc/README.md: -------------------------------------------------------------------------------- 1 | ## settings.json 2 | - Windows Terminal Settings file. 3 | - You will need to replace `username_here` in the file with your machines username. 4 | -------------------------------------------------------------------------------- /misc/settings.json: -------------------------------------------------------------------------------- 1 | // This file was initially generated by Windows Terminal 1.3.2651.0 2 | // It should still be usable in newer versions, but newer versions might have additional 3 | // settings, help text, or changes that you will not see unless you clear this file 4 | // and let us generate a new one for you. 5 | 6 | // To view the default settings, hold "alt" while clicking on the "Settings" button. 7 | // For documentation on these settings, see: https://aka.ms/terminal-documentation 8 | { 9 | "$schema": "https://aka.ms/terminal-profiles-schema", 10 | 11 | "defaultProfile": "{61c54bbd-c2c6-5271-96e7-009a87ff44bf}", 12 | 13 | // You can add more global application settings here. 14 | // To learn more about global settings, visit https://aka.ms/terminal-global-settings 15 | 16 | // If enabled, selections are automatically copied to your clipboard. 17 | "copyOnSelect": false, 18 | 19 | // If enabled, formatted data is also copied to your clipboard 20 | "copyFormatting": false, 21 | 22 | // A profile specifies a command to execute paired with information about how it should look and feel. 23 | // Each one of them will appear in the 'New Tab' dropdown, 24 | // and can be invoked from the commandline with `wt.exe -p xxx` 25 | // To learn more about profiles, visit https://aka.ms/terminal-profile-settings 26 | "profiles": 27 | { 28 | "defaults": 29 | { 30 | // Put settings here that you want to apply to all profiles. 31 | }, 32 | "list": 33 | [ 34 | { 35 | // Make changes here to the powershell.exe profile. 36 | "guid": "{61c54bbd-c2c6-5271-96e7-009a87ff44bf}", 37 | "name": "Windows PowerShell", 38 | "commandline": "powershell.exe", 39 | "hidden": false 40 | }, 41 | { 42 | // Make changes here to the cmd.exe profile. 43 | "guid": "{0caa0dad-35be-5f56-a8ff-afceeeaa6101}", 44 | "name": "Command Prompt", 45 | "commandline": "cmd.exe", 46 | "hidden": false 47 | }, 48 | { 49 | "guid": "{b453ae62-4e3d-5e58-b989-0a998ec441b8}", 50 | "hidden": false, 51 | "name": "Azure Cloud Shell", 52 | "source": "Windows.Terminal.Azure" 53 | }, 54 | { 55 | "name": "GIT Command Prompt Shell", 56 | "commandline": "C:\\Users\\USERNAME_HERE\\AppData\\Local\\Programs\\Git\\git-cmd.exe --cd-to-home", 57 | "hidden": false 58 | }, 59 | { 60 | "name": "GIT Bash Shell", 61 | "commandline": "C:\\Users\\USERNAME_HERE\\AppData\\Local\\Programs\\Git\\git-bash.exe --cd-to-home", 62 | "hidden": false 63 | }, 64 | { 65 | "name": "VS Native x64", 66 | "commandline": "%comspec% /k \"C:\\Program Files (x86)\\Microsoft Visual Studio\\2019\\Community\\VC\\Auxiliary\\Build\\vcvars64.bat\"", 67 | "hidden": false 68 | }, 69 | { 70 | "name": "VS Native x86", 71 | "commandline": "%comspec% /k \"C:\\Program Files (x86)\\Microsoft Visual Studio\\2019\\Community\\VC\\Auxiliary\\Build\\vcvars32.bat\"", 72 | "hidden": false 73 | }, 74 | { 75 | "guid": "{2c4de342-38b7-51cf-b940-2309a097f518}", 76 | "hidden": false, 77 | "name": "Ubuntu", 78 | "source": "Windows.Terminal.Wsl" 79 | }, 80 | { 81 | "guid": "{07b52e3e-de2c-5db4-bd2d-ba144ed6c273}", 82 | "hidden": false, 83 | "name": "Ubuntu-20.04", 84 | "source": "Windows.Terminal.Wsl" 85 | } 86 | ] 87 | }, 88 | 89 | // Add custom color schemes to this array. 90 | // To learn more about color schemes, visit https://aka.ms/terminal-color-schemes 91 | "schemes": [], 92 | 93 | // Add custom actions and keybindings to this array. 94 | // To unbind a key combination from your defaults.json, set the command to "unbound". 95 | // To learn more about actions and keybindings, visit https://aka.ms/terminal-keybindings 96 | "actions": 97 | [ 98 | // Copy and paste are bound to Ctrl+Shift+C and Ctrl+Shift+V in your defaults.json. 99 | // These two lines additionally bind them to Ctrl+C and Ctrl+V. 100 | // To learn more about selection, visit https://aka.ms/terminal-selection 101 | { "command": {"action": "copy", "singleLine": false }, "keys": "ctrl+c" }, 102 | { "command": "paste", "keys": "ctrl+v" }, 103 | 104 | // Press Ctrl+Shift+F to open the search box 105 | { "command": "find", "keys": "ctrl+shift+f" }, 106 | 107 | // Press Alt+Shift+D to open a new pane. 108 | // - "split": "auto" makes this pane open in the direction that provides the most surface area. 109 | // - "splitMode": "duplicate" makes the new pane use the focused pane's profile. 110 | // To learn more about panes, visit https://aka.ms/terminal-panes 111 | { "command": { "action": "splitPane", "split": "auto", "splitMode": "duplicate" }, "keys": "alt+shift+d" } 112 | ] 113 | } 114 | --------------------------------------------------------------------------------