1

I have a java stand-alone app which needs to monitor all browser traffic.

I have tried using JPCAP and then sniffing the packets, but this is problematic for https sites like youtube of facebook because I cannot decode their content to read the url from it. I have also tried JNA to try reading all opened window titles, but the title does not show the url.

How to monitor/read all the URLs a person is visiting?

Thank you,
Georgian

George D
  • 2,327
  • 3
  • 20
  • 26

2 Answers2

0

Selinium WebDriver might be a viable alternative - while you would need to install the relevant software, it allows full control over the browser. In the API docs for example:

https://selenium.googlecode.com/git/docs/api/java/org/openqa/selenium/WebDriver.html#getCurrentUrl--

There is a guide on how to connect to an existing browser session here:

How to use/attach an existing browser using Selenium?

Community
  • 1
  • 1
Will
  • 810
  • 6
  • 21
0

Take a look at Burp Suite. It's an application which can work as a proxy and analyze or modify HTTP and HTTPS requests and responses. It is possible to write a plug-in for Burp using the Java language, and your plug-in will be able to do anything with the requests and responses, in particular, store the requested URLs.

You will have to install Burp, create a plug-in, launch Burp with the plug-in, add Burp's HTTPS certificate to the system trusted certificate list, set the browser's proxy address to the port opened by Burp, and somehow ensure that the user will not close Burp, disable proxy or use another browser...

Goblin Alchemist
  • 829
  • 5
  • 11