M
M
MrlCrosl2013-12-20 13:11:38
JavaScript
MrlCrosl, 2013-12-20 13:11:38

Authorization in Steam

Good afternoon. Recently there was an idea to write a small program that will buy things on the Steam site. I did the main task (search for the right lots, sorting by price, etc.). It came to automatic buying. Everything turned out to be not so simple. Initially, for automatic purchase, I used a java script found on the Internet and a chrome extension - tampermonkey, which launched the script after clicking on the link with the lot in the market.
How it all works in general terms:
1. The program finds the desired lot.
2. The program launches Google Chrome and opens a link to the lot. After the link to the lot, the price of the species is indicated: "#14", which means $14.
3. The script reads the price and buys the item.
Everything works well, but I wanted more automation, without the involvement of chrome and extensions.
So, I settled on rsa encryption. Here, at this link , a certain gear has already considered a similar issue. There is js that Steam used to encrypt the password before. I figured it out, I guess.
Previously, the function was called like this:

var pubKey = RSA.getPublicKey( PKEY_MOD, PKEY_EXP );
var encryptedPassword = RSA.encrypt( PWD, pubKey );

There is no such thing in the new script. I did not find anything similar where you can pass the received parameters PKEY_MOD, PKEY_EXP.
We get them here: link1
In general, the question itself is: where to pass these parameters?
Here is a link to the new script: link2
Here is a link to the old one: link3
And just a link for authorization (just in case): link4
Sorry, if in some places I used terms incorrectly.

Answer the question

In order to leave comments, you need to log in

1 answer(s)
M
MrlCrosl, 2013-12-21
@MrlCrosl

Finally figured it out)
I output encryptedPassword like this:
And it was necessary like this:
I'm an idiot :D

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question