Skip to content
Snippets Groups Projects
Select Git revision
  • 4dc852aa1131136c33d1864547e2514fa44772f0
  • master default protected
  • dzl
  • vuln
  • Callum
5 results

Fuzzer.java

Blame
  • Forked from Toby Murray / swen90006-a2-2018
    7 commits ahead of the upstream repository.
    Zhaolin Deng's avatar
    Zhaolin Deng authored
    4dc852aa
    History
    Fuzzer.java 1.10 KiB
    import java.io.IOException;
    import java.io.FileOutputStream;
    import java.io.PrintWriter;
    
    
    /* a stub for your team's fuzzer */
    public class Fuzzer {
    
        private static final String OUTPUT_FILE = "fuzz.s";
        
        public static void main(String[] args) throws IOException {
            FileOutputStream out = null;
            PrintWriter pw = null;
            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");
                */
                
            }catch (Exception e){
                e.printStackTrace(System.err);
                System.exit(1);
            }finally{
                if (pw != null){
                    pw.flush();
                }
                if (out != null){
                    out.close();
                }
            }
    
        }
    
    }