Un-Mask REAL URL

MODERN TALKING

Active Member
Licensed User
Longtime User
How about I search the HTML String for "Frame" then do another search from that Index for "src" - maybe works?
 

MODERN TALKING

Active Member
Licensed User
Longtime User
Sorex, you been so helpful man

Sending a small "donation" now and have to get into bed - extremely exhausted

Love ya bro - we try again tomorrow
 

MODERN TALKING

Active Member
Licensed User
Longtime User
Small donation for your camaraderie today

THANK YOU Sorex

Hope can make this work tomorrow

Gute nacht mein freund

Confirmation number: 89296272LT9045207
GV
 

sorex

Expert
Licensed User
Longtime User
Thanks.

I downloaded that webview extra lib to have a look at it.

It doesn't seem to like my multi line piece of code.

but you can do most of your hackering in B4A without the need of javascript once you get the main source.

The code below fetches the iframe urls from the main source no matter what order of parameters, multiline tagging or quoting of values.

B4X:
Sub Globals
Private WebCaptcha As WebView
Dim ww As WebViewExtras
Dim Javascript As String
End Sub

Sub Activity_Create(FirstTime As Boolean)
WebCaptcha.Initialize("webCaptcha")
Activity.AddView(WebCaptcha,0,0,100%x,100%y)
ww.addJavascriptInterface(WebCaptcha,"B4A")
Dim html As String=File.ReadString(File.DirAssets,"src.html")
WebCaptcha.LoadHtml(html)
End Sub

Sub webCaptcha_PageFinished (Url As String)
Javascript="B4A.CallSub('Process_HTML', false, document.documentElement.outerHTML)"
ww.executeJavascript(WebCaptcha, Javascript)
End Sub

Sub Process_Html(Html As String)
Dim m As Matcher     
Html=Html.ToLowerCase.Replace(Chr(0x22),"").Replace(CRLF," ").Replace(Chr(13),"").Replace(">"," >")
m = Regex.Matcher("<iframe[^>]*src=(.*?) ", Html)
Do While M.Find
Log("Found: " & M.Group(1))
Loop
End Sub

B4X:
<!DOCTYPE html>
<html>
<body>
<iframe src="http://www.ibm.com"></iframe>
<iframe id=myframe src="http://www.google.com" width=666></iframe>
<iframe
id=myframe
src="https://www.b4x.com"
width=666
></iframe>
</body>
</html>

output:
** Activity (main) Create, isFirst = true **
** Activity (main) Resume **
Found: http://www.ibm.com
Found: http://www.google.com
Found: https://www.b4x.com

keep in mind that a lot of stuff runs via (hidden) iframes like statistic pages, ad providers etc. so you might want to filter stuff out that you don't want to log.
 
Last edited:

MODERN TALKING

Active Member
Licensed User
Longtime User
DAS IST WUNDERBAR

Just back home - going to make a Salad and get to work with your Code

Looks IMPRESSIVE :)
 

sorex

Expert
Licensed User
Longtime User
just thought of something...

to make life easier I lowercased the content. notice that this might not work for links like youtube as they use IDs based of lower and uppercase chars I believe.

but since you know the string and its lenght you can locate it in the original content and get it from there in the correct case (indexof, substr)

Edit: or even easier... replace the .toLowercase with .replace("IFRAME","iframe").replace("SRC","src"). this won't touch the url.
 
Last edited:

MODERN TALKING

Active Member
Licensed User
Longtime User
Thank you so much Sorex

Sent another small "donation"

Tomorrow is Independence Day in Malaysia - too busy to tinker

Please understand and Saturday I begin FAST & FURIOUS

One more thing, never suspect that I take Code and it WORKS and I tell it doesn't so I don't have to pay

I am an ETHICAL VEGAN - so DO NOT WORRY about cheating. Not in my Genes

Wait for Saturday - and I incorporate your precious Code ;)
 

MODERN TALKING

Active Member
Licensed User
Longtime User
Confirmation number: 7E691680U8505082C
GV

ps. Roycefer - your help is most appreciated too - wait for result of Sorex's Code

I don't forget those who help me - a LEO's loyalty and honor
 

MODERN TALKING

Active Member
Licensed User
Longtime User
Hi Sorex,

Been out of order for a month - personal

Sorry, but could not login for 33 days - don't be upset

EUR 10 donation cause you are my loyal buddy - Transaction ID: 9MM848555N9303456

Thank you

Regarding the Code - I get logged out when I skip to another page randomly

Need another solution - but we talk in a few days

Recuperating
 
Last edited:

sorex

Expert
Licensed User
Longtime User
maybe you should isolate the problem part from the source and pass it on.

it's hard to guess where it goes wrong
 
Top