Jump to content

Help with submitting a form


FreeFry
 Share

Recommended Posts

Hi!

I thought I would try and make an "auto poster" on this forum: www.fragmasters.co.uk

It's a CS clans homepage, and I was thinking of making an auto-poster for their "Report a Cheat" section.

Basically this program would have some inputs, and then with the help of the _IE functions login, and post a message containing the hacker id, and stuff like that.

Logging in works flawless(I've even made it speed up a little by avoiding the use of _IELoadWait), the problem comes to the posting bit:

There's a text area, and this text area is apparently not the real one where text goes into when you type into the text area(because manipulating it with javascript doesnt work):

<textarea id="vb script:void(document.vbform.message.value="test"

I've been stuck on this a couple of days, and I wonder if there's any experienced javascripters/htmlers in here that might be able to help me?

Note:

I even tried crafting my own POST packets to their web-server, but it's just not working(it can login and everything, but the posting doesn't work(even when i have the supposed sessionhash required to be able to post :/)

My project has kinda come to a standstill now, and I was hoping someone could help me out with this. :/

I realize that this is a lot to ask with help about, but if anyone is up to it, I would preferably keep this to the _IE functions, but if it's not possible then any other way is a go :whistle:

Thanks for any help :">

The code is attached, as it didn't work using autoit tags(I'm not using an embedded ie object, because it fucked up the login process):

Edit:

uhm... posting javascript code doesn't seem to work on this forum :S it acts weird

Edit2:

Removed the function that tried to stop the browser from loading images and other slow loading things(this should fix login errors/weird behavior)

Edited by FreeFry
Link to comment
Share on other sites

Are you asking about filling the form or submitting the form?

If it is filling the form you have not drilled deep enough or provided enough information.

If submitting, see the remarks with _IEFormSubmit and the example in _IEAction

Dale

Free Internet Tools: DebugBar, AutoIt IE Builder, HTTP UDF, MODIV2, IE Developer Toolbar, IEDocMon, Fiddler, HTML Validator, WGet, curl

MSDN docs: InternetExplorer Object, Document Object, Overviews and Tutorials, DHTML Objects, DHTML Events, WinHttpRequest, XmlHttpRequest, Cross-Frame Scripting, Office object model

Automate input type=file (Related)

Alternative to _IECreateEmbedded? better: _IECreatePseudoEmbedded  Better Better?

IE.au3 issues with Vista - Workarounds

SciTe Debug mode - it's magic: #AutoIt3Wrapper_run_debug_mode=Y

Doesn't work needs to be ripped out of the troubleshooting lexicon. It means that what you tried did not produce the results you expected. It begs the questions 1) what did you try?, 2) what did you expect? and 3) what happened instead?

Reproducer: a small (the smallest?) piece of stand-alone code that demonstrates your trouble

Link to comment
Share on other sites

It's not submitting the form, and I don't really know what information to supply with this, as I'm not that good @html/javascript :/

Well, it's when posting a new thread, i cant find any way to put text in to the javascript <textarea> element(well actually it DOES put text into the element, but it's not visible in the textarea, and when submitting, javascript checks the text, and it doesnt see it either - apparently... hmm

the forum uses somekind of javascript thing called "vBulletin 3.5.4" as seen in this js file: http://www.fragmasters.co.uk/forum/clients...ulletin_menu.js

Link to comment
Share on other sites

I presume the area you are trying to write to is the large message area in the middle of that page? If so, the trick is taht it is not actually a form field, but rather an iFrame. Here is an example of how to write to it:

#include <IE.au3>

$oIE = _IEAttach("Fragmaster")
$oFrame = _IEFrameGetObjByName($oIE, "vB_Editor_001_iframe")
_IEBodyWriteHTML($oFrame, "This is a test")

Dale

Free Internet Tools: DebugBar, AutoIt IE Builder, HTTP UDF, MODIV2, IE Developer Toolbar, IEDocMon, Fiddler, HTML Validator, WGet, curl

MSDN docs: InternetExplorer Object, Document Object, Overviews and Tutorials, DHTML Objects, DHTML Events, WinHttpRequest, XmlHttpRequest, Cross-Frame Scripting, Office object model

Automate input type=file (Related)

Alternative to _IECreateEmbedded? better: _IECreatePseudoEmbedded  Better Better?

IE.au3 issues with Vista - Workarounds

SciTe Debug mode - it's magic: #AutoIt3Wrapper_run_debug_mode=Y

Doesn't work needs to be ripped out of the troubleshooting lexicon. It means that what you tried did not produce the results you expected. It begs the questions 1) what did you try?, 2) what did you expect? and 3) what happened instead?

Reproducer: a small (the smallest?) piece of stand-alone code that demonstrates your trouble

Link to comment
Share on other sites

Oh my god! Thank you for taking time with this Dale, doh now that i look at your example i see how damn simple it would've been if I would've looked it up on google :shame:

Edit: And yes, that's exactly what I want to do, again, Thank You! :whistle:

Edit2:

If one would want to do this using javascript only, how would one do that? (just for fun:P)

Edited by FreeFry
Link to comment
Share on other sites

If one would want to do this using javascript only, how would one do that? (just for fun:P)

Take a look at the source for the two functions I used in the example above -- if you are experienced with Javascript it will be easy for you to convert.

Dale

Free Internet Tools: DebugBar, AutoIt IE Builder, HTTP UDF, MODIV2, IE Developer Toolbar, IEDocMon, Fiddler, HTML Validator, WGet, curl

MSDN docs: InternetExplorer Object, Document Object, Overviews and Tutorials, DHTML Objects, DHTML Events, WinHttpRequest, XmlHttpRequest, Cross-Frame Scripting, Office object model

Automate input type=file (Related)

Alternative to _IECreateEmbedded? better: _IECreatePseudoEmbedded  Better Better?

IE.au3 issues with Vista - Workarounds

SciTe Debug mode - it's magic: #AutoIt3Wrapper_run_debug_mode=Y

Doesn't work needs to be ripped out of the troubleshooting lexicon. It means that what you tried did not produce the results you expected. It begs the questions 1) what did you try?, 2) what did you expect? and 3) what happened instead?

Reproducer: a small (the smallest?) piece of stand-alone code that demonstrates your trouble

Link to comment
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
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...