Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #AutoIt3Wrapper_AU3Check_Parameters=-d -w 1 -w 2 -w 3 -w 4 -w 5 -w 6
- #include "WinHttp.au3"
- Opt("MustDeclareVars", 1)
- ; !!!Note that this example will fail because of invalid username and password!!!
- ; Authentication data
- Global $sUsername = "UserName"
- Global $sPassword = "Password"
- ; Address
- Global $sAddress = "http://127.0.0.1/"
- ; Initialize and get session handle
- Global $hOpen = _WinHttpOpen()
- ; Get connection handle
- Global $hConnect = _WinHttpConnect($hOpen, $sAddress)
- ; Request
- Global $hRequest = _WinHttpOpenRequest($hConnect, _
- "POST", _ ; verb
- "shell/BITE/index.php", _ ; target
- Default)
- ; Send it
- _WinHttpSendRequest($hRequest, _
- "var", "&var=file.php")
- ; Wait for the response
- _WinHttpReceiveResponse($hRequest)
- ; Close open handles and exit
- _WinHttpCloseHandle($hRequest)
- _WinHttpCloseHandle($hConnect)
- _WinHttpCloseHandle($hOpen)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement