Banner click inside Javascript src

micuka

Newbie
Joined
Dec 7, 2013
Messages
2
Reaction score
0
Hi,

I am working on a project that sends traffic to another site and simulate a banner click.
So far I am able to send traffic(and display it as a legit traffic) to another domain using the referer spoof method posted by JohnsonDaniel.

Now, I am facing another problem. I am trying to simulate a banner click inside a javascript src tag that I receive from the advertising company. I tried to simulate a click with JQuery using this code based on the coordinates of banner, but with no success:
Code:
$(document.elementFromPoint(500, 1000).click());
The code is executed on a onclick() inside a regular img tag.
I also tried this, which simulated a click inside the iframe of the Javascript code:
Code:
var banner = document.elementFromPoint(1000, 500);
if (banner instanceof HTMLIFrameElement)
   banner = banner.contentWindow.document.elementFromPoint(50, 50);
Doing this resulted in complainning that I can't click on a iframe that is on a different domain.

Can someone please advice me how can I acomplish this?

Best regards,
Nicolas
 
Doing this resulted in complainning that I can't click on a iframe that is on a different domain.
Can someone please advice me how can I acomplish this?
you can't trigger a click event on an element inside an iframe that originates from a different domain. It's called the same-origin policy and it's essentially the cornerstone of web application security.
 
you can't trigger a click event on an element inside an iframe that originates from a different domain. It's called the same-origin policy and it's essentially the cornerstone of web application security.
Yes, after trying that I found out about same-origin policy.
 
Back
Top