Background
I am reworking the remote-browser plugin for a software called ettercap. I catch the HTTP Headers via Man in the Middle attack and extract the url. I have set a filter with an "Accept: ..." Statement so not everything will be opened. But some Ads and Images still manage to pass this filter and open themselves in my browser.
I was hoping to find a solution in the firefox source code. I already looked over various files and researched a lot.
I am guessing it has something to do with a Method called "HasHeaderValues" or a related
file.
I need to know how firefox knows an incoming link via HTTP-Package is an image/ad for the page it is working on or it is a new page which must open in a new tab.
Question
So the question is: In which file or method does firefox load external content like ads or images.
Thanks in advance
Where does firefox load page content
- DanRaisch
- Moderator
- Posts: 127233
- Joined: September 23rd, 2004, 8:57 pm
- Location: Somewhere on the right coast
Re: Where does firefox load page content
Moving to Web Development.
- trolly
- Moderator
- Posts: 39851
- Joined: August 22nd, 2005, 7:25 am
Re: Where does firefox load page content
Browser do not accept incoming calls, they initiate them.
Firefox makes a REQUEST and the server answers with a RESPONSE.
The response contains all information about the data sent like size and type.
Active content like JS can request additional data and open new windows.
The data itself does not contains any information where it belongs to. The browser makes that connection.
Firefox makes a REQUEST and the server answers with a RESPONSE.
The response contains all information about the data sent like size and type.
Active content like JS can request additional data and open new windows.
The data itself does not contains any information where it belongs to. The browser makes that connection.
Think for yourself. Otherwise you have to believe what other people tell you.
A society based on individualism is an oxymoron. || Freedom is at first the freedom to starve.
Constitution says: One man, one vote. Supreme court says: One dollar, one vote.
A society based on individualism is an oxymoron. || Freedom is at first the freedom to starve.
Constitution says: One man, one vote. Supreme court says: One dollar, one vote.
-
- Posts: 3
- Joined: March 25th, 2015, 7:42 am
Re: Where does firefox load page content
Okay, I get what you are telling me.
Do you know in which .cpp or .js file this happens so I can have a look at the "Algorithm"?
Thanks in Advance
Do you know in which .cpp or .js file this happens so I can have a look at the "Algorithm"?
Thanks in Advance
- trolly
- Moderator
- Posts: 39851
- Joined: August 22nd, 2005, 7:25 am
Re: Where does firefox load page content
Not for the native firefox implementation.
If you want to know how to do it in JS (the scripts are loaded with the page):
http://www.w3schools.com/jsref/met_win_open.asp
You probably have to scan the embedded and external scripts which are loaded with/from the page. And maybe even asynchron requests.
http://www.w3schools.com/ajax/ajax_xmlh ... t_send.asp
If you want to know how to do it in JS (the scripts are loaded with the page):
http://www.w3schools.com/jsref/met_win_open.asp
You probably have to scan the embedded and external scripts which are loaded with/from the page. And maybe even asynchron requests.
http://www.w3schools.com/ajax/ajax_xmlh ... t_send.asp
Think for yourself. Otherwise you have to believe what other people tell you.
A society based on individualism is an oxymoron. || Freedom is at first the freedom to starve.
Constitution says: One man, one vote. Supreme court says: One dollar, one vote.
A society based on individualism is an oxymoron. || Freedom is at first the freedom to starve.
Constitution says: One man, one vote. Supreme court says: One dollar, one vote.