myph-v2.git


myph-v2

~ rust shellcode loader with evasive capabilities
git clone https://github.com/djnnvx/myph-v2.git
log | files | refs | archive | README

decrypt.rs (810B)

      1 fn no_encryption_template() -> String {
      2     r#"
      3 "#
      4     .to_string()
      5 }
      6 
      7 pub fn generate_decrypt_code(encryption_type: &str) -> String {
      8     use crate::cli::EncryptionKind;
      9     use crate::encryption::create_encryptor;
     10 
     11     // Create a temporary encryptor to get the decryption template
     12     let encryption_kind = match encryption_type {
     13         "xor" => EncryptionKind::XOR,
     14         "aes" => EncryptionKind::AES,
     15         "aes256" => EncryptionKind::AES256,
     16         "chacha20" => EncryptionKind::Chacha20,
     17         "blowfish" => EncryptionKind::Blowfish,
     18         "twofish" => EncryptionKind::Twofish,
     19         "camellia" => EncryptionKind::Camellia,
     20         _ => return no_encryption_template(),
     21     };
     22 
     23     let encryptor = create_encryptor(encryption_kind, "dummy-key");
     24     encryptor.generate_decrypt_template()
     25 }