HexEdit
- Download HexEdit from this web-site
ftp://ftp.sunet.se/pub/simtelnet/win95/editor/hexfre20.zip
- Use a simple Java editor (not NetBeans) to make a very simple Java program
that adds two numbers and prints out the answer:
public class Test
{
public static void main(String[] args)
{
int
A = 25;
int
B = 74;
int
C = A + B;
System.out.println("Sum
= " + C);
}
}
Save it
in the root directory of the D: drive.
Compile the program, run
it, make sure it is working correctly.
- Run Command.com to get a DOS window.
- Run your compiled java class by typing : java d:\Test.
It should
print Sum = 99.
- Now run HexEdit and open D:\Test.class
- Search for the byte containing 25. Change it to 26.
- Go back to the DOS window and run your program again (java d:\Test).
It
should print 100 for the answer instead of 99.
- Go back to HexEdit and change some other byte.
Try running
the program again - it will probably cause an error.
Changing Web Pages
- Surf to Google's main page, and save this on drive D: as Google.html
- Open the SAVED page in Internet Explorer. What happens?
- Find some page on the web that you can save onto D: and then open correctly.
- Choose some text on the page and change it. Use any program that
might work.
Open the page and check that it worked correctly.
- Find one byte (character) in your page that you can change that
makes the page NOT load correctly.
- Find a web-page that contains JavaScript code. Find something
in the JavaScript code that you understand and try to change it.