Jump to content

Instagram authentication


 Share

Recommended Posts

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
Link to comment
Share on other sites

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.

Link to comment
Share on other sites

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
Link to comment
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
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...