Jump to content
Sign in to follow this  
Cherokee

Instagram authentication

Recommended Posts

Cherokee

I've been attempting to login to Instagram via the _WinHTTP functions all day with no succes. 

The response only loads the default login page, with no invalid/successful login notification.

Here's my code.

#include <WinHttp.au3>

Global $host = 'instagram.com'

$hOpen = _WinHttpOpen()
$hConnect = _WinHttpConnect($hOpen, $host)

$hLoginResult = _WinHttpSimpleFormFill($hConnect, "/accounts/login/", _
        "login-form", _
        "name:username", "theusername", _
        "name:password", "thepassword")

ConsoleWrite($hLoginResult & @CRLF)

_WinHttpCloseHandle($hConnect)
_WinHttpCloseHandle($hOpen) 

Any help would be appreciated, thanks. 

Edited by Cherokee

Share this post


Link to post
Share on other sites
AutID

I've been attempting to login to Instagram via the _WinHTTP functions all day with no succes. 

The response only loads the default login page, with no invalid/successful login notification.

Here's my code.

#include <WinHttp.au3>

$host = 'instagram.com'
$hOpen = _WinHttpOpen()
$hConnect = _WinHttpConnect($hOpen, $host)

$header = "Referer: https://instagram.com/accounts/login/"
$sRead = _WinHttpSimpleFormFill($hConnect, "/accounts/login/", "login-form", "name:username", "theusername", "name:password", "thepassword", Default, $header)

FileWrite('test.txt',$sRead)

 

 

Any help would be appreciated, thanks. 

I have not an instagram account and i don't know how to create one, but maybe using an useragent could fool the server. Try it. It may work.

Share this post


Link to post
Share on other sites
Cherokee

I have not an instagram account and i don't know how to create one, but maybe using an useragent could fool the server. Try it. It may work.

Already tried that, only thing the login script relies on is the referrer equal to https://instagram.com/accounts/login/ and the cookie csrfmiddlewaretoken equal to the assigned session token.

I've edited the refer in winhttp.au3 and set it to https://instagram.com/accounts/login/ but still no luck.

I've tested it on a PHP script on my server, also with SSL enabled and it works absolutely fine, just not on instagram.

Edited by Cherokee

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
Sign in to follow this  

×

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.