Identify via Windows Forms C# the URL the user accesses

Asked

Viewed 467 times

1

I have a LAN House and would like to do a search with graphics on the websites that my clients access.

To do this, I need a way to capture the URL’s they type in the browser through a Windows Forms application in C#, someone has already made this solution or has an idea of how to do it?

I only need the function that captures the Urls.

1 answer

2

For this task I would not use a simple application because:

  • Depending on the browser software, you will have to access an internal resource of it: the edit box. And as if it wasn’t hard enough, an update can change access to the resource and the software will stop working;
  • Not all access is typed, clicked addresses may be of interest or typed directly into the command line if possible, or else with shortcuts;
  • If all access is captured, it still depends on being able to access browser resources;
  • Analysis of all network traffic avoids accessing the browser, but would be a little absurdly complex.
  • The software has to be installed on all machines that access the internet, even with data centralized on a server.

Perhaps it would be easier to create an application with an internet navigation component, which is possible, but it will involve doing the entire interface with the client, because the navigation component is only the framework that accesses the internet. But it must still be complex, although it is a valid alternative. This software could record or send the list of pages accessed to a central database.

I would use a transparent proxy on a separate computer or even on a virtual machine, as it can record a log with all the access addresses. Transparent because it rules out the need to configure customers.

Just don’t expect the log to be easy to read, as it should contain a lot of records and information. There are web interfaces that help analyze logs.

The new proxy server would be the gateway and only need to configure the DHCP, assuming the stations are currently configured with it.

And as a lanhouse, there are other advantages:

  • There must be several stations, none of them need to be modified;
  • It can be a part of security because, if desired, it allows you to configure filters for addresses or prohibited content;
  • Since it is a machine with OS and everything, can further improve security with the addition of a firewall;
  • You can improve your browsing speed by using cache. If the content is static, for example an image, your internet is only used on the first access, after that, any user who needs the same image will get it from the cache;
  • You can improve your browsing speed more if you use the cache on a Ramdrive, but in this case the cache is lost on shutdown, and it’s good to have a reasonable amount of RAM.

And, finally, it will be easier to install and configure a new proxy server than to create an application (in C#) to capture a string feature of a third-party software (browser) or capture and analyze network traffic or create an application that plays the role of browser.

The OS could be GNU/Linux, Freebsd or other that pleases and has available software to create a proxy server and possibly firewall. I don’t remember proxy, but for firewall I used a system that fit on a 3.5 floppy disk".

Do not forget to have somewhere accessible to customers, contract, information board, etc., the warning that all accesses are monitored and recorded, and static content (that does not change and has no security) can be cached!

Browser other questions tagged

You are not signed in. Login or sign up in order to post.