Created
January 9, 2018 07:14
-
-
Save alaa-aqeel/1f2bd73853844468bab628ec20908b46 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# LogIn using requests # | |
import requests as req | |
log_url = 'http://localhost/btslab/admin/adminlogin.php' | |
session = req.Session() | |
#DATA LogIn | |
kw = {'data': { | |
'username':"admin", | |
'password':"password", | |
'Login':"Login" | |
} | |
} | |
post = req.Request("POST", log_url, **kw) | |
prepare = session.prepare_request(post) | |
resp = session.send(prepare) | |
# print(dir(resp)) | |
print(resp.text) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment