Create an applet to access the hardrive

Last update on May 22, 2009 09:14 AM by jak58
Published by jad05

Create an applet to access the hardrive









An applet is a program written in the Java programming language that can be induced in an HTML page, in the same way an image is included in a page. Applets are used to provide interactive features to web applications, which aren’t native to HTML. Most of the time, Java applets security totally bans access to resources from a machine (hard disk, the registry, etc..) And network (applet can only communicate with its server origin.)


If you want to create an applet that exceeds these securities, it is required:

- To create a cryptographically signed applet
and
- That the user explicitly allows the applet to access the system
(This is a voluntary action by the user who cannot be exceeded.)



Once these two conditions are met, you can read / write to disk, launch programs (Runtime.getRuntime ().exec ("...")), download things (url connection) or use the eval ( ) command.

Intructions:

Compile your applet


As usual create a .jar file.

Generate Key


Your encryption key will sign you in your applets.

Type: keytool-genkey-alias (your alias name)
and enter the necessary information. Remember the password you entered to protect this key.

You do need to generate your key once. Once your key, you can use it to sign all the applet you want.
(Note that your key can optionally have an expiration date.)

Note: On Windows, the key is placed in the user profile.
(\Documents and Settings\yourlogin\.Keystore…)

You must protect at all costs this keystore.
(If you do fly, someone could create malicious applets signed by you!)

Sign your applet with your Key


Type: jarsigner -verbose monapplet.jar votreNomdAlias
Enter your Key password.
So now, your applet is signed.

Test your Applet


Place your applet on the server (this is important), and test.

You will see a window for Security Warning that asks the user if he allows this applet.

Example:

.


Note:

The popup message saying that the cryptographic signature is invalid is actually false:

The applet has an cryptographic signatures (yours), but this signature was not validated by a certification authority (Thawte, VeriSign, etc.).

This validation third (PKI) is charged.

But technically, it is not absolutely necessary and does not diminish the safety operation of your applet.

It's just that giving money to some PKI (whose keys are installed by default in browsers) you can get rid of this warning.

To see if it is worth paying for it.
Best answers for « Create an applet to access the hardrive » in :
Make a portable application with ThinApp Show Make a portable application with ThinApp How to proceed Compilation ThinApp is an application that can be used to make some applications portable for the user. But you should make this procedure only with applications that have not...
[VBA: VB6] Using excel from another application Show [VBA: VB6] Using excel from another application Here is a little routine to call Excel from VB6 or another Office application. Paste in a general module (eg Module1) In VBA>> Insert>> Module and paste in the window ... In VB6>>...
Starting with visual basic ShowStarting with visual basic Visual Basic is a programming tool designed by Microsoft for its Component Object Model (COM). This tool can be used to create applications for windows, web, mobile devices etc.The latest version of Visual basic...
Associating an application to a file extension ShowAssociating an application to a file extension Display all file extensions Modify an existing file association Create a new file association Manage the list of file extensions Display all file extensions Windows XP by default will mask...
Create an iTunes account without credit card ShowCreate an iTunes account without credit card Itunes the default application for the synchronization of iPod, iPod Touch and iPhone requires creating an account to use, especially in order to download applications. However, when trying...
Creating an ad hoc WiFi network ShowPresentation of the ad hoc WiFi network If you have two or more computers equipped with wireless adapters (WiFi cards), it is possible to easily connect them in a network by setting up a so-called "ad hoc" network, that is, a computer-to-computer...
Creating a WiFi network in infrastructure mode ShowPresentation of the WiFi infrastructure network The set-up of a Wi-Fi network in infrastructure mode is very similar to that of a computer-to-computer Wi-Fi network except for the following differences: A Wi-Fi network in infrastructure mode...
WiFi modes of operation (802.11 or Wi-Fi) ShowThere are several kinds of hardware that may be used to implement a WiFi wireless network: Wireless adapters or network interface controllers (NICs for short) are network cards with the 802.11 standard which let a machine connect to a wireless...