Shyke Posted June 24, 2007 Posted June 24, 2007 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?
Mast3rpyr0 Posted June 24, 2007 Posted June 24, 2007 (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 functionvoid()-------------------------The javascript funciton to rundocument---------------------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 fieldYou 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 Edited June 24, 2007 by Mast3rpyr0 My UDF's : _INetUpdateCheck() My Programs : GameLauncher vAlpha, InfoCrypt, WindowDesigner, ScreenCap, DailyRemindersPick3GeneratorBackupUtility! Other : Bored? Click Here!
Mast3rpyr0 Posted June 24, 2007 Posted June 24, 2007 can i have the URL and any other info that will help me help you My UDF's : _INetUpdateCheck() My Programs : GameLauncher vAlpha, InfoCrypt, WindowDesigner, ScreenCap, DailyRemindersPick3GeneratorBackupUtility! Other : Bored? Click Here!
Shyke Posted June 24, 2007 Author Posted June 24, 2007 (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 June 24, 2007 by Shyke
Mast3rpyr0 Posted June 24, 2007 Posted June 24, 2007 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 My UDF's : _INetUpdateCheck() My Programs : GameLauncher vAlpha, InfoCrypt, WindowDesigner, ScreenCap, DailyRemindersPick3GeneratorBackupUtility! Other : Bored? Click Here!
Shyke Posted June 24, 2007 Author Posted June 24, 2007 "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.
Mast3rpyr0 Posted June 24, 2007 Posted June 24, 2007 (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 June 24, 2007 by Mast3rpyr0 My UDF's : _INetUpdateCheck() My Programs : GameLauncher vAlpha, InfoCrypt, WindowDesigner, ScreenCap, DailyRemindersPick3GeneratorBackupUtility! Other : Bored? Click Here!
Moderators big_daddy Posted June 25, 2007 Moderators Posted June 25, 2007 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.
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now