Sign in to follow this  
Followers 0
Hulamac

green around the gills - script help for my website

7 posts in this topic

#1 ·  Posted (edited)

; this defines the IE script commands and allows it to use all of the
; IE commands with out it it will not know what to do
#include <IE.au3>
; following function gets all the for positions automaticly and then assigns them to a
; variable with out you having to figure out what the name of each one it
Local $oIE_1 = _IECreate("https://online.blueridgeknives.com/profile/login.aspx?returnurl=/")
Local $oForm_1 = _IEFormGetCollection($oIE_1, 0)
Local $oQuery1 = _IEFormElementGetCollection($oForm_1, 2)
Local $oQuery2 = _IEFormElementGetCollection($oForm_1, 3)
_IEFormElementSetValue($oQuery1, "myusername")
_IEFormElementSetValue($oQuery2, "mypass")
Local $Submit1 = _IEGetObjById($oIE_1 , "aspnetForm")
_IEFormSubmit($Submit1)

; following function gets all the for positions automaticly and then assigns them to a
; variable with out you having to figure out what the name of each one it
Local $oIE_2 = _IECreate("www.my_zencart_admin_login_page.com")
Local $oForm_2 = _IEFormGetCollection($oIE_2, 0)
Local $oQuery3 = _IEFormElementGetCollection($oForm_2, 1)
Local $oQuery4 = _IEFormElementGetCollection($oForm_2, 2)
_IEFormElementSetValue($oQuery3, "my_usrname")
_IEFormElementSetValue($oQuery4, "my_psswrd")
_IELoadWait($oIE_2)
ControlClick("My website name - Windows Internet Explorer", "Admin Login", "[CLASS:Button; TEXT:Login; Instance:1;]")

the code completes with no errors however i cant get the script to click the submit button...... can someone help me out ive been banging my head against the wall for a few days now and its driving me crazy, ive tried _IEFormImageClick, _IEFormSubmit and just about every other way i could think of but all of them give me errors for the second window that opens so ifinally got this far and theres no errors and it doesnt do anything.... the first window does what its supposed to do until the submit part then it just makes the password dissapear.... i dont recall asking it to do that lol

if you can tell me the part of the html code that need to be identified when using the command that would basicly tell me exactly what i need to put in there or a jumping off point!

any help at all would be great! thanks!

Edited by Hulamac

Share this post


Link to post
Share on other sites



Try

$oSubmit = _IEGetObjById ($oIE_1, "ctl00_MainContent_LoginModule1_Radlink")

_IEAction ($oSubmit, "click")

Or...

_IEGetObjByName($oIE_1,"ctl00$MainContent$LoginModule1$Radlink")

I can't really test it.....

Share this post


Link to post
Share on other sites

#3 ·  Posted (edited)

Erm,

You're wading into dangerous territory man....... My concerns looking at your code is that you're trying to brute force hack......

Edited by Colyn1337

Share this post


Link to post
Share on other sites

#4 ·  Posted (edited)

nono please dont confuse this for any hacking i wouldnt be stupid enough to document any hacking attempt in any forum this is the beggining of a script im writing to check stock on my website from one of my distributors because they have great prices however they dont have a module i can use to check stock and doing it by hand would take over a day since they have 13k items

this will eventually help me save countless hours a day and provide a backbone to do many automated tasks for my website i didnt post the name of the site for fear of any hacking attempts i deal with customers cc numbers and dont want anyone to have any items that would make it easier for them to hack my site or exploit

if any admin need to see documentation about this situation please let me know i can provide business lic info and website validation i just really need help lol

Edited by Hulamac

Share this post


Link to post
Share on other sites

van walker your correct it works for the first window.... but for some reason the second window to get into my admin account wont click it...

>_< :censored:

Share this post


Link to post
Share on other sites

Hmm I can't really help, I don't have access to the 2nd page, is it possible to post some of the html code or tell me what does your 2nd page look like?

I'm really new to autoit also but I'm wondering why do you need to use controlclick for the 2nd page.

Share this post


Link to post
Share on other sites

@vanwalker

thx for the help i just had the wrong object in the right place with the second page i needed a diff part of the html so i got it working now thanks!

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