Jump to content

inetget() and inetread() unable to authentificate


Fire
 Share

Recommended Posts

Hello Great Community.

I have problem with inetread()

Snippet From Help file for inetread()

To use a username and password when connecting simply prefix the servername with "username:password@", e.g.
"http://myuser:mypassword@www.somesite.com"

Yes it works for me if i just copy&paste full formed url to address bar of browser (Firefox) for HTTP(S) authentification.

But it didn't works for me anymore in autoit:(

In fact i have IE8, OS (Win XP SP2) + Autoit v3.3.6.0 and inetread() (inetget() too ) didn't works for me in some situations.(I mean in authentification tasks)

Ok lets say you need Authenticate (BASIC HTTP(S) Autentification) on remote site:

Using

$AUTH="https://login:pass@updates.opendns.com/nic/update?hostname=home" ;network name=home
HttpSetUserAgent("Mozilla/5.0 (Windows; U; Windows NT 5.1; ru-RU; rv:1.9.2.11) Gecko/20101012 (build 03402) Firefox/3.6.11 GTB7.1")
$data=InetRead($AUTH,3)

#cs

2=[Ignore all SSL errors (with HTTPS connections).]
+
1=[Forces a reload from the remote site.]

#ce

ConsoleWrite("Returned ==> " & @CRLF & "BEOF DATA" & @CRLF & $data & @CRLF & "EOF DATA")



;AutoIt3.exe:5780   TCP compname:10924  208.69.38.180:https ESTABLISHED

didn't works for me any more.

But in fact theris HTTP or HTTPS connection will be established.(Using TCPVIEW i can see it)

Also i try to use VPN connection and test again this issuse.I got Same result from VPN too:(

In this case return data "nothing" from inetread() which means error.

Nothing blocked with Firewall.Autoit allowed for inet*() tasks in this machine.

Also i try manipulate with HTTP AUTH type and it is unsuccessfull for me too.

I guess:

1) I need upgrade Autoit on my machine Autoit v3.3.6.1 (unsure)

2)Help file needs update for inetread() also inetget() (Because this functions didn't works for authentificate)

3)I'm doing something wrong

I am sure theris no cookie handling problem,theris no validation (i mean login:passwd) problem,theris no connection problem.

How to solve this problem?

I know i can use WinHTTP* func..s

Is here any mistake by me?Also is here another alternate method for solve this problem?

Sorry for my English & Great Thanks in advance!

[size="5"] [/size]
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...