Sign in to follow this  
Followers 0
Greek

TCP Login Script only work a few minutes

9 posts in this topic

Hi,

I want to be logged in with Mozilla on www.autoIt.de and this Script did work, but only for a few minutes.

Is there a possible that the Script will always work?

$Username = "Greek"
$Passwort = "pw"

TCPStartup()

$Socket = TCPConnect(TCPNameToIp("www.autoit.de"), 80)

$post="loginUsername="&$Username&"&loginPassword="&$Passwort&"&url=%2Findex.php%3Fform%3DUserLogine56b99e1&x=7&y=7&useCookies=1"
$head="POST /index.php?form=UserLogin HTTP/1.1"& @CRLF & _
      "Host: www.autoit.de"& @CRLF & _
      "User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.1; de; rv:1.9.0.10) Gecko/2009042316 Firefox/3.0.10 (.NET CLR 3.5.30729)"& @CRLF & _
      "Accept: text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8"& @CRLF & _
      "Accept-Language: de-de,de;q=0.8,en-us;q=0.5,en;q=0.3"& @CRLF & _
      "Accept-Charset: ISO-8859-1,utf-8;q=0.7,*;q=0.7"& @CRLF & _
      "Keep-Alive: 300"& @CRLF & _
      "Connection: keep-alive"& @CRLF & _
      "Referer: http://www.autoit.de/"& @CRLF & _
      "Cookie: wcf_boardLastActivityTime=1243601464; wcf_cookieHash=ef34f08b3fa1169a17175c0f7f81ae6ee56b99e1; wcf_userID=0; wcf_password="& @CRLF & _
      "Content-Type: application/x-www-form-urlencoded"& @CRLF & _
      "Content-Length: "&StringLen($post) & @CRLF & @CRLF & $post

TCPSend($Socket, $Head)



While 1
    $sRecv = TCPRecv($Socket, 2024)
    If $sRecv <> "" Then
        While 1
            $sRecv &= TCPRecv($Socket, 2024)
            If @error Then ExitLoop 2
        WEnd
    EndIf
WEnd

FileWrite(@ScriptDir&"\daten.txt", $sRecv)

Share this post


Link to post
Share on other sites



what are you expecting this script to do other than opening the homepage?

Just Loggin with 1 Click on Mozilla.

Share this post


Link to post
Share on other sites

Just Loggin with 1 Click on Mozilla.

Should it Login with the script or your browser (IE)?

What does it return ? ( we cannot test unless we have a userid to test with)

Jos


Visit the SciTE4AutoIt3 Download page for the latest versions  - Beta files                                How to post scriptsource        Forum Rules
 
Live for the present,
Dream of the future,
Learn from the past.
  :)

Share this post


Link to post
Share on other sites

Should it Login with the script or your browser (IE)?

What does it return ? ( we cannot test unless we have a userid to test with)

Jos

It logs me in with the Script, but i want to be logged in with Mozilla. ( And that did work, but only a few minutes )

Share this post


Link to post
Share on other sites

#6 ·  Posted (edited)

Should it Login with the script or your browser (IE)?

What does it return ? ( we cannot test unless we have a userid to test with)

Jos

here for testing Jos

*****

Edited by Jos
removed userid/psw

Share this post


Link to post
Share on other sites

It logs me in with the Script, but i want to be logged in with Mozilla. ( And that did work, but only a few minutes )

If you want the script to login your Firefox session then why aren't you using ff.au3 available in the examples forum?

Visit the SciTE4AutoIt3 Download page for the latest versions  - Beta files                                How to post scriptsource        Forum Rules
 
Live for the present,
Dream of the future,
Learn from the past.
  :)

Share this post


Link to post
Share on other sites

here for testing Jos

*****

wups, should send it to ^^

you tried it out?

Share this post


Link to post
Share on other sites

If you want the script to login your Firefox session then why aren't you using ff.au3 available in the examples forum?

Never tried them and the Script did work a few minutes, so wanted to make it with TCP...

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  
Followers 0