Closed imnotjames closed 5 years ago
So we've been running this for a little while and playing with it.
Haven't found any issues yet... but I'll be honest: I'm not entirely certain what the intent of some of the code is other than to create a signature in a very specific way.
Where I felt I understood the intent of the variables, I renamed them as such, but otherwise I left them alone.
Wow, this is pretty gnarly reverse engineering. Can you add some error handling for when this inevitably breaks?
When it breaks we'll get a 403 and it'll get caught by the except - and you'll get an error message.
What other error handling should be added?
And yes, I agree, very gnarly. :D but it's free and works great for our use case.
this updates the google translate plugin to work the same as the web application through a little bit of reverse engineering the javascript.
the way this works is that we first retrieve an initialization vector from translate.google.com, and then create a signature token by signing the text inputs.
the original javascript for all of this was obfuscated before rewriting it some in python.