nightf0x
nightf0x

Reputation: 2039

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?

Upvotes: 3

Views: 76107

Answers (5)

Javed
Javed

Reputation: 6239

the issue was in the input tag <input type="hidden" name="min_price" value="200"> forward slash was missing,I have added the forward slash and it works now <input type="hidden" name="min_price" value="200"/>.

Upvotes: 2

Indiekoder
Indiekoder

Reputation: 91

<input type="text" class="form-control" placeholder="Products" name="search" value="search" id="search">
<input type="text" class="form-control" placeholder="Products" name="search" value="search" id="search2">
<button type="submit" class="btn btn-default" onclick="location.href='\search.php?search='+ document.getElementById('search').value+'&search2='+document.getElementById('search2').value;"> Search</button>

Upvotes: 2

mnsr
mnsr

Reputation: 12437

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.

Upvotes: 2

honeyp0t
honeyp0t

Reputation: 897

It's not possible to do that; the form would have to use the GET method.

Upvotes: 1

Marco
Marco

Reputation: 2338

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

Upvotes: 5

Related Questions