Women in Technology

Hear us Roar



Article:
  Java vs. .NET Security, Part 1
Subject:   Here is a run file for unix
Date:   2004-03-10 01:24:53
From:   mzarathustra

# same behavior in linux


echo --- Intruder.java ---
cat Intruder.java
echo --- VictimPublic.java ---
cat VictimPublic.java
echo --- VictimPrivate.java ---
cat VictimPrivate.java
echo ""


rm -f *.class
cp VictimPublic.java Victim.java
javac Intruder.java


echo "--- calling public Victim.assault()"
java Intruder
echo ""


echo "--- calling private Victim.assault()"
rm Victim.*
cp VictimPrivate.java Victim.java
javac Victim.java
java Intruder


echo "Calling private version of Victim.assault() with verification"
java -verify Intruder