K
K
kos_dev2017-10-14 17:51:02
JavaScript
kos_dev, 2017-10-14 17:51:02

How to correctly send a POST request from the browser console?

Hello.
I'm trying to bypass captcha on vk.com.
As explained by the support of one service, it is required to insert the answer from Google into a hidden field and simulate a request to VK, which leaves after the captcha has passed correctly.
I tracked which request goes to VK after passing the captcha, but I can’t formulate the request correctly.
If anyone knows how to do this, please help.
Thank you very much in advance.
Below I am attaching the code of my last request attempt and a screenshot with data about the request that needs to be simulated.

var formData = new FormData();
formData.append("act","a_do_like");
formData.append("al","1");
formData.append("from", "photo_viewer");
formData.append("recaptcha", "03AJzQf7PSewqGzFODwWrwHsgdNZF122_rGLA5kXcHQ2a8X3rYgH7EPL1_kLnqprONPceXmuOJviBiqEDnnf7e16Y93FfkILMfNcHqYqiq2tX1EERCp7HRmnMHOoqLPqyyDIdOfFP_mzby2pWTXyZx76LNst2r9hMpQLXbUPh-BmXTKuo50vvq6AcZnMZXSRd_wunZnWrYXl3h7QcIiLEVAy_HM6I-zFTRyuLIZvWw8_b_ubRO7Q2OWPWzJ16YBMiMb3EU-Wa9jfIM7QKoIfjLhQYSx8h6yD-ldI8d9N7qujIDpqufSOHnSr1-X1ES30IhLbSDSnfoSvcn");
formData.append("object", "photo-42012475_456239274");

var xhr = new XMLHttpRequest();
xhr.open("POST", "https://vk.com/like.php");
xhr.setRequestHeader('Content-Type', 'application/x-www-form-urlencoded');
xhr.setRequestHeader("X-Requested-With", "XMLHttpRequest");
xhr.send(formData);

WmkTT7B.png

Answer the question

In order to leave comments, you need to log in

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question