2

I have built a system for our clients in JSP . Now I want to collect clients information with users permission . The following information will be got from our clients .

1. UUID 2. Hard disk serial number 3.Ip Address 4. MAC ADdress 5.PC AND OS info

Currently this is done with activeX object . But this system runs only in internet explorer browser . I want to change the system so that it will be browser independent .

I have thought several architecture.Let me allow to discuss about these architecture in a brief:

First Architecture (through JavaScript):

When the client will visit our web page, a pop up will be opened stating that ,"Do you allow to run this script ? " . If the user allows then the script will reside in clients pc . That script will be responsible for getting information about clients pc and sending information to our server . You can always consider the client will give permission to run the script as we will give directions to our client to run the script.

Second Architecture (through jar file)

A jar file will reside in every clients PC . This file will be responsible for getting information from clients pc and will send information to our server . Every client will be given a software . Upon installation of that software, jre will be installed and a jar file will reside in a specific directory . Another way to reside jar file in clients pc , Is it possible to push jar file to clients pc when they will visit our web application ? We want to it with their permission .

Third architecture (Through dll file):

A dll file written in C# will reside in clients pc . This dll file will be responsible for getting information from client pc . When client will first visit our web application , they will ask whether they want to give their permission to run the dll ? If they give permission , then the dll file will be kept clients pc and will be responsible for giving information of clients pc .

Does any of the above architecture make sense ? Can you give me some advantages and disadvantages of the above architecture ? If the task that has to be done by me is not possible by the above architecture/method , what steps can I take to get clients information?

I have researched a lot about this topic in the google . What I have learned that the modern browser restricts obtaining information from clients . But I want to get clients information with their valuable permission .

What I have tried:

I have tried to do this using several js library such as clientjs , nodejs. But clientjs is not capable of giving some information such as UUID , hard disk serial number . I have written a java code(desktop environment) which can take all information of a pc . But I cant call this code from my jsp page . I am also able to write a single C# code which can give output of clients information . But I can't call it from my jsp page .

Last note:

Hope what I want to tell is clear to everyone . Please help me to do this task or at least give me some idea/advice on how can I do it!

A last note to everyone is that our system is collecting information of users using ActiveX . This is only IE binded . I just want to do it browser independent.

Cœur
  • 37,241
  • 25
  • 195
  • 267
osimer pothe
  • 2,827
  • 14
  • 54
  • 92

1 Answers1

2

You can't just execute a dll method in browser (this is done for security reasons). In order to execute some compiled code in browser you will have to use a plugin .

There are several workaround for this problem . After gone through some links, it seems it can be possible through following option.

Option 1 :

Option 2 :

Create plug-in for those browser are written using the NPAPI. How to write a browser plugin?

Option 3 :

Write signed applets to call dll that runs from a html or any web application. It almost run on all browsers. Here is the link for sample .

Escape the sandbox: Access native methods from an applet

Option 4 :

Same task can be done using EdgeJS. You can find the answer at Call Function from DLL loaded in front-end javascript (load dll in clientside javascript) . The trick is to marshal functions between V8 and CLR and when the event triggers you send the message to javascript.

Call Function from DLL loaded in front-end javascript (load dll in clientside javascript)

Option 5 :

Build a C# application (windows only if you use .NET, all platforms if you only use the CoreCLR) that listens to swipes and triggers an event to send the data on all connected websockets.

Need to call client side DLL from browser

Option 6 :

You can have a client application written in say C# which connects to a JS websocket, then transfer the data. The WebSocket can check for specific chunks of data, and process it the way you want.

I have used it the way I have described in a project using a fingerprint scanner. Works great! If you add a little bit of Crypto, even better!

Call Function from DLL loaded in front-end javascript

Option 7 :

  1. Create an application that you can install on the users machine.
  2. Run an embedded HTTP server in this application.
  3. Ensure the embedded HTTP server returns CORS headers.
  4. Write your logic in and end-point in the HTTP server API.
  5. Use JS on the page to query the embedded HTTP server (if it runs).

Last words :

ActiveX is just a method of implementing browser plugin in IE. All other browsers use different plugin interfaces. Then if user will install your plugin in browser - this plugin will be available from JS and you can use it to execute some function in dll.

osimer pothe
  • 2,827
  • 14
  • 54
  • 92
Christopher Marlowe
  • 2,098
  • 6
  • 38
  • 68