Purpose: launching a browser and automatic authorization to a contact when launching a script.

Problem: the goal is not achieved (authorization does not occur)

#!/bin/bash login='my_email@mail.ru'; pass='my_password'; firefox --private "https://login.vk.com/?act=login&email=$login&pass=$pass" & echo "all done!" 

What is done wrong?

  • In principle, the script is written correctly. and the fact that authorization does not occur is probably due to the insufficient number of parameters essential for the server (and, probably, generated on the fly). - aleksandr barakin
  • I think you better ask another question about how to log in to vk.com with the help of the url: what should be listed in it. without mentioning bash, which can only “scare off” vk.com specialists. - aleksandr barakin
  • I will try, thank you, I will also unsubscribe if I find the answer - Inga
  • Changed the link to " vk.com/login.php?act=login&email=$mail&pass=$pass " - a little progress on the face (login was entered, password is too tight) - Inga
  • Consider carefully the login form, there are a lot of hidden fields, which also need to be posted, including something like an IP address hash and something else, something about captcha. Well, maybe the het method will not work and need a post. Maybe curl will be easier. - user3132194

2 answers 2

In principle, the script is written correctly. and the fact that authorization does not occur is probably due to the insufficient number of parameters essential for the server (and, probably, generated on the fly).

Pay attention to the login form - it uses a lot of hidden fields that must also be transferred. and the values ​​in them, apparently, are substituted by javascript dynamically.

    • There POST , and you get.
    • Some more hidden values ​​are sent, but they seem to be static for one browser / IP (when changing one of a pair, the tokens change).