diff --git a/.classpath b/.classpath new file mode 100644 index 0000000000000000000000000000000000000000..3619eebd8f32ce5db84985ce4f1bbba1a062cfe5 --- /dev/null +++ b/.classpath @@ -0,0 +1,6 @@ +<?xml version="1.0" encoding="UTF-8"?> +<classpath> + <classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER"/> + <classpathentry kind="src" path="fuzzer"/> + <classpathentry kind="output" path="bin"/> +</classpath> diff --git a/.gitignore b/.gitignore index da4e5096bd577df638bf72903f197dcf88b4e5e2..28be01149450e46d14429d08b01b2d8bcc7ed80c 100644 --- a/.gitignore +++ b/.gitignore @@ -1,2 +1,3 @@ *~ \#* +/bin/ diff --git a/.project b/.project new file mode 100644 index 0000000000000000000000000000000000000000..0a1317d4d593bfcf8b41808291ee5b84bb378cb3 --- /dev/null +++ b/.project @@ -0,0 +1,17 @@ +<?xml version="1.0" encoding="UTF-8"?> +<projectDescription> + <name>swen90006-a2-2018</name> + <comment></comment> + <projects> + </projects> + <buildSpec> + <buildCommand> + <name>org.eclipse.jdt.core.javabuilder</name> + <arguments> + </arguments> + </buildCommand> + </buildSpec> + <natures> + <nature>org.eclipse.jdt.core.javanature</nature> + </natures> +</projectDescription> diff --git a/fuzzer/Fuzzer.java b/fuzzer/Fuzzer.java index 9f7b1a8fc8ba40cd19ef5ddbe73b828ef8fd78fa..1fc8dbebd1207a7fd030df1f221da6bc3a59eb5d 100644 --- a/fuzzer/Fuzzer.java +++ b/fuzzer/Fuzzer.java @@ -14,25 +14,9 @@ public class Fuzzer { try { out = new FileOutputStream(OUTPUT_FILE); pw = new PrintWriter(out); - - /* We just print one instruction. - Hint: you might want to make use of the instruction - grammar which is effectively encoded in Instruction.java */ - /*pw.println("MOV R1 0"); - for(int x=0;x<20000;x++){ - pw.println("LDR R0 R1 " + x); - } + pw.println("RET R0"); - */ - /*pw.println("RET R-1"); - pw.println("MOV R0 200"); - //pw.println("DIV R0 R0 R1"); - for(int x=0;x<31;x++){ - pw.println("ADD R"+(x+1)+" R"+x +" R"+x); - }; - pw.println("RET R31");*/ - pw.println("JMP -5"); - + }catch (Exception e){ e.printStackTrace(System.err); System.exit(1); diff --git a/src/pocs/poc4.s b/src/pocs/poc4.s index 3f00d45a0171ddaabec1376567c738d3fa33f9e7..cdeec3e7b963cb07e2160644906f5a54f1ea5813 100644 --- a/src/pocs/poc4.s +++ b/src/pocs/poc4.s @@ -1 +1 @@ - pw.println("RET R31"); \ No newline at end of file +RET R31 \ No newline at end of file diff --git a/src/pocs/poc5.s b/src/pocs/poc5.s index e69de29bb2d1d6434b8b29ae775ad8c2e48c5391..3340ee58e0ae1d027c4e1d94695c8527b03bb5e5 100644 --- a/src/pocs/poc5.s +++ b/src/pocs/poc5.s @@ -0,0 +1 @@ +JMP -5 \ No newline at end of file