denysvitali / megadecrypter

Decrypt mega://enc2 links
MIT License
48 stars 25 forks source link

resources on mega://enc2 links #1

Open amper5and opened 7 years ago

amper5and commented 7 years ago

Hey, thanks for your tool. I have one question: do you know of or have any resources about how mega://enc2 are created? I want to port this to node.js, but I'm not completely following all of the code. Any resource would be helpful. Thank you!

denysvitali commented 7 years ago

mega://enc2 are created (obviously) with the inverse of the operation performed for the decryption. It is a tweaked AES-256-CBC encryption. You can find the key in the source code of this repo.

I'll provide a Node.js POC / example in the following hours / days

dimitryow commented 7 years ago

I have tried to build this repository using Crystal 0.23 and failing with some error pointing to llvm, my final intent was also creating a NodeJS version after i had checked that it does work to decrypt mega.//enc2 & mega://fenc2 links, so that POC will be greatly appreciated @denysvitali Thanks!

denysvitali commented 7 years ago

I'm so sorry, I still haven't got time to look into that 😞

@dimitryow what is your specific error? It works well here, I'm using Arch Linux with Crystal 0.23.1 (2017-09-10) LLVM 5.0.0

CapacitorSet commented 7 years ago

You mention that you're "not completely following all of the code". Is there something in particular you're stuck on?

dimitryow commented 7 years ago

Hi @denysvitali! This is what i'm getting:

$ crystal build --release src/megadecrypter.cr
crystal: /var/cache/omnibus/src/llvm/llvm-3.8.1.src/lib/CodeGen/LexicalScopes.cpp:160: llvm::LexicalScope* llvm::LexicalScopes::getOrCreateRegularScope(const llvm::DILocalScope*): Assertion `cast<DISubprogram>(Scope)->describes(MF->getFunction())' failed.
/usr/bin/crystal: line 102:  9659 Aborted                 (core dumped) "$INSTALL_DIR/embedded/bin/crystal" "$@"

$ uname -a
Linux ubuntu 4.4.0-47-generic #68-Ubuntu SMP Wed Oct 26 19:39:52 UTC 2016 x86_64 x86_64 x86_64 GNU/Linux

That's Ubuntu 16.04, and my first time using crystal, but i did followed their installation instructions.

denysvitali commented 7 years ago

Can you provide the Crystal release? crystal -v

denysvitali commented 7 years ago

After further checking, it seems like it is a common issue. As a workaround for now you can try with crystal build --release --no-debug src/megadecrypter.cr as mentioned in the issue

andersonDadario commented 4 years ago

I've created a PR with a Dockerfile, so anyone can run without installing crystal ;) Link: https://github.com/denysvitali/megadecrypter/pull/4