A
A
ArduinoGirl2018-03-08 21:56:03
JavaScript
ArduinoGirl, 2018-03-08 21:56:03

How to access data from adjacent browser window?

Good afternoon.
Non-standard task.
You need to access the data of the adjacent window in the browser in which the third-party site is open. This site is against being shown in frames and forbids access via JavaScript, gives the following errors:
Refused to display ' https://... ' in a frame because it set 'X-Frame-Options' to 'sameorigin'
Uncaught DOMException : Blocked a frame with origin " http://... " from accessing a cross-origin frame.
Taking it through Curl also does not work, since there is a captcha.
The most annoying thing is that I open it and see it on the screen of my computer. I just need to somehow programmatically read its content.
There must be some solution, including the most crooked one.

Answer the question

In order to leave comments, you need to log in

3 answer(s)
B
Boris Korobkov, 2018-03-08
@BorisKorobkov

Non-standard task.
You need to access the data of the adjacent window in the browser in which the third-party site is open. This site is against being shown in frames and forbids access via JavaScript, gives such errors...
It also doesn't work to take it via Curl, because there is a captcha.
The most annoying thing is that I open it and see it on the screen of my computer. I just need to somehow programmatically read its content.
There must be some solution, including the most crooked one.

Non-standard task.
You need to gain access to the bank vault, which is located in a neighboring building. This bank is against being hacked, and prohibits unauthorized access, the alarm is turned on.
It is also impossible to take it through a tunnel, since there is a reinforced concrete slab there.
The most annoying thing is that I open my window and see the entrance to the bank on the street. I just need to get into the safe somehow.
There must be some solution, including the most crooked one.

S
Stalker_RED, 2018-03-08
@Stalker_RED

Browser extension.
If you are too lazy to bother with the extension, then you can make a bookmarklet with something like this:

javascript:(function(){
  fetch("/save", { // адрес вашей "сохранялки"
    method: "POST",
    body: document.body.innerHTML
  });
})();

R
rPman, 2018-03-09
@rPman

Only if both sites are under your control, those.. you can add your code there!
If without problems - through your third-party service, GET HTTP requests, encoding the data you need in the parameters (up to 64kb after encoding).
Both sites must make requests to it with a mark, request data or receive.
Unfortunately, if you have https, your service must also use https.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question