[All] encode your URL so cant be recognized but works
Posted: Wed Sep 04, 2002 4:37 am
Code updated for 5.20+
Restored from previous forum. Originally posted by ricardo.
Hi,
For some obscure reason some one may want to obscure its URL.
Per example, imagine that we want to obscure http://www.purebasic in a way that the resulting URL is:
[url]http://www.microsoft.com@%77%77%77%2E%70%75%72%65%62%61%73%69%63%2E%63%6F%6D[/url]
or even
[url]http://www.cnet-winning-award-software.com@%77%77%77%2e%70%75%72%65%62%61%73%69%63%2e%63%6f%6d/[/url]
I made a little app that let you do this:
Dont use slash (/ or \) into the "tricky URL" (http://www.microsoft.com or http://www.cnet-winning-award-software.com in the examples).
Try it and let me know if you find better and evil ways
to trick the browser and the users : )
Best Regards
Ricardo
Dont cry for me Argentina...
Restored from previous forum. Originally posted by ricardo.
Hi,
For some obscure reason some one may want to obscure its URL.
Per example, imagine that we want to obscure http://www.purebasic in a way that the resulting URL is:
[url]http://www.microsoft.com@%77%77%77%2E%70%75%72%65%62%61%73%69%63%2E%63%6F%6D[/url]
or even
[url]http://www.cnet-winning-award-software.com@%77%77%77%2e%70%75%72%65%62%61%73%69%63%2e%63%6f%6d/[/url]
I made a little app that let you do this:
Code: Select all
If OpenWindow(0,100,150,640,220,"Test",#PB_Window_SystemMenu)
StringGadget(1,10,30,500,20,"[url]http://www.purebasic.com[/url]");write here the url you want to obscure
StringGadget(2,10,90,500,20,"[url]http://www.microsoft.com[/url]");use any text with out @
StringGadget(3,10,60,500,20,"")
StringGadget(4,10,120,500,20,"")
ButtonGadget(5,200,150,150,25,"Obscure your Url")
ButtonGadget(6,510,60,120,20,"Copy to ClipBoard")
ButtonGadget(7,510,120,120,20,"Copy to ClipBoard")
TextGadget(8,520,30,100,20,"Here goes your URL")
TextGadget(9,520,90,140,20,"Here goes tricky URL")
Repeat
EventID=WaitWindowEvent()
Select EventID
Case #PB_Event_Gadget
Select EventGadget()
Case 5
String$ = ""
For i = 1 To Len(GetGadgetText(1))
If Mid(GetGadgetText(1),i,1) = "\" Or Mid(GetGadgetText(1),i,1) = "/"
Letter$ = "%" + Hex(Asc(Mid(GetGadgetText(1),i,1)))
Else
Letter$ = "\"
EndIf
String$ = String$ + Letter$
Next i
SetGadgetText(3,String$)
SetGadgetText(4, GetGadgetText(2) + "@" + String$)
Case 6
SetClipboardText(GetGadgetText(3))
Case 7
SetClipboardText(GetGadgetText(4))
EndSelect
EndSelect
Until EventID=#PB_Event_CloseWindow
EndIf
Try it and let me know if you find better and evil ways

Best Regards
Ricardo
Dont cry for me Argentina...