Sign in to follow this  
Followers 0
Shyke

Form Troubles...

10 posts in this topic

I'm trying to change the value of an input box that is in a form with no name. What do I do here if I can't reference it using a name?

Share this post


Link to post
Share on other sites



#2 ·  Posted (edited)

From http://www.testingsecurity.com/how-to-test...cript-Injection

__________________________________________________________________________________________________

You can also use javascript to modify any value with an html form, including hidden forms, and disabled forms. The following is an example of how you would set an input tag named email within form number 0 (or the first form on the page)

java script:void(document.forms[0].email.value="test@test.com");

___________________________________________________________________________________________________

Basically it works like this:

java script:-------------------Declares a javascript function

void()-------------------------The javascript funciton to run

document---------------------Pointing to the current page...

forms[0]----------------------First form on the page(starts at 0)...

email--------------------------name of the input field you with to modify...

value=""----------------------The value you wish to set in the above field

You would run this as a URL in DOS or there s probably an IE.au3 function you can use.

_RunDos('start java script:void(document.forms[0].email.value="test@test.com");')

Dont do anything illegal :rolleyes:

Edited by Mast3rpyr0

Share this post


Link to post
Share on other sites

There are 11 forms, all nameless.

Share this post


Link to post
Share on other sites

#5 ·  Posted (edited)

Nevermind, the second one is the one that needs to be changed.

Thank-you for all the help!

EDIT: How do I submit a form that way?

Edited by Shyke

Share this post


Link to post
Share on other sites

hmm not sure you can do it through JI but maybe an IE function...

maybe _IEAction() but then i think your stuck trying to get the name of the form again.

See if this helps http://www.autoitscript.com/forum/index.php?showtopic=48231

Share this post


Link to post
Share on other sites

"java script:void(document.forms[0].submit());"

^ That will submit the form.

Now another problem. Using Javascript to change the stuff seems to work, but when you submit, it shows that you didn't enter anything.

Share this post


Link to post
Share on other sites

#8 ·  Posted (edited)

can i see what your full code looks like putting **** for any info you dont want me to see such as password and username

seeing the page will help me figure this out a little faster

Edited by Mast3rpyr0

Share this post


Link to post
Share on other sites

I'll PM you.

Share this post


Link to post
Share on other sites

I'm trying to change the value of an input box that is in a form with no name. What do I do here if I can't reference it using a name?

Look at _IEFormGetCollection() in the help file.

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!


Register a new account

Sign in

Already have an account? Sign in here.


Sign In Now
Sign in to follow this  
Followers 0