Skip to content

Instantly share code, notes, and snippets.

@lhw
Created April 27, 2013 19:56
Show Gist options
  • Save lhw/5474459 to your computer and use it in GitHub Desktop.
Save lhw/5474459 to your computer and use it in GitHub Desktop.
WhatsApp msgstore decrypter
public class Main {
public static void main(String[] args) throws NoSuchAlgorithmException, NoSuchPaddingException, InvalidKeyException, IllegalBlockSizeException, BadPaddingException, IOException {
final SecretKeySpec keySpec = new SecretKeySpec("4j#e*F9+Ms%|g1~5.3rH!we,".getBytes(), "AES");
final Cipher cipher = Cipher.getInstance("AES/ECB/NoPadding");
cipher.init(Cipher.DECRYPT_MODE, keySpec);
FileUtils.writeByteArrayToFile(new File("msgstore.db"), cipher.doFinal(FileUtils.readFileToByteArray(new File("msgstore.db.crypt"))));
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment