Java Mechanic
Because sandboxes are for children.
Java Mechanic is a Java application (and signed applet!) that
can load other Java applications and applets. Modify public, private
and protected fields and activate methods while the target application
is running. Also decompiles, recompiles, or saves any loaded objects or source code.
Using a built in java code interpreter, Java Mechanic can create and instantiate new Java objects on the fly.
A tad bit scary, actually.
Java Mechanic is self-contained in a single jar file, and there is nothing to install, or extract. It's best run from it's own directory, as it will create and extract any necessary files on the fly.
Features
Tips
Important Commands
Online Demo
Project Information
History
Features
Tips
-
Optimum running platform
Java Mechanic has been designed and tested with:
Sun Java 1.4.2 on Windows XP.
You may run into platform specific bugs, so your mileage may vary.
Please let me know if something doesn't seem to work right for you, it may be a platform specific bug.
-
Dynamic command creation
In a new console (type "console") window,
paste and execute this:
package commands;
import javax.swing.*;
public class test extends Commands{
public void help(){return "help info";}
public void run(){
//your code here
main.out(in);
//main.out(String in) prints in to the main window.
}
}
Type in whatever action you'd like to happen in the run() method.
Remember to use the import statement for included classes and use the command
"loadclass CLASS|JAR|URL" to include any outside classes. Main main and String in are your two program variables to work with.
This program just echoes your input back to you when you use the
freshly created command "test STRING".
-
Saving console source code
Click the "Save" button. A new String object is then created with the contents of that window in the variable src####. Use the command "savesrc src#### file.java" to write the String contents to a file. The command "loadsrc file.java" will load AND THEN EXECUTE the java code back in the interpreter.
-
System.exit(0); disabled
Has been disabled to keep other program's System.exit(0); from shutting Java Mechanic down. The only allowable way to shutdown fully is with a System.exit(100);.
-
Bootup files
There are two files that Java Mechanic tries to load at startup:
JavaMechanicDesktop - The saved desktop, use the command "desktop save" to generate one.
JavaMechanicBoot - This is a script file that executes on startup. Script files contain one command per line,
and also any one line Java code gets executed as a command.
Important Commands
Full Command List:
a again - loads up your last command about applet URL tries to load a remote applet. Click 'Execute' to continue... cd DIRECTORY change directory ce class editor classpath lists loaded classpath clr clear this screen compile FILE|NULL compiles FILE.java to FILE.class file or enter code to compile into CLASS.class console type in straight java code to execute with this db DATABASE PORT start a SQL DATABASE server listening on PORT dbman USER PASSWORD Database manager - Default Admin account USER name is 'sa', PASSWORD is '' (null) del FILE delete FILE desktop [save|load] expiremental desktop feature - screen scrape other applications -
store commands inside buttons - move AWT and Swing features around dir returns list of current directory ekit Ekit HTML editor exec FILE execute system commands exit facelift CONTAINER|JFRAME screen scrape into destop help hide
j [FILE] powerful code editor javadoc PACKAGE [PACKAGE...] requires access to javadoc from a JDK, and make sure you are in the source directory javadocview jcards [FILE] simple database to keep track of the looser things in life jetty turn on a HTTP(web page) server, with root being the same directory that
JavaMechanic#.#.jar is started from
- examine jetty.xml to change this and other settings jftp amazing FTP and network browser jode this would decompile the paint off your walls load OBJECT FILE restores a saved OBJECT from FILE loadclass PATH|FILE|URL use this to load jars and classes into the current classpath loadsrc FILE runs source code saved in FILE mem how much memory being consumed mkdir DIRECTORY make a new directory out all system output is gathered in here prop [SYSTEM_PROPERTY VALUE] prop by itself will show you the system properties - otherwise sets properties quit reflect shows in realtime the values of fields of java objects - browse running objects reflect2 different style of reflector - double click entries on the left to drill deeper ren OLDFILE NEWFILE rename files reset resets the realtime interpreted Java environment used by console and reflectors
- close all those windows beforehand save OBJECT FILE save an OBJECT into FILE savesrc STRINGOBJECT FILE saves any string into FILE - IE: a=new String("test"); save a test.txt script FILE runs JavaMechanic commands and Java code saved from FILE security feeling a little naked? turn back on some of Java's built in security features threads see which threads are running and put a stop to them view FILE quick text view of file web built in HTML browser webn URL tries its best to open your native internet browser whoami ip address
xnap peer 2 peer networking xor PASSWORD FILE exclusive-or a file into a random stream - exclusive-or that FILE with the same
PASSWORD to restore it
Online Demo
WARNING!!!
This will load the Java Mechanic in your browser with unrestricted security, if you grant it permission. This allows the program to connect to the internet, save files, and interpret Java source code. Since this program can interpret any Java commands typed into it, you could theoretically cause major mayhem on your system with the wrong commands. Also any applets or applications loaded into the Java Mechanic will run without security restrictions. Please be careful!
Java Mechanic by default will ignore most all security checks, totally
stepping out of the "sandbox" it would normally be confined to.
DISCLAIMER!!!
This program is distributed in the hope that it will be useful, but without any warranty; without even the implied warranty of merchantability or fitness for a particular purpose.
I will not be held responsible for any damages caused by this program, this program is provided "as is". Proceed at your own risk.
Java Mechanic Applet (~15 MB download.)
Java Mechanic Web Start
Note: The help command and the decompiler rely on Java being to find the location of the downloaded JavaMechanic2.x.jar file. Sometimes
it's not always so easy to find in an applet or webstart context. In that case, you won't get the full functionality unless you run
this as an application, or you could do a manual search for the downloaded jar file, and then use the loadclass command to load it onto the classpath.
Project Information
Java Mechanic project page
Java Mechanic download page
Licenses
History
- 4.4.4 - Java Mechanic 3.0
XNap peer to peer networking
Jetty personal web server
calculators
HTML Editor
improved help
for commands
improved built in web browser
- 3.22.4 - Java Mechanic 2.4
Fixed a bug that prevented Java Mechanic from loading in Linux. Added the Class Editor application. Updated to newest version of J-FTP.
- 8.13.3 - Java Mechanic 2.3
Fixed the save function in the console window, plus added a new compile command. Now compiles
java source code without needing the javac tool.
- 7.30.3 - Java Mechanic 2.1
Completely refactored, and some parts redesigned. Updated the
reflect window, it will now decompile and recompile the source code of
any object. Loading applets over the network works a lot better now.
Contains:
Interpreter
Decompiler
Recompiler
Editor
FTP
Database
Object saving and loading in XML
Applet Loader
©MMIV Paul Klemstine
|