|
-
Jun 9th, 2009, 06:13 AM
#1
Thread Starter
New Member
[Help]VB6 + Webbrowser + Iframes + Different Domains]
1 - The Situation:
I'm Using "Visual Basic 6"
I'm Using "Webbrowser Control"
I'm Using "Microsoft HTML Object Library"
====================================================
2 - What I Want:
*Acees objects (buttons, links, etc) on a IFRAME
*Get all links for example, click in links, etc...
This is easy... but...
===================================================
3- THE PROBLEM:
The page A is in www.abc.com
The page B is in www.xyz.com
The Page A contains one iframe to page B
I Can't acess elements in Iframes with diferrent domains using normal methods.
====================================================
4 - Example:
PAGE A.html (www.abc.com/PageA.html) ==>
<html>
<body>
THIS IS THE PAGE A!<Br>
PAGE A contains one Iframe to PAGE B!<br>
<Iframe id="PageB" name="PageB" src="http://www.xyz.com/PageB.html">
</body>
</html>
====================================================
For example, if a try to get links of page B (iframe) pufff...
"{"Access Denied. (Exception from HRESULT: 0x80070005 (E_ACCESSDENIED))"}"
====================================================
5 - The phrase for the more experienced are:
Nothing is impossible! you know!
How can I then perform this procedure?
Thanks
====================================================
-
Jun 9th, 2009, 11:16 PM
#2
Frenzied Member
Re: [Help]VB6 + Webbrowser + Iframes + Different Domains]
Without an actual url to follow so we can test our possible solutions against it...
Who knows?
Good Luck
Option Explicit should not be an Option!
-
Jun 11th, 2009, 05:17 AM
#3
Thread Starter
New Member
Re: [Help]VB6 + Webbrowser + Iframes + Different Domains]
Create in your Pc ==> PAGE A.HTML
Put This ==>
<html>
<body>
THIS IS THE PAGE A!<Br>
PAGE A contains one Iframe to PAGE B!<br>
<Iframe id="PageB" name="PageB" src="http://www.google.com/">
</body>
</html>
RUN PAGE A.HTML in your Webbrowser Control...
Now, Acess This Frame and Make one Serch in Google ^^
You can't do it =/
-
Jun 12th, 2009, 01:05 AM
#4
Frenzied Member
Re: [Help]VB6 + Webbrowser + Iframes + Different Domains]
Okay, here is a start for you...
Code:
Option Explicit
Private Sub Form_Load()
WB.navigate "C:\a\test.htm"
DoEvents
End Sub
Private Sub Command1_Click()
Dim H As HTMLDocument
Dim C As Object, S As Object
Set H = WB.document
Set C = H.getElementsByTagName("iframe")
For Each S In C
Debug.Print S.src
Next S
End Sub
Good Luck
Option Explicit should not be an Option!
-
Jun 15th, 2009, 11:01 PM
#5
Thread Starter
New Member
Re: [Help]VB6 + Webbrowser + Iframes + Different Domains]
Thanks for your reply... but... its DON'T WORK
=/
-
Jun 15th, 2009, 11:05 PM
#6
Thread Starter
New Member
Re: [Help]VB6 + Webbrowser + Iframes + Different Domains]
Remenber, the iframe is in another domain.
Is not possible to acess with normal methods, because this is Cross-Scripting, and is not possible without XSS Vulnerabilitys or especial procedures...
¬¬
For Example
1 - Navigate to any page with ADSENSE Banners...
2 - Make one function to Click in one of the Links...
Site is one domain, and adsense is in another domain, u CAN'T acess this iframe with normal methods... Try it please...
Thanks.
-
Jun 16th, 2009, 02:08 AM
#7
Frenzied Member
Re: [Help]VB6 + Webbrowser + Iframes + Different Domains]
Did you test my little snippit? Did you get the URL? Can you navigate to that URL?
Option Explicit should not be an Option!
-
Jun 17th, 2009, 12:27 AM
#8
Thread Starter
New Member
Re: [Help]VB6 + Webbrowser + Iframes + Different Domains]
Yes man, I tested the code... still not working =/
Please.... Try This:
1 - Navigate to any page with Google ADSENSE Banners...
2 - Make one function to Click in one of the Adsense Links.
==>You can see: if u try it, u recive de ACCESS DENIED =/
If you have any progress, please post.
Thanks.
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|