Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Passing form variables through URL

What I want to accomplish is logging in to a website by simply typing in the form variables in the URL.

HTML code:

    <form action="httpclient.html" onsubmit="return checkSubmit();" method="post"           target="_parent" name="frmHTTPClientLogin">
    <input type="hidden" name="mode" value="191">
    <label>Username</label>
    <input border="1" style="width:150px" maxlength="60" name="username">
    <label>Password</label></pre>
    <input type="password" border="1" style="width:150px" autocomplete="off" name="password" maxlength="60">

This is the relevant past of the code. Now I want to login to this site http://10.100.56.55/httpclient.html just by passing values typed in the url. Firstly is it possible. If yes then what exactly do i need to type for userame :name and password being pass ? and what encoded URL will be passed in POST method if any?

like image 254
nightf0x Avatar asked Nov 25 '25 09:11

nightf0x


2 Answers

Change method="post" to method="get"

like image 188
Marco Avatar answered Nov 26 '25 23:11

Marco


If you want to type the Querystring in for the username and password, you need to do this in the address field of your browser:

http://10.100.56.55/?username=name&password=pass

EDIT: You need to find out where the form is going and what it's doing. For this, you need to check what the submit javascript function called 'checkSubmit()' is doing. You can do this by opening the page in your browser and doing a view source. If the javascript is external to the html file, check the js links on the page and open those up to find that function. The function might have the querystring parameters you're looking for.

like image 44
mnsr Avatar answered Nov 26 '25 23:11

mnsr



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!