r/stackoverflow • u/OtacMomo • Apr 15 '19
Login over url address with login&password credentials
I was searching for a way to login into this website
Www.Global-talismanofblood.com over url
Tried adding at the end ?login=username&password=password
Doesn't work
It uses a simple post form login how to do it anyone?
0
Upvotes
1
u/keesvv Apr 15 '19
Also, if the login form uses a POST-request, you'll not be able to use the
?username=x&password=xquery. POST-requests won't look for URL queries in general, so you will need to do it programmatically if so.If it's a POST-request, you can for instance use the Linux tool cURL for it or something else.
1
u/keesvv Apr 15 '19
I'm afraid you're posting this to the wrong sub, but I'll answer it for you.
As you stated, the website uses a form to log in. However, it is not guaranteed for a website to use the id's 'login' and 'password' as a form field.
Firstly, you need to find out the required fields in the form. Open your Developer Tools (on Chrome, but Firefox will work too). In the Developer Tools pane, browse to the first
<form>element, select it and expand it.Look for at least two text input's ID's; they are most likely named 'email', 'username', 'password' or 'login'. Also, look for the form's HTTP method. If the form has an attribute called
method=XXXX, you should use this method to make the HTTP request, a.k.a.: the login.If the method is not specified, it's most likely a GET-request. If it is a GET-request, you can just use the website's URL and add a query after it, like
?id1=username&id2=passwordNote that 'id1' = the username field you found in the Developer Tools pane and 'id2' = the password field.
1
u/keesvv Apr 15 '19
If this helped you out, let me know. If you have any questions or if it didn't work, also feel free to let me know.