Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <WinHTTP.au3>
- $sLicenceUsername = InputBox("Licence System Login Data", "Please enter your Licence System Username")
- $sLicencePassword = InputBox("Licence System Login Data", "Please enter your Licence System Password", "", "*")
- $sCodeBotUsername = InputBox("Codebot.de Login Data", "Please enter your Codebot.de Username")
- $sCodeBotPassword = InputBox("Codebot.de Login Data", "Please enter your Codebot.de Password", "", "*")
- ;Create WinHTTP Connection to Licence Server
- $hLicenceSession = _WinHttpOpen()
- $hLicenceConnect = _WinHttpConnect($hLicenceSession, "127.0.0.1")
- ;Create WinHTTP Connection to CodeBot.de
- $hCodebotSession = _WinHttpOpen()
- $hCodebotConnect = _WinHttpConnect($hCodebotSession, "www.codebot.de")
- ;Requests the LoginPage of CodeBot.de
- $sRequest = _WinHttpSimpleRequest($hCodebotConnect, "GET", "/index.php/Login")
- ;Sends the SourceCode of the requested LoginPage to our Licence Server using the getT Action
- $t = _WinHttpSimpleRequest($hLicenceConnect, "POST", "/php Lizenz System/licence.php", Default, _
- 'username=' & $sLicenceUsername & '&password=' & $sLicencePassword & '&action=getT&data=' & $sRequest)
- ;If $t does not tell u login incorrect or Not Licenced we got the correct Timestamp from the Licence Server and are ready to login.
- If ($t = 'Login incorrect' Or $t = 'Not Licenced') Then
- MsgBox(0, "Error", $t)
- Else
- $sCodebotBody = _WinHttpSimpleRequest($hCodebotConnect, "POST", "/index.php/Login/", Default, _
- 'username=' & $sCodeBotUsername & '&action=login' & '&password=' & $sCodeBotPassword & '&useCookies=1&submitButton=Anmelden&url=http%3A%2F%2Fwww.codebot.de%2F&t='&$t)
- If StringInStr($sCodebotBody, 'Sie wurden erfolgreich angemeldet.') > 0 Then
- MsgBox(0, "Success", "Login successfull")
- Else
Add Comment
Please, Sign In to add comment