Un-Mask REAL URL

MODERN TALKING

Active Member
Licensed User
Longtime User
Some Websites hide the true URL using Masking or Stealth Redirection

Can some kind soul provide a solution to get the REAL URL of the Page - not the Masked URL being displayed in Address Bar, which remains constant no matter what Page you navigate to on the Website

Reward "donation" is USD 300 - cause I'm desperate for a solution

The Mission: UN-MASK REAL URL of any Website which utilises URL Masking
 
Last edited:

MODERN TALKING

Active Member
Licensed User
Longtime User
B4X:
ww.executeJavascript(webCaptcha, "document.getElementById('iframe_id').contentWindow.location.href)

SYNTAX ERROR :confused:
 

MODERN TALKING

Active Member
Licensed User
Longtime User
If your iframe is from another domain - cross domain - you just need to use this:

B4X:
var currentUrl = document.referrer;

And - here you've got the Main URL
 

MODERN TALKING

Active Member
Licensed User
Longtime User
How to put this:

B4X:
var currentUrl = document.referrer;

In this kinda format:

B4X:
ww.executeJavascript(webCaptcha, "document.getElementById('iframe_id').contentWindow.location.href)
 

MODERN TALKING

Active Member
Licensed User
Longtime User
Reward "donation" has been increased to USD 300

Cause I need this solution DESPERATELY and I know it ain't easy to do
 

Roycefer

Well-Known Member
Licensed User
Longtime User
Your code should look something like this:
B4X:
    ......
    Dim frameID As String = "Whatever"   'You need to get the real ID of the iframe, obviously
    ww.executeJavascript(wv, "B4A.CallSub('Log_URL', true, 'document.getElementById('" & frameID & "').contentWindow.location.href')")
End Sub

Sub Log_Url(url As String)
    Log(url)
End Sub
 

MODERN TALKING

Active Member
Licensed User
Longtime User
Roycefer - pretend you're dealing with a Kindergarten child

But Log not working for me

Can change the Code so I can ToastMessageShow(RealURL, True)
 

Roycefer

Well-Known Member
Licensed User
Longtime User
Did you set the InterfaceName as B4A? If not, change it accordingly. Here's an updated snippet that sets the InterfaceName correctly:

B4X:
    .....
    Dim frameID As String = "Whatever"   'You need to set this value correctly
    ww.addJavascriptInterface(wv, "B4A")
    ww.executeJavascript(wv, "B4A.CallSub('Log_URL', true, 'document.getElementById('" & frameID & "').contentWindow.location.href')")
End Sub

Sub Log_Url(url As String)
    Log(url)
    ToastMessageShow(url, True)
End Sub

Also, don't forget that the iframe's ID isn't "Whatever". You need to figure out what it is set Dim frameID As String correctly.
 

MODERN TALKING

Active Member
Licensed User
Longtime User
Hmm - No Errors

Running - BUT no ToastMessage displayed

Maybe the FrameID String - I didn't enter correctly from the Website

It's src = "xxx" right? From CTRL-U at the Website
 

MODERN TALKING

Active Member
Licensed User
Longtime User
upload_2017-8-28_16-24-3.png
 

Roycefer

Well-Known 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.
 
Top