Created
November 17, 2025 11:15
-
-
Save ilsubyeega/da55bc8ee48987c23920b0ffb85df4b8 to your computer and use it in GitHub Desktop.
com.gion.android.GnMemoG sqlite database file decryption;
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| use aes::{ | |
| Aes128, Aes128Dec, | |
| cipher::{ArrayLength, BlockDecryptMut, KeyInit, consts::U16, generic_array::GenericArray}, | |
| }; | |
| use pkcs5::pbes1::DigestAlgorithm; | |
| use sha1::{Digest, Sha1}; | |
| use std::{ | |
| fs::File, | |
| io::{Read, Write}, | |
| }; | |
| // 구형 버전에서 내보내기 작업을 시도했음에도 크래시 발생하였기에, 역공학으로 복호화 진행합니다. | |
| // AES/ECB/PKCS5Padding | |
| fn main() { | |
| let key: [u8; 16] = Sha1::digest("GionNetworkMemoGLocalBackup5118".as_bytes())[..16] | |
| .try_into() | |
| .unwrap(); | |
| let mut ciper = Aes128Dec::new(&key.into()); | |
| let mut file = File::open("./notepad.db").unwrap(); | |
| let mut buffer = Vec::new(); | |
| file.read_to_end(&mut buffer).unwrap(); | |
| for block in &mut buffer.chunks_exact_mut(16) { | |
| ciper.decrypt_block_mut(block.into()); | |
| } | |
| File::create("./notepad_decrypted.db") | |
| .unwrap() | |
| .write_all(&buffer) | |
| .unwrap(); | |
| println!("Hello, world!"); | |
| } |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment