program-ifyer 0.1.0

Executable that does stuff
use command_ifyer::what_to_execute;
use lose95_keygen_rs::{gen_oem, gen_retail};
use std::env;
/*

Copyright 2025 𝕍𝕖𝕝𝕠𝕔𝕚𝕗𝕪𝕖𝕣

   Licensed under the Apache License, Version 2.0 (the "License");
   you may not use this file except in compliance with the License.
   You may obtain a copy of the License at

       http://www.apache.org/licenses/LICENSE-2.0

   Unless required by applicable law or agreed to in writing, software
   distributed under the License is distributed on an "AS IS" BASIS,
   WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
   See the License for the specific language governing permissions and
   limitations under the License.
 */
/*

Copyright (c) 2025 𝕍𝕖𝕝𝕠𝕔𝕚𝕗𝕪𝕖𝕣

Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the " Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice (including the next paragraph) shall be included in all copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
*/
fn main() {
    let args: Vec<String> = env::args().collect();
    let mut thing_to_execute = 255;
    let mut version = 255;
    if args.len() > 1 {
        version = args[1]
            .trim()
            .parse()
            .expect("70252372 version is not a number");
        if args.len() > 2 {
            thing_to_execute = what_to_execute(0, &args[2], &["Version", "lose95"], true)
                .expect("38406051 i need to get proper error handling");
        }
    }
    if version == 255 {
        version = 0
    }
    if version != 0 {
        panic!("7920236 version is not supported, try updating ifyer");
    }
    if thing_to_execute == 0 || thing_to_execute == 255 {
        println!("0.1.0");
    }
    if thing_to_execute == 255 || thing_to_execute == 1 {
        let mut vers1on = 255;
        let mut stuff_t1_execute = 255;
        if args.len() > 3 {
            vers1on = args[3]
                .trim()
                .parse()
                .expect("85520844 vers1on is not working");
            if args.len() > 4 {
                stuff_t1_execute = what_to_execute(0, &args[4], &["Retail", "OEM"], true)
                    .expect("9707940 i need to get proper error handling");
            }
        }
        if vers1on == 255 {
            vers1on = 0;
        }
        if vers1on != 0 {
            panic!("10237961 vers1on not supported, try updating ifyer.");
        }
        if stuff_t1_execute == 0 || stuff_t1_execute == 255 {
            if stuff_t1_execute == 255 {
                print!("Retail key: ");
            }
            println!("{}", gen_retail(0));
        }
        if stuff_t1_execute == 255 || stuff_t1_execute == 1 {
            if stuff_t1_execute == 255 {
                print!("OEM key: ");
            }
            println!("{}", gen_oem(0))
        }
    }
}