Started by Peter DanielsSep 24, 2021

Open
replace/manipulate "hostname" in url without redirecting to it

2 VIEWES 0 LIKES 0 DISLIKES SHARE
0 LIKES 0 DISLIKES 2 VIEWES SHARE

Is there any way where I can replace the hostname in url but I do not want the browser to load/redirect/open the replaced hostname, it should just show it above in address bar nothing to do with it.

Scenario:

I am testing a website (legally) where I found that it is just checking the top.location.hostname in URL and if it is equal to self.location.hostname then it behaves normally else it throws the alert which is why I am guessing there could be a possibility of clickjacking if I can replace the hostname in address bar

If it can be done through JS then its awesome, i can load the my script of changing the name before the iframe domain hits it

1 Replies

Neel Dey replied 2 days ago0 likes0 dislikes

You can use pushState to do what you describe.

You must be Logged in to reply
Techiio

Techiio is on the journey to build an ocean of technical knowledge, scouring the emerging stars in process and proffering them to the corporate world.

Follow us on:

facebooklinkdeintwitter

Subscribe to get latest updates

You can unsubscribe anytime from getting updates from us
Copyright techiio.com @2020 Kolkata, India
made with by Abhishek & Priyanka Jalan
Copyright techiio.com @2020
made with by Abhishek & Priyanka Jalan