Welcome to the personal blog of krabscode

  • krabscode

    My Experience Developing an IDE

    Wow, it's been an age since I've written a blog here. Something I've picked up on recently is learning how to code in C++ and one of the things I like to do with C++ is create Empty CLR Projects targeting the .NET Framework in Visual Studio. So a while back I had a great idea, I wanted to make myself an IDE (somewhat). Right away, you're probably asking "Why? Why make an IDE when you have Visual Studio and you can use other IDEs such as EclipseIDE and Notepad++?" and my simple response is just for the hell of it. It's a great learning experience and at the end of the day you can learn a lot.

    The first step is the layout. Every IDE has a layout that usually goes something like MenuStrip and multiple ToolStrips and somewhere to throw the code and if the IDE is advanced enough there might be an output log if a compiler is included and maybe even a solution explorer. When I was done with the layout then I had to anchor each element so the elements will change size whenever the form changes side. When I was all done creating the layout, I ended up with an application that looked like this:

    Untitled.png
    The next step was to add code to everything. I wanted my IDE to be able to compile a script and fortunately Windows now comes with two little applications called "csc.exe" (the C# Compiler) and "vbc.exe" (the Visual Basic Compiler) located in %SystemRoot%\Microsoft.Net\Framework\<dotnetversion> so all I had to do was copy all the contents of the folder into another folder inside the executable's path. Then I set my IDE to be able to compile a script that is open in the IDE or one that is located elsewhere, but I hadn't added the option to compile multiple files so you can only compile one script.

    idenow.png

    What you just looked at and read was my experience with creating an IDE in Visual Basic.NET, now I am in the process of creating a new one in C++/CLR.

    For you kiddies at home that want to create your own IDE, my advice is just don't. Why reinvent the wheel when you can use it? Use Visual Studio 2019 Community which is 100% free and supports lots of languages such as C++, C#, F#, Visual Basic, XAML, HTML, ASP.NET, TypeScript, etc. But if you absolutely want to create an IDE, here's some of what you should know to make something decent:
    • Developing your own IDE is basically creating a notepad with numbered lines for coding.
    • The element I used for the textbox is the RichTextBox and I set the language to Courier to make it look somewhat right. Turn off WordWrap and make sure you have scroll bars visible.
    • Some people prefer to have an IDE that will detect the language (which changes text color for certain things), autofill and suggest code.
    • Your IDE should be able to detect errors in code and prevent the app from being compiled.
    • You should have basic knowledge about how to use a compiler (what I did for my IDE is I made the Custom Compilation Settings menu detect what compiler is selected, what the extension of the file is, i converted the text for file to compile and use the same string for the output file, then delete 2 characters to add the exe extension, convert that text into a string, and then for the compile process simply did 'Process.Start("vbc.exe", "-out:" + outputfilename + " " + sourcefile)' whereas outputfilename is the Output File text box text and the sourcefile is the File to Compile text box text.
  • krabscode

    Windows OEM Preinstallation Kits

    Something that I have been fancying for a while now is the Windows OEM Preinstallation Kit (OPK). For many of you who don't know what OPK is, it's basically a tool that system administrators and companies use to modify the setup aspect of Windows systems or create Windows Preinstallation Environment (WinPE) images. However obtaining said product is very challenging for the ordinary PC user. You have to be a member of the Microsoft OEM Partner program to recieve said product.

    Microsoft has however created alternatives to the OPK for regular PC users. Windows Assessment and Deployment Kit (ADK), formerly Windows Automated Installation Kit (WAIK), is a set of tools used for modifying your system and creating a WinPE image. ADK and WAIK are free products of MS and do not require you to be active in any Microsoft programs.

    But why do I bring this up? Well, I was finally able to get my hands on a copy of Windows Server 2003 OPK Small Business Edition (SP1) and I am planning to make a livecd of Windows 2000 Professional. If you would like a copy of OPK, there's at least 2 listings for Windows Xp on ebay. https://www.ebay.com/sch/i.html?_fr...0&_osacat=0&_odkw=windows+oem+preinstallation

    Edit: The second listing is no longer available, it is now just one listing.
    oofio likes this.
  • krabscode

    Gencode - A new password/key generator for Windows (and possibly more platforms)

    I have began work on a new program for anybody that wants to create a secure password for any account anywhere. This program is a free utility called 'Gencode' which outputs 8 character, 16 character, or 25 character passwords. This program only requires that you have Windows 7 or later installed along with a .Net Framework 4.5 Runtime installed or later. Gencode is licensed under GNU GPL v3.

    screenshot3.png

    Gencode is offered in 2 modes, a GUI suite and a CMD suite. The GUI and CMD both function similar, however the CMD suite requires switches to pass if you wish to generate a password as the GUI has no passable codes.

    What Gencode and GenCMD (Release: v0.3-preview) offers as of this time:
    • 8 Character Passwords
    • 16 Character Passwords
    • 25 Character Passwords
    • Numbers only Passwords
    • Numbers + Lowercase Passwords
    • Numbers + Lowercase and Uppercase Passwords
    • Custom CMD Window (only for users who install the GenCMD app alongside Gencode during setup)
    Features that will/may be implemented later:
    • Special Characters (i.e. [email protected]#$%...)
    • Custom Character Passwords
    • Save As Feature
    • CHM (in EXE form) Help
    • PE Builder (Preinstallation Environment that includes a small Gencode form)
    More features may be implemented later on as this project is still in prototype stages.

    Why use Gencode?

    People usually create passwords that reflect abbreviated phrases or is information about themself. However, people who usually use passwords that includes their pet's name or something similar of that nature. This program generates random passwords that most online services will accept upon creating accounts.

    How Passwords are generated: Passwords are generated through the System.Text.StringBuilder class and uses the Random command found in this class. Depending on what the user has selected, Gencode will choose any integers 48-57 (0-9), 65-90 (A-Z), and 97-122 (a-z). The program will select 8, 16, or 25 random integers and output to the CodeBox (TextBox element).

    Links:
    zfreeman likes this.