Un-Mask REAL URL

MODERN TALKING

Active Member
Licensed User
Longtime User
No wonder it's so cryptic and difficult - this is at the top of the Source:

B4X:
<!-- (C) COPYRIGHT International Business Machines Corporation 1999 -->
<!-- All Rights Reserved -->
<!-- Licensed Materials - Property of IBM -->
<!-- -->
<!-- US Government Users Restricted Rights - Use, duplication or  -->
<!-- disclosure restricted by GSA ADP Schedule Contract with IBM Corp.-->
<!-- -->
 

MODERN TALKING

Active Member
Licensed User
Longtime User
Is there any way to use Frame SRC instead of Frame ID?

Then I think we have the solution - MAYBE

But you are still getting a donation for genuinely helping so much - even if we don't succeed today
 

MODERN TALKING

Active Member
Licensed User
Longtime User
It looks like the frameID is zbasv6g2. You also have the URL of the iframe's content as the "src" attribute of the iframe.

Man, this is complicated Spy vs Spy kinda stuff

I play around with this slowly tonight - have to play soccer in an hour

Tell you tonight how my tinkering proceeds - STAY WITH ME Roycefer and THANK YOU :)

Report to you tonight
 

sorex

Expert
Licensed User
Longtime User
I still don't get the purpose of it tho. if the iframe doesn't load it won't load as main document either.
 

MODERN TALKING

Active Member
Licensed User
Longtime User
B4X:
Sub webCaptcha_PageFinished (Url As String)
    Dim Javascript As String
    Javascript="B4A.CallSub('Process_HTML', false, document.documentElement.outerHTML)"
    ww.executeJavascript(webCaptcha, Javascript)
End Sub

Sub Log_URL(URL As String)
    ToastMessageShow(URL, True)
End Sub

Sub Process_Html(Html As String)
    CallSubDelayed2(Me, "Process_HtmlImpl", Html)
End Sub

Sub Process_HtmlImpl(Html As String)
    Dim frameID As String = “whatever”
    ww.addJavascriptInterface(webCaptcha, "B4A")
    ww.executeJavascript(webCaptcha, "B4A.CallSub('Log_URL', True, 'document.getElementById('" & frameID & "').contentWindow.location.href')")
    ww.executeJavascript(webCaptcha, "B4A.CallSub('Log_URL', True, 'document.getElementById('" & frameID & "').src;")
End Sub

"whatever" is the src from the Website CTRL-U
 

MODERN TALKING

Active Member
Licensed User
Longtime User
Sorex, do you have access to any of the D.U.M.B.s in Europe?

They have Trans-continental Trains which utilise technology you never heard of - travelling at speeds you can't fathom

So I get you a seat on one of them and you're in Kuala Lumpur within 30 minutes - to help me
 

sorex

Expert
Licensed User
Longtime User
besides myself being dumb sometimes, no ;)

the frame id might be something random so you better loop through the iframes
 

sorex

Expert
Licensed User
Longtime User
this will give you all iframe sources as csv ( ; )

B4X:
sources="";frames=document.getElementsByTagName("iframe");for(i=0;i<frames.length;++i){sources+=frames[i].src+";";}return(sources);

note sure if you need the return or not to fetch it with that lib
 

MODERN TALKING

Active Member
Licensed User
Longtime User
Sorex and Roycefer, thank you so much guys

Don't give up - we TRY AGAIN tomorrow

Gute nacht mein kamerad
 

MODERN TALKING

Active Member
Licensed User
Longtime User
this will give you all iframe sources as csv ( ; )

B4X:
sources="";frames=document.getElementsByTagName("iframe");for(i=0;i<frames.length;++i){sources+=frames[i].src+";";}return(sources);

note sure if you need the return or not to fetch it with that lib

WUNDERBAR

Trying this now

Hold on Sorex
 

MODERN TALKING

Active Member
Licensed User
Longtime User
What Library do I need?

Errors, in Red:
sources
frames
document
i
frames

So I'm not constructing the line properly :(
 

sorex

Expert
Licensed User
Longtime User
try quoting like this

B4X:
ww.executeJavascript(webCaptcha, "B4A.CallSub('Log_URL', True, ""sources='';frames=document.getElementsByTagName('iframe');for(i=0;i<frames.length;++i){sources+=frames[i].src+';';}return(sources);"")

not sure if that method supports multi command operations.

you might need to inject it first and then call it.
 
Top