Hack Forums
[Python] Help! Please! I want to implement hashing in my python script. - Printable Version

+- Hack Forums (https://hackforums.net)
+-- Forum: Tech (https://hackforums.net/forumdisplay.php?fid=444)
+--- Forum: Coding (https://hackforums.net/forumdisplay.php?fid=151)
+---- Forum: Software Development (https://hackforums.net/forumdisplay.php?fid=118)
+---- Thread: [Python] Help! Please! I want to implement hashing in my python script. (/showthread.php?tid=5810503)



Help! Please! I want to implement hashing in my python script. - lance4182 - Mar 12, 2018

So I was working on a python script to login to mega.co.nz. The problem is, in the post data, mega uses email and hash of email:pass.
I have done hashlib things in python before but this uses some aes algo a little complecated.

I found a site, which has a javascript doing the hashing.

Here is the link for the site.

If site was using some post request to get hash that is needed then I would have done that. But site just uses a javascript which creates hash on the go.

I tried to take that .js and used modules to be able to run it in python. but failed.

Can anyone please help me create a hash function in python that yields the required hash.

Thanks.


RE: Help! Please! I want to implement hashing in my python script. - HFDone - Mar 12, 2018

you can use https://github.com/davisp/python-spidermonkey


RE: Help! Please! I want to implement hashing in my python script. - andmuchmore - Mar 12, 2018

why not use the mega sdk?

https://github.com/meganz/sdk

there are a couple of python examples on there as well

https://github.com/meganz/sdk/tree/master/examples/python

there is also a third party library which might be alittle more user friendly if the sdk is overwhelming

https://github.com/juanriaza/python-mega

Hope this helps.


RE: Help! Please! I want to implement hashing in my python script. - lance4182 - Mar 13, 2018

(Mar 12, 2018 02:53 PM)HFDone Wrote:  you can use https://github.com/davisp/python-spidermonkey

(Mar 12, 2018 03:17 PM)andmuchmore Wrote:  why not use the mega sdk?

https://github.com/meganz/sdk

there are a couple of python examples on there as well

https://github.com/meganz/sdk/tree/master/examples/python

there is also a third party library which might be alittle more user friendly if the sdk is overwhelming

https://github.com/juanriaza/python-mega

Hope this helps.

Thanks guys for the input. I will definitely look into these links after I get back home from a short vacation. SDK looks overwhelming for sure but looks promising..